diff -r 00bfb7b29d9e -r 391ad752903e src/pyams_skin/resources/js/myams-notify.min.js --- a/src/pyams_skin/resources/js/myams-notify.min.js Mon Jan 18 18:41:23 2016 +0100 +++ b/src/pyams_skin/resources/js/myams-notify.min.js Mon Jan 18 18:45:59 2016 +0100 @@ -1,1 +1,1 @@ -(function(c){c(document).ready(function(){c("body").append("
").append("
").append("
")});function e(){c(".divMessageBox").fadeOut(300,function(){c(this).remove()});c(".LoadingBoxContainer").fadeOut(300,function(){c(this).remove()})}var a=0,b=0,d=0,i=0,f=0,h=0,g=0;MyAMS.notify={messageBox:function(v,u){var r,m,k=MyAMS.browser.isIE8orlower();var n={title:"",content:"",NormalButton:undefined,ActiveButton:undefined,buttons:undefined,input:undefined,placeholder:"",options:undefined,sound:undefined};var l=c.extend({},n,v);if(l.sound&&(k==0)){var t=document.createElement("audio");if(navigator.userAgent.match("Firefox/")){t.setAttribute("src",MyAMS.baseURL+"../sound/message.ogg")}else{t.setAttribute("src",MyAMS.baseURL+"../sound/message.mp3")}c.get();t.addEventListener("load",function(){t.play()},true);t.pause();t.play()}b=b+1;if(a==0){a=1;r="
";c("body").append(r);if(MyAMS.browser.isIE8orlower()==1){c("#MsgBoxBack").addClass("MessageIE")}}var o="";var s=0;var q="";var j=0;if(l.input!=undefined){s=1;l.input=l.input.toLowerCase();switch(l.input){case"text":o="

";break;case"password":o="

";break;case"select":if(l.options==undefined){alert("For this type of input, the options parameter is required.")}else{o=""}break;default:alert("That type of input is not handled yet")}}m="
";m+="
";m+=""+l.title+"";m+="

"+l.content+"

";m+=o;m+="
";if(l.buttons==undefined){l.buttons="[Accept]"}l.buttons=c.trim(l.buttons);l.buttons=l.buttons.split("");if(l.NormalButton==undefined){l.NormalButton="#232323"}if(l.ActiveButton==undefined){l.ActiveButton="#ed145b"}for(var p=0;p<=l.buttons.length-1;p++){if(l.buttons[p]=="["){q=""}else{if(l.buttons[p]=="]"){j=j+1;q="";m+=q}else{q+=l.buttons[p]}}}m+="
";m+="
";m+="
";if(b>1){c(".MessageBoxContainer").hide();c(".MessageBoxContainer").css("z-index",99999)}c(".MessageBox").append(m);if(s==1){c("#txt"+b).focus()}c(".botTempo").hover(function(){var w=c(this).attr("id")},function(){var w=c(this).attr("id")});c(".botTempo").click(function(){var A=c(this).attr("id");var z=A.substr(A.indexOf("-")+1);var x=c.trim(c(this).text());if(s==1){if(typeof u=="function"){var y=z.replace("Msg","");var w=c("#txt"+y).val();if(u){u(x,w)}}}else{if(typeof u=="function"){if(u){u(x)}}}c("#"+z).addClass("animated fadeOut fast");b=b-1;if(b==0){c("#MsgBoxBack").removeClass("fadeIn").addClass("fadeOut").delay(300).queue(function(){a=0;c(this).remove()})}})},bigBox:function(j,q){var m,n;j=c.extend({title:"",content:"",icon:undefined,number:undefined,color:undefined,sound:true,timeout:undefined,colortime:1500,colors:undefined},j);if(j.sound===true){if(MyAMS.browser.isIE8orlower()==0){var p=document.createElement("audio");if(navigator.userAgent.match("Firefox/")){p.setAttribute("src",MyAMS.baseURL+"../snd/bigbox.ogg")}else{p.setAttribute("src",MyAMS.baseURL+"../snd/bigbox.mp3")}c.get();p.addEventListener("load",function(){p.play()},true);p.pause();p.play()}}i=i+1;m="
";if(j.icon==undefined){j.icon="fa fa-cloud"}m+="  "+j.title+"";m+="

"+j.content+"

";m+="
";if(j.number!=undefined){m+=j.number}m+="
";m+="
";c("#divBigBoxes").append(m);if(j.color==undefined){j.color="#004d60"}c("#bigBox"+i).css("background-color",j.color);c("#divMiniIcons").append("
");c("#miniIcon"+i).bind("click",function(){var v=c(this).attr("id");var u=v.replace("miniIcon","bigBox");var t=v.replace("miniIcon","bigBoxColor");c(".cajita").each(function(x){var w=c(this).attr("id");var y=w.replace("miniIcon","bigBox");c("#"+y).css("z-index",9998)});c("#"+u).css("z-index",9999);c("#"+t).removeClass("animated fadeIn").delay(1).queue(function(){c(this).show();c(this).addClass("animated fadeIn");c(this).clearQueue()})});var k=c("#btnClose"+i);var o=c("#bigBox"+i);var s=c("#miniIcon"+i);var r;if(j.colors!=undefined&&j.colors.length>0){k.attr("colorcount","0");r=setInterval(function(){var t=k.attr("colorcount");k.animate({backgroundColor:j.colors[t].color});o.animate({backgroundColor:j.colors[t].color});s.animate({backgroundColor:j.colors[t].color});if(t"}else{l="
"}if(k.icon==undefined){m="
"+k.title+"

"+k.content+"

"+l+"
"}else{m="
"+k.title+"

"+k.content+"

"+l+"
"}if(f==1){c("#divSmallBoxes").append(m);g=c("#smallbox"+f).height()+40}else{var p=c(".SmallBox").size();if(p==0){c("#divSmallBoxes").append(m);g=c("#smallbox"+f).height()+40}else{c("#divSmallBoxes").append(m);c("#smallbox"+f).css("top",g);g=g+c("#smallbox"+f).height()+20;c(".SmallBox").each(function(t){if(t==0){c(this).css("top",20);heightPrev=c(this).height()+40;g=c(this).height()+40}else{c(this).css("top",heightPrev);heightPrev=heightPrev+c(this).height()+20;g=g+c(this).height()+20}})}}var s=c("#smallbox"+f);if(k.color==undefined){s.css("background-color","#004d60")}else{s.css("background-color",k.color)}var r;if(k.colors!=undefined&&k.colors.length>0){s.attr("colorcount","0");r=setInterval(function(){var t=s.attr("colorcount");s.animate({backgroundColor:k.colors[t].color});if(t").append("
").append("
")});function f(){c(".divMessageBox").fadeOut(300,function(){c(this).remove()});c(".LoadingBoxContainer").fadeOut(300,function(){c(this).remove()})}var a=0,b=0,h,j=0,g=0,i=0;var e=d.MyAMS;e.notify={messageBox:function(w,v){var s,n,l=e.browser.isIE8orlower();var o={title:"",content:"",NormalButton:undefined,ActiveButton:undefined,buttons:undefined,input:undefined,placeholder:"",options:undefined,sound:undefined};var m=c.extend({},o,w);if(m.sound&&(l===0)){var u=document.createElement("audio");if(navigator.userAgent.match("Firefox/")){u.setAttribute("src",e.baseURL+"../sound/message.ogg")}else{u.setAttribute("src",e.baseURL+"../sound/message.mp3")}c.get();u.addEventListener("load",function(){u.play()},true);u.pause();u.play()}b=b+1;if(a===0){a=1;s="
";c("body").append(s);if(e.browser.isIE8orlower()===1){c("#MsgBoxBack").addClass("MessageIE")}}var r;var p="";var t=0;var q="";var k=0;if(m.input!==undefined){t=1;m.input=m.input.toLowerCase();switch(m.input){case"text":p="

";break;case"password":p="

";break;case"select":if(m.options===undefined){if(d.alert){d.alert("For this type of input, the options parameter is required.")}}else{p=""}break;default:if(d.alert){d.alert("That type of input is not handled yet")}}}n="
";n+="
";n+=""+m.title+"";n+="

"+m.content+"

";n+=p;n+="
";if(m.buttons===undefined){m.buttons="[Accept]"}m.buttons=c.trim(m.buttons);m.buttons=m.buttons.split("");if(m.NormalButton===undefined){m.NormalButton="#232323"}if(m.ActiveButton===undefined){m.ActiveButton="#ed145b"}for(r=0;r<=m.buttons.length-1;r++){if(m.buttons[r]==="["){q=""}else{if(m.buttons[r]==="]"){k=k+1;q="";n+=q}else{q+=m.buttons[r]}}}n+="
";n+="
";n+="
";if(b>1){c(".MessageBoxContainer").hide();c(".MessageBoxContainer").css("z-index",99999)}c(".MessageBox").append(n);if(t===1){c("#txt"+b).focus()}c(".botTempo").hover(function(){var x=c(this).attr("id")},function(){var x=c(this).attr("id")});c(".botTempo").click(function(){var B=c(this).attr("id");var A=B.substr(B.indexOf("-")+1);var y=c.trim(c(this).text());if(t===1){if(typeof v==="function"){var z=A.replace("Msg","");var x=c("#txt"+z).val();if(v){v(y,x)}}}else{if(typeof v==="function"){if(v){v(y)}}}c("#"+A).addClass("animated fadeOut fast");b=b-1;if(b===0){c("#MsgBoxBack").removeClass("fadeIn").addClass("fadeOut").delay(300).queue(function(){a=0;c(this).remove()})}})},bigBox:function(k,r){var n,o;k=c.extend({title:"",content:"",icon:undefined,number:undefined,color:undefined,sound:true,timeout:undefined,colortime:1500,colors:undefined},k);if(k.sound===true){if(e.browser.isIE8orlower()===0){var q=document.createElement("audio");if(navigator.userAgent.match("Firefox/")){q.setAttribute("src",e.baseURL+"../snd/bigbox.ogg")}else{q.setAttribute("src",e.baseURL+"../snd/bigbox.mp3")}c.get();q.addEventListener("load",function(){q.play()},true);q.pause();q.play()}}j=j+1;n="
";if(k.icon===undefined){k.icon="fa fa-cloud"}n+="  "+k.title+"";n+="

"+k.content+"

";n+="
";if(k.number!==undefined){n+=k.number}n+="
";n+="
";c("#divBigBoxes").append(n);if(k.color===undefined){k.color="#004d60"}c("#bigBox"+j).css("background-color",k.color);c("#divMiniIcons").append("
");c("#miniIcon"+j).bind("click",function(){var w=c(this).attr("id");var v=w.replace("miniIcon","bigBox");var u=w.replace("miniIcon","bigBoxColor");c(".cajita").each(function(y){var x=c(this).attr("id");var z=x.replace("miniIcon","bigBox");c("#"+z).css("z-index",9998)});c("#"+v).css("z-index",9999);c("#"+u).removeClass("animated fadeIn").delay(1).queue(function(){c(this).show();c(this).addClass("animated fadeIn");c(this).clearQueue()})});var l=c("#btnClose"+j);var p=c("#bigBox"+j);var t=c("#miniIcon"+j);var s;if(k.colors!==undefined&&k.colors.length>0){l.attr("colorcount","0");s=setInterval(function(){var u=l.attr("colorcount");l.animate({backgroundColor:k.colors[u].color});p.animate({backgroundColor:k.colors[u].color});t.animate({backgroundColor:k.colors[u].color});if(u"}else{m="
"}if(l.icon===undefined){n="
"+l.title+"

"+l.content+"

"+m+"
"}else{n="
"+l.title+"

"+l.content+"

"+m+"
"}if(g===1){c("#divSmallBoxes").append(n);i=c("#smallbox"+g).height()+40}else{var q=c(".SmallBox").size();if(q===0){c("#divSmallBoxes").append(n);i=c("#smallbox"+g).height()+40}else{c("#divSmallBoxes").append(n);c("#smallbox"+g).css("top",i);i=i+c("#smallbox"+g).height()+20;c(".SmallBox").each(function(u){if(u===0){c(this).css("top",20);h=c(this).height()+40;i=c(this).height()+40}else{c(this).css("top",h);h=h+c(this).height()+20;i=i+c(this).height()+20}})}}var t=c("#smallbox"+g);if(l.color===undefined){t.css("background-color","#004d60")}else{t.css("background-color",l.color)}var s;if(l.colors!==undefined&&l.colors.length>0){t.attr("colorcount","0");s=setInterval(function(){var u=t.attr("colorcount");t.animate({backgroundColor:l.colors[u].color});if(u