summaryrefslogtreecommitdiffstats
path: root/epsdk-app-onap/src/main/webapp/app/fusion/external/ebz/angular_js/checklist-model.min.js
diff options
context:
space:
mode:
authorjimmydot <jf2512@att.com>2017-05-07 14:58:24 -0400
committerjimmydot <jf2512@att.com>2017-05-07 14:58:24 -0400
commit3982f4f67314ec37fd9b22ae54049958af777c1b (patch)
tree72111b7c13ee7529cce1ea4c8d83c89fdd164450 /epsdk-app-onap/src/main/webapp/app/fusion/external/ebz/angular_js/checklist-model.min.js
parent00e0d25933699f9e39c3f0b86c983165a1e3e330 (diff)
[VID-6] Initial rebase push
Change-Id: I9077be9663754d9b22f77c6a7b3109b361b39346 Signed-off-by: jimmydot <jf2512@att.com>
Diffstat (limited to 'epsdk-app-onap/src/main/webapp/app/fusion/external/ebz/angular_js/checklist-model.min.js')
-rwxr-xr-xepsdk-app-onap/src/main/webapp/app/fusion/external/ebz/angular_js/checklist-model.min.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/epsdk-app-onap/src/main/webapp/app/fusion/external/ebz/angular_js/checklist-model.min.js b/epsdk-app-onap/src/main/webapp/app/fusion/external/ebz/angular_js/checklist-model.min.js
new file mode 100755
index 000000000..4d82be500
--- /dev/null
+++ b/epsdk-app-onap/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}}}]);