From daa76d848d52b59b11760ac630c2de5044af688b Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Wed, 29 Aug 2012 23:12:14 +0200 Subject: added click handlers and buttons for menu.js --- js/menu.js | 149 ++++++++++++++++++++++++++++++++++++++++++++------ tests/js/menuTests.js | 28 ++++++++++ 2 files changed, 160 insertions(+), 17 deletions(-) diff --git a/js/menu.js b/js/menu.js index 5f9095768..dabee8eea 100644 --- a/js/menu.js +++ b/js/menu.js @@ -11,12 +11,17 @@ /** * This file includes objects for creating and accessing the feed menu + * BEWARE: Recursion ahead! */ var News = News || {}; +var t = t || function(app, string){ return string; }; // mock translation for local testing (function(){ + /*########################################################################## + * MenuNodeType + *#########################################################################/ /** * Enumeration for menu items */ @@ -29,6 +34,9 @@ var News = News || {}; News.MenuNodeType = MenuNodeType; + /*########################################################################## + * Menu + *#########################################################################/ /** * This is the basic menu used to construct and maintain the menu * @param cls the css class of the element @@ -40,6 +48,7 @@ var News = News || {}; this._rendered = false; this._id = 0; this._$htmlElement = $('