From 5e3ffd3e21b83238ea6e5b3c1cebdf8a7cb558ac Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 2 Oct 2012 15:57:19 +0530 Subject: [PATCH] ui cleanup + added ripped paper border --- public/css/legacy/sidebar.css | 19 ++++++++------- public/css/ui/views.css | 9 ++++++- public/images/ui/ripped-border.png | Bin 0 -> 744 bytes public/js/legacy/widgets/form/form.js | 10 ++++++-- public/js/legacy/widgets/form/form_header.js | 4 +-- public/js/legacy/widgets/form/print_format.js | 22 ++++++++++------- public/js/legacy/wn/widgets/form/assign_to.js | 3 ++- .../js/legacy/wn/widgets/form/attachments.js | 2 +- public/js/wn/ui/listing.js | 2 +- public/js/wn/views/doclistview.js | 23 +++++++++--------- 10 files changed, 56 insertions(+), 38 deletions(-) create mode 100644 public/images/ui/ripped-border.png diff --git a/public/css/legacy/sidebar.css b/public/css/legacy/sidebar.css index 257d543525..4bac2c3ad2 100644 --- a/public/css/legacy/sidebar.css +++ b/public/css/legacy/sidebar.css @@ -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; } \ No newline at end of file diff --git a/public/css/ui/views.css b/public/css/ui/views.css index dbe8716538..820d86e965 100644 --- a/public/css/ui/views.css +++ b/public/css/ui/views.css @@ -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; +} diff --git a/public/images/ui/ripped-border.png b/public/images/ui/ripped-border.png new file mode 100644 index 0000000000000000000000000000000000000000..6a5fa71d4786dd15953a2339138df76e31d26807 GIT binary patch literal 744 zcmeAS@N?(olHy`uVBq!ia0vp^#X!u%!3-qRUKSkyQj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS>JigE&cLR>$8{`~3Fr!QZ=ynFZV&!0a(e*F0T`}enR-@bqU z{_*3-_wV2T{Q2|En>TOYzJ2}r^{ZE}Uc7km^5x6t&!0bg_Uy@%Cr_U~efaR<{rmTC z-n@C~(xu0bAK$xo@5YTAU%!6+`}gmM4q^|lm8}rv97RtSmL8lZZG{lV6B(-%;x?6UJE!^ zG38l5x!zz|c6{ZrZ;a{h?(pb*Lmb=)j7-S5B-g zz59OUx%Pa=#_$tKE8|QBHBDxu*=pTCc-E&eHpm zJ>U4)7Ms_;>MR_xN>>-fzMr><%bromde+^iGwv>LSv=Wri;eHqU3qH*Pd!^BFQgNE zK|EvQRZh9{-um1Ps_B1hTyCcpEH_qAnExfMO^|QvA zs|KrH>%LfWX^*Xqm}TZ{hf4h>@2B^siSU2D!q<>0Ep%h~)IHA`=YHk7#=4?z#uFRu z#NacRR1;o*+i_==_7Cp(l@?dSiZbbz7h X`;^Ty0}Km*se{4O)z4*}Q$iB}o==~B literal 0 HcmV?d00001 diff --git a/public/js/legacy/widgets/form/form.js b/public/js/legacy/widgets/form/form.js index 3520864a31..46869f971d 100644 --- a/public/js/legacy/widgets/form/form.js +++ b/public/js/legacy/widgets/form/form.js @@ -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"); + + $('
') + .prependTo(layout_main) + .css({"width": $(layout_main).width()}); + this.print_body = $("
").appendTo(layout_main) + .css("min-height", "400px").get(0); + } diff --git a/public/js/legacy/widgets/form/form_header.js b/public/js/legacy/widgets/form/form_header.js index 84af10e740..4f31e22912 100644 --- a/public/js/legacy/widgets/form/form_header.js +++ b/public/js/legacy/widgets/form/form_header.js @@ -34,12 +34,12 @@ _f.FrmHeader = Class.extend({ this.$w = this.appframe.$w; this.appframe.add_tab(''+ - ' '+ frm.meta.module + "", 0.4, function() { + ' '+ frm.meta.module + "", 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); }); } diff --git a/public/js/legacy/widgets/form/print_format.js b/public/js/legacy/widgets/form/print_format.js index ae37795b66..a393f5a4a9 100644 --- a/public/js/legacy/widgets/form/print_format.js +++ b/public/js/legacy/widgets/form/print_format.js @@ -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) { diff --git a/public/js/legacy/wn/widgets/form/assign_to.js b/public/js/legacy/wn/widgets/form/assign_to.js index 84fe0f6a3f..3cc682b3e2 100644 --- a/public/js/legacy/wn/widgets/form/assign_to.js +++ b/public/js/legacy/wn/widgets/form/assign_to.js @@ -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(); }) diff --git a/public/js/legacy/wn/widgets/form/attachments.js b/public/js/legacy/wn/widgets/form/attachments.js index 2e0399e753..dc6a948116 100644 --- a/public/js/legacy/wn/widgets/form/attachments.js +++ b/public/js/legacy/wn/widgets/form/attachments.js @@ -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() }); } diff --git a/public/js/wn/ui/listing.js b/public/js/wn/ui/listing.js index f636d59ab4..1597117b5c 100644 --- a/public/js/wn/ui/listing.js +++ b/public/js/wn/ui/listing.js @@ -83,7 +83,7 @@ wn.ui.Listing = Class.extend({
\

%(title)s

\ \ -
\ +