summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-FE-common/client/app/directives
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-portal-FE-common/client/app/directives')
-rw-r--r--ecomp-portal-FE-common/client/app/directives/b2b-leftnav-ext/b2b-leftnav-ext.directive.js136
-rw-r--r--ecomp-portal-FE-common/client/app/directives/b2b-leftnav-ext/b2b-leftnav-ext.less6
-rw-r--r--ecomp-portal-FE-common/client/app/directives/b2b-leftnav-ext/b2b-leftnav-ext.tpl.html124
-rw-r--r--ecomp-portal-FE-common/client/app/directives/file-upload/file-upload.directive.js78
-rw-r--r--ecomp-portal-FE-common/client/app/directives/left-menu/left-menu.directive.js180
-rw-r--r--ecomp-portal-FE-common/client/app/directives/left-menu/left-menu.tpl.html44
-rw-r--r--ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select.directive.js226
-rw-r--r--ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select.tpl.html72
-rw-r--r--ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select2.directive.js226
-rw-r--r--ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select2.tpl.html72
-rw-r--r--ecomp-portal-FE-common/client/app/directives/right-click/ng-right-click-directive.js64
11 files changed, 614 insertions, 614 deletions
diff --git a/ecomp-portal-FE-common/client/app/directives/b2b-leftnav-ext/b2b-leftnav-ext.directive.js b/ecomp-portal-FE-common/client/app/directives/b2b-leftnav-ext/b2b-leftnav-ext.directive.js
index 7284e4db..b60ffb27 100644
--- a/ecomp-portal-FE-common/client/app/directives/b2b-leftnav-ext/b2b-leftnav-ext.directive.js
+++ b/ecomp-portal-FE-common/client/app/directives/b2b-leftnav-ext/b2b-leftnav-ext.directive.js
@@ -1,68 +1,68 @@
-/*-
- * ================================================================================
- * 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));
-})();
-
+/*-
+ * ================================================================================
+ * 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));
+})();
+
diff --git a/ecomp-portal-FE-common/client/app/directives/b2b-leftnav-ext/b2b-leftnav-ext.less b/ecomp-portal-FE-common/client/app/directives/b2b-leftnav-ext/b2b-leftnav-ext.less
index 91a10aa2..c6e2d6d3 100644
--- a/ecomp-portal-FE-common/client/app/directives/b2b-leftnav-ext/b2b-leftnav-ext.less
+++ b/ecomp-portal-FE-common/client/app/directives/b2b-leftnav-ext/b2b-leftnav-ext.less
@@ -1,4 +1,4 @@
-.b2b-nav-menu .b2b-subnav-container li{
- background-color:white;
- z-index:10;
+.b2b-nav-menu .b2b-subnav-container li{
+ background-color:white;
+ z-index:10;
} \ No newline at end of file
diff --git a/ecomp-portal-FE-common/client/app/directives/b2b-leftnav-ext/b2b-leftnav-ext.tpl.html b/ecomp-portal-FE-common/client/app/directives/b2b-leftnav-ext/b2b-leftnav-ext.tpl.html
index 240c8c9b..9fa796c7 100644
--- a/ecomp-portal-FE-common/client/app/directives/b2b-leftnav-ext/b2b-leftnav-ext.tpl.html
+++ b/ecomp-portal-FE-common/client/app/directives/b2b-leftnav-ext/b2b-leftnav-ext.tpl.html
@@ -1,62 +1,62 @@
-<!--
- ================================================================================
- 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.
- ================================================================================
- -->
-<div class="b2b-nav-menu" id="left-menu-main-div" ng-init="(showmenu = true)" ng-class="{false: 'left-menu-collapsed'}[showmenu]">
- <div class="b2b-subnav-container" id="left-menu-subnav-container">
- <ul class="b2b-subnav-content" id="left-menu-subnav-content">
- <li id="left-menu-subnav-content-li">
- <div ng-class="{true: 'leftmenu-arrow-expand', false: 'leftmenu-arrow-collapse'}[showmenu]" id="left-menu-arrow-toggle-div">
- <a ng-click="toggleDrawer(showmenu);(showmenu = !showmenu) " class="text-right" id="left-menu-arrow-toggle-anchor">
- <i ng-class="{true: 'icon-controls-left', false: 'icon-controls-right'}[showmenu]" id="left-menuf-arrow-toggle-icon">&nbsp;</i>
- </a>
- </div>
- </li>
- <li ng-repeat="menu in menuData" ui-sref="{{menu.state}}" id="left-menu-li-{{menu.name.split(' ').join('-')}}">
- <span ng-class="{true: 'menu-icon', false: 'menu-icon-collapse'}[showmenu]"
- id="left-menu-span-{{menu.name.split(' ').join('-')}}">
- <span class="{{menu.imageSrc}}" id="icon-image-{{menu.name.split(' ').join('-')}}"></span>
- </span>
- <a ng-class="{expand: isOpen($index)}" ng-if="showmenu" title="{{menu.name}}"
- aria-label="{{menu.name}}" aria-expanded="{{(idx==$index)?true:false;}}"
- href="javascript:void(0);" id="parent-item-{{menu.name.split(' ').join('-')}}">
- {{menu.name}}
- <i aria-hidden="true" ng-if="(menu.menuItems.length > 0)"
- class="b2b-icon-primary-plus-minus"
- ng-class="idx==$index ? 'icon-primary-expanded' : 'icon-primary-collapsed'"></i>
- </a>
- <div role="region" aria-hidden="{{(isOpen($index))?false:true;}}"
- id="left-menu-child-div-{{menu.name.split(' ').join('-')}}">
- <ul ng-class="{expand: idx==$index}"
- id="left-menu-child-ul-{{menu.name.split(' ').join('-')}}">
- <li ng-repeat="menuItem in menu.menuItems"
- ng-click="liveLink($event, $index, $parent.$index)"
- id="left-menu-child-li-{{menuItem.name.split(' ').join('-')}}-{{menu.name.split(' ').join('-')}}">
- <a ng-class="{active: itemIdx==$index && navIdx==$parent.$index}"
- aria-hidden="{{!(idx==$parent.$index)}}" aria-label="{{menuItem.name}}"
- title="{{menuItem.name}}" href="{{menuItem.href}}"
- tabindex="{{(idx==$parent.$index)?0:-1;}}"
- id="child-item-{{menuItem.name.split(' ').join('-')}}">{{menuItem.name}}
- </a>
- </li>
- </ul>
- </div>
- </li>
- </ul>
- </div>
-</div>
+<!--
+ ================================================================================
+ 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.
+ ================================================================================
+ -->
+<div class="b2b-nav-menu" id="left-menu-main-div" ng-init="(showmenu = true)" ng-class="{false: 'left-menu-collapsed'}[showmenu]">
+ <div class="b2b-subnav-container" id="left-menu-subnav-container">
+ <ul class="b2b-subnav-content" id="left-menu-subnav-content">
+ <li id="left-menu-subnav-content-li">
+ <div ng-class="{true: 'leftmenu-arrow-expand', false: 'leftmenu-arrow-collapse'}[showmenu]" id="left-menu-arrow-toggle-div">
+ <a ng-click="toggleDrawer(showmenu);(showmenu = !showmenu) " class="text-right" id="left-menu-arrow-toggle-anchor">
+ <i ng-class="{true: 'icon-controls-left', false: 'icon-controls-right'}[showmenu]" id="left-menuf-arrow-toggle-icon">&nbsp;</i>
+ </a>
+ </div>
+ </li>
+ <li ng-repeat="menu in menuData" ui-sref="{{menu.state}}" id="left-menu-li-{{menu.name.split(' ').join('-')}}">
+ <span ng-class="{true: 'menu-icon', false: 'menu-icon-collapse'}[showmenu]"
+ id="left-menu-span-{{menu.name.split(' ').join('-')}}">
+ <span class="{{menu.imageSrc}}" id="icon-image-{{menu.name.split(' ').join('-')}}"></span>
+ </span>
+ <a ng-class="{expand: isOpen($index)}" ng-if="showmenu" title="{{menu.name}}"
+ aria-label="{{menu.name}}" aria-expanded="{{(idx==$index)?true:false;}}"
+ href="javascript:void(0);" id="parent-item-{{menu.name.split(' ').join('-')}}">
+ {{menu.name}}
+ <i aria-hidden="true" ng-if="(menu.menuItems.length > 0)"
+ class="b2b-icon-primary-plus-minus"
+ ng-class="idx==$index ? 'icon-primary-expanded' : 'icon-primary-collapsed'"></i>
+ </a>
+ <div role="region" aria-hidden="{{(isOpen($index))?false:true;}}"
+ id="left-menu-child-div-{{menu.name.split(' ').join('-')}}">
+ <ul ng-class="{expand: idx==$index}"
+ id="left-menu-child-ul-{{menu.name.split(' ').join('-')}}">
+ <li ng-repeat="menuItem in menu.menuItems"
+ ng-click="liveLink($event, $index, $parent.$index)"
+ id="left-menu-child-li-{{menuItem.name.split(' ').join('-')}}-{{menu.name.split(' ').join('-')}}">
+ <a ng-class="{active: itemIdx==$index && navIdx==$parent.$index}"
+ aria-hidden="{{!(idx==$parent.$index)}}" aria-label="{{menuItem.name}}"
+ title="{{menuItem.name}}" href="{{menuItem.href}}"
+ tabindex="{{(idx==$parent.$index)?0:-1;}}"
+ id="child-item-{{menuItem.name.split(' ').join('-')}}">{{menuItem.name}}
+ </a>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ul>
+ </div>
+</div>
diff --git a/ecomp-portal-FE-common/client/app/directives/file-upload/file-upload.directive.js b/ecomp-portal-FE-common/client/app/directives/file-upload/file-upload.directive.js
index bfedcd75..bab1fcec 100644
--- a/ecomp-portal-FE-common/client/app/directives/file-upload/file-upload.directive.js
+++ b/ecomp-portal-FE-common/client/app/directives/file-upload/file-upload.directive.js
@@ -1,39 +1,39 @@
-/*-
- * ================================================================================
- * 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.
- * ================================================================================
- */
-/**
- * Created by Rui Lu on 12/12/16.
- */
-'use strict';
-
-angular.module('ecompApp').directive('fileModel', [ '$parse', function($parse) {
- return {
- restrict : 'A',
- link : function(scope, element, attrs) {
- var model = $parse(attrs.fileModel);
- var modelSetter = model.assign;
-
- element.bind('change', function() {
- scope.$apply(function() {
- modelSetter(scope, element[0].files[0]);
- });
- });
- }
- };
-} ]);
+/*-
+ * ================================================================================
+ * 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.
+ * ================================================================================
+ */
+/**
+ * Created by Rui Lu on 12/12/16.
+ */
+'use strict';
+
+angular.module('ecompApp').directive('fileModel', [ '$parse', function($parse) {
+ return {
+ restrict : 'A',
+ link : function(scope, element, attrs) {
+ var model = $parse(attrs.fileModel);
+ var modelSetter = model.assign;
+
+ element.bind('change', function() {
+ scope.$apply(function() {
+ modelSetter(scope, element[0].files[0]);
+ });
+ });
+ }
+ };
+} ]);
diff --git a/ecomp-portal-FE-common/client/app/directives/left-menu/left-menu.directive.js b/ecomp-portal-FE-common/client/app/directives/left-menu/left-menu.directive.js
index 98979e2c..e481f4be 100644
--- a/ecomp-portal-FE-common/client/app/directives/left-menu/left-menu.directive.js
+++ b/ecomp-portal-FE-common/client/app/directives/left-menu/left-menu.directive.js
@@ -1,90 +1,90 @@
-/*-
- * ================================================================================
- * 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.
- * ================================================================================
- */
-/**
- * Created by nnaffar on 1/28/16.
- */
-(function () {
- class LeftMenu {
- constructor($rootScope, userbarUpdateService,notificationService,auditLogService) {
- this.templateUrl = 'app/directives/left-menu/left-menu.tpl.html';
- this.restrict = 'AE';
- this.$rootScope = $rootScope;
- this.userbarUpdateService = userbarUpdateService;
- this.notificationService = notificationService;
- this.auditLogService= auditLogService;
- this.link = this._link.bind(this);
- this.scope = {
- sidebarModel: '='
- }
- }
- _link(scope) {
- let init = () => {
- scope.isOpen = true;
- };
-
- init();
-
- scope.refreshOnlineUsers = () => {
- this.userbarUpdateService.setRefreshCount(this.userbarUpdateService.maxCount);
- };
-
- scope.refreshNotification = () => {
- this.notificationService.setRefreshCount(this.notificationService.maxCount);
- };
-
- scope.toggleSidebar = () => {
- scope.isOpen = !scope.isOpen;
- if(scope.isOpen==true)
- setContentPos(1);
- else
- setContentPos(0);
- };
- scope.auditLog =(name) => {
- this.auditLogService.storeAudit(1,'leftMenu',name);
- };
-
-
- scope.isBrowserInternetExplorer = false;
- scope.browserName = bowser.name;
-
- if (bowser.msie || bowser.msedge) {
- scope.isBrowserInternetExplorer = true;
- } else {
- scope.isBrowserInternetExplorer = false;
- }
-
-
- this.$rootScope.$on('$stateChangeStart', () => {
- scope.isOpen = true;
- });
- }
- }
- angular.module('ecompApp').directive('leftMenu', ($rootScope,userbarUpdateService,notificationService,auditLogService) => new LeftMenu($rootScope,userbarUpdateService,notificationService,auditLogService));
-})();
-
-function setContentPos(open) {
- // console.log("*******************************************");
- if(open==1){
- $("#page-content" ).css( "padding-left", "210px" );
- }else{
- $("#page-content" ).css( "padding-left", "50px" );
- }
-
-}
+/*-
+ * ================================================================================
+ * 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.
+ * ================================================================================
+ */
+/**
+ * Created by nnaffar on 1/28/16.
+ */
+(function () {
+ class LeftMenu {
+ constructor($rootScope, userbarUpdateService,notificationService,auditLogService) {
+ this.templateUrl = 'app/directives/left-menu/left-menu.tpl.html';
+ this.restrict = 'AE';
+ this.$rootScope = $rootScope;
+ this.userbarUpdateService = userbarUpdateService;
+ this.notificationService = notificationService;
+ this.auditLogService= auditLogService;
+ this.link = this._link.bind(this);
+ this.scope = {
+ sidebarModel: '='
+ }
+ }
+ _link(scope) {
+ let init = () => {
+ scope.isOpen = true;
+ };
+
+ init();
+
+ scope.refreshOnlineUsers = () => {
+ this.userbarUpdateService.setRefreshCount(this.userbarUpdateService.maxCount);
+ };
+
+ scope.refreshNotification = () => {
+ this.notificationService.setRefreshCount(this.notificationService.maxCount);
+ };
+
+ scope.toggleSidebar = () => {
+ scope.isOpen = !scope.isOpen;
+ if(scope.isOpen==true)
+ setContentPos(1);
+ else
+ setContentPos(0);
+ };
+ scope.auditLog =(name) => {
+ this.auditLogService.storeAudit(1,'leftMenu',name);
+ };
+
+
+ scope.isBrowserInternetExplorer = false;
+ scope.browserName = bowser.name;
+
+ if (bowser.msie || bowser.msedge) {
+ scope.isBrowserInternetExplorer = true;
+ } else {
+ scope.isBrowserInternetExplorer = false;
+ }
+
+
+ this.$rootScope.$on('$stateChangeStart', () => {
+ scope.isOpen = true;
+ });
+ }
+ }
+ angular.module('ecompApp').directive('leftMenu', ($rootScope,userbarUpdateService,notificationService,auditLogService) => new LeftMenu($rootScope,userbarUpdateService,notificationService,auditLogService));
+})();
+
+function setContentPos(open) {
+ // console.log("*******************************************");
+ if(open==1){
+ $("#page-content" ).css( "padding-left", "210px" );
+ }else{
+ $("#page-content" ).css( "padding-left", "50px" );
+ }
+
+}
diff --git a/ecomp-portal-FE-common/client/app/directives/left-menu/left-menu.tpl.html b/ecomp-portal-FE-common/client/app/directives/left-menu/left-menu.tpl.html
index 4478bc8f..f43f75ad 100644
--- a/ecomp-portal-FE-common/client/app/directives/left-menu/left-menu.tpl.html
+++ b/ecomp-portal-FE-common/client/app/directives/left-menu/left-menu.tpl.html
@@ -1,22 +1,22 @@
-<!--
- ================================================================================
- 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.
- ================================================================================
- -->
- <div class="left-menu-div">
- <left-menu-ecomp menu-data="sidebarModel.navItems"></left-menu-ecomp>
- </div>
+<!--
+ ================================================================================
+ 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.
+ ================================================================================
+ -->
+ <div class="left-menu-div">
+ <left-menu-ecomp menu-data="sidebarModel.navItems"></left-menu-ecomp>
+ </div>
diff --git a/ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select.directive.js b/ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select.directive.js
index fb56d438..f73793be 100644
--- a/ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select.directive.js
+++ b/ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select.directive.js
@@ -1,113 +1,113 @@
-/*-
- * ================================================================================
- * 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.
- * ================================================================================
- */
-/**
- * Created by nnaffar on 12/21/15.+
- */
-angular.module('ecompApp')
- .directive('multipleSelect', function ($window) {
- return {
- restrict: 'E',
- templateUrl: 'app/directives/multiple-select/multiple-select.tpl.html',
- scope: {
- onChange: '&',
- nameAttr: '@',
- valueAttr: '@',
- ngModel: '=',
- placeholder: '@',
- uniqueData: '@?',
- onDropdownClose: '&?'
- },
- link: function(scope, elm, attrs){
- scope.isExpanded = false;
-
- scope.isDisabled = !scope.ngModel || !scope.ngModel.length;
- scope.$watch('ngModel', function(newVal){
- scope.isDisabled = !newVal || !newVal.length;
- });
-
-
- let startListening = () => {
- console.log('listening on $window!');
- angular.element($window).on('click', function () {
- stopListening();
- });
-
- angular.element('multiple-select').on('click', function(e) {
- if($(e.target).closest('multiple-select')[0].attributes['unique-data'].value === attrs.uniqueData){
- console.log('ignored that..:', attrs.uniqueData);
- e.stopPropagation();
- }else{
- console.log('shouldnt ignore, close expanded!:', attrs.uniqueData);
- scope.isExpanded = false;
- scope.$applyAsync();
- }
- });
- };
-
- let stopListening = function() {
- if(scope.onDropdownClose){
- scope.onDropdownClose();
- }
- scope.isExpanded = false;
- scope.$applyAsync();
- console.log('stop listening on $window and multiple-element!');
- angular.element($window).off('click');
- angular.element('multiple-select').off('click');
- };
-
- scope.showCheckboxes = function(){
- scope.isExpanded = !scope.isExpanded;
- if(scope.isExpanded){
- startListening();
- }else{
- stopListening();
- if(scope.onDropdownClose){
- scope.onDropdownClose();
- }
- }
- };
-
- scope.onCheckboxClicked = function() {
- console.log('checkbox clicked; unique data: ',attrs.uniqueData);
- if(scope.onChange) {
- scope.onChange();
- }
- }
-
- scope.getTitle = function(){
- var disp = '';
- if(!scope.ngModel || !scope.ngModel.length) {
- return disp;
- }
- scope.ngModel.forEach(function(item){
- if(item[scope.valueAttr]){
- disp+=item[scope.nameAttr] + ',';
- }
- });
- if(disp!==''){
- disp = disp.slice(0,disp.length-1);
- }else{
- disp = scope.placeholder;
- }
- return disp;
- };
- }
- };
- });
+/*-
+ * ================================================================================
+ * 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.
+ * ================================================================================
+ */
+/**
+ * Created by nnaffar on 12/21/15.+
+ */
+angular.module('ecompApp')
+ .directive('multipleSelect', function ($window) {
+ return {
+ restrict: 'E',
+ templateUrl: 'app/directives/multiple-select/multiple-select.tpl.html',
+ scope: {
+ onChange: '&',
+ nameAttr: '@',
+ valueAttr: '@',
+ ngModel: '=',
+ placeholder: '@',
+ uniqueData: '@?',
+ onDropdownClose: '&?'
+ },
+ link: function(scope, elm, attrs){
+ scope.isExpanded = false;
+
+ scope.isDisabled = !scope.ngModel || !scope.ngModel.length;
+ scope.$watch('ngModel', function(newVal){
+ scope.isDisabled = !newVal || !newVal.length;
+ });
+
+
+ let startListening = () => {
+ console.log('listening on $window!');
+ angular.element($window).on('click', function () {
+ stopListening();
+ });
+
+ angular.element('multiple-select').on('click', function(e) {
+ if($(e.target).closest('multiple-select')[0].attributes['unique-data'].value === attrs.uniqueData){
+ console.log('ignored that..:', attrs.uniqueData);
+ e.stopPropagation();
+ }else{
+ console.log('shouldnt ignore, close expanded!:', attrs.uniqueData);
+ scope.isExpanded = false;
+ scope.$applyAsync();
+ }
+ });
+ };
+
+ let stopListening = function() {
+ if(scope.onDropdownClose){
+ scope.onDropdownClose();
+ }
+ scope.isExpanded = false;
+ scope.$applyAsync();
+ console.log('stop listening on $window and multiple-element!');
+ angular.element($window).off('click');
+ angular.element('multiple-select').off('click');
+ };
+
+ scope.showCheckboxes = function(){
+ scope.isExpanded = !scope.isExpanded;
+ if(scope.isExpanded){
+ startListening();
+ }else{
+ stopListening();
+ if(scope.onDropdownClose){
+ scope.onDropdownClose();
+ }
+ }
+ };
+
+ scope.onCheckboxClicked = function() {
+ console.log('checkbox clicked; unique data: ',attrs.uniqueData);
+ if(scope.onChange) {
+ scope.onChange();
+ }
+ }
+
+ scope.getTitle = function(){
+ var disp = '';
+ if(!scope.ngModel || !scope.ngModel.length) {
+ return disp;
+ }
+ scope.ngModel.forEach(function(item){
+ if(item[scope.valueAttr]){
+ disp+=item[scope.nameAttr] + ',';
+ }
+ });
+ if(disp!==''){
+ disp = disp.slice(0,disp.length-1);
+ }else{
+ disp = scope.placeholder;
+ }
+ return disp;
+ };
+ }
+ };
+ });
diff --git a/ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select.tpl.html b/ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select.tpl.html
index 3896bf2d..73136fe1 100644
--- a/ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select.tpl.html
+++ b/ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select.tpl.html
@@ -1,36 +1,36 @@
-<!--
- ================================================================================
- 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.
- ================================================================================
- -->
-<div id="app-multilple-select" class="multiple-select">
- <div class="selectBox"
- id="app-select-{{getTitle()}}"
- ng-click="isDisabled || showCheckboxes()"
- title="{{getTitle()}}"
- ng-bind="getTitle()"
- ng-class="{open: isExpanded, closed: !isExpanded, disabled: isDisabled}"></div>
-
- <div class="checkboxes" ng-show="isExpanded">
- <div ng-repeat="item in ngModel" id="{{item[nameAttr]}}-checkbox-div">
- <label id="{{item[nameAttr]}}-checkbox-label">
- <input type="checkbox" id="{{item[nameAttr]}}-checkbox" ng-model="item[valueAttr]" ng-change="onCheckboxClicked()">
- {{item[nameAttr]}}
- </label>
- </div>
- </div>
-</div>
+<!--
+ ================================================================================
+ 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.
+ ================================================================================
+ -->
+<div id="app-multilple-select" class="multiple-select">
+ <div class="selectBox"
+ id="app-select-{{getTitle()}}"
+ ng-click="isDisabled || showCheckboxes()"
+ title="{{getTitle()}}"
+ ng-bind="getTitle()"
+ ng-class="{open: isExpanded, closed: !isExpanded, disabled: isDisabled}"></div>
+
+ <div class="checkboxes" ng-show="isExpanded">
+ <div ng-repeat="item in ngModel" id="{{item[nameAttr].split(' ').join('-')}}-checkbox-div">
+ <label id="{{item[nameAttr].split(' ').join('-')}}-checkbox-label">
+ <input type="checkbox" id="{{item[nameAttr].split(' ').join('-')}}-checkbox" ng-model="item[valueAttr]" ng-change="onCheckboxClicked()">
+ {{item[nameAttr]}}
+ </label>
+ </div>
+ </div>
+</div>
diff --git a/ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select2.directive.js b/ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select2.directive.js
index e0471631..f49848ce 100644
--- a/ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select2.directive.js
+++ b/ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select2.directive.js
@@ -1,113 +1,113 @@
-/*-
- * ================================================================================
- * 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.
- * ================================================================================
- */
-/**
- * Created by nnaffar on 12/21/15.+
- */
-angular.module('ecompApp')
- .directive('multipleSelect2', function ($window) {
- return {
- restrict: 'E',
- templateUrl: 'app/directives/multiple-select/multiple-select2.tpl.html',
- scope: {
- onChange: '&',
- nameAttr: '@',
- valueAttr: '@',
- ngModel: '=',
- placeholder: '@',
- uniqueData: '@?',
- onDropdownClose: '&?'
- },
- link: function(scope, elm, attrs){
- scope.isExpanded = false;
-
- scope.isDisabled = !scope.ngModel || !scope.ngModel.length;
- scope.$watch('ngModel', function(newVal){
- scope.isDisabled = !newVal || !newVal.length;
- });
-
-
- let startListening = () => {
- console.log('listening on $window!');
- angular.element($window).on('click', function () {
- stopListening();
- });
-
- angular.element('multiple-select2').on('click', function(e) {
- if($(e.target).closest('multiple-select2')[0].attributes['unique-data'].value === attrs.uniqueData){
- console.log('ignored that..:', attrs.uniqueData);
- e.stopPropagation();
- }else{
- console.log('shouldnt ignore, close expanded!:', attrs.uniqueData);
- scope.isExpanded = false;
- scope.$applyAsync();
- }
- });
- };
-
- let stopListening = function() {
- if(scope.onDropdownClose){
- scope.onDropdownClose();
- }
- scope.isExpanded = false;
- scope.$applyAsync();
- console.log('stop listening on $window and multiple-element!');
- angular.element($window).off('click');
- angular.element('multiple-select2').off('click');
- };
-
- scope.showCheckboxes = function(){
- scope.isExpanded = !scope.isExpanded;
- if(scope.isExpanded){
- startListening();
- }else{
- stopListening();
- if(scope.onDropdownClose){
- scope.onDropdownClose();
- }
- }
- };
-
- scope.onCheckboxClicked = function() {
- console.log('checkbox clicked; unique data: ',attrs.uniqueData);
- if(scope.onChange) {
- scope.onChange();
- }
- }
-
- scope.getTitle = function(){
- var disp = '';
- if(!scope.ngModel || !scope.ngModel.length) {
- return disp;
- }
- scope.ngModel.forEach(function(item){
- if(item[scope.valueAttr]){
- disp+=item[scope.nameAttr] + ',';
- }
- });
- if(disp!==''){
- disp = disp.slice(0,disp.length-1);
- }else{
- disp = scope.placeholder;
- }
- return disp;
- };
- }
- };
- });
+/*-
+ * ================================================================================
+ * 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.
+ * ================================================================================
+ */
+/**
+ * Created by nnaffar on 12/21/15.+
+ */
+angular.module('ecompApp')
+ .directive('multipleSelect2', function ($window) {
+ return {
+ restrict: 'E',
+ templateUrl: 'app/directives/multiple-select/multiple-select2.tpl.html',
+ scope: {
+ onChange: '&',
+ nameAttr: '@',
+ valueAttr: '@',
+ ngModel: '=',
+ placeholder: '@',
+ uniqueData: '@?',
+ onDropdownClose: '&?'
+ },
+ link: function(scope, elm, attrs){
+ scope.isExpanded = false;
+
+ scope.isDisabled = !scope.ngModel || !scope.ngModel.length;
+ scope.$watch('ngModel', function(newVal){
+ scope.isDisabled = !newVal || !newVal.length;
+ });
+
+
+ let startListening = () => {
+ console.log('listening on $window!');
+ angular.element($window).on('click', function () {
+ stopListening();
+ });
+
+ angular.element('multiple-select2').on('click', function(e) {
+ if($(e.target).closest('multiple-select2')[0].attributes['unique-data'].value === attrs.uniqueData){
+ console.log('ignored that..:', attrs.uniqueData);
+ e.stopPropagation();
+ }else{
+ console.log('shouldnt ignore, close expanded!:', attrs.uniqueData);
+ scope.isExpanded = false;
+ scope.$applyAsync();
+ }
+ });
+ };
+
+ let stopListening = function() {
+ if(scope.onDropdownClose){
+ scope.onDropdownClose();
+ }
+ scope.isExpanded = false;
+ scope.$applyAsync();
+ console.log('stop listening on $window and multiple-element!');
+ angular.element($window).off('click');
+ angular.element('multiple-select2').off('click');
+ };
+
+ scope.showCheckboxes = function(){
+ scope.isExpanded = !scope.isExpanded;
+ if(scope.isExpanded){
+ startListening();
+ }else{
+ stopListening();
+ if(scope.onDropdownClose){
+ scope.onDropdownClose();
+ }
+ }
+ };
+
+ scope.onCheckboxClicked = function() {
+ console.log('checkbox clicked; unique data: ',attrs.uniqueData);
+ if(scope.onChange) {
+ scope.onChange();
+ }
+ }
+
+ scope.getTitle = function(){
+ var disp = '';
+ if(!scope.ngModel || !scope.ngModel.length) {
+ return disp;
+ }
+ scope.ngModel.forEach(function(item){
+ if(item[scope.valueAttr]){
+ disp+=item[scope.nameAttr] + ',';
+ }
+ });
+ if(disp!==''){
+ disp = disp.slice(0,disp.length-1);
+ }else{
+ disp = scope.placeholder;
+ }
+ return disp;
+ };
+ }
+ };
+ });
diff --git a/ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select2.tpl.html b/ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select2.tpl.html
index 34a6cea0..80c03cd3 100644
--- a/ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select2.tpl.html
+++ b/ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select2.tpl.html
@@ -1,36 +1,36 @@
-<!--
- ================================================================================
- 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.
- ================================================================================
- -->
-<div id="app-multilple-select" class="multiple-select2">
- <div class="selectBox"
- id="app-select-{{getTitle()}}"
- ng-click="isDisabled || showCheckboxes()"
- title="{{getTitle()}}"
- ng-bind="getTitle()"
- ng-class="{open: isExpanded, closed: !isExpanded, disabled: isDisabled}"></div>
-
- <div class="checkboxes" ng-show="isExpanded" >
- <div ng-repeat="item in ngModel" id="{{item[nameAttr]}}-checkbox-div">
- <label id="{{item[nameAttr]}}-checkbox-label">
- <input type="checkbox" id="{{item[nameAttr]}}-checkbox" disabled="disabled" ng-model="item[valueAttr]" ng-change="onCheckboxClicked()">
- {{item[nameAttr]}}
- </label>
- </div>
- </div>
-</div>
+<!--
+ ================================================================================
+ 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.
+ ================================================================================
+ -->
+<div id="app-multilple-select" class="multiple-select2">
+ <div class="selectBox"
+ id="app-select-{{getTitle()}}"
+ ng-click="isDisabled || showCheckboxes()"
+ title="{{getTitle()}}"
+ ng-bind="getTitle()"
+ ng-class="{open: isExpanded, closed: !isExpanded, disabled: isDisabled}"></div>
+
+ <div class="checkboxes" ng-show="isExpanded" >
+ <div ng-repeat="item in ngModel" id="{{item[nameAttr].split(' ').join('-')}}-checkbox-div">
+ <label id="{{item[nameAttr].split(' ').join('-')}}-checkbox-label">
+ <input type="checkbox" id="{{item[nameAttr].split(' ').join('-')}}-checkbox" disabled="disabled" ng-model="item[valueAttr]" ng-change="onCheckboxClicked()">
+ {{item[nameAttr]}}
+ </label>
+ </div>
+ </div>
+</div>
diff --git a/ecomp-portal-FE-common/client/app/directives/right-click/ng-right-click-directive.js b/ecomp-portal-FE-common/client/app/directives/right-click/ng-right-click-directive.js
index b8af5ebe..d6bf3d6d 100644
--- a/ecomp-portal-FE-common/client/app/directives/right-click/ng-right-click-directive.js
+++ b/ecomp-portal-FE-common/client/app/directives/right-click/ng-right-click-directive.js
@@ -1,32 +1,32 @@
-/*-
- * ================================================================================
- * 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.
- * ================================================================================
- */
-angular.module('ecompApp').
- directive('ngRightClick', function($parse) {
- return function(scope, element, attrs)
- {
- var fn = $parse(attrs.ngRightClick);
- element.bind('contextmenu', function(event) {
- scope.$apply(function() {
- event.preventDefault();
- fn(scope, {$event:event});
- });
- });
- };
- });
+/*-
+ * ================================================================================
+ * 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.
+ * ================================================================================
+ */
+angular.module('ecompApp').
+ directive('ngRightClick', function($parse) {
+ return function(scope, element, attrs)
+ {
+ var fn = $parse(attrs.ngRightClick);
+ element.bind('contextmenu', function(event) {
+ scope.$apply(function() {
+ event.preventDefault();
+ fn(scope, {$event:event});
+ });
+ });
+ };
+ });