From 5d741a5752884cfa521c5d34c9fc52771738b06d Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 11 Feb 2010 01:32:58 +0530 Subject: [PATCH] menu.getItem --- build/js/ox.ui.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index 0d5b373d..9f3d9fff 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -1987,6 +1987,16 @@ requires } }; + that.getItem = function(id) { + var item; + $.each(that.menus, function(i, menu) { + item = menu.getItem(id); + if(!Ox.isUndefined(item)) + return false; + }); + return item; + }; + return that; }; @@ -2413,6 +2423,17 @@ requires }; + that.getItem = function(id) { + var _item; + $.each(this.items, function(i, item) { + if(item.options('id') == id) { + _item = item; + return false; + } + }); + return _item; + }; + that.hasEnabledItems = function() { var ret = false; $.each(that.items, function(i, item) {