浏览代码

[minor] [print] create print html in a new window, so as to avoid style creep

version-14
Anand Doshi 12 年前
父节点
当前提交
cf211e4888
共有 1 个文件被更改,包括 2 次插入6 次删除
  1. +2
    -6
      public/js/legacy/widgets/form/print_format.js

+ 2
- 6
public/js/legacy/widgets/form/print_format.js 查看文件

@@ -45,12 +45,7 @@ _p.def_print_style_other = "\n.simpletable, .noborder { \
}"; }";


_p.go = function(html) { _p.go = function(html) {
var w = window.open();
if(!w) {
msgprint(_("Please enable pop-ups"));
return;
}
w.document.write(html);
var w = _p.preview(html);
w.print(); w.print();
w.close(); w.close();
} }
@@ -62,6 +57,7 @@ _p.preview = function(html) {
return; return;
} }
w.document.write(html); w.document.write(html);
return w
} }






正在加载...
取消
保存