ui cleanup + added ripped paper border

This commit is contained in:
Rushabh Mehta 2012-10-02 15:57:19 +05:30
parent 20fb56cd4b
commit 5e3ffd3e21
10 changed files with 56 additions and 38 deletions

View file

@ -8,24 +8,25 @@ div.psidebar div.head {
margin-bottom: 12px;
}
div.psidebar div.section {
margin-bottom: 11px;
div.section {
margin-bottom: 15px;
overflow: hidden;
}
div.psidebar div.section-head {
padding: 5px 11px;
border-bottom: 1px solid #aaa;
div.section div.section-head {
padding: 5px 0px;
font-size: 109%;
font-weight: bold;
}
div.psidebar div.section-body {
margin: 7px 11px 11px 11px;
div.section div.section-body {
}
div.psidebar div.section-item {
div.section div.section-item {
margin-bottom: 7px;
}
div.psidebar div.section-item, div.psidebar .section-link {
div.section div.section-item, div.section .section-link {
color: #666;
}

View file

@ -113,4 +113,11 @@ span.appframe-tab span {
display: inline-block;
}
div.ripped-paper-border {
background: url('../lib/images/ui/ripped-border.png') top repeat-x;
position: absolute;
margin-left: -15px;
margin-top: -15px;
padding-right: 30px;
height: 15px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 744 B

View file

@ -133,9 +133,15 @@ _f.Frm.prototype.setup_print_layout = function() {
me.print_doct();
}, 'icon-print');
this.print_body = $(this.print_wrapper).find(".layout-main")
.css("min-height", "400px").get(0);
var layout_main = $(this.print_wrapper).find(".layout-main");
$('<div class="ripped-paper-border"></div>')
.prependTo(layout_main)
.css({"width": $(layout_main).width()});
this.print_body = $("<div style='margin-top: 25px'>").appendTo(layout_main)
.css("min-height", "400px").get(0);
}

View file

@ -34,12 +34,12 @@ _f.FrmHeader = Class.extend({
this.$w = this.appframe.$w;
this.appframe.add_tab('<span class="small-module-icons small-module-icons-'+
frm.meta.module.toLowerCase()+'"></span>'+
' <span>'+ frm.meta.module + "</span>", 0.4, function() {
' <span>'+ frm.meta.module + "</span>", 0.7, function() {
wn.set_route(wn.modules[frm.meta.module])
});
if(!frm.meta.issingle) {
this.appframe.add_tab(frm.doctype, 0.3, function() {
this.appframe.add_tab(frm.doctype, 0.5, function() {
wn.set_route("List", frm.doctype);
});
}

View file

@ -21,11 +21,14 @@
//
// default print style
_p.def_print_style_body = "html, body, div, span, td { font-family: Arial, Helvetica; font-size: 12px; }" + "\npre { margin:0; padding:0;}"
_p.def_print_style_body = "html, body, div, span, td { \
font-family: Arial, Helvetica; font-size: 12px; }\
pre { margin:0; padding:0;}"
_p.def_print_style_other = "\n.simpletable, .noborder { border-collapse: collapse; margin-bottom: 10px;}"
+"\n.simpletable td {border: 1pt solid #000; vertical-align: top; padding: 2px; }"
+"\n.noborder td { vertical-align: top; }"
_p.def_print_style_other = "\n.simpletable, .noborder { \
border-collapse: collapse; margin-bottom: 10px;}\
.simpletable td {border: 1pt solid #777; vertical-align: top; padding: 4px; }\
.noborder td { vertical-align: top; }"
_p.go = function(html) {
var d = document.createElement('div')
@ -691,14 +694,14 @@ print_table = function(dt, dn, fieldname, tabletype, cols, head_labels, widths,
}(),
cell_style: {
border: '1px solid #000',
padding: '2px',
border: '1px solid #999',
padding: '3px',
verticalAlign: 'top'
},
head_cell_style: {
border: '1px solid #000',
padding: '2px',
border: '1px solid #999',
padding: '3px',
verticalAlign: 'top',
backgroundColor: '#ddd',
fontWeight: 'bold'
@ -707,7 +710,8 @@ print_table = function(dt, dn, fieldname, tabletype, cols, head_labels, widths,
table_style: {
width: '100%',
borderCollapse: 'collapse',
marginBottom: '10px'
marginBottom: '10px',
marginTop: '10px'
},
remove_empty_cols: function(flist) {

View file

@ -31,7 +31,8 @@ wn.widgets.form.sidebar.AssignTo = Class.extend({
this.name = docname;
this.wrapper = $a(parent, 'div', 'sidebar-comment-wrapper');
this.body = $a(this.wrapper, 'div');
this.add_btn = $btn($a(this.wrapper, 'div', 'sidebar-comment-message'), 'Assign',
this.add_btn = $btn($a(this.wrapper, 'div'),
'Assign this document to',
function() {
me.add();
})

View file

@ -43,7 +43,7 @@ wn.widgets.form.sidebar.Attachments = function(parent, sidebar, doctype, docname
// button if the number of attachments is less than max
if(n < this.frm.meta.max_attachments || !this.frm.meta.max_attachments) {
this.btn = $btn($a(this.wrapper, 'div', 'sidebar-comment-message'), 'Add',
this.btn = $btn($a(this.wrapper, 'div'), 'Add new attachment',
function() { me.add_attachment() });
}

View file

@ -83,7 +83,7 @@ wn.ui.Listing = Class.extend({
<div class="wnlist">\
<h3 class="title hide">%(title)s</h3>\
\
<div class="list-filters hide">\
<div class="list-filters" style="display: none;">\
<div class="show_filters well">\
<div class="filter_area"></div>\
<div>\

View file

@ -62,11 +62,11 @@ wn.views.DocListView = wn.ui.Listing.extend({
this.$page.html('<div class="layout-wrapper layout-wrapper-background">\
<div class="appframe-area"></div>\
<div class="layout-main-section">\
<div class="wnlist-area"><div class="help">Loading...</div></div>\
<div class="wnlist-area" style="margin-top: -15px;"><div class="help">Loading...</div></div>\
</div>\
<div class="layout-side-section">\
<div class="show-docstatus hide" style="margin-bottom: 19px">\
<h4>Show</h4>\
<div class="show-docstatus hide section">\
<div class="section-head">Show</div>\
<div><input data-docstatus="0" type="checkbox" checked="checked" /> Drafts</div>\
<div><input data-docstatus="1" type="checkbox" checked="checked" /> Submitted</div>\
<div><input data-docstatus="2" type="checkbox" /> Cancelled</div>\
@ -83,7 +83,7 @@ wn.views.DocListView = wn.ui.Listing.extend({
wn.views.breadcrumbs(this.appframe, locals.DocType[this.doctype].module, this.doctype);
this.appframe.add_tab('<span class="small-module-icons small-module-icons-'+
module.toLowerCase()+'"></span>'+' <span>'
+ module + "</span>", 0.4, function() {
+ module + "</span>", 0.7, function() {
wn.set_route(wn.modules[module]);
})
},
@ -214,11 +214,10 @@ wn.views.DocListView = wn.ui.Listing.extend({
var me = this;
if(this.can_delete) {
this.add_button('Delete', function() { me.delete_items(); }, 'icon-remove');
$('<div style="padding: 9px; margin-left: -15px;"><input type="checkbox" name="select-all" />\
Select all</div>').insertBefore(this.$page.find('.result-list'));
this.$page.find('[name="select-all"]').click(function() {
me.$page.find('.list-delete').attr('checked', $(this).attr('checked') || false);
})
this.add_button('Select All', function() {
var checks = me.$page.find('.list-delete');
checks.attr('checked', $(checks.get(0)).attr('checked') ? false : "checked");
}, 'icon-ok');
}
},
delete_items: function() {
@ -277,7 +276,7 @@ wn.views.DocListView = wn.ui.Listing.extend({
if(!stat || !stat.length) {
if(field=='_user_tags') {
this.$page.find('.layout-side-section')
.append('<div class="stat-wrapper"><h4>Tags</h4>\
.append('<div class="stat-wrapper section"><div class="section-head">Tags</div>\
<div class="help small"><i>No records tagged.</i><br><br> \
To add a tag, open the document and click on \
"Add Tag" on the sidebar</div></div>');
@ -290,8 +289,8 @@ wn.views.DocListView = wn.ui.Listing.extend({
if(label=='_user_tags') label = 'Tags';
// grid
var $w = $('<div class="stat-wrapper">\
<h4>'+ label +'</h4>\
var $w = $('<div class="stat-wrapper section">\
<div class="section-head">'+ label +'</div>\
<div class="stat-grid">\
</div>\
</div>');