aboutsummaryrefslogtreecommitdiffstats
path: root/ecomp-sdk-app/src/main/webapp/app/fusion/external/ebz/angular_js/checklist-model.min.js
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2017-02-14 19:41:00 -0500
committerPamela Dragosh <pdragosh@research.att.com>2017-02-14 19:41:32 -0500
commit91d04c64771832a0b8815ffbe1f0f9920320d94d (patch)
treefb02d5e1c84a3d91def9a7ee95bc87f9c046cc96 /ecomp-sdk-app/src/main/webapp/app/fusion/external/ebz/angular_js/checklist-model.min.js
parentb9d4caa40ef8e3566ac475968bce17b9b64b6939 (diff)
Initial OpenECOMP policy/engine commit
Change-Id: I7dbff37733b661643dd4d1caefa3d7dccc361b6e Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'ecomp-sdk-app/src/main/webapp/app/fusion/external/ebz/angular_js/checklist-model.min.js')
-rw-r--r--ecomp-sdk-app/src/main/webapp/app/fusion/external/ebz/angular_js/checklist-model.min.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/ecomp-sdk-app/src/main/webapp/app/fusion/external/ebz/angular_js/checklist-model.min.js b/ecomp-sdk-app/src/main/webapp/app/fusion/external/ebz/angular_js/checklist-model.min.js
new file mode 100644
index 000000000..61be598eb
--- /dev/null
+++ b/ecomp-sdk-app/src/main/webapp/app/fusion/external/ebz/angular_js/checklist-model.min.js
@@ -0,0 +1 @@
+angular.module("checklist-model",[]).directive("checklistModel",["$parse","$compile",function(e,c){function b(g,j){if(angular.isArray(g)){for(var h=0;h<g.length;h++){if(angular.equals(g[h],j)){return true}}}return false}function f(g,j){g=angular.isArray(g)?g:[];for(var h=0;h<g.length;h++){if(angular.equals(g[h],j)){return g}}g.push(j);return g}function a(g,j){if(angular.isArray(g)){for(var h=0;h<g.length;h++){if(angular.equals(g[h],j)){g.splice(h,1);break}}}return g}function d(i,j,h){c(j)(i);var g=e(h.checklistModel);var l=g.assign;var k=e(h.checklistValue)(i.$parent);i.$watch("checked",function(o,m){if(o===m){return}var n=g(i.$parent);if(o===true){l(i.$parent,f(n,k))}else{l(i.$parent,a(n,k))}});i.$parent.$watch(h.checklistModel,function(n,m){i.checked=b(n,k)},true)}return{restrict:"A",priority:1000,terminal:true,scope:true,compile:function(g,h){if(g[0].tagName!=="INPUT"||!g.attr("type","checkbox")){throw'checklist-model should be applied to `input[type="checkbox"]`.'}if(!h.checklistValue){throw"You should provide `checklist-value`."}g.removeAttr("checklist-model");g.attr("ng-model","checked");return d}}}]);