[PORTAL-16 PORTAL-18] Widget ms; staging
[portal.git] / ecomp-portal-FE-common / client / app / directives / b2b-leftnav-ext / b2b-leftnav-ext.directive.js
index 7284e4d..b60ffb2 100644 (file)
@@ -1,68 +1,68 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-(function () {\r
-       /*\r
-        * Custom version of b2b-left-navigation directive:\r
-        * 1. Make parent menu a link if no child menus.\r
-        * 2. Add unique IDs to all items.\r
-        * 3. Hide icon if no child menus.\r
-        * 4. Add arrow toggle button.\r
-        * 5. Adjust the page on collapse/expand.\r
-        */\r
-    class B2BLeftMenu {\r
-        constructor($rootScope) {\r
-            this.templateUrl = 'app/directives/b2b-leftnav-ext/b2b-leftnav-ext.tpl.html';\r
-            this.restrict = 'EA';\r
-            this.$rootScope = $rootScope;\r
-            this.link = this._link.bind(this);\r
-            this.scope = {\r
-               menuData: '='\r
-            }\r
-        }\r
-        _link(scope) {\r
-               scope.idx = -1;\r
-            scope.itemIdx = -1;\r
-            scope.navIdx = -1;\r
-            scope.toggleNav = function (val,link) {\r
-                if (val === scope.idx) {\r
-                    scope.idx = -1;\r
-                    return;\r
-                }\r
-                scope.idx = val;\r
-            };\r
-            /*New function for ECOMP sdk*/\r
-            scope.toggleDrawer = function(showmenu){\r
-               scope.idx=-1; /*hide the sunmenus*/\r
-               if(showmenu){\r
-                               document.getElementById('page-content').style.paddingLeft = "50px";\r
-                       }\r
-                       else\r
-                               document.getElementById('page-content').style.paddingLeft = "230px";            \r
-            };\r
-            scope.liveLink = function (evt, val1, val2) {\r
-                scope.itemIdx = val1;\r
-                scope.navIdx = val2;\r
-                evt.stopPropagation();\r
-            };\r
-        }\r
-    }\r
-    angular.module('ecompApp').directive('leftMenuEcomp', ($rootScope) => new B2BLeftMenu($rootScope));\r
-})();\r
-\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+(function () {
+       /*
+        * Custom version of b2b-left-navigation directive:
+        * 1. Make parent menu a link if no child menus.
+        * 2. Add unique IDs to all items.
+        * 3. Hide icon if no child menus.
+        * 4. Add arrow toggle button.
+        * 5. Adjust the page on collapse/expand.
+        */
+    class B2BLeftMenu {
+        constructor($rootScope) {
+            this.templateUrl = 'app/directives/b2b-leftnav-ext/b2b-leftnav-ext.tpl.html';
+            this.restrict = 'EA';
+            this.$rootScope = $rootScope;
+            this.link = this._link.bind(this);
+            this.scope = {
+               menuData: '='
+            }
+        }
+        _link(scope) {
+               scope.idx = -1;
+            scope.itemIdx = -1;
+            scope.navIdx = -1;
+            scope.toggleNav = function (val,link) {
+                if (val === scope.idx) {
+                    scope.idx = -1;
+                    return;
+                }
+                scope.idx = val;
+            };
+            /*New function for ECOMP sdk*/
+            scope.toggleDrawer = function(showmenu){
+               scope.idx=-1; /*hide the sunmenus*/
+               if(showmenu){
+                               document.getElementById('page-content').style.paddingLeft = "50px";
+                       }
+                       else
+                               document.getElementById('page-content').style.paddingLeft = "230px";            
+            };
+            scope.liveLink = function (evt, val1, val2) {
+                scope.itemIdx = val1;
+                scope.navIdx = val2;
+                evt.stopPropagation();
+            };
+        }
+    }
+    angular.module('ecompApp').directive('leftMenuEcomp', ($rootScope) => new B2BLeftMenu($rootScope));
+})();
+