Merge branch 'shf_rename' of github.com:webnotes/erpnext into shf_rename
diff --git a/build.json b/build.json
index e9ecc18..79813e3 100644
--- a/build.json
+++ b/build.json
@@ -1,183 +1,19 @@
-[
- {
- "lib/js/core.min.js": [
- "lib/js/wn/class.js",
- "lib/js/wn/provide.js",
- "lib/js/wn/versions.js",
- "lib/js/wn/assets.js",
- "lib/js/wn/require.js",
- "lib/js/wn/dom.js",
- "lib/js/wn/model.js",
- "lib/js/wn/misc/tools.js",
- "lib/js/wn/misc/user.js",
- "lib/js/lib/json2.js",
- "lib/js/wn/router.js",
- "lib/js/wn/ui/listing.js",
- "lib/js/wn/views/container.js",
- "lib/js/wn/views/doclistview.js",
- "lib/js/wn/views/pageview.js",
- "lib/js/wn/views/formview.js",
- "lib/js/wn/views/reportview.js",
- "lib/js/wn/request.js",
- "lib/js/core.js"
- ]
- },
-
- {
- "lib/js/wn/ui/toolbar.min.js": [
- "lib/js/wn/ui/toolbar/selector_dialog.js",
- "lib/js/wn/ui/toolbar/new.js",
- "lib/js/wn/ui/toolbar/search.js",
- "lib/js/wn/ui/toolbar/report.js",
- "lib/js/wn/ui/toolbar/recent.js",
- "lib/js/wn/ui/toolbar/toolbar.js"
- ]
- },
-
- {
- "lib/js/legacy/report.compressed.js": [
- "lib/js/legacy/widgets/report_builder/report_builder.js",
- "lib/js/legacy/widgets/report_builder/datatable.js",
- "lib/js/legacy/widgets/report_builder/calculator.js"
- ]
- },
-
- {
- "css/all-web.css": [
- "lib/css/bootstrap/headings.css",
- "lib/css/bootstrap/buttons.css",
- "lib/css/bootstrap/navbar.css",
- "lib/css/bootstrap/dropdown.css",
- "lib/css/bootstrap/tooltip.css",
- "lib/css/legacy/body.css",
- "lib/css/legacy/messages.css",
- "lib/css/legacy/dialog.css",
- "lib/css/ui/common.css",
- "lib/css/ui/fonts.css",
- "lib/css/ui/list.css",
- "erpnext/startup/startup.css",
- "erpnext/website/css/website.css"
- ]
- },
-
- {
- "css/all-app.css": [
- "lib/css/bootstrap/headings.css",
- "lib/css/bootstrap/buttons.css",
- "lib/css/bootstrap/navbar.css",
- "lib/css/bootstrap/dropdown.css",
- "lib/css/bootstrap/tooltip.css",
- "lib/css/bootstrap/label.css",
- "lib/css/bootstrap/icons.css",
- "lib/css/bootstrap/popover.css",
- "lib/css/legacy/body.css",
- "lib/css/legacy/messages.css",
- "lib/css/legacy/forms.css",
- "lib/css/legacy/grid.css",
- "lib/css/legacy/listing.css",
- "lib/css/legacy/report.css",
- "lib/css/legacy/dialog.css",
- "lib/css/legacy/tabs.css",
- "lib/css/legacy/sidebar.css",
- "lib/css/Aristo/aristo.selected.css",
- "lib/css/ui/common.css",
- "lib/css/ui/list.css",
- "lib/css/ui/views.css",
- "lib/css/ui/fonts.css",
- "erpnext/startup/startup.css"
- ]
- },
-
- {
- "js/all-web.js": [
- "lib/js/lib/history/history.min.js:concat",
- "lib/js/lib/bootstrap.min.js:concat",
- "lib/js/core.min.js:concat",
- "lib/js/legacy/globals.js",
- "lib/js/legacy/utils/datatype.js",
- "lib/js/legacy/utils/datetime.js",
- "lib/js/legacy/utils/dom.js",
- "lib/js/legacy/utils/handler.js",
- "lib/js/legacy/utils/msgprint.js",
- "lib/js/wn/ui/appframe.js",
- "lib/js/wn/ui/dialog.js",
- "lib/js/legacy/widgets/dialog.js",
- "lib/js/wn/ui/listing.js",
- "lib/js/legacy/webpage/page_header.js",
- "lib/js/legacy/webpage/spinner.js",
- "lib/js/legacy/webpage/loaders.js",
- "lib/js/legacy/wn/widgets/footer.js",
- "lib/js/legacy/model/local_data.js",
- "lib/js/legacy/model/doclist.js",
- "lib/js/wn/app.js",
- "js/app.js",
- "erpnext/startup/startup.js",
- "erpnext/website/js/topbar.js"
- ]
- },
-
- {
- "js/all-app.js": [
- "lib/js/lib/history/history.min.js:concat",
- "lib/js/lib/jquery/jquery.ui.core.js:concat",
- "lib/js/lib/jquery/jquery.ui.datepicker.js:concat",
- "lib/js/lib/jquery/jquery.ui.autocomplete.js:concat",
- "lib/js/lib/tiny_mce_33/jquery.tinymce.js:concat",
- "lib/js/lib/bootstrap.min.js:concat",
- "lib/js/lib/sprintf.js",
- "lib/js/core.min.js:concat",
- "lib/js/legacy/globals.js",
- "lib/js/legacy/utils/datatype.js",
- "lib/js/legacy/utils/datetime.js",
- "lib/js/legacy/utils/dom.js",
- "lib/js/legacy/utils/handler.js",
- "lib/js/legacy/utils/msgprint.js",
- "lib/js/legacy/utils/printElement.js",
- "lib/js/legacy/widgets/form/fields.js",
- "lib/js/wn/ui/appframe.js",
- "lib/js/wn/ui/dialog.js",
- "lib/js/wn/ui/button.js",
- "lib/js/legacy/widgets/dialog.js",
- "lib/js/legacy/widgets/layout.js",
- "lib/js/legacy/widgets/tabbedpage.js",
- "lib/js/legacy/webpage/page_header.js",
- "lib/js/legacy/widgets/tags.js",
- "lib/js/legacy/widgets/export_query.js",
- "lib/js/legacy/webpage/search.js",
- "lib/js/legacy/webpage/spinner.js",
- "lib/js/legacy/webpage/error_console.js",
- "lib/js/legacy/webpage/loaders.js",
- "lib/js/legacy/webpage/uploader.js",
- "lib/js/legacy/wn/page_layout.js",
- "lib/js/legacy/wn/widgets/page_sidebar.js",
- "lib/js/legacy/wn/widgets/footer.js",
- "lib/js/legacy/model/local_data.js",
- "lib/js/legacy/model/doclist.js",
- "lib/js/wn/ui/toolbar.min.js:concat",
- "lib/js/wn/views/breadcrumbs.js",
- "lib/js/legacy/widgets/form/fields.js",
- "lib/js/legacy/widgets/form/form_dialog.js",
- "lib/js/legacy/widgets/form/form_header.js",
- "lib/js/legacy/widgets/form/form.js",
- "lib/js/legacy/widgets/form/form_fields.js",
- "lib/js/legacy/widgets/form/grid.js",
- "lib/js/legacy/widgets/form/form_grid.js",
- "lib/js/legacy/widgets/form/print_format.js",
- "lib/js/legacy/widgets/form/email.js",
- "lib/js/legacy/widgets/form/clientscriptAPI.js",
- "lib/js/legacy/widgets/form/form_comments.js",
- "lib/js/legacy/wn/widgets/form/sidebar.js",
- "lib/js/legacy/wn/widgets/form/comments.js",
- "lib/js/legacy/wn/widgets/form/attachments.js",
- "lib/js/legacy/wn/widgets/form/assign_to.js",
- "lib/js/wn/app.js",
- "js/app.js",
- "erpnext/startup/startup.js",
- "erpnext/startup/js/modules.js",
- "erpnext/startup/js/toolbar.js",
- "erpnext/startup/js/feature_setup.js"
- ]
- }
-
-]
-
+{
+ "css/all-web.css": [
+ "erpnext/startup/startup.css",
+ "erpnext/website/css/website.css"
+ ],
+ "css/all-app.css": [
+ "erpnext/startup/startup.css"
+ ],
+ "js/all-web.js": [
+ "erpnext/startup/startup.js",
+ "erpnext/website/js/topbar.js"
+ ],
+ "js/all-app.js": [
+ "erpnext/startup/startup.js",
+ "erpnext/startup/js/modules.js",
+ "erpnext/startup/js/toolbar.js",
+ "erpnext/startup/js/feature_setup.js"
+ ]
+}
\ No newline at end of file
diff --git a/css/all-app.css b/css/all-app.css
index e60ce80..033ca6e 100644
--- a/css/all-app.css
+++ b/css/all-app.css
@@ -1945,6 +1945,10 @@
padding: 0px;
}
+.layout-section {
+ padding: 15px;
+}
+
.layout-main-section {
width: 71%;
float: left;
@@ -2201,6 +2205,29 @@
width: 45px;
}
+/* sidebar */
+
+div.sidebar-comment-wrapper input {
+ width: 50%;
+}
+div.sidebar-comment-message {
+ margin-top: 8px;
+ color: #777;
+}
+
+div.sidebar-comment-text {
+ font-size: 12px;
+ font-weight: bold;
+ margin-top: 8px;
+ color: #444;
+}
+div.sidebar-comment-info {
+ color: #777;
+}
+
+/*
+ * lib/css/legacy/fields.css
+ */
/* Documents */
.frm_field_table {
@@ -2267,26 +2294,6 @@
background-color:#FEE;
}
-/* sidebar */
-
-div.sidebar-comment-wrapper input {
- width: 50%;
-}
-div.sidebar-comment-message {
- margin-top: 8px;
- color: #777;
-}
-
-div.sidebar-comment-text {
- font-size: 12px;
- font-weight: bold;
- margin-top: 8px;
- color: #444;
-}
-div.sidebar-comment-info {
- color: #777;
-}
-
/*
* lib/css/legacy/grid.css
*/
@@ -3494,7 +3501,7 @@
background: -ms-linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* IE10+ */
background: linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#cccccc',GradientType=0 ); /* IE6-9 */
- border-bottom: 1px solid #ccc;
+ border-bottom: 1px solid #aaa;
min-height: 1.2em;
}
diff --git a/css/all-web.css b/css/all-web.css
index be24b1e..53eb733 100644
--- a/css/all-web.css
+++ b/css/all-web.css
@@ -1425,6 +1425,10 @@
padding: 0px;
}
+.layout-section {
+ padding: 15px;
+}
+
.layout-main-section {
width: 71%;
float: left;
@@ -1847,6 +1851,39 @@
/*
+ * lib/css/ui/views.css
+ */
+
+.breadcrumbs {
+ color: #000000;
+}
+
+.breadcrumbs a {
+ color: #000000;
+}
+
+div.appframe-titlebar {
+ padding: 6px;
+ background: #eeeeee; /* Old browsers */
+ background: -moz-linear-gradient(top, #eeeeee 0%, #cccccc 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#eeeeee), color-stop(100%,#cccccc)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* Opera 11.10+ */
+ background: -ms-linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* IE10+ */
+ background: linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* W3C */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#cccccc',GradientType=0 ); /* IE6-9 */
+ border-bottom: 1px solid #aaa;
+ min-height: 1.2em;
+}
+
+div.appframe-toolbar {
+ padding: 4px;
+ background: #eeeeee;
+ border-top: 1px solid #f8f8f8;
+ border-bottom: 1px solid #ccc;
+}
+
+/*
* erpnext/startup/startup.css
*/
h1, h2, h3, h4, h5 {
diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.js b/erpnext/accounts/page/accounts_browser/accounts_browser.js
index 3c900e9..32ea4ed 100644
--- a/erpnext/accounts/page/accounts_browser/accounts_browser.js
+++ b/erpnext/accounts/page/accounts_browser/accounts_browser.js
@@ -21,6 +21,7 @@
// see ledger
pscript['onload_Accounts Browser'] = function(wrapper){
+ wn.require('lib/js/wn/ui/tree.js');
wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'));
wrapper.appframe.add_button('New Company', function() { newdoc('Company'); }, 'icon-plus');
@@ -57,11 +58,9 @@
}
pscript['onshow_Accounts Browser'] = function(wrapper){
- //wn.require('lib/js/wn/ui/tree.js');
-
// set route
var ctype = wn.get_route()[1] || 'Account';
- wrapper.appframe.$titlebar.find('.appframe-title').html('Chart of '+ctype+'s');
+ wrapper.appframe.title('Chart of '+ctype+'s');
if(erpnext.account_chart && erpnext.account_chart.ctype != ctype) {
wrapper.$company_select.change();
diff --git a/js/all-app.js b/js/all-app.js
index e78d0cd..1a2b2ae 100644
--- a/js/all-app.js
+++ b/js/all-app.js
@@ -925,14 +925,15 @@
wn.ui.AppFrame=Class.extend({init:function(parent){this.buttons={};this.$w=$('<div></div>').appendTo(parent);this.$titlebar=$('<div class="appframe-titlebar">\
<span class="appframe-title"></span>\
<span class="close">×</span>\
- </div>').appendTo(this.$w);this.$w.find('.close').click(function(){window.history.back();})},add_button:function(label,click,icon){if(!this.$w.find('.appframe-toolbar').length)
+ </div>').appendTo(this.$w);this.$w.find('.close').click(function(){window.history.back();})},title:function(txt){this.$titlebar.find('.appframe-title').text(txt);},add_button:function(label,click,icon){if(!this.$w.find('.appframe-toolbar').length)
this.$w.append('<div class="appframe-toolbar"></div>');args={label:label,icon:''};if(icon){args.icon='<i class="'+icon+'"></i>';}
this.buttons[label]=$(repl('<button class="btn btn-small">\
%(icon)s %(label)s</button>',args)).click(click).appendTo(this.$w.find('.appframe-toolbar'));return this.buttons[label];},clear_buttons:function(){this.$w.find('.appframe-toolbar').empty();}})
/*
* lib/js/wn/ui/dialog.js
*/
-wn.widgets.FieldGroup=function(){this.first_button=false;this.make_fields=function(body,fl){$y(this.body,{padding:'11px'});this.fields_dict={};for(var i=0;i<fl.length;i++){var df=fl[i];var div=$a(body,'div','',{margin:'6px 0px'})
+wn.widgets.FieldGroup=function(){this.first_button=false;this.make_fields=function(body,fl){if(!window.make_field){wn.require('lib/css/legacy/fields.css');wn.require('lib/js/legacy/widgets/form/fields.js');wn.require('lib/js/wn/ui/button.js');}
+$y(this.body,{padding:'11px'});this.fields_dict={};for(var i=0;i<fl.length;i++){var df=fl[i];var div=$a(body,'div','',{margin:'6px 0px'})
f=make_field(df,null,div,null);f.not_in_form=1;this.fields_dict[df.fieldname]=f
f.refresh();if(df.fieldtype=='Button'&&!this.first_button){$(f.input).addClass('btn-info');this.first_button=true;}}}
this.get_values=function(){var ret={};var errors=[];for(var key in this.fields_dict){var f=this.fields_dict[key];var v=f.get_value?f.get_value():null;if(f.df.reqd&&!v)
@@ -955,7 +956,8 @@
this.hide=function(){if(this.onhide)this.onhide();unfreeze();$dh(this.wrapper);this.display=false;cur_dialog=null;}
this.no_cancel=function(){this.appframe.$titlebar.find('.close').toggle(false);}
if(opts)this.make();}
-wn.widgets.Dialog.prototype=new wn.widgets.FieldGroup();$(document).bind('keydown',function(e){if(cur_dialog&&!cur_dialog.no_cancel_flag&&e.which==27){cur_dialog.hide();}});
+wn.widgets.Dialog.prototype=new wn.widgets.FieldGroup();wn.provide('wn.ui');wn.ui.Dialog=wn.widgets.Dialog
+$(document).bind('keydown',function(e){if(cur_dialog&&!cur_dialog.no_cancel_flag&&e.which==27){cur_dialog.hide();}});
/*
* lib/js/wn/ui/button.js
*/
diff --git a/js/all-web.js b/js/all-web.js
index b755396..dddbf1d 100644
--- a/js/all-web.js
+++ b/js/all-web.js
@@ -585,14 +585,15 @@
wn.ui.AppFrame=Class.extend({init:function(parent){this.buttons={};this.$w=$('<div></div>').appendTo(parent);this.$titlebar=$('<div class="appframe-titlebar">\
<span class="appframe-title"></span>\
<span class="close">×</span>\
- </div>').appendTo(this.$w);this.$w.find('.close').click(function(){window.history.back();})},add_button:function(label,click,icon){if(!this.$w.find('.appframe-toolbar').length)
+ </div>').appendTo(this.$w);this.$w.find('.close').click(function(){window.history.back();})},title:function(txt){this.$titlebar.find('.appframe-title').text(txt);},add_button:function(label,click,icon){if(!this.$w.find('.appframe-toolbar').length)
this.$w.append('<div class="appframe-toolbar"></div>');args={label:label,icon:''};if(icon){args.icon='<i class="'+icon+'"></i>';}
this.buttons[label]=$(repl('<button class="btn btn-small">\
%(icon)s %(label)s</button>',args)).click(click).appendTo(this.$w.find('.appframe-toolbar'));return this.buttons[label];},clear_buttons:function(){this.$w.find('.appframe-toolbar').empty();}})
/*
* lib/js/wn/ui/dialog.js
*/
-wn.widgets.FieldGroup=function(){this.first_button=false;this.make_fields=function(body,fl){$y(this.body,{padding:'11px'});this.fields_dict={};for(var i=0;i<fl.length;i++){var df=fl[i];var div=$a(body,'div','',{margin:'6px 0px'})
+wn.widgets.FieldGroup=function(){this.first_button=false;this.make_fields=function(body,fl){if(!window.make_field){wn.require('lib/css/legacy/fields.css');wn.require('lib/js/legacy/widgets/form/fields.js');wn.require('lib/js/wn/ui/button.js');}
+$y(this.body,{padding:'11px'});this.fields_dict={};for(var i=0;i<fl.length;i++){var df=fl[i];var div=$a(body,'div','',{margin:'6px 0px'})
f=make_field(df,null,div,null);f.not_in_form=1;this.fields_dict[df.fieldname]=f
f.refresh();if(df.fieldtype=='Button'&&!this.first_button){$(f.input).addClass('btn-info');this.first_button=true;}}}
this.get_values=function(){var ret={};var errors=[];for(var key in this.fields_dict){var f=this.fields_dict[key];var v=f.get_value?f.get_value():null;if(f.df.reqd&&!v)
@@ -615,7 +616,8 @@
this.hide=function(){if(this.onhide)this.onhide();unfreeze();$dh(this.wrapper);this.display=false;cur_dialog=null;}
this.no_cancel=function(){this.appframe.$titlebar.find('.close').toggle(false);}
if(opts)this.make();}
-wn.widgets.Dialog.prototype=new wn.widgets.FieldGroup();$(document).bind('keydown',function(e){if(cur_dialog&&!cur_dialog.no_cancel_flag&&e.which==27){cur_dialog.hide();}});
+wn.widgets.Dialog.prototype=new wn.widgets.FieldGroup();wn.provide('wn.ui');wn.ui.Dialog=wn.widgets.Dialog
+$(document).bind('keydown',function(e){if(cur_dialog&&!cur_dialog.no_cancel_flag&&e.which==27){cur_dialog.hide();}});
/*
* lib/js/legacy/widgets/dialog.js
*/