Pman.js
authorAlan Knowles <alan@roojs.com>
Thu, 6 Oct 2011 05:46:37 +0000 (13:46 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 6 Oct 2011 05:46:37 +0000 (13:46 +0800)
Pman.js

diff --git a/Pman.js b/Pman.js
index 8e9fa2b..95f36c5 100644 (file)
--- a/Pman.js
+++ b/Pman.js
@@ -814,14 +814,15 @@ Pman = new Roo.Document(
         // global supplied by master.html
         appDisabled = typeof(appDisabled) == 'undefined' ? [] : appDisabled;
         
-        if (typeof(obj.moduleName) != 'undefined')  {
-            if (appDisabled.indexOf(obj.moduleName) > -1) {
+        var modName = obj.modKey.split('-').pop(); // last part of modkey..
+        if (typeof(modName) != 'undefined')  {
+            if (appDisabled.indexOf(modName) > -1) {
                 return;
             }
             // now let's see if the user has the module disabled.
             // eg. Pman.Tab.AdminProjectManager
             // matches permission Admin.ProjectManager
-            var np = obj.moduleName.split('.').pop();
+            var np = modName.split('.').pop();
             obj.moduleOwner = '';
             Roo.each(this.appModules, function(nm) {
                 if (np.substring(0,nm.length) == nm) {