--- a/src/ztfy/myams/resources/js/myams-notify.js Tue Jun 03 23:39:19 2014 +0200
+++ b/src/ztfy/myams/resources/js/myams-notify.js Tue Jun 03 23:40:12 2014 +0200
@@ -1,6 +1,6 @@
/*
* MyAMS extensions for notification messages
- * Version 0.1.0
+ * Version 0.1.2
* ©2014 Thierry Florac <tflorac@ulthar.net>
*/
@@ -16,10 +16,10 @@
function SmartUnLoading() {
$(".divMessageBox").fadeOut(300, function () {
- $(this).remove()
+ $(this).remove();
});
$(".LoadingBoxContainer").fadeOut(300, function () {
- $(this).remove()
+ $(this).remove();
})
}
@@ -72,44 +72,46 @@
SmartMSG = "<div class='MessageBox animated fadeIn fast' id='MsgBoxBack'></div>";
$("body").append(SmartMSG);
if (MyAMS.browser.isIE8orlower() == 1) {
- $("#MsgBoxBack").addClass("MessageIE")
+ $("#MsgBoxBack").addClass("MessageIE");
}
}
var InputType = "";
var HasInput = 0;
+ var Name = "";
+ var NumButtons = 0;
if (settings.input != undefined) {
HasInput = 1;
settings.input = settings.input.toLowerCase();
switch (settings.input) {
- case "text":
- InputType = "<input class='form-control' type='" + settings.input + "' id='txt" + SmartMSGboxCount + "' placeholder='" + settings.placeholder + "'/><br/><br/>";
- break;
- case "password":
- InputType = "<input class='form-control' type='" + settings.input + "' id='txt" + SmartMSGboxCount + "' placeholder='" + settings.placeholder + "'/><br/><br/>";
- break;
- case "select":
- if (settings.options == undefined) {
- alert("For this type of input, the options parameter is required.")
- } else {
- InputType = "<select class='form-control' id='txt" + SmartMSGboxCount + "'>";
- for (var i = 0; i <= settings.options.length - 1; i++) {
- if (settings.options[i] == "[") {
- Name = ""
- } else {
- if (settings.options[i] == "]") {
- NumBottons = NumBottons + 1;
- Name = "<option>" + Name + "</option>";
- InputType += Name
+ case "text":
+ InputType = "<input class='form-control' type='" + settings.input + "' id='txt" + SmartMSGboxCount + "' placeholder='" + settings.placeholder + "'/><br/><br/>";
+ break;
+ case "password":
+ InputType = "<input class='form-control' type='" + settings.input + "' id='txt" + SmartMSGboxCount + "' placeholder='" + settings.placeholder + "'/><br/><br/>";
+ break;
+ case "select":
+ if (settings.options == undefined) {
+ alert("For this type of input, the options parameter is required.");
+ } else {
+ InputType = "<select class='form-control' id='txt" + SmartMSGboxCount + "'>";
+ for (var i = 0; i <= settings.options.length - 1; i++) {
+ if (settings.options[i] == "[") {
+ Name = "";
} else {
- Name += settings.options[i]
+ if (settings.options[i] == "]") {
+ NumButtons = NumButtons + 1;
+ Name = "<option>" + Name + "</option>";
+ InputType += Name;
+ } else {
+ Name += settings.options[i];
+ }
}
}
+ InputType += "</select>";
}
- InputType += "</select>"
- }
- break;
- default:
- alert("That type of input is not handled yet")
+ break;
+ default:
+ alert("That type of input is not handled yet");
}
}
Content = "<div class='MessageBoxContainer animated fadeIn fast' id='Msg" + SmartMSGboxCount + "'>";
@@ -119,28 +121,26 @@
Content += InputType;
Content += "<div class='MessageBoxButtonSection'>";
if (settings.buttons == undefined) {
- settings.buttons = "[Accept]"
+ settings.buttons = "[Accept]";
}
settings.buttons = $.trim(settings.buttons);
settings.buttons = settings.buttons.split("");
- var Name = "";
- var NumBottons = 0;
if (settings.NormalButton == undefined) {
- settings.NormalButton = "#232323"
+ settings.NormalButton = "#232323";
}
if (settings.ActiveButton == undefined) {
- settings.ActiveButton = "#ed145b"
+ settings.ActiveButton = "#ed145b";
}
for (var i = 0; i <= settings.buttons.length - 1; i++) {
if (settings.buttons[i] == "[") {
- Name = ""
+ Name = "";
} else {
if (settings.buttons[i] == "]") {
- NumBottons = NumBottons + 1;
- Name = "<button id='bot" + NumBottons + "-Msg" + SmartMSGboxCount + "' class='btn btn-default btn-sm botTempo'> " + Name + "</button>";
- Content += Name
+ NumButtons = NumButtons + 1;
+ Name = "<button id='bot" + NumButtons + "-Msg" + SmartMSGboxCount + "' class='btn btn-default btn-sm botTempo'> " + Name + "</button>";
+ Content += Name;
} else {
- Name += settings.buttons[i]
+ Name += settings.buttons[i];
}
}
}
@@ -149,16 +149,16 @@
Content += "</div>";
if (SmartMSGboxCount > 1) {
$(".MessageBoxContainer").hide();
- $(".MessageBoxContainer").css("z-index", 99999)
+ $(".MessageBoxContainer").css("z-index", 99999);
}
$(".MessageBox").append(Content);
if (HasInput == 1) {
- $("#txt" + SmartMSGboxCount).focus()
+ $("#txt" + SmartMSGboxCount).focus();
}
$(".botTempo").hover(function () {
- var ThisID = $(this).attr("id")
+ var ThisID = $(this).attr("id");
}, function () {
- var ThisID = $(this).attr("id")
+ var ThisID = $(this).attr("id");
});
$(".botTempo").click(function () {
var ThisID = $(this).attr("id");
@@ -169,13 +169,13 @@
var IDNumber = MsgBoxID.replace("Msg", "");
var Value = $("#txt" + IDNumber).val();
if (callback) {
- callback(Press, Value)
+ callback(Press, Value);
}
}
} else {
if (typeof callback == "function") {
if (callback) {
- callback(Press)
+ callback(Press);
}
}
}
@@ -184,7 +184,7 @@
if (SmartMSGboxCount == 0) {
$("#MsgBoxBack").removeClass("fadeIn").addClass("fadeOut").delay(300).queue(function () {
ExistMsg = 0;
- $(this).remove()
+ $(this).remove();
})
}
})
@@ -207,34 +207,34 @@
if (MyAMS.browser.isIE8orlower() == 0) {
var audioElement = document.createElement("audio");
if (navigator.userAgent.match("Firefox/")) {
- audioElement.setAttribute("src", MyAMS.baseURL + '../snd/bigbox.ogg')
+ audioElement.setAttribute("src", MyAMS.baseURL + '../snd/bigbox.ogg');
} else {
- audioElement.setAttribute("src", MyAMS.baseURL + '../snd/bigbox.mp3')
+ audioElement.setAttribute("src", MyAMS.baseURL + '../snd/bigbox.mp3');
}
$.get();
audioElement.addEventListener("load", function () {
- audioElement.play()
+ audioElement.play();
}, true);
audioElement.pause();
- audioElement.play()
+ audioElement.play();
}
}
BigBoxes = BigBoxes + 1;
boxBig = "<div id='bigBox" + BigBoxes + "' class='BigBox animated fadeIn fast'><div id='bigBoxColor" + BigBoxes + "'><i class='btnClose fa fa-times' id='btnClose" + BigBoxes + "'></i>";
if (settings.icon == undefined) {
- settings.icon = "fa fa-cloud"
+ settings.icon = "fa fa-cloud";
}
boxBig += "<span><i class='" + settings.icon + "'></i> " + settings.title + "</span>";
boxBig += "<p>" + settings.content + "</p>";
boxBig += "<div class='bigboxnumber'>";
if (settings.number != undefined) {
- boxBig += settings.number
+ boxBig += settings.number;
}
boxBig += "</div></div>";
boxBig += "</div>";
$("#divBigBoxes").append(boxBig);
if (settings.color == undefined) {
- settings.color = "#004d60"
+ settings.color = "#004d60";
}
$("#bigBox" + BigBoxes).css("background-color", settings.color);
$("#divMiniIcons").append("<div id='miniIcon" + BigBoxes + "' class='cajita animated fadeIn' style='background-color: " + settings.color + ";'><i class='" + settings.icon + "'/></i></div>");
@@ -245,13 +245,13 @@
$(".cajita").each(function (index) {
var BackBox = $(this).attr("id");
var BigBoxID = BackBox.replace("miniIcon", "bigBox");
- $("#" + BigBoxID).css("z-index", 9998)
+ $("#" + BigBoxID).css("z-index", 9998);
});
$("#" + FrontBigBox).css("z-index", 9999);
$("#" + FronBigBoxColor).removeClass("animated fadeIn").delay(1).queue(function () {
$(this).show();
$(this).addClass("animated fadeIn");
- $(this).clearQueue()
+ $(this).clearQueue();
})
});
var ThisBigBoxCloseCross = $("#btnClose" + BigBoxes);
@@ -272,17 +272,17 @@
backgroundColor: settings.colors[ColorIndex].color
});
if (ColorIndex < settings.colors.length - 1) {
- ThisBigBoxCloseCross.attr("colorcount", ((ColorIndex * 1) + 1))
+ ThisBigBoxCloseCross.attr("colorcount", ((ColorIndex * 1) + 1));
} else {
- ThisBigBoxCloseCross.attr("colorcount", 0)
+ ThisBigBoxCloseCross.attr("colorcount", 0);
}
- }, settings.colortime)
+ }, settings.colortime);
}
ThisBigBoxCloseCross.bind("click", function () {
clearInterval(ColorTimeInterval);
if (typeof callback == "function") {
if (callback) {
- callback()
+ callback();
}
}
var FrontBox = $(this).attr("id");
@@ -291,29 +291,31 @@
$("#" + FrontBigBox).removeClass("fadeIn fast");
$("#" + FrontBigBox).addClass("fadeOut fast").delay(300).queue(function () {
$(this).clearQueue();
- $(this).remove()
+ $(this).remove();
});
$("#" + miniIcon).removeClass("fadeIn fast");
$("#" + miniIcon).addClass("fadeOut fast").delay(300).queue(function () {
$(this).clearQueue();
- $(this).remove()
+ $(this).remove();
})
});
if (settings.timeout != undefined) {
var TimedID = BigBoxes;
setTimeout(function () {
clearInterval(ColorTimeInterval);
- $("#bigBox" + TimedID).removeClass("fadeIn fast");
- $("#bigBox" + TimedID).addClass("fadeOut fast").delay(300).queue(function () {
+ var box = $("#bigBox" + TimedID);
+ box.removeClass("fadeIn fast");
+ box.addClass("fadeOut fast").delay(300).queue(function () {
$(this).clearQueue();
- $(this).remove()
+ $(this).remove();
});
- $("#miniIcon" + TimedID).removeClass("fadeIn fast");
- $("#miniIcon" + TimedID).addClass("fadeOut fast").delay(300).queue(function () {
+ var icon = $("#miniIcon" + TimedID);
+ icon.removeClass("fadeIn fast");
+ icon.addClass("fadeOut fast").delay(300).queue(function () {
$(this).clearQueue();
- $(this).remove()
+ $(this).remove();
})
- }, settings.timeout)
+ }, settings.timeout);
}
},
@@ -334,16 +336,16 @@
if (MyAMS.browser.isIE8orlower() == 0) {
var audioElement = document.createElement("audio");
if (navigator.userAgent.match("Firefox/")) {
- audioElement.setAttribute("src", MyAMS.baseURL + '../snd/smallbox.ogg')
+ audioElement.setAttribute("src", MyAMS.baseURL + '../snd/smallbox.ogg');
} else {
- audioElement.setAttribute("src", MyAMS.baseURL + '../snd/smallbox.mp3')
+ audioElement.setAttribute("src", MyAMS.baseURL + '../snd/smallbox.mp3');
}
$.get();
audioElement.addEventListener("load", function () {
- audioElement.play()
+ audioElement.play();
}, true);
audioElement.pause();
- audioElement.play()
+ audioElement.play();
}
}
SmallBoxes = SmallBoxes + 1;
@@ -351,21 +353,21 @@
var IconSection = "",
CurrentIDSmallbox = "smallbox" + SmallBoxes;
if (settings.iconSmall == undefined) {
- IconSection = "<div class='miniIcon'></div>"
+ IconSection = "<div class='miniIcon'></div>";
} else {
- IconSection = "<div class='miniIcon'><i class='miniPic " + settings.iconSmall + "'></i></div>"
+ IconSection = "<div class='miniIcon'><i class='miniPic " + settings.iconSmall + "'></i></div>";
} if (settings.icon == undefined) {
- BoxSmall = "<div id='smallbox" + SmallBoxes + "' class='SmallBox animated fadeInRight fast'><div class='textoFull'><span>" + settings.title + "</span><p>" + settings.content + "</p></div>" + IconSection + "</div>"
+ BoxSmall = "<div id='smallbox" + SmallBoxes + "' class='SmallBox animated fadeInRight fast'><div class='textoFull'><span>" + settings.title + "</span><p>" + settings.content + "</p></div>" + IconSection + "</div>";
} else {
- BoxSmall = "<div id='smallbox" + SmallBoxes + "' class='SmallBox animated fadeInRight fast'><div class='foto'><i class='" + settings.icon + "'></i></div><div class='textoFoto'><span>" + settings.title + "</span><p>" + settings.content + "</p></div>" + IconSection + "</div>"
+ BoxSmall = "<div id='smallbox" + SmallBoxes + "' class='SmallBox animated fadeInRight fast'><div class='foto'><i class='" + settings.icon + "'></i></div><div class='textoFoto'><span>" + settings.title + "</span><p>" + settings.content + "</p></div>" + IconSection + "</div>";
} if (SmallBoxes == 1) {
$("#divSmallBoxes").append(BoxSmall);
- SmallBoxesAnchos = $("#smallbox" + SmallBoxes).height() + 40
+ SmallBoxesAnchos = $("#smallbox" + SmallBoxes).height() + 40;
} else {
var SmartExist = $(".SmallBox").size();
if (SmartExist == 0) {
$("#divSmallBoxes").append(BoxSmall);
- SmallBoxesAnchos = $("#smallbox" + SmallBoxes).height() + 40
+ SmallBoxesAnchos = $("#smallbox" + SmallBoxes).height() + 40;
} else {
$("#divSmallBoxes").append(BoxSmall);
$("#smallbox" + SmallBoxes).css("top", SmallBoxesAnchos);
@@ -374,11 +376,11 @@
if (index == 0) {
$(this).css("top", 20);
heightPrev = $(this).height() + 40;
- SmallBoxesAnchos = $(this).height() + 40
+ SmallBoxesAnchos = $(this).height() + 40;
} else {
$(this).css("top", heightPrev);
heightPrev = heightPrev + $(this).height() + 20;
- SmallBoxesAnchos = SmallBoxesAnchos + $(this).height() + 20
+ SmallBoxesAnchos = SmallBoxesAnchos + $(this).height() + 20;
}
})
}
@@ -398,11 +400,11 @@
backgroundColor: settings.colors[ColorIndex].color
});
if (ColorIndex < settings.colors.length - 1) {
- ThisSmallBox.attr("colorcount", ((ColorIndex * 1) + 1))
+ ThisSmallBox.attr("colorcount", ((ColorIndex * 1) + 1));
} else {
- ThisSmallBox.attr("colorcount", 0)
+ ThisSmallBox.attr("colorcount", 0);
}
- }, settings.colortime)
+ }, settings.colortime);
}
if (settings.timeout != undefined) {
setTimeout(function () {
@@ -416,7 +418,7 @@
$("#" + CurrentIDSmallbox).remove();
if (typeof callback == "function") {
if (callback) {
- callback()
+ callback();
}
}
var Primero = 1;
@@ -427,13 +429,13 @@
top: 20
}, 300);
heightPrev = $(this).height() + 40;
- SmallBoxesAnchos = $(this).height() + 40
+ SmallBoxesAnchos = $(this).height() + 40;
} else {
$(this).animate({
top: heightPrev
}, 350);
heightPrev = heightPrev + $(this).height() + 20;
- SmallBoxesAnchos = SmallBoxesAnchos + $(this).height() + 20
+ SmallBoxesAnchos = SmallBoxesAnchos + $(this).height() + 20;
}
})
})
@@ -442,7 +444,7 @@
SmallBoxesAnchos = SmallBoxesAnchos - ThisHeight;
if (typeof callback == "function") {
if (callback) {
- callback()
+ callback();
}
}
$("#" + CurrentIDSmallbox).removeClass().addClass("SmallBox").animate({
@@ -457,16 +459,16 @@
top: 20
}, 300);
heightPrev = $(this).height() + 40;
- SmallBoxesAnchos = $(this).height() + 40
+ SmallBoxesAnchos = $(this).height() + 40;
} else {
$(this).animate({
top: heightPrev
});
heightPrev = heightPrev + $(this).height() + 20;
- SmallBoxesAnchos = SmallBoxesAnchos + $(this).height() + 20
+ SmallBoxesAnchos = SmallBoxesAnchos + $(this).height() + 20;
}
})
- })
+ });
}
}, settings.timeout)
}
@@ -474,7 +476,7 @@
clearInterval(ColorTimeInterval);
if (typeof callback == "function") {
if (callback) {
- callback()
+ callback();
}
}
var ThisHeight = $(this).height() + 20;
@@ -493,17 +495,17 @@
top: 20
}, 300);
heightPrev = $(this).height() + 40;
- SmallBoxesAnchos = $(this).height() + 40
+ SmallBoxesAnchos = $(this).height() + 40;
} else {
$(this).animate({
top: heightPrev
}, 350);
heightPrev = heightPrev + $(this).height() + 20;
- SmallBoxesAnchos = SmallBoxesAnchos + $(this).height() + 20
+ SmallBoxesAnchos = SmallBoxesAnchos + $(this).height() + 20;
}
- })
- })
- })
+ });
+ });
+ });
}
}
--- a/src/ztfy/myams/resources/js/myams-notify.min.js Tue Jun 03 23:39:19 2014 +0200
+++ b/src/ztfy/myams/resources/js/myams-notify.min.js Tue Jun 03 23:40:12 2014 +0200
@@ -1,1 +1,1 @@
-(function(c){c(document).ready(function(){c("body").append("<div id='divSmallBoxes'></div>").append("<div id='divMiniIcons'></div>").append("<div id='divBigBoxes'></div>")});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,l,j=MyAMS.browser.isIE8orlower();var m={title:"",content:"",NormalButton:undefined,ActiveButton:undefined,buttons:undefined,input:undefined,placeholder:"",options:undefined,sound:undefined};var k=c.extend({},m,v);if(k.sound&&(j==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="<div class='MessageBox animated fadeIn fast' id='MsgBoxBack'></div>";c("body").append(r);if(MyAMS.browser.isIE8orlower()==1){c("#MsgBoxBack").addClass("MessageIE")}}var n="";var s=0;if(k.input!=undefined){s=1;k.input=k.input.toLowerCase();switch(k.input){case"text":n="<input class='form-control' type='"+k.input+"' id='txt"+b+"' placeholder='"+k.placeholder+"'/><br/><br/>";break;case"password":n="<input class='form-control' type='"+k.input+"' id='txt"+b+"' placeholder='"+k.placeholder+"'/><br/><br/>";break;case"select":if(k.options==undefined){alert("For this type of input, the options parameter is required.")}else{n="<select class='form-control' id='txt"+b+"'>";for(var q=0;q<=k.options.length-1;q++){if(k.options[q]=="["){p=""}else{if(k.options[q]=="]"){o=o+1;p="<option>"+p+"</option>";n+=p}else{p+=k.options[q]}}}n+="</select>"}break;default:alert("That type of input is not handled yet")}}l="<div class='MessageBoxContainer animated fadeIn fast' id='Msg"+b+"'>";l+="<div class='MessageBoxMiddle'>";l+="<span class='MsgTitle'>"+k.title+"</span class='MsgTitle'>";l+="<p class='pText'>"+k.content+"</p>";l+=n;l+="<div class='MessageBoxButtonSection'>";if(k.buttons==undefined){k.buttons="[Accept]"}k.buttons=c.trim(k.buttons);k.buttons=k.buttons.split("");var p="";var o=0;if(k.NormalButton==undefined){k.NormalButton="#232323"}if(k.ActiveButton==undefined){k.ActiveButton="#ed145b"}for(var q=0;q<=k.buttons.length-1;q++){if(k.buttons[q]=="["){p=""}else{if(k.buttons[q]=="]"){o=o+1;p="<button id='bot"+o+"-Msg"+b+"' class='btn btn-default btn-sm botTempo'> "+p+"</button>";l+=p}else{p+=k.buttons[q]}}}l+="</div>";l+="</div>";l+="</div>";if(b>1){c(".MessageBoxContainer").hide();c(".MessageBoxContainer").css("z-index",99999)}c(".MessageBox").append(l);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="<div id='bigBox"+i+"' class='BigBox animated fadeIn fast'><div id='bigBoxColor"+i+"'><i class='btnClose fa fa-times' id='btnClose"+i+"'></i>";if(j.icon==undefined){j.icon="fa fa-cloud"}m+="<span><i class='"+j.icon+"'></i> "+j.title+"</span>";m+="<p>"+j.content+"</p>";m+="<div class='bigboxnumber'>";if(j.number!=undefined){m+=j.number}m+="</div></div>";m+="</div>";c("#divBigBoxes").append(m);if(j.color==undefined){j.color="#004d60"}c("#bigBox"+i).css("background-color",j.color);c("#divMiniIcons").append("<div id='miniIcon"+i+"' class='cajita animated fadeIn' style='background-color: "+j.color+";'><i class='"+j.icon+"'/></i></div>");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<j.colors.length-1){k.attr("colorcount",((t*1)+1))}else{k.attr("colorcount",0)}},j.colortime)}k.bind("click",function(){clearInterval(r);if(typeof q=="function"){if(q){q()}}var u=c(this).attr("id");var t=u.replace("btnClose","bigBox");var v=u.replace("btnClose","miniIcon");c("#"+t).removeClass("fadeIn fast");c("#"+t).addClass("fadeOut fast").delay(300).queue(function(){c(this).clearQueue();c(this).remove()});c("#"+v).removeClass("fadeIn fast");c("#"+v).addClass("fadeOut fast").delay(300).queue(function(){c(this).clearQueue();c(this).remove()})});if(j.timeout!=undefined){var l=i;setTimeout(function(){clearInterval(r);c("#bigBox"+l).removeClass("fadeIn fast");c("#bigBox"+l).addClass("fadeOut fast").delay(300).queue(function(){c(this).clearQueue();c(this).remove()});c("#miniIcon"+l).removeClass("fadeIn fast");c("#miniIcon"+l).addClass("fadeOut fast").delay(300).queue(function(){c(this).clearQueue();c(this).remove()})},j.timeout)}},smallBox:function(k,q){var m,n;k=c.extend({title:"",content:"",icon:undefined,iconSmall:undefined,sound:true,color:undefined,timeout:undefined,colortime:1500,colors:undefined},k);if(k.sound===true){if(MyAMS.browser.isIE8orlower()==0){var o=document.createElement("audio");if(navigator.userAgent.match("Firefox/")){o.setAttribute("src",MyAMS.baseURL+"../snd/smallbox.ogg")}else{o.setAttribute("src",MyAMS.baseURL+"../snd/smallbox.mp3")}c.get();o.addEventListener("load",function(){o.play()},true);o.pause();o.play()}}f=f+1;m="";var l="",j="smallbox"+f;if(k.iconSmall==undefined){l="<div class='miniIcon'></div>"}else{l="<div class='miniIcon'><i class='miniPic "+k.iconSmall+"'></i></div>"}if(k.icon==undefined){m="<div id='smallbox"+f+"' class='SmallBox animated fadeInRight fast'><div class='textoFull'><span>"+k.title+"</span><p>"+k.content+"</p></div>"+l+"</div>"}else{m="<div id='smallbox"+f+"' class='SmallBox animated fadeInRight fast'><div class='foto'><i class='"+k.icon+"'></i></div><div class='textoFoto'><span>"+k.title+"</span><p>"+k.content+"</p></div>"+l+"</div>"}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<k.colors.length-1){s.attr("colorcount",((t*1)+1))}else{s.attr("colorcount",0)}},k.colortime)}if(k.timeout!=undefined){setTimeout(function(){clearInterval(r);var u=c(this).height()+20;var t=j;var v=c("#"+j).css("top");if(c("#"+j+":hover").length!=0){c("#"+j).on("mouseleave",function(){g=g-u;c("#"+j).remove();if(typeof q=="function"){if(q){q()}}var x=1;var w=0;c(".SmallBox").each(function(y){if(y==0){c(this).animate({top:20},300);w=c(this).height()+40;g=c(this).height()+40}else{c(this).animate({top:w},350);w=w+c(this).height()+20;g=g+c(this).height()+20}})})}else{clearInterval(r);g=g-u;if(typeof q=="function"){if(q){q()}}c("#"+j).removeClass().addClass("SmallBox").animate({opacity:0},300,function(){c(this).remove();var x=1;var w=0;c(".SmallBox").each(function(y){if(y==0){c(this).animate({top:20},300);w=c(this).height()+40;g=c(this).height()+40}else{c(this).animate({top:w});w=w+c(this).height()+20;g=g+c(this).height()+20}})})}},k.timeout)}c("#smallbox"+f).bind("click",function(){clearInterval(r);if(typeof q=="function"){if(q){q()}}var u=c(this).height()+20;var t=c(this).attr("id");var v=c(this).css("top");g=g-u;c(this).removeClass().addClass("SmallBox").animate({opacity:0},300,function(){c(this).remove();var x=1;var w=0;c(".SmallBox").each(function(y){if(y==0){c(this).animate({top:20},300);w=c(this).height()+40;g=c(this).height()+40}else{c(this).animate({top:w},350);w=w+c(this).height()+20;g=g+c(this).height()+20}})})})}}})(jQuery);
\ No newline at end of file
+(function(c){c(document).ready(function(){c("body").append("<div id='divSmallBoxes'></div>").append("<div id='divMiniIcons'></div>").append("<div id='divBigBoxes'></div>")});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="<div class='MessageBox animated fadeIn fast' id='MsgBoxBack'></div>";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="<input class='form-control' type='"+l.input+"' id='txt"+b+"' placeholder='"+l.placeholder+"'/><br/><br/>";break;case"password":o="<input class='form-control' type='"+l.input+"' id='txt"+b+"' placeholder='"+l.placeholder+"'/><br/><br/>";break;case"select":if(l.options==undefined){alert("For this type of input, the options parameter is required.")}else{o="<select class='form-control' id='txt"+b+"'>";for(var p=0;p<=l.options.length-1;p++){if(l.options[p]=="["){q=""}else{if(l.options[p]=="]"){j=j+1;q="<option>"+q+"</option>";o+=q}else{q+=l.options[p]}}}o+="</select>"}break;default:alert("That type of input is not handled yet")}}m="<div class='MessageBoxContainer animated fadeIn fast' id='Msg"+b+"'>";m+="<div class='MessageBoxMiddle'>";m+="<span class='MsgTitle'>"+l.title+"</span class='MsgTitle'>";m+="<p class='pText'>"+l.content+"</p>";m+=o;m+="<div class='MessageBoxButtonSection'>";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="<button id='bot"+j+"-Msg"+b+"' class='btn btn-default btn-sm botTempo'> "+q+"</button>";m+=q}else{q+=l.buttons[p]}}}m+="</div>";m+="</div>";m+="</div>";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="<div id='bigBox"+i+"' class='BigBox animated fadeIn fast'><div id='bigBoxColor"+i+"'><i class='btnClose fa fa-times' id='btnClose"+i+"'></i>";if(j.icon==undefined){j.icon="fa fa-cloud"}m+="<span><i class='"+j.icon+"'></i> "+j.title+"</span>";m+="<p>"+j.content+"</p>";m+="<div class='bigboxnumber'>";if(j.number!=undefined){m+=j.number}m+="</div></div>";m+="</div>";c("#divBigBoxes").append(m);if(j.color==undefined){j.color="#004d60"}c("#bigBox"+i).css("background-color",j.color);c("#divMiniIcons").append("<div id='miniIcon"+i+"' class='cajita animated fadeIn' style='background-color: "+j.color+";'><i class='"+j.icon+"'/></i></div>");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<j.colors.length-1){k.attr("colorcount",((t*1)+1))}else{k.attr("colorcount",0)}},j.colortime)}k.bind("click",function(){clearInterval(r);if(typeof q=="function"){if(q){q()}}var u=c(this).attr("id");var t=u.replace("btnClose","bigBox");var v=u.replace("btnClose","miniIcon");c("#"+t).removeClass("fadeIn fast");c("#"+t).addClass("fadeOut fast").delay(300).queue(function(){c(this).clearQueue();c(this).remove()});c("#"+v).removeClass("fadeIn fast");c("#"+v).addClass("fadeOut fast").delay(300).queue(function(){c(this).clearQueue();c(this).remove()})});if(j.timeout!=undefined){var l=i;setTimeout(function(){clearInterval(r);var u=c("#bigBox"+l);u.removeClass("fadeIn fast");u.addClass("fadeOut fast").delay(300).queue(function(){c(this).clearQueue();c(this).remove()});var t=c("#miniIcon"+l);t.removeClass("fadeIn fast");t.addClass("fadeOut fast").delay(300).queue(function(){c(this).clearQueue();c(this).remove()})},j.timeout)}},smallBox:function(k,q){var m,n;k=c.extend({title:"",content:"",icon:undefined,iconSmall:undefined,sound:true,color:undefined,timeout:undefined,colortime:1500,colors:undefined},k);if(k.sound===true){if(MyAMS.browser.isIE8orlower()==0){var o=document.createElement("audio");if(navigator.userAgent.match("Firefox/")){o.setAttribute("src",MyAMS.baseURL+"../snd/smallbox.ogg")}else{o.setAttribute("src",MyAMS.baseURL+"../snd/smallbox.mp3")}c.get();o.addEventListener("load",function(){o.play()},true);o.pause();o.play()}}f=f+1;m="";var l="",j="smallbox"+f;if(k.iconSmall==undefined){l="<div class='miniIcon'></div>"}else{l="<div class='miniIcon'><i class='miniPic "+k.iconSmall+"'></i></div>"}if(k.icon==undefined){m="<div id='smallbox"+f+"' class='SmallBox animated fadeInRight fast'><div class='textoFull'><span>"+k.title+"</span><p>"+k.content+"</p></div>"+l+"</div>"}else{m="<div id='smallbox"+f+"' class='SmallBox animated fadeInRight fast'><div class='foto'><i class='"+k.icon+"'></i></div><div class='textoFoto'><span>"+k.title+"</span><p>"+k.content+"</p></div>"+l+"</div>"}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<k.colors.length-1){s.attr("colorcount",((t*1)+1))}else{s.attr("colorcount",0)}},k.colortime)}if(k.timeout!=undefined){setTimeout(function(){clearInterval(r);var u=c(this).height()+20;var t=j;var v=c("#"+j).css("top");if(c("#"+j+":hover").length!=0){c("#"+j).on("mouseleave",function(){g=g-u;c("#"+j).remove();if(typeof q=="function"){if(q){q()}}var x=1;var w=0;c(".SmallBox").each(function(y){if(y==0){c(this).animate({top:20},300);w=c(this).height()+40;g=c(this).height()+40}else{c(this).animate({top:w},350);w=w+c(this).height()+20;g=g+c(this).height()+20}})})}else{clearInterval(r);g=g-u;if(typeof q=="function"){if(q){q()}}c("#"+j).removeClass().addClass("SmallBox").animate({opacity:0},300,function(){c(this).remove();var x=1;var w=0;c(".SmallBox").each(function(y){if(y==0){c(this).animate({top:20},300);w=c(this).height()+40;g=c(this).height()+40}else{c(this).animate({top:w});w=w+c(this).height()+20;g=g+c(this).height()+20}})})}},k.timeout)}c("#smallbox"+f).bind("click",function(){clearInterval(r);if(typeof q=="function"){if(q){q()}}var u=c(this).height()+20;var t=c(this).attr("id");var v=c(this).css("top");g=g-u;c(this).removeClass().addClass("SmallBox").animate({opacity:0},300,function(){c(this).remove();var x=1;var w=0;c(".SmallBox").each(function(y){if(y==0){c(this).animate({top:20},300);w=c(this).height()+40;g=c(this).height()+40}else{c(this).animate({top:w},350);w=w+c(this).height()+20;g=g+c(this).height()+20}})})})}}})(jQuery);
\ No newline at end of file