diff --git a/static/js/app.js b/static/js/app.js index 8fb28e5..585cf95 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -228,4 +228,10 @@ alertify.defaults = { // class name attached to cancel button cancel: "ajs-cancel btn btn-default", }, + hooks: { + // invoked before initializing any dialog + preinit: function (instance) {}, + // invoked after initializing any dialog + postinit: function (instance) {}, + }, }; diff --git a/static/lib/alertify-1.13.1/alertify.min.js b/static/lib/alertify-1.13.1/alertify.min.js deleted file mode 100644 index 80a1ca5..0000000 --- a/static/lib/alertify-1.13.1/alertify.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! alertifyjs - v1.13.1 - Mohammad Younes (http://alertifyjs.com) */ -!function(a){"use strict";function b(a,b){a.className+=" "+b}function c(a,b){for(var c=a.className.split(" "),d=b.split(" "),e=0;e-1&&c.splice(f,1)}a.className=c.join(" ")}function d(){return"rtl"===a.getComputedStyle(document.body).direction}function e(){return document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop}function f(){return document.documentElement&&document.documentElement.scrollLeft||document.body.scrollLeft}function g(a){for(;a.lastChild;)a.removeChild(a.lastChild)}function h(a){if(null===a)return a;var b;if(Array.isArray(a)){b=[];for(var c=0;c0){for(var c=[],d=0;d=0?(c(document.body,Ha.noOverflow),w(!1)):a>0&&document.body.className.indexOf(Ha.noOverflow)<0&&(w(!0),b(document.body,Ha.noOverflow))}function w(d){y.defaults.preventBodyShift&&(d&&document.documentElement.scrollHeight>document.documentElement.clientHeight?(Ja=Ba,Ia=a.getComputedStyle(document.body).top,b(document.body,Ha.fixed),document.body.style.top=-Ba+"px"):d||(Ba=Ja,document.body.style.top=Ia,c(document.body,Ha.fixed),r()))}function x(a,d,e){"string"==typeof e&&c(a.elements.root,Ha.prefix+e),b(a.elements.root,Ha.prefix+d),Da=a.elements.root.offsetWidth}function z(a){a.get("transitionOff")?b(a.elements.root,Ha.noTransition):c(a.elements.root,Ha.noTransition)}function A(a){a.get("modal")?(c(a.elements.root,Ha.modeless),a.isOpen()&&(ta(a),P(a),s())):(b(a.elements.root,Ha.modeless),a.isOpen()&&(sa(a),P(a),s()))}function B(a){a.get("basic")?b(a.elements.root,Ha.basic):c(a.elements.root,Ha.basic)}function C(a){a.get("frameless")?b(a.elements.root,Ha.frameless):c(a.elements.root,Ha.frameless)}function D(a,b){for(var c=q.indexOf(b),d=c+1;d200&&(La=a.timeStamp)&&!Ka){var c=a.srcElement||a.target;!0===b.get("closableByDimmer")&&c===b.elements.modal&&G(b)}Ka=!1}function U(a,b){if(Date.now()-Ma>200&&(Ma=Date.now()))for(var c=0;c-1?(U(b,function(a){return a.key===c}),!1):void 0}function X(a){var b=q[q.length-1],c=a.keyCode;if(c===o.LEFT||c===o.RIGHT){for(var d=b.__internal.buttons,e=0;eo.F1-1&&Ca.indexOf(c)>-1)return a.preventDefault(),a.stopPropagation(),U(b,function(a){return a.key===c}),!1}function Y(a,b){if(b)b.focus();else{var c=a.__internal.focus,d=c.element;switch(typeof c.element){case"number":a.__internal.buttons.length>c.element&&(d=!0===a.get("basic")?a.elements.reset[0]:a.__internal.buttons[c.element].element);break;case"string":d=a.elements.body.querySelector(c.element);break;case"function":d=c.element.call(a)}!0!==a.get("defaultFocusOff")&&(void 0!==d&&null!==d||0!==a.__internal.buttons.length)||(d=a.elements.reset[0]),d&&d.focus&&(d.focus(),c.select&&d.select&&d.select())}}function Z(a,b){if(!b)for(var c=q.length-1;c>-1;c-=1)if(q[c].isModal()){b=q[c];break}if(b&&b.isModal()){var d,e=b.elements.reset[0],f=b.elements.reset[1],g=a.relatedTarget,h=b.elements.root.contains(g),i=a.srcElement||a.target;if(i===e&&!h||i===f&&g===e)return;i===f||i===document.body?d=e:i===e&&g===f?d=$(b):i===e&&h&&(d=$(b,!0)),Y(b,d)}}function $(a,b){var c=[].slice.call(a.elements.dialog.querySelectorAll(p.tabbable));b&&c.reverse();for(var d=0;dYa?b.style.left=Xa+k+"px":b.offsetWidth>=Za&&(b.style.left=Xa-k+"px")}}function ka(a,c){if(!c.isMaximized()){var d;if("touchstart"===a.type?(a.preventDefault(),d=a.targetTouches[0]):0===a.button&&(d=a),d){l("onresize",c),Wa=c,$a=c.elements.resizeHandle.offsetHeight/2;var e=c.elements.dialog;return b(e,Ha.capture),Xa=parseInt(e.style.left,10),e.style.height=e.offsetHeight+"px",e.style.minHeight=c.elements.header.offsetHeight+c.elements.footer.offsetHeight+"px",e.style.width=(Ya=e.offsetWidth)+"px","none"!==e.style.maxWidth&&(e.style.minWidth=(Za=e.offsetWidth)+"px"),e.style.maxWidth="none",b(document.body,Ha.noSelection),!1}}}function la(a){if(Wa){var b;"touchmove"===a.type?(a.preventDefault(),b=a.targetTouches[0]):0===a.button&&(b=a),b&&ja(b,Wa.elements.dialog,!Wa.get("modal")&&!Wa.get("pinned"))}}function ma(){if(Wa){var a=Wa;Wa=null,c(document.body,Ha.noSelection),c(a.elements.dialog,Ha.capture),Ka=!0,l("onresized",a)}}function na(a){Wa=null;var b=a.elements.dialog;"none"===b.style.maxWidth&&(b.style.maxWidth=b.style.minWidth=b.style.width=b.style.height=b.style.minHeight=b.style.left="",Xa=Number.Nan,Ya=Za=$a=0)}function oa(a){a.get("resizable")?(b(a.elements.root,Ha.resizable),a.isOpen()&&wa(a)):(na(a),c(a.elements.root,Ha.resizable),a.isOpen()&&xa(a))}function pa(){for(var a=0;a-1&&a.navigator.userAgent.indexOf("Chrome")<0,Ga={dimmer:'
',modal:'
',dialog:'
',reset:'',commands:'
',header:'
',body:'
',content:'
',footer:'',buttons:{primary:'
',auxiliary:'
'},button:'',resizeHandle:'
'},Ha={animationIn:"ajs-in",animationOut:"ajs-out",base:"alertify",basic:"ajs-basic",capture:"ajs-capture",closable:"ajs-closable",fixed:"ajs-fixed",frameless:"ajs-frameless",hidden:"ajs-hidden",maximize:"ajs-maximize",maximized:"ajs-maximized",maximizable:"ajs-maximizable",modeless:"ajs-modeless",movable:"ajs-movable",noSelection:"ajs-no-selection",noOverflow:"ajs-no-overflow",noPadding:"ajs-no-padding",pin:"ajs-pin",pinnable:"ajs-pinnable",prefix:"ajs-",resizable:"ajs-resizable",restore:"ajs-restore",shake:"ajs-shake",unpinned:"ajs-unpinned",noTransition:"ajs-no-transition"},Ia="",Ja=0,Ka=!1,La=0,Ma=0,Na=!1,Oa=null,Pa=0,Qa=0,Ra="pageX",Sa="pageY",Ta=null,Ua=!1,Va=null,Wa=null,Xa=Number.Nan,Ya=0,Za=0,$a=0;return{__init:m,isOpen:function(){return this.__internal.isOpen},isModal:function(){return this.elements.root.className.indexOf(Ha.modeless)<0},isMaximized:function(){return this.elements.root.className.indexOf(Ha.maximized)>-1},isPinned:function(){return this.elements.root.className.indexOf(Ha.unpinned)<0},maximize:function(){return this.isMaximized()||K(this),this},restore:function(){return this.isMaximized()&&L(this),this},pin:function(){return this.isPinned()||I(this),this},unpin:function(){return this.isPinned()&&J(this),this},bringToFront:function(){return D(null,this),this},moveTo:function(a,b){if(!isNaN(a)&&!isNaN(b)){l("onmove",this);var c=this.elements.dialog,e=c,f=0,g=0;c.style.left&&(f-=parseInt(c.style.left,10)),c.style.top&&(g-=parseInt(c.style.top,10));do{f+=e.offsetLeft,g+=e.offsetTop}while(e=e.offsetParent);var h=a-f,i=b-g;d()&&(h*=-1),c.style.left=h+"px",c.style.top=i+"px",l("onmoved",this)}return this},resizeTo:function(a,b){var c=parseFloat(a),d=parseFloat(b),e=/(\d*\.\d+|\d+)%/;if(!isNaN(c)&&!isNaN(d)&&!0===this.get("resizable")){l("onresize",this),(""+a).match(e)&&(c=c/100*document.documentElement.clientWidth),(""+b).match(e)&&(d=d/100*document.documentElement.clientHeight);var f=this.elements.dialog;"none"!==f.style.maxWidth&&(f.style.minWidth=(Za=f.offsetWidth)+"px"),f.style.maxWidth="none",f.style.minHeight=this.elements.header.offsetHeight+this.elements.footer.offsetHeight+"px",f.style.width=c+"px",f.style.height=d+"px",l("onresized",this)}return this},setting:function(a,b){var c=this,d=F(this,this.__internal.options,function(a,b,d){E(c,a,b,d)},a,b);if("get"===d.op)return d.found?d.value:void 0!==this.settings?F(this,this.settings,this.settingUpdated||function(){},a,b).value:void 0;if("set"===d.op){if(d.items.length>0)for(var e=this.settingUpdated||function(){},f=0;f0){var b=this;this.__internal.timer=setTimeout(function(){b.dismiss()},1e3*this.__internal.delay)}return this},setContent:function(c){if("string"==typeof c?(g(this.element),this.element.innerHTML=c):c instanceof a.HTMLElement&&this.element.firstChild!==c&&(g(this.element),this.element.appendChild(c)),this.__internal.closeButton){var d=document.createElement("span");b(d,n.close),d.setAttribute("data-close",!0),this.element.appendChild(d)}return this},dismissOthers:function(){return x.dismissAll(this),this}})}var k,l,m=[],n=p.notifier.classes,o=n.base;return{setting:function(a,b){if(d(this),void 0===b)return this.__internal[a];switch(a){case"position":this.__internal.position=b,h(this);break;case"delay":this.__internal.delay=b}return this},set:function(a,b){return this.setting(a,b),this},get:function(a){return this.setting(a)},create:function(a,b){d(this);var c=document.createElement("div");return c.className=n.message+("string"==typeof a&&""!==a?" "+n.prefix+a:""),i(c,b)},dismissAll:function(a){for(var b=m.slice(0),c=0;c (http://alertifyjs.com) - * Licensed under GPL 3 */ -.alertify .ajs-dimmer{position:fixed;z-index:1981;top:0;right:0;bottom:0;left:0;padding:0;margin:0;background-color:#252525;opacity:.5}.alertify .ajs-modal{position:fixed;top:0;right:0;left:0;bottom:0;padding:0;overflow-y:auto;z-index:1981}.alertify .ajs-dialog{position:relative;margin:5% auto;min-height:110px;max-width:500px;padding:24px 24px 0 24px;outline:0;background-color:#fff}.alertify .ajs-dialog.ajs-capture:before{content:'';position:absolute;top:0;right:0;bottom:0;left:0;display:block;z-index:1}.alertify .ajs-reset{position:absolute!important;display:inline!important;width:0!important;height:0!important;opacity:0!important}.alertify .ajs-commands{position:absolute;right:4px;margin:-14px 24px 0 0;z-index:2}.alertify .ajs-commands button{display:none;width:10px;height:10px;margin-left:10px;padding:10px;border:0;background-color:transparent;background-repeat:no-repeat;background-position:center;cursor:pointer}.alertify .ajs-commands button.ajs-close{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAh0lEQVQYlY2QsQ0EIQwEB9cBAR1CJUaI/gigDnwR6NBL/7/xWLNrZ2b8EwGotVpr7eOitWa1VjugiNB7R1UPrKrWe0dEAHBbXUqxMQbeewDmnHjvyTm7C3zDwAUd9c63YQdUVdu6EAJzzquz7HXvTiklt+H9DQFYaxFjvDqllFyMkbXWvfpXHjJrWFgdBq/hAAAAAElFTkSuQmCC)}.alertify .ajs-commands button.ajs-maximize{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAOUlEQVQYlWP8//8/AzGAhYGBgaG4uBiv6t7eXkYmooxjYGAgWiELsvHYFMCcRX2rSXcjoSBiJDbAAeD+EGu+8BZcAAAAAElFTkSuQmCC)}.alertify .ajs-header{margin:-24px;margin-bottom:0;padding:16px 24px;background-color:#fff}.alertify .ajs-body{min-height:56px}.alertify .ajs-body .ajs-content{padding:16px 24px 16px 16px}.alertify .ajs-footer{padding:4px;margin-left:-24px;margin-right:-24px;min-height:43px;background-color:#fff}.alertify .ajs-footer .ajs-buttons.ajs-primary{text-align:right}.alertify .ajs-footer .ajs-buttons.ajs-primary .ajs-button{margin:4px}.alertify .ajs-footer .ajs-buttons.ajs-auxiliary{float:left;clear:none;text-align:left}.alertify .ajs-footer .ajs-buttons.ajs-auxiliary .ajs-button{margin:4px}.alertify .ajs-footer .ajs-buttons .ajs-button{min-width:88px;min-height:35px}.alertify .ajs-handle{position:absolute;display:none;width:10px;height:10px;right:0;bottom:0;z-index:1;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMS8xNEDQYmMAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAQ0lEQVQYlaXNMQoAIAxD0dT7H657l0KX3iJuUlBUNOsPPCGJm7VDp6ryeMxMuDsAQH7owW3pyn3RS26iKxERMLN3ugOaAkaL3sWVigAAAABJRU5ErkJggg==);-webkit-transform:scaleX(1);transform:scaleX(1);cursor:se-resize}.alertify.ajs-no-overflow .ajs-body .ajs-content{overflow:hidden!important}.alertify.ajs-no-padding.ajs-maximized .ajs-body .ajs-content{left:0;right:0;padding:0}.alertify.ajs-no-padding:not(.ajs-maximized) .ajs-body{margin-left:-24px;margin-right:-24px}.alertify.ajs-no-padding:not(.ajs-maximized) .ajs-body .ajs-content{padding:0}.alertify.ajs-no-padding.ajs-resizable .ajs-body .ajs-content{left:0;right:0}.alertify.ajs-maximizable .ajs-commands button.ajs-maximize,.alertify.ajs-maximizable .ajs-commands button.ajs-restore{display:inline-block}.alertify.ajs-closable .ajs-commands button.ajs-close{display:inline-block}.alertify.ajs-maximized .ajs-dialog{width:100%!important;height:100%!important;max-width:none!important;margin:0 auto!important;top:0!important;left:0!important}.alertify.ajs-maximized.ajs-modeless .ajs-modal{position:fixed!important;min-height:100%!important;max-height:none!important;margin:0!important}.alertify.ajs-maximized .ajs-commands button.ajs-maximize{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAASklEQVQYlZWQ0QkAMQhDtXRincOZX78KVtrDCwgqJNEoIB3MPLj7lRUROlpyVXGzby6zWuY+kz6tj5sBMTMAyVV3/595RbOh3cAXsww1raeiOcoAAAAASUVORK5CYII=)}.alertify.ajs-maximized .ajs-dialog,.alertify.ajs-resizable .ajs-dialog{padding:0}.alertify.ajs-maximized .ajs-commands,.alertify.ajs-resizable .ajs-commands{margin:14px 24px 0 0}.alertify.ajs-maximized .ajs-header,.alertify.ajs-resizable .ajs-header{position:absolute;top:0;left:0;right:0;margin:0;padding:16px 24px}.alertify.ajs-maximized .ajs-body,.alertify.ajs-resizable .ajs-body{min-height:224px;display:inline-block}.alertify.ajs-maximized .ajs-body .ajs-content,.alertify.ajs-resizable .ajs-body .ajs-content{position:absolute;top:50px;right:24px;bottom:50px;left:24px;overflow:auto}.alertify.ajs-maximized .ajs-footer,.alertify.ajs-resizable .ajs-footer{position:absolute;left:0;right:0;bottom:0;margin:0}.alertify.ajs-resizable:not(.ajs-maximized) .ajs-dialog{min-width:548px}.alertify.ajs-resizable:not(.ajs-maximized) .ajs-handle{display:block}.alertify.ajs-movable:not(.ajs-maximized) .ajs-header{cursor:move}.alertify.ajs-modeless .ajs-dimmer,.alertify.ajs-modeless .ajs-reset{display:none}.alertify.ajs-modeless .ajs-modal{overflow:visible;max-width:none;max-height:0}.alertify.ajs-modeless.ajs-pinnable .ajs-commands button.ajs-pin{display:inline-block;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAQklEQVQYlcWPMQ4AIAwCqU9u38GbcbHRWN1MvKQDhQFMEpKImGJA0gCgnYw0V0rwxseg5erT4oSkQVI5d9f+e9+xA0NbLpWfitPXAAAAAElFTkSuQmCC)}.alertify.ajs-modeless.ajs-unpinned .ajs-modal{position:absolute}.alertify.ajs-modeless.ajs-unpinned .ajs-commands button.ajs-pin{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAO0lEQVQYlWP8//8/AzGAiShV6AqLi4txGs+CLoBLMYbC3t5eRmyaWfBZhwwYkX2NTxPRvibKjRhW4wMAhxkYGbLu3pEAAAAASUVORK5CYII=)}.alertify.ajs-modeless:not(.ajs-unpinned) .ajs-body{max-height:500px;overflow:auto}.alertify.ajs-basic .ajs-header{opacity:0}.alertify.ajs-basic .ajs-footer{visibility:hidden}.alertify.ajs-frameless .ajs-header{position:absolute;top:0;left:0;right:0;min-height:60px;margin:0;padding:0;opacity:0;z-index:1}.alertify.ajs-frameless .ajs-footer{display:none}.alertify.ajs-frameless .ajs-body .ajs-content{position:absolute;top:0;right:0;bottom:0;left:0}.alertify.ajs-frameless:not(.ajs-resizable) .ajs-dialog{padding-top:0}.alertify.ajs-frameless:not(.ajs-resizable) .ajs-dialog .ajs-commands{margin-top:0}.ajs-no-overflow{overflow:hidden!important;outline:0}.ajs-no-overflow.ajs-fixed{position:fixed;top:0;right:0;bottom:0;left:0;overflow-y:scroll!important}.ajs-no-selection,.ajs-no-selection *{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media screen and (max-width:568px){.alertify .ajs-dialog{min-width:150px}.alertify:not(.ajs-maximized) .ajs-modal{padding:0 5%}.alertify:not(.ajs-maximized).ajs-resizable .ajs-dialog{min-width:initial;min-width:auto}}@-moz-document url-prefix(){.alertify button:focus{outline:1px dotted #3593d2}}.alertify .ajs-dimmer,.alertify .ajs-modal{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition-property:opacity,visibility;transition-property:opacity,visibility;-webkit-transition-timing-function:linear;transition-timing-function:linear;-webkit-transition-duration:250ms;transition-duration:250ms}.alertify.ajs-hidden .ajs-dimmer,.alertify.ajs-hidden .ajs-modal{visibility:hidden;opacity:0}.alertify.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-duration:.5s;animation-duration:.5s}.alertify.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-duration:250ms;animation-duration:250ms}.alertify .ajs-dialog.ajs-shake{-webkit-animation-name:ajs-shake;animation-name:ajs-shake;-webkit-animation-duration:.1s;animation-duration:.1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}@-webkit-keyframes ajs-shake{0%,100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes ajs-shake{0%,100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.alertify.ajs-slide.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-slideIn;animation-name:ajs-slideIn;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1.275);animation-timing-function:cubic-bezier(.175,.885,.32,1.275)}.alertify.ajs-slide.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-slideOut;animation-name:ajs-slideOut;-webkit-animation-timing-function:cubic-bezier(.6,-.28,.735,.045);animation-timing-function:cubic-bezier(.6,-.28,.735,.045)}.alertify.ajs-zoom.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-zoomIn;animation-name:ajs-zoomIn}.alertify.ajs-zoom.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-zoomOut;animation-name:ajs-zoomOut}.alertify.ajs-fade.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-fadeIn;animation-name:ajs-fadeIn}.alertify.ajs-fade.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-fadeOut;animation-name:ajs-fadeOut}.alertify.ajs-pulse.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-pulseIn;animation-name:ajs-pulseIn}.alertify.ajs-pulse.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-pulseOut;animation-name:ajs-pulseOut}.alertify.ajs-flipx.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-flipInX;animation-name:ajs-flipInX}.alertify.ajs-flipx.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-flipOutX;animation-name:ajs-flipOutX}.alertify.ajs-flipy.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-flipInY;animation-name:ajs-flipInY}.alertify.ajs-flipy.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-flipOutY;animation-name:ajs-flipOutY}@-webkit-keyframes ajs-pulseIn{0%,100%,20%,40%,60%,80%{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes ajs-pulseIn{0%,100%,20%,40%,60%,80%{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@-webkit-keyframes ajs-pulseOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes ajs-pulseOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@-webkit-keyframes ajs-zoomIn{0%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes ajs-zoomIn{0%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@-webkit-keyframes ajs-zoomOut{0%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}100%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}}@keyframes ajs-zoomOut{0%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}100%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}}@-webkit-keyframes ajs-fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes ajs-fadeIn{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes ajs-fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes ajs-fadeOut{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes ajs-flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes ajs-flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@-webkit-keyframes ajs-flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@keyframes ajs-flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@-webkit-keyframes ajs-flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes ajs-flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@-webkit-keyframes ajs-flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}@keyframes ajs-flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}@-webkit-keyframes ajs-slideIn{0%{margin-top:-100%}100%{margin-top:5%}}@keyframes ajs-slideIn{0%{margin-top:-100%}100%{margin-top:5%}}@-webkit-keyframes ajs-slideOut{0%{margin-top:5%}100%{margin-top:-100%}}@keyframes ajs-slideOut{0%{margin-top:5%}100%{margin-top:-100%}}.alertify-notifier{position:fixed;width:0;overflow:visible;z-index:1982;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.alertify-notifier .ajs-message{position:relative;width:260px;max-height:0;padding:0;opacity:0;margin:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition-duration:250ms;transition-duration:250ms;-webkit-transition-timing-function:linear;transition-timing-function:linear}.alertify-notifier .ajs-message.ajs-visible{-webkit-transition-duration:.5s;transition-duration:.5s;-webkit-transition-timing-function:cubic-bezier(.175,.885,.32,1.275);transition-timing-function:cubic-bezier(.175,.885,.32,1.275);opacity:1;max-height:100%;padding:15px;margin-top:10px}.alertify-notifier .ajs-message.ajs-success{background:rgba(91,189,114,.95)}.alertify-notifier .ajs-message.ajs-error{background:rgba(217,92,92,.95)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95)}.alertify-notifier .ajs-message .ajs-close{position:absolute;top:0;right:0;width:16px;height:16px;cursor:pointer;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAABGdBTUEAALGPC/xhBQAAAFBJREFUGBl1j0EKADEIA+ve/P9f9bh1hEihNBfjVCO1v7RKVqJK4h8gM5cAPR42AkQEpSXPwMTyoi13n5N9YqJehm3Fnr7nL1D0ZEbD5OubGyC7a9gx+9eNAAAAAElFTkSuQmCC);background-repeat:no-repeat;background-position:center center;background-color:rgba(0,0,0,.5);border-top-right-radius:2px}.alertify-notifier.ajs-top{top:10px}.alertify-notifier.ajs-bottom{bottom:10px}.alertify-notifier.ajs-right{right:10px}.alertify-notifier.ajs-right .ajs-message{right:-320px}.alertify-notifier.ajs-right .ajs-message.ajs-visible{right:290px}.alertify-notifier.ajs-left{left:10px}.alertify-notifier.ajs-left .ajs-message{left:-300px}.alertify-notifier.ajs-left .ajs-message.ajs-visible{left:0}.alertify-notifier.ajs-center{left:50%}.alertify-notifier.ajs-center .ajs-message{-webkit-transform:translateX(-50%);transform:translateX(-50%)}.alertify-notifier.ajs-center .ajs-message.ajs-visible{left:50%;-webkit-transition-timing-function:cubic-bezier(.57,.43,.1,.65);transition-timing-function:cubic-bezier(.57,.43,.1,.65)}.alertify-notifier.ajs-center.ajs-top .ajs-message{top:-300px}.alertify-notifier.ajs-center.ajs-top .ajs-message.ajs-visible{top:0}.alertify-notifier.ajs-center.ajs-bottom .ajs-message{bottom:-300px}.alertify-notifier.ajs-center.ajs-bottom .ajs-message.ajs-visible{bottom:0}.ajs-no-transition.alertify .ajs-dialog,.ajs-no-transition.alertify .ajs-dimmer,.ajs-no-transition.alertify .ajs-modal{-webkit-transition:none!important;transition:none!important;-webkit-animation:none!important;animation:none!important}.ajs-no-transition.alertify-notifier .ajs-message{-webkit-transition:none!important;transition:none!important;-webkit-animation:none!important;animation:none!important}@media (prefers-reduced-motion:reduce){.alertify .ajs-dialog,.alertify .ajs-dimmer,.alertify .ajs-modal{-webkit-transition:none!important;transition:none!important;-webkit-animation:none!important;animation:none!important}.alertify-notifier .ajs-message{-webkit-transition:none!important;transition:none!important;-webkit-animation:none!important;animation:none!important}} \ No newline at end of file diff --git a/static/lib/alertify-1.13.1/css/alertify.rtl.min.css b/static/lib/alertify-1.13.1/css/alertify.rtl.min.css deleted file mode 100644 index f419fe6..0000000 --- a/static/lib/alertify-1.13.1/css/alertify.rtl.min.css +++ /dev/null @@ -1,6 +0,0 @@ -/** - * alertifyjs 1.13.1 http://alertifyjs.com - * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. - * Copyright 2019 Mohammad Younes (http://alertifyjs.com) - * Licensed under GPL 3 */ -.alertify .ajs-dimmer{position:fixed;z-index:1981;top:0;left:0;bottom:0;right:0;padding:0;margin:0;background-color:#252525;opacity:.5}.alertify .ajs-modal{position:fixed;top:0;left:0;right:0;bottom:0;padding:0;overflow-y:auto;z-index:1981}.alertify .ajs-dialog{position:relative;margin:5% auto;min-height:110px;max-width:500px;padding:24px 24px 0 24px;outline:0;background-color:#fff}.alertify .ajs-dialog.ajs-capture:before{content:'';position:absolute;top:0;left:0;bottom:0;right:0;display:block;z-index:1}.alertify .ajs-reset{position:absolute!important;display:inline!important;width:0!important;height:0!important;opacity:0!important}.alertify .ajs-commands{position:absolute;left:4px;margin:-14px 0 0 24px;z-index:2}.alertify .ajs-commands button{display:none;width:10px;height:10px;margin-right:10px;padding:10px;border:0;background-color:transparent;background-repeat:no-repeat;background-position:center;cursor:pointer}.alertify .ajs-commands button.ajs-close{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAh0lEQVQYlY2QsQ0EIQwEB9cBAR1CJUaI/gigDnwR6NBL/7/xWLNrZ2b8EwGotVpr7eOitWa1VjugiNB7R1UPrKrWe0dEAHBbXUqxMQbeewDmnHjvyTm7C3zDwAUd9c63YQdUVdu6EAJzzquz7HXvTiklt+H9DQFYaxFjvDqllFyMkbXWvfpXHjJrWFgdBq/hAAAAAElFTkSuQmCC)}.alertify .ajs-commands button.ajs-maximize{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAOUlEQVQYlWP8//8/AzGAhYGBgaG4uBiv6t7eXkYmooxjYGAgWiELsvHYFMCcRX2rSXcjoSBiJDbAAeD+EGu+8BZcAAAAAElFTkSuQmCC)}.alertify .ajs-header{margin:-24px;margin-bottom:0;padding:16px 24px;background-color:#fff}.alertify .ajs-body{min-height:56px}.alertify .ajs-body .ajs-content{padding:16px 16px 16px 24px}.alertify .ajs-footer{padding:4px;margin-right:-24px;margin-left:-24px;min-height:43px;background-color:#fff}.alertify .ajs-footer .ajs-buttons.ajs-primary{text-align:left}.alertify .ajs-footer .ajs-buttons.ajs-primary .ajs-button{margin:4px}.alertify .ajs-footer .ajs-buttons.ajs-auxiliary{float:right;clear:none;text-align:right}.alertify .ajs-footer .ajs-buttons.ajs-auxiliary .ajs-button{margin:4px}.alertify .ajs-footer .ajs-buttons .ajs-button{min-width:88px;min-height:35px}.alertify .ajs-handle{position:absolute;display:none;width:10px;height:10px;left:0;bottom:0;z-index:1;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMS8xNEDQYmMAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAQ0lEQVQYlaXNMQoAIAxD0dT7H657l0KX3iJuUlBUNOsPPCGJm7VDp6ryeMxMuDsAQH7owW3pyn3RS26iKxERMLN3ugOaAkaL3sWVigAAAABJRU5ErkJggg==);-webkit-transform:scaleX(-1);transform:scaleX(-1);cursor:sw-resize}.alertify.ajs-no-overflow .ajs-body .ajs-content{overflow:hidden!important}.alertify.ajs-no-padding.ajs-maximized .ajs-body .ajs-content{right:0;left:0;padding:0}.alertify.ajs-no-padding:not(.ajs-maximized) .ajs-body{margin-right:-24px;margin-left:-24px}.alertify.ajs-no-padding:not(.ajs-maximized) .ajs-body .ajs-content{padding:0}.alertify.ajs-no-padding.ajs-resizable .ajs-body .ajs-content{right:0;left:0}.alertify.ajs-maximizable .ajs-commands button.ajs-maximize,.alertify.ajs-maximizable .ajs-commands button.ajs-restore{display:inline-block}.alertify.ajs-closable .ajs-commands button.ajs-close{display:inline-block}.alertify.ajs-maximized .ajs-dialog{width:100%!important;height:100%!important;max-width:none!important;margin:0 auto!important;top:0!important;right:0!important}.alertify.ajs-maximized.ajs-modeless .ajs-modal{position:fixed!important;min-height:100%!important;max-height:none!important;margin:0!important}.alertify.ajs-maximized .ajs-commands button.ajs-maximize{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAASklEQVQYlZWQ0QkAMQhDtXRincOZX78KVtrDCwgqJNEoIB3MPLj7lRUROlpyVXGzby6zWuY+kz6tj5sBMTMAyVV3/595RbOh3cAXsww1raeiOcoAAAAASUVORK5CYII=)}.alertify.ajs-maximized .ajs-dialog,.alertify.ajs-resizable .ajs-dialog{padding:0}.alertify.ajs-maximized .ajs-commands,.alertify.ajs-resizable .ajs-commands{margin:14px 0 0 24px}.alertify.ajs-maximized .ajs-header,.alertify.ajs-resizable .ajs-header{position:absolute;top:0;right:0;left:0;margin:0;padding:16px 24px}.alertify.ajs-maximized .ajs-body,.alertify.ajs-resizable .ajs-body{min-height:224px;display:inline-block}.alertify.ajs-maximized .ajs-body .ajs-content,.alertify.ajs-resizable .ajs-body .ajs-content{position:absolute;top:50px;left:24px;bottom:50px;right:24px;overflow:auto}.alertify.ajs-maximized .ajs-footer,.alertify.ajs-resizable .ajs-footer{position:absolute;right:0;left:0;bottom:0;margin:0}.alertify.ajs-resizable:not(.ajs-maximized) .ajs-dialog{min-width:548px}.alertify.ajs-resizable:not(.ajs-maximized) .ajs-handle{display:block}.alertify.ajs-movable:not(.ajs-maximized) .ajs-header{cursor:move}.alertify.ajs-modeless .ajs-dimmer,.alertify.ajs-modeless .ajs-reset{display:none}.alertify.ajs-modeless .ajs-modal{overflow:visible;max-width:none;max-height:0}.alertify.ajs-modeless.ajs-pinnable .ajs-commands button.ajs-pin{display:inline-block;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAQklEQVQYlcWPMQ4AIAwCqU9u38GbcbHRWN1MvKQDhQFMEpKImGJA0gCgnYw0V0rwxseg5erT4oSkQVI5d9f+e9+xA0NbLpWfitPXAAAAAElFTkSuQmCC)}.alertify.ajs-modeless.ajs-unpinned .ajs-modal{position:absolute}.alertify.ajs-modeless.ajs-unpinned .ajs-commands button.ajs-pin{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAO0lEQVQYlWP8//8/AzGAiShV6AqLi4txGs+CLoBLMYbC3t5eRmyaWfBZhwwYkX2NTxPRvibKjRhW4wMAhxkYGbLu3pEAAAAASUVORK5CYII=)}.alertify.ajs-modeless:not(.ajs-unpinned) .ajs-body{max-height:500px;overflow:auto}.alertify.ajs-basic .ajs-header{opacity:0}.alertify.ajs-basic .ajs-footer{visibility:hidden}.alertify.ajs-frameless .ajs-header{position:absolute;top:0;right:0;left:0;min-height:60px;margin:0;padding:0;opacity:0;z-index:1}.alertify.ajs-frameless .ajs-footer{display:none}.alertify.ajs-frameless .ajs-body .ajs-content{position:absolute;top:0;left:0;bottom:0;right:0}.alertify.ajs-frameless:not(.ajs-resizable) .ajs-dialog{padding-top:0}.alertify.ajs-frameless:not(.ajs-resizable) .ajs-dialog .ajs-commands{margin-top:0}.ajs-no-overflow{overflow:hidden!important;outline:0}.ajs-no-overflow.ajs-fixed{position:fixed;top:0;left:0;bottom:0;right:0;overflow-y:scroll!important}.ajs-no-selection,.ajs-no-selection *{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media screen and (max-width:568px){.alertify .ajs-dialog{min-width:150px}.alertify:not(.ajs-maximized) .ajs-modal{padding:0 5%}.alertify:not(.ajs-maximized).ajs-resizable .ajs-dialog{min-width:initial;min-width:auto}}@-moz-document url-prefix(){.alertify button:focus{outline:1px dotted #3593d2}}.alertify .ajs-dimmer,.alertify .ajs-modal{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition-property:opacity,visibility;transition-property:opacity,visibility;-webkit-transition-timing-function:linear;transition-timing-function:linear;-webkit-transition-duration:250ms;transition-duration:250ms}.alertify.ajs-hidden .ajs-dimmer,.alertify.ajs-hidden .ajs-modal{visibility:hidden;opacity:0}.alertify.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-duration:.5s;animation-duration:.5s}.alertify.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-duration:250ms;animation-duration:250ms}.alertify .ajs-dialog.ajs-shake{-webkit-animation-name:ajs-shake;animation-name:ajs-shake;-webkit-animation-duration:.1s;animation-duration:.1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}@-webkit-keyframes ajs-shake{0%,100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}}@keyframes ajs-shake{0%,100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}}.alertify.ajs-slide.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-slideIn;animation-name:ajs-slideIn;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1.275);animation-timing-function:cubic-bezier(.175,.885,.32,1.275)}.alertify.ajs-slide.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-slideOut;animation-name:ajs-slideOut;-webkit-animation-timing-function:cubic-bezier(.6,-.28,.735,.045);animation-timing-function:cubic-bezier(.6,-.28,.735,.045)}.alertify.ajs-zoom.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-zoomIn;animation-name:ajs-zoomIn}.alertify.ajs-zoom.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-zoomOut;animation-name:ajs-zoomOut}.alertify.ajs-fade.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-fadeIn;animation-name:ajs-fadeIn}.alertify.ajs-fade.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-fadeOut;animation-name:ajs-fadeOut}.alertify.ajs-pulse.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-pulseIn;animation-name:ajs-pulseIn}.alertify.ajs-pulse.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-pulseOut;animation-name:ajs-pulseOut}.alertify.ajs-flipx.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-flipInX;animation-name:ajs-flipInX}.alertify.ajs-flipx.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-flipOutX;animation-name:ajs-flipOutX}.alertify.ajs-flipy.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-flipInY;animation-name:ajs-flipInY}.alertify.ajs-flipy.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-flipOutY;animation-name:ajs-flipOutY}@-webkit-keyframes ajs-pulseIn{0%,100%,20%,40%,60%,80%{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes ajs-pulseIn{0%,100%,20%,40%,60%,80%{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@-webkit-keyframes ajs-pulseOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes ajs-pulseOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@-webkit-keyframes ajs-zoomIn{0%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes ajs-zoomIn{0%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@-webkit-keyframes ajs-zoomOut{0%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}100%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}}@keyframes ajs-zoomOut{0%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}100%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}}@-webkit-keyframes ajs-fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes ajs-fadeIn{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes ajs-fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes ajs-fadeOut{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes ajs-flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-90deg);transform:perspective(400px) rotate3d(1,0,0,-90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,20deg);transform:perspective(400px) rotate3d(1,0,0,20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-10deg);transform:perspective(400px) rotate3d(1,0,0,-10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,5deg);transform:perspective(400px) rotate3d(1,0,0,5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes ajs-flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-90deg);transform:perspective(400px) rotate3d(1,0,0,-90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,20deg);transform:perspective(400px) rotate3d(1,0,0,20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-10deg);transform:perspective(400px) rotate3d(1,0,0,-10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,5deg);transform:perspective(400px) rotate3d(1,0,0,5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@-webkit-keyframes ajs-flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,20deg);transform:perspective(400px) rotate3d(1,0,0,20deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-90deg);transform:perspective(400px) rotate3d(1,0,0,-90deg);opacity:0}}@keyframes ajs-flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,20deg);transform:perspective(400px) rotate3d(1,0,0,20deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-90deg);transform:perspective(400px) rotate3d(1,0,0,-90deg);opacity:0}}@-webkit-keyframes ajs-flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,-90deg);transform:perspective(400px) rotate3d(0,-1,0,-90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,20deg);transform:perspective(400px) rotate3d(0,-1,0,20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,-10deg);transform:perspective(400px) rotate3d(0,-1,0,-10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,5deg);transform:perspective(400px) rotate3d(0,-1,0,5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes ajs-flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,-90deg);transform:perspective(400px) rotate3d(0,-1,0,-90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,20deg);transform:perspective(400px) rotate3d(0,-1,0,20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,-10deg);transform:perspective(400px) rotate3d(0,-1,0,-10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,5deg);transform:perspective(400px) rotate3d(0,-1,0,5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@-webkit-keyframes ajs-flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,15deg);transform:perspective(400px) rotate3d(0,-1,0,15deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,-90deg);transform:perspective(400px) rotate3d(0,-1,0,-90deg);opacity:0}}@keyframes ajs-flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,15deg);transform:perspective(400px) rotate3d(0,-1,0,15deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,-90deg);transform:perspective(400px) rotate3d(0,-1,0,-90deg);opacity:0}}@-webkit-keyframes ajs-slideIn{0%{margin-top:-100%}100%{margin-top:5%}}@keyframes ajs-slideIn{0%{margin-top:-100%}100%{margin-top:5%}}@-webkit-keyframes ajs-slideOut{0%{margin-top:5%}100%{margin-top:-100%}}@keyframes ajs-slideOut{0%{margin-top:5%}100%{margin-top:-100%}}.alertify-notifier{position:fixed;width:0;overflow:visible;z-index:1982;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.alertify-notifier .ajs-message{position:relative;width:260px;max-height:0;padding:0;opacity:0;margin:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition-duration:250ms;transition-duration:250ms;-webkit-transition-timing-function:linear;transition-timing-function:linear}.alertify-notifier .ajs-message.ajs-visible{-webkit-transition-duration:.5s;transition-duration:.5s;-webkit-transition-timing-function:cubic-bezier(.175,.885,.32,1.275);transition-timing-function:cubic-bezier(.175,.885,.32,1.275);opacity:1;max-height:100%;padding:15px;margin-top:10px}.alertify-notifier .ajs-message.ajs-success{background:rgba(91,189,114,.95)}.alertify-notifier .ajs-message.ajs-error{background:rgba(217,92,92,.95)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95)}.alertify-notifier .ajs-message .ajs-close{position:absolute;top:0;left:0;width:16px;height:16px;cursor:pointer;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAABGdBTUEAALGPC/xhBQAAAFBJREFUGBl1j0EKADEIA+ve/P9f9bh1hEihNBfjVCO1v7RKVqJK4h8gM5cAPR42AkQEpSXPwMTyoi13n5N9YqJehm3Fnr7nL1D0ZEbD5OubGyC7a9gx+9eNAAAAAElFTkSuQmCC);background-repeat:no-repeat;background-position:center center;background-color:rgba(0,0,0,.5);border-top-left-radius:2px}.alertify-notifier.ajs-top{top:10px}.alertify-notifier.ajs-bottom{bottom:10px}.alertify-notifier.ajs-right{left:10px}.alertify-notifier.ajs-right .ajs-message{left:-320px}.alertify-notifier.ajs-right .ajs-message.ajs-visible{left:290px}.alertify-notifier.ajs-left{right:10px}.alertify-notifier.ajs-left .ajs-message{right:-300px}.alertify-notifier.ajs-left .ajs-message.ajs-visible{right:0}.alertify-notifier.ajs-center{right:50%}.alertify-notifier.ajs-center .ajs-message{-webkit-transform:translateX(50%);transform:translateX(50%)}.alertify-notifier.ajs-center .ajs-message.ajs-visible{right:50%;-webkit-transition-timing-function:cubic-bezier(.57,.43,.1,.65);transition-timing-function:cubic-bezier(.57,.43,.1,.65)}.alertify-notifier.ajs-center.ajs-top .ajs-message{top:-300px}.alertify-notifier.ajs-center.ajs-top .ajs-message.ajs-visible{top:0}.alertify-notifier.ajs-center.ajs-bottom .ajs-message{bottom:-300px}.alertify-notifier.ajs-center.ajs-bottom .ajs-message.ajs-visible{bottom:0}.ajs-no-transition.alertify .ajs-dialog,.ajs-no-transition.alertify .ajs-dimmer,.ajs-no-transition.alertify .ajs-modal{-webkit-transition:none!important;transition:none!important;-webkit-animation:none!important;animation:none!important}.ajs-no-transition.alertify-notifier .ajs-message{-webkit-transition:none!important;transition:none!important;-webkit-animation:none!important;animation:none!important}@media (prefers-reduced-motion:reduce){.alertify .ajs-dialog,.alertify .ajs-dimmer,.alertify .ajs-modal{-webkit-transition:none!important;transition:none!important;-webkit-animation:none!important;animation:none!important}.alertify-notifier .ajs-message{-webkit-transition:none!important;transition:none!important;-webkit-animation:none!important;animation:none!important}} \ No newline at end of file diff --git a/static/lib/alertify-1.13.1/alertify.js b/static/lib/alertify-1.14.0/alertify.js similarity index 95% rename from static/lib/alertify-1.13.1/alertify.js rename to static/lib/alertify-1.14.0/alertify.js index 5d620ff..5467801 100644 --- a/static/lib/alertify-1.13.1/alertify.js +++ b/static/lib/alertify-1.14.0/alertify.js @@ -1,3660 +1,3671 @@ -/** - * alertifyjs 1.13.1 http://alertifyjs.com - * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. - * Copyright 2019 Mohammad Younes (http://alertifyjs.com) - * Licensed under GPL 3 */ -( function ( window ) { - 'use strict'; - var NOT_DISABLED_NOT_RESET = ':not(:disabled):not(.ajs-reset)'; - /** - * Keys enum - * @type {Object} - */ - var keys = { - ENTER: 13, - ESC: 27, - F1: 112, - F12: 123, - LEFT: 37, - RIGHT: 39, - TAB: 9 - }; - /** - * Default options - * @type {Object} - */ - var defaults = { - autoReset:true, - basic:false, - closable:true, - closableByDimmer:true, - invokeOnCloseOff:false, - frameless:false, - defaultFocusOff:false, - maintainFocus:true, //global default not per instance, applies to all dialogs - maximizable:true, - modal:true, - movable:true, - moveBounded:false, - overflow:true, - padding: true, - pinnable:true, - pinned:true, - preventBodyShift:false, //global default not per instance, applies to all dialogs - resizable:true, - startMaximized:false, - transition:'pulse', - transitionOff:false, - tabbable:['button', '[href]', 'input', 'select', 'textarea', '[tabindex]:not([tabindex^="-"])'+NOT_DISABLED_NOT_RESET].join(NOT_DISABLED_NOT_RESET+','),//global - notifier:{ - delay:5, - position:'bottom-right', - closeButton:false, - classes: { - base: 'alertify-notifier', - prefix:'ajs-', - message: 'ajs-message', - top: 'ajs-top', - right: 'ajs-right', - bottom: 'ajs-bottom', - left: 'ajs-left', - center: 'ajs-center', - visible: 'ajs-visible', - hidden: 'ajs-hidden', - close: 'ajs-close' - } - }, - glossary:{ - title:'AlertifyJS', - ok: 'OK', - cancel: 'Cancel', - acccpt: 'Accept', - deny: 'Deny', - confirm: 'Confirm', - decline: 'Decline', - close: 'Close', - maximize: 'Maximize', - restore: 'Restore', - }, - theme:{ - input:'ajs-input', - ok:'ajs-ok', - cancel:'ajs-cancel', - }, - hooks:{ - preinit:function(){}, - postinit:function(){} - } - }; - - //holds open dialogs instances - var openDialogs = []; - - /** - * [Helper] Adds the specified class(es) to the element. - * - * @element {node} The element - * @className {string} One or more space-separated classes to be added to the class attribute of the element. - * - * @return {undefined} - */ - function addClass(element,classNames){ - element.className += ' ' + classNames; - } - - /** - * [Helper] Removes the specified class(es) from the element. - * - * @element {node} The element - * @className {string} One or more space-separated classes to be removed from the class attribute of the element. - * - * @return {undefined} - */ - function removeClass(element, classNames) { - var original = element.className.split(' '); - var toBeRemoved = classNames.split(' '); - for (var x = 0; x < toBeRemoved.length; x += 1) { - var index = original.indexOf(toBeRemoved[x]); - if (index > -1){ - original.splice(index,1); - } - } - element.className = original.join(' '); - } - - /** - * [Helper] Checks if the document is RTL - * - * @return {Boolean} True if the document is RTL, false otherwise. - */ - function isRightToLeft(){ - return window.getComputedStyle(document.body).direction === 'rtl'; - } - /** - * [Helper] Get the document current scrollTop - * - * @return {Number} current document scrollTop value - */ - function getScrollTop(){ - return ((document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop); - } - - /** - * [Helper] Get the document current scrollLeft - * - * @return {Number} current document scrollLeft value - */ - function getScrollLeft(){ - return ((document.documentElement && document.documentElement.scrollLeft) || document.body.scrollLeft); - } - - /** - * Helper: clear contents - * - */ - function clearContents(element){ - while (element.lastChild) { - element.removeChild(element.lastChild); - } - } - /** - * Extends a given prototype by merging properties from base into sub. - * - * @sub {Object} sub The prototype being overwritten. - * @base {Object} base The prototype being written. - * - * @return {Object} The extended prototype. - */ - function copy(src) { - if(null === src){ - return src; - } - var cpy; - if(Array.isArray(src)){ - cpy = []; - for(var x=0;x 0) { - var args = []; - for (var x = 0; x < arguments.length; x += 1) { - args.push(arguments[x]); - } - args.push(context); - return method.apply(context, args); - } - return method.apply(context, [null, context]); - }; - } - /** - * Helper for creating a dialog close event. - * - * @return {object} - */ - function createCloseEvent(index, button) { - return { - index: index, - button: button, - cancel: false - }; - } - /** - * Helper for dispatching events. - * - * @param {string} evenType The type of the event to disptach. - * @param {object} instance The dialog instance disptaching the event. - * - * @return {any} The result of the invoked function. - */ - function dispatchEvent(eventType, instance) { - if ( typeof instance.get(eventType) === 'function' ) { - return instance.get(eventType).call(instance); - } - } - - - /** - * Super class for all dialogs - * - * @return {Object} base dialog prototype - */ - var dialog = (function () { - var //holds the list of used keys. - usedKeys = [], - //dummy variable, used to trigger dom reflow. - reflow = null, - //holds body tab index in case it has any. - tabindex = false, - //condition for detecting safari - isSafari = window.navigator.userAgent.indexOf('Safari') > -1 && window.navigator.userAgent.indexOf('Chrome') < 0, - //dialog building blocks - templates = { - dimmer:'
', - /*tab index required to fire click event before body focus*/ - modal: '
', - dialog: '
', - reset: '', - commands: '
', - header: '
', - body: '
', - content: '
', - footer: '', - buttons: { primary: '
', auxiliary: '
' }, - button: '', - resizeHandle: '
', - }, - //common class names - classes = { - animationIn: 'ajs-in', - animationOut: 'ajs-out', - base: 'alertify', - basic:'ajs-basic', - capture: 'ajs-capture', - closable:'ajs-closable', - fixed: 'ajs-fixed', - frameless:'ajs-frameless', - hidden: 'ajs-hidden', - maximize: 'ajs-maximize', - maximized: 'ajs-maximized', - maximizable:'ajs-maximizable', - modeless: 'ajs-modeless', - movable: 'ajs-movable', - noSelection: 'ajs-no-selection', - noOverflow: 'ajs-no-overflow', - noPadding:'ajs-no-padding', - pin:'ajs-pin', - pinnable:'ajs-pinnable', - prefix: 'ajs-', - resizable: 'ajs-resizable', - restore: 'ajs-restore', - shake:'ajs-shake', - unpinned:'ajs-unpinned', - noTransition:'ajs-no-transition' - }; - - /** - * Helper: initializes the dialog instance - * - * @return {Number} The total count of currently open modals. - */ - function initialize(instance){ - - if(!instance.__internal){ - //invoke preinit global hook - alertify.defaults.hooks.preinit(instance); - //no need to expose init after this. - delete instance.__init; - - //keep a copy of initial dialog settings - if(!instance.__settings){ - instance.__settings = copy(instance.settings); - } - - //get dialog buttons/focus setup - var setup; - if(typeof instance.setup === 'function'){ - setup = instance.setup(); - setup.options = setup.options || {}; - setup.focus = setup.focus || {}; - }else{ - setup = { - buttons:[], - focus:{ - element:null, - select:false - }, - options:{ - } - }; - } - - //initialize hooks object. - if(typeof instance.hooks !== 'object'){ - instance.hooks = {}; - } - - //copy buttons defintion - var buttonsDefinition = []; - if(Array.isArray(setup.buttons)){ - for(var b=0;b= 0){ - //last open modal or last maximized one - removeClass(document.body, classes.noOverflow); - preventBodyShift(false); - }else if(requiresNoOverflow > 0 && document.body.className.indexOf(classes.noOverflow) < 0){ - //first open modal or first maximized one - preventBodyShift(true); - addClass(document.body, classes.noOverflow); - } - } - var top = '', topScroll = 0; - /** - * Helper: prevents body shift. - * - */ - function preventBodyShift(add){ - if(alertify.defaults.preventBodyShift){ - if(add && document.documentElement.scrollHeight > document.documentElement.clientHeight ){//&& openDialogs[openDialogs.length-1].elements.dialog.clientHeight <= document.documentElement.clientHeight){ - topScroll = scrollY; - top = window.getComputedStyle(document.body).top; - addClass(document.body, classes.fixed); - document.body.style.top = -scrollY + 'px'; - } else if(!add) { - scrollY = topScroll; - document.body.style.top = top; - removeClass(document.body, classes.fixed); - restoreScrollPosition(); - } - } - } - - /** - * Sets the name of the transition used to show/hide the dialog - * - * @param {Object} instance The dilog instance. - * - */ - function updateTransition(instance, value, oldValue){ - if(typeof oldValue === 'string'){ - removeClass(instance.elements.root,classes.prefix + oldValue); - } - addClass(instance.elements.root, classes.prefix + value); - reflow = instance.elements.root.offsetWidth; - } - - /** - * Toggles the dialog no transition - * - * @param {Object} instance The dilog instance. - * - * @return {undefined} - */ - function updateTransitionOff(instance){ - if (instance.get('transitionOff')) { - // add class - addClass(instance.elements.root, classes.noTransition); - } else { - // remove class - removeClass(instance.elements.root, classes.noTransition); - } - } - - /** - * Toggles the dialog display mode - * - * @param {Object} instance The dilog instance. - * - * @return {undefined} - */ - function updateDisplayMode(instance){ - if(instance.get('modal')){ - - //make modal - removeClass(instance.elements.root, classes.modeless); - - //only if open - if(instance.isOpen()){ - unbindModelessEvents(instance); - - //in case a pinned modless dialog was made modal while open. - updateAbsPositionFix(instance); - - ensureNoOverflow(); - } - }else{ - //make modelss - addClass(instance.elements.root, classes.modeless); - - //only if open - if(instance.isOpen()){ - bindModelessEvents(instance); - - //in case pin/unpin was called while a modal is open - updateAbsPositionFix(instance); - - ensureNoOverflow(); - } - } - } - - /** - * Toggles the dialog basic view mode - * - * @param {Object} instance The dilog instance. - * - * @return {undefined} - */ - function updateBasicMode(instance){ - if (instance.get('basic')) { - // add class - addClass(instance.elements.root, classes.basic); - } else { - // remove class - removeClass(instance.elements.root, classes.basic); - } - } - - /** - * Toggles the dialog frameless view mode - * - * @param {Object} instance The dilog instance. - * - * @return {undefined} - */ - function updateFramelessMode(instance){ - if (instance.get('frameless')) { - // add class - addClass(instance.elements.root, classes.frameless); - } else { - // remove class - removeClass(instance.elements.root, classes.frameless); - } - } - - /** - * Helper: Brings the modeless dialog to front, attached to modeless dialogs. - * - * @param {Event} event Focus event - * @param {Object} instance The dilog instance. - * - * @return {undefined} - */ - function bringToFront(event, instance){ - - // Do not bring to front if preceeded by an open modal - var index = openDialogs.indexOf(instance); - for(var x=index+1;x 200 && (modalClickHandlerTS = event.timeStamp) && !cancelClick){ - var target = event.srcElement || event.target; - if (instance.get('closableByDimmer') === true && target === instance.elements.modal) { - triggerClose(instance); - } - } - cancelClick = false; - } - - // stores last call timestamp to prevent triggering the callback twice. - var callbackTS = 0; - // flag to cancel keyup event if already handled by click event (pressing Enter on a focusted button). - var cancelKeyup = false; - /** - * Helper: triggers a button callback - * - * @param {Object} The dilog instance. - * @param {Function} Callback to check which button triggered the event. - * - * @return {undefined} - */ - function triggerCallback(instance, check) { - if(Date.now() - callbackTS > 200 && (callbackTS = Date.now())){ - for (var idx = 0; idx < instance.__internal.buttons.length; idx += 1) { - var button = instance.__internal.buttons[idx]; - if (!button.element.disabled && check(button)) { - var closeEvent = createCloseEvent(idx, button); - if (typeof instance.callback === 'function') { - instance.callback.apply(instance, [closeEvent]); - } - //close the dialog only if not canceled. - if (closeEvent.cancel === false) { - instance.close(); - } - break; - } - } - } - } - - /** - * Clicks event handler, attached to the dialog footer. - * - * @param {Event} DOM event object. - * @param {Object} The dilog instance. - * - * @return {undefined} - */ - function buttonsClickHandler(event, instance) { - var target = event.srcElement || event.target; - triggerCallback(instance, function (button) { - // if this button caused the click, cancel keyup event - return button.element === target && (cancelKeyup = true); - }); - } - - /** - * Keyup event handler, attached to the document.body - * - * @param {Event} DOM event object. - * @param {Object} The dilog instance. - * - * @return {undefined} - */ - function keyupHandler(event) { - //hitting enter while button has focus will trigger keyup too. - //ignore if handled by clickHandler - if (cancelKeyup) { - cancelKeyup = false; - return; - } - var instance = openDialogs[openDialogs.length - 1]; - var keyCode = event.keyCode; - if (instance.__internal.buttons.length === 0 && keyCode === keys.ESC && instance.get('closable') === true) { - triggerClose(instance); - return false; - }else if (usedKeys.indexOf(keyCode) > -1) { - triggerCallback(instance, function (button) { - return button.key === keyCode; - }); - return false; - } - } - /** - * Keydown event handler, attached to the document.body - * - * @param {Event} DOM event object. - * @param {Object} The dilog instance. - * - * @return {undefined} - */ - function keydownHandler(event) { - var instance = openDialogs[openDialogs.length - 1]; - var keyCode = event.keyCode; - if (keyCode === keys.LEFT || keyCode === keys.RIGHT) { - var buttons = instance.__internal.buttons; - for (var x = 0; x < buttons.length; x += 1) { - if (document.activeElement === buttons[x].element) { - switch (keyCode) { - case keys.LEFT: - buttons[(x || buttons.length) - 1].element.focus(); - return; - case keys.RIGHT: - buttons[(x + 1) % buttons.length].element.focus(); - return; - } - } - } - }else if (keyCode < keys.F12 + 1 && keyCode > keys.F1 - 1 && usedKeys.indexOf(keyCode) > -1) { - event.preventDefault(); - event.stopPropagation(); - triggerCallback(instance, function (button) { - return button.key === keyCode; - }); - return false; - } - } - - - /** - * Sets focus to proper dialog element - * - * @param {Object} instance The dilog instance. - * @param {Node} [resetTarget=undefined] DOM element to reset focus to. - * - * @return {undefined} - */ - function setFocus(instance, resetTarget) { - // reset target has already been determined. - if (resetTarget) { - resetTarget.focus(); - } else { - // current instance focus settings - var focus = instance.__internal.focus; - // the focus element. - var element = focus.element; - - switch (typeof focus.element) { - // a number means a button index - case 'number': - if (instance.__internal.buttons.length > focus.element) { - //in basic view, skip focusing the buttons. - if (instance.get('basic') === true) { - element = instance.elements.reset[0]; - } else { - element = instance.__internal.buttons[focus.element].element; - } - } - break; - // a string means querySelector to select from dialog body contents. - case 'string': - element = instance.elements.body.querySelector(focus.element); - break; - // a function should return the focus element. - case 'function': - element = focus.element.call(instance); - break; - } - - // if no focus element, default to first reset element. - if (instance.get('defaultFocusOff') === true || ((typeof element === 'undefined' || element === null) && instance.__internal.buttons.length === 0)) { - element = instance.elements.reset[0]; - } - // focus - if (element && element.focus) { - element.focus(); - // if selectable - if (focus.select && element.select) { - element.select(); - } - } - } - } - - /** - * Focus event handler, attached to document.body and dialogs own reset links. - * handles the focus for modal dialogs only. - * - * @param {Event} event DOM focus event object. - * @param {Object} instance The dilog instance. - * - * @return {undefined} - */ - function onReset(event, instance) { - - // should work on last modal if triggered from document.body - if (!instance) { - for (var x = openDialogs.length - 1; x > -1; x -= 1) { - if (openDialogs[x].isModal()) { - instance = openDialogs[x]; - break; - } - } - } - - if(instance) { - // if modal - if (instance.isModal()) { - // determine reset target to enable forward/backward tab cycle. - var firstReset = instance.elements.reset[0], - lastReset = instance.elements.reset[1], - lastFocusedElement = event.relatedTarget, - within = instance.elements.root.contains(lastFocusedElement), - target = event.srcElement || event.target, - resetTarget; - - //if the previous focused element element was outside the modal do nthing - if( /*first show */ - (target === firstReset && !within) || - /*focus cycle */ - (target === lastReset && lastFocusedElement === firstReset)){ - return; - }else if(target === lastReset || target === document.body){ - resetTarget = firstReset; - }else if(target === firstReset && lastFocusedElement === lastReset){ - resetTarget = findTabbable(instance); - }else if(target === firstReset && within){ - resetTarget = findTabbable(instance, true); - } - // focus - setFocus(instance, resetTarget); - } - } - } - function findTabbable(instance, last){ - var tabbables = [].slice.call(instance.elements.dialog.querySelectorAll(defaults.tabbable)); - if(last){ - tabbables.reverse(); - } - for(var x=0;x startingWidth) { - //growing - element.style.left = (startingLeft + diff) + 'px'; - } else if (element.offsetWidth >= minWidth) { - //shrinking - element.style.left = (startingLeft - diff) + 'px'; - } - } - } - - /** - * Triggers the start of a resize event, attached to the resize handle element mouse down event. - * Adds no-selection class to the body, disabling selection while moving. - * - * @param {Event} event DOM event object. - * @param {Object} instance The dilog instance. - * - * @return {Boolean} false - */ - function beginResize(event, instance) { - if (!instance.isMaximized()) { - var eventSrc; - if (event.type === 'touchstart') { - event.preventDefault(); - eventSrc = event.targetTouches[0]; - } else if (event.button === 0) { - eventSrc = event; - } - if (eventSrc) { - // allow custom `onresize` method - dispatchEvent('onresize', instance); - - resizable = instance; - handleOffset = instance.elements.resizeHandle.offsetHeight / 2; - var element = instance.elements.dialog; - addClass(element, classes.capture); - startingLeft = parseInt(element.style.left, 10); - element.style.height = element.offsetHeight + 'px'; - element.style.minHeight = instance.elements.header.offsetHeight + instance.elements.footer.offsetHeight + 'px'; - element.style.width = (startingWidth = element.offsetWidth) + 'px'; - - if (element.style.maxWidth !== 'none') { - element.style.minWidth = (minWidth = element.offsetWidth) + 'px'; - } - element.style.maxWidth = 'none'; - addClass(document.body, classes.noSelection); - return false; - } - } - } - - /** - * The actual resize handler, attached to document.body mousemove event. - * - * @param {Event} event DOM event object. - * - * @return {undefined} - */ - function resize(event) { - if (resizable) { - var eventSrc; - if (event.type === 'touchmove') { - event.preventDefault(); - eventSrc = event.targetTouches[0]; - } else if (event.button === 0) { - eventSrc = event; - } - if (eventSrc) { - resizeElement(eventSrc, resizable.elements.dialog, !resizable.get('modal') && !resizable.get('pinned')); - } - } - } - - /** - * Triggers the end of a resize event, attached to document.body mouseup event. - * Removes no-selection class from document.body, allowing selection. - * - * @return {undefined} - */ - function endResize() { - if (resizable) { - var instance = resizable; - resizable = null; - removeClass(document.body, classes.noSelection); - removeClass(instance.elements.dialog, classes.capture); - cancelClick = true; - // allow custom `onresized` method - dispatchEvent('onresized', instance); - } - } - - /** - * Resets any changes made by resizing the element to its original state. - * - * @param {Object} instance The dilog instance. - * - * @return {undefined} - */ - function resetResize(instance) { - resizable = null; - var element = instance.elements.dialog; - if (element.style.maxWidth === 'none') { - //clear inline styles. - element.style.maxWidth = element.style.minWidth = element.style.width = element.style.height = element.style.minHeight = element.style.left = ''; - //reset variables. - startingLeft = Number.Nan; - startingWidth = minWidth = handleOffset = 0; - } - } - - - /** - * Updates the dialog move behavior. - * - * @param {Object} instance The dilog instance. - * @param {Boolean} on True to add the behavior, removes it otherwise. - * - * @return {undefined} - */ - function updateResizable(instance) { - if (instance.get('resizable')) { - // add class - addClass(instance.elements.root, classes.resizable); - if (instance.isOpen()) { - bindResizableEvents(instance); - } - } else { - //reset - resetResize(instance); - // remove class - removeClass(instance.elements.root, classes.resizable); - if (instance.isOpen()) { - unbindResizableEvents(instance); - } - } - } - - /** - * Reset move/resize on window resize. - * - * @param {Event} event window resize event object. - * - * @return {undefined} - */ - function windowResize(/*event*/) { - for (var x = 0; x < openDialogs.length; x += 1) { - var instance = openDialogs[x]; - if (instance.get('autoReset')) { - resetMove(instance); - resetResize(instance); - } - } - } - /** - * Bind dialogs events - * - * @param {Object} instance The dilog instance. - * - * @return {undefined} - */ - function bindEvents(instance) { - // if first dialog, hook global handlers - if (openDialogs.length === 1) { - //global - on(window, 'resize', windowResize); - on(document.body, 'keyup', keyupHandler); - on(document.body, 'keydown', keydownHandler); - on(document.body, 'focus', onReset); - - //move - on(document.documentElement, 'mousemove', move); - on(document.documentElement, 'touchmove', move, false, false); - on(document.documentElement, 'mouseup', endMove); - on(document.documentElement, 'touchend', endMove); - //resize - on(document.documentElement, 'mousemove', resize); - on(document.documentElement, 'touchmove', resize, false, false); - on(document.documentElement, 'mouseup', endResize); - on(document.documentElement, 'touchend', endResize); - } - - // common events - on(instance.elements.commands.container, 'click', instance.__internal.commandsClickHandler); - on(instance.elements.footer, 'click', instance.__internal.buttonsClickHandler); - on(instance.elements.reset[0], 'focusin', instance.__internal.resetHandler); - on(instance.elements.reset[0], 'keydown', recycleTab); - on(instance.elements.reset[1], 'focusin', instance.__internal.resetHandler); - - //prevent handling key up when dialog is being opened by a key stroke. - cancelKeyup = true; - // hook in transition handler - on(instance.elements.dialog, transition.type, instance.__internal.transitionInHandler); - - // modelss only events - if (!instance.get('modal')) { - bindModelessEvents(instance); - } - - // resizable - if (instance.get('resizable')) { - bindResizableEvents(instance); - } - - // movable - if (instance.get('movable')) { - bindMovableEvents(instance); - } - } - - /** - * Unbind dialogs events - * - * @param {Object} instance The dilog instance. - * - * @return {undefined} - */ - function unbindEvents(instance) { - // if last dialog, remove global handlers - if (openDialogs.length === 1) { - //global - off(window, 'resize', windowResize); - off(document.body, 'keyup', keyupHandler); - off(document.body, 'keydown', keydownHandler); - off(document.body, 'focus', onReset); - //move - off(document.documentElement, 'mousemove', move); - off(document.documentElement, 'mouseup', endMove); - //resize - off(document.documentElement, 'mousemove', resize); - off(document.documentElement, 'mouseup', endResize); - } - - // common events - off(instance.elements.commands.container, 'click', instance.__internal.commandsClickHandler); - off(instance.elements.footer, 'click', instance.__internal.buttonsClickHandler); - off(instance.elements.reset[0], 'focusin', instance.__internal.resetHandler); - off(instance.elements.reset[0], 'keydown', recycleTab); - off(instance.elements.reset[1], 'focusin', instance.__internal.resetHandler); - - // hook out transition handler - on(instance.elements.dialog, transition.type, instance.__internal.transitionOutHandler); - - // modelss only events - if (!instance.get('modal')) { - unbindModelessEvents(instance); - } - - // movable - if (instance.get('movable')) { - unbindMovableEvents(instance); - } - - // resizable - if (instance.get('resizable')) { - unbindResizableEvents(instance); - } - - } - - /** - * Bind modeless specific events - * - * @param {Object} instance The dilog instance. - * - * @return {undefined} - */ - function bindModelessEvents(instance) { - on(instance.elements.dialog, 'focus', instance.__internal.bringToFrontHandler, true); - } - - /** - * Unbind modeless specific events - * - * @param {Object} instance The dilog instance. - * - * @return {undefined} - */ - function unbindModelessEvents(instance) { - off(instance.elements.dialog, 'focus', instance.__internal.bringToFrontHandler, true); - } - - - - /** - * Bind movable specific events - * - * @param {Object} instance The dilog instance. - * - * @return {undefined} - */ - function bindMovableEvents(instance) { - on(instance.elements.header, 'mousedown', instance.__internal.beginMoveHandler); - on(instance.elements.header, 'touchstart', instance.__internal.beginMoveHandler, false, false); - } - - /** - * Unbind movable specific events - * - * @param {Object} instance The dilog instance. - * - * @return {undefined} - */ - function unbindMovableEvents(instance) { - off(instance.elements.header, 'mousedown', instance.__internal.beginMoveHandler); - off(instance.elements.header, 'touchstart', instance.__internal.beginMoveHandler, false, false); - } - - - - /** - * Bind resizable specific events - * - * @param {Object} instance The dilog instance. - * - * @return {undefined} - */ - function bindResizableEvents(instance) { - on(instance.elements.resizeHandle, 'mousedown', instance.__internal.beginResizeHandler); - on(instance.elements.resizeHandle, 'touchstart', instance.__internal.beginResizeHandler, false, false); - } - - /** - * Unbind resizable specific events - * - * @param {Object} instance The dilog instance. - * - * @return {undefined} - */ - function unbindResizableEvents(instance) { - off(instance.elements.resizeHandle, 'mousedown', instance.__internal.beginResizeHandler); - off(instance.elements.resizeHandle, 'touchstart', instance.__internal.beginResizeHandler, false, false); - } - - /** - * Bind closable events - * - * @param {Object} instance The dilog instance. - * - * @return {undefined} - */ - function bindClosableEvents(instance) { - on(instance.elements.modal, 'click', instance.__internal.modalClickHandler); - } - - /** - * Unbind closable specific events - * - * @param {Object} instance The dilog instance. - * - * @return {undefined} - */ - function unbindClosableEvents(instance) { - off(instance.elements.modal, 'click', instance.__internal.modalClickHandler); - } - // dialog API - return { - __init:initialize, - /** - * Check if dialog is currently open - * - * @return {Boolean} - */ - isOpen: function () { - return this.__internal.isOpen; - }, - isModal: function (){ - return this.elements.root.className.indexOf(classes.modeless) < 0; - }, - isMaximized:function(){ - return this.elements.root.className.indexOf(classes.maximized) > -1; - }, - isPinned:function(){ - return this.elements.root.className.indexOf(classes.unpinned) < 0; - }, - maximize:function(){ - if(!this.isMaximized()){ - maximize(this); - } - return this; - }, - restore:function(){ - if(this.isMaximized()){ - restore(this); - } - return this; - }, - pin:function(){ - if(!this.isPinned()){ - pin(this); - } - return this; - }, - unpin:function(){ - if(this.isPinned()){ - unpin(this); - } - return this; - }, - bringToFront:function(){ - bringToFront(null, this); - return this; - }, - /** - * Move the dialog to a specific x/y coordinates - * - * @param {Number} x The new dialog x coordinate in pixels. - * @param {Number} y The new dialog y coordinate in pixels. - * - * @return {Object} The dialog instance. - */ - moveTo:function(x,y){ - if(!isNaN(x) && !isNaN(y)){ - // allow custom `onmove` method - dispatchEvent('onmove', this); - - var element = this.elements.dialog, - current = element, - offsetLeft = 0, - offsetTop = 0; - - //subtract existing left,top - if (element.style.left) { - offsetLeft -= parseInt(element.style.left, 10); - } - if (element.style.top) { - offsetTop -= parseInt(element.style.top, 10); - } - //calc offset - do { - offsetLeft += current.offsetLeft; - offsetTop += current.offsetTop; - } while (current = current.offsetParent); - - //calc left, top - var left = (x - offsetLeft); - var top = (y - offsetTop); - - //// rtl handling - if (isRightToLeft()) { - left *= -1; - } - - element.style.left = left + 'px'; - element.style.top = top + 'px'; - - // allow custom `onmoved` method - dispatchEvent('onmoved', this); - } - return this; - }, - /** - * Resize the dialog to a specific width/height (the dialog must be 'resizable'). - * The dialog can be resized to: - * A minimum width equal to the initial display width - * A minimum height equal to the sum of header/footer heights. - * - * - * @param {Number or String} width The new dialog width in pixels or in percent. - * @param {Number or String} height The new dialog height in pixels or in percent. - * - * @return {Object} The dialog instance. - */ - resizeTo:function(width,height){ - var w = parseFloat(width), - h = parseFloat(height), - regex = /(\d*\.\d+|\d+)%/ - ; - - if(!isNaN(w) && !isNaN(h) && this.get('resizable') === true){ - - // allow custom `onresize` method - dispatchEvent('onresize', this); - - if(('' + width).match(regex)){ - w = w / 100 * document.documentElement.clientWidth ; - } - - if(('' + height).match(regex)){ - h = h / 100 * document.documentElement.clientHeight; - } - - var element = this.elements.dialog; - if (element.style.maxWidth !== 'none') { - element.style.minWidth = (minWidth = element.offsetWidth) + 'px'; - } - element.style.maxWidth = 'none'; - element.style.minHeight = this.elements.header.offsetHeight + this.elements.footer.offsetHeight + 'px'; - element.style.width = w + 'px'; - element.style.height = h + 'px'; - - // allow custom `onresized` method - dispatchEvent('onresized', this); - } - return this; - }, - /** - * Gets or Sets dialog settings/options - * - * @param {String|Object} key A string specifying a propery name or a collection of key/value pairs. - * @param {Object} value Optional, the value associated with the key (in case it was a string). - * - * @return {undefined} - */ - setting : function (key, value) { - var self = this; - var result = update(this, this.__internal.options, function(k,o,n){ optionUpdated(self,k,o,n); }, key, value); - if(result.op === 'get'){ - if(result.found){ - return result.value; - }else if(typeof this.settings !== 'undefined'){ - return update(this, this.settings, this.settingUpdated || function(){}, key, value).value; - }else{ - return undefined; - } - }else if(result.op === 'set'){ - if(result.items.length > 0){ - var callback = this.settingUpdated || function(){}; - for(var x=0;x 0) { - var self = this; - this.__internal.timer = setTimeout(function () { self.dismiss(); }, this.__internal.delay * 1000); - } - return this; - }, - /* - * Sets the notification message contents - * @param {string or DOMElement} content The notification message content - * - */ - setContent: function (content) { - if (typeof content === 'string') { - clearContents(this.element); - this.element.innerHTML = content; - } else if (content instanceof window.HTMLElement && this.element.firstChild !== content) { - clearContents(this.element); - this.element.appendChild(content); - } - if(this.__internal.closeButton){ - var close = document.createElement('span'); - addClass(close, classes.close); - close.setAttribute('data-close', true); - this.element.appendChild(close); - } - return this; - }, - /* - * Dismisses all open notifications except this. - * - */ - dismissOthers: function () { - notifier.dismissAll(this); - return this; - } - }); - } - - //notifier api - return { - /** - * Gets or Sets notifier settings. - * - * @param {string} key The setting name - * @param {Variant} value The setting value. - * - * @return {Object} if the called as a setter, return the notifier instance. - */ - setting: function (key, value) { - //ensure init - initialize(this); - - if (typeof value === 'undefined') { - //get - return this.__internal[key]; - } else { - //set - switch (key) { - case 'position': - this.__internal.position = value; - updatePosition(this); - break; - case 'delay': - this.__internal.delay = value; - break; - } - } - return this; - }, - /** - * [Alias] Sets dialog settings/options - */ - set:function(key,value){ - this.setting(key,value); - return this; - }, - /** - * [Alias] Gets dialog settings/options - */ - get:function(key){ - return this.setting(key); - }, - /** - * Creates a new notification message - * - * @param {string} type The type of notification message (simply a CSS class name 'ajs-{type}' to be added). - * @param {Function} callback A callback function to be invoked when the message is dismissed. - * - * @return {undefined} - */ - create: function (type, callback) { - //ensure notifier init - initialize(this); - //create new notification message - var div = document.createElement('div'); - div.className = classes.message + ((typeof type === 'string' && type !== '') ? ' ' + classes.prefix + type : ''); - return create(div, callback); - }, - /** - * Dismisses all open notifications. - * - * @param {Object} excpet [optional] The notification object to exclude from dismissal. - * - */ - dismissAll: function (except) { - var clone = openInstances.slice(0); - for (var x = 0; x < clone.length; x += 1) { - var instance = clone[x]; - if (except === undefined || except !== instance) { - instance.dismiss(); - } - } - } - }; - })(); - - /** - * Alertify public API - * This contains everything that is exposed through the alertify object. - * - * @return {Object} - */ - function Alertify() { - - // holds a references of created dialogs - var dialogs = {}; - - /** - * Extends a given prototype by merging properties from base into sub. - * - * @sub {Object} sub The prototype being overwritten. - * @base {Object} base The prototype being written. - * - * @return {Object} The extended prototype. - */ - function extend(sub, base) { - // copy dialog pototype over definition. - for (var prop in base) { - if (base.hasOwnProperty(prop)) { - sub[prop] = base[prop]; - } - } - return sub; - } - - - /** - * Helper: returns a dialog instance from saved dialogs. - * and initializes the dialog if its not already initialized. - * - * @name {String} name The dialog name. - * - * @return {Object} The dialog instance. - */ - function get_dialog(name) { - var dialog = dialogs[name].dialog; - //initialize the dialog if its not already initialized. - if (dialog && typeof dialog.__init === 'function') { - dialog.__init(dialog); - } - return dialog; - } - - /** - * Helper: registers a new dialog definition. - * - * @name {String} name The dialog name. - * @Factory {Function} Factory a function resposible for creating dialog prototype. - * @transient {Boolean} transient True to create a new dialog instance each time the dialog is invoked, false otherwise. - * @base {String} base the name of another dialog to inherit from. - * - * @return {Object} The dialog definition. - */ - function register(name, Factory, transient, base) { - var definition = { - dialog: null, - factory: Factory - }; - - //if this is based on an existing dialog, create a new definition - //by applying the new protoype over the existing one. - if (base !== undefined) { - definition.factory = function () { - return extend(new dialogs[base].factory(), new Factory()); - }; - } - - if (!transient) { - //create a new definition based on dialog - definition.dialog = extend(new definition.factory(), dialog); - } - return dialogs[name] = definition; - } - - return { - /** - * Alertify defaults - * - * @type {Object} - */ - defaults: defaults, - /** - * Dialogs factory - * - * @param {string} Dialog name. - * @param {Function} A Dialog factory function. - * @param {Boolean} Indicates whether to create a singleton or transient dialog. - * @param {String} The name of the base type to inherit from. - */ - dialog: function (name, Factory, transient, base) { - - // get request, create a new instance and return it. - if (typeof Factory !== 'function') { - return get_dialog(name); - } - - if (this.hasOwnProperty(name)) { - throw new Error('alertify.dialog: name already exists'); - } - - // register the dialog - var definition = register(name, Factory, transient, base); - - if (transient) { - - // make it public - this[name] = function () { - //if passed with no params, consider it a get request - if (arguments.length === 0) { - return definition.dialog; - } else { - var instance = extend(new definition.factory(), dialog); - //ensure init - if (instance && typeof instance.__init === 'function') { - instance.__init(instance); - } - instance['main'].apply(instance, arguments); - return instance['show'].apply(instance); - } - }; - } else { - // make it public - this[name] = function () { - //ensure init - if (definition.dialog && typeof definition.dialog.__init === 'function') { - definition.dialog.__init(definition.dialog); - } - //if passed with no params, consider it a get request - if (arguments.length === 0) { - return definition.dialog; - } else { - var dialog = definition.dialog; - dialog['main'].apply(definition.dialog, arguments); - return dialog['show'].apply(definition.dialog); - } - }; - } - }, - /** - * Close all open dialogs. - * - * @param {Object} excpet [optional] The dialog object to exclude from closing. - * - * @return {undefined} - */ - closeAll: function (except) { - var clone = openDialogs.slice(0); - for (var x = 0; x < clone.length; x += 1) { - var instance = clone[x]; - if (except === undefined || except !== instance) { - instance.close(); - } - } - }, - /** - * Gets or Sets dialog settings/options. if the dialog is transient, this call does nothing. - * - * @param {string} name The dialog name. - * @param {String|Object} key A string specifying a propery name or a collection of key/value pairs. - * @param {Variant} value Optional, the value associated with the key (in case it was a string). - * - * @return {undefined} - */ - setting: function (name, key, value) { - - if (name === 'notifier') { - return notifier.setting(key, value); - } - - var dialog = get_dialog(name); - if (dialog) { - return dialog.setting(key, value); - } - }, - /** - * [Alias] Sets dialog settings/options - */ - set: function(name,key,value){ - return this.setting(name, key,value); - }, - /** - * [Alias] Gets dialog settings/options - */ - get: function(name, key){ - return this.setting(name, key); - }, - /** - * Creates a new notification message. - * If a type is passed, a class name "ajs-{type}" will be added. - * This allows for custom look and feel for various types of notifications. - * - * @param {String | DOMElement} [message=undefined] Message text - * @param {String} [type=''] Type of log message - * @param {String} [wait=''] Time (in seconds) to wait before auto-close - * @param {Function} [callback=undefined] A callback function to be invoked when the log is closed. - * - * @return {Object} Notification object. - */ - notify: function (message, type, wait, callback) { - return notifier.create(type, callback).push(message, wait); - }, - /** - * Creates a new notification message. - * - * @param {String} [message=undefined] Message text - * @param {String} [wait=''] Time (in seconds) to wait before auto-close - * @param {Function} [callback=undefined] A callback function to be invoked when the log is closed. - * - * @return {Object} Notification object. - */ - message: function (message, wait, callback) { - return notifier.create(null, callback).push(message, wait); - }, - /** - * Creates a new notification message of type 'success'. - * - * @param {String} [message=undefined] Message text - * @param {String} [wait=''] Time (in seconds) to wait before auto-close - * @param {Function} [callback=undefined] A callback function to be invoked when the log is closed. - * - * @return {Object} Notification object. - */ - success: function (message, wait, callback) { - return notifier.create('success', callback).push(message, wait); - }, - /** - * Creates a new notification message of type 'error'. - * - * @param {String} [message=undefined] Message text - * @param {String} [wait=''] Time (in seconds) to wait before auto-close - * @param {Function} [callback=undefined] A callback function to be invoked when the log is closed. - * - * @return {Object} Notification object. - */ - error: function (message, wait, callback) { - return notifier.create('error', callback).push(message, wait); - }, - /** - * Creates a new notification message of type 'warning'. - * - * @param {String} [message=undefined] Message text - * @param {String} [wait=''] Time (in seconds) to wait before auto-close - * @param {Function} [callback=undefined] A callback function to be invoked when the log is closed. - * - * @return {Object} Notification object. - */ - warning: function (message, wait, callback) { - return notifier.create('warning', callback).push(message, wait); - }, - /** - * Dismisses all open notifications - * - * @return {undefined} - */ - dismissAll: function () { - notifier.dismissAll(); - } - }; - } - var alertify = new Alertify(); - - /** - * Alert dialog definition - * - * invoked by: - * alertify.alert(message); - * alertify.alert(title, message); - * alertify.alert(message, onok); - * alertify.alert(title, message, onok); - */ - alertify.dialog('alert', function () { - return { - main: function (_title, _message, _onok) { - var title, message, onok; - switch (arguments.length) { - case 1: - message = _title; - break; - case 2: - if (typeof _message === 'function') { - message = _title; - onok = _message; - } else { - title = _title; - message = _message; - } - break; - case 3: - title = _title; - message = _message; - onok = _onok; - break; - } - this.set('title', title); - this.set('message', message); - this.set('onok', onok); - return this; - }, - setup: function () { - return { - buttons: [ - { - text: alertify.defaults.glossary.ok, - key: keys.ESC, - invokeOnClose: true, - className: alertify.defaults.theme.ok, - } - ], - focus: { - element: 0, - select: false - }, - options: { - maximizable: false, - resizable: false - } - }; - }, - build: function () { - // nothing - }, - prepare: function () { - //nothing - }, - setMessage: function (message) { - this.setContent(message); - }, - settings: { - message: undefined, - onok: undefined, - label: undefined, - }, - settingUpdated: function (key, oldValue, newValue) { - switch (key) { - case 'message': - this.setMessage(newValue); - break; - case 'label': - if (this.__internal.buttons[0].element) { - this.__internal.buttons[0].element.innerHTML = newValue; - } - break; - } - }, - callback: function (closeEvent) { - if (typeof this.get('onok') === 'function') { - var returnValue = this.get('onok').call(this, closeEvent); - if (typeof returnValue !== 'undefined') { - closeEvent.cancel = !returnValue; - } - } - } - }; - }); - /** - * Confirm dialog object - * - * alertify.confirm(message); - * alertify.confirm(message, onok); - * alertify.confirm(message, onok, oncancel); - * alertify.confirm(title, message, onok, oncancel); - */ - alertify.dialog('confirm', function () { - - var autoConfirm = { - timer: null, - index: null, - text: null, - duration: null, - task: function (event, self) { - if (self.isOpen()) { - self.__internal.buttons[autoConfirm.index].element.innerHTML = autoConfirm.text + ' (‏' + autoConfirm.duration + '‏) '; - autoConfirm.duration -= 1; - if (autoConfirm.duration === -1) { - clearAutoConfirm(self); - var button = self.__internal.buttons[autoConfirm.index]; - var closeEvent = createCloseEvent(autoConfirm.index, button); - - if (typeof self.callback === 'function') { - self.callback.apply(self, [closeEvent]); - } - //close the dialog. - if (closeEvent.close !== false) { - self.close(); - } - } - } else { - clearAutoConfirm(self); - } - } - }; - - function clearAutoConfirm(self) { - if (autoConfirm.timer !== null) { - clearInterval(autoConfirm.timer); - autoConfirm.timer = null; - self.__internal.buttons[autoConfirm.index].element.innerHTML = autoConfirm.text; - } - } - - function startAutoConfirm(self, index, duration) { - clearAutoConfirm(self); - autoConfirm.duration = duration; - autoConfirm.index = index; - autoConfirm.text = self.__internal.buttons[index].element.innerHTML; - autoConfirm.timer = setInterval(delegate(self, autoConfirm.task), 1000); - autoConfirm.task(null, self); - } - - - return { - main: function (_title, _message, _onok, _oncancel) { - var title, message, onok, oncancel; - switch (arguments.length) { - case 1: - message = _title; - break; - case 2: - message = _title; - onok = _message; - break; - case 3: - message = _title; - onok = _message; - oncancel = _onok; - break; - case 4: - title = _title; - message = _message; - onok = _onok; - oncancel = _oncancel; - break; - } - this.set('title', title); - this.set('message', message); - this.set('onok', onok); - this.set('oncancel', oncancel); - return this; - }, - setup: function () { - return { - buttons: [ - { - text: alertify.defaults.glossary.ok, - key: keys.ENTER, - className: alertify.defaults.theme.ok, - }, - { - text: alertify.defaults.glossary.cancel, - key: keys.ESC, - invokeOnClose: true, - className: alertify.defaults.theme.cancel, - } - ], - focus: { - element: 0, - select: false - }, - options: { - maximizable: false, - resizable: false - } - }; - }, - build: function () { - //nothing - }, - prepare: function () { - //nothing - }, - setMessage: function (message) { - this.setContent(message); - }, - settings: { - message: null, - labels: null, - onok: null, - oncancel: null, - defaultFocus: null, - reverseButtons: null, - }, - settingUpdated: function (key, oldValue, newValue) { - switch (key) { - case 'message': - this.setMessage(newValue); - break; - case 'labels': - if ('ok' in newValue && this.__internal.buttons[0].element) { - this.__internal.buttons[0].text = newValue.ok; - this.__internal.buttons[0].element.innerHTML = newValue.ok; - } - if ('cancel' in newValue && this.__internal.buttons[1].element) { - this.__internal.buttons[1].text = newValue.cancel; - this.__internal.buttons[1].element.innerHTML = newValue.cancel; - } - break; - case 'reverseButtons': - if (newValue === true) { - this.elements.buttons.primary.appendChild(this.__internal.buttons[0].element); - } else { - this.elements.buttons.primary.appendChild(this.__internal.buttons[1].element); - } - break; - case 'defaultFocus': - this.__internal.focus.element = newValue === 'ok' ? 0 : 1; - break; - } - }, - callback: function (closeEvent) { - clearAutoConfirm(this); - var returnValue; - switch (closeEvent.index) { - case 0: - if (typeof this.get('onok') === 'function') { - returnValue = this.get('onok').call(this, closeEvent); - if (typeof returnValue !== 'undefined') { - closeEvent.cancel = !returnValue; - } - } - break; - case 1: - if (typeof this.get('oncancel') === 'function') { - returnValue = this.get('oncancel').call(this, closeEvent); - if (typeof returnValue !== 'undefined') { - closeEvent.cancel = !returnValue; - } - } - break; - } - }, - autoOk: function (duration) { - startAutoConfirm(this, 0, duration); - return this; - }, - autoCancel: function (duration) { - startAutoConfirm(this, 1, duration); - return this; - } - }; - }); - /** - * Prompt dialog object - * - * invoked by: - * alertify.prompt(message); - * alertify.prompt(message, value); - * alertify.prompt(message, value, onok); - * alertify.prompt(message, value, onok, oncancel); - * alertify.prompt(title, message, value, onok, oncancel); - */ - alertify.dialog('prompt', function () { - var input = document.createElement('INPUT'); - var p = document.createElement('P'); - return { - main: function (_title, _message, _value, _onok, _oncancel) { - var title, message, value, onok, oncancel; - switch (arguments.length) { - case 1: - message = _title; - break; - case 2: - message = _title; - value = _message; - break; - case 3: - message = _title; - value = _message; - onok = _value; - break; - case 4: - message = _title; - value = _message; - onok = _value; - oncancel = _onok; - break; - case 5: - title = _title; - message = _message; - value = _value; - onok = _onok; - oncancel = _oncancel; - break; - } - this.set('title', title); - this.set('message', message); - this.set('value', value); - this.set('onok', onok); - this.set('oncancel', oncancel); - return this; - }, - setup: function () { - return { - buttons: [ - { - text: alertify.defaults.glossary.ok, - key: keys.ENTER, - className: alertify.defaults.theme.ok, - }, - { - text: alertify.defaults.glossary.cancel, - key: keys.ESC, - invokeOnClose: true, - className: alertify.defaults.theme.cancel, - } - ], - focus: { - element: input, - select: true - }, - options: { - maximizable: false, - resizable: false - } - }; - }, - build: function () { - input.className = alertify.defaults.theme.input; - input.setAttribute('type', 'text'); - input.value = this.get('value'); - this.elements.content.appendChild(p); - this.elements.content.appendChild(input); - }, - prepare: function () { - //nothing - }, - setMessage: function (message) { - if (typeof message === 'string') { - clearContents(p); - p.innerHTML = message; - } else if (message instanceof window.HTMLElement && p.firstChild !== message) { - clearContents(p); - p.appendChild(message); - } - }, - settings: { - message: undefined, - labels: undefined, - onok: undefined, - oncancel: undefined, - value: '', - type:'text', - reverseButtons: undefined, - }, - settingUpdated: function (key, oldValue, newValue) { - switch (key) { - case 'message': - this.setMessage(newValue); - break; - case 'value': - input.value = newValue; - break; - case 'type': - switch (newValue) { - case 'text': - case 'color': - case 'date': - case 'datetime-local': - case 'email': - case 'month': - case 'number': - case 'password': - case 'search': - case 'tel': - case 'time': - case 'week': - input.type = newValue; - break; - default: - input.type = 'text'; - break; - } - break; - case 'labels': - if (newValue.ok && this.__internal.buttons[0].element) { - this.__internal.buttons[0].element.innerHTML = newValue.ok; - } - if (newValue.cancel && this.__internal.buttons[1].element) { - this.__internal.buttons[1].element.innerHTML = newValue.cancel; - } - break; - case 'reverseButtons': - if (newValue === true) { - this.elements.buttons.primary.appendChild(this.__internal.buttons[0].element); - } else { - this.elements.buttons.primary.appendChild(this.__internal.buttons[1].element); - } - break; - } - }, - callback: function (closeEvent) { - var returnValue; - switch (closeEvent.index) { - case 0: - this.settings.value = input.value; - if (typeof this.get('onok') === 'function') { - returnValue = this.get('onok').call(this, closeEvent, this.settings.value); - if (typeof returnValue !== 'undefined') { - closeEvent.cancel = !returnValue; - } - } - break; - case 1: - if (typeof this.get('oncancel') === 'function') { - returnValue = this.get('oncancel').call(this, closeEvent); - if (typeof returnValue !== 'undefined') { - closeEvent.cancel = !returnValue; - } - } - if(!closeEvent.cancel){ - input.value = this.settings.value; - } - break; - } - } - }; - }); - - // CommonJS - if ( typeof module === 'object' && typeof module.exports === 'object' ) { - module.exports = alertify; - // AMD - } else if ( typeof define === 'function' && define.amd) { - define( [], function () { - return alertify; - } ); - // window - } else if ( !window.alertify ) { - window.alertify = alertify; - } - -} ( typeof window !== 'undefined' ? window : this ) ); +/** + * alertifyjs 1.14.0 http://alertifyjs.com + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. + * Copyright 2024 Mohammad Younes (http://alertifyjs.com) + * Licensed under GPL 3 */ +( function ( window ) { + 'use strict'; + var NOT_DISABLED_NOT_RESET = ':not(:disabled):not(.ajs-reset)'; + /** + * Keys enum + * @type {Object} + */ + var keys = { + ENTER: 13, + ESC: 27, + F1: 112, + F12: 123, + LEFT: 37, + RIGHT: 39, + TAB: 9 + }; + /** + * Default options + * @type {Object} + */ + var defaults = { + autoReset:true, + basic:false, + closable:true, + closableByDimmer:true, + invokeOnCloseOff:false, + frameless:false, + defaultFocusOff:false, + maintainFocus:true, //global default not per instance, applies to all dialogs + maximizable:true, + modal:true, + movable:true, + moveBounded:false, + overflow:true, + padding: true, + pinnable:true, + pinned:true, + preventBodyShift:false, //global default not per instance, applies to all dialogs + resizable:true, + startMaximized:false, + transition:'pulse', + transitionOff:false, + tabbable:['button', '[href]', 'input', 'select', 'textarea', '[tabindex]:not([tabindex^="-"])'+NOT_DISABLED_NOT_RESET].join(NOT_DISABLED_NOT_RESET+','),//global + notifier:{ + delay:5, + position:'bottom-right', + closeButton:false, + classes: { + base: 'alertify-notifier', + prefix:'ajs-', + message: 'ajs-message', + top: 'ajs-top', + right: 'ajs-right', + bottom: 'ajs-bottom', + left: 'ajs-left', + center: 'ajs-center', + visible: 'ajs-visible', + hidden: 'ajs-hidden', + close: 'ajs-close' + } + }, + glossary:{ + title:'AlertifyJS', + ok: 'OK', + cancel: 'Cancel', + acccpt: 'Accept', + deny: 'Deny', + confirm: 'Confirm', + decline: 'Decline', + close: 'Close', + maximize: 'Maximize', + restore: 'Restore', + }, + theme:{ + input:'ajs-input', + ok:'ajs-ok', + cancel:'ajs-cancel', + }, + hooks:{ + preinit:function(){}, + postinit:function(){} + } + }; + + //holds open dialogs instances + var openDialogs = []; + + /** + * [Helper] Adds the specified class(es) to the element. + * + * @element {node} The element + * @className {string} One or more space-separated classes to be added to the class attribute of the element. + * + * @return {undefined} + */ + function addClass(element,classNames){ + element.className += ' ' + classNames; + } + + /** + * [Helper] Removes the specified class(es) from the element. + * + * @element {node} The element + * @className {string} One or more space-separated classes to be removed from the class attribute of the element. + * + * @return {undefined} + */ + function removeClass(element, classNames) { + var original = element.className.split(' '); + var toBeRemoved = classNames.split(' '); + for (var x = 0; x < toBeRemoved.length; x += 1) { + var index = original.indexOf(toBeRemoved[x]); + if (index > -1){ + original.splice(index,1); + } + } + element.className = original.join(' '); + } + + /** + * [Helper] Checks if the document is RTL + * + * @return {Boolean} True if the document is RTL, false otherwise. + */ + function isRightToLeft(){ + return window.getComputedStyle(document.body).direction === 'rtl'; + } + /** + * [Helper] Get the document current scrollTop + * + * @return {Number} current document scrollTop value + */ + function getScrollTop(){ + return ((document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop); + } + + /** + * [Helper] Get the document current scrollLeft + * + * @return {Number} current document scrollLeft value + */ + function getScrollLeft(){ + return ((document.documentElement && document.documentElement.scrollLeft) || document.body.scrollLeft); + } + + /** + * Helper: clear contents + * + */ + function clearContents(element){ + while (element.lastChild) { + element.removeChild(element.lastChild); + } + } + + /** + * detects strings, checks for both string and String instances + * this is unlike typeof(x) === 'string' which only accepts primitive strings + * + */ + function isString(thing) { + return Object.prototype.toString.call(thing) === '[object String]'; + } + + /** + * Extends a given prototype by merging properties from base into sub. + * + * @sub {Object} sub The prototype being overwritten. + * @base {Object} base The prototype being written. + * + * @return {Object} The extended prototype. + */ + function copy(src) { + if(null === src){ + return src; + } + var cpy; + if(Array.isArray(src)){ + cpy = []; + for(var x=0;x 0) { + var args = []; + for (var x = 0; x < arguments.length; x += 1) { + args.push(arguments[x]); + } + args.push(context); + return method.apply(context, args); + } + return method.apply(context, [null, context]); + }; + } + /** + * Helper for creating a dialog close event. + * + * @return {object} + */ + function createCloseEvent(index, button) { + return { + index: index, + button: button, + cancel: false + }; + } + /** + * Helper for dispatching events. + * + * @param {string} evenType The type of the event to disptach. + * @param {object} instance The dialog instance disptaching the event. + * + * @return {any} The result of the invoked function. + */ + function dispatchEvent(eventType, instance) { + if ( typeof instance.get(eventType) === 'function' ) { + return instance.get(eventType).call(instance); + } + } + + + /** + * Super class for all dialogs + * + * @return {Object} base dialog prototype + */ + var dialog = (function () { + var //holds the list of used keys. + usedKeys = [], + //dummy variable, used to trigger dom reflow. + reflow = null, + //holds body tab index in case it has any. + tabindex = false, + //condition for detecting safari + isSafari = window.navigator.userAgent.indexOf('Safari') > -1 && window.navigator.userAgent.indexOf('Chrome') < 0, + //dialog building blocks + templates = { + dimmer:'
', + /*tab index required to fire click event before body focus*/ + modal: '
', + dialog: '
', + reset: '', + commands: '
', + header: '
', + body: '
', + content: '
', + footer: '', + buttons: { primary: '
', auxiliary: '
' }, + button: '', + resizeHandle: '
', + }, + //common class names + classes = { + animationIn: 'ajs-in', + animationOut: 'ajs-out', + base: 'alertify', + basic:'ajs-basic', + capture: 'ajs-capture', + closable:'ajs-closable', + fixed: 'ajs-fixed', + frameless:'ajs-frameless', + hidden: 'ajs-hidden', + maximize: 'ajs-maximize', + maximized: 'ajs-maximized', + maximizable:'ajs-maximizable', + modeless: 'ajs-modeless', + movable: 'ajs-movable', + noSelection: 'ajs-no-selection', + noOverflow: 'ajs-no-overflow', + noPadding:'ajs-no-padding', + pin:'ajs-pin', + pinnable:'ajs-pinnable', + prefix: 'ajs-', + resizable: 'ajs-resizable', + restore: 'ajs-restore', + shake:'ajs-shake', + unpinned:'ajs-unpinned', + noTransition:'ajs-no-transition' + }; + + /** + * Helper: initializes the dialog instance + * + * @return {Number} The total count of currently open modals. + */ + function initialize(instance){ + + if(!instance.__internal){ + //invoke preinit global hook + alertify.defaults.hooks.preinit(instance); + //no need to expose init after this. + delete instance.__init; + + //keep a copy of initial dialog settings + if(!instance.__settings){ + instance.__settings = copy(instance.settings); + } + + //get dialog buttons/focus setup + var setup; + if(typeof instance.setup === 'function'){ + setup = instance.setup(); + setup.options = setup.options || {}; + setup.focus = setup.focus || {}; + }else{ + setup = { + buttons:[], + focus:{ + element:null, + select:false + }, + options:{ + } + }; + } + + //initialize hooks object. + if(typeof instance.hooks !== 'object'){ + instance.hooks = {}; + } + + //copy buttons defintion + var buttonsDefinition = []; + if(Array.isArray(setup.buttons)){ + for(var b=0;b= 0){ + //last open modal or last maximized one + removeClass(document.body, classes.noOverflow); + preventBodyShift(false); + }else if(requiresNoOverflow > 0 && document.body.className.indexOf(classes.noOverflow) < 0){ + //first open modal or first maximized one + preventBodyShift(true); + addClass(document.body, classes.noOverflow); + } + } + var top = '', topScroll = 0; + /** + * Helper: prevents body shift. + * + */ + function preventBodyShift(add){ + if(alertify.defaults.preventBodyShift){ + if(add && document.documentElement.scrollHeight > document.documentElement.clientHeight ){//&& openDialogs[openDialogs.length-1].elements.dialog.clientHeight <= document.documentElement.clientHeight){ + topScroll = scrollY; + top = window.getComputedStyle(document.body).top; + addClass(document.body, classes.fixed); + document.body.style.top = -scrollY + 'px'; + } else if(!add) { + scrollY = topScroll; + document.body.style.top = top; + removeClass(document.body, classes.fixed); + restoreScrollPosition(); + } + } + } + + /** + * Sets the name of the transition used to show/hide the dialog + * + * @param {Object} instance The dilog instance. + * + */ + function updateTransition(instance, value, oldValue){ + if(isString(oldValue)){ + removeClass(instance.elements.root,classes.prefix + oldValue); + } + addClass(instance.elements.root, classes.prefix + value); + reflow = instance.elements.root.offsetWidth; + } + + /** + * Toggles the dialog no transition + * + * @param {Object} instance The dilog instance. + * + * @return {undefined} + */ + function updateTransitionOff(instance){ + if (instance.get('transitionOff')) { + // add class + addClass(instance.elements.root, classes.noTransition); + } else { + // remove class + removeClass(instance.elements.root, classes.noTransition); + } + } + + /** + * Toggles the dialog display mode + * + * @param {Object} instance The dilog instance. + * + * @return {undefined} + */ + function updateDisplayMode(instance){ + if(instance.get('modal')){ + + //make modal + removeClass(instance.elements.root, classes.modeless); + + //only if open + if(instance.isOpen()){ + unbindModelessEvents(instance); + + //in case a pinned modless dialog was made modal while open. + updateAbsPositionFix(instance); + + ensureNoOverflow(); + } + }else{ + //make modelss + addClass(instance.elements.root, classes.modeless); + + //only if open + if(instance.isOpen()){ + bindModelessEvents(instance); + + //in case pin/unpin was called while a modal is open + updateAbsPositionFix(instance); + + ensureNoOverflow(); + } + } + } + + /** + * Toggles the dialog basic view mode + * + * @param {Object} instance The dilog instance. + * + * @return {undefined} + */ + function updateBasicMode(instance){ + if (instance.get('basic')) { + // add class + addClass(instance.elements.root, classes.basic); + } else { + // remove class + removeClass(instance.elements.root, classes.basic); + } + } + + /** + * Toggles the dialog frameless view mode + * + * @param {Object} instance The dilog instance. + * + * @return {undefined} + */ + function updateFramelessMode(instance){ + if (instance.get('frameless')) { + // add class + addClass(instance.elements.root, classes.frameless); + } else { + // remove class + removeClass(instance.elements.root, classes.frameless); + } + } + + /** + * Helper: Brings the modeless dialog to front, attached to modeless dialogs. + * + * @param {Event} event Focus event + * @param {Object} instance The dilog instance. + * + * @return {undefined} + */ + function bringToFront(event, instance){ + + // Do not bring to front if preceeded by an open modal + var index = openDialogs.indexOf(instance); + for(var x=index+1;x 200 && (modalClickHandlerTS = event.timeStamp) && !cancelClick){ + var target = event.srcElement || event.target; + if (instance.get('closableByDimmer') === true && target === instance.elements.modal) { + triggerClose(instance); + } + } + cancelClick = false; + } + + // stores last call timestamp to prevent triggering the callback twice. + var callbackTS = 0; + // flag to cancel keyup event if already handled by click event (pressing Enter on a focusted button). + var cancelKeyup = false; + /** + * Helper: triggers a button callback + * + * @param {Object} The dilog instance. + * @param {Function} Callback to check which button triggered the event. + * + * @return {undefined} + */ + function triggerCallback(instance, check) { + if(Date.now() - callbackTS > 200 && (callbackTS = Date.now())){ + for (var idx = 0; idx < instance.__internal.buttons.length; idx += 1) { + var button = instance.__internal.buttons[idx]; + if (!button.element.disabled && check(button)) { + var closeEvent = createCloseEvent(idx, button); + if (typeof instance.callback === 'function') { + instance.callback.apply(instance, [closeEvent]); + } + //close the dialog only if not canceled. + if (closeEvent.cancel === false) { + instance.close(); + } + break; + } + } + } + } + + /** + * Clicks event handler, attached to the dialog footer. + * + * @param {Event} DOM event object. + * @param {Object} The dilog instance. + * + * @return {undefined} + */ + function buttonsClickHandler(event, instance) { + var target = event.srcElement || event.target; + triggerCallback(instance, function (button) { + // if this button caused the click, cancel keyup event + return button.element.contains(target) && (cancelKeyup = true); + }); + } + + /** + * Keyup event handler, attached to the document.body + * + * @param {Event} DOM event object. + * @param {Object} The dilog instance. + * + * @return {undefined} + */ + function keyupHandler(event) { + //hitting enter while button has focus will trigger keyup too. + //ignore if handled by clickHandler + if (cancelKeyup) { + cancelKeyup = false; + return; + } + var instance = openDialogs[openDialogs.length - 1]; + var keyCode = event.keyCode; + if (instance.__internal.buttons.length === 0 && keyCode === keys.ESC && instance.get('closable') === true) { + triggerClose(instance); + return false; + }else if (usedKeys.indexOf(keyCode) > -1) { + triggerCallback(instance, function (button) { + return button.key === keyCode; + }); + return false; + } + } + /** + * Keydown event handler, attached to the document.body + * + * @param {Event} DOM event object. + * @param {Object} The dilog instance. + * + * @return {undefined} + */ + function keydownHandler(event) { + var instance = openDialogs[openDialogs.length - 1]; + var keyCode = event.keyCode; + if (keyCode === keys.LEFT || keyCode === keys.RIGHT) { + var buttons = instance.__internal.buttons; + for (var x = 0; x < buttons.length; x += 1) { + if (document.activeElement === buttons[x].element) { + switch (keyCode) { + case keys.LEFT: + buttons[(x || buttons.length) - 1].element.focus(); + return; + case keys.RIGHT: + buttons[(x + 1) % buttons.length].element.focus(); + return; + } + } + } + }else if (keyCode < keys.F12 + 1 && keyCode > keys.F1 - 1 && usedKeys.indexOf(keyCode) > -1) { + event.preventDefault(); + event.stopPropagation(); + triggerCallback(instance, function (button) { + return button.key === keyCode; + }); + return false; + } + } + + + /** + * Sets focus to proper dialog element + * + * @param {Object} instance The dilog instance. + * @param {Node} [resetTarget=undefined] DOM element to reset focus to. + * + * @return {undefined} + */ + function setFocus(instance, resetTarget) { + // reset target has already been determined. + if (resetTarget) { + resetTarget.focus(); + } else { + // current instance focus settings + var focus = instance.__internal.focus; + // the focus element. + var element = focus.element; + + switch (typeof focus.element) { + // a number means a button index + case 'number': + if (instance.__internal.buttons.length > focus.element) { + //in basic view, skip focusing the buttons. + if (instance.get('basic') === true) { + element = instance.elements.reset[0]; + } else { + element = instance.__internal.buttons[focus.element].element; + } + } + break; + // a string means querySelector to select from dialog body contents. + case 'string': + element = instance.elements.body.querySelector(focus.element); + break; + // a function should return the focus element. + case 'function': + element = focus.element.call(instance); + break; + } + + // if no focus element, default to first reset element. + if (instance.get('defaultFocusOff') === true || ((typeof element === 'undefined' || element === null) && instance.__internal.buttons.length === 0)) { + element = instance.elements.reset[0]; + } + // focus + if (element && element.focus) { + element.focus(); + // if selectable + if (focus.select && element.select) { + element.select(); + } + } + } + } + + /** + * Focus event handler, attached to document.body and dialogs own reset links. + * handles the focus for modal dialogs only. + * + * @param {Event} event DOM focus event object. + * @param {Object} instance The dilog instance. + * + * @return {undefined} + */ + function onReset(event, instance) { + + // should work on last modal if triggered from document.body + if (!instance) { + for (var x = openDialogs.length - 1; x > -1; x -= 1) { + if (openDialogs[x].isModal()) { + instance = openDialogs[x]; + break; + } + } + } + + if(instance) { + // if modal + if (instance.isModal()) { + // determine reset target to enable forward/backward tab cycle. + var firstReset = instance.elements.reset[0], + lastReset = instance.elements.reset[1], + lastFocusedElement = event.relatedTarget, + within = instance.elements.root.contains(lastFocusedElement), + target = event.srcElement || event.target, + resetTarget; + + //if the previous focused element element was outside the modal do nthing + if( /*first show */ + (target === firstReset && !within) || + /*focus cycle */ + (target === lastReset && lastFocusedElement === firstReset)){ + return; + }else if(target === lastReset || target === document.body){ + resetTarget = firstReset; + }else if(target === firstReset && lastFocusedElement === lastReset){ + resetTarget = findTabbable(instance); + }else if(target === firstReset && within){ + resetTarget = findTabbable(instance, true); + } + // focus + setFocus(instance, resetTarget); + } + } + } + function findTabbable(instance, last){ + var tabbables = [].slice.call(instance.elements.dialog.querySelectorAll(defaults.tabbable)); + if(last){ + tabbables.reverse(); + } + for(var x=0;x startingWidth) { + //growing + element.style.left = (startingLeft + diff) + 'px'; + } else if (element.offsetWidth >= minWidth) { + //shrinking + element.style.left = (startingLeft - diff) + 'px'; + } + } + } + + /** + * Triggers the start of a resize event, attached to the resize handle element mouse down event. + * Adds no-selection class to the body, disabling selection while moving. + * + * @param {Event} event DOM event object. + * @param {Object} instance The dilog instance. + * + * @return {Boolean} false + */ + function beginResize(event, instance) { + if (!instance.isMaximized()) { + var eventSrc; + if (event.type === 'touchstart') { + event.preventDefault(); + eventSrc = event.targetTouches[0]; + } else if (event.button === 0) { + eventSrc = event; + } + if (eventSrc) { + // allow custom `onresize` method + dispatchEvent('onresize', instance); + + resizable = instance; + handleOffset = instance.elements.resizeHandle.offsetHeight / 2; + var element = instance.elements.dialog; + addClass(element, classes.capture); + startingLeft = parseInt(element.style.left, 10); + element.style.height = element.offsetHeight + 'px'; + element.style.minHeight = instance.elements.header.offsetHeight + instance.elements.footer.offsetHeight + 'px'; + element.style.width = (startingWidth = element.offsetWidth) + 'px'; + + if (element.style.maxWidth !== 'none') { + element.style.minWidth = (minWidth = element.offsetWidth) + 'px'; + } + element.style.maxWidth = 'none'; + addClass(document.body, classes.noSelection); + return false; + } + } + } + + /** + * The actual resize handler, attached to document.body mousemove event. + * + * @param {Event} event DOM event object. + * + * @return {undefined} + */ + function resize(event) { + if (resizable) { + var eventSrc; + if (event.type === 'touchmove') { + event.preventDefault(); + eventSrc = event.targetTouches[0]; + } else if (event.button === 0) { + eventSrc = event; + } + if (eventSrc) { + resizeElement(eventSrc, resizable.elements.dialog, !resizable.get('modal') && !resizable.get('pinned')); + } + } + } + + /** + * Triggers the end of a resize event, attached to document.body mouseup event. + * Removes no-selection class from document.body, allowing selection. + * + * @return {undefined} + */ + function endResize() { + if (resizable) { + var instance = resizable; + resizable = null; + removeClass(document.body, classes.noSelection); + removeClass(instance.elements.dialog, classes.capture); + cancelClick = true; + // allow custom `onresized` method + dispatchEvent('onresized', instance); + } + } + + /** + * Resets any changes made by resizing the element to its original state. + * + * @param {Object} instance The dilog instance. + * + * @return {undefined} + */ + function resetResize(instance) { + resizable = null; + var element = instance.elements.dialog; + if (element.style.maxWidth === 'none') { + //clear inline styles. + element.style.maxWidth = element.style.minWidth = element.style.width = element.style.height = element.style.minHeight = element.style.left = ''; + //reset variables. + startingLeft = Number.Nan; + startingWidth = minWidth = handleOffset = 0; + } + } + + + /** + * Updates the dialog move behavior. + * + * @param {Object} instance The dilog instance. + * @param {Boolean} on True to add the behavior, removes it otherwise. + * + * @return {undefined} + */ + function updateResizable(instance) { + if (instance.get('resizable')) { + // add class + addClass(instance.elements.root, classes.resizable); + if (instance.isOpen()) { + bindResizableEvents(instance); + } + } else { + //reset + resetResize(instance); + // remove class + removeClass(instance.elements.root, classes.resizable); + if (instance.isOpen()) { + unbindResizableEvents(instance); + } + } + } + + /** + * Reset move/resize on window resize. + * + * @param {Event} event window resize event object. + * + * @return {undefined} + */ + function windowResize(/*event*/) { + for (var x = 0; x < openDialogs.length; x += 1) { + var instance = openDialogs[x]; + if (instance.get('autoReset')) { + resetMove(instance); + resetResize(instance); + } + } + } + /** + * Bind dialogs events + * + * @param {Object} instance The dilog instance. + * + * @return {undefined} + */ + function bindEvents(instance) { + // if first dialog, hook global handlers + if (openDialogs.length === 1) { + //global + on(window, 'resize', windowResize); + on(document.body, 'keyup', keyupHandler); + on(document.body, 'keydown', keydownHandler); + on(document.body, 'focus', onReset); + + //move + on(document.documentElement, 'mousemove', move); + on(document.documentElement, 'touchmove', move, false, false); + on(document.documentElement, 'mouseup', endMove); + on(document.documentElement, 'touchend', endMove); + //resize + on(document.documentElement, 'mousemove', resize); + on(document.documentElement, 'touchmove', resize, false, false); + on(document.documentElement, 'mouseup', endResize); + on(document.documentElement, 'touchend', endResize); + } + + // common events + on(instance.elements.commands.container, 'click', instance.__internal.commandsClickHandler); + on(instance.elements.footer, 'click', instance.__internal.buttonsClickHandler); + on(instance.elements.reset[0], 'focusin', instance.__internal.resetHandler); + on(instance.elements.reset[0], 'keydown', recycleTab); + on(instance.elements.reset[1], 'focusin', instance.__internal.resetHandler); + + //prevent handling key up when dialog is being opened by a key stroke. + cancelKeyup = true; + // hook in transition handler + on(instance.elements.dialog, transition.type, instance.__internal.transitionInHandler); + + // modelss only events + if (!instance.get('modal')) { + bindModelessEvents(instance); + } + + // resizable + if (instance.get('resizable')) { + bindResizableEvents(instance); + } + + // movable + if (instance.get('movable')) { + bindMovableEvents(instance); + } + } + + /** + * Unbind dialogs events + * + * @param {Object} instance The dilog instance. + * + * @return {undefined} + */ + function unbindEvents(instance) { + // if last dialog, remove global handlers + if (openDialogs.length === 1) { + //global + off(window, 'resize', windowResize); + off(document.body, 'keyup', keyupHandler); + off(document.body, 'keydown', keydownHandler); + off(document.body, 'focus', onReset); + //move + off(document.documentElement, 'mousemove', move); + off(document.documentElement, 'mouseup', endMove); + //resize + off(document.documentElement, 'mousemove', resize); + off(document.documentElement, 'mouseup', endResize); + } + + // common events + off(instance.elements.commands.container, 'click', instance.__internal.commandsClickHandler); + off(instance.elements.footer, 'click', instance.__internal.buttonsClickHandler); + off(instance.elements.reset[0], 'focusin', instance.__internal.resetHandler); + off(instance.elements.reset[0], 'keydown', recycleTab); + off(instance.elements.reset[1], 'focusin', instance.__internal.resetHandler); + + // hook out transition handler + on(instance.elements.dialog, transition.type, instance.__internal.transitionOutHandler); + + // modelss only events + if (!instance.get('modal')) { + unbindModelessEvents(instance); + } + + // movable + if (instance.get('movable')) { + unbindMovableEvents(instance); + } + + // resizable + if (instance.get('resizable')) { + unbindResizableEvents(instance); + } + + } + + /** + * Bind modeless specific events + * + * @param {Object} instance The dilog instance. + * + * @return {undefined} + */ + function bindModelessEvents(instance) { + on(instance.elements.dialog, 'focus', instance.__internal.bringToFrontHandler, true); + } + + /** + * Unbind modeless specific events + * + * @param {Object} instance The dilog instance. + * + * @return {undefined} + */ + function unbindModelessEvents(instance) { + off(instance.elements.dialog, 'focus', instance.__internal.bringToFrontHandler, true); + } + + + + /** + * Bind movable specific events + * + * @param {Object} instance The dilog instance. + * + * @return {undefined} + */ + function bindMovableEvents(instance) { + on(instance.elements.header, 'mousedown', instance.__internal.beginMoveHandler); + on(instance.elements.header, 'touchstart', instance.__internal.beginMoveHandler, false, false); + } + + /** + * Unbind movable specific events + * + * @param {Object} instance The dilog instance. + * + * @return {undefined} + */ + function unbindMovableEvents(instance) { + off(instance.elements.header, 'mousedown', instance.__internal.beginMoveHandler); + off(instance.elements.header, 'touchstart', instance.__internal.beginMoveHandler, false, false); + } + + + + /** + * Bind resizable specific events + * + * @param {Object} instance The dilog instance. + * + * @return {undefined} + */ + function bindResizableEvents(instance) { + on(instance.elements.resizeHandle, 'mousedown', instance.__internal.beginResizeHandler); + on(instance.elements.resizeHandle, 'touchstart', instance.__internal.beginResizeHandler, false, false); + } + + /** + * Unbind resizable specific events + * + * @param {Object} instance The dilog instance. + * + * @return {undefined} + */ + function unbindResizableEvents(instance) { + off(instance.elements.resizeHandle, 'mousedown', instance.__internal.beginResizeHandler); + off(instance.elements.resizeHandle, 'touchstart', instance.__internal.beginResizeHandler, false, false); + } + + /** + * Bind closable events + * + * @param {Object} instance The dilog instance. + * + * @return {undefined} + */ + function bindClosableEvents(instance) { + on(instance.elements.modal, 'click', instance.__internal.modalClickHandler); + } + + /** + * Unbind closable specific events + * + * @param {Object} instance The dilog instance. + * + * @return {undefined} + */ + function unbindClosableEvents(instance) { + off(instance.elements.modal, 'click', instance.__internal.modalClickHandler); + } + // dialog API + return { + __init:initialize, + /** + * Check if dialog is currently open + * + * @return {Boolean} + */ + isOpen: function () { + return this.__internal.isOpen; + }, + isModal: function (){ + return this.elements.root.className.indexOf(classes.modeless) < 0; + }, + isMaximized:function(){ + return this.elements.root.className.indexOf(classes.maximized) > -1; + }, + isPinned:function(){ + return this.elements.root.className.indexOf(classes.unpinned) < 0; + }, + maximize:function(){ + if(!this.isMaximized()){ + maximize(this); + } + return this; + }, + restore:function(){ + if(this.isMaximized()){ + restore(this); + } + return this; + }, + pin:function(){ + if(!this.isPinned()){ + pin(this); + } + return this; + }, + unpin:function(){ + if(this.isPinned()){ + unpin(this); + } + return this; + }, + bringToFront:function(){ + bringToFront(null, this); + return this; + }, + /** + * Move the dialog to a specific x/y coordinates + * + * @param {Number} x The new dialog x coordinate in pixels. + * @param {Number} y The new dialog y coordinate in pixels. + * + * @return {Object} The dialog instance. + */ + moveTo:function(x,y){ + if(!isNaN(x) && !isNaN(y)){ + // allow custom `onmove` method + dispatchEvent('onmove', this); + + var element = this.elements.dialog, + current = element, + offsetLeft = 0, + offsetTop = 0; + + //subtract existing left,top + if (element.style.left) { + offsetLeft -= parseInt(element.style.left, 10); + } + if (element.style.top) { + offsetTop -= parseInt(element.style.top, 10); + } + //calc offset + do { + offsetLeft += current.offsetLeft; + offsetTop += current.offsetTop; + } while (current = current.offsetParent); + + //calc left, top + var left = (x - offsetLeft); + var top = (y - offsetTop); + + //// rtl handling + if (isRightToLeft()) { + left *= -1; + } + + element.style.left = left + 'px'; + element.style.top = top + 'px'; + + // allow custom `onmoved` method + dispatchEvent('onmoved', this); + } + return this; + }, + /** + * Resize the dialog to a specific width/height (the dialog must be 'resizable'). + * The dialog can be resized to: + * A minimum width equal to the initial display width + * A minimum height equal to the sum of header/footer heights. + * + * + * @param {Number or String} width The new dialog width in pixels or in percent. + * @param {Number or String} height The new dialog height in pixels or in percent. + * + * @return {Object} The dialog instance. + */ + resizeTo:function(width,height){ + var w = parseFloat(width), + h = parseFloat(height), + regex = /(\d*\.\d+|\d+)%/ + ; + + if(!isNaN(w) && !isNaN(h) && this.get('resizable') === true){ + + // allow custom `onresize` method + dispatchEvent('onresize', this); + + if(('' + width).match(regex)){ + w = w / 100 * document.documentElement.clientWidth ; + } + + if(('' + height).match(regex)){ + h = h / 100 * document.documentElement.clientHeight; + } + + var element = this.elements.dialog; + if (element.style.maxWidth !== 'none') { + element.style.minWidth = (minWidth = element.offsetWidth) + 'px'; + } + element.style.maxWidth = 'none'; + element.style.minHeight = this.elements.header.offsetHeight + this.elements.footer.offsetHeight + 'px'; + element.style.width = w + 'px'; + element.style.height = h + 'px'; + + // allow custom `onresized` method + dispatchEvent('onresized', this); + } + return this; + }, + /** + * Gets or Sets dialog settings/options + * + * @param {String|Object} key A string specifying a propery name or a collection of key/value pairs. + * @param {Object} value Optional, the value associated with the key (in case it was a string). + * + * @return {undefined} + */ + setting : function (key, value) { + var self = this; + var result = update(this, this.__internal.options, function(k,o,n){ optionUpdated(self,k,o,n); }, key, value); + if(result.op === 'get'){ + if(result.found){ + return result.value; + }else if(typeof this.settings !== 'undefined'){ + return update(this, this.settings, this.settingUpdated || function(){}, key, value).value; + }else{ + return undefined; + } + }else if(result.op === 'set'){ + if(result.items.length > 0){ + var callback = this.settingUpdated || function(){}; + for(var x=0;x 0) { + var self = this; + this.__internal.timer = setTimeout(function () { self.dismiss(); }, this.__internal.delay * 1000); + } + return this; + }, + /* + * Sets the notification message contents + * @param {string or DOMElement} content The notification message content + * + */ + setContent: function (content) { + if (isString(content)) { + clearContents(this.element); + this.element.innerHTML = content; + } else if (content instanceof window.HTMLElement && this.element.firstChild !== content) { + clearContents(this.element); + this.element.appendChild(content); + } + if(this.__internal.closeButton){ + var close = document.createElement('span'); + addClass(close, classes.close); + close.setAttribute('data-close', true); + this.element.appendChild(close); + } + return this; + }, + /* + * Dismisses all open notifications except this. + * + */ + dismissOthers: function () { + notifier.dismissAll(this); + return this; + } + }); + } + + //notifier api + return { + /** + * Gets or Sets notifier settings. + * + * @param {string} key The setting name + * @param {Variant} value The setting value. + * + * @return {Object} if the called as a setter, return the notifier instance. + */ + setting: function (key, value) { + //ensure init + initialize(this); + + if (typeof value === 'undefined') { + //get + return this.__internal[key]; + } else { + //set + switch (key) { + case 'position': + this.__internal.position = value; + updatePosition(this); + break; + case 'delay': + this.__internal.delay = value; + break; + } + } + return this; + }, + /** + * [Alias] Sets dialog settings/options + */ + set:function(key,value){ + this.setting(key,value); + return this; + }, + /** + * [Alias] Gets dialog settings/options + */ + get:function(key){ + return this.setting(key); + }, + /** + * Creates a new notification message + * + * @param {string} type The type of notification message (simply a CSS class name 'ajs-{type}' to be added). + * @param {Function} callback A callback function to be invoked when the message is dismissed. + * + * @return {undefined} + */ + create: function (type, callback) { + //ensure notifier init + initialize(this); + //create new notification message + var div = document.createElement('div'); + div.className = classes.message + ((typeof type === 'string' && type !== '') ? ' ' + classes.prefix + type : ''); + return create(div, callback); + }, + /** + * Dismisses all open notifications. + * + * @param {Object} excpet [optional] The notification object to exclude from dismissal. + * + */ + dismissAll: function (except) { + var clone = openInstances.slice(0); + for (var x = 0; x < clone.length; x += 1) { + var instance = clone[x]; + if (except === undefined || except !== instance) { + instance.dismiss(); + } + } + } + }; + })(); + + /** + * Alertify public API + * This contains everything that is exposed through the alertify object. + * + * @return {Object} + */ + function Alertify() { + + // holds a references of created dialogs + var dialogs = {}; + + /** + * Extends a given prototype by merging properties from base into sub. + * + * @sub {Object} sub The prototype being overwritten. + * @base {Object} base The prototype being written. + * + * @return {Object} The extended prototype. + */ + function extend(sub, base) { + // copy dialog pototype over definition. + for (var prop in base) { + if (base.hasOwnProperty(prop)) { + sub[prop] = base[prop]; + } + } + return sub; + } + + + /** + * Helper: returns a dialog instance from saved dialogs. + * and initializes the dialog if its not already initialized. + * + * @name {String} name The dialog name. + * + * @return {Object} The dialog instance. + */ + function get_dialog(name) { + var dialog = dialogs[name].dialog; + //initialize the dialog if its not already initialized. + if (dialog && typeof dialog.__init === 'function') { + dialog.__init(dialog); + } + return dialog; + } + + /** + * Helper: registers a new dialog definition. + * + * @name {String} name The dialog name. + * @Factory {Function} Factory a function resposible for creating dialog prototype. + * @transient {Boolean} transient True to create a new dialog instance each time the dialog is invoked, false otherwise. + * @base {String} base the name of another dialog to inherit from. + * + * @return {Object} The dialog definition. + */ + function register(name, Factory, transient, base) { + var definition = { + dialog: null, + factory: Factory + }; + + //if this is based on an existing dialog, create a new definition + //by applying the new protoype over the existing one. + if (base !== undefined) { + definition.factory = function () { + return extend(new dialogs[base].factory(), new Factory()); + }; + } + + if (!transient) { + //create a new definition based on dialog + definition.dialog = extend(new definition.factory(), dialog); + } + return dialogs[name] = definition; + } + + return { + /** + * Alertify defaults + * + * @type {Object} + */ + defaults: defaults, + /** + * Dialogs factory + * + * @param {string} Dialog name. + * @param {Function} A Dialog factory function. + * @param {Boolean} Indicates whether to create a singleton or transient dialog. + * @param {String} The name of the base type to inherit from. + */ + dialog: function (name, Factory, transient, base) { + + // get request, create a new instance and return it. + if (typeof Factory !== 'function') { + return get_dialog(name); + } + + if (this.hasOwnProperty(name)) { + throw new Error('alertify.dialog: name already exists'); + } + + // register the dialog + var definition = register(name, Factory, transient, base); + + if (transient) { + + // make it public + this[name] = function () { + //if passed with no params, consider it a get request + if (arguments.length === 0) { + return definition.dialog; + } else { + var instance = extend(new definition.factory(), dialog); + //ensure init + if (instance && typeof instance.__init === 'function') { + instance.__init(instance); + } + instance['main'].apply(instance, arguments); + return instance['show'].apply(instance); + } + }; + } else { + // make it public + this[name] = function () { + //ensure init + if (definition.dialog && typeof definition.dialog.__init === 'function') { + definition.dialog.__init(definition.dialog); + } + //if passed with no params, consider it a get request + if (arguments.length === 0) { + return definition.dialog; + } else { + var dialog = definition.dialog; + dialog['main'].apply(definition.dialog, arguments); + return dialog['show'].apply(definition.dialog); + } + }; + } + }, + /** + * Close all open dialogs. + * + * @param {Object} excpet [optional] The dialog object to exclude from closing. + * + * @return {undefined} + */ + closeAll: function (except) { + var clone = openDialogs.slice(0); + for (var x = 0; x < clone.length; x += 1) { + var instance = clone[x]; + if (except === undefined || except !== instance) { + instance.close(); + } + } + }, + /** + * Gets or Sets dialog settings/options. if the dialog is transient, this call does nothing. + * + * @param {string} name The dialog name. + * @param {String|Object} key A string specifying a propery name or a collection of key/value pairs. + * @param {Variant} value Optional, the value associated with the key (in case it was a string). + * + * @return {undefined} + */ + setting: function (name, key, value) { + + if (name === 'notifier') { + return notifier.setting(key, value); + } + + var dialog = get_dialog(name); + if (dialog) { + return dialog.setting(key, value); + } + }, + /** + * [Alias] Sets dialog settings/options + */ + set: function(name,key,value){ + return this.setting(name, key,value); + }, + /** + * [Alias] Gets dialog settings/options + */ + get: function(name, key){ + return this.setting(name, key); + }, + /** + * Creates a new notification message. + * If a type is passed, a class name "ajs-{type}" will be added. + * This allows for custom look and feel for various types of notifications. + * + * @param {String | DOMElement} [message=undefined] Message text + * @param {String} [type=''] Type of log message + * @param {String} [wait=''] Time (in seconds) to wait before auto-close + * @param {Function} [callback=undefined] A callback function to be invoked when the log is closed. + * + * @return {Object} Notification object. + */ + notify: function (message, type, wait, callback) { + return notifier.create(type, callback).push(message, wait); + }, + /** + * Creates a new notification message. + * + * @param {String} [message=undefined] Message text + * @param {String} [wait=''] Time (in seconds) to wait before auto-close + * @param {Function} [callback=undefined] A callback function to be invoked when the log is closed. + * + * @return {Object} Notification object. + */ + message: function (message, wait, callback) { + return notifier.create(null, callback).push(message, wait); + }, + /** + * Creates a new notification message of type 'success'. + * + * @param {String} [message=undefined] Message text + * @param {String} [wait=''] Time (in seconds) to wait before auto-close + * @param {Function} [callback=undefined] A callback function to be invoked when the log is closed. + * + * @return {Object} Notification object. + */ + success: function (message, wait, callback) { + return notifier.create('success', callback).push(message, wait); + }, + /** + * Creates a new notification message of type 'error'. + * + * @param {String} [message=undefined] Message text + * @param {String} [wait=''] Time (in seconds) to wait before auto-close + * @param {Function} [callback=undefined] A callback function to be invoked when the log is closed. + * + * @return {Object} Notification object. + */ + error: function (message, wait, callback) { + return notifier.create('error', callback).push(message, wait); + }, + /** + * Creates a new notification message of type 'warning'. + * + * @param {String} [message=undefined] Message text + * @param {String} [wait=''] Time (in seconds) to wait before auto-close + * @param {Function} [callback=undefined] A callback function to be invoked when the log is closed. + * + * @return {Object} Notification object. + */ + warning: function (message, wait, callback) { + return notifier.create('warning', callback).push(message, wait); + }, + /** + * Dismisses all open notifications + * + * @return {undefined} + */ + dismissAll: function () { + notifier.dismissAll(); + } + }; + } + var alertify = new Alertify(); + + /** + * Alert dialog definition + * + * invoked by: + * alertify.alert(message); + * alertify.alert(title, message); + * alertify.alert(message, onok); + * alertify.alert(title, message, onok); + */ + alertify.dialog('alert', function () { + return { + main: function (_title, _message, _onok) { + var title, message, onok; + switch (arguments.length) { + case 1: + message = _title; + break; + case 2: + if (typeof _message === 'function') { + message = _title; + onok = _message; + } else { + title = _title; + message = _message; + } + break; + case 3: + title = _title; + message = _message; + onok = _onok; + break; + } + this.set('title', title); + this.set('message', message); + this.set('onok', onok); + return this; + }, + setup: function () { + return { + buttons: [ + { + text: alertify.defaults.glossary.ok, + key: keys.ESC, + invokeOnClose: true, + className: alertify.defaults.theme.ok, + } + ], + focus: { + element: 0, + select: false + }, + options: { + maximizable: false, + resizable: false + } + }; + }, + build: function () { + // nothing + }, + prepare: function () { + //nothing + }, + setMessage: function (message) { + this.setContent(message); + }, + settings: { + message: undefined, + onok: undefined, + label: undefined, + }, + settingUpdated: function (key, oldValue, newValue) { + switch (key) { + case 'message': + this.setMessage(newValue); + break; + case 'label': + if (this.__internal.buttons[0].element) { + this.__internal.buttons[0].element.innerHTML = newValue; + } + break; + } + }, + callback: function (closeEvent) { + if (typeof this.get('onok') === 'function') { + var returnValue = this.get('onok').call(this, closeEvent); + if (typeof returnValue !== 'undefined') { + closeEvent.cancel = !returnValue; + } + } + } + }; + }); + /** + * Confirm dialog object + * + * alertify.confirm(message); + * alertify.confirm(message, onok); + * alertify.confirm(message, onok, oncancel); + * alertify.confirm(title, message, onok, oncancel); + */ + alertify.dialog('confirm', function () { + + var autoConfirm = { + timer: null, + index: null, + text: null, + duration: null, + task: function (event, self) { + if (self.isOpen()) { + self.__internal.buttons[autoConfirm.index].element.innerHTML = autoConfirm.text + ' (‏' + autoConfirm.duration + '‏) '; + autoConfirm.duration -= 1; + if (autoConfirm.duration === -1) { + clearAutoConfirm(self); + var button = self.__internal.buttons[autoConfirm.index]; + var closeEvent = createCloseEvent(autoConfirm.index, button); + + if (typeof self.callback === 'function') { + self.callback.apply(self, [closeEvent]); + } + //close the dialog. + if (closeEvent.close !== false) { + self.close(); + } + } + } else { + clearAutoConfirm(self); + } + } + }; + + function clearAutoConfirm(self) { + if (autoConfirm.timer !== null) { + clearInterval(autoConfirm.timer); + autoConfirm.timer = null; + self.__internal.buttons[autoConfirm.index].element.innerHTML = autoConfirm.text; + } + } + + function startAutoConfirm(self, index, duration) { + clearAutoConfirm(self); + autoConfirm.duration = duration; + autoConfirm.index = index; + autoConfirm.text = self.__internal.buttons[index].element.innerHTML; + autoConfirm.timer = setInterval(delegate(self, autoConfirm.task), 1000); + autoConfirm.task(null, self); + } + + + return { + main: function (_title, _message, _onok, _oncancel) { + var title, message, onok, oncancel; + switch (arguments.length) { + case 1: + message = _title; + break; + case 2: + message = _title; + onok = _message; + break; + case 3: + message = _title; + onok = _message; + oncancel = _onok; + break; + case 4: + title = _title; + message = _message; + onok = _onok; + oncancel = _oncancel; + break; + } + this.set('title', title); + this.set('message', message); + this.set('onok', onok); + this.set('oncancel', oncancel); + return this; + }, + setup: function () { + return { + buttons: [ + { + text: alertify.defaults.glossary.ok, + key: keys.ENTER, + className: alertify.defaults.theme.ok, + }, + { + text: alertify.defaults.glossary.cancel, + key: keys.ESC, + invokeOnClose: true, + className: alertify.defaults.theme.cancel, + } + ], + focus: { + element: 0, + select: false + }, + options: { + maximizable: false, + resizable: false + } + }; + }, + build: function () { + //nothing + }, + prepare: function () { + //nothing + }, + setMessage: function (message) { + this.setContent(message); + }, + settings: { + message: null, + labels: null, + onok: null, + oncancel: null, + defaultFocus: null, + reverseButtons: null, + }, + settingUpdated: function (key, oldValue, newValue) { + switch (key) { + case 'message': + this.setMessage(newValue); + break; + case 'labels': + if ('ok' in newValue && this.__internal.buttons[0].element) { + this.__internal.buttons[0].text = newValue.ok; + this.__internal.buttons[0].element.innerHTML = newValue.ok; + } + if ('cancel' in newValue && this.__internal.buttons[1].element) { + this.__internal.buttons[1].text = newValue.cancel; + this.__internal.buttons[1].element.innerHTML = newValue.cancel; + } + break; + case 'reverseButtons': + if (newValue === true) { + this.elements.buttons.primary.appendChild(this.__internal.buttons[0].element); + } else { + this.elements.buttons.primary.appendChild(this.__internal.buttons[1].element); + } + break; + case 'defaultFocus': + this.__internal.focus.element = newValue === 'ok' ? 0 : 1; + break; + } + }, + callback: function (closeEvent) { + clearAutoConfirm(this); + var returnValue; + switch (closeEvent.index) { + case 0: + if (typeof this.get('onok') === 'function') { + returnValue = this.get('onok').call(this, closeEvent); + if (typeof returnValue !== 'undefined') { + closeEvent.cancel = !returnValue; + } + } + break; + case 1: + if (typeof this.get('oncancel') === 'function') { + returnValue = this.get('oncancel').call(this, closeEvent); + if (typeof returnValue !== 'undefined') { + closeEvent.cancel = !returnValue; + } + } + break; + } + }, + autoOk: function (duration) { + startAutoConfirm(this, 0, duration); + return this; + }, + autoCancel: function (duration) { + startAutoConfirm(this, 1, duration); + return this; + } + }; + }); + /** + * Prompt dialog object + * + * invoked by: + * alertify.prompt(message); + * alertify.prompt(message, value); + * alertify.prompt(message, value, onok); + * alertify.prompt(message, value, onok, oncancel); + * alertify.prompt(title, message, value, onok, oncancel); + */ + alertify.dialog('prompt', function () { + var input = document.createElement('INPUT'); + var p = document.createElement('P'); + return { + main: function (_title, _message, _value, _onok, _oncancel) { + var title, message, value, onok, oncancel; + switch (arguments.length) { + case 1: + message = _title; + break; + case 2: + message = _title; + value = _message; + break; + case 3: + message = _title; + value = _message; + onok = _value; + break; + case 4: + message = _title; + value = _message; + onok = _value; + oncancel = _onok; + break; + case 5: + title = _title; + message = _message; + value = _value; + onok = _onok; + oncancel = _oncancel; + break; + } + this.set('title', title); + this.set('message', message); + this.set('value', value); + this.set('onok', onok); + this.set('oncancel', oncancel); + return this; + }, + setup: function () { + return { + buttons: [ + { + text: alertify.defaults.glossary.ok, + key: keys.ENTER, + className: alertify.defaults.theme.ok, + }, + { + text: alertify.defaults.glossary.cancel, + key: keys.ESC, + invokeOnClose: true, + className: alertify.defaults.theme.cancel, + } + ], + focus: { + element: input, + select: true + }, + options: { + maximizable: false, + resizable: false + } + }; + }, + build: function () { + input.className = alertify.defaults.theme.input; + input.setAttribute('type', 'text'); + input.value = this.get('value'); + this.elements.content.appendChild(p); + this.elements.content.appendChild(input); + }, + prepare: function () { + //nothing + }, + setMessage: function (message) { + if (isString(message)) { + clearContents(p); + p.innerHTML = message; + } else if (message instanceof window.HTMLElement && p.firstChild !== message) { + clearContents(p); + p.appendChild(message); + } + }, + settings: { + message: undefined, + labels: undefined, + onok: undefined, + oncancel: undefined, + value: '', + type:'text', + reverseButtons: undefined, + }, + settingUpdated: function (key, oldValue, newValue) { + switch (key) { + case 'message': + this.setMessage(newValue); + break; + case 'value': + input.value = newValue; + break; + case 'type': + switch (newValue) { + case 'text': + case 'color': + case 'date': + case 'datetime-local': + case 'email': + case 'month': + case 'number': + case 'password': + case 'search': + case 'tel': + case 'time': + case 'week': + input.type = newValue; + break; + default: + input.type = 'text'; + break; + } + break; + case 'labels': + if (newValue.ok && this.__internal.buttons[0].element) { + this.__internal.buttons[0].element.innerHTML = newValue.ok; + } + if (newValue.cancel && this.__internal.buttons[1].element) { + this.__internal.buttons[1].element.innerHTML = newValue.cancel; + } + break; + case 'reverseButtons': + if (newValue === true) { + this.elements.buttons.primary.appendChild(this.__internal.buttons[0].element); + } else { + this.elements.buttons.primary.appendChild(this.__internal.buttons[1].element); + } + break; + } + }, + callback: function (closeEvent) { + var returnValue; + switch (closeEvent.index) { + case 0: + this.settings.value = input.value; + if (typeof this.get('onok') === 'function') { + returnValue = this.get('onok').call(this, closeEvent, this.settings.value); + if (typeof returnValue !== 'undefined') { + closeEvent.cancel = !returnValue; + } + } + break; + case 1: + if (typeof this.get('oncancel') === 'function') { + returnValue = this.get('oncancel').call(this, closeEvent); + if (typeof returnValue !== 'undefined') { + closeEvent.cancel = !returnValue; + } + } + if(!closeEvent.cancel){ + input.value = this.settings.value; + } + break; + } + } + }; + }); + + // CommonJS + if ( typeof module === 'object' && typeof module.exports === 'object' ) { + module.exports = alertify; + // AMD + } else if ( typeof define === 'function' && define.amd) { + define( [], function () { + return alertify; + } ); + // window + } else if ( !window.alertify ) { + window.alertify = alertify; + } + +} ( typeof window !== 'undefined' ? window : this ) ); diff --git a/static/lib/alertify-1.14.0/alertify.min.js b/static/lib/alertify-1.14.0/alertify.min.js new file mode 100644 index 0000000..4ce970f --- /dev/null +++ b/static/lib/alertify-1.14.0/alertify.min.js @@ -0,0 +1,3 @@ +/*! alertifyjs - v1.14.0 - Mohammad Younes (http://alertifyjs.com) */ +!function(a){"use strict";function b(a,b){a.className+=" "+b}function c(a,b){for(var c=a.className.split(" "),d=b.split(" "),e=0;e-1&&c.splice(f,1)}a.className=c.join(" ")}function d(){return"rtl"===a.getComputedStyle(document.body).direction}function e(){return document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop}function f(){return document.documentElement&&document.documentElement.scrollLeft||document.body.scrollLeft}function g(a){for(;a.lastChild;)a.removeChild(a.lastChild)}function h(a){return"[object String]"===Object.prototype.toString.call(a)}function i(a){if(null===a)return a;var b;if(Array.isArray(a)){b=[];for(var c=0;c0){for(var c=[],d=0;d=0?(c(document.body,Ia.noOverflow),x(!1)):a>0&&document.body.className.indexOf(Ia.noOverflow)<0&&(x(!0),b(document.body,Ia.noOverflow))}function x(d){z.defaults.preventBodyShift&&(d&&document.documentElement.scrollHeight>document.documentElement.clientHeight?(Ka=Ca,Ja=a.getComputedStyle(document.body).top,b(document.body,Ia.fixed),document.body.style.top=-Ca+"px"):d||(Ca=Ka,document.body.style.top=Ja,c(document.body,Ia.fixed),s()))}function y(a,d,e){h(e)&&c(a.elements.root,Ia.prefix+e),b(a.elements.root,Ia.prefix+d),Ea=a.elements.root.offsetWidth}function A(a){a.get("transitionOff")?b(a.elements.root,Ia.noTransition):c(a.elements.root,Ia.noTransition)}function B(a){a.get("modal")?(c(a.elements.root,Ia.modeless),a.isOpen()&&(ua(a),Q(a),t())):(b(a.elements.root,Ia.modeless),a.isOpen()&&(ta(a),Q(a),t()))}function C(a){a.get("basic")?b(a.elements.root,Ia.basic):c(a.elements.root,Ia.basic)}function D(a){a.get("frameless")?b(a.elements.root,Ia.frameless):c(a.elements.root,Ia.frameless)}function E(a,b){for(var c=r.indexOf(b),d=c+1;d200&&(Ma=a.timeStamp)&&!La){var c=a.srcElement||a.target;!0===b.get("closableByDimmer")&&c===b.elements.modal&&H(b)}La=!1}function V(a,b){if(Date.now()-Na>200&&(Na=Date.now()))for(var c=0;c-1?(V(b,function(a){return a.key===c}),!1):void 0}function Y(a){var b=r[r.length-1],c=a.keyCode;if(c===p.LEFT||c===p.RIGHT){for(var d=b.__internal.buttons,e=0;ep.F1-1&&Da.indexOf(c)>-1)return a.preventDefault(),a.stopPropagation(),V(b,function(a){return a.key===c}),!1}function Z(a,b){if(b)b.focus();else{var c=a.__internal.focus,d=c.element;switch(typeof c.element){case"number":a.__internal.buttons.length>c.element&&(d=!0===a.get("basic")?a.elements.reset[0]:a.__internal.buttons[c.element].element);break;case"string":d=a.elements.body.querySelector(c.element);break;case"function":d=c.element.call(a)}!0!==a.get("defaultFocusOff")&&(void 0!==d&&null!==d||0!==a.__internal.buttons.length)||(d=a.elements.reset[0]),d&&d.focus&&(d.focus(),c.select&&d.select&&d.select())}}function $(a,b){if(!b)for(var c=r.length-1;c>-1;c-=1)if(r[c].isModal()){b=r[c];break}if(b&&b.isModal()){var d,e=b.elements.reset[0],f=b.elements.reset[1],g=a.relatedTarget,h=b.elements.root.contains(g),i=a.srcElement||a.target;if(i===e&&!h||i===f&&g===e)return;i===f||i===document.body?d=e:i===e&&g===f?d=_(b):i===e&&h&&(d=_(b,!0)),Z(b,d)}}function _(a,b){var c=[].slice.call(a.elements.dialog.querySelectorAll(q.tabbable));b&&c.reverse();for(var d=0;dZa?b.style.left=Ya+k+"px":b.offsetWidth>=$a&&(b.style.left=Ya-k+"px")}}function la(a,c){if(!c.isMaximized()){var d;if("touchstart"===a.type?(a.preventDefault(),d=a.targetTouches[0]):0===a.button&&(d=a),d){m("onresize",c),Xa=c,_a=c.elements.resizeHandle.offsetHeight/2;var e=c.elements.dialog;return b(e,Ia.capture),Ya=parseInt(e.style.left,10),e.style.height=e.offsetHeight+"px",e.style.minHeight=c.elements.header.offsetHeight+c.elements.footer.offsetHeight+"px",e.style.width=(Za=e.offsetWidth)+"px","none"!==e.style.maxWidth&&(e.style.minWidth=($a=e.offsetWidth)+"px"),e.style.maxWidth="none",b(document.body,Ia.noSelection),!1}}}function ma(a){if(Xa){var b;"touchmove"===a.type?(a.preventDefault(),b=a.targetTouches[0]):0===a.button&&(b=a),b&&ka(b,Xa.elements.dialog,!Xa.get("modal")&&!Xa.get("pinned"))}}function na(){if(Xa){var a=Xa;Xa=null,c(document.body,Ia.noSelection),c(a.elements.dialog,Ia.capture),La=!0,m("onresized",a)}}function oa(a){Xa=null;var b=a.elements.dialog;"none"===b.style.maxWidth&&(b.style.maxWidth=b.style.minWidth=b.style.width=b.style.height=b.style.minHeight=b.style.left="",Ya=Number.Nan,Za=$a=_a=0)}function pa(a){a.get("resizable")?(b(a.elements.root,Ia.resizable),a.isOpen()&&xa(a)):(oa(a),c(a.elements.root,Ia.resizable),a.isOpen()&&ya(a))}function qa(){for(var a=0;a-1&&a.navigator.userAgent.indexOf("Chrome")<0,Ha={dimmer:'
',modal:'
',dialog:'
',reset:'',commands:'
',header:'
',body:'
',content:'
',footer:'',buttons:{primary:'
',auxiliary:'
'},button:'',resizeHandle:'
'},Ia={animationIn:"ajs-in",animationOut:"ajs-out",base:"alertify",basic:"ajs-basic",capture:"ajs-capture",closable:"ajs-closable",fixed:"ajs-fixed",frameless:"ajs-frameless",hidden:"ajs-hidden",maximize:"ajs-maximize",maximized:"ajs-maximized",maximizable:"ajs-maximizable",modeless:"ajs-modeless",movable:"ajs-movable",noSelection:"ajs-no-selection",noOverflow:"ajs-no-overflow",noPadding:"ajs-no-padding",pin:"ajs-pin",pinnable:"ajs-pinnable",prefix:"ajs-",resizable:"ajs-resizable",restore:"ajs-restore",shake:"ajs-shake",unpinned:"ajs-unpinned",noTransition:"ajs-no-transition"},Ja="",Ka=0,La=!1,Ma=0,Na=0,Oa=!1,Pa=null,Qa=0,Ra=0,Sa="pageX",Ta="pageY",Ua=null,Va=!1,Wa=null,Xa=null,Ya=Number.Nan,Za=0,$a=0,_a=0;return{__init:n,isOpen:function(){return this.__internal.isOpen},isModal:function(){return this.elements.root.className.indexOf(Ia.modeless)<0},isMaximized:function(){return this.elements.root.className.indexOf(Ia.maximized)>-1},isPinned:function(){return this.elements.root.className.indexOf(Ia.unpinned)<0},maximize:function(){return this.isMaximized()||L(this),this},restore:function(){return this.isMaximized()&&M(this),this},pin:function(){return this.isPinned()||J(this),this},unpin:function(){return this.isPinned()&&K(this),this},bringToFront:function(){return E(null,this),this},moveTo:function(a,b){if(!isNaN(a)&&!isNaN(b)){m("onmove",this);var c=this.elements.dialog,e=c,f=0,g=0;c.style.left&&(f-=parseInt(c.style.left,10)),c.style.top&&(g-=parseInt(c.style.top,10));do{f+=e.offsetLeft,g+=e.offsetTop}while(e=e.offsetParent);var h=a-f,i=b-g;d()&&(h*=-1),c.style.left=h+"px",c.style.top=i+"px",m("onmoved",this)}return this},resizeTo:function(a,b){var c=parseFloat(a),d=parseFloat(b),e=/(\d*\.\d+|\d+)%/;if(!isNaN(c)&&!isNaN(d)&&!0===this.get("resizable")){m("onresize",this),(""+a).match(e)&&(c=c/100*document.documentElement.clientWidth),(""+b).match(e)&&(d=d/100*document.documentElement.clientHeight);var f=this.elements.dialog;"none"!==f.style.maxWidth&&(f.style.minWidth=($a=f.offsetWidth)+"px"),f.style.maxWidth="none",f.style.minHeight=this.elements.header.offsetHeight+this.elements.footer.offsetHeight+"px",f.style.width=c+"px",f.style.height=d+"px",m("onresized",this)}return this},setting:function(a,b){var c=this,d=G(this,this.__internal.options,function(a,b,d){F(c,a,b,d)},a,b);if("get"===d.op)return d.found?d.value:void 0!==this.settings?G(this,this.settings,this.settingUpdated||function(){},a,b).value:void 0;if("set"===d.op){if(d.items.length>0)for(var e=this.settingUpdated||function(){},f=0;f0){var b=this;this.__internal.timer=setTimeout(function(){b.dismiss()},1e3*this.__internal.delay)}return this},setContent:function(c){if(h(c)?(g(this.element),this.element.innerHTML=c):c instanceof a.HTMLElement&&this.element.firstChild!==c&&(g(this.element),this.element.appendChild(c)),this.__internal.closeButton){var d=document.createElement("span");b(d,o.close),d.setAttribute("data-close",!0),this.element.appendChild(d)}return this},dismissOthers:function(){return y.dismissAll(this),this}})}var l,m,n=[],o=q.notifier.classes,p=o.base;return{setting:function(a,b){if(d(this),void 0===b)return this.__internal[a];switch(a){case"position":this.__internal.position=b,i(this);break;case"delay":this.__internal.delay=b}return this},set:function(a,b){return this.setting(a,b),this},get:function(a){return this.setting(a)},create:function(a,b){d(this);var c=document.createElement("div");return c.className=o.message+("string"==typeof a&&""!==a?" "+o.prefix+a:""),j(c,b)},dismissAll:function(a){for(var b=n.slice(0),c=0;c (http://alertifyjs.com) - * Licensed under GPL 3 */ +/** + * alertifyjs 1.14.0 http://alertifyjs.com + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. + * Copyright 2024 Mohammad Younes (http://alertifyjs.com) + * Licensed under GPL 3 */ .alertify .ajs-dimmer { position: fixed; z-index: 1981; @@ -13,7 +13,7 @@ padding: 0; margin: 0; background-color: #252525; - opacity: .5; + opacity: 0.5; } .alertify .ajs-modal { position: fixed; @@ -335,8 +335,8 @@ .alertify .ajs-dialog.ajs-shake { -webkit-animation-name: ajs-shake; animation-name: ajs-shake; - -webkit-animation-duration: .1s; - animation-duration: .1s; + -webkit-animation-duration: 0.1s; + animation-duration: 0.1s; -webkit-animation-fill-mode: both; animation-fill-mode: both; } diff --git a/static/lib/alertify-1.14.0/css/alertify.min.css b/static/lib/alertify-1.14.0/css/alertify.min.css new file mode 100644 index 0000000..f7d2954 --- /dev/null +++ b/static/lib/alertify-1.14.0/css/alertify.min.css @@ -0,0 +1,6 @@ +/** + * alertifyjs 1.14.0 http://alertifyjs.com + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. + * Copyright 2024 Mohammad Younes (http://alertifyjs.com) + * Licensed under GPL 3 */ +.alertify .ajs-dimmer{position:fixed;z-index:1981;top:0;right:0;bottom:0;left:0;padding:0;margin:0;background-color:#252525;opacity:.5}.alertify .ajs-modal{position:fixed;top:0;right:0;left:0;bottom:0;padding:0;overflow-y:auto;z-index:1981}.alertify .ajs-dialog{position:relative;margin:5% auto;min-height:110px;max-width:500px;padding:24px 24px 0 24px;outline:0;background-color:#fff}.alertify .ajs-dialog.ajs-capture:before{content:'';position:absolute;top:0;right:0;bottom:0;left:0;display:block;z-index:1}.alertify .ajs-reset{position:absolute!important;display:inline!important;width:0!important;height:0!important;opacity:0!important}.alertify .ajs-commands{position:absolute;right:4px;margin:-14px 24px 0 0;z-index:2}.alertify .ajs-commands button{display:none;width:10px;height:10px;margin-left:10px;padding:10px;border:0;background-color:transparent;background-repeat:no-repeat;background-position:center;cursor:pointer}.alertify .ajs-commands button.ajs-close{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAh0lEQVQYlY2QsQ0EIQwEB9cBAR1CJUaI/gigDnwR6NBL/7/xWLNrZ2b8EwGotVpr7eOitWa1VjugiNB7R1UPrKrWe0dEAHBbXUqxMQbeewDmnHjvyTm7C3zDwAUd9c63YQdUVdu6EAJzzquz7HXvTiklt+H9DQFYaxFjvDqllFyMkbXWvfpXHjJrWFgdBq/hAAAAAElFTkSuQmCC)}.alertify .ajs-commands button.ajs-maximize{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAOUlEQVQYlWP8//8/AzGAhYGBgaG4uBiv6t7eXkYmooxjYGAgWiELsvHYFMCcRX2rSXcjoSBiJDbAAeD+EGu+8BZcAAAAAElFTkSuQmCC)}.alertify .ajs-header{margin:-24px;margin-bottom:0;padding:16px 24px;background-color:#fff}.alertify .ajs-body{min-height:56px}.alertify .ajs-body .ajs-content{padding:16px 24px 16px 16px}.alertify .ajs-footer{padding:4px;margin-left:-24px;margin-right:-24px;min-height:43px;background-color:#fff}.alertify .ajs-footer .ajs-buttons.ajs-primary{text-align:right}.alertify .ajs-footer .ajs-buttons.ajs-primary .ajs-button{margin:4px}.alertify .ajs-footer .ajs-buttons.ajs-auxiliary{float:left;clear:none;text-align:left}.alertify .ajs-footer .ajs-buttons.ajs-auxiliary .ajs-button{margin:4px}.alertify .ajs-footer .ajs-buttons .ajs-button{min-width:88px;min-height:35px}.alertify .ajs-handle{position:absolute;display:none;width:10px;height:10px;right:0;bottom:0;z-index:1;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMS8xNEDQYmMAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAQ0lEQVQYlaXNMQoAIAxD0dT7H657l0KX3iJuUlBUNOsPPCGJm7VDp6ryeMxMuDsAQH7owW3pyn3RS26iKxERMLN3ugOaAkaL3sWVigAAAABJRU5ErkJggg==);-webkit-transform:scaleX(1);transform:scaleX(1);cursor:se-resize}.alertify.ajs-no-overflow .ajs-body .ajs-content{overflow:hidden!important}.alertify.ajs-no-padding.ajs-maximized .ajs-body .ajs-content{left:0;right:0;padding:0}.alertify.ajs-no-padding:not(.ajs-maximized) .ajs-body{margin-left:-24px;margin-right:-24px}.alertify.ajs-no-padding:not(.ajs-maximized) .ajs-body .ajs-content{padding:0}.alertify.ajs-no-padding.ajs-resizable .ajs-body .ajs-content{left:0;right:0}.alertify.ajs-maximizable .ajs-commands button.ajs-maximize,.alertify.ajs-maximizable .ajs-commands button.ajs-restore{display:inline-block}.alertify.ajs-closable .ajs-commands button.ajs-close{display:inline-block}.alertify.ajs-maximized .ajs-dialog{width:100%!important;height:100%!important;max-width:none!important;margin:0 auto!important;top:0!important;left:0!important}.alertify.ajs-maximized.ajs-modeless .ajs-modal{position:fixed!important;min-height:100%!important;max-height:none!important;margin:0!important}.alertify.ajs-maximized .ajs-commands button.ajs-maximize{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAASklEQVQYlZWQ0QkAMQhDtXRincOZX78KVtrDCwgqJNEoIB3MPLj7lRUROlpyVXGzby6zWuY+kz6tj5sBMTMAyVV3/595RbOh3cAXsww1raeiOcoAAAAASUVORK5CYII=)}.alertify.ajs-maximized .ajs-dialog,.alertify.ajs-resizable .ajs-dialog{padding:0}.alertify.ajs-maximized .ajs-commands,.alertify.ajs-resizable .ajs-commands{margin:14px 24px 0 0}.alertify.ajs-maximized .ajs-header,.alertify.ajs-resizable .ajs-header{position:absolute;top:0;left:0;right:0;margin:0;padding:16px 24px}.alertify.ajs-maximized .ajs-body,.alertify.ajs-resizable .ajs-body{min-height:224px;display:inline-block}.alertify.ajs-maximized .ajs-body .ajs-content,.alertify.ajs-resizable .ajs-body .ajs-content{position:absolute;top:50px;right:24px;bottom:50px;left:24px;overflow:auto}.alertify.ajs-maximized .ajs-footer,.alertify.ajs-resizable .ajs-footer{position:absolute;left:0;right:0;bottom:0;margin:0}.alertify.ajs-resizable:not(.ajs-maximized) .ajs-dialog{min-width:548px}.alertify.ajs-resizable:not(.ajs-maximized) .ajs-handle{display:block}.alertify.ajs-movable:not(.ajs-maximized) .ajs-header{cursor:move}.alertify.ajs-modeless .ajs-dimmer,.alertify.ajs-modeless .ajs-reset{display:none}.alertify.ajs-modeless .ajs-modal{overflow:visible;max-width:none;max-height:0}.alertify.ajs-modeless.ajs-pinnable .ajs-commands button.ajs-pin{display:inline-block;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAQklEQVQYlcWPMQ4AIAwCqU9u38GbcbHRWN1MvKQDhQFMEpKImGJA0gCgnYw0V0rwxseg5erT4oSkQVI5d9f+e9+xA0NbLpWfitPXAAAAAElFTkSuQmCC)}.alertify.ajs-modeless.ajs-unpinned .ajs-modal{position:absolute}.alertify.ajs-modeless.ajs-unpinned .ajs-commands button.ajs-pin{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAO0lEQVQYlWP8//8/AzGAiShV6AqLi4txGs+CLoBLMYbC3t5eRmyaWfBZhwwYkX2NTxPRvibKjRhW4wMAhxkYGbLu3pEAAAAASUVORK5CYII=)}.alertify.ajs-modeless:not(.ajs-unpinned) .ajs-body{max-height:500px;overflow:auto}.alertify.ajs-basic .ajs-header{opacity:0}.alertify.ajs-basic .ajs-footer{visibility:hidden}.alertify.ajs-frameless .ajs-header{position:absolute;top:0;left:0;right:0;min-height:60px;margin:0;padding:0;opacity:0;z-index:1}.alertify.ajs-frameless .ajs-footer{display:none}.alertify.ajs-frameless .ajs-body .ajs-content{position:absolute;top:0;right:0;bottom:0;left:0}.alertify.ajs-frameless:not(.ajs-resizable) .ajs-dialog{padding-top:0}.alertify.ajs-frameless:not(.ajs-resizable) .ajs-dialog .ajs-commands{margin-top:0}.ajs-no-overflow{overflow:hidden!important;outline:0}.ajs-no-overflow.ajs-fixed{position:fixed;top:0;right:0;bottom:0;left:0;overflow-y:scroll!important}.ajs-no-selection,.ajs-no-selection *{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media screen and (max-width:568px){.alertify .ajs-dialog{min-width:150px}.alertify:not(.ajs-maximized) .ajs-modal{padding:0 5%}.alertify:not(.ajs-maximized).ajs-resizable .ajs-dialog{min-width:initial;min-width:auto}}@-moz-document url-prefix(){.alertify button:focus{outline:1px dotted #3593D2}}.alertify .ajs-dimmer,.alertify .ajs-modal{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition-property:opacity,visibility;transition-property:opacity,visibility;-webkit-transition-timing-function:linear;transition-timing-function:linear;-webkit-transition-duration:250ms;transition-duration:250ms}.alertify.ajs-hidden .ajs-dimmer,.alertify.ajs-hidden .ajs-modal{visibility:hidden;opacity:0}.alertify.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-duration:.5s;animation-duration:.5s}.alertify.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-duration:250ms;animation-duration:250ms}.alertify .ajs-dialog.ajs-shake{-webkit-animation-name:ajs-shake;animation-name:ajs-shake;-webkit-animation-duration:.1s;animation-duration:.1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}@-webkit-keyframes ajs-shake{0%,100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes ajs-shake{0%,100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.alertify.ajs-slide.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-slideIn;animation-name:ajs-slideIn;-webkit-animation-timing-function:cubic-bezier(0.175,0.885,0.32,1.275);animation-timing-function:cubic-bezier(0.175,0.885,0.32,1.275)}.alertify.ajs-slide.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-slideOut;animation-name:ajs-slideOut;-webkit-animation-timing-function:cubic-bezier(0.6,-0.28,0.735,0.045);animation-timing-function:cubic-bezier(0.6,-0.28,0.735,0.045)}.alertify.ajs-zoom.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-zoomIn;animation-name:ajs-zoomIn}.alertify.ajs-zoom.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-zoomOut;animation-name:ajs-zoomOut}.alertify.ajs-fade.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-fadeIn;animation-name:ajs-fadeIn}.alertify.ajs-fade.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-fadeOut;animation-name:ajs-fadeOut}.alertify.ajs-pulse.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-pulseIn;animation-name:ajs-pulseIn}.alertify.ajs-pulse.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-pulseOut;animation-name:ajs-pulseOut}.alertify.ajs-flipx.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-flipInX;animation-name:ajs-flipInX}.alertify.ajs-flipx.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-flipOutX;animation-name:ajs-flipOutX}.alertify.ajs-flipy.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-flipInY;animation-name:ajs-flipInY}.alertify.ajs-flipy.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-flipOutY;animation-name:ajs-flipOutY}@-webkit-keyframes ajs-pulseIn{0%,100%,20%,40%,60%,80%{-webkit-transition-timing-function:cubic-bezier(0.215,0.61,0.355,1);transition-timing-function:cubic-bezier(0.215,0.61,0.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes ajs-pulseIn{0%,100%,20%,40%,60%,80%{-webkit-transition-timing-function:cubic-bezier(0.215,0.61,0.355,1);transition-timing-function:cubic-bezier(0.215,0.61,0.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@-webkit-keyframes ajs-pulseOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes ajs-pulseOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@-webkit-keyframes ajs-zoomIn{0%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes ajs-zoomIn{0%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@-webkit-keyframes ajs-zoomOut{0%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}100%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}}@keyframes ajs-zoomOut{0%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}100%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}}@-webkit-keyframes ajs-fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes ajs-fadeIn{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes ajs-fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes ajs-fadeOut{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes ajs-flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes ajs-flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@-webkit-keyframes ajs-flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@keyframes ajs-flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@-webkit-keyframes ajs-flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes ajs-flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@-webkit-keyframes ajs-flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}@keyframes ajs-flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}@-webkit-keyframes ajs-slideIn{0%{margin-top:-100%}100%{margin-top:5%}}@keyframes ajs-slideIn{0%{margin-top:-100%}100%{margin-top:5%}}@-webkit-keyframes ajs-slideOut{0%{margin-top:5%}100%{margin-top:-100%}}@keyframes ajs-slideOut{0%{margin-top:5%}100%{margin-top:-100%}}.alertify-notifier{position:fixed;width:0;overflow:visible;z-index:1982;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.alertify-notifier .ajs-message{position:relative;width:260px;max-height:0;padding:0;opacity:0;margin:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition-duration:250ms;transition-duration:250ms;-webkit-transition-timing-function:linear;transition-timing-function:linear}.alertify-notifier .ajs-message.ajs-visible{-webkit-transition-duration:.5s;transition-duration:.5s;-webkit-transition-timing-function:cubic-bezier(0.175,0.885,0.32,1.275);transition-timing-function:cubic-bezier(0.175,0.885,0.32,1.275);opacity:1;max-height:100%;padding:15px;margin-top:10px}.alertify-notifier .ajs-message.ajs-success{background:rgba(91,189,114,.95)}.alertify-notifier .ajs-message.ajs-error{background:rgba(217,92,92,.95)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95)}.alertify-notifier .ajs-message .ajs-close{position:absolute;top:0;right:0;width:16px;height:16px;cursor:pointer;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAABGdBTUEAALGPC/xhBQAAAFBJREFUGBl1j0EKADEIA+ve/P9f9bh1hEihNBfjVCO1v7RKVqJK4h8gM5cAPR42AkQEpSXPwMTyoi13n5N9YqJehm3Fnr7nL1D0ZEbD5OubGyC7a9gx+9eNAAAAAElFTkSuQmCC);background-repeat:no-repeat;background-position:center center;background-color:rgba(0,0,0,.5);border-top-right-radius:2px}.alertify-notifier.ajs-top{top:10px}.alertify-notifier.ajs-bottom{bottom:10px}.alertify-notifier.ajs-right{right:10px}.alertify-notifier.ajs-right .ajs-message{right:-320px}.alertify-notifier.ajs-right .ajs-message.ajs-visible{right:290px}.alertify-notifier.ajs-left{left:10px}.alertify-notifier.ajs-left .ajs-message{left:-300px}.alertify-notifier.ajs-left .ajs-message.ajs-visible{left:0}.alertify-notifier.ajs-center{left:50%}.alertify-notifier.ajs-center .ajs-message{-webkit-transform:translateX(-50%);transform:translateX(-50%)}.alertify-notifier.ajs-center .ajs-message.ajs-visible{left:50%;-webkit-transition-timing-function:cubic-bezier(0.57,0.43,0.1,0.65);transition-timing-function:cubic-bezier(0.57,0.43,0.1,0.65)}.alertify-notifier.ajs-center.ajs-top .ajs-message{top:-300px}.alertify-notifier.ajs-center.ajs-top .ajs-message.ajs-visible{top:0}.alertify-notifier.ajs-center.ajs-bottom .ajs-message{bottom:-300px}.alertify-notifier.ajs-center.ajs-bottom .ajs-message.ajs-visible{bottom:0}.ajs-no-transition.alertify .ajs-dialog,.ajs-no-transition.alertify .ajs-dimmer,.ajs-no-transition.alertify .ajs-modal{-webkit-transition:none!important;transition:none!important;-webkit-animation:none!important;animation:none!important}.ajs-no-transition.alertify-notifier .ajs-message{-webkit-transition:none!important;transition:none!important;-webkit-animation:none!important;animation:none!important}@media (prefers-reduced-motion:reduce){.alertify .ajs-dialog,.alertify .ajs-dimmer,.alertify .ajs-modal{-webkit-transition:none!important;transition:none!important;-webkit-animation:none!important;animation:none!important}.alertify-notifier .ajs-message{-webkit-transition:none!important;transition:none!important;-webkit-animation:none!important;animation:none!important}} \ No newline at end of file diff --git a/static/lib/alertify-1.13.1/css/alertify.rtl.css b/static/lib/alertify-1.14.0/css/alertify.rtl.css similarity index 99% rename from static/lib/alertify-1.13.1/css/alertify.rtl.css rename to static/lib/alertify-1.14.0/css/alertify.rtl.css index 3a6ea5b..bc5505b 100644 --- a/static/lib/alertify-1.13.1/css/alertify.rtl.css +++ b/static/lib/alertify-1.14.0/css/alertify.rtl.css @@ -1,8 +1,8 @@ -/** - * alertifyjs 1.13.1 http://alertifyjs.com - * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. - * Copyright 2019 Mohammad Younes (http://alertifyjs.com) - * Licensed under GPL 3 */ +/** + * alertifyjs 1.14.0 http://alertifyjs.com + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. + * Copyright 2024 Mohammad Younes (http://alertifyjs.com) + * Licensed under GPL 3 */ .alertify .ajs-dimmer { position: fixed; z-index: 1981; @@ -13,7 +13,7 @@ padding: 0; margin: 0; background-color: #252525; - opacity: .5; + opacity: 0.5; } .alertify .ajs-modal { position: fixed; @@ -335,8 +335,8 @@ .alertify .ajs-dialog.ajs-shake { -webkit-animation-name: ajs-shake; animation-name: ajs-shake; - -webkit-animation-duration: .1s; - animation-duration: .1s; + -webkit-animation-duration: 0.1s; + animation-duration: 0.1s; -webkit-animation-fill-mode: both; animation-fill-mode: both; } diff --git a/static/lib/alertify-1.14.0/css/alertify.rtl.min.css b/static/lib/alertify-1.14.0/css/alertify.rtl.min.css new file mode 100644 index 0000000..62aea4c --- /dev/null +++ b/static/lib/alertify-1.14.0/css/alertify.rtl.min.css @@ -0,0 +1,6 @@ +/** + * alertifyjs 1.14.0 http://alertifyjs.com + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. + * Copyright 2024 Mohammad Younes (http://alertifyjs.com) + * Licensed under GPL 3 */ +.alertify .ajs-dimmer{position:fixed;z-index:1981;top:0;left:0;bottom:0;right:0;padding:0;margin:0;background-color:#252525;opacity:.5}.alertify .ajs-modal{position:fixed;top:0;left:0;right:0;bottom:0;padding:0;overflow-y:auto;z-index:1981}.alertify .ajs-dialog{position:relative;margin:5% auto;min-height:110px;max-width:500px;padding:24px 24px 0 24px;outline:0;background-color:#fff}.alertify .ajs-dialog.ajs-capture:before{content:'';position:absolute;top:0;left:0;bottom:0;right:0;display:block;z-index:1}.alertify .ajs-reset{position:absolute!important;display:inline!important;width:0!important;height:0!important;opacity:0!important}.alertify .ajs-commands{position:absolute;left:4px;margin:-14px 0 0 24px;z-index:2}.alertify .ajs-commands button{display:none;width:10px;height:10px;margin-right:10px;padding:10px;border:0;background-color:transparent;background-repeat:no-repeat;background-position:center;cursor:pointer}.alertify .ajs-commands button.ajs-close{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAh0lEQVQYlY2QsQ0EIQwEB9cBAR1CJUaI/gigDnwR6NBL/7/xWLNrZ2b8EwGotVpr7eOitWa1VjugiNB7R1UPrKrWe0dEAHBbXUqxMQbeewDmnHjvyTm7C3zDwAUd9c63YQdUVdu6EAJzzquz7HXvTiklt+H9DQFYaxFjvDqllFyMkbXWvfpXHjJrWFgdBq/hAAAAAElFTkSuQmCC)}.alertify .ajs-commands button.ajs-maximize{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAOUlEQVQYlWP8//8/AzGAhYGBgaG4uBiv6t7eXkYmooxjYGAgWiELsvHYFMCcRX2rSXcjoSBiJDbAAeD+EGu+8BZcAAAAAElFTkSuQmCC)}.alertify .ajs-header{margin:-24px;margin-bottom:0;padding:16px 24px;background-color:#fff}.alertify .ajs-body{min-height:56px}.alertify .ajs-body .ajs-content{padding:16px 16px 16px 24px}.alertify .ajs-footer{padding:4px;margin-right:-24px;margin-left:-24px;min-height:43px;background-color:#fff}.alertify .ajs-footer .ajs-buttons.ajs-primary{text-align:left}.alertify .ajs-footer .ajs-buttons.ajs-primary .ajs-button{margin:4px}.alertify .ajs-footer .ajs-buttons.ajs-auxiliary{float:right;clear:none;text-align:right}.alertify .ajs-footer .ajs-buttons.ajs-auxiliary .ajs-button{margin:4px}.alertify .ajs-footer .ajs-buttons .ajs-button{min-width:88px;min-height:35px}.alertify .ajs-handle{position:absolute;display:none;width:10px;height:10px;left:0;bottom:0;z-index:1;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMS8xNEDQYmMAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAQ0lEQVQYlaXNMQoAIAxD0dT7H657l0KX3iJuUlBUNOsPPCGJm7VDp6ryeMxMuDsAQH7owW3pyn3RS26iKxERMLN3ugOaAkaL3sWVigAAAABJRU5ErkJggg==);-webkit-transform:scaleX(-1);transform:scaleX(-1);cursor:sw-resize}.alertify.ajs-no-overflow .ajs-body .ajs-content{overflow:hidden!important}.alertify.ajs-no-padding.ajs-maximized .ajs-body .ajs-content{right:0;left:0;padding:0}.alertify.ajs-no-padding:not(.ajs-maximized) .ajs-body{margin-right:-24px;margin-left:-24px}.alertify.ajs-no-padding:not(.ajs-maximized) .ajs-body .ajs-content{padding:0}.alertify.ajs-no-padding.ajs-resizable .ajs-body .ajs-content{right:0;left:0}.alertify.ajs-maximizable .ajs-commands button.ajs-maximize,.alertify.ajs-maximizable .ajs-commands button.ajs-restore{display:inline-block}.alertify.ajs-closable .ajs-commands button.ajs-close{display:inline-block}.alertify.ajs-maximized .ajs-dialog{width:100%!important;height:100%!important;max-width:none!important;margin:0 auto!important;top:0!important;right:0!important}.alertify.ajs-maximized.ajs-modeless .ajs-modal{position:fixed!important;min-height:100%!important;max-height:none!important;margin:0!important}.alertify.ajs-maximized .ajs-commands button.ajs-maximize{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAASklEQVQYlZWQ0QkAMQhDtXRincOZX78KVtrDCwgqJNEoIB3MPLj7lRUROlpyVXGzby6zWuY+kz6tj5sBMTMAyVV3/595RbOh3cAXsww1raeiOcoAAAAASUVORK5CYII=)}.alertify.ajs-maximized .ajs-dialog,.alertify.ajs-resizable .ajs-dialog{padding:0}.alertify.ajs-maximized .ajs-commands,.alertify.ajs-resizable .ajs-commands{margin:14px 0 0 24px}.alertify.ajs-maximized .ajs-header,.alertify.ajs-resizable .ajs-header{position:absolute;top:0;right:0;left:0;margin:0;padding:16px 24px}.alertify.ajs-maximized .ajs-body,.alertify.ajs-resizable .ajs-body{min-height:224px;display:inline-block}.alertify.ajs-maximized .ajs-body .ajs-content,.alertify.ajs-resizable .ajs-body .ajs-content{position:absolute;top:50px;left:24px;bottom:50px;right:24px;overflow:auto}.alertify.ajs-maximized .ajs-footer,.alertify.ajs-resizable .ajs-footer{position:absolute;right:0;left:0;bottom:0;margin:0}.alertify.ajs-resizable:not(.ajs-maximized) .ajs-dialog{min-width:548px}.alertify.ajs-resizable:not(.ajs-maximized) .ajs-handle{display:block}.alertify.ajs-movable:not(.ajs-maximized) .ajs-header{cursor:move}.alertify.ajs-modeless .ajs-dimmer,.alertify.ajs-modeless .ajs-reset{display:none}.alertify.ajs-modeless .ajs-modal{overflow:visible;max-width:none;max-height:0}.alertify.ajs-modeless.ajs-pinnable .ajs-commands button.ajs-pin{display:inline-block;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAQklEQVQYlcWPMQ4AIAwCqU9u38GbcbHRWN1MvKQDhQFMEpKImGJA0gCgnYw0V0rwxseg5erT4oSkQVI5d9f+e9+xA0NbLpWfitPXAAAAAElFTkSuQmCC)}.alertify.ajs-modeless.ajs-unpinned .ajs-modal{position:absolute}.alertify.ajs-modeless.ajs-unpinned .ajs-commands button.ajs-pin{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNy8xMy8xNOrZqugAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAO0lEQVQYlWP8//8/AzGAiShV6AqLi4txGs+CLoBLMYbC3t5eRmyaWfBZhwwYkX2NTxPRvibKjRhW4wMAhxkYGbLu3pEAAAAASUVORK5CYII=)}.alertify.ajs-modeless:not(.ajs-unpinned) .ajs-body{max-height:500px;overflow:auto}.alertify.ajs-basic .ajs-header{opacity:0}.alertify.ajs-basic .ajs-footer{visibility:hidden}.alertify.ajs-frameless .ajs-header{position:absolute;top:0;right:0;left:0;min-height:60px;margin:0;padding:0;opacity:0;z-index:1}.alertify.ajs-frameless .ajs-footer{display:none}.alertify.ajs-frameless .ajs-body .ajs-content{position:absolute;top:0;left:0;bottom:0;right:0}.alertify.ajs-frameless:not(.ajs-resizable) .ajs-dialog{padding-top:0}.alertify.ajs-frameless:not(.ajs-resizable) .ajs-dialog .ajs-commands{margin-top:0}.ajs-no-overflow{overflow:hidden!important;outline:0}.ajs-no-overflow.ajs-fixed{position:fixed;top:0;left:0;bottom:0;right:0;overflow-y:scroll!important}.ajs-no-selection,.ajs-no-selection *{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media screen and (max-width:568px){.alertify .ajs-dialog{min-width:150px}.alertify:not(.ajs-maximized) .ajs-modal{padding:0 5%}.alertify:not(.ajs-maximized).ajs-resizable .ajs-dialog{min-width:initial;min-width:auto}}@-moz-document url-prefix(){.alertify button:focus{outline:1px dotted #3593D2}}.alertify .ajs-dimmer,.alertify .ajs-modal{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition-property:opacity,visibility;transition-property:opacity,visibility;-webkit-transition-timing-function:linear;transition-timing-function:linear;-webkit-transition-duration:250ms;transition-duration:250ms}.alertify.ajs-hidden .ajs-dimmer,.alertify.ajs-hidden .ajs-modal{visibility:hidden;opacity:0}.alertify.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-duration:.5s;animation-duration:.5s}.alertify.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-duration:250ms;animation-duration:250ms}.alertify .ajs-dialog.ajs-shake{-webkit-animation-name:ajs-shake;animation-name:ajs-shake;-webkit-animation-duration:.1s;animation-duration:.1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}@-webkit-keyframes ajs-shake{0%,100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}}@keyframes ajs-shake{0%,100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}}.alertify.ajs-slide.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-slideIn;animation-name:ajs-slideIn;-webkit-animation-timing-function:cubic-bezier(0.175,0.885,0.32,1.275);animation-timing-function:cubic-bezier(0.175,0.885,0.32,1.275)}.alertify.ajs-slide.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-slideOut;animation-name:ajs-slideOut;-webkit-animation-timing-function:cubic-bezier(0.6,-0.28,0.735,0.045);animation-timing-function:cubic-bezier(0.6,-0.28,0.735,0.045)}.alertify.ajs-zoom.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-zoomIn;animation-name:ajs-zoomIn}.alertify.ajs-zoom.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-zoomOut;animation-name:ajs-zoomOut}.alertify.ajs-fade.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-fadeIn;animation-name:ajs-fadeIn}.alertify.ajs-fade.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-fadeOut;animation-name:ajs-fadeOut}.alertify.ajs-pulse.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-pulseIn;animation-name:ajs-pulseIn}.alertify.ajs-pulse.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-pulseOut;animation-name:ajs-pulseOut}.alertify.ajs-flipx.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-flipInX;animation-name:ajs-flipInX}.alertify.ajs-flipx.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-flipOutX;animation-name:ajs-flipOutX}.alertify.ajs-flipy.ajs-in:not(.ajs-hidden) .ajs-dialog{-webkit-animation-name:ajs-flipInY;animation-name:ajs-flipInY}.alertify.ajs-flipy.ajs-out.ajs-hidden .ajs-dialog{-webkit-animation-name:ajs-flipOutY;animation-name:ajs-flipOutY}@-webkit-keyframes ajs-pulseIn{0%,100%,20%,40%,60%,80%{-webkit-transition-timing-function:cubic-bezier(0.215,0.61,0.355,1);transition-timing-function:cubic-bezier(0.215,0.61,0.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes ajs-pulseIn{0%,100%,20%,40%,60%,80%{-webkit-transition-timing-function:cubic-bezier(0.215,0.61,0.355,1);transition-timing-function:cubic-bezier(0.215,0.61,0.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@-webkit-keyframes ajs-pulseOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes ajs-pulseOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@-webkit-keyframes ajs-zoomIn{0%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes ajs-zoomIn{0%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@-webkit-keyframes ajs-zoomOut{0%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}100%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}}@keyframes ajs-zoomOut{0%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}100%{opacity:0;-webkit-transform:scale3d(.25,.25,.25);transform:scale3d(.25,.25,.25)}}@-webkit-keyframes ajs-fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes ajs-fadeIn{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes ajs-fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes ajs-fadeOut{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes ajs-flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-90deg);transform:perspective(400px) rotate3d(1,0,0,-90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,20deg);transform:perspective(400px) rotate3d(1,0,0,20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-10deg);transform:perspective(400px) rotate3d(1,0,0,-10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,5deg);transform:perspective(400px) rotate3d(1,0,0,5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes ajs-flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-90deg);transform:perspective(400px) rotate3d(1,0,0,-90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,20deg);transform:perspective(400px) rotate3d(1,0,0,20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-10deg);transform:perspective(400px) rotate3d(1,0,0,-10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,5deg);transform:perspective(400px) rotate3d(1,0,0,5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@-webkit-keyframes ajs-flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,20deg);transform:perspective(400px) rotate3d(1,0,0,20deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-90deg);transform:perspective(400px) rotate3d(1,0,0,-90deg);opacity:0}}@keyframes ajs-flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,20deg);transform:perspective(400px) rotate3d(1,0,0,20deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-90deg);transform:perspective(400px) rotate3d(1,0,0,-90deg);opacity:0}}@-webkit-keyframes ajs-flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,-90deg);transform:perspective(400px) rotate3d(0,-1,0,-90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,20deg);transform:perspective(400px) rotate3d(0,-1,0,20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,-10deg);transform:perspective(400px) rotate3d(0,-1,0,-10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,5deg);transform:perspective(400px) rotate3d(0,-1,0,5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes ajs-flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,-90deg);transform:perspective(400px) rotate3d(0,-1,0,-90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,20deg);transform:perspective(400px) rotate3d(0,-1,0,20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,-10deg);transform:perspective(400px) rotate3d(0,-1,0,-10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,5deg);transform:perspective(400px) rotate3d(0,-1,0,5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@-webkit-keyframes ajs-flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,15deg);transform:perspective(400px) rotate3d(0,-1,0,15deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,-90deg);transform:perspective(400px) rotate3d(0,-1,0,-90deg);opacity:0}}@keyframes ajs-flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,15deg);transform:perspective(400px) rotate3d(0,-1,0,15deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(0,-1,0,-90deg);transform:perspective(400px) rotate3d(0,-1,0,-90deg);opacity:0}}@-webkit-keyframes ajs-slideIn{0%{margin-top:-100%}100%{margin-top:5%}}@keyframes ajs-slideIn{0%{margin-top:-100%}100%{margin-top:5%}}@-webkit-keyframes ajs-slideOut{0%{margin-top:5%}100%{margin-top:-100%}}@keyframes ajs-slideOut{0%{margin-top:5%}100%{margin-top:-100%}}.alertify-notifier{position:fixed;width:0;overflow:visible;z-index:1982;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.alertify-notifier .ajs-message{position:relative;width:260px;max-height:0;padding:0;opacity:0;margin:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition-duration:250ms;transition-duration:250ms;-webkit-transition-timing-function:linear;transition-timing-function:linear}.alertify-notifier .ajs-message.ajs-visible{-webkit-transition-duration:.5s;transition-duration:.5s;-webkit-transition-timing-function:cubic-bezier(0.175,0.885,0.32,1.275);transition-timing-function:cubic-bezier(0.175,0.885,0.32,1.275);opacity:1;max-height:100%;padding:15px;margin-top:10px}.alertify-notifier .ajs-message.ajs-success{background:rgba(91,189,114,.95)}.alertify-notifier .ajs-message.ajs-error{background:rgba(217,92,92,.95)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95)}.alertify-notifier .ajs-message .ajs-close{position:absolute;top:0;left:0;width:16px;height:16px;cursor:pointer;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAABGdBTUEAALGPC/xhBQAAAFBJREFUGBl1j0EKADEIA+ve/P9f9bh1hEihNBfjVCO1v7RKVqJK4h8gM5cAPR42AkQEpSXPwMTyoi13n5N9YqJehm3Fnr7nL1D0ZEbD5OubGyC7a9gx+9eNAAAAAElFTkSuQmCC);background-repeat:no-repeat;background-position:center center;background-color:rgba(0,0,0,.5);border-top-left-radius:2px}.alertify-notifier.ajs-top{top:10px}.alertify-notifier.ajs-bottom{bottom:10px}.alertify-notifier.ajs-right{left:10px}.alertify-notifier.ajs-right .ajs-message{left:-320px}.alertify-notifier.ajs-right .ajs-message.ajs-visible{left:290px}.alertify-notifier.ajs-left{right:10px}.alertify-notifier.ajs-left .ajs-message{right:-300px}.alertify-notifier.ajs-left .ajs-message.ajs-visible{right:0}.alertify-notifier.ajs-center{right:50%}.alertify-notifier.ajs-center .ajs-message{-webkit-transform:translateX(50%);transform:translateX(50%)}.alertify-notifier.ajs-center .ajs-message.ajs-visible{right:50%;-webkit-transition-timing-function:cubic-bezier(0.57,0.43,0.1,0.65);transition-timing-function:cubic-bezier(0.57,0.43,0.1,0.65)}.alertify-notifier.ajs-center.ajs-top .ajs-message{top:-300px}.alertify-notifier.ajs-center.ajs-top .ajs-message.ajs-visible{top:0}.alertify-notifier.ajs-center.ajs-bottom .ajs-message{bottom:-300px}.alertify-notifier.ajs-center.ajs-bottom .ajs-message.ajs-visible{bottom:0}.ajs-no-transition.alertify .ajs-dialog,.ajs-no-transition.alertify .ajs-dimmer,.ajs-no-transition.alertify .ajs-modal{-webkit-transition:none!important;transition:none!important;-webkit-animation:none!important;animation:none!important}.ajs-no-transition.alertify-notifier .ajs-message{-webkit-transition:none!important;transition:none!important;-webkit-animation:none!important;animation:none!important}@media (prefers-reduced-motion:reduce){.alertify .ajs-dialog,.alertify .ajs-dimmer,.alertify .ajs-modal{-webkit-transition:none!important;transition:none!important;-webkit-animation:none!important;animation:none!important}.alertify-notifier .ajs-message{-webkit-transition:none!important;transition:none!important;-webkit-animation:none!important;animation:none!important}} \ No newline at end of file diff --git a/static/lib/alertify-1.13.1/css/themes/bootstrap.css b/static/lib/alertify-1.14.0/css/themes/bootstrap.css similarity index 91% rename from static/lib/alertify-1.13.1/css/themes/bootstrap.css rename to static/lib/alertify-1.14.0/css/themes/bootstrap.css index 17171b9..4224813 100644 --- a/static/lib/alertify-1.13.1/css/themes/bootstrap.css +++ b/static/lib/alertify-1.14.0/css/themes/bootstrap.css @@ -1,11 +1,11 @@ -/** - * alertifyjs 1.13.1 http://alertifyjs.com - * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. - * Copyright 2019 Mohammad Younes (http://alertifyjs.com) - * Licensed under GPL 3 */ +/** + * alertifyjs 1.14.0 http://alertifyjs.com + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. + * Copyright 2024 Mohammad Younes (http://alertifyjs.com) + * Licensed under GPL 3 */ .alertify .ajs-dimmer { background-color: #000; - opacity: .5; + opacity: 0.5; } .alertify .ajs-dialog { max-width: 600px; diff --git a/static/lib/alertify-1.13.1/css/themes/bootstrap.min.css b/static/lib/alertify-1.14.0/css/themes/bootstrap.min.css similarity index 88% rename from static/lib/alertify-1.13.1/css/themes/bootstrap.min.css rename to static/lib/alertify-1.14.0/css/themes/bootstrap.min.css index aff3443..0dce446 100644 --- a/static/lib/alertify-1.13.1/css/themes/bootstrap.min.css +++ b/static/lib/alertify-1.14.0/css/themes/bootstrap.min.css @@ -1,6 +1,6 @@ -/** - * alertifyjs 1.13.1 http://alertifyjs.com - * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. - * Copyright 2019 Mohammad Younes (http://alertifyjs.com) - * Licensed under GPL 3 */ +/** + * alertifyjs 1.14.0 http://alertifyjs.com + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. + * Copyright 2024 Mohammad Younes (http://alertifyjs.com) + * Licensed under GPL 3 */ .alertify .ajs-dimmer{background-color:#000;opacity:.5}.alertify .ajs-dialog{max-width:600px;min-height:122px;background-color:#fff;border:1px solid rgba(0,0,0,.2);-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5);border-radius:6px}.alertify .ajs-header{color:#333;border-bottom:1px solid #e5e5e5;border-radius:6px 6px 0 0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:18px}.alertify .ajs-body{font-family:Roboto,sans-serif;color:#000}.alertify.ajs-maximized:not(.ajs-resizable) .ajs-content,.alertify.ajs-resizable .ajs-content{top:58px;bottom:68px}.alertify .ajs-footer{background-color:#fff;padding:15px;border-top:1px solid #e5e5e5;border-radius:0 0 6px 6px}.alertify-notifier .ajs-message{background:rgba(255,255,255,.95);color:#000;text-align:center;border:solid 1px #ddd;border-radius:2px}.alertify-notifier .ajs-message.ajs-success{color:#fff;background:rgba(91,189,114,.95);text-shadow:-1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-error{color:#fff;background:rgba(217,92,92,.95);text-shadow:-1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95);border-color:#999} \ No newline at end of file diff --git a/static/lib/alertify-1.13.1/css/themes/bootstrap.rtl.css b/static/lib/alertify-1.14.0/css/themes/bootstrap.rtl.css similarity index 91% rename from static/lib/alertify-1.13.1/css/themes/bootstrap.rtl.css rename to static/lib/alertify-1.14.0/css/themes/bootstrap.rtl.css index a63aac5..3bf4de8 100644 --- a/static/lib/alertify-1.13.1/css/themes/bootstrap.rtl.css +++ b/static/lib/alertify-1.14.0/css/themes/bootstrap.rtl.css @@ -1,11 +1,11 @@ -/** - * alertifyjs 1.13.1 http://alertifyjs.com - * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. - * Copyright 2019 Mohammad Younes (http://alertifyjs.com) - * Licensed under GPL 3 */ +/** + * alertifyjs 1.14.0 http://alertifyjs.com + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. + * Copyright 2024 Mohammad Younes (http://alertifyjs.com) + * Licensed under GPL 3 */ .alertify .ajs-dimmer { background-color: #000; - opacity: .5; + opacity: 0.5; } .alertify .ajs-dialog { max-width: 600px; diff --git a/static/lib/alertify-1.13.1/css/themes/bootstrap.rtl.min.css b/static/lib/alertify-1.14.0/css/themes/bootstrap.rtl.min.css similarity index 88% rename from static/lib/alertify-1.13.1/css/themes/bootstrap.rtl.min.css rename to static/lib/alertify-1.14.0/css/themes/bootstrap.rtl.min.css index 3608f45..421da05 100644 --- a/static/lib/alertify-1.13.1/css/themes/bootstrap.rtl.min.css +++ b/static/lib/alertify-1.14.0/css/themes/bootstrap.rtl.min.css @@ -1,6 +1,6 @@ -/** - * alertifyjs 1.13.1 http://alertifyjs.com - * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. - * Copyright 2019 Mohammad Younes (http://alertifyjs.com) - * Licensed under GPL 3 */ +/** + * alertifyjs 1.14.0 http://alertifyjs.com + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. + * Copyright 2024 Mohammad Younes (http://alertifyjs.com) + * Licensed under GPL 3 */ .alertify .ajs-dimmer{background-color:#000;opacity:.5}.alertify .ajs-dialog{max-width:600px;min-height:122px;background-color:#fff;border:1px solid rgba(0,0,0,.2);-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5);border-radius:6px}.alertify .ajs-header{color:#333;border-bottom:1px solid #e5e5e5;border-radius:6px 6px 0 0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:18px}.alertify .ajs-body{font-family:Roboto,sans-serif;color:#000}.alertify.ajs-maximized:not(.ajs-resizable) .ajs-content,.alertify.ajs-resizable .ajs-content{top:58px;bottom:68px}.alertify .ajs-footer{background-color:#fff;padding:15px;border-top:1px solid #e5e5e5;border-radius:0 0 6px 6px}.alertify-notifier .ajs-message{background:rgba(255,255,255,.95);color:#000;text-align:center;border:solid 1px #ddd;border-radius:2px}.alertify-notifier .ajs-message.ajs-success{color:#fff;background:rgba(91,189,114,.95);text-shadow:1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-error{color:#fff;background:rgba(217,92,92,.95);text-shadow:1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95);border-color:#999} \ No newline at end of file diff --git a/static/lib/alertify-1.13.1/css/themes/default.css b/static/lib/alertify-1.14.0/css/themes/default.css similarity index 92% rename from static/lib/alertify-1.13.1/css/themes/default.css rename to static/lib/alertify-1.14.0/css/themes/default.css index feb0987..5bc3dd1 100644 --- a/static/lib/alertify-1.13.1/css/themes/default.css +++ b/static/lib/alertify-1.14.0/css/themes/default.css @@ -1,8 +1,8 @@ -/** - * alertifyjs 1.13.1 http://alertifyjs.com - * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. - * Copyright 2019 Mohammad Younes (http://alertifyjs.com) - * Licensed under GPL 3 */ +/** + * alertifyjs 1.14.0 http://alertifyjs.com + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. + * Copyright 2024 Mohammad Younes (http://alertifyjs.com) + * Licensed under GPL 3 */ .alertify .ajs-dialog { background-color: white; -webkit-box-shadow: 0px 15px 20px 0px rgba(0, 0, 0, 0.25); diff --git a/static/lib/alertify-1.13.1/css/themes/default.min.css b/static/lib/alertify-1.14.0/css/themes/default.min.css similarity index 87% rename from static/lib/alertify-1.13.1/css/themes/default.min.css rename to static/lib/alertify-1.14.0/css/themes/default.min.css index 6b0d8ff..c0792c9 100644 --- a/static/lib/alertify-1.13.1/css/themes/default.min.css +++ b/static/lib/alertify-1.14.0/css/themes/default.min.css @@ -1,6 +1,6 @@ -/** - * alertifyjs 1.13.1 http://alertifyjs.com - * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. - * Copyright 2019 Mohammad Younes (http://alertifyjs.com) - * Licensed under GPL 3 */ +/** + * alertifyjs 1.14.0 http://alertifyjs.com + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. + * Copyright 2024 Mohammad Younes (http://alertifyjs.com) + * Licensed under GPL 3 */ .alertify .ajs-dialog{background-color:#fff;-webkit-box-shadow:0 15px 20px 0 rgba(0,0,0,.25);box-shadow:0 15px 20px 0 rgba(0,0,0,.25);border-radius:2px}.alertify .ajs-header{color:#000;font-weight:700;background:#fafafa;border-bottom:#eee 1px solid;border-radius:2px 2px 0 0}.alertify .ajs-body{color:#000}.alertify .ajs-body .ajs-content .ajs-input{display:block;width:100%;padding:8px;margin:4px;border-radius:2px;border:1px solid #ccc}.alertify .ajs-body .ajs-content p{margin:0}.alertify .ajs-footer{background:#fbfbfb;border-top:#eee 1px solid;border-radius:0 0 2px 2px}.alertify .ajs-footer .ajs-buttons .ajs-button{background-color:transparent;color:#000;border:0;font-size:14px;font-weight:700;text-transform:uppercase}.alertify .ajs-footer .ajs-buttons .ajs-button.ajs-ok{color:#3593d2}.alertify-notifier .ajs-message{background:rgba(255,255,255,.95);color:#000;text-align:center;border:solid 1px #ddd;border-radius:2px}.alertify-notifier .ajs-message.ajs-success{color:#fff;background:rgba(91,189,114,.95);text-shadow:-1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-error{color:#fff;background:rgba(217,92,92,.95);text-shadow:-1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95);border-color:#999} \ No newline at end of file diff --git a/static/lib/alertify-1.13.1/css/themes/default.rtl.css b/static/lib/alertify-1.14.0/css/themes/default.rtl.css similarity index 92% rename from static/lib/alertify-1.13.1/css/themes/default.rtl.css rename to static/lib/alertify-1.14.0/css/themes/default.rtl.css index 0034212..cec39f2 100644 --- a/static/lib/alertify-1.13.1/css/themes/default.rtl.css +++ b/static/lib/alertify-1.14.0/css/themes/default.rtl.css @@ -1,8 +1,8 @@ -/** - * alertifyjs 1.13.1 http://alertifyjs.com - * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. - * Copyright 2019 Mohammad Younes (http://alertifyjs.com) - * Licensed under GPL 3 */ +/** + * alertifyjs 1.14.0 http://alertifyjs.com + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. + * Copyright 2024 Mohammad Younes (http://alertifyjs.com) + * Licensed under GPL 3 */ .alertify .ajs-dialog { background-color: white; -webkit-box-shadow: 0px 15px 20px 0px rgba(0, 0, 0, 0.25); diff --git a/static/lib/alertify-1.13.1/css/themes/default.rtl.min.css b/static/lib/alertify-1.14.0/css/themes/default.rtl.min.css similarity index 88% rename from static/lib/alertify-1.13.1/css/themes/default.rtl.min.css rename to static/lib/alertify-1.14.0/css/themes/default.rtl.min.css index cb31702..e079cc2 100644 --- a/static/lib/alertify-1.13.1/css/themes/default.rtl.min.css +++ b/static/lib/alertify-1.14.0/css/themes/default.rtl.min.css @@ -1,6 +1,6 @@ -/** - * alertifyjs 1.13.1 http://alertifyjs.com - * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. - * Copyright 2019 Mohammad Younes (http://alertifyjs.com) - * Licensed under GPL 3 */ +/** + * alertifyjs 1.14.0 http://alertifyjs.com + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. + * Copyright 2024 Mohammad Younes (http://alertifyjs.com) + * Licensed under GPL 3 */ .alertify .ajs-dialog{background-color:#fff;-webkit-box-shadow:0 15px 20px 0 rgba(0,0,0,.25);box-shadow:0 15px 20px 0 rgba(0,0,0,.25);border-radius:2px}.alertify .ajs-header{color:#000;font-weight:700;background:#fafafa;border-bottom:#eee 1px solid;border-radius:2px 2px 0 0}.alertify .ajs-body{color:#000}.alertify .ajs-body .ajs-content .ajs-input{display:block;width:100%;padding:8px;margin:4px;border-radius:2px;border:1px solid #ccc}.alertify .ajs-body .ajs-content p{margin:0}.alertify .ajs-footer{background:#fbfbfb;border-top:#eee 1px solid;border-radius:0 0 2px 2px}.alertify .ajs-footer .ajs-buttons .ajs-button{background-color:transparent;color:#000;border:0;font-size:14px;font-weight:700;text-transform:uppercase}.alertify .ajs-footer .ajs-buttons .ajs-button.ajs-ok{color:#3593d2}.alertify-notifier .ajs-message{background:rgba(255,255,255,.95);color:#000;text-align:center;border:solid 1px #ddd;border-radius:2px}.alertify-notifier .ajs-message.ajs-success{color:#fff;background:rgba(91,189,114,.95);text-shadow:1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-error{color:#fff;background:rgba(217,92,92,.95);text-shadow:1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95);border-color:#999} \ No newline at end of file diff --git a/static/lib/alertify-1.13.1/css/themes/semantic.css b/static/lib/alertify-1.14.0/css/themes/semantic.css similarity index 93% rename from static/lib/alertify-1.13.1/css/themes/semantic.css rename to static/lib/alertify-1.14.0/css/themes/semantic.css index a59712e..1eed8cb 100644 --- a/static/lib/alertify-1.13.1/css/themes/semantic.css +++ b/static/lib/alertify-1.14.0/css/themes/semantic.css @@ -1,8 +1,8 @@ -/** - * alertifyjs 1.13.1 http://alertifyjs.com - * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. - * Copyright 2019 Mohammad Younes (http://alertifyjs.com) - * Licensed under GPL 3 */ +/** + * alertifyjs 1.14.0 http://alertifyjs.com + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. + * Copyright 2024 Mohammad Younes (http://alertifyjs.com) + * Licensed under GPL 3 */ .alertify .ajs-dimmer { background-color: rgba(0, 0, 0, 0.85); opacity: 1; @@ -33,13 +33,13 @@ .alertify .ajs-body .ajs-content .ajs-input { width: 100%; margin: 0; - padding: .65em 1em; + padding: 0.65em 1em; font-size: 1em; background-color: #FFF; border: 1px solid rgba(0, 0, 0, 0.15); outline: 0; color: rgba(0, 0, 0, 0.7); - border-radius: .3125em; + border-radius: 0.3125em; -webkit-transition: background-color 0.3s ease-out, border-color 0.2s ease, -webkit-box-shadow 0.2s ease; transition: background-color 0.3s ease-out, border-color 0.2s ease, -webkit-box-shadow 0.2s ease; transition: background-color 0.3s ease-out, box-shadow 0.2s ease, border-color 0.2s ease; diff --git a/static/lib/alertify-1.13.1/css/themes/semantic.min.css b/static/lib/alertify-1.14.0/css/themes/semantic.min.css similarity index 92% rename from static/lib/alertify-1.13.1/css/themes/semantic.min.css rename to static/lib/alertify-1.14.0/css/themes/semantic.min.css index 1574f58..01c4807 100644 --- a/static/lib/alertify-1.13.1/css/themes/semantic.min.css +++ b/static/lib/alertify-1.14.0/css/themes/semantic.min.css @@ -1,6 +1,6 @@ -/** - * alertifyjs 1.13.1 http://alertifyjs.com - * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. - * Copyright 2019 Mohammad Younes (http://alertifyjs.com) - * Licensed under GPL 3 */ +/** + * alertifyjs 1.14.0 http://alertifyjs.com + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. + * Copyright 2024 Mohammad Younes (http://alertifyjs.com) + * Licensed under GPL 3 */ .alertify .ajs-dimmer{background-color:rgba(0,0,0,.85);opacity:1}.alertify .ajs-dialog{max-width:50%;min-height:137px;background-color:#f4f4f4;border:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;border-radius:5px}.alertify .ajs-header{padding:1.5rem 2rem;border-bottom:none;border-radius:5px 5px 0 0;color:#555;background-color:#fff;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1.6em;font-weight:700}.alertify .ajs-body{font-family:Roboto,sans-serif;color:#555}.alertify .ajs-body .ajs-content .ajs-input{width:100%;margin:0;padding:.65em 1em;font-size:1em;background-color:#fff;border:1px solid rgba(0,0,0,.15);outline:0;color:rgba(0,0,0,.7);border-radius:.3125em;-webkit-transition:background-color .3s ease-out,border-color .2s ease,-webkit-box-shadow .2s ease;transition:background-color .3s ease-out,border-color .2s ease,-webkit-box-shadow .2s ease;transition:background-color .3s ease-out,box-shadow .2s ease,border-color .2s ease;transition:background-color .3s ease-out,box-shadow .2s ease,border-color .2s ease,-webkit-box-shadow .2s ease;-webkit-box-sizing:border-box;box-sizing:border-box}.alertify .ajs-body .ajs-content .ajs-input:active{border-color:rgba(0,0,0,.3);background-color:#fafafa}.alertify .ajs-body .ajs-content .ajs-input:focus{border-color:rgba(0,0,0,.2);color:rgba(0,0,0,.85)}.alertify.ajs-maximized:not(.ajs-resizable) .ajs-content,.alertify.ajs-resizable .ajs-content{top:64px;bottom:74px}.alertify .ajs-footer{background-color:#fff;padding:1rem 2rem;border-top:none;border-radius:0 0 5px 5px}.alertify-notifier .ajs-message{background:rgba(255,255,255,.95);color:#000;text-align:center;border:solid 1px #ddd;border-radius:2px}.alertify-notifier .ajs-message.ajs-success{color:#fff;background:rgba(91,189,114,.95);text-shadow:-1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-error{color:#fff;background:rgba(217,92,92,.95);text-shadow:-1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95);border-color:#999} \ No newline at end of file diff --git a/static/lib/alertify-1.13.1/css/themes/semantic.rtl.css b/static/lib/alertify-1.14.0/css/themes/semantic.rtl.css similarity index 93% rename from static/lib/alertify-1.13.1/css/themes/semantic.rtl.css rename to static/lib/alertify-1.14.0/css/themes/semantic.rtl.css index e4ec69c..00cb5db 100644 --- a/static/lib/alertify-1.13.1/css/themes/semantic.rtl.css +++ b/static/lib/alertify-1.14.0/css/themes/semantic.rtl.css @@ -1,8 +1,8 @@ -/** - * alertifyjs 1.13.1 http://alertifyjs.com - * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. - * Copyright 2019 Mohammad Younes (http://alertifyjs.com) - * Licensed under GPL 3 */ +/** + * alertifyjs 1.14.0 http://alertifyjs.com + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. + * Copyright 2024 Mohammad Younes (http://alertifyjs.com) + * Licensed under GPL 3 */ .alertify .ajs-dimmer { background-color: rgba(0, 0, 0, 0.85); opacity: 1; @@ -33,13 +33,13 @@ .alertify .ajs-body .ajs-content .ajs-input { width: 100%; margin: 0; - padding: .65em 1em; + padding: 0.65em 1em; font-size: 1em; background-color: #FFF; border: 1px solid rgba(0, 0, 0, 0.15); outline: 0; color: rgba(0, 0, 0, 0.7); - border-radius: .3125em; + border-radius: 0.3125em; -webkit-transition: background-color 0.3s ease-out, border-color 0.2s ease, -webkit-box-shadow 0.2s ease; transition: background-color 0.3s ease-out, border-color 0.2s ease, -webkit-box-shadow 0.2s ease; transition: background-color 0.3s ease-out, box-shadow 0.2s ease, border-color 0.2s ease; diff --git a/static/lib/alertify-1.13.1/css/themes/semantic.rtl.min.css b/static/lib/alertify-1.14.0/css/themes/semantic.rtl.min.css similarity index 92% rename from static/lib/alertify-1.13.1/css/themes/semantic.rtl.min.css rename to static/lib/alertify-1.14.0/css/themes/semantic.rtl.min.css index f3af086..c366276 100644 --- a/static/lib/alertify-1.13.1/css/themes/semantic.rtl.min.css +++ b/static/lib/alertify-1.14.0/css/themes/semantic.rtl.min.css @@ -1,6 +1,6 @@ -/** - * alertifyjs 1.13.1 http://alertifyjs.com - * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. - * Copyright 2019 Mohammad Younes (http://alertifyjs.com) - * Licensed under GPL 3 */ +/** + * alertifyjs 1.14.0 http://alertifyjs.com + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. + * Copyright 2024 Mohammad Younes (http://alertifyjs.com) + * Licensed under GPL 3 */ .alertify .ajs-dimmer{background-color:rgba(0,0,0,.85);opacity:1}.alertify .ajs-dialog{max-width:50%;min-height:137px;background-color:#f4f4f4;border:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;border-radius:5px}.alertify .ajs-header{padding:1.5rem 2rem;border-bottom:none;border-radius:5px 5px 0 0;color:#555;background-color:#fff;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1.6em;font-weight:700}.alertify .ajs-body{font-family:Roboto,sans-serif;color:#555}.alertify .ajs-body .ajs-content .ajs-input{width:100%;margin:0;padding:.65em 1em;font-size:1em;background-color:#fff;border:1px solid rgba(0,0,0,.15);outline:0;color:rgba(0,0,0,.7);border-radius:.3125em;-webkit-transition:background-color .3s ease-out,border-color .2s ease,-webkit-box-shadow .2s ease;transition:background-color .3s ease-out,border-color .2s ease,-webkit-box-shadow .2s ease;transition:background-color .3s ease-out,box-shadow .2s ease,border-color .2s ease;transition:background-color .3s ease-out,box-shadow .2s ease,border-color .2s ease,-webkit-box-shadow .2s ease;-webkit-box-sizing:border-box;box-sizing:border-box}.alertify .ajs-body .ajs-content .ajs-input:active{border-color:rgba(0,0,0,.3);background-color:#fafafa}.alertify .ajs-body .ajs-content .ajs-input:focus{border-color:rgba(0,0,0,.2);color:rgba(0,0,0,.85)}.alertify.ajs-maximized:not(.ajs-resizable) .ajs-content,.alertify.ajs-resizable .ajs-content{top:64px;bottom:74px}.alertify .ajs-footer{background-color:#fff;padding:1rem 2rem;border-top:none;border-radius:0 0 5px 5px}.alertify-notifier .ajs-message{background:rgba(255,255,255,.95);color:#000;text-align:center;border:solid 1px #ddd;border-radius:2px}.alertify-notifier .ajs-message.ajs-success{color:#fff;background:rgba(91,189,114,.95);text-shadow:1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-error{color:#fff;background:rgba(217,92,92,.95);text-shadow:1px -1px 0 rgba(0,0,0,.5)}.alertify-notifier .ajs-message.ajs-warning{background:rgba(252,248,215,.95);border-color:#999} \ No newline at end of file diff --git a/templates/empty.tpl b/templates/empty.tpl index c66b95c..286d02c 100644 --- a/templates/empty.tpl +++ b/templates/empty.tpl @@ -21,8 +21,8 @@ - - + + {foreach $css as $path} @@ -140,7 +140,7 @@ - + {foreach $js as $path}