From 6f8e9e951eb81fc9a3874a459a5e9466be137bfe Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 1 May 2012 13:41:44 +0530 Subject: [PATCH] website fixes --- .../doctype/style_settings/style_settings.py | 3 ++ erpnext/website/js/topbar.js | 34 ++++++++++++++----- js/all-app.js | 3 +- js/all-web.js | 21 +++++++----- js/app.js | 4 +-- 5 files changed, 44 insertions(+), 21 deletions(-) diff --git a/erpnext/website/doctype/style_settings/style_settings.py b/erpnext/website/doctype/style_settings/style_settings.py index db26a15e80..f47a427bae 100644 --- a/erpnext/website/doctype/style_settings/style_settings.py +++ b/erpnext/website/doctype/style_settings/style_settings.py @@ -25,6 +25,9 @@ class DocType: with open('erpnext/website/doctype/style_settings/custom_template.css', 'r') as f: temp = Template(f.read()) + if not self.doc.font_size: + self.doc.font_size = '13px' + self.doc.small_font_size = str(int(self.doc.font_size[:-2])-2) + 'px' self.doc.custom_css = temp.render(doc = self.doc) diff --git a/erpnext/website/js/topbar.js b/erpnext/website/js/topbar.js index 8caf8dcf1c..e6a6b59c4a 100644 --- a/erpnext/website/js/topbar.js +++ b/erpnext/website/js/topbar.js @@ -27,7 +27,7 @@ wn.provide('erpnext.navbar'); erpnext.navbar.Navbar = Class.extend({ init: function() { this.make(); - $('.brand').html(wn.boot.website_settings.brand_html); + $('.brand').html(wn.boot.website_settings.brand_html || sys_defaults.company); this.make_items(); $('.dropdown-toggle').dropdown(); }, @@ -54,9 +54,11 @@ erpnext.navbar.Navbar = Class.extend({ for(var i=0;i\ - %(label)s', item)) + %(label)s', item)); } } @@ -77,18 +79,23 @@ erpnext.navbar.Navbar = Class.extend({ }); $parent_li.append(''); } - item.route = item.url || item.custom_page; + erpnext.header_link_settings(item); $parent_li.find('.dropdown-menu').append(repl('
  • \ - %(label)s
  • ', item)) + %(label)s', item)) } } } }); - // footer erpnext.Footer = Class.extend({ init: function() { + if(!wn.boot.website_settings.copyright) { + wn.boot.website_settings.copyright = sys_defaults.company; + } + if(!wn.boot.website_settings.address) { + wn.boot.website_settings.address = ''; + } $('footer').html(repl('