diff --git a/erpnext/website/js/topbar.js b/erpnext/website/js/topbar.js index b004a6f15a..a76d4efaf3 100644 --- a/erpnext/website/js/topbar.js +++ b/erpnext/website/js/topbar.js @@ -54,9 +54,7 @@ erpnext.navbar.Navbar = Class.extend({ for(var i=0;i\ %(label)s', item)); } @@ -120,7 +118,7 @@ erpnext.Footer = Class.extend({ // customize hard / soft links erpnext.header_link_settings = function(item) { item.route = item.url || item.custom_page; - if(item.route.substr(0,4)=='http') { + if(item.route && item.route.substr(0,4)=='http') { item.target = 'target="_blank"'; } else { item.target = ''; diff --git a/js/all-web.js b/js/all-web.js index f5eb4f6ae0..8c2e3370dd 100644 --- a/js/all-web.js +++ b/js/all-web.js @@ -883,8 +883,7 @@ wn.provide('erpnext.navbar');erpnext.navbar.Navbar=Class.extend({init:function() \ \ \ - ');$('.brand').attr('href','#!'+(wn.boot.website_settings.home_page||'Login Page'))},make_items:function(){var items=wn.boot.website_menus;for(var i=0;i\ + ');$('.brand').attr('href','#!'+(wn.boot.website_settings.home_page||'Login Page'))},make_items:function(){var items=wn.boot.website_menus;for(var i=0;i\ %(label)s',item));}} for(var i=0;i').click(function(){return false;});$parent_li.append('');} erpnext.header_link_settings(item);$parent_li.find('.dropdown-menu').append(repl('
  • \ @@ -897,5 +896,5 @@ $('footer').html(repl('\ ',wn.boot.website_settings));this.make_items();},make_items:function(){var items=wn.boot.website_menus for(var i=0;i%(label)s
  • ',item))}}}});erpnext.header_link_settings=function(item){item.route=item.url||item.custom_page;if(item.route.substr(0,4)=='http'){item.target='target="_blank"';}else{item.target='';item.route='#!'+item.route;}} + data-label="%(label)s">%(label)s',item))}}}});erpnext.header_link_settings=function(item){item.route=item.url||item.custom_page;if(item.route&&item.route.substr(0,4)=='http'){item.target='target="_blank"';}else{item.target='';item.route='#!'+item.route;}} $(document).bind('startup',function(){erpnext.footer=new erpnext.Footer();erpnext.navbar.navbar=new erpnext.navbar.Navbar();}) \ No newline at end of file