Compression omitted

This commit is contained in:
Xavier Guimard 2016-02-04 22:10:15 +00:00
parent 1d4c1c2db2
commit 98c52bc8c9

View File

@ -1 +1 @@
(function(){var a=[function(d){return"groupBy=substr(uid,1)"},function(d){return"uid="+d+"*&groupBy=uid"},function(d){return"uid="+d}];var c={actives:[{title:"markAsDone",icon:"eye-close"}],done:[{title:"deleteNotification",icon:"trash"}],"new":[{title:"save",icon:"save"}],home:[]};var b=angular.module("llngNotificationsExplorer",["ui.tree","ui.bootstrap","llApp"]);b.controller("NotificationsExplorerCtrl",["$scope","$translator","$location","$q","$http",function(f,e,k,d,j){f.links=links;f.menulinks=menulinks;f.staticPrefix=staticPrefix;f.scriptname=scriptname;f.formPrefix=formPrefix;f.availableLanguages=availableLanguages;f.waiting=true;f.showM=false;f.showT=true;f.showForm=false;f.data=[];f.form={};f.currentScope=null;f.currentNotification=null;f.menu=c;f.translateP=e.translateP;f.translate=e.translate;f.translateTitle=function(l){return e.translateField(l,"title")};f.menuClick=function(l){if(l.popup){window.open(l.popup)}else{if(!l.action){l.action=l.title}switch(typeof l.action){case"function":l.action(f.currentNode,f);break;case"string":f[l.action]();break;default:console.log(typeof l.action)}}f.showM=false};f.markAsDone=function(){f.waiting=true;j.put(scriptname+"notifications/"+f.type+"/"+f.currentNotification.uid+"_"+f.currentNotification.reference,{done:1}).success(function(l){f.currentNotification=null;f.currentScope.remove();f.waiting=false}).error(function(l,m){f.currentNotification=null;f.currentScope.remove();f.waiting=false})};f.deleteNotification=function(){f.waiting=true;j["delete"](scriptname+"notifications/"+f.type+"/"+f.currentNotification.done).success(function(l){f.currentNotification=null;f.currentScope.remove();f.waiting=false}).error(function(l,m){f.currentNotification=null;f.currentScope.remove();f.waiting=false})};f.stoggle=function(l){var m=l.$modelValue;if(m.nodes.length==0){f.updateTree(m.value,m.nodes,m.level,m.query)}l.toggle()};f.notifDate=function(l){if(l!==null){var m=new Date(l.substr(0,4),l.substr(4,2)-1,l.substr(6,2));return m.toLocaleDateString()}return""};f.getLanguage=function(l){f.lang=l;f.form="white";f.init();f.showM=false};var h=function(m,l,o){var p=l.match(/#\/(\w+)/);if(p===null){f.type="actives"}else{f.type=p[1]}if(f.type=="new"){f.displayCreateForm()}else{f.showForm=false;f.init()}};f.$on("$locationChangeSuccess",h);var g=0;f.updateTree=function(o,m,p,l){f.waiting=true;var n=a[p](o,l);j.get(scriptname+"notifications/"+f.type+"?"+n).success(function(q){if(q.result){q.values.forEach(function(r){g++;r.id="node"+g;if(p<a.length-1){r.nodes=[];r.level=p+1;r.query=n}m.push(r)})}f.waiting=false}).error(function(q,r){f.waiting=false})};f.displayNotification=function(l){f.waiting=true;f.currentScope=l;var m=l.$modelValue;var n=m.notification;if(f.type=="actives"){n=m.uid+"_"+m.reference}j.get(scriptname+"notifications/"+f.type+"/"+n).success(function(o){f.currentNotification={uid:m.uid,reference:m.reference,condition:m.condition};if(f.type=="actives"){f.currentNotification.notifications=o.notifications}else{f.currentNotification.done=o.done}f.waiting=false}).error(function(o,p){f.waiting=false});f.showT=false};f.save=function(){if(f.form.uid&&f.form.reference&&f.form.xml&&f.form.date){f.waiting=true;var m=f.form.date.getFullYear();var n=f.form.date.getMonth()+1;if(n<10){n="0"+n}var l=f.form.date.getDate();if(l<10){l="0"+l}f.form.date=m+"-"+n+"-"+l;j.post("notifications/actives",f.form).success(function(o){f.form={};if(o.result==1){alert(e.translate("notificationCreated"))}else{alert(e.translateP("__notificationNotCreated__ ("+o.error+")"))}f.waiting=false}).error(function(o,p){alert(e.translateP("__notificationNotCreated__ ("+o.error+")"));f.waiting=false})}else{alert(e.translate("incompleteForm"))}};f.init=function(){var l;f.waiting=true;f.data=[];d.all([e.init(f.lang),f.updateTree("",f.data,0)]).then(function(){f.waiting=false},function(m,n){f.waiting=false})};f.displayCreateForm=function(){f.waiting=true;e.init(f.lang).then(function(){f.currentNotification=null;f.showForm=true;f.data=[];f.waiting=false;f.form.date=new Date()})};var i=k.path().match(/^\/(\w+)/);f.type=i?i[1]:"actives";f.popupopen=function(){f.popup.opened=true};f.popup={opened:false}}])})();
(function(){var a=[function(d){return"groupBy=substr(uid,1)"},function(d){return"uid="+d+"*&groupBy=uid"},function(d){return"uid="+d}];var c={actives:[{title:"markAsDone",icon:"eye-close"}],done:[{title:"deleteNotification",icon:"trash"}],"new":[{title:"save",icon:"save"}],home:[]};var b=angular.module("llngNotificationsExplorer",["ui.tree","ui.bootstrap","llApp"]);b.controller("NotificationsExplorerCtrl",["$scope","$translator","$location","$q","$http",function(f,e,k,d,j){f.links=links;f.menulinks=menulinks;f.staticPrefix=staticPrefix;f.scriptname=scriptname;f.formPrefix=formPrefix;f.availableLanguages=availableLanguages;f.waiting=true;f.showM=false;f.showT=true;f.showForm=false;f.data=[];f.form={};f.currentScope=null;f.currentNotification=null;f.menu=c;f.translateP=e.translateP;f.translate=e.translate;f.translateTitle=function(l){return e.translateField(l,"title")};f.menuClick=function(l){if(l.popup){window.open(l.popup)}else{if(!l.action){l.action=l.title}switch(typeof l.action){case"function":l.action(f.currentNode,f);break;case"string":f[l.action]();break;default:console.log(typeof l.action)}}f.showM=false};f.markAsDone=function(){f.waiting=true;j.put(scriptname+"notifications/"+f.type+"/"+f.currentNotification.uid+"_"+f.currentNotification.reference,{done:1}).success(function(l){f.currentNotification=null;f.currentScope.remove();f.waiting=false}).error(function(l,m){f.currentNotification=null;f.currentScope.remove();f.waiting=false})};f.deleteNotification=function(){f.waiting=true;j["delete"](scriptname+"notifications/"+f.type+"/"+f.currentNotification.done).success(function(l){f.currentNotification=null;f.currentScope.remove();f.waiting=false}).error(function(l,m){f.currentNotification=null;f.currentScope.remove();f.waiting=false})};f.stoggle=function(l){var m=l.$modelValue;if(m.nodes.length==0){f.updateTree(m.value,m.nodes,m.level,m.query)}l.toggle()};f.notifDate=function(l){if(l!==null){var m=new Date(l.substr(0,4),l.substr(4,2)-1,l.substr(6,2));return m.toLocaleDateString()}return""};f.getLanguage=function(l){f.lang=l;f.form="white";f.init();f.showM=false};var h=function(m,l,o){var p=l.match(/#\/(\w+)/);if(p===null){f.type="actives"}else{f.type=p[1]}if(f.type=="new"){f.displayCreateForm()}else{f.showForm=false;f.init()}};f.$on("$locationChangeSuccess",h);var g=0;f.updateTree=function(o,m,p,l){f.waiting=true;var n=a[p](o,l);j.get(scriptname+"notifications/"+f.type+"?"+n).success(function(q){if(q.result){q.values.forEach(function(r){g++;r.id="node"+g;if(p<a.length-1){r.nodes=[];r.level=p+1;r.query=n}m.push(r)})}f.waiting=false}).error(function(q,r){f.waiting=false})};f.displayNotification=function(l){f.waiting=true;f.currentScope=l;var m=l.$modelValue;var n=m.notification;if(f.type=="actives"){n=m.uid+"_"+m.reference}j.get(scriptname+"notifications/"+f.type+"/"+n).success(function(o){f.currentNotification={uid:m.uid,reference:m.reference,condition:m.condition};if(f.type=="actives"){f.currentNotification.notifications=o.notifications}else{f.currentNotification.done=o.done}f.waiting=false}).error(function(o,p){f.waiting=false});f.showT=false};f.showModal=function(m,o){var l=$uibModal.open({templateUrl:m,controller:"ModalInstanceCtrl",size:"lg",resolve:{elem:function(){return function(p){return f[p]}},set:function(){return function(q,p){f[q]=p}},init:function(){return o}}});var n=d.defer();l.result.then(function(p){f.message={title:"",message:"",};n.resolve(p)},function(p){f.message={title:"",message:"",};n.reject(p)});return l.result};f.save=function(){if(f.form.uid&&f.form.reference&&f.form.xml&&f.form.date){f.waiting=true;var m=f.form.date.getFullYear();var n=f.form.date.getMonth()+1;if(n<10){n="0"+n}var l=f.form.date.getDate();if(l<10){l="0"+l}f.form.date=m+"-"+n+"-"+l;j.post("notifications/actives",f.form).success(function(o){f.form={};if(o.result==1){f.message={title:"notificationCreated"};f.showmodal("alert.html")}else{f.message={title:"notificationNotCreated",message:o.error};f.showmodal("alert.html")}f.waiting=false}).error(function(o,p){f.message={title:"notificationNotCreated",message:o.error};f.showmodal("alert.html");f.waiting=false})}else{f.message={title:"incompleteForm"};f.showmodal("alert.html")}};f.init=function(){var l;f.waiting=true;f.data=[];d.all([e.init(f.lang),f.updateTree("",f.data,0)]).then(function(){f.waiting=false},function(m,n){f.waiting=false})};f.displayCreateForm=function(){f.waiting=true;e.init(f.lang).then(function(){f.currentNotification=null;f.showForm=true;f.data=[];f.waiting=false;f.form.date=new Date()})};var i=k.path().match(/^\/(\w+)/);f.type=i?i[1]:"actives";f.popupopen=function(){f.popup.opened=true};f.popup={opened:false}}])})();