Merge branch 'latest' of github.com:webnotes/erpnext into latest
This commit is contained in:
commit
f361289147
@ -1079,14 +1079,14 @@ header .topbar .container {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.web-head-section {
|
||||
margin-bottom: 20px
|
||||
}
|
||||
|
||||
.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;
|
||||
|
@ -39,14 +39,14 @@ header .topbar .container {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.web-head-section {
|
||||
margin-bottom: 20px
|
||||
}
|
||||
|
||||
.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;
|
||||
|
28
erpnext/website/doctype/website_settings/website_settings.js
Normal file
28
erpnext/website/doctype/website_settings/website_settings.js
Normal file
@ -0,0 +1,28 @@
|
||||
// update parent select
|
||||
|
||||
$.extend(cur_frm.cscript, {
|
||||
|
||||
onload_post_render: function(doc) {
|
||||
// get labels of parent items
|
||||
var get_parent_options = function(table_field) {
|
||||
var items = getchildren('Top Bar Item', doc.name, table_field);
|
||||
var main_items = [''];
|
||||
for(var i in items) {
|
||||
var d = items[i];
|
||||
if(!d.parent_label) {
|
||||
main_items.push(d.label);
|
||||
}
|
||||
}
|
||||
return main_items.join('\n');
|
||||
}
|
||||
|
||||
// bind function to refresh fields
|
||||
// when "Parent Label" is select, it
|
||||
// should automatically update
|
||||
// options
|
||||
$(cur_frm.fields_dict['top_bar_items'].grid.get_field('parent_label').wrapper)
|
||||
.bind('refresh', function() {
|
||||
this.fieldobj.refresh_options(get_parent_options('top_bar_items'));
|
||||
});
|
||||
}
|
||||
});
|
@ -24,7 +24,7 @@ def init():
|
||||
webnotes.http_request = webnotes.auth.HTTPRequest()
|
||||
except webnotes.AuthenticationError, e:
|
||||
pass
|
||||
except webnotes.defs.IllegalDomainException, e:
|
||||
except webnotes.UnknownDomainError, e:
|
||||
print "Location: " + (webnotes.defs.redirect_404)
|
||||
|
||||
def respond():
|
||||
|
@ -216,13 +216,14 @@ throw new SyntaxError('JSON.parse');};}}());
|
||||
/*
|
||||
* lib/js/core.js
|
||||
*/
|
||||
if(!console){var console={log:function(txt){errprint(txt);}}}
|
||||
wn.versions.check();$(document).bind('ready',function(){var base=window.location.href.split('#')[0];$.each($('a[softlink!="false"]'),function(i,v){if(v.href.substr(0,base.length)==base){var path=(v.href.substr(base.length));if(path.substr(0,1)!='#'){v.href=base+'#'+path;}}});if(!wn.settings.no_history&&window.location.hash){wn.page.set(window.location.hash.substr(1));}});
|
||||
/*
|
||||
* lib/js/legacy/globals.js
|
||||
*/
|
||||
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 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;if(!console){var console={log:function(txt){errprint(txt);}}}
|
||||
var frms={};var cur_frm=null;var pscript={};var validated=true;var validation_message='';var tinymce_loaded=null;var cur_autosug=null;
|
||||
/*
|
||||
* lib/js/legacy/utils/datatype.js
|
||||
*/
|
||||
@ -935,9 +936,9 @@ 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:'3px solid #444'},toolbar_area:{padding:'3px 0px',display:'none',borderBottom:'1px solid #AAA'}}
|
||||
var def_ph_style={wrapper:{marginBottom:'16px',backgroundColor:'#EEE'},main_heading:{},sub_heading:{marginBottom:'8px',color:'#555',display:'none'},separator:{borderTop:'3px solid #777'},toolbar_area:{padding:'3px 0px',display:'none',borderBottom:'1px solid #AAA'}}
|
||||
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',{},'×');this.close_btn.onclick=function(){nav_obj.show_last_open();};if(main_text)this.main_head.innerHTML=main_text;if(sub_text)this.sub_head.innerHTML=sub_text;this.buttons={};this.buttons2={};}
|
||||
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',{},'×');this.close_btn.onclick=function(){nav_obj.show_last_open();};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;var btn=$btn(tb,label,fn,{marginRight:'4px'},(green?'primary':''));if(bold)$y(btn,{fontWeight:'bold'});this.buttons[label]=btn;$ds(this.toolbar_area);return btn;}
|
||||
PageHeader.prototype.clear_toolbar=function(){this.toolbar_area.innerHTML='';this.buttons={};}
|
||||
PageHeader.prototype.make_buttonset=function(){$(this.toolbar_area).buttonset();}
|
||||
@ -1979,7 +1980,7 @@ _f.FormGrid.prototype.make_columns=function(){var gl=fields_list[this.field.df.o
|
||||
gl.sort(function(a,b){return a.idx-b.idx});var p=this.field.perm;for(var i=0;i<gl.length;i++){if(p[this.field.df.permlevel]&&p[this.field.df.permlevel][READ]){this.insert_column(this.field.df.options,gl[i].fieldname,gl[i].fieldtype,gl[i].label,gl[i].width,gl[i].options,this.field.perm,gl[i].reqd);if(gl[i].hidden){this.set_column_disp(gl[i].fieldname,false);}}}}
|
||||
_f.FormGrid.prototype.set_column_label=function(fieldname,label){for(var i=0;i<this.head_row.cells.length;i++){var c=this.head_row.cells[i];if(c.fieldname==fieldname){c.innerHTML='<div class="grid_head_div">'+label+'</div>';c.cur_label=label;break;}}}
|
||||
_f.FormGrid.prototype.refresh=function(){var docset=getchildren(this.doctype,this.field.frm.docname,this.field.df.fieldname,this.field.frm.doctype);var data=[];for(var i=0;i<docset.length;i++){locals[this.doctype][docset[i].name].idx=i+1;data[data.length]=docset[i].name;}
|
||||
this.set_data(data);}
|
||||
this.set_data(data);if(_f.frm_dialog&&_f.frm_dialog.dialog.display&&_f.frm_dialog.cur_frm){_f.frm_dialog.cur_frm.refresh();}}
|
||||
_f.FormGrid.prototype.set_unsaved=function(){locals[cur_frm.doctype][cur_frm.docname].__unsaved=1;cur_frm.set_heading();}
|
||||
_f.FormGrid.prototype.insert_row=function(){var d=this.new_row_doc();var ci=_f.cur_grid_cell.cellIndex;var row_idx=_f.cur_grid_cell.row.rowIndex;d.idx=row_idx+1;for(var ri=row_idx;ri<this.tab.rows.length;ri++){var r=this.tab.rows[ri];if(r.docname)
|
||||
locals[this.doctype][r.docname].idx++;}
|
||||
|
@ -142,13 +142,14 @@ throw new SyntaxError('JSON.parse');};}}());
|
||||
/*
|
||||
* lib/js/core.js
|
||||
*/
|
||||
if(!console){var console={log:function(txt){errprint(txt);}}}
|
||||
wn.versions.check();$(document).bind('ready',function(){var base=window.location.href.split('#')[0];$.each($('a[softlink!="false"]'),function(i,v){if(v.href.substr(0,base.length)==base){var path=(v.href.substr(base.length));if(path.substr(0,1)!='#'){v.href=base+'#'+path;}}});if(!wn.settings.no_history&&window.location.hash){wn.page.set(window.location.hash.substr(1));}});
|
||||
/*
|
||||
* lib/js/legacy/globals.js
|
||||
*/
|
||||
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 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;if(!console){var console={log:function(txt){errprint(txt);}}}
|
||||
var frms={};var cur_frm=null;var pscript={};var validated=true;var validation_message='';var tinymce_loaded=null;var cur_autosug=null;
|
||||
/*
|
||||
* lib/js/legacy/utils/datatype.js
|
||||
*/
|
||||
@ -720,9 +721,9 @@ 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:'3px solid #444'},toolbar_area:{padding:'3px 0px',display:'none',borderBottom:'1px solid #AAA'}}
|
||||
var def_ph_style={wrapper:{marginBottom:'16px',backgroundColor:'#EEE'},main_heading:{},sub_heading:{marginBottom:'8px',color:'#555',display:'none'},separator:{borderTop:'3px solid #777'},toolbar_area:{padding:'3px 0px',display:'none',borderBottom:'1px solid #AAA'}}
|
||||
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',{},'×');this.close_btn.onclick=function(){nav_obj.show_last_open();};if(main_text)this.main_head.innerHTML=main_text;if(sub_text)this.sub_head.innerHTML=sub_text;this.buttons={};this.buttons2={};}
|
||||
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',{},'×');this.close_btn.onclick=function(){nav_obj.show_last_open();};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;var btn=$btn(tb,label,fn,{marginRight:'4px'},(green?'primary':''));if(bold)$y(btn,{fontWeight:'bold'});this.buttons[label]=btn;$ds(this.toolbar_area);return btn;}
|
||||
PageHeader.prototype.clear_toolbar=function(){this.toolbar_area.innerHTML='';this.buttons={};}
|
||||
PageHeader.prototype.make_buttonset=function(){$(this.toolbar_area).buttonset();}
|
||||
|
@ -1 +1 @@
|
||||
464
|
||||
478
|
Loading…
x
Reference in New Issue
Block a user