diff --git a/erpnext/public/build.json b/erpnext/public/build.json index 7c049abc535..14a631fc08d 100644 --- a/erpnext/public/build.json +++ b/erpnext/public/build.json @@ -6,7 +6,6 @@ "public/js/website_utils.js" ], "js/erpnext.min.js": [ - "public/js/startup.js", "public/js/conf.js", "public/js/toolbar.js", "public/js/feature_setup.js", diff --git a/erpnext/public/js/startup.js b/erpnext/public/js/startup.js index f7b0d7adcd4..1c692f8a0ed 100644 --- a/erpnext/public/js/startup.js +++ b/erpnext/public/js/startup.js @@ -1,41 +1,7 @@ // Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors // License: GNU General Public License v3. See license.txt -var current_module; - -frappe.provide('erpnext.startup'); - -erpnext.startup.start = function() { - console.log(frappe._('Starting up...')); - $('#startup_div').html('Starting up...').toggle(true); - - erpnext.toolbar.setup(); - - if(frappe.boot.expires_on && in_list(user_roles, 'System Manager')) { - erpnext.startup.show_expiry_banner(); - } -} - -erpnext.startup.show_expiry_banner = function() { - var today = dateutil.str_to_obj(frappe.boot.server_date); - var expires_on = dateutil.str_to_obj(frappe.boot.expires_on); - var diff = dateutil.get_diff(expires_on, today); - var payment_link = ""+ - frappe._("Click here to buy subscription.")+""; - - var msg = ""; - if (0 <= diff && diff <= 10) { - var expiry_string = diff==0 ? "today" : repl("in %(diff)s day(s)", { diff: diff }); - msg = repl(frappe._('Your ERPNext subscription will')+' expire %(expiry_string)s. %(payment_link)s', - { expiry_string: expiry_string, payment_link: payment_link }); - } else if (diff < 0) { - msg = repl(frappe._('This ERPNext subscription')+''+frappe._('has expired')+'. %(payment_link)s', {payment_link: payment_link}); - } - - if(msg) frappe.ui.toolbar.show_banner(msg); -} - // start -$(document).bind('startup', function() { - erpnext.startup.start(); +$(document).on('startup', function() { + console.log(frappe._('Starting up...')); }); diff --git a/erpnext/public/js/toolbar.js b/erpnext/public/js/toolbar.js deleted file mode 100644 index c0645e39a97..00000000000 --- a/erpnext/public/js/toolbar.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors -// License: GNU General Public License v3. See license.txt - -/* toolbar settings */ -frappe.provide('erpnext.toolbar'); - -erpnext.toolbar.setup = function() { - // user - var $user = $('#toolbar-user'); - $user.append('