fixes in sales cycle
This commit is contained in:
parent
eaf8b91402
commit
6f89f1eb86
110
css/all-app.css
110
css/all-app.css
@ -1945,6 +1945,10 @@ div.std-footer-item {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.layout-section {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.layout-main-section {
|
||||
width: 71%;
|
||||
float: left;
|
||||
@ -2201,6 +2205,29 @@ div.time_field select{
|
||||
width: 45px;
|
||||
}
|
||||
|
||||
/* sidebar */
|
||||
|
||||
div.sidebar-comment-wrapper input {
|
||||
width: 50%;
|
||||
}
|
||||
div.sidebar-comment-message {
|
||||
margin-top: 8px;
|
||||
color: #777;
|
||||
}
|
||||
|
||||
div.sidebar-comment-text {
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
margin-top: 8px;
|
||||
color: #444;
|
||||
}
|
||||
div.sidebar-comment-info {
|
||||
color: #777;
|
||||
}
|
||||
|
||||
/*
|
||||
* lib/css/legacy/fields.css
|
||||
*/
|
||||
/* Documents */
|
||||
|
||||
.frm_field_table {
|
||||
@ -2267,26 +2294,6 @@ div.time_field select{
|
||||
background-color:#FEE;
|
||||
}
|
||||
|
||||
/* sidebar */
|
||||
|
||||
div.sidebar-comment-wrapper input {
|
||||
width: 50%;
|
||||
}
|
||||
div.sidebar-comment-message {
|
||||
margin-top: 8px;
|
||||
color: #777;
|
||||
}
|
||||
|
||||
div.sidebar-comment-text {
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
margin-top: 8px;
|
||||
color: #444;
|
||||
}
|
||||
div.sidebar-comment-info {
|
||||
color: #777;
|
||||
}
|
||||
|
||||
/*
|
||||
* lib/css/legacy/grid.css
|
||||
*/
|
||||
@ -3494,7 +3501,7 @@ div.appframe-titlebar {
|
||||
background: -ms-linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* IE10+ */
|
||||
background: linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#cccccc',GradientType=0 ); /* IE6-9 */
|
||||
border-bottom: 1px solid #ccc;
|
||||
border-bottom: 1px solid #aaa;
|
||||
min-height: 1.2em;
|
||||
}
|
||||
|
||||
@ -3558,64 +3565,3 @@ div.appframe-toolbar {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* erpnext/startup/startup.css
|
||||
*/
|
||||
h1, h2, h3, h4, h5 {
|
||||
font-family: "Helvetica Neue", "Open Sans", Helvetica, sans-serif;
|
||||
font-weight: normal;
|
||||
margin-top: 0.2em;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Helvetica Neue", "Open Sans", Helvetica, sans-serif;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
span, div, td, input, textarea, button, select {
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
body {
|
||||
background: url(../images/redbeech.jpg) repeat;
|
||||
color: #616161;
|
||||
}
|
||||
|
||||
.small {
|
||||
font-size: 11.5px;
|
||||
}
|
||||
|
||||
.erpnext-footer {
|
||||
margin: 11px auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.navbar-new-comments {
|
||||
margin: -3px 0px;
|
||||
padding: 2px;
|
||||
min-width: 20px;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
border-radius: 2px;
|
||||
color: #999999;
|
||||
background-color: #333131;
|
||||
}
|
||||
|
||||
.navbar-new-comments:hover,
|
||||
.navbar-new-comments:active,
|
||||
.navbar-new-comments:focus {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.navbar-new-comments-true {
|
||||
color: #fff;
|
||||
background-color: #B00D07;
|
||||
}
|
||||
|
||||
/*extra size menus for recent*/
|
||||
.dropdown-menu#toolbar-recent, .dropdown-menu#toolbar-options, .dropdown-menu#toolbar-help{
|
||||
min-width: 160px !important;
|
||||
max-width: 260px !important;
|
||||
}
|
||||
|
||||
|
228
css/all-web.css
228
css/all-web.css
@ -1425,6 +1425,10 @@ div.std-footer-item {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.layout-section {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.layout-main-section {
|
||||
width: 71%;
|
||||
float: left;
|
||||
@ -1847,214 +1851,34 @@ div.stat-bar {
|
||||
|
||||
|
||||
/*
|
||||
* erpnext/startup/startup.css
|
||||
* lib/css/ui/views.css
|
||||
*/
|
||||
h1, h2, h3, h4, h5 {
|
||||
font-family: "Helvetica Neue", "Open Sans", Helvetica, sans-serif;
|
||||
font-weight: normal;
|
||||
margin-top: 0.2em;
|
||||
|
||||
.breadcrumbs {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Helvetica Neue", "Open Sans", Helvetica, sans-serif;
|
||||
font-size: 13px;
|
||||
.breadcrumbs a {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
span, div, td, input, textarea, button, select {
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
body {
|
||||
background: url(../images/redbeech.jpg) repeat;
|
||||
color: #616161;
|
||||
}
|
||||
|
||||
.small {
|
||||
font-size: 11.5px;
|
||||
}
|
||||
|
||||
.erpnext-footer {
|
||||
margin: 11px auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.navbar-new-comments {
|
||||
margin: -3px 0px;
|
||||
padding: 2px;
|
||||
min-width: 20px;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
border-radius: 2px;
|
||||
color: #999999;
|
||||
background-color: #333131;
|
||||
}
|
||||
|
||||
.navbar-new-comments:hover,
|
||||
.navbar-new-comments:active,
|
||||
.navbar-new-comments:focus {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.navbar-new-comments-true {
|
||||
color: #fff;
|
||||
background-color: #B00D07;
|
||||
}
|
||||
|
||||
/*extra size menus for recent*/
|
||||
.dropdown-menu#toolbar-recent, .dropdown-menu#toolbar-options, .dropdown-menu#toolbar-help{
|
||||
min-width: 160px !important;
|
||||
max-width: 260px !important;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* erpnext/website/css/website.css
|
||||
*/
|
||||
div#body_div, header .container, .content, #opened-page-selector, footer {
|
||||
width: 900px;
|
||||
}
|
||||
|
||||
.layout_wrapper {
|
||||
padding: 27px;
|
||||
}
|
||||
|
||||
p, li {
|
||||
line-height: 1.6em;
|
||||
}
|
||||
|
||||
pre {
|
||||
background-color: #F8F8F8;
|
||||
border: 1px solid #CCCCCC;
|
||||
border-radius: 3px 3px 3px 3px;
|
||||
font-size: 13px;
|
||||
line-height: 19px;
|
||||
overflow: auto;
|
||||
padding: 6px 10px;
|
||||
margin-bottom: 9px;
|
||||
}
|
||||
|
||||
.web-content input[type="text"], .web-content input[type="password"], .web-content select {
|
||||
min-width: 180px;
|
||||
}
|
||||
|
||||
.web-head-section {
|
||||
margin-bottom: 20px
|
||||
}
|
||||
|
||||
.web-main-section {
|
||||
width: 65%;
|
||||
float: left;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.web-side-section {
|
||||
width: 30%;
|
||||
float: right;
|
||||
margin-bottom: 20px;
|
||||
margin-right: 15px;
|
||||
color: #606060;
|
||||
overflow-x: hidden;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
.web-page-status {
|
||||
padding: 7px;
|
||||
color: #777;
|
||||
clear: both;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.web-page-status a,
|
||||
.web-page-status a:hover,
|
||||
.web-page-status a:visited {
|
||||
padding: 2px;
|
||||
background-color: #777;
|
||||
color: #FFF;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.web-page-status a:hover {
|
||||
background-color: #444;
|
||||
}
|
||||
|
||||
footer {
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.web-footer {
|
||||
color: inherit;
|
||||
text-align: center;
|
||||
margin: 10px;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.web-footer div, .web-footer a {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.web-footer-menu {
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
footer a, footer a:visited {
|
||||
color: #777;
|
||||
}
|
||||
|
||||
footer a:hover {
|
||||
background-color: #777;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.web-footer-menu ul {
|
||||
list-style: none;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.web-footer-menu ul li {
|
||||
display: inline;
|
||||
padding: 2px 15px;
|
||||
border-right: 1px solid #999;
|
||||
}
|
||||
|
||||
.web-footer-menu ul li:last-child {
|
||||
border-right: 0px solid #777 !important;
|
||||
}
|
||||
|
||||
/* slide view */
|
||||
|
||||
.next-slide {
|
||||
margin: 0px -27px 100px -27px;
|
||||
background: #ffffff; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #eeeeee 0%, #fff 100%); /* FF3.6+ */
|
||||
background: -webkit-linear-gradient(top, #eeeeee 0%, #fff 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #eeeeee 0%, #fff 100%); /* Opera 11.10+ */
|
||||
background: -ms-linear-gradient(top, #eeeeee 0%, #fff 100%); /* IE10+ */
|
||||
background: linear-gradient(top, #eeeeee 0%, #fff 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#fff',GradientType=0 ); /* IE6-9 */
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
.slide-shadow {
|
||||
div.appframe-titlebar {
|
||||
padding: 6px;
|
||||
background: #eeeeee; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #bababa 0%,#eeeeee 100%); /* FF3.6+ */
|
||||
background: -webkit-linear-gradient(top, #bababa 0%,#eeeeee 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #bababa 0%,#eeeeee 100%); /* Opera 11.10+ */
|
||||
background: -ms-linear-gradient(top, #bababa 0%,#eeeeee 100%); /* IE10+ */
|
||||
background: linear-gradient(top, #bababa 0%,#eeeeee 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#bababa', endColorstr='#eeeeee',GradientType=0 ); /* IE6-9 */
|
||||
height: 3px;
|
||||
margin: 100px -27px 0px -27px;
|
||||
border-top: 1px solid #bababa;
|
||||
background: -moz-linear-gradient(top, #eeeeee 0%, #cccccc 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#eeeeee), color-stop(100%,#cccccc)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* Opera 11.10+ */
|
||||
background: -ms-linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* IE10+ */
|
||||
background: linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#cccccc',GradientType=0 ); /* IE6-9 */
|
||||
border-bottom: 1px solid #aaa;
|
||||
min-height: 1.2em;
|
||||
}
|
||||
|
||||
.two-column {
|
||||
width: 40%;
|
||||
float: left;
|
||||
padding: 5%;
|
||||
div.appframe-toolbar {
|
||||
padding: 4px;
|
||||
background: #eeeeee;
|
||||
border-top: 1px solid #f8f8f8;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* */
|
||||
|
@ -47,7 +47,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||
//---------------
|
||||
cur_frm.clear_custom_buttons()
|
||||
if(!doc.__islocal && !in_list(['Converted', 'Lead Lost'], doc.status)) {
|
||||
cur_frm.add_custom_button('Create Customer', cur_frm.cscript['Create Customer']);
|
||||
if (doc.source != 'Existing Customer') cur_frm.add_custom_button('Create Customer', cur_frm.cscript['Create Customer']);
|
||||
cur_frm.add_custom_button('Create Opportunity', cur_frm.cscript['Create Opportunity']);
|
||||
cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
|
||||
}
|
||||
|
@ -86,15 +86,10 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||
// stop
|
||||
if(doc.per_delivered < 100 || doc.per_billed < 100)
|
||||
cur_frm.add_custom_button('Stop!', cur_frm.cscript['Stop Sales Order']);
|
||||
} else {
|
||||
|
||||
} else {
|
||||
// un-stop
|
||||
cur_frm.add_custom_button('Unstop', cur_frm.cscript['Unstop Sales Order']);
|
||||
}
|
||||
|
||||
unhide_field(['Send SMS', 'message', 'customer_mobile_no'])
|
||||
} else {
|
||||
hide_field(['Send SMS', 'message', 'customer_mobile_no'])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,12 +63,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||
|
||||
if(doc.per_installed < 100 && doc.docstatus==1) cur_frm.add_custom_button('Make Installation Note', cur_frm.cscript['Make Installation Note']);
|
||||
|
||||
if (doc.docstatus!=1) {
|
||||
hide_field(['Send SMS', 'message', 'customer_mobile_no');
|
||||
} else {
|
||||
cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
|
||||
unhide_field(['Send SMS', 'message', 'customer_mobile_no');
|
||||
}
|
||||
if (doc.docstatus==1) cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
|
||||
|
||||
if(doc.docstatus==0 && !doc.__islocal) {
|
||||
cur_frm.add_custom_button('Make Packing Slip', cur_frm.cscript['Make Packing Slip']);
|
||||
|
File diff suppressed because one or more lines are too long
@ -585,14 +585,15 @@ $(wrapper).hide().fadeIn(1000);}
|
||||
wn.ui.AppFrame=Class.extend({init:function(parent){this.buttons={};this.$w=$('<div></div>').appendTo(parent);this.$titlebar=$('<div class="appframe-titlebar">\
|
||||
<span class="appframe-title"></span>\
|
||||
<span class="close">×</span>\
|
||||
</div>').appendTo(this.$w);this.$w.find('.close').click(function(){window.history.back();})},add_button:function(label,click,icon){if(!this.$w.find('.appframe-toolbar').length)
|
||||
</div>').appendTo(this.$w);this.$w.find('.close').click(function(){window.history.back();})},title:function(txt){this.$titlebar.find('.appframe-title').text(txt);},add_button:function(label,click,icon){if(!this.$w.find('.appframe-toolbar').length)
|
||||
this.$w.append('<div class="appframe-toolbar"></div>');args={label:label,icon:''};if(icon){args.icon='<i class="'+icon+'"></i>';}
|
||||
this.buttons[label]=$(repl('<button class="btn btn-small">\
|
||||
%(icon)s %(label)s</button>',args)).click(click).appendTo(this.$w.find('.appframe-toolbar'));return this.buttons[label];},clear_buttons:function(){this.$w.find('.appframe-toolbar').empty();}})
|
||||
/*
|
||||
* lib/js/wn/ui/dialog.js
|
||||
*/
|
||||
wn.widgets.FieldGroup=function(){this.first_button=false;this.make_fields=function(body,fl){$y(this.body,{padding:'11px'});this.fields_dict={};for(var i=0;i<fl.length;i++){var df=fl[i];var div=$a(body,'div','',{margin:'6px 0px'})
|
||||
wn.widgets.FieldGroup=function(){this.first_button=false;this.make_fields=function(body,fl){if(!window.make_field){wn.require('lib/css/legacy/fields.css');wn.require('lib/js/legacy/widgets/form/fields.js');wn.require('lib/js/wn/ui/button.js');}
|
||||
$y(this.body,{padding:'11px'});this.fields_dict={};for(var i=0;i<fl.length;i++){var df=fl[i];var div=$a(body,'div','',{margin:'6px 0px'})
|
||||
f=make_field(df,null,div,null);f.not_in_form=1;this.fields_dict[df.fieldname]=f
|
||||
f.refresh();if(df.fieldtype=='Button'&&!this.first_button){$(f.input).addClass('btn-info');this.first_button=true;}}}
|
||||
this.get_values=function(){var ret={};var errors=[];for(var key in this.fields_dict){var f=this.fields_dict[key];var v=f.get_value?f.get_value():null;if(f.df.reqd&&!v)
|
||||
@ -615,7 +616,8 @@ $ds(this.wrapper);freeze();this.display=true;cur_dialog=this;if(this.onshow)this
|
||||
this.hide=function(){if(this.onhide)this.onhide();unfreeze();$dh(this.wrapper);this.display=false;cur_dialog=null;}
|
||||
this.no_cancel=function(){this.appframe.$titlebar.find('.close').toggle(false);}
|
||||
if(opts)this.make();}
|
||||
wn.widgets.Dialog.prototype=new wn.widgets.FieldGroup();$(document).bind('keydown',function(e){if(cur_dialog&&!cur_dialog.no_cancel_flag&&e.which==27){cur_dialog.hide();}});
|
||||
wn.widgets.Dialog.prototype=new wn.widgets.FieldGroup();wn.provide('wn.ui');wn.ui.Dialog=wn.widgets.Dialog
|
||||
$(document).bind('keydown',function(e){if(cur_dialog&&!cur_dialog.no_cancel_flag&&e.which==27){cur_dialog.hide();}});
|
||||
/*
|
||||
* lib/js/legacy/widgets/dialog.js
|
||||
*/
|
||||
@ -826,8 +828,10 @@ function expand_doclist(docs){var l=[];for(var i=0;i<docs._vl.length;i++)
|
||||
l[l.length]=zip(docs._kl[docs._vl[i][0]],docs._vl[i]);return l;}
|
||||
function zip(k,v){var obj={};for(var i=0;i<k.length;i++){obj[k[i]]=v[i];}
|
||||
return obj;}
|
||||
function save_doclist(dt,dn,save_action,onsave,onerr){var doc=locals[dt][dn];var doctype=locals['DocType'][dt];var tmplist=[];var doclist=make_doclist(dt,dn,1);var all_clear=true;if(save_action!='Cancel'){for(var n in doclist){var tmp=check_required(doclist[n].doctype,doclist[n].name,doclist[0].doctype);if(doclist[n].docstatus+''!='2'&&all_clear)
|
||||
all_clear=tmp;}}
|
||||
function save_doclist(dt,dn,save_action,onsave,onerr){var doc=locals[dt][dn];var doctype=locals['DocType'][dt];var tmplist=[];var doclist=make_doclist(dt,dn,1);var all_reqd_ok=true;if(save_action!='Cancel'){for(var n in doclist){var reqd_ok=check_required(doclist[n].doctype,doclist[n].name,doclist[0].doctype);if(doclist[n].docstatus+''!='2'&&all_reqd_ok)
|
||||
all_reqd_ok=reqd_ok;}}
|
||||
if(!all_reqd_ok){onerr()
|
||||
return;}
|
||||
var _save=function(){$c('webnotes.widgets.form.save.savedocs',{'docs':compress_doclist(doclist),'docname':dn,'action':save_action,'user':user},function(r,rtxt){if(f){f.savingflag=false;}
|
||||
if(r.saved){if(onsave)onsave(r);}else{if(onerr)onerr(r);}},function(){if(f){f.savingflag=false;}},0,(f?'Saving...':''));}
|
||||
if(doc.__islocal&&(doctype&&doctype.autoname&&doctype.autoname.toLowerCase()=='prompt')){var newname=prompt('Enter the name of the new '+dt,'');if(newname){doc.__newname=strip(newname);_save();}else{msgprint('Not Saved');onerr();}}else{_save();}}
|
||||
@ -851,57 +855,4 @@ $(favicon).appendTo('head');}})
|
||||
*/
|
||||
wn.app={name:'ERPNext',license:'GNU/GPL - Usage Condition: All "erpnext" branding must be kept as it is',source:'https://github.com/webnotes/erpnext',publisher:'Web Notes Technologies Pvt Ltd, Mumbai',copyright:'© Web Notes Technologies Pvt Ltd',version:'2.'+window._version_number}
|
||||
wn.modules_path='erpnext';$(document).bind('toolbar_setup',function(){$('.brand').html('<b>erp</b>next\
|
||||
<i class="icon-home icon-white navbar-icon-home" ></i>').hover(function(){$(this).find('.icon-home').addClass('navbar-icon-home-hover');},function(){$(this).find('.icon-home').removeClass('navbar-icon-home-hover');});});
|
||||
/*
|
||||
* erpnext/startup/startup.js
|
||||
*/
|
||||
var current_module;var is_system_manager=0;wn.provide('erpnext.startup');erpnext.modules={'Selling':'selling-home','Accounts':'accounts-home','Stock':'stock-home','Buying':'buying-home','Support':'support-home','Projects':'projects-home','Production':'production-home','Website':'website-home','HR':'hr-home','Setup':'Setup','Activity':'activity','To Do':'todo','Calendar':'calendar','Messages':'messages','Knowledge Base':'questions','Dashboard':'dashboard'}
|
||||
erpnext.startup.set_globals=function(){wn.control_panel.sync_with_gateway=wn.boot.sync_with_gateway
|
||||
pscript.is_erpnext_saas=cint(wn.control_panel.sync_with_gateway)
|
||||
if(inList(user_roles,'System Manager'))is_system_manager=1;}
|
||||
erpnext.startup.start=function(){$('#startup_div').html('Starting up...').toggle(true);erpnext.startup.set_globals();if(wn.boot.user_background){erpnext.set_user_background(wn.boot.user_background);}
|
||||
if(user=='Guest'){if(wn.boot.custom_css){set_style(wn.boot.custom_css);}
|
||||
if(wn.boot.website_settings.title_prefix){wn.title_prefix=wn.boot.website_settings.title_prefix;}}else{wn.boot.profile.allow_modules=wn.boot.profile.allow_modules.concat(['To Do','Knowledge Base','Calendar','Activity','Messages'])
|
||||
if(user_roles.indexOf('Accounts Manager')!=-1){wn.boot.profile.allow_modules.push('Dashboard');}
|
||||
erpnext.toolbar.setup();erpnext.startup.set_periodic_updates();if(in_list(user_roles,'System Manager')&&(wn.boot.setup_complete=='No')){wn.require("erpnext/startup/js/complete_setup.js");erpnext.complete_setup();}}
|
||||
$('#startup_div').toggle(false);}
|
||||
show_chart_browser=function(nm,chart_type){var call_back=function(){if(nm=='Sales Browser'){var sb_obj=new SalesBrowser();sb_obj.set_val(chart_type);}
|
||||
else if(nm=='Accounts Browser')
|
||||
pscript.make_chart(chart_type);}
|
||||
loadpage(nm,call_back);}
|
||||
var update_messages=function(reset){if(inList(['Guest'],user)||!wn.session_alive){return;}
|
||||
if(!reset){var set_messages=function(r){if(!r.exc){wn.container.wntoolbar.set_new_comments(r.message.unread_messages);var show_in_circle=function(parent_id,msg){var parent=$('#'+parent_id);if(parent){if(msg){parent.find('span:first').text(msg);parent.toggle(true);}else{parent.toggle(false);}}}
|
||||
show_in_circle('unread_messages',r.message.unread_messages.length);show_in_circle('open_support_tickets',r.message.open_support_tickets);show_in_circle('things_todo',r.message.things_todo);show_in_circle('todays_events',r.message.todays_events);}else{clearInterval(wn.updates.id);}}
|
||||
wn.call({method:'startup.startup.get_global_status_messages',callback:set_messages});}else{wn.container.wntoolbar.set_new_comments(0);$('#unread_messages').toggle(false);}}
|
||||
erpnext.startup.set_periodic_updates=function(){wn.updates={};if(wn.updates.id){clearInterval(wn.updates.id);}
|
||||
wn.updates.id=setInterval(update_messages,60000);}
|
||||
erpnext.set_user_background=function(src){set_style(repl('body { background: url("files/%(src)s") repeat;}',{src:src}))}
|
||||
$(document).bind('startup',function(){erpnext.startup.start();});
|
||||
/*
|
||||
* erpnext/website/js/topbar.js
|
||||
*/
|
||||
wn.provide('erpnext.navbar');erpnext.navbar.Navbar=Class.extend({init:function(){this.make();$('.brand').html(wn.boot.website_settings.brand_html);this.make_items();$('.dropdown-toggle').dropdown();},make:function(){$('header').append('<div class="navbar navbar-fixed-top">\
|
||||
<div class="navbar-inner">\
|
||||
<div class="container">\
|
||||
<a class="brand">[brand]</a>\
|
||||
<ul class="nav">\
|
||||
</ul>\
|
||||
<img src="lib/images/ui/spinner.gif" id="spinner"/>\
|
||||
<ul class="nav pull-right">\
|
||||
<li><a href="#!Login Page">Login</a></li>\
|
||||
</ul>\
|
||||
</div>\
|
||||
</div>\
|
||||
</div>');$('.brand').attr('href','#!'+(wn.boot.website_settings.home_page||'Login Page'))},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=='top_bar_items'){item.route=item.url||item.custom_page;$('header .nav:first').append(repl('<li data-label="%(label)s">\
|
||||
<a href="#!%(route)s">%(label)s</a></li>',item))}}
|
||||
for(var i=0;i<items.length;i++){var item=items[i];if(item.parent_label&&item.parentfield=='top_bar_items'){$parent_li=$(repl('header li[data-label="%(parent_label)s"]',item));if(!$parent_li.hasClass('dropdown')){$parent_li.addClass('dropdown');$parent_li.find('a:first').addClass('dropdown-toggle').attr('data-toggle','dropdown').attr('href','').append('<b class="caret"></b>').click(function(){return false;});$parent_li.append('<ul class="dropdown-menu"></ul>');}
|
||||
item.route=item.url||item.custom_page;$parent_li.find('.dropdown-menu').append(repl('<li data-label="%(label)s">\
|
||||
<a href="#!%(route)s">%(label)s</a></li>',item))}}}});erpnext.Footer=Class.extend({init:function(){$('footer').html(repl('<div class="web-footer">\
|
||||
<div class="web-footer-menu"><ul></ul></div>\
|
||||
<div class="web-footer-address">%(address)s</div>\
|
||||
<div class="web-footer-copyright">© %(copyright)s</div>\
|
||||
<div class="web-footer-powered">Powered by \
|
||||
<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.footer=new erpnext.Footer();erpnext.navbar.navbar=new erpnext.navbar.Navbar();})
|
||||
<i class="icon-home icon-white navbar-icon-home" ></i>').hover(function(){$(this).find('.icon-home').addClass('navbar-icon-home-hover');},function(){$(this).find('.icon-home').removeClass('navbar-icon-home-hover');});});
|
Loading…
Reference in New Issue
Block a user