commonified ripped paper effect and ctrl+s in todo
This commit is contained in:
parent
cd60c1193f
commit
82ecbf64dc
3 changed files with 14 additions and 6 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
||||
$('<div class="ripped-paper-border"></div>')
|
||||
.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 = $("<div style='margin: 25px'>").appendTo(layout_main)
|
||||
.css("min-height", "400px").get(0);
|
||||
|
||||
|
|
|
|||
|
|
@ -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"});
|
||||
$('<div class="ripped-paper-border"></div>')
|
||||
.prependTo(layout_main)
|
||||
.css({"width": $(layout_main).width()});
|
||||
}
|
||||
});
|
||||
|
||||
// parent, title, single_column
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue