diff --git a/css/all-app.css b/css/all-app.css index e308d5eed1..52ec6823b6 100644 --- a/css/all-app.css +++ b/css/all-app.css @@ -1937,12 +1937,12 @@ body { /* font settings */ h1, h2, h3, h4, h5 { - font-family: "Helvetica Neue", Helvetica, "Helvetica Neue", sans-serif; + font-family: Arial, sans-serif; margin-top: 0.2em; } body { - font-family: "Helvetica Neue", Helvetica, "Helvetica Neue", sans-serif; + font-family: Arial, sans-serif; font-size: 13px; background-color: #eee; } @@ -3783,12 +3783,12 @@ div.appframe-toolbar { * erpnext/startup/startup.css */ h1, h2, h3, h4, h5 { - font-family: "Helvetica Neue", "Open Sans", Helvetica, sans-serif; + font-family: Arial, Helvetica, sans-serif; margin-top: 0.2em; } body { - font-family: "Helvetica Neue", "Open Sans", Helvetica, sans-serif; + font-family: Arial, Helvetica, sans-serif; font-size: 13px; } diff --git a/css/all-web.css b/css/all-web.css index 3cacea47af..1d8f8d6e30 100644 --- a/css/all-web.css +++ b/css/all-web.css @@ -1798,12 +1798,12 @@ body { /* font settings */ h1, h2, h3, h4, h5 { - font-family: "Helvetica Neue", Helvetica, "Helvetica Neue", sans-serif; + font-family: Arial, sans-serif; margin-top: 0.2em; } body { - font-family: "Helvetica Neue", Helvetica, "Helvetica Neue", sans-serif; + font-family: Arial, sans-serif; font-size: 13px; background-color: #eee; } @@ -2481,12 +2481,12 @@ div.appframe-toolbar { * erpnext/startup/startup.css */ h1, h2, h3, h4, h5 { - font-family: "Helvetica Neue", "Open Sans", Helvetica, sans-serif; + font-family: Arial, Helvetica, sans-serif; margin-top: 0.2em; } body { - font-family: "Helvetica Neue", "Open Sans", Helvetica, sans-serif; + font-family: Arial, Helvetica, sans-serif; font-size: 13px; } diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index 9aaf620b94..15270defc9 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -173,7 +173,6 @@ cur_frm.cscript.warehouse = function(doc, cdt , cdn) { //Customer cur_frm.cscript.customer = function(doc,dt,dn,onload) { - var callback = function(r,rt) { var callback2 = function(doc, dt, dn) { doc = locals[dt][dn]; @@ -181,7 +180,7 @@ cur_frm.cscript.customer = function(doc,dt,dn,onload) { get_server_fields('get_cust_and_due_date','','',doc,dt,dn,1, function(doc, dt, dn) { cur_frm.refresh(); - cur_frm.cscript.price_list_name(doc, dt, dn); + if (!onload) cur_frm.cscript.price_list_name(doc, dt, dn); }); } diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.txt b/erpnext/accounts/doctype/sales_invoice/sales_invoice.txt index a69dcbf2e0..f66f877272 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.txt +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.txt @@ -5,7 +5,7 @@ { 'creation': '2012-04-13 11:56:18', 'docstatus': 0, - 'modified': '2012-05-01 12:15:53', + 'modified': '2012-05-02 09:57:50', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -197,6 +197,23 @@ 'trigger': u'Client' }, + # DocField + { + 'colour': u'White:FFF', + 'doctype': u'DocField', + 'fieldname': u'customer', + 'fieldtype': u'Link', + 'hidden': 0, + 'label': u'Customer', + 'no_copy': 0, + 'oldfieldname': u'customer', + 'oldfieldtype': u'Link', + 'options': u'Customer', + 'permlevel': 0, + 'print_hide': 1, + 'trigger': u'Client' + }, + # DocField { 'doctype': u'DocField', @@ -962,23 +979,6 @@ 'width': u'50%' }, - # DocField - { - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'customer', - 'fieldtype': u'Link', - 'hidden': 0, - 'label': u'Customer', - 'no_copy': 0, - 'oldfieldname': u'customer', - 'oldfieldtype': u'Link', - 'options': u'Customer', - 'permlevel': 0, - 'print_hide': 1, - 'trigger': u'Client' - }, - # DocField { 'doctype': u'DocField', diff --git a/erpnext/patches/may_2012/__init__.py b/erpnext/patches/may_2012/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/patches/may_2012/cleanup_property_setter.py b/erpnext/patches/may_2012/cleanup_property_setter.py new file mode 100644 index 0000000000..f4e3ef8067 --- /dev/null +++ b/erpnext/patches/may_2012/cleanup_property_setter.py @@ -0,0 +1,5 @@ +def execute(): + import webnotes + webnotes.conn.sql("delete from `tabProperty Setter` where property in ('width', 'previous_field')") + + webnotes.conn.sql("delete from `tabSingles` where field = 'footer_font_color' and doctype = 'Style Settings'") diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py index 8002078883..e491b4c485 100644 --- a/erpnext/patches/patch_list.py +++ b/erpnext/patches/patch_list.py @@ -312,5 +312,10 @@ patch_list = [ 'patch_file': 'repost_stock_for_posting_time', 'description': 'repost stock for posting time 00:00:seconds' }, + { + 'patch_module': 'patches.may_2012', + 'patch_file': 'cleanup_property_setter', + 'description': 'cleanup_property_setter' + }, ] diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js index 7435593eb4..7f89748276 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.js +++ b/erpnext/selling/doctype/sales_order/sales_order.js @@ -102,7 +102,7 @@ cur_frm.cscript.customer = function(doc,dt,dn) { var callback2 = function(r, rt) { if(doc.customer) unhide_field(['customer_address', 'contact_person', 'territory','customer_group','shipping_address']); cur_frm.refresh(); - cur_frm.cscript.price_list_name(doc, dt, dn); + if(!onload) cur_frm.cscript.price_list_name(doc, dt, dn); } var doc = locals[cur_frm.doctype][cur_frm.docname]; diff --git a/erpnext/startup/startup.css b/erpnext/startup/startup.css index 490b2f4ee9..de76623bb2 100644 --- a/erpnext/startup/startup.css +++ b/erpnext/startup/startup.css @@ -1,10 +1,10 @@ h1, h2, h3, h4, h5 { - font-family: "Helvetica Neue", "Open Sans", Helvetica, sans-serif; + font-family: Arial, Helvetica, sans-serif; margin-top: 0.2em; } body { - font-family: "Helvetica Neue", "Open Sans", Helvetica, sans-serif; + font-family: Arial, Helvetica, sans-serif; font-size: 13px; } diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js index 28ba99ecb5..982275174d 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.js +++ b/erpnext/stock/doctype/delivery_note/delivery_note.js @@ -83,7 +83,7 @@ cur_frm.cscript.customer = function(doc,dt,dn,onload) { var doc = locals[cur_frm.doctype][cur_frm.docname]; if(doc.customer) unhide_field(['customer_address','contact_person','territory','customer_group']); cur_frm.refresh(); - cur_frm.cscript.price_list_name(doc, dt, dn); + if(!onload) cur_frm.cscript.price_list_name(doc, dt, dn); } var args = onload ? 'onload':'' if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_shipping_address', args, callback); diff --git a/erpnext/support/doctype/support_ticket/support_ticket.js b/erpnext/support/doctype/support_ticket/support_ticket.js index 65c5fd901f..48c80b5864 100644 --- a/erpnext/support/doctype/support_ticket/support_ticket.js +++ b/erpnext/support/doctype/support_ticket/support_ticket.js @@ -48,6 +48,7 @@ $.extend(cur_frm.cscript, { }, refresh: function(doc) { + erpnext.hide_naming_series(); cur_frm.cscript.make_listing(doc); if(!doc.__islocal) { if(in_list(user_roles,'System Manager')) { diff --git a/erpnext/support/doctype/support_ticket/support_ticket.txt b/erpnext/support/doctype/support_ticket/support_ticket.txt index 67e60c281e..c1622abb40 100644 --- a/erpnext/support/doctype/support_ticket/support_ticket.txt +++ b/erpnext/support/doctype/support_ticket/support_ticket.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2012-03-27 14:36:43', + 'creation': '2012-04-02 16:02:42', 'docstatus': 0, - 'modified': '2012-03-27 14:36:43', + 'modified': '2012-05-02 11:33:24', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -26,7 +26,7 @@ 'show_in_menu': 0, 'subject': u'%(subject)s', 'tag_fields': u'status,allocated_to', - 'version': 153 + 'version': 1 }, # These values are common for all DocField @@ -41,6 +41,7 @@ # These values are common for all DocPerm { 'amend': 0, + 'cancel': 0, 'doctype': u'DocPerm', 'name': '__common__', 'parent': u'Support Ticket', @@ -58,7 +59,6 @@ # DocPerm { - 'cancel': 0, 'create': 1, 'doctype': u'DocPerm', 'permlevel': 0, @@ -68,7 +68,6 @@ # DocPerm { - 'cancel': 0, 'create': 1, 'doctype': u'DocPerm', 'permlevel': 0, @@ -78,7 +77,6 @@ # DocPerm { - 'cancel': 1, 'create': 1, 'doctype': u'DocPerm', 'permlevel': 0, @@ -88,7 +86,6 @@ # DocPerm { - 'cancel': 0, 'create': 0, 'doctype': u'DocPerm', 'permlevel': 1, @@ -98,7 +95,6 @@ # DocPerm { - 'cancel': 0, 'create': 0, 'doctype': u'DocPerm', 'permlevel': 2, @@ -106,6 +102,21 @@ 'write': 0 }, + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'naming_series', + 'fieldtype': u'Select', + 'hidden': 0, + 'label': u'Naming Series', + 'no_copy': 1, + 'options': u'SUP', + 'permlevel': 0, + 'print_hide': 1, + 'reqd': 0, + 'search_index': 0 + }, + # DocField { 'colour': u'White:FFF', @@ -396,20 +407,5 @@ 'no_copy': 1, 'permlevel': 0, 'print_hide': 1 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'naming_series', - 'fieldtype': u'Select', - 'hidden': 1, - 'label': u'Series', - 'no_copy': 1, - 'options': u'SUP', - 'permlevel': 0, - 'print_hide': 1, - 'reqd': 0, - 'search_index': 0 } ] \ No newline at end of file diff --git a/erpnext/website/js/topbar.js b/erpnext/website/js/topbar.js index b004a6f15a..a76d4efaf3 100644 --- a/erpnext/website/js/topbar.js +++ b/erpnext/website/js/topbar.js @@ -54,9 +54,7 @@ erpnext.navbar.Navbar = Class.extend({ for(var i=0;i\ %(label)s', item)); } @@ -120,7 +118,7 @@ erpnext.Footer = Class.extend({ // customize hard / soft links erpnext.header_link_settings = function(item) { item.route = item.url || item.custom_page; - if(item.route.substr(0,4)=='http') { + if(item.route && item.route.substr(0,4)=='http') { item.target = 'target="_blank"'; } else { item.target = ''; diff --git a/js/all-app.js b/js/all-app.js index e5289fba22..bafe125daa 100644 --- a/js/all-app.js +++ b/js/all-app.js @@ -271,7 +271,7 @@ wn.get_route_str=function(route){if(!route) route=window.location.hash;if(route.substr(0,1)=='#')route=route.substr(1);if(route.substr(0,1)=='!')route=route.substr(1);return route;} wn.set_route=function(){route=$.map(arguments,function(a){return encodeURIComponent(a)}).join('/');window.location.hash=route;wn.app.set_favicon();} wn._cur_route=null;$(window).bind('hashchange',function(){if(location.hash==wn._cur_route) -return;wn.route();if(wn.boot.analytics_code){try{eval(wn.boot.analytics_code);}catch(e){console.log(e);}}}); +return;wn.route();}); /* * lib/js/wn/ui/listing.js */ @@ -517,7 +517,8 @@ me.list.run();});this.dialog.show();},add_column:function(c){var w=$('
').data('item.autocomplete',item).append(repl('%(label)s
%(info)s
',item)).appendTo(ul);};$(this.txt).change(function(){if(!$(this).val()) -me.set_input_value('');})} +$(me.txt).autocomplete({source:function(request,response){wn.call({method:'webnotes.widgets.search.search_link',args:{'txt':request.term,'dt':me.df.options,'query':me.get_custom_query()},callback:function(r){response(r.results);},});},select:function(event,ui){me.set_input_value(ui.item.value);}}).data('autocomplete')._renderItem=function(ul,item){return $('
  • ').data('item.autocomplete',item).append(repl('%(label)s
    %(info)s
    ',item)).appendTo(ul);};$(this.txt).change(function(){if(!$(this).val()){if(selector&&selector.display)return;me.set_input_value('');}})} LinkField.prototype.get_custom_query=function(){this.set_get_query();if(this.get_query){if(cur_frm) var doc=locals[cur_frm.doctype][cur_frm.docname];return this.get_query(doc,this.doctype,this.docname);}} LinkField.prototype.setup_buttons=function(){var me=this;me.btn.onclick=function(){selector.set(me,me.df.options,me.df.label);selector.show(me.txt);} if(me.btn1)me.btn1.onclick=function(){if(me.txt.value&&me.df.options){loaddoc(me.df.options,me.txt.value);}} me.can_create=0;if((!me.not_in_form)&&in_list(profile.can_create,me.df.options)){me.can_create=1;me.btn2.onclick=function(){var on_save_callback=function(new_rec){if(new_rec){var d=_f.calling_doc_stack.pop();locals[d[0]][d[1]][me.df.fieldname]=new_rec;me.refresh();if(me.grid)me.grid.refresh();me.run_trigger();}} _f.calling_doc_stack.push([me.doctype,me.docname]);new_doc(me.df.options,me.on_new,1,on_save_callback,me.doctype,me.docname,me.frm.not_in_container);}}else{$dh(me.btn2);$y($td(me.tab,0,2),{width:'0px'});}} -LinkField.prototype.set_input_value=function(val){var me=this;me.refresh_label_icon();if(me.not_in_form){$(this.txt).val(val);return;} +LinkField.prototype.set_input_value=function(val){var me=this;var from_selector=false;if(selector&&selector.display)from_selector=true;me.refresh_label_icon();if(me.not_in_form){$(this.txt).val(val);return;} if(cur_frm){if(val==locals[me.doctype][me.docname][me.df.fieldname]){me.set(val);me.run_trigger();return;}} me.set(val);if(_f.cur_grid_cell) _f.cur_grid_cell.grid.cell_deselect();if(!val){me.run_trigger();return;} var fetch='';if(cur_frm.fetch_dict[me.df.fieldname]) -fetch=cur_frm.fetch_dict[me.df.fieldname].columns.join(', ');$c('webnotes.widgets.form.utils.validate_link',{'value':val,'options':me.df.options,'fetch':fetch},function(r,rt){if(selector&&selector.display)return;if(r.message=='Ok'){if($(me.txt).val()!=val){me.set_input(val);} +fetch=cur_frm.fetch_dict[me.df.fieldname].columns.join(', ');$c('webnotes.widgets.form.utils.validate_link',{'value':val,'options':me.df.options,'fetch':fetch},function(r,rt){if(r.message=='Ok'){if($(me.txt).val()!=val&&!from_selector){me.set_input_value(val);} if(r.fetch_values) me.set_fetch_values(r.fetch_values);me.run_trigger();}else{var astr='';if(in_list(profile.can_create,me.df.options))astr=repl('

    Click here to create a new %(dtl)s',{dt:me.df.options,dtl:get_doctype_label(me.df.options)}) msgprint(repl('error:%(val)s is not a valid %(dt)s.

    You must first create a new %(dt)s %(val)s and then select its value. To find an existing %(dt)s, click on the magnifying glass next to the field.%(add)s',{val:me.txt.value,dt:get_doctype_label(me.df.options),add:astr}));me.txt.value='';me.set('');}});} @@ -1553,20 +1553,19 @@ return v;};function LinkField(){}LinkField.prototype=new Field();LinkField.proto $(me.btn2).css('display','inline-block');else $dh(me.btn2);}} me.txt.field_object=this;me.input.set_input=function(val){if(val==undefined)val='';me.txt.value=val;} me.get_value=function(){return me.txt.value;} -$(me.txt).autocomplete({source:function(request,response){wn.call({method:'webnotes.widgets.search.search_link',args:{'txt':request.term,'dt':me.df.options,'query':me.get_custom_query()},callback:function(r){response(r.results);},});},select:function(event,ui){me.set_input_value(ui.item.value);}}).data('autocomplete')._renderItem=function(ul,item){return $('
  • ').data('item.autocomplete',item).append(repl('%(label)s
    %(info)s
    ',item)).appendTo(ul);};$(this.txt).change(function(){if(!$(this).val()) -me.set_input_value('');})} +$(me.txt).autocomplete({source:function(request,response){wn.call({method:'webnotes.widgets.search.search_link',args:{'txt':request.term,'dt':me.df.options,'query':me.get_custom_query()},callback:function(r){response(r.results);},});},select:function(event,ui){me.set_input_value(ui.item.value);}}).data('autocomplete')._renderItem=function(ul,item){return $('
  • ').data('item.autocomplete',item).append(repl('%(label)s
    %(info)s
    ',item)).appendTo(ul);};$(this.txt).change(function(){if(!$(this).val()){if(selector&&selector.display)return;me.set_input_value('');}})} LinkField.prototype.get_custom_query=function(){this.set_get_query();if(this.get_query){if(cur_frm) var doc=locals[cur_frm.doctype][cur_frm.docname];return this.get_query(doc,this.doctype,this.docname);}} LinkField.prototype.setup_buttons=function(){var me=this;me.btn.onclick=function(){selector.set(me,me.df.options,me.df.label);selector.show(me.txt);} if(me.btn1)me.btn1.onclick=function(){if(me.txt.value&&me.df.options){loaddoc(me.df.options,me.txt.value);}} me.can_create=0;if((!me.not_in_form)&&in_list(profile.can_create,me.df.options)){me.can_create=1;me.btn2.onclick=function(){var on_save_callback=function(new_rec){if(new_rec){var d=_f.calling_doc_stack.pop();locals[d[0]][d[1]][me.df.fieldname]=new_rec;me.refresh();if(me.grid)me.grid.refresh();me.run_trigger();}} _f.calling_doc_stack.push([me.doctype,me.docname]);new_doc(me.df.options,me.on_new,1,on_save_callback,me.doctype,me.docname,me.frm.not_in_container);}}else{$dh(me.btn2);$y($td(me.tab,0,2),{width:'0px'});}} -LinkField.prototype.set_input_value=function(val){var me=this;me.refresh_label_icon();if(me.not_in_form){$(this.txt).val(val);return;} +LinkField.prototype.set_input_value=function(val){var me=this;var from_selector=false;if(selector&&selector.display)from_selector=true;me.refresh_label_icon();if(me.not_in_form){$(this.txt).val(val);return;} if(cur_frm){if(val==locals[me.doctype][me.docname][me.df.fieldname]){me.set(val);me.run_trigger();return;}} me.set(val);if(_f.cur_grid_cell) _f.cur_grid_cell.grid.cell_deselect();if(!val){me.run_trigger();return;} var fetch='';if(cur_frm.fetch_dict[me.df.fieldname]) -fetch=cur_frm.fetch_dict[me.df.fieldname].columns.join(', ');$c('webnotes.widgets.form.utils.validate_link',{'value':val,'options':me.df.options,'fetch':fetch},function(r,rt){if(selector&&selector.display)return;if(r.message=='Ok'){if($(me.txt).val()!=val){me.set_input(val);} +fetch=cur_frm.fetch_dict[me.df.fieldname].columns.join(', ');$c('webnotes.widgets.form.utils.validate_link',{'value':val,'options':me.df.options,'fetch':fetch},function(r,rt){if(r.message=='Ok'){if($(me.txt).val()!=val&&!from_selector){me.set_input_value(val);} if(r.fetch_values) me.set_fetch_values(r.fetch_values);me.run_trigger();}else{var astr='';if(in_list(profile.can_create,me.df.options))astr=repl('

    Click here to create a new %(dtl)s',{dt:me.df.options,dtl:get_doctype_label(me.df.options)}) msgprint(repl('error:%(val)s is not a valid %(dt)s.

    You must first create a new %(dt)s %(val)s and then select its value. To find an existing %(dt)s, click on the magnifying glass next to the field.%(add)s',{val:me.txt.value,dt:get_doctype_label(me.df.options),add:astr}));me.txt.value='';me.set('');}});} @@ -1686,7 +1685,8 @@ d.cur_frm=f;d.dn=dn;d.table_form=f.meta.istable;f.refresh(dn);$(f.page_layout.wr */ _f.FrmHeader=Class.extend({init:function(parent,frm){this.appframe=new wn.ui.AppFrame(parent) this.appframe.$titlebar.append('\ - ');this.$w=this.appframe.$w;},refresh:function(){wn.views.breadcrumbs($(this.$w.find('.breadcrumb-area')),cur_frm.meta.module,cur_frm.meta.name,cur_frm.docname);this.refresh_labels();this.refresh_toolbar();},refresh_labels:function(){var labinfo={0:['Draft',''],1:['Submitted','label-info'],2:['Cancelled','label-important']}[cint(cur_frm.doc.docstatus)];if(cur_frm.doc.__unsaved){labinfo[1]='label-warning'} + ');this.$w=this.appframe.$w;},refresh:function(){wn.views.breadcrumbs($(this.$w.find('.breadcrumb-area')),cur_frm.meta.module,cur_frm.meta.name,cur_frm.docname);this.refresh_labels();this.refresh_toolbar();},refresh_labels:function(){var labinfo={0:['Saved','label-success'],1:['Submitted','label-info'],2:['Cancelled','label-important']}[cint(cur_frm.doc.docstatus)];if(labinfo[0]=='Saved'&&cur_frm.meta.is_submittable){labinfo[0]='Saved, to Submit';} +if(cur_frm.doc.__unsaved){labinfo[0]='Not Saved';labinfo[1]='label-warning'} this.set_label(labinfo);},set_label:function(labinfo){this.$w.find('.label-area').html(repl('\ %(lab_status)s',{lab_status:labinfo[0],lab_class:labinfo[1]}));},refresh_toolbar:function(){this.appframe.clear_buttons();var p=cur_frm.get_doc_perms();if(cur_frm.meta.read_only_onload&&!cur_frm.doc.__islocal){if(!cur_frm.editable) this.appframe.add_button('Edit',function(){cur_frm.edit_doc();},'icon-pencil');else @@ -1723,7 +1723,8 @@ _p.show_dialog();} _f.Frm.prototype.email_doc=function(){if(!_e.dialog)_e.make();sel=this.print_sel;var c=$td(_e.dialog.rows['Format'].tab,0,1);if(c.cur_sel){c.removeChild(c.cur_sel);c.cur_sel=null;} c.appendChild(this.print_sel);c.cur_sel=this.print_sel;_e.dialog.widgets['Send With Attachments'].checked=0;if(cur_frm.doc.file_list){$ds(_e.dialog.rows['Send With Attachments']);}else{$dh(_e.dialog.rows['Send With Attachments']);} _e.dialog.widgets['Subject'].value=get_doctype_label(this.meta.name)+': '+this.docname;_e.dialog.show();} -_f.Frm.prototype.rename_notify=function(dt,old,name){if(this.docname==old) +_f.Frm.prototype.rename_notify=function(dt,old,name){if(this.meta.in_dialog) +return;if(this.docname==old) this.docname=name;else return;this.is_editable[name]=this.is_editable[old];delete this.is_editable[old];if(this&&this.opendocs[old]){local_dt[dt][name]=local_dt[dt][old];local_dt[dt][old]=null;} delete this.opendocs[old];this.opendocs[name]=true;wn.re_route[window.location.hash]='Form/'+encodeURIComponent(this.doctype)+'/'+encodeURIComponent(name);wn.set_route('Form',this.doctype,name);} @@ -2212,7 +2213,7 @@ me.dialog.clear();me.dialog.show();}}); wn.Application=Class.extend({init:function(){this.load_bootinfo();this.make_page_container();this.make_nav_bar();this.set_favicon();$(document).trigger('startup');wn.route();},load_bootinfo:function(){LocalDB.sync(wn.boot.docs);wn.control_panel=wn.boot.control_panel;if(wn.boot.error_messages) console.log(wn.boot.error_messages) if(wn.boot.server_messages) -msgprint(wn.boot.server_messages);this.set_globals();},set_globals:function(){profile=wn.boot.profile;user=wn.boot.profile.name;user_fullname=wn.user_info(user).fullname;user_defaults=profile.defaults;user_roles=profile.roles;user_email=profile.email;sys_defaults=wn.boot.sysdefaults;},make_page_container:function(){wn.container=new wn.views.Container();wn.views.make_403();wn.views.make_404();},make_nav_bar:function(){if(wn.user.name!='Guest'){wn.container.wntoolbar=new wn.ui.toolbar.Toolbar();}},logout:function(){var me=this;wn.call({method:'logout',callback:function(r){if(r.exc){console.log(r.exc);return;} +msgprint(wn.boot.server_messages);this.set_globals();},set_globals:function(){profile=wn.boot.profile;user=wn.boot.profile.name;user_fullname=wn.user_info(user).fullname;user_defaults=profile.defaults;user_roles=profile.roles;user_email=profile.email;sys_defaults=wn.boot.sysdefaults;},make_page_container:function(){wn.container=new wn.views.Container();wn.views.make_403();wn.views.make_404();},make_nav_bar:function(){if(wn.user.name!='Guest'){wn.container.wntoolbar=new wn.ui.toolbar.Toolbar();}},logout:function(){var me=this;me.logged_out=true;wn.call({method:'logout',callback:function(r){if(r.exc){console.log(r.exc);} me.redirect_to_login();}})},redirect_to_login:function(){window.location.hash='';window.location.reload();},set_favicon:function(){var link=$('link[type="image/x-icon"]').remove().attr("href");var favicon='\ \ ' diff --git a/js/all-web.js b/js/all-web.js index cb6efeb0cb..8c2e3370dd 100644 --- a/js/all-web.js +++ b/js/all-web.js @@ -158,7 +158,7 @@ wn.get_route_str=function(route){if(!route) route=window.location.hash;if(route.substr(0,1)=='#')route=route.substr(1);if(route.substr(0,1)=='!')route=route.substr(1);return route;} wn.set_route=function(){route=$.map(arguments,function(a){return encodeURIComponent(a)}).join('/');window.location.hash=route;wn.app.set_favicon();} wn._cur_route=null;$(window).bind('hashchange',function(){if(location.hash==wn._cur_route) -return;wn.route();if(wn.boot.analytics_code){try{eval(wn.boot.analytics_code);}catch(e){console.log(e);}}}); +return;wn.route();}); /* * lib/js/wn/ui/listing.js */ @@ -404,7 +404,8 @@ me.list.run();});this.dialog.show();},add_column:function(c){var w=$('
    Mandatory fields required in '+ wn.Application=Class.extend({init:function(){this.load_bootinfo();this.make_page_container();this.make_nav_bar();this.set_favicon();$(document).trigger('startup');wn.route();},load_bootinfo:function(){LocalDB.sync(wn.boot.docs);wn.control_panel=wn.boot.control_panel;if(wn.boot.error_messages) console.log(wn.boot.error_messages) if(wn.boot.server_messages) -msgprint(wn.boot.server_messages);this.set_globals();},set_globals:function(){profile=wn.boot.profile;user=wn.boot.profile.name;user_fullname=wn.user_info(user).fullname;user_defaults=profile.defaults;user_roles=profile.roles;user_email=profile.email;sys_defaults=wn.boot.sysdefaults;},make_page_container:function(){wn.container=new wn.views.Container();wn.views.make_403();wn.views.make_404();},make_nav_bar:function(){if(wn.user.name!='Guest'){wn.container.wntoolbar=new wn.ui.toolbar.Toolbar();}},logout:function(){var me=this;wn.call({method:'logout',callback:function(r){if(r.exc){console.log(r.exc);return;} +msgprint(wn.boot.server_messages);this.set_globals();},set_globals:function(){profile=wn.boot.profile;user=wn.boot.profile.name;user_fullname=wn.user_info(user).fullname;user_defaults=profile.defaults;user_roles=profile.roles;user_email=profile.email;sys_defaults=wn.boot.sysdefaults;},make_page_container:function(){wn.container=new wn.views.Container();wn.views.make_403();wn.views.make_404();},make_nav_bar:function(){if(wn.user.name!='Guest'){wn.container.wntoolbar=new wn.ui.toolbar.Toolbar();}},logout:function(){var me=this;me.logged_out=true;wn.call({method:'logout',callback:function(r){if(r.exc){console.log(r.exc);} me.redirect_to_login();}})},redirect_to_login:function(){window.location.hash='';window.location.reload();},set_favicon:function(){var link=$('link[type="image/x-icon"]').remove().attr("href");var favicon='\ \ ' @@ -882,8 +883,7 @@ wn.provide('erpnext.navbar');erpnext.navbar.Navbar=Class.extend({init:function() \
    \
    \ - ');$('.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\ + ');$('.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\ %(label)s',item));}} for(var i=0;i').click(function(){return false;});$parent_li.append('');} erpnext.header_link_settings(item);$parent_li.find('.dropdown-menu').append(repl('
  • \ @@ -896,5 +896,5 @@ $('footer').html(repl('\ ',wn.boot.website_settings));this.make_items();},make_items:function(){var items=wn.boot.website_menus for(var i=0;i%(label)s
  • ',item))}}}});erpnext.header_link_settings=function(item){item.route=item.url||item.custom_page;if(item.route.substr(0,4)=='http'){item.target='target="_blank"';}else{item.target='';item.route='#!'+item.route;}} + data-label="%(label)s">%(label)s',item))}}}});erpnext.header_link_settings=function(item){item.route=item.url||item.custom_page;if(item.route&&item.route.substr(0,4)=='http'){item.target='target="_blank"';}else{item.target='';item.route='#!'+item.route;}} $(document).bind('startup',function(){erpnext.footer=new erpnext.Footer();erpnext.navbar.navbar=new erpnext.navbar.Navbar();}) \ No newline at end of file