diff --git a/build.json b/build.json index 67dcfba86f..8e37e432be 100644 --- a/build.json +++ b/build.json @@ -8,9 +8,15 @@ "lib/js/wn/require.js", "lib/js/wn/dom.js", "lib/js/wn/model.js", - "lib/js/wn/page.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" ] @@ -40,6 +46,7 @@ "lib/css/legacy/body.css", "lib/css/legacy/messages.css", "lib/css/legacy/dialog.css", + "lib/css/ui/container.css", "lib/css/bootstrap/headings.css", "lib/css/bootstrap/buttons.css", "lib/css/bootstrap/navbar.css", @@ -63,6 +70,7 @@ "lib/css/legacy/sidebar.css", "lib/css/Aristo/aristo.selected.css", "lib/css/ui/list.css", + "lib/css/ui/container.css", "lib/css/bootstrap/headings.css", "lib/css/bootstrap/buttons.css", "lib/css/bootstrap/navbar.css", @@ -89,11 +97,11 @@ "lib/js/legacy/utils/shortcut.js", "lib/js/legacy/widgets/form/fields.js", "lib/js/wn/ui/dialog.js", + "lib/js/wn/ui/button.js", "lib/js/legacy/widgets/dialog.js", "lib/js/wn/ui/listing.js", "lib/js/legacy/widgets/layout.js", "lib/js/legacy/webpage/page_header.js", - "lib/js/legacy/webpage/history.js", "lib/js/legacy/webpage/search.js", "lib/js/legacy/webpage/spinner.js", "lib/js/legacy/webpage/error_console.js", @@ -104,7 +112,6 @@ "lib/js/legacy/wn/widgets/footer.js", "lib/js/legacy/model/local_data.js", "lib/js/legacy/model/doclist.js", - "lib/js/legacy/webpage/body.js", "lib/js/legacy/app.js", "js/app.js", "erpnext/startup/startup.js", @@ -132,6 +139,7 @@ "lib/js/legacy/utils/printElement.js", "lib/js/legacy/widgets/form/fields.js", "lib/js/wn/ui/dialog.js", + "lib/js/wn/ui/button.js", "lib/js/legacy/widgets/dialog.js", "lib/js/legacy/widgets/listing.js", "lib/js/legacy/widgets/layout.js", @@ -139,7 +147,6 @@ "lib/js/legacy/webpage/page_header.js", "lib/js/legacy/widgets/tags.js", "lib/js/legacy/widgets/export_query.js", - "lib/js/legacy/webpage/history.js", "lib/js/legacy/webpage/search.js", "lib/js/legacy/webpage/spinner.js", "lib/js/legacy/webpage/error_console.js", @@ -152,7 +159,6 @@ "lib/js/legacy/model/local_data.js", "lib/js/legacy/model/doclist.js", "lib/js/wn/ui/toolbar.min.js:concat", - "lib/js/legacy/webpage/body.js", "lib/js/legacy/widgets/form/fields.js", "lib/js/legacy/widgets/form/form_container.js", "lib/js/legacy/widgets/form/form_header.js", diff --git a/css/all-app.css b/css/all-app.css index daaa33c13f..a0b76f663f 100644 --- a/css/all-app.css +++ b/css/all-app.css @@ -1711,6 +1711,24 @@ div.stat-bar { +/* + * lib/css/ui/container.css + */ +#body_div { + position: relative; +} + +.content { + width: 900px; + position: absolute; + left: 1000px; + -webkit-transition:all 0.5s ease-in-out; + -moz-transition:all 0.5s ease-in-out; + -o-transition:all 0.5s ease-in-out; + -ms-transition:all 0.5s ease-in-out; + transition:all 0.5s ease-in-out; +} + /* * lib/css/bootstrap/headings.css */ diff --git a/css/all-web.css b/css/all-web.css index 1f31763187..d0d890f1a6 100644 --- a/css/all-web.css +++ b/css/all-web.css @@ -393,6 +393,24 @@ div.dialog_row table td textarea { } +/* + * lib/css/ui/container.css + */ +#body_div { + position: relative; +} + +.content { + width: 900px; + position: absolute; + left: 1000px; + -webkit-transition:all 0.5s ease-in-out; + -moz-transition:all 0.5s ease-in-out; + -o-transition:all 0.5s ease-in-out; + -ms-transition:all 0.5s ease-in-out; + transition:all 0.5s ease-in-out; +} + /* * lib/css/bootstrap/headings.css */ diff --git a/erpnext/accounts/doctype/journal_voucher/listview.js b/erpnext/accounts/doctype/journal_voucher/listview.js index d8f295bd44..da344def89 100644 --- a/erpnext/accounts/doctype/journal_voucher/listview.js +++ b/erpnext/accounts/doctype/journal_voucher/listview.js @@ -1,4 +1,4 @@ -wn.doclistviews['Journal Voucher'] = wn.pages.ListView.extend({ +wn.doclistviews['Journal Voucher'] = wn.views.ListView.extend({ init: function(d) { this._super(d); this.fields = this.fields.concat([ diff --git a/erpnext/home/page/event_updates/event_updates.js b/erpnext/home/page/event_updates/event_updates.js index 084ff0c813..797d8e95c9 100644 --- a/erpnext/home/page/event_updates/event_updates.js +++ b/erpnext/home/page/event_updates/event_updates.js @@ -600,7 +600,7 @@ pscript.home_make_status = function() { // get values $c_page('home', 'event_updates', 'get_status_details', user, function(r,rt) { - //page_body.wntoolbar.set_new_comments(r.message.unread_messages); + //wn.container.wntoolbar.set_new_comments(r.message.unread_messages); // render online users pscript.online_users_obj.render(r.message.online_users); diff --git a/erpnext/selling/doctype/sales_order/listview.js b/erpnext/selling/doctype/sales_order/listview.js index bcdddc0297..4b55e2b1b0 100644 --- a/erpnext/selling/doctype/sales_order/listview.js +++ b/erpnext/selling/doctype/sales_order/listview.js @@ -1,5 +1,5 @@ // render -wn.doclistviews['Sales Order'] = wn.pages.ListView.extend({ +wn.doclistviews['Sales Order'] = wn.views.ListView.extend({ init: function(d) { this._super(d) this.fields = this.fields.concat([ diff --git a/erpnext/startup/js/complete_setup.js b/erpnext/startup/js/complete_setup.js index ac89affa5c..c643813a2d 100644 --- a/erpnext/startup/js/complete_setup.js +++ b/erpnext/startup/js/complete_setup.js @@ -85,7 +85,7 @@ erpnext.complete_setup = function() { wn.boot.user_info[user].fullname = user_fullname; d.hide(); $('header').toggle(true); - page_body.wntoolbar.set_user_name(); + wn.container.wntoolbar.set_user_name(); }); } diff --git a/erpnext/startup/js/toolbar.js b/erpnext/startup/js/toolbar.js index 7bf9c6a04e..eb3bff80a3 100644 --- a/erpnext/startup/js/toolbar.js +++ b/erpnext/startup/js/toolbar.js @@ -48,7 +48,7 @@ erpnext.toolbar.setup = function() { $('#toolbar-user').append('
  • Billing
  • ') } - $.extend(page_body.wntoolbar, { + $.extend(wn.container.wntoolbar, { set_new_comments: function(new_comments) { var navbar_nc = $('.navbar-new-comments'); if(new_comments && new_comments.length>0) { @@ -66,7 +66,7 @@ erpnext.toolbar.setup = function() { } }); - page_body.wntoolbar.set_new_comments(); + wn.container.wntoolbar.set_new_comments(); } erpnext.toolbar.add_modules = function() { diff --git a/erpnext/startup/startup.js b/erpnext/startup/startup.js index c00770c4d9..c00f09769c 100644 --- a/erpnext/startup/startup.js +++ b/erpnext/startup/startup.js @@ -114,7 +114,7 @@ var update_messages = function(reset) { function(r,rt) { if(!r.exc) { // This function is defined in toolbar.js - page_body.wntoolbar.set_new_comments(r.message.unread_messages); + wn.container.wntoolbar.set_new_comments(r.message.unread_messages); var show_in_circle = function(parent_id, msg) { var parent = $('#'+parent_id); @@ -139,7 +139,7 @@ var update_messages = function(reset) { } ); } else { - page_body.wntoolbar.set_new_comments(0); + wn.container.wntoolbar.set_new_comments(0); $('#unread_messages').toggle(false); } } diff --git a/erpnext/utilities/page/messages/messages.js b/erpnext/utilities/page/messages/messages.js index 7e74fef657..4cc7a522db 100644 --- a/erpnext/utilities/page/messages/messages.js +++ b/erpnext/utilities/page/messages/messages.js @@ -76,7 +76,7 @@ erpnext.messages = { // check for updates every 5 seconds if page is active refresh: function() { setTimeout(erpnext.messages.refresh, 10000); - if(page_body.cur_page_label != 'messages') return; + if(wn.container.page.label != 'messages') return; erpnext.messages.show(); }, get_contact: function() { diff --git a/js/all-app.js b/js/all-app.js index 1c970cea7f..3cbb55ad30 100644 --- a/js/all-app.js +++ b/js/all-app.js @@ -12,22 +12,6 @@ */ (function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('