diff --git a/public/css/ui/views.css b/public/css/ui/views.css index a2b6918d6e..a51163a04b 100644 --- a/public/css/ui/views.css +++ b/public/css/ui/views.css @@ -113,7 +113,7 @@ div.ripped-paper-border { background: url('../lib/images/ui/ripped-border.png') top repeat-x; position: absolute; margin-left: -15px; - margin-top: -15px; + margin-top: -25px; padding-right: 30px; height: 15px; } diff --git a/public/js/legacy/widgets/form/form.js b/public/js/legacy/widgets/form/form.js index 87ea383d88..bc63d22c5b 100644 --- a/public/js/legacy/widgets/form/form.js +++ b/public/js/legacy/widgets/form/form.js @@ -133,12 +133,9 @@ _f.Frm.prototype.setup_print_layout = function() { me.print_doc(); }, 'icon-print'); - var layout_main = $(this.print_wrapper).find(".layout-main"); - - $('
') - .prependTo(layout_main) - .css({"width": $(layout_main).width()}); + appframe.add_ripped_paper_effect(this.print_wrapper); + var layout_main = $(this.print_wrapper).find(".layout-main"); this.print_body = $("
").appendTo(layout_main) .css("min-height", "400px").get(0); diff --git a/public/js/wn/ui/appframe.js b/public/js/wn/ui/appframe.js index c062b56e46..4ec4ceb76a 100644 --- a/public/js/wn/ui/appframe.js +++ b/public/js/wn/ui/appframe.js @@ -110,6 +110,17 @@ wn.ui.AppFrame = Class.extend({ changeYear: true, }).val(dateutil.str_to_user(date) || "").appendTo(this.toolbar); }, + add_ripped_paper_effect: function(wrapper) { + if(!wrapper) var wrapper = wn.container.page; + var layout_main = $(wrapper).find('.layout-main'); + if(!layout_main.length) { + layout_main = $(wrapper).find('.layout-main-section'); + } + layout_main.css({"padding-top":"25px"}); + $('
') + .prependTo(layout_main) + .css({"width": $(layout_main).width()}); + } }); // parent, title, single_column