From a248adbd25c4cafd51c72893947a5b56be44c493 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Thu, 30 Aug 2012 00:23:13 +0200 Subject: [PATCH] fixed bug that prevented the expand button to be clicked --- js/menu.js | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/js/menu.js b/js/menu.js index cc770a587..05ec22be5 100644 --- a/js/menu.js +++ b/js/menu.js @@ -28,7 +28,16 @@ var t = t || function(app, string){ return string; }; // mock translation for lo MenuNodeType = { 'Feed': 0, 'Folder': 1, - 'Filter': 2 // used for starred items or new items + 'Starred': 2, + 'New': 3 + } + + // TODO: set paths for icons + MenuNodeTypeDefaultIcon = { + 'Feed': '', + 'Folder': '', + 'Starred': '', + 'New': '' } News.MenuNodeType = MenuNodeType; @@ -307,9 +316,10 @@ var t = t || function(app, string){ return string; }; // mock translation for lo if(data.icon !== undefined){ this._icon = data.icon; var iconCss = 'url("' + data.icon + '")'; - console.log(iconCss); this._$htmlElement.css('background-image', iconCss); - console.log(this._$htmlElement); + } else { + // if undefined, we check for default icons + this._icon = MenuNodeTypeDefaultIcon[this._type]; } if(data.unreadCount !== undefined){ @@ -340,13 +350,13 @@ var t = t || function(app, string){ return string; }; // mock translation for lo var $expandButton = $('