diff --git a/frappe/app.py b/frappe/app.py index ae1f14a9be..5a94f37546 100644 --- a/frappe/app.py +++ b/frappe/app.py @@ -180,7 +180,7 @@ def serve(port=8000, profile=False, site=None, sites_path='.'): from werkzeug.serving import run_simple if profile: - application = ProfilerMiddleware(application, sort_by=('tottime', 'calls')) + application = ProfilerMiddleware(application, sort_by=('cumtime', 'calls')) if not os.environ.get('NO_STATICS'): application = SharedDataMiddleware(application, { diff --git a/frappe/public/js/frappe/misc/common.js b/frappe/public/js/frappe/misc/common.js index 61426810cb..6835019857 100644 --- a/frappe/public/js/frappe/misc/common.js +++ b/frappe/public/js/frappe/misc/common.js @@ -77,6 +77,14 @@ frappe.get_abbr = function(txt, max_length) { return abbr || "?"; } +frappe.gravatars = {}; +frappe.get_gravatar = function(email_id) { + if(!frappe.gravatars[email_id]) { + frappe.gravatars[email_id] = "https://secure.gravatar.com/avatar/" + md5(email_id) + "?d=retro"; + } + return frappe.gravatars[email_id]; +} + // string commons function repl(s, dict) { diff --git a/frappe/public/js/frappe/misc/user.js b/frappe/public/js/frappe/misc/user.js index a9f745284e..10df069274 100644 --- a/frappe/public/js/frappe/misc/user.js +++ b/frappe/public/js/frappe/misc/user.js @@ -29,15 +29,6 @@ frappe.user_info = function(uid) { return user_info; } - -frappe.gravatars = {}; -frappe.get_gravatar = function(email_id) { - if(!frappe.gravatars[email_id]) { - frappe.gravatars[email_id] = "https://secure.gravatar.com/avatar/" + md5(email_id) + "?d=retro"; - } - return frappe.gravatars[email_id]; -} - frappe.ui.set_user_background = function(src, selector, style) { if(!selector) selector = "#page-desktop"; if(!style) style = "Fill Screen"; diff --git a/frappe/templates/includes/web_sidebar.html b/frappe/templates/includes/web_sidebar.html index 72ae277d9f..51209449f1 100644 --- a/frappe/templates/includes/web_sidebar.html +++ b/frappe/templates/includes/web_sidebar.html @@ -19,7 +19,7 @@ My Account {% for item in my_account_list -%} - {% if item.count or (not item.reference_doctype) %} + {% if item.count or (not item.reference_doctype) or item.show_always %}