summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2012-08-30 02:46:36 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2012-08-30 02:46:36 +0200
commitc1e949699ed371e7d1328885e9795c0b8736b3c0 (patch)
tree52aea9893247c499d0c000dee584fb8a893ea2a3 /js
parent4891d78b8d3c93761945b687c0ebb449f0a54b47 (diff)
cleanup
Diffstat (limited to 'js')
-rw-r--r--js/menu.js10
1 files changed, 1 insertions, 9 deletions
diff --git a/js/menu.js b/js/menu.js
index f24914dc9..32d528156 100644
--- a/js/menu.js
+++ b/js/menu.js
@@ -206,13 +206,7 @@ var t = t || function(app, string){ return string; }; // mock translation for lo
* @param node the MenuNode that should be created
*/
Menu.prototype.createNode = function(parentType, parentId, node){
- // if we pass the parentId 0 we assume the parent is the menu
- var parentNode;
- if(parentId === 0){
- parentNode = this;
- } else {
- parentNode = this._findNode(parentType, parentId);
- }
+ var parentNode = this._findNode(parentType, parentId);
parentNode._addChildNode(node);
parentNode._$htmlElement.append(node.render());
}
@@ -226,8 +220,6 @@ var t = t || function(app, string){ return string; }; // mock translation for lo
* @return the childelemnt or undefined if not found
*/
Menu.prototype.removeNode = function(type, id, removeDom){
- var nodeIndex;
- removeDom = removeDom || false;
for(var i=0; i<this._children.length; i++){
var child = this._children[i];
if(child._type === type && child._id === id){