diff --git a/conf/index.html b/conf/index.html
new file mode 100644
index 0000000000..9a6bd71f4f
--- /dev/null
+++ b/conf/index.html
@@ -0,0 +1,15 @@
+
+
+
+ ERPNext
+ {{ ajax_meta_tag }}
+
+
+
+
+ {{ body_html }}
+
diff --git a/css/legacy/default.css b/css/legacy/default.css
index 1541e0dda0..c5c66a0e1d 100644
--- a/css/legacy/default.css
+++ b/css/legacy/default.css
@@ -1,8 +1,7 @@
/*
-* lib/css/legacy/body.css
-*/
-html {
+ * lib/css/legacy/body.css
+ */html {
margin: 0px;
padding: 0px;
}
@@ -179,9 +178,8 @@ div.std-footer-item {
}
/*
-* lib/css/legacy/menus.css
-*/
-
+ * lib/css/legacy/menus.css
+ */
/******** Menus - menu.js ************/
ul.menu_toolbar {
@@ -233,9 +231,8 @@ div.dd_item {
}
div.dd_item_mo { background-color: #FE8; }
/*
-* lib/css/legacy/messages.css
-*/
-
+ * lib/css/legacy/messages.css
+ */
/* FLOATING MESSAGE */
.btn-img { cursor: pointer; }
@@ -284,9 +281,8 @@ div.notice {
font-size: 14px;
}
/*
-* lib/css/legacy/forms.css
-*/
-/* FORMS */
+ * lib/css/legacy/forms.css
+ *//* FORMS */
div.frm_print_wrapper {
@@ -508,9 +504,8 @@ div.sidebar-comment-info {
color: #777;
}
/*
-* lib/css/legacy/grid.css
-*/
-
+ * lib/css/legacy/grid.css
+ */
/* Grid */
@@ -633,9 +628,8 @@ div.sidebar-comment-info {
.gridDivSelected option { border: 0px; }
/*
-* lib/css/legacy/listing.css
-*/
-/* listing 2.0 */
+ * lib/css/legacy/listing.css
+ *//* listing 2.0 */
div.listing-more {
margin: 7px 0px 17px 0px;
@@ -693,9 +687,8 @@ div.srs_filter_area td {
/*
-* lib/css/legacy/report.css
-*/
-
+ * lib/css/legacy/report.css
+ */
/* Reports */
div.report_grid_area {
@@ -876,9 +869,8 @@ table.builder_tab td {
padding: 2px;
}
/*
-* lib/css/legacy/calendar.css
-*/
-/**** CALENDAR ****/
+ * lib/css/legacy/calendar.css
+ *//**** CALENDAR ****/
.caldiv {
position:absolute;
@@ -1051,9 +1043,8 @@ div.cal_event_hover {
}
/*
-* lib/css/legacy/autosuggest.css
-*/
-/*
+ * lib/css/legacy/autosuggest.css
+ *//*
================================================
autosuggest, inquisitor style
================================================
@@ -1146,9 +1137,8 @@ div.autosuggest ul em
}
/*
-* lib/css/legacy/dialog.css
-*/
-/***** Dialogs *******/
+ * lib/css/legacy/dialog.css
+ *//***** Dialogs *******/
div.dialog_wrapper {
position: absolute;
@@ -1227,9 +1217,8 @@ div.dialog_row table td textarea {
}
/*
-* lib/css/legacy/wntoolbar.css
-*/
-
+ * lib/css/legacy/wntoolbar.css
+ */
/* Recent */
div.status_flag {
@@ -1256,9 +1245,8 @@ div.status_flag {
.sprite-search { background-position: 0 -330px; }
.sprite-tools { background-position: 0 -396px; }
/*
-* lib/css/legacy/tabs.css
-*/
-
+ * lib/css/legacy/tabs.css
+ */
/******* TABS ********/
div.box_label_wrapper {
@@ -1318,9 +1306,8 @@ ul.box_tabs li.box_tab_selected a {
}
/*
-* lib/css/legacy/bw-icons.css
-*/
-
+ * lib/css/legacy/bw-icons.css
+ */
/** general icons **/
.wn-icon { background: url('lib/images/icons/icons.png'); width: 16px; height: 16px; cursor: pointer; }
@@ -1572,9 +1559,8 @@ ul.box_tabs li.box_tab_selected a {
/*
-* lib/css/legacy/sidebar.css
-*/
-div.psidebar-wrapper {
+ * lib/css/legacy/sidebar.css
+ */div.psidebar-wrapper {
margin: 0px 8px;
}
@@ -1624,9 +1610,8 @@ div.follower-list {
font-size: 11px;
}
/*
-* lib/css/legacy/bootstrap-buttons.css
-*/
-.btn.danger,
+ * lib/css/legacy/bootstrap-buttons.css
+ */.btn.danger,
.alert-message.danger,
.btn.danger:hover,
.alert-message.danger:hover,
diff --git a/js/core.min.js b/js/core.min.js
index b60a3b02ca..9045714dd4 100644
--- a/js/core.min.js
+++ b/js/core.min.js
@@ -1,53 +1,46 @@
/*
-* lib/js/wn/class.js
-*/
-
+ * lib/js/wn/class.js
+ */
(function(){var initializing=false,fnTest=/xyz/.test(function(){xyz;})?/\b_super\b/:/.*/;this.Class=function(){};Class.extend=function(prop){var _super=this.prototype;initializing=true;var prototype=new this();initializing=false;for(var name in prop){prototype[name]=typeof prop[name]=="function"&&typeof _super[name]=="function"&&fnTest.test(prop[name])?(function(name,fn){return function(){var tmp=this._super;this._super=_super[name];var ret=fn.apply(this,arguments);this._super=tmp;return ret;};})(name,prop[name]):prop[name];}
function Class(){if(!initializing&&this.init)
this.init.apply(this,arguments);}
Class.prototype=prototype;Class.prototype.constructor=Class;Class.extend=arguments.callee;return Class;};})();
/*
-* lib/js/wn/provide.js
-*/
-
-wn={}
+ * lib/js/wn/provide.js
+ */
+if(!window.wn)wn={}
wn.provide=function(namespace){var nsl=namespace.split('.');var l=nsl.length;var parent=window;for(var i=0;i'+val+'';}}
/*
-* lib/js/legacy/widgets/form/grid.js
-*/
-
+ * lib/js/legacy/widgets/form/grid.js
+ */
_f.cur_grid_cell=null;_f.Grid=function(parent){}
_f.Grid.prototype.init=function(parent,row_height){this.col_idx_by_name={}
this.alt_row_bg='#F2F2FF';this.row_height=row_height;if(!row_height)this.row_height='26px';this.make_ui(parent);this.insert_column('','','Int','Sr','50px','',[1,0,0]);if(this.oninit)this.oninit();keypress_observers.push(this);var me=this;$(cur_frm.wrapper).bind('render_complete',function(){me.set_ht();});}
@@ -328,9 +323,8 @@ _f.Grid.prototype.set_ht=function(){var max_ht=cint(0.37*screen.width);var ht=$(
ht=100;if(ht>max_ht)ht=max_ht;ht+=4;$y(this.wrapper,{height:ht+'px'});}
_f.Grid.prototype.refresh_row=function(ridx,docname){var row=this.tab.rows[ridx];row.docname=docname;row.is_newrow=false;for(var cidx=0;cidx1)?me.table_list:me.table_list[0];}
/*
-* lib/js/legacy/widgets/form/email.js
-*/
-
+ * lib/js/legacy/widgets/form/email.js
+ */
_e.email_as_field='email_id';_e.email_as_dt='Contact';_e.email_as_in='email_id,contact_name';sendmail=function(emailto,emailfrom,cc,subject,message,fmt,with_attachments){var fn=function(html){$c('webnotes.utils.email_lib.send_form',{'sendto':emailto,'sendfrom':emailfrom?emailfrom:'','cc':cc?cc:'','subject':subject,'message':replace_newlines(message),'body':html,'full_domain':wn.urllib.get_base_url(),'with_attachments':with_attachments?1:0,'dt':cur_frm.doctype,'dn':cur_frm.docname},function(r,rtxt){});}
_p.build(fmt,fn);}
_e.make=function(){var d=new Dialog(440,440,"Send Email");var email_go=function(){var emailfrom=d.widgets['From'].value;var emailto=d.widgets['To'].value;if(!emailfrom)
@@ -469,9 +461,8 @@ as.createList(as.aSug);}
$c('webnotes.utils.email_lib.get_contact_list',{'select':_e.email_as_field,'from':_e.email_as_dt,'where':_e.email_as_in,'txt':(last_txt?strip(last_txt):'%')},call_back);return;}
var sel;_e.dialog=d;}
/*
-* lib/js/legacy/widgets/form/clientscriptAPI.js
-*/
-
+ * lib/js/legacy/widgets/form/clientscriptAPI.js
+ */
$c_get_values=function(args,doc,dt,dn,user_callback){var call_back=function(r,rt){if(!r.message)return;if(user_callback)user_callback(r.message);var fl=args.fields.split(',');for(var i in fl){locals[dt][dn][fl[i]]=r.message[fl[i]];if(args.table_field)
refresh_field(fl[i],dn,args.table_field);else
refresh_field(fl[i]);}}
@@ -495,9 +486,8 @@ unhide_field=function(n){function _hide_field(n,hidden){var df=get_field(cur_frm
if(cur_frm){if(n.substr)_hide_field(n,0);else{for(var i in n)_hide_field(n[i],0)}}}
get_field_obj=function(fn){return cur_frm.fields_dict[fn];}
/*
-* lib/js/legacy/widgets/form/form_comments.js
-*/
-
+ * lib/js/legacy/widgets/form/form_comments.js
+ */
wn.widgets.form.comments={n_comments:{},comment_list:{},sync:function(dt,dn,r){var f=wn.widgets.form.comments;f.n_comments[dn]=r.n_comments;f.comment_list[dn]=r.comment_list;},add:function(input,dt,dn,callback){$c('webnotes.widgets.form.comments.add_comment',wn.widgets.form.comments.get_args(input,dt,dn),function(r,rt){wn.widgets.form.comments.update_comment_list(input,dt,dn);input.value='';callback(input,dt,dn);});},remove:function(dt,dn,comment_id,callback){$c('webnotes.widgets.form.comments.remove_comment',{id:comment_id,dt:dt,dn:dn},callback);},get_args:function(input,dt,dn){return{comment:input.value,comment_by:user,comment_by_fullname:user_fullname,comment_doctype:dt,comment_docname:dn}},update_comment_list:function(input,dt,dn){var f=wn.widgets.form.comments;f.n_comments[dn]=cint(f.n_comments[dn])+1;f.comment_list[dn]=add_lists([f.get_args(input,dt,dn)],f.comment_list[dn]);}}
CommentList=function(parent,dt,dn){this.wrapper=$a(parent,'div','',{margin:'16px'});this.input_area=$a(this.wrapper,'div','',{margin:'2px'});this.lst_area=$a(this.wrapper,'div','',{margin:'2px'});this.make_input();this.make_lst();this.dt;this.dn;}
CommentList.prototype.run=function(){this.lst.run();}
@@ -516,16 +506,14 @@ else{time=hr+':'+min+' AM'}}
this.cmt_dtl.innerHTML='On '+d[ri][10].substring(0,3)+' '+d[ri][9]+', '+d[ri][11]+' at '+time;this.cmt.innerHTML=replace_newlines(d[ri][1]);}
CommentItem.prototype.cmt_delete=function(cell,ri,ci,d){var me=this;if(d[ri][2]==user||d[ri][3]==user){del=$a(cell,'div','wn-icon ic-trash',{cursor:'pointer'});del.cmt_id=d[ri][0];del.onclick=function(){wn.widgets.form.comments.remove(cur_frm.doctype,cur_frm.docname,this.cmt_id,function(){me.comment.lst.run();})}}}
/*
-* lib/js/legacy/wn/widgets/form/sidebar.js
-*/
-
+ * lib/js/legacy/wn/widgets/form/sidebar.js
+ */
wn.widgets.form.sidebar={Sidebar:function(form){var me=this;this.form=form;this.opts={sections:[{title:'Actions',items:[{type:'link',label:'New',icon:'ic-doc_new',display:function(){return in_list(profile.can_create,form.doctype)},onclick:function(){new_doc(me.form.doctype)}},{type:'link',label:'Refresh',icon:'ic-playback_reload',onclick:function(){me.form.reload_doc()}},{type:'link',label:'Print',display:function(){return!(me.form.doc.__islocal||me.form.meta.allow_print);},icon:'ic-print',onclick:function(){me.form.print_doc()}},{type:'link',label:'Email',display:function(){return!(me.form.doc.__islocal||me.form.meta.allow_email);},icon:'ic-mail',onclick:function(){me.form.email_doc()}},{type:'link',label:'Copy',display:function(){return in_list(profile.can_create,me.form.doctype)&&!me.form.meta.allow_copy},icon:'ic-clipboard_copy',onclick:function(){me.form.copy_doc()}},{type:'link',label:'Delete',display:function(){return me.form.meta.allow_trash&&cint(me.form.doc.docstatus)!=2&&(!me.form.doc.__islocal)&&me.form.perm[0][CANCEL]},icon:'ic-trash',onclick:function(){me.form.savetrash()}}]},{title:'Assign To',render:function(wrapper){me.form.assign_to=new wn.widgets.form.sidebar.AssignTo(wrapper,me,me.form.doctype,me.form.docname);},display:function(){if(!me.form.doc.__local)return true;else return false;}},{title:'Attachments',render:function(wrapper){me.form.attachments=new wn.widgets.form.sidebar.Attachments(wrapper,me,me.form.doctype,me.form.docname);},display:function(){return me.form.meta.allow_attach}},{title:'Comments',render:function(wrapper){new wn.widgets.form.sidebar.Comments(wrapper,me,me.form.doctype,me.form.docname);},display:function(){return!me.form.doc.__islocal}},{title:'Tags',render:function(wrapper){me.form.taglist=new TagList(wrapper,me.form.doc._user_tags?me.form.doc._user_tags.split(','):[],me.form.doctype,me.form.docname,0,function(){});},display:function(){return!me.form.doc.__islocal}}]}
this.refresh=function(){var parent=this.form.page_layout.sidebar_area;if(!this.sidebar){$y(parent,{paddingTop:'37px'})
this.sidebar=new wn.widgets.PageSidebar(parent,this.opts);}else{this.sidebar.refresh();}}}}
/*
-* lib/js/legacy/wn/widgets/form/comments.js
-*/
-
+ * lib/js/legacy/wn/widgets/form/comments.js
+ */
wn.widgets.form.sidebar.Comments=function(parent,sidebar,doctype,docname){var me=this;this.sidebar=sidebar;this.doctype=doctype;this.docname=docname;this.refresh=function(){$c('webnotes.widgets.form.comments.get_comments',{dt:me.doctype,dn:me.docname,limit:5},function(r,rt){wn.widgets.form.comments.sync(me.doctype,me.docname,r);me.make_body();});}
this.make_body=function(){if(this.wrapper)this.wrapper.innerHTML='';else this.wrapper=$a(parent,'div','sidebar-comment-wrapper');this.input=$a_input(this.wrapper,'text');this.btn=$btn(this.wrapper,'Post',function(){me.add_comment()},{marginLeft:'8px'});this.render_comments()}
this.render_comments=function(){var f=wn.widgets.form.comments;var cl=f.comment_list[me.docname]
@@ -535,9 +523,8 @@ this.render_one_comment=function(det){$a(this.wrapper,'div','social sidebar-comm
this.add_comment=function(){if(!this.input.value)return;this.btn.set_working();wn.widgets.form.comments.add(this.input,me.doctype,me.docname,function(){me.btn.done_working();me.make_body();});}
this.refresh();}
/*
-* lib/js/legacy/wn/widgets/form/attachments.js
-*/
-
+ * lib/js/legacy/wn/widgets/form/attachments.js
+ */
wn.widgets.form.sidebar.Attachments=function(parent,sidebar,doctype,docname){var me=this;this.frm=sidebar.form;this.make=function(){if(this.wrapper)this.wrapper.innerHTML='';else this.wrapper=$a(parent,'div','sidebar-comment-wrapper');this.attach_wrapper=$a(this.wrapper,'div');if(this.frm.doc.__islocal){this.attach_wrapper.innerHTML='Attachments can be uploaded after saving'
return;}
var n=this.frm.doc.file_list?this.frm.doc.file_list.split('\n').length:0;if(n%(owner)s \
diff --git a/js/legacy/report.compressed.js b/js/legacy/report.compressed.js
index c2b32b65c6..9bc95f039a 100644
--- a/js/legacy/report.compressed.js
+++ b/js/legacy/report.compressed.js
@@ -1,8 +1,7 @@
/*
-* lib/js/legacy/widgets/report_builder/report_builder.js
-*/
-
+ * lib/js/legacy/widgets/report_builder/report_builder.js
+ */
_r.ReportContainer=function(){if(user=='Guest'){msgprint("Not Allowed");return;}
wn.require('lib/js/legacy/widgets/form/fields.js');this.wrapper=page_body.add_page("Report Builder",function(){});this.wrapper.className='layout_wrapper';var head_div=$a(this.wrapper,'div');this.rb_area=$a(this.wrapper,'div');$dh(this.wrapper);var me=this;this.rb_dict={};this.page_head=new PageHeader(head_div);$y(this.page_head.wrapper,{marginBottom:'0px'});var run_fn=function(){if(me.cur_rb){me.cur_rb.dt.start_rec=1;me.cur_rb.dt.run();}}
var runbtn=this.page_head.add_button('Run',run_fn,1,'ui-icon-circle-triangle-e',1);if(has_common(['Administrator','System Manager'],user_roles)){var savebtn=this.page_head.add_button('Save',function(){if(me.cur_rb)me.cur_rb.save_criteria();},0,'ui-icon-disk');var fn=function(){if(me.cur_rb){if(!me.cur_rb.current_loaded){msgprint("error:You must save the report before you can set Advanced features");return;}
@@ -149,9 +148,8 @@ this.all_fields[i].selected=1;}}
_r.ReportColumnPicker.prototype.add_field=function(f){if(!f.label)return;var by_default=(f.in_filter)?1:0;this.all_fields.push({selected:by_default,df:f,sel_idx:(by_default?this.sel_idx:0),selected_by_default:by_default});this.sel_idx+=by_default;}
_r.ReportColumnPicker.prototype.set=function(dt,label,selected){for(var i=0;i=100)comma=','
else comma=''
return bestguess+comma+' '+in_words(remainder);}else{return bestguess;}}
/*
-* lib/js/legacy/utils/browser_detect.js
-*/
-
+ * lib/js/legacy/utils/browser_detect.js
+ */
var appVer=navigator.appVersion.toLowerCase();var is_minor=parseFloat(appVer);var is_major=parseInt(is_minor);var iePos=appVer.indexOf('msie');if(iePos!=-1){is_minor=parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)))
is_major=parseInt(is_minor);}
var isIE=(iePos!=-1);var isIE6=(isIE&&is_major<=6);var isIE7=(isIE&&is_major>=7);if(/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){var isFF=1;var ffversion=new Number(RegExp.$1)
if(ffversion>=3)var isFF3=1;else if(ffversion>=2)var isFF2=1;else if(ffversion>=1)var isFF1=1;}
var isSafari=navigator.userAgent.indexOf('Safari')!=-1?1:0;var isChrome=navigator.userAgent.indexOf('Chrome')!=-1?1:0;
/*
-* lib/js/legacy/utils/datetime.js
-*/
-
+ * lib/js/legacy/utils/datetime.js
+ */
function same_day(d1,d2){if(d1.getFullYear()==d2.getFullYear()&&d1.getMonth()==d2.getMonth()&&d1.getDate()==d2.getDate())return true;else return false;}
var month_list=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];var month_last={1:31,2:28,3:31,4:30,5:31,6:30,7:31,8:31,9:30,10:31,11:30,12:31}
var month_list_full=['January','February','March','April','May','June','July','August','September','October','November','December'];var week_list=['Sun','Mon','Tue','Wed','Thu','Fri','Sat'];var week_list_full=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];function int_to_str(i,len){i=''+i;if(i.length","/":"?","\\":"|"}};function keyHandler(handleObj){if(typeof handleObj.data!=="string"){return;}
var origHandler=handleObj.handler,keys=handleObj.data.toLowerCase().split(" ");handleObj.handler=function(event){if(this!==event.target&&(/textarea|select/i.test(event.target.nodeName)||event.target.type==="text")){return;}
var special=event.type!=="keypress"&&jQuery.hotkeys.specialKeys[event.which],character=String.fromCharCode(event.which).toLowerCase(),key,modif="",possible={};if(event.altKey&&special!=="alt"){modif+="alt+";}
@@ -300,9 +292,8 @@ if(special){possible[modif+special]=true;}else{possible[modif+character]=true;po
for(var i=0,l=keys.length;i');});}
html.push('');html.push('');html.push(''+elementHtml+'
');html.push('');html.push('