Repository: cloudstack
Updated Branches:
  refs/heads/4.4-forward d59cc1ff8 -> 431ea8e9c


CLOUDSTACK-6852: UI - add sharedFunction isModuleIncluded().


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/431ea8e9
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/431ea8e9
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/431ea8e9

Branch: refs/heads/4.4-forward
Commit: 431ea8e9c2a09d85b089cd5bf608eb0ab340f083
Parents: d59cc1f
Author: Jessica Wang <[email protected]>
Authored: Thu Jun 5 13:44:33 2014 -0700
Committer: Jessica Wang <[email protected]>
Committed: Thu Jun 5 13:47:10 2014 -0700

----------------------------------------------------------------------
 ui/scripts/sharedFunctions.js | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/431ea8e9/ui/scripts/sharedFunctions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js
index d206349..c51bc8d 100644
--- a/ui/scripts/sharedFunctions.js
+++ b/ui/scripts/sharedFunctions.js
@@ -1119,6 +1119,16 @@ cloudStack.converters = {
     }
 }
 
+function isModuleIncluded(moduleName) {    
+    for(var moduleIndex = 0; moduleIndex < cloudStack.modules.length; 
moduleIndex++) {
+        if (cloudStack.modules[moduleIndex] == moduleName) {
+            return true;            
+            break;            
+        }
+    }    
+    return false;
+}
+
 //data parameter passed to API call in listView
 
 function listViewDataProvider(args, data, options) {

Reply via email to