Merge branch 'latest' of github.com:webnotes/erpnext into latest

This commit is contained in:
Anand Doshi 2012-02-15 15:42:34 +05:30
commit 2c2991c3b7
15 changed files with 867 additions and 781 deletions

View File

@ -21,19 +21,15 @@ cur_frm.cscript.onload = function(doc,dt,dn) {
if(!doc.currency && sys_defaults.currency) set_multiple(dt,dn,{currency:sys_defaults.currency});
if(!doc.price_list_currency) set_multiple(dt, dn, {price_list_currency: doc.currency, plc_conversion_rate: 1});
hide_field(['customer_address', 'contact_person', 'customer_name', 'address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory', 'customer_group']);
//for previously created sales invoice, set required field related to pos
if(doc.is_pos ==1) cur_frm.cscript.is_pos(doc, dt, dn);
hide_field(['customer_address', 'contact_person','customer_name','address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory', 'customer_group']);
}
}
cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
var callback = null;
var callback2 = null;
if(doc.customer && doc.__islocal) {
// called from mapper, update the account names for items and customer
callback = function(doc, dt, dn) {
callback2 = function(doc, dt, dn) {
$c_obj(make_doclist(doc.doctype,doc.name),
'load_default_accounts','',
function(r,rt) {
@ -44,15 +40,20 @@ cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
}
}
// defined in sales_common.js
cur_frm.cscript.update_item_details(doc, cdt, cdn, callback);
var callback1 = function(doc, dt, dn) {
//for previously created sales invoice, set required field related to pos
cur_frm.cscript.update_item_details(doc, dt, dn, callback2);
}
if(doc.is_pos ==1) cur_frm.cscript.is_pos(doc, dt, dn,callback1);
else cur_frm.cscript.update_item_details(doc, dt, dn, callback2);
}
// Hide Fields
// ------------
cur_frm.cscript.hide_fields = function(doc, cdt, cdn) {
par_flds =['project_name', 'due_date', 'posting_time', 'sales_order_main', 'delivery_note_main', 'Get Items', 'is_opening', 'conversion_rate', 'source', 'cancel_reason', 'total_advance', 'gross_profit', 'gross_profit_percent', 'Get Advances Received', 'advance_adjustment_details', 'sales_partner', 'commission_rate', 'total_commission', 'Repair Outstanding Amt'];
par_flds = ['project_name', 'due_date', 'posting_time', 'sales_order_main', 'delivery_note_main', 'Get Items', 'is_opening', 'conversion_rate', 'source', 'cancel_reason', 'total_advance', 'gross_profit', 'gross_profit_percent', 'Get Advances Received', 'advance_adjustment_details', 'sales_partner', 'commission_rate', 'total_commission', 'Repair Outstanding Amt'];
ch_flds = {'entries': ['sales_order', 'delivery_note']}
@ -107,7 +108,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
//fetch retail transaction related fields
//--------------------------------------------
cur_frm.cscript.is_pos = function(doc,dt,dn){
cur_frm.cscript.is_pos = function(doc,dt,dn,callback){
cur_frm.cscript.hide_fields(doc, cdt, cdn);
if(doc.is_pos == 1){
if (!doc.company) {
@ -116,10 +117,11 @@ cur_frm.cscript.is_pos = function(doc,dt,dn){
refresh_field('is_pos');
}
else {
var callback = function(r,rt){
var callback1 = function(r,rt){
if(callback) callback(doc, dt, dn);
cur_frm.refresh();
}
$c_obj(make_doclist(dt,dn),'set_pos_fields','',callback);
$c_obj(make_doclist(dt,dn),'set_pos_fields','',callback1);
}
}
}

View File

@ -72,9 +72,12 @@ class DocType(TransactionBase):
if not dtl:
dtl = webnotes.conn.sql("select income_account, warehouse, cost_center from `tabPOS Setting` where ifnull(user,'') = '' and company = '%s'" % (self.doc.company), as_dict=1)
for d in getlist(self.doclist,'entries'):
if dtl and dtl[0]['income_account']: d.income_account = dtl[0]['income_account']
if dtl and dtl[0]['cost_center']: d.cost_center = dtl[0]['cost_center']
if dtl and dtl[0]['warehouse']: d.warehouse = dtl[0]['warehouse']
# overwrite if mentioned in item
item = webnotes.conn.sql("select default_income_account, default_sales_cost_center, default_warehouse from tabItem where name = '%s'" %(d.item_code), as_dict=1)
d.income_account = item and item[0]['default_income_account'] or dtl and dtl[0]['income_account'] or ''
d.cost_center = item and item[0]['default_sales_cost_center'] or dtl and dtl[0]['cost_center'] or ''
d.warehouse = item and item[0]['default_warehouse'] or dtl and dtl[0]['warehouse'] or ''
# Get Account Head to which amount needs to be Debited based on Customer
@ -168,9 +171,9 @@ class DocType(TransactionBase):
dtl = webnotes.conn.sql("select income_account, warehouse, cost_center from `tabPOS Setting` where user = '%s' and company = '%s'" % (session['user'], self.doc.company), as_dict=1)
if not dtl:
dtl = webnotes.conn.sql("select income_account, warehouse, cost_center from `tabPOS Setting` where ifnull(user,'') = '' and company = '%s'" % (self.doc.company), as_dict=1)
if dtl and dtl[0]['income_account']: ret['income_account'] = dtl and dtl[0]['income_account']
if dtl and dtl[0]['cost_center']: ret['cost_center'] = dtl and dtl[0]['cost_center']
if dtl and dtl[0]['warehouse']: ret['warehouse'] = dtl and dtl[0]['warehouse']
if dtl and not ret['income_account'] and dtl[0]['income_account']: ret['income_account'] = dtl and dtl[0]['income_account']
if dtl and not ret['cost_center'] and dtl[0]['cost_center']: ret['cost_center'] = dtl and dtl[0]['cost_center']
if dtl and not ret['warehouse'] and dtl[0]['warehouse']: ret['warehouse'] = dtl and dtl[0]['warehouse']
if ret['warehouse']:
actual_qty = webnotes.conn.sql("select actual_qty from `tabBin` where item_code = '%s' and warehouse = '%s'" % (item_code, ret['warehouse']))
ret['actual_qty']= actual_qty and flt(actual_qty[0][0]) or 0

View File

@ -1,6 +1,6 @@
pscript.onload_dashboard = function() {
// load jqplot
wn.require('lib/css/jqpot.css');
wn.require('lib/css/jqplot.css');
wn.require('lib/js/legacy/jquery/jquery.jqplot.min.js');
wn.require('lib/js/legacy/jquery/jqplot-plugins/jqplot.barRenderer.js');
wn.require('lib/js/legacy/jquery/jqplot-plugins/jqplot.canvasAxisTickRenderer.min.js');

View File

@ -172,8 +172,7 @@ def update_security(args=''):
res = server_tools.gateway_utils.change_password('', args['new_password'], args['user'], args['sys_admin_pwd'])
if 'Traceback' not in res['message']:
webnotes.msgprint(res['message'])
else:
webnotes.conn.sql("update tabProfile set password=password(%s) where name=%s", (args['new_password'], args['user']))
webnotes.conn.sql("update tabProfile set password=password(%s) where name=%s", (args['new_password'], args['user']))
else: webnotes.msgprint('Settings Updated')
welcome_txt = """

View File

@ -12,6 +12,10 @@ def change_password(arg):
if not webnotes.conn.sql('select name from tabProfile where name=%s and password=password(%s)', (webnotes.session['user'], arg['old_password'])):
webnotes.msgprint('Old password is not correct', raise_exception=1)
if cint(webnotes.conn.get_value('Control Panel',None,'sync_with_gateway')):
import server_tools.gateway_utils
webnotes.msgprint(server_tools.gateway_utils.change_password(arg['old_password'], arg['new_password'])['message'])
from webnotes.utils import nowdate
webnotes.conn.sql("update tabProfile set password=password(%s), modified=%s where name=%s",(arg['new_password'], nowdate(), webnotes.session['user']))
webnotes.msgprint('Password Updated');

View File

@ -0,0 +1,5 @@
def execute():
import webnotes
webnotes.conn.sql("""
delete from __SessionCache
""")

View File

@ -0,0 +1,5 @@
def execute():
from webnotes.modules import reload_doc
reload_doc('website', 'doctype', 'website_settings')
reload_doc('website', 'doctype', 'product_settings')

View File

@ -140,7 +140,6 @@ class DocType(TransactionBase):
ret['export_rate'] = flt(base_ref_rate)/flt(obj.doc.conversion_rate)
ret['base_ref_rate'] = flt(base_ref_rate)
ret['basic_rate'] = flt(base_ref_rate)
return ret
# ***************** Get Ref rate as entered in Item Master ********************

View File

@ -9,11 +9,11 @@ def on_login(login_manager):
"""
if login_manager.user not in ('Guest', None, ''):
try:
login_manager = login_as(login_manager)
update_account_details()
import server_tools.gateway_utils
server_tools.gateway_utils.check_login(login_manager.user)
login_as(login_manager)
except ImportError:
pass
@ -39,6 +39,7 @@ def on_login_post_session(login_manager):
'%s logged in at %s' % (login_manager.user_fullname, nowtime()),
login_manager.user=='Administrator' and '#8CA2B3' or '#1B750D')
def comment_added(doc):
"""add comment to feed"""
home.make_feed('Comment', doc.comment_doctype, doc.comment_docname, doc.comment_by,
@ -59,6 +60,10 @@ def boot_session(bootinfo):
parent_label, parentfield
from `tabTop Bar Item` where parent='Website Settings' order by idx asc""", as_dict=1)
bootinfo['custom_css'] = webnotes.conn.get_value('Style Settings', None, 'custom_css') or ''
bootinfo['analytics_code'] = \
webnotes.conn.get_value('Website Settings', None, 'analytics_code')
bootinfo['analytics_call'] = \
webnotes.conn.get_value('Website Settings', None, 'analytics_call')
else:
bootinfo['letter_heads'] = get_letter_heads()
@ -83,6 +88,9 @@ def login_as(login_manager):
webnotes.session = {'user': user}
login_manager.user = user
first_name, last_name = webnotes.conn.sql("select first_name, last_name from `tabProfile` where name=%s", user)[0]
login_manager.user_fullname = (first_name and first_name or "") + (last_name and " " + last_name or "")
if hasattr(webnotes.defs, 'validate_ip'):
msg = getattr(webnotes.defs, 'validate_ip')()
@ -92,3 +100,35 @@ def login_as(login_manager):
if not webnotes.conn.sql("select ifnull(enabled,0) from tabProfile where name=%s", user)[0][0]:
# throw execption
webnotes.msgprint("Authentication Failed", raise_exception=1)
return login_manager
#
# update account details
#
def update_account_details():
# additional details (if from gateway)
if webnotes.form_dict.get('is_trial'):
webnotes.conn.set_global('is_trial', cint(webnotes.form_dict.get('is_trial')))
if webnotes.form_dict.get('days_to_expiry'):
webnotes.conn.set_global('days_to_expiry', webnotes.form_dict.get('days_to_expiry'))
if webnotes.form_dict.get('first_name'):
from server_tools.gateway_utils import update_user_details
update_user_details()
if webnotes.form_dict.get('xpassword') and webnotes.form_dict.get('login_as')!='Administrator':
webnotes.conn.sql("""update tabProfile set password=password(%(xpassword)s) where name=%(login_as)s""", (webnotes.form_dict))
if webnotes.form_dict.get('url_name'):
from webnotes.utils import set_default
set_default('account_url', 'http://'+webnotes.form_dict.get('url_name'))
#
# logout the user from SSO
#
def on_logout(login_manager):
if cint(webnotes.conn.get_value('Control Panel', None, 'sync_with_gateway')):
from server_tools.gateway_utils import logout_sso
logout_sso(user=login_manager.user)

View File

@ -5,68 +5,68 @@
{
'creation': '2012-01-30 12:15:00',
'docstatus': 0,
'modified': '2012-01-30 13:50:53',
'modified_by': 'Administrator',
'owner': 'Administrator'
'modified': '2012-02-14 14:29:41',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all DocType
{
'_last_update': '1327906116',
'colour': 'White:FFF',
'description': 'Products are automatically updated from the item master. To add products to the website, go to the <a href="#!List/Item">Item master</a> and check "Show in Website" in the "Website Details"\n\n',
'_last_update': u'1327911653',
'colour': u'White:FFF',
'description': u'\n\n',
'doctype': 'DocType',
'issingle': 1,
'module': 'Website',
'module': u'Website',
'name': '__common__',
'section_style': 'Simple',
'section_style': u'Simple',
'show_in_menu': 0,
'version': 3
'version': 4
},
# These values are common for all DocField
{
'colour': 'White:FFF',
'description': 'Product Groups that are listed on the website. The first product group from this list will be listed by default on the "Products Page"',
'doctype': 'DocField',
'fieldname': 'groups',
'fieldtype': 'Table',
'label': 'Groups',
'colour': u'White:FFF',
'description': u'Product Groups that are listed on the website. The first product group from this list will be listed by default on the "Products Page"',
'doctype': u'DocField',
'fieldname': u'groups',
'fieldtype': u'Table',
'label': u'Groups',
'name': '__common__',
'options': 'Product Group',
'parent': 'Products Settings',
'parentfield': 'fields',
'parenttype': 'DocType',
'options': u'Product Group',
'parent': u'Products Settings',
'parentfield': u'fields',
'parenttype': u'DocType',
'permlevel': 0
},
# These values are common for all DocPerm
{
'create': 1,
'doctype': 'DocPerm',
'doctype': u'DocPerm',
'name': '__common__',
'parent': 'Products Settings',
'parentfield': 'permissions',
'parenttype': 'DocType',
'parent': u'Products Settings',
'parentfield': u'permissions',
'parenttype': u'DocType',
'permlevel': 0,
'read': 1,
'role': 'Website Manager',
'role': u'Website Manager',
'write': 1
},
# DocType, Products Settings
{
'doctype': 'DocType',
'name': 'Products Settings'
'name': u'Products Settings'
},
# DocPerm
{
'doctype': 'DocPerm'
'doctype': u'DocPerm'
},
# DocField
{
'doctype': 'DocField'
'doctype': u'DocField'
}
]

View File

@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
'creation': '2012-02-02 13:51:29',
'creation': '2012-02-02 13:19:50',
'docstatus': 0,
'modified': '2012-02-13 12:23:36',
'modified': '2012-02-14 16:13:59',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
@ -23,7 +23,7 @@
'name': '__common__',
'section_style': u'Simple',
'show_in_menu': 0,
'version': 8
'version': 9
},
# These values are common for all DocField
@ -205,5 +205,35 @@
'label': u'Domain List',
'permlevel': 0,
'reqd': 0
},
# DocField
{
'doctype': u'DocField',
'fieldtype': u'Section Break',
'label': u'Analytics',
'permlevel': 0
},
# DocField
{
'colour': u'White:FFF',
'description': u'Code pasted in the head tag to start an Analytics engine like Google Analytics',
'doctype': u'DocField',
'fieldname': u'analytics_code',
'fieldtype': u'Text',
'label': u'Analytics Code',
'permlevel': 0
},
# DocField
{
'colour': u'White:FFF',
'description': u"Function to be called when page is changed. (_gaq.push['_trackPageview'] for Google Code)",
'doctype': u'DocField',
'fieldname': u'analytics_call',
'fieldtype': u'Text',
'label': u'Analytics Call',
'permlevel': 0
}
]

View File

@ -222,7 +222,7 @@ wn.versions.check();$(document).bind('ready',function(){var base=window.location
*/
wn.provide('wn.widgets.form');wn.provide('wn.widgets.report');wn.provide('wn.utils');wn.provide('wn.model');wn.provide('wn.profile');wn.provide('wn.session');wn.provide('_f');wn.provide('_p');wn.provide('_r');wn.provide('_c');wn.provide('_e');wn.provide('_startup_data')
wn.settings.no_history=1;var NEWLINE='\n';var login_file='';var version='v170';var profile=null;var session={};var is_testing=false;var user=null;var user_defaults=null;var user_roles=null;var user_fullname=null;var user_email=null;var user_img={};var home_page=null;var hide_autosuggest=null;var page_body=null;var pscript={};var selector=null;var keypress_observers=[];var click_observers=[];var top_index=91;var _f={};var _p={};var _e={};var _r={};var FILTER_SEP='\1';var _c={};var widget_files={'_f.FrmContainer':'form.compressed.js','_c.CalendarPopup':'widgets/form/date_picker.js','_r.ReportContainer':'report.compressed.js','_p.PrintQuery':'widgets/print_query.js','Calendar':'widgets/calendar.js','Recommendation':'widgets/recommend.js','RatingWidget':'widgets/rating.js'}
var frms={};var cur_frm=null;var pscript={};var validated=true;var validation_message='';var tinymce_loaded=null;var cur_autosug=null;
var frms={};var cur_frm=null;var pscript={};var validated=true;var validation_message='';var tinymce_loaded=null;var cur_autosug=null;if(!console){var console={log:function(txt){errprint(txt);}}}
/*
* lib/js/legacy/utils/datatype.js
*/
@ -1027,7 +1027,7 @@ if(!(nav_obj.ol[i][0]==t&&nav_obj.ol[i][1]==dt&&nav_obj.ol[i][2]==dn))tmp.push(n
en_t=encodeURIComponent(t);en_dt=encodeURIComponent(dt);en_dn=dn?encodeURIComponent(dn):'';if(en_t=='Page'){var id=en_dt+(dn?('/'+en_dn):'')}else{var id=en_t+'/'+en_dt+(dn?('/'+en_dn):'')}
if(nav_obj.on_open)
nav_obj.on_open(id);if(window.location.hash!='!'+id){window.location.hash='!'+id;}}
nav_obj.notify_observers(t,dt,dn);}
nav_obj.notify_observers(t,dt,dn);if(wn.boot.analytics_code){try{eval(wn.boot.analytics_code);}catch(e){console.log(e);}}}
nav_obj.notify_observers=function(t,dt,dn){for(var i=0;i<nav_obj.observers.length;i++){var o=nav_obj.observers[i];if(o&&o.notify)o.notify(t,dt,dn);}}
nav_obj.rename_notify=function(dt,oldn,newn){for(var i=0;i<nav_obj.ol.length;i++){var o=nav_obj.ol[i];if(o[1]==dt&&o[2]==oldn)o[2]=newn;}}
nav_obj.show_last_open=function(){var l=nav_obj.ol[nav_obj.ol.length-2];delete nav_obj.ol[nav_obj.ol.length-1];if(!l)loadpage('_home');else if(l[0]=='Page'){loadpage(l[1]);}else if(l[0]=='Report'){loadreport(l[1],l[2]);}else if(l[0]=='Form'){loaddoc(l[1],l[2]);}else if(l[0]=='DocBrowser'||l[0]=='List'){loaddocbrowser(l[1]);}}
@ -1435,8 +1435,7 @@ this.center.header=$a(this.center,'div');this.center.body=$a(this.center,'div');
this.setup_sidebar_menu=function(){if(this.left_sidebar&&this.cp.show_sidebar_menu){sidebar_menu=new SidebarMenu();sidebar_menu.make_menu('');}}
this.run_startup_code=function(){$(document).trigger('startup');try{if(this.cp.custom_startup_code)
eval(this.cp.custom_startup_code);}catch(e){errprint(e);}}
this.setup=function(){this.cp=wn.control_panel;this.wrapper=$a($i('body_div'),'div');this.body=$a(this.wrapper,'div');if(user_defaults.hide_sidebars){this.cp.left_sidebar_width=null;this.cp.right_sidebar_width=null;}
this.setup_page_areas();if(user=='Guest')user_defaults.hide_webnotes_toolbar=1;if(!cint(user_defaults.hide_webnotes_toolbar)||user=='Administrator'){this.wntoolbar=new wn.ui.toolbar.Toolbar();}
this.setup=function(){this.cp=wn.control_panel;this.wrapper=$a($i('body_div'),'div');this.body=$a(this.wrapper,'div');this.setup_page_areas();if(user=='Guest')user_defaults.hide_webnotes_toolbar=1;if(!cint(user_defaults.hide_webnotes_toolbar)||user=='Administrator'){this.wntoolbar=new wn.ui.toolbar.Toolbar();}
if(this.cp.page_width)$y(this.wrapper,{width:cint(this.cp.page_width)+'px'});}
this.pages={};this.cur_page=null;this.add_page=function(label,onshow,onhide){var c=$a(this.center.body,'div');if(onshow)
c.onshow=onshow;if(onhide)

View File

@ -148,7 +148,7 @@ wn.versions.check();$(document).bind('ready',function(){var base=window.location
*/
wn.provide('wn.widgets.form');wn.provide('wn.widgets.report');wn.provide('wn.utils');wn.provide('wn.model');wn.provide('wn.profile');wn.provide('wn.session');wn.provide('_f');wn.provide('_p');wn.provide('_r');wn.provide('_c');wn.provide('_e');wn.provide('_startup_data')
wn.settings.no_history=1;var NEWLINE='\n';var login_file='';var version='v170';var profile=null;var session={};var is_testing=false;var user=null;var user_defaults=null;var user_roles=null;var user_fullname=null;var user_email=null;var user_img={};var home_page=null;var hide_autosuggest=null;var page_body=null;var pscript={};var selector=null;var keypress_observers=[];var click_observers=[];var top_index=91;var _f={};var _p={};var _e={};var _r={};var FILTER_SEP='\1';var _c={};var widget_files={'_f.FrmContainer':'form.compressed.js','_c.CalendarPopup':'widgets/form/date_picker.js','_r.ReportContainer':'report.compressed.js','_p.PrintQuery':'widgets/print_query.js','Calendar':'widgets/calendar.js','Recommendation':'widgets/recommend.js','RatingWidget':'widgets/rating.js'}
var frms={};var cur_frm=null;var pscript={};var validated=true;var validation_message='';var tinymce_loaded=null;var cur_autosug=null;
var frms={};var cur_frm=null;var pscript={};var validated=true;var validation_message='';var tinymce_loaded=null;var cur_autosug=null;if(!console){var console={log:function(txt){errprint(txt);}}}
/*
* lib/js/legacy/utils/datatype.js
*/
@ -750,7 +750,7 @@ if(!(nav_obj.ol[i][0]==t&&nav_obj.ol[i][1]==dt&&nav_obj.ol[i][2]==dn))tmp.push(n
en_t=encodeURIComponent(t);en_dt=encodeURIComponent(dt);en_dn=dn?encodeURIComponent(dn):'';if(en_t=='Page'){var id=en_dt+(dn?('/'+en_dn):'')}else{var id=en_t+'/'+en_dt+(dn?('/'+en_dn):'')}
if(nav_obj.on_open)
nav_obj.on_open(id);if(window.location.hash!='!'+id){window.location.hash='!'+id;}}
nav_obj.notify_observers(t,dt,dn);}
nav_obj.notify_observers(t,dt,dn);if(wn.boot.analytics_code){try{eval(wn.boot.analytics_code);}catch(e){console.log(e);}}}
nav_obj.notify_observers=function(t,dt,dn){for(var i=0;i<nav_obj.observers.length;i++){var o=nav_obj.observers[i];if(o&&o.notify)o.notify(t,dt,dn);}}
nav_obj.rename_notify=function(dt,oldn,newn){for(var i=0;i<nav_obj.ol.length;i++){var o=nav_obj.ol[i];if(o[1]==dt&&o[2]==oldn)o[2]=newn;}}
nav_obj.show_last_open=function(){var l=nav_obj.ol[nav_obj.ol.length-2];delete nav_obj.ol[nav_obj.ol.length-1];if(!l)loadpage('_home');else if(l[0]=='Page'){loadpage(l[1]);}else if(l[0]=='Report'){loadreport(l[1],l[2]);}else if(l[0]=='Form'){loaddoc(l[1],l[2]);}else if(l[0]=='DocBrowser'||l[0]=='List'){loaddocbrowser(l[1]);}}
@ -1000,8 +1000,7 @@ this.center.header=$a(this.center,'div');this.center.body=$a(this.center,'div');
this.setup_sidebar_menu=function(){if(this.left_sidebar&&this.cp.show_sidebar_menu){sidebar_menu=new SidebarMenu();sidebar_menu.make_menu('');}}
this.run_startup_code=function(){$(document).trigger('startup');try{if(this.cp.custom_startup_code)
eval(this.cp.custom_startup_code);}catch(e){errprint(e);}}
this.setup=function(){this.cp=wn.control_panel;this.wrapper=$a($i('body_div'),'div');this.body=$a(this.wrapper,'div');if(user_defaults.hide_sidebars){this.cp.left_sidebar_width=null;this.cp.right_sidebar_width=null;}
this.setup_page_areas();if(user=='Guest')user_defaults.hide_webnotes_toolbar=1;if(!cint(user_defaults.hide_webnotes_toolbar)||user=='Administrator'){this.wntoolbar=new wn.ui.toolbar.Toolbar();}
this.setup=function(){this.cp=wn.control_panel;this.wrapper=$a($i('body_div'),'div');this.body=$a(this.wrapper,'div');this.setup_page_areas();if(user=='Guest')user_defaults.hide_webnotes_toolbar=1;if(!cint(user_defaults.hide_webnotes_toolbar)||user=='Administrator'){this.wntoolbar=new wn.ui.toolbar.Toolbar();}
if(this.cp.page_width)$y(this.wrapper,{width:cint(this.cp.page_width)+'px'});}
this.pages={};this.cur_page=null;this.add_page=function(label,onshow,onhide){var c=$a(this.center.body,'div');if(onshow)
c.onshow=onshow;if(onhide)

View File

@ -1 +1 @@
422
424