fix to startupjs

This commit is contained in:
Rushabh Mehta 2012-05-01 14:07:41 +05:30
parent efed5239f0
commit 30e3f157bc
5 changed files with 15 additions and 4 deletions

View File

@ -60,9 +60,9 @@ def boot_session(bootinfo):
import webnotes.model.doc
bootinfo['custom_css'] = webnotes.conn.get_value('Style Settings', None, 'custom_css') or ''
bootinfo['website_settings'] = webnotes.model.doc.getsingle('Website Settings')
if webnotes.session['user']=='Guest':
bootinfo['website_settings'] = webnotes.model.doc.getsingle('Website Settings')
bootinfo['website_menus'] = webnotes.conn.sql("""select label, url, custom_page,
parent_label, parentfield
from `tabTop Bar Item` where parent='Website Settings' order by idx asc""", as_dict=1)

View File

@ -215,3 +215,12 @@ erpnext.send_message = function(opts) {
}
});
}
erpnext.hide_naming_series = function() {
if(cur_frm.fields_dict.naming_series) {
hide_field('naming_series');
if(cur_frm.doc.__islocal) {
unhide_field('naming_series');
}
}
}

View File

@ -2219,7 +2219,7 @@ $(favicon).appendTo('head');}})
* js/app.js
*/
wn.provide('erpnext');erpnext.set_about=function(){wn.provide('wn.app');$.extend(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'});}
wn.modules_path='erpnext';$(document).bind('toolbar_setup',function(){$('.brand').html($wn.boot.website_settings.brand_html.substr(0,15)||'erpnext'+' <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');});});
wn.modules_path='erpnext';$(document).bind('toolbar_setup',function(){$('.brand').html(wn.boot.website_settings.brand_html.substr(0,15)||'erpnext'+' <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
*/
@ -2253,6 +2253,7 @@ erpnext.set_user_background=function(src){set_style(repl('#body_div { background
$(document).bind('startup',function(){erpnext.startup.start();});erpnext.send_message=function(opts){if(opts.btn){$(opts.btn).start_working();}
wn.call({method:'website.send_message',args:opts,callback:function(r){if(opts.btn){$(opts.btn).done_working();}
if(opts.callback)opts.callback(r)}});}
erpnext.hide_naming_series=function(){if(cur_frm.fields_dict.naming_series){hide_field('naming_series');if(cur_frm.doc.__islocal){unhide_field('naming_series');}}}
/*
* erpnext/startup/js/modules.js
*/

View File

@ -830,7 +830,7 @@ $(favicon).appendTo('head');}})
* js/app.js
*/
wn.provide('erpnext');erpnext.set_about=function(){wn.provide('wn.app');$.extend(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:'&copy; Web Notes Technologies Pvt Ltd',version:'2'});}
wn.modules_path='erpnext';$(document).bind('toolbar_setup',function(){$('.brand').html($wn.boot.website_settings.brand_html.substr(0,15)||'erpnext'+' <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');});});
wn.modules_path='erpnext';$(document).bind('toolbar_setup',function(){$('.brand').html(wn.boot.website_settings.brand_html.substr(0,15)||'erpnext'+' <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
*/
@ -864,6 +864,7 @@ erpnext.set_user_background=function(src){set_style(repl('#body_div { background
$(document).bind('startup',function(){erpnext.startup.start();});erpnext.send_message=function(opts){if(opts.btn){$(opts.btn).start_working();}
wn.call({method:'website.send_message',args:opts,callback:function(r){if(opts.btn){$(opts.btn).done_working();}
if(opts.callback)opts.callback(r)}});}
erpnext.hide_naming_series=function(){if(cur_frm.fields_dict.naming_series){hide_field('naming_series');if(cur_frm.doc.__islocal){unhide_field('naming_series');}}}
/*
* erpnext/website/js/topbar.js
*/

View File

@ -14,7 +14,7 @@ erpnext.set_about = function() {
wn.modules_path = 'erpnext';
$(document).bind('toolbar_setup', function() {
$('.brand').html($wn.boot.website_settings.brand_html.substr(0,15) || 'erpnext' +
$('.brand').html(wn.boot.website_settings.brand_html.substr(0,15) || 'erpnext' +
' <i class="icon-home icon-white navbar-icon-home" ></i>')
.hover(function() {
$(this).find('.icon-home').addClass('navbar-icon-home-hover');