website fixes

This commit is contained in:
Rushabh Mehta 2012-03-23 14:19:49 +05:30
parent d9831e9073
commit b6f808846d
11 changed files with 260 additions and 45 deletions

View File

@ -52,6 +52,8 @@
"lib/css/bootstrap/navbar.css",
"lib/css/bootstrap/dropdown.css",
"lib/css/bootstrap/tooltip.css",
"lib/css/ui/fonts.css",
"lib/css/ui/list.css",
"erpnext/startup/startup.css",
"erpnext/website/css/website.css"
]
@ -159,6 +161,7 @@
"lib/js/legacy/model/local_data.js",
"lib/js/legacy/model/doclist.js",
"lib/js/wn/ui/toolbar.min.js:concat",
"lib/js/wn/views/breadcrumbs.js",
"lib/js/legacy/widgets/form/fields.js",
"lib/js/legacy/widgets/form/form_dialog.js",
"lib/js/legacy/widgets/form/form_header.js",

View File

@ -123,7 +123,6 @@ div#body_div {
.content {
width: 900px;
margin-bottom: 30px;
}
.background-fade-in {
@ -134,9 +133,8 @@ div#body_div {
}
footer {
position: absolute;
bottom: 0px;
width: 100%;
width: 900px;
margin: auto;
}
header .container {
width: 900px;
@ -160,7 +158,6 @@ div.no_script {
}
div.loading_div {
position: absolute;
background-color: #FFFFCC;
z-index: 1999;
right: 5px;
@ -3464,12 +3461,12 @@ button.btn.small, input[type="submit"].btn.small {
* erpnext/startup/startup.css
*/
h1, h2, h3, h4, h5 {
font-family: "Lato", Helvetica, "Helvetica Neue", sans-serif;
font-family: "Open Sans", Helvetica, "Helvetica Neue", sans-serif;
font-weight: bold;
}
body {
font-family: "Lato", Helvetica, "Helvetica Neue", sans-serif;
font-family: "Open Sans", Helvetica, "Helvetica Neue", sans-serif;
font-size: 13px;
}

View File

@ -123,7 +123,6 @@ div#body_div {
.content {
width: 900px;
margin-bottom: 30px;
}
.background-fade-in {
@ -134,9 +133,8 @@ div#body_div {
}
footer {
position: absolute;
bottom: 0px;
width: 100%;
width: 900px;
margin: auto;
}
header .container {
width: 900px;
@ -160,7 +158,6 @@ div.no_script {
}
div.loading_div {
position: absolute;
background-color: #FFFFCC;
z-index: 1999;
right: 5px;
@ -1601,16 +1598,204 @@ button.btn.small, input[type="submit"].btn.small {
margin-bottom: 0;
}
/*
* lib/css/ui/fonts.css
*/
@font-face {
font-family: 'Pontano Sans';
font-style: normal;
font-weight: 800;
src: url('../lib/css/fonts/pontanosans.woff') format('woff');
}
@font-face {
font-family: 'Droid Sans';
font-style: normal;
font-weight: normal;
src: local('Droid Sans'), local('DroidSans'), url('../lib/css/fonts/droidsans.woff') format('woff');
}
@font-face {
font-family: 'PT Sans';
font-style: normal;
font-weight: normal;
src: local('PT Sans'), local('PTSans-Regular'), url('../lib/css/fonts/ptsans.woff') format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url('../lib/css/fonts/opensans.woff') format('woff');
}
@font-face {
font-family: 'Lato';
font-style: normal;
font-weight: 400;
src: local('Lato Regular'), local('Lato-Regular'), url('../lib/css/fonts/lato.woff') format('woff');
}
/*
* lib/css/ui/list.css
*/
.hide {
display: none;
}
.list-filters {
margin: 7px 0px;
}
.wnlist .img-load {
display: none;
float: left;
margin-bottom: 8px;
}
/* list-row */
div.list-row {
border-bottom: 1px solid #eee;
padding: 5px 0px;
}
div.list-row:hover {
background-color: #eef
}
div.list-row .label {
margin-right: 4px;
}
div.list-row table {
table-layout: fixed;
border-collapse: collapse;
width: 100%;
}
div.list-row table td {
overflow: hidden;
padding-right: 3px;
vertical-align: middle;
height: 24px;
max-height: 24px;
}
div.paging-button {
text-align: center;
padding: 11px 0px;
}
div.show_filters {
display: none;
}
div.filter_list {
padding: 13px;
}
div.show_filters.well {
margin-top: 11px;
margin-bottom: 11px;
}
div.filter_list .run_btn {
text-align: right;
}
div.filter_list .add_filter {
margin: 3px 0px;
}
div.list_filter {
margin: 7px 0px;
}
div.list_filter input, div.list_filter select {
width: 130px;
margin-right: 7px;
}
/* bar */
span.bar-outer {
display: inline-block;
margin: 0px 7px;
margin-top: 3px;
background-color: #fff;
border: 1px solid #aaa;
height: 10px;
}
span.bar-inner {
display: inline-block;
background-color: #bdf;
height: 100%;
margin-bottom: 2px;
float: left;
}
span.bar-complete {
background-color: #009900;
}
span.bar-empty {
background-color: #990000;
}
/* stats */
div.stat-wrapper {
margin-bottom: 19px;
}
div.stat-grid {
border: 2px solid #bbb;
background-color: white;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
overflow: hidden;
}
div.stat-label {
position: relative;
padding: 3px;
text-align: center;
}
div.stat-label, div.stat-label a {
z-index: 5;
}
div.stat-item {
position: relative;
border-bottom: 1px solid #ddd;
}
div.stat-item:last-child {
border-bottom: 0px solid #ddd;
}
div.stat-bar {
position: absolute;
left: 0px;
background-color: #def;
height: 100%;
z-index: 0;
}
/*
* erpnext/startup/startup.css
*/
h1, h2, h3, h4, h5 {
font-family: "Lato", Helvetica, "Helvetica Neue", sans-serif;
font-family: "Open Sans", Helvetica, "Helvetica Neue", sans-serif;
font-weight: bold;
}
body {
font-family: "Lato", Helvetica, "Helvetica Neue", sans-serif;
font-family: "Open Sans", Helvetica, "Helvetica Neue", sans-serif;
font-size: 13px;
}
@ -1713,6 +1898,10 @@ h3 {
margin-bottom: 7px;
}
p, li {
line-height: 1.6em;
}
pre {
background-color: #F8F8F8;
border: 1px solid #CCCCCC;

View File

@ -1,10 +1,10 @@
h1, h2, h3, h4, h5 {
font-family: "Lato", Helvetica, "Helvetica Neue", sans-serif;
font-family: "Open Sans", Helvetica, "Helvetica Neue", sans-serif;
font-weight: bold;
}
body {
font-family: "Lato", Helvetica, "Helvetica Neue", sans-serif;
font-family: "Open Sans", Helvetica, "Helvetica Neue", sans-serif;
font-size: 13px;
}

View File

@ -14,6 +14,10 @@ h3 {
margin-bottom: 7px;
}
p, li {
line-height: 1.6em;
}
pre {
background-color: #F8F8F8;
border: 1px solid #CCCCCC;

View File

@ -5,7 +5,7 @@
{
'creation': '2012-02-02 09:57:25',
'docstatus': 0,
'modified': '2012-03-21 10:53:38',
'modified': '2012-03-23 14:12:27',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
@ -23,7 +23,7 @@
'name': '__common__',
'section_style': u'Simple',
'show_in_menu': 0,
'version': 15
'version': 18
},
# These values are common for all DocField
@ -66,17 +66,6 @@
'permlevel': 1
},
# DocField
{
'colour': u'White:FFF',
'description': u'Solid background color (default light gray)',
'doctype': u'DocField',
'fieldname': u'background_color',
'fieldtype': u'Data',
'label': u'Background Color',
'permlevel': 0
},
# DocField
{
'colour': u'White:FFF',
@ -89,13 +78,24 @@
'permlevel': 0
},
# DocField
{
'colour': u'White:FFF',
'description': u'Solid background color (default light gray)',
'doctype': u'DocField',
'fieldname': u'background_color',
'fieldtype': u'Data',
'label': u'Background Color',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'font',
'fieldtype': u'Select',
'label': u'Font',
'options': u'\nLucida Grande\nVerdana\nArial\nGeorgia\nTahoma\nPontano Sans\nDroid Sans\nGill Sans',
'options': u'\nLucida Grande\nVerdana\nArial\nGeorgia\nTahoma\nLato\nOpen Sans',
'permlevel': 0
},
@ -115,7 +115,7 @@
'fieldname': u'heading_font',
'fieldtype': u'Select',
'label': u'Heading Font',
'options': u'\nLucida Grande\nVerdana\nArial\nGeorgia\nTahoma\nPontano Sans\nDroid Sans\nGill Sans',
'options': u'\nLucida Grande\nVerdana\nArial\nGeorgia\nTahoma\nLato\nOpen Sans',
'permlevel': 0
},

View File

@ -23,6 +23,6 @@
<div style="clear: both"></div>
</div>
</div>
<div class="web-page-status">
<div class="web-page-status small">
Last Modified: {{ doc.updated }} <a href="#contact">Feedback</a>
</div>

View File

@ -112,6 +112,6 @@ erpnext.Footer = Class.extend({
});
$(document).bind('startup', function() {
// erpnext.footer = new erpnext.Footer();
erpnext.footer = new erpnext.Footer();
erpnext.navbar.navbar = new erpnext.navbar.Navbar();
})

View File

@ -345,7 +345,14 @@ $(page).bind('hide',onhide);page.label=label;wn.pages[label]=page;return page;},
var me=this;if(label.tagName){var page=label;}else{var page=wn.pages[label];}
if(!page){console.log('Page not found '+label);return;}
if(this.page){$(this.page).toggle(false);$(this.page).trigger('hide');}
this.page=page;$(this.page).fadeIn();$(this.page).trigger('show');this.page._route=window.location.hash;document.title=this.page.label;return this.page;}})
this.page=page;$(this.page).fadeIn();$(this.page).trigger('show');this.page._route=window.location.hash;document.title=this.page.label;scroll(0,0);return this.page;}});wn.views.add_module_btn=function(parent,module){$(parent).append(repl('<span class="label" style="margin-right: 8px; cursor: pointer;"\
onclick="wn.set_route(\'%(module_small)s-home\')">\
<i class="icon-home icon-white"></i> %(module)s Home\
</span>',{module:module,module_small:module.toLowerCase()}));}
wn.views.add_list_btn=function(parent,doctype){$(parent).append(repl('<span class="label" style="margin-right: 8px; cursor: pointer;"\
onclick="wn.set_route(\'List\', \'%(doctype)s\')">\
<i class="icon-list icon-white"></i> %(doctype)s List\
</span>',{doctype:doctype}));}
/*
* lib/js/wn/views/doclistview.js
*/
@ -354,6 +361,7 @@ document.title=page.doclistview.label;wn.container.change_to(pagename);})}
wn.views.DocListView=wn.ui.Listing.extend({init:function(doctype,page){this.doctype=doctype;this.$page=$(page);this.label=get_doctype_label(doctype);this.label=(this.label.toLowerCase().substr(-4)=='list')?this.label:(this.label+' List');this.make_page();this.setup();},make_page:function(){var me=this;this.$page.html(repl('<div class="layout-wrapper layout-wrapper-background">\
<div class="layout-main-section">\
<a class="close" onclick="window.history.back();">&times;</a>\
<div class="breadcrumbs-area"></div>\
<h1>%(label)s</h1>\
<hr>\
<div class="wnlist-area"><div class="help">Loading...</div></div>\
@ -367,7 +375,7 @@ wn.views.DocListView=wn.ui.Listing.extend({init:function(doctype,page){this.doct
</div>\
</div>\
<div style="clear: both"></div>\
</div>',{label:this.label}));},setup:function(){var me=this;me.can_delete=wn.model.can_delete(me.doctype);me.meta=locals.DocType[me.doctype];me.$page.find('.wnlist-area').empty(),me.setup_docstatus_filter();me.setup_listview();me.init_list();me.init_stats();me.add_delete_option();},setup_docstatus_filter:function(){var me=this;this.can_submit=$.map(locals.DocPerm,function(d){if(d.parent==me.meta.name&&d.submit)return 1
</div>',{label:this.label}));wn.views.breadcrumbs(this.$page.find('.breadcrumbs-area').get(0),locals.DocType[this.doctype].module);},setup:function(){var me=this;me.can_delete=wn.model.can_delete(me.doctype);me.meta=locals.DocType[me.doctype];me.$page.find('.wnlist-area').empty(),me.setup_docstatus_filter();me.setup_listview();me.init_list();me.init_stats();me.add_delete_option();},setup_docstatus_filter:function(){var me=this;this.can_submit=$.map(locals.DocPerm,function(d){if(d.parent==me.meta.name&&d.submit)return 1
else return null;}).length;if(this.can_submit){this.$page.find('.show-docstatus').removeClass('hide');this.$page.find('.show-docstatus input').click(function(){me.run();})}},setup_listview:function(){if(this.meta.__listjs){eval(this.meta.__listjs);this.listview=new wn.doclistviews[this.doctype](this);}else{this.listview=new wn.views.ListView(this);}
this.listview.parent=this;},init_list:function(){this.make({method:'webnotes.widgets.doclistview.get',get_args:this.get_args,parent:this.$page.find('.wnlist-area'),start:0,page_length:20,show_filters:true,show_grid:true,new_doctype:this.doctype,allow_delete:true,no_result_message:this.make_no_result(),columns:this.listview.fields});this.run();},make_no_result:function(){return repl('<div class="well"><p>No %(doctype_label)s found</p>\
%(description)s\
@ -1042,8 +1050,7 @@ this.show=function(){$ds(me.ldiv);}}
* lib/js/legacy/webpage/page_header.js
*/
var def_ph_style={wrapper:{marginBottom:'16px',backgroundColor:'#EEE'},main_heading:{},sub_heading:{marginBottom:'8px',color:'#555',display:'none'},separator:{borderTop:'1px solid #ddd'},toolbar_area:{padding:'3px 0px',display:'none',borderBottom:'1px solid #ddd'}}
function PageHeader(parent,main_text,sub_text){this.wrapper=$a(parent,'div','page_header');this.t1=make_table($a(this.wrapper,'div','',def_ph_style.wrapper.backgroundColor),1,2,'100%',[null,'100px'],{padding:'2px'});$y(this.t1,{borderCollapse:'collapse'})
this.lhs=$td(this.t1,0,0);this.main_head=$a(this.lhs,'h1','',def_ph_style.main_heading);this.sub_head=$a(this.lhs,'h4','',def_ph_style.sub_heading);this.separator=$a(this.wrapper,'div','',def_ph_style.separator);this.toolbar_area=$a(this.wrapper,'div','',def_ph_style.toolbar_area);this.padding_area=$a(this.wrapper,'div','',{padding:'3px'});$y($td(this.t1,0,1),{textAlign:'right',padding:'3px'});this.close_btn=$a($td(this.t1,0,1),'span','close',{},'&times;');this.close_btn.onclick=function(){window.history.back();};if(main_text)this.main_head.innerHTML=main_text;if(sub_text)this.sub_head.innerHTML=sub_text;this.buttons={};this.buttons2={};}
function PageHeader(parent,main_text,sub_text){this.wrapper=$a(parent,'div','page_header');this.close_btn=$a(this.wrapper,'a','close',{},'&times;');this.close_btn.onclick=function(){window.history.back();};this.breadcrumbs=$a(this.wrapper,'div');this.main_head=$a(this.wrapper,'h1','',def_ph_style.main_heading);this.sub_head=$a(this.wrapper,'h4','',def_ph_style.sub_heading);this.separator=$a(this.wrapper,'div','',def_ph_style.separator);this.toolbar_area=$a(this.wrapper,'div','',def_ph_style.toolbar_area);this.padding_area=$a(this.wrapper,'div','',{padding:'3px'});if(main_text)this.main_head.innerHTML=main_text;if(sub_text)this.sub_head.innerHTML=sub_text;this.buttons={};this.buttons2={};}
PageHeader.prototype.add_button=function(label,fn,bold,icon,green){var tb=this.toolbar_area;if(this.buttons[label])return;iconhtml=icon?('<i class="'+icon+'"></i> '):'';var $button=$('<button class="btn btn-small">'+iconhtml+label+'</button>').click(fn).appendTo(tb);if(green){$button.addClass('btn-info');$button.find('i').addClass('icon-white');}
if(bold)$button.css('font-weight','bold');this.buttons[label]=$button.get(0);$ds(this.toolbar_area);return this.buttons[label];}
PageHeader.prototype.clear_toolbar=function(){this.toolbar_area.innerHTML='';this.buttons={};}
@ -1397,6 +1404,14 @@ wn.ui.toolbar.download_backup=function(){$c('webnotes.utils.backups.get_backup',
wn.ui.toolbar.show_about=function(){try{wn.require('lib/js/wn/misc/about.js');wn.ui.misc.about();}catch(e){console.log(e);}
return false;}
/*
* lib/js/wn/views/breadcrumbs.js
*/
wn.provide('wn.views');wn.views.breadcrumbs=function(parent,module,doctype,name){var $bspan=$(repl('<span class="breadcrumbs">\
<a href="#%(home_page)s"><i class="icon-home"></i></a></span>',{home_page:wn.boot.home_page}));if(module){$bspan.append(repl(' / <a href="#!%(module_small)s-home">%(module)s Home</a>',{module:module,module_small:module.toLowerCase()}))}
if(doctype&&(locals.DocType[doctype]&&!locals.DocType[doctype].issingle)){$bspan.append(repl(' / <a href="#!List/%(doctype)s">%(doctype)s List</a>',{doctype:doctype}))}
if(name){$bspan.append(' / '+name)}
$bspan.appendTo(parent);}
/*
* lib/js/legacy/widgets/form/fields.js
*/
@ -1625,8 +1640,8 @@ d.cur_frm=f;d.dn=dn;d.table_form=f.meta.istable;f.refresh(dn);d.dialog.show();})
/*
* lib/js/legacy/widgets/form/form_header.js
*/
_f.FrmHeader=function(parent,frm){var me=this;this.wrapper=$a(parent,'div');if(frm.meta.in_dialog)$y(this.wrapper,{marginLeft:'8px',marginRight:'8px'});this.page_head=new PageHeader(this.wrapper);this.dt_area=$a(this.page_head.main_head,'h1','',{marginRight:'8px',display:'inline'})
var div=$a(null,'div','',{marginBottom:'4px'});this.page_head.lhs.insertBefore(div,this.page_head.sub_head);this.dn_area=$a(div,'span','',{fontSize:'14px',fontWeight:'normal',marginRight:'8px',padding:'2px'})
_f.FrmHeader=function(parent,frm){var me=this;this.wrapper=$a(parent,'div');if(frm.meta.in_dialog)$y(this.wrapper,{marginLeft:'8px',marginRight:'8px'});this.page_head=new PageHeader(this.wrapper);wn.views.breadcrumbs(this.page_head.breadcrumbs,frm.meta.module,frm.meta.name);this.dt_area=$a(this.page_head.main_head,'h1','',{marginRight:'8px',display:'inline'})
var div=$a(null,'div','',{marginBottom:'4px'});this.page_head.wrapper.insertBefore(div,this.page_head.sub_head);this.dn_area=$a(div,'span','',{fontSize:'14px',fontWeight:'normal',marginRight:'8px',padding:'2px'})
this.status_area=$a(div,'span','',{marginRight:'8px',marginBottom:'2px',cursor:'pointer',textShadow:'none'})}
_f.FrmHeader.prototype.show=function(){$ds(this.wrapper);}
_f.FrmHeader.prototype.hide=function(){$dh(this.wrapper);}

View File

@ -259,7 +259,14 @@ $(page).bind('hide',onhide);page.label=label;wn.pages[label]=page;return page;},
var me=this;if(label.tagName){var page=label;}else{var page=wn.pages[label];}
if(!page){console.log('Page not found '+label);return;}
if(this.page){$(this.page).toggle(false);$(this.page).trigger('hide');}
this.page=page;$(this.page).fadeIn();$(this.page).trigger('show');this.page._route=window.location.hash;document.title=this.page.label;return this.page;}})
this.page=page;$(this.page).fadeIn();$(this.page).trigger('show');this.page._route=window.location.hash;document.title=this.page.label;scroll(0,0);return this.page;}});wn.views.add_module_btn=function(parent,module){$(parent).append(repl('<span class="label" style="margin-right: 8px; cursor: pointer;"\
onclick="wn.set_route(\'%(module_small)s-home\')">\
<i class="icon-home icon-white"></i> %(module)s Home\
</span>',{module:module,module_small:module.toLowerCase()}));}
wn.views.add_list_btn=function(parent,doctype){$(parent).append(repl('<span class="label" style="margin-right: 8px; cursor: pointer;"\
onclick="wn.set_route(\'List\', \'%(doctype)s\')">\
<i class="icon-list icon-white"></i> %(doctype)s List\
</span>',{doctype:doctype}));}
/*
* lib/js/wn/views/doclistview.js
*/
@ -268,6 +275,7 @@ document.title=page.doclistview.label;wn.container.change_to(pagename);})}
wn.views.DocListView=wn.ui.Listing.extend({init:function(doctype,page){this.doctype=doctype;this.$page=$(page);this.label=get_doctype_label(doctype);this.label=(this.label.toLowerCase().substr(-4)=='list')?this.label:(this.label+' List');this.make_page();this.setup();},make_page:function(){var me=this;this.$page.html(repl('<div class="layout-wrapper layout-wrapper-background">\
<div class="layout-main-section">\
<a class="close" onclick="window.history.back();">&times;</a>\
<div class="breadcrumbs-area"></div>\
<h1>%(label)s</h1>\
<hr>\
<div class="wnlist-area"><div class="help">Loading...</div></div>\
@ -281,7 +289,7 @@ wn.views.DocListView=wn.ui.Listing.extend({init:function(doctype,page){this.doct
</div>\
</div>\
<div style="clear: both"></div>\
</div>',{label:this.label}));},setup:function(){var me=this;me.can_delete=wn.model.can_delete(me.doctype);me.meta=locals.DocType[me.doctype];me.$page.find('.wnlist-area').empty(),me.setup_docstatus_filter();me.setup_listview();me.init_list();me.init_stats();me.add_delete_option();},setup_docstatus_filter:function(){var me=this;this.can_submit=$.map(locals.DocPerm,function(d){if(d.parent==me.meta.name&&d.submit)return 1
</div>',{label:this.label}));wn.views.breadcrumbs(this.$page.find('.breadcrumbs-area').get(0),locals.DocType[this.doctype].module);},setup:function(){var me=this;me.can_delete=wn.model.can_delete(me.doctype);me.meta=locals.DocType[me.doctype];me.$page.find('.wnlist-area').empty(),me.setup_docstatus_filter();me.setup_listview();me.init_list();me.init_stats();me.add_delete_option();},setup_docstatus_filter:function(){var me=this;this.can_submit=$.map(locals.DocPerm,function(d){if(d.parent==me.meta.name&&d.submit)return 1
else return null;}).length;if(this.can_submit){this.$page.find('.show-docstatus').removeClass('hide');this.$page.find('.show-docstatus input').click(function(){me.run();})}},setup_listview:function(){if(this.meta.__listjs){eval(this.meta.__listjs);this.listview=new wn.doclistviews[this.doctype](this);}else{this.listview=new wn.views.ListView(this);}
this.listview.parent=this;},init_list:function(){this.make({method:'webnotes.widgets.doclistview.get',get_args:this.get_args,parent:this.$page.find('.wnlist-area'),start:0,page_length:20,show_filters:true,show_grid:true,new_doctype:this.doctype,allow_delete:true,no_result_message:this.make_no_result(),columns:this.listview.fields});this.run();},make_no_result:function(){return repl('<div class="well"><p>No %(doctype_label)s found</p>\
%(description)s\
@ -1003,8 +1011,7 @@ LayoutCell.prototype.hide=function(){$dh(this.wrapper);}
* lib/js/legacy/webpage/page_header.js
*/
var def_ph_style={wrapper:{marginBottom:'16px',backgroundColor:'#EEE'},main_heading:{},sub_heading:{marginBottom:'8px',color:'#555',display:'none'},separator:{borderTop:'1px solid #ddd'},toolbar_area:{padding:'3px 0px',display:'none',borderBottom:'1px solid #ddd'}}
function PageHeader(parent,main_text,sub_text){this.wrapper=$a(parent,'div','page_header');this.t1=make_table($a(this.wrapper,'div','',def_ph_style.wrapper.backgroundColor),1,2,'100%',[null,'100px'],{padding:'2px'});$y(this.t1,{borderCollapse:'collapse'})
this.lhs=$td(this.t1,0,0);this.main_head=$a(this.lhs,'h1','',def_ph_style.main_heading);this.sub_head=$a(this.lhs,'h4','',def_ph_style.sub_heading);this.separator=$a(this.wrapper,'div','',def_ph_style.separator);this.toolbar_area=$a(this.wrapper,'div','',def_ph_style.toolbar_area);this.padding_area=$a(this.wrapper,'div','',{padding:'3px'});$y($td(this.t1,0,1),{textAlign:'right',padding:'3px'});this.close_btn=$a($td(this.t1,0,1),'span','close',{},'&times;');this.close_btn.onclick=function(){window.history.back();};if(main_text)this.main_head.innerHTML=main_text;if(sub_text)this.sub_head.innerHTML=sub_text;this.buttons={};this.buttons2={};}
function PageHeader(parent,main_text,sub_text){this.wrapper=$a(parent,'div','page_header');this.close_btn=$a(this.wrapper,'a','close',{},'&times;');this.close_btn.onclick=function(){window.history.back();};this.breadcrumbs=$a(this.wrapper,'div');this.main_head=$a(this.wrapper,'h1','',def_ph_style.main_heading);this.sub_head=$a(this.wrapper,'h4','',def_ph_style.sub_heading);this.separator=$a(this.wrapper,'div','',def_ph_style.separator);this.toolbar_area=$a(this.wrapper,'div','',def_ph_style.toolbar_area);this.padding_area=$a(this.wrapper,'div','',{padding:'3px'});if(main_text)this.main_head.innerHTML=main_text;if(sub_text)this.sub_head.innerHTML=sub_text;this.buttons={};this.buttons2={};}
PageHeader.prototype.add_button=function(label,fn,bold,icon,green){var tb=this.toolbar_area;if(this.buttons[label])return;iconhtml=icon?('<i class="'+icon+'"></i> '):'';var $button=$('<button class="btn btn-small">'+iconhtml+label+'</button>').click(fn).appendTo(tb);if(green){$button.addClass('btn-info');$button.find('i').addClass('icon-white');}
if(bold)$button.css('font-weight','bold');this.buttons[label]=$button.get(0);$ds(this.toolbar_area);return this.buttons[label];}
PageHeader.prototype.clear_toolbar=function(){this.toolbar_area.innerHTML='';this.buttons={};}
@ -1280,4 +1287,4 @@ item.route=item.url||item.custom_page;$parent_li.find('.dropdown-menu').append(r
<a href="https://erpnext.com">erpnext.com</a></div>\
</div>',wn.boot.website_settings));this.make_items();},make_items:function(){var items=wn.boot.website_menus
for(var i=0;i<items.length;i++){var item=items[i];if(!item.parent_label&&item.parentfield=='footer_items'){item.route=item.url||item.custom_page;$('.web-footer-menu ul').append(repl('<li><a href="#!%(route)s" \
data-label="%(label)s">%(label)s</a></li>',item))}}}});$(document).bind('startup',function(){erpnext.navbar.navbar=new erpnext.navbar.Navbar();})
data-label="%(label)s">%(label)s</a></li>',item))}}}});$(document).bind('startup',function(){erpnext.footer=new erpnext.Footer();erpnext.navbar.navbar=new erpnext.navbar.Navbar();})

View File

@ -1 +1 @@
1395
1434