From 65dc4320f1c1c366372982ca5aa8c2c601abdf2b Mon Sep 17 00:00:00 2001 From: Dave Page Date: Wed, 28 Jan 2015 15:57:03 +0000 Subject: [PATCH] Replace bootstrap-dialog with Alertify.js, which is more configurable and supports non-modal dialogs. --- web/pgadmin/about/templates/about/browser.js | 35 +- .../static/css/alertifyjs/alertify.css | 874 +++++ .../static/css/alertifyjs/alertify.min.css | 3 + .../static/css/alertifyjs/alertify.rtl.css | 874 +++++ .../css/alertifyjs/alertify.rtl.min.css | 3 + .../css/alertifyjs/themes/bootstrap.css | 55 + .../css/alertifyjs/themes/bootstrap.min.css | 3 + .../css/alertifyjs/themes/bootstrap.rtl.css | 55 + .../alertifyjs/themes/bootstrap.rtl.min.css | 3 + web/pgadmin/static/css/bootstrap-dialog.css | 120 - .../static/css/bootstrap-dialog.min.css | 1 - web/pgadmin/static/css/overrides.css | 10 + .../static/js/vendor/alertifyjs/alertify.js | 3257 +++++++++++++++++ .../js/vendor/alertifyjs/alertify.min.js | 3 + .../static/js/vendor/bootstrap-dialog.js | 1239 ------- .../static/js/vendor/bootstrap-dialog.min.js | 1 - web/pgadmin/templates/base.html | 12 +- web/pgadmin/test/browser.py | 16 +- web/pgadmin/test/templates/test/browser.js | 70 + 19 files changed, 5266 insertions(+), 1368 deletions(-) create mode 100644 web/pgadmin/static/css/alertifyjs/alertify.css create mode 100644 web/pgadmin/static/css/alertifyjs/alertify.min.css create mode 100644 web/pgadmin/static/css/alertifyjs/alertify.rtl.css create mode 100644 web/pgadmin/static/css/alertifyjs/alertify.rtl.min.css create mode 100644 web/pgadmin/static/css/alertifyjs/themes/bootstrap.css create mode 100644 web/pgadmin/static/css/alertifyjs/themes/bootstrap.min.css create mode 100644 web/pgadmin/static/css/alertifyjs/themes/bootstrap.rtl.css create mode 100644 web/pgadmin/static/css/alertifyjs/themes/bootstrap.rtl.min.css delete mode 100755 web/pgadmin/static/css/bootstrap-dialog.css delete mode 100755 web/pgadmin/static/css/bootstrap-dialog.min.css create mode 100644 web/pgadmin/static/js/vendor/alertifyjs/alertify.js create mode 100644 web/pgadmin/static/js/vendor/alertifyjs/alertify.min.js delete mode 100755 web/pgadmin/static/js/vendor/bootstrap-dialog.js delete mode 100755 web/pgadmin/static/js/vendor/bootstrap-dialog.min.js create mode 100644 web/pgadmin/test/templates/test/browser.js diff --git a/web/pgadmin/about/templates/about/browser.js b/web/pgadmin/about/templates/about/browser.js index 6c88b6763..eda06722f 100644 --- a/web/pgadmin/about/templates/about/browser.js +++ b/web/pgadmin/about/templates/about/browser.js @@ -10,7 +10,36 @@ #} function about_show() { - BootstrapDialog.show({ - title: 'About {{ config.APP_NAME }}', - message: $('
').load('{{ url_for('about.index') }}')}); + if (!alertify.aboutDialog) { + alertify.dialog('aboutDialog', function factory() { + return { + main:function(title, message) { + this.set('title', title); + this.message = message; + }, + setup:function() { + return { + buttons:[{ text: "OK", key: 27, className: "btn btn-primary" }], + focus: { element: 0 }, + options: { modal: 0, overflow: false, resizable: true } + }; + }, + build:function() { + this.elements.body.style.minHeight = "450px"; + this.elements.body.style.minWidth = "800px"; + }, + prepare:function() { + this.setContent(this.message); + } + } + }); + } + + var content = ''; + $.get("{{ url_for('about.index') }}", + function(data) { + alertify.aboutDialog('About {{ config.APP_NAME }}', data); + } + ); + } \ No newline at end of file diff --git a/web/pgadmin/static/css/alertifyjs/alertify.css b/web/pgadmin/static/css/alertifyjs/alertify.css new file mode 100644 index 000000000..e9620c89d --- /dev/null +++ b/web/pgadmin/static/css/alertifyjs/alertify.css @@ -0,0 +1,874 @@ +.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; +} +.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; +} +.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; +} +.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) /*rtl:scaleX(-1)*/; + transform: scaleX(1) /*rtl: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-resizable .ajs-dialog, +.alertify.ajs-maximized .ajs-dialog { + padding: 0; +} +.alertify.ajs-resizable .ajs-commands, +.alertify.ajs-maximized .ajs-commands { + margin: 14px 24px 0 0; +} +.alertify.ajs-resizable .ajs-header, +.alertify.ajs-maximized .ajs-header { + position: absolute; + top: 0; + left: 0; + right: 0; + margin: 0; + padding: 16px 24px; +} +.alertify.ajs-resizable .ajs-body, +.alertify.ajs-maximized .ajs-body { + min-height: 224px; + display: inline-block; +} +.alertify.ajs-resizable .ajs-body .ajs-content, +.alertify.ajs-maximized .ajs-body .ajs-content { + position: absolute; + top: 50px; + right: 24px; + bottom: 50px; + left: 24px; + overflow: auto; +} +.alertify.ajs-resizable .ajs-footer, +.alertify.ajs-maximized .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: none; +} +.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 /*IE fallback*/; + } +} +@-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: 500ms; + animation-duration: 500ms; +} +.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%, + 20%, + 40%, + 60%, + 80%, + 100% { + -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(0.3, 0.3, 0.3); + transform: scale3d(0.3, 0.3, 0.3); + } + 20% { + -webkit-transform: scale3d(1.1, 1.1, 1.1); + transform: scale3d(1.1, 1.1, 1.1); + } + 40% { + -webkit-transform: scale3d(0.9, 0.9, 0.9); + transform: scale3d(0.9, 0.9, 0.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(0.97, 0.97, 0.97); + transform: scale3d(0.97, 0.97, 0.97); + } + 100% { + opacity: 1; + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } +} +@keyframes ajs-pulseIn { + 0%, + 20%, + 40%, + 60%, + 80%, + 100% { + -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(0.3, 0.3, 0.3); + transform: scale3d(0.3, 0.3, 0.3); + } + 20% { + -webkit-transform: scale3d(1.1, 1.1, 1.1); + transform: scale3d(1.1, 1.1, 1.1); + } + 40% { + -webkit-transform: scale3d(0.9, 0.9, 0.9); + transform: scale3d(0.9, 0.9, 0.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(0.97, 0.97, 0.97); + transform: scale3d(0.97, 0.97, 0.97); + } + 100% { + opacity: 1; + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } +} +@-webkit-keyframes ajs-pulseOut { + 20% { + -webkit-transform: scale3d(0.9, 0.9, 0.9); + transform: scale3d(0.9, 0.9, 0.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(0.3, 0.3, 0.3); + transform: scale3d(0.3, 0.3, 0.3); + } +} +@keyframes ajs-pulseOut { + 20% { + -webkit-transform: scale3d(0.9, 0.9, 0.9); + transform: scale3d(0.9, 0.9, 0.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(0.3, 0.3, 0.3); + transform: scale3d(0.3, 0.3, 0.3); + } +} +@-webkit-keyframes ajs-zoomIn { + 0% { + opacity: 0; + -webkit-transform: scale3d(0.25, 0.25, 0.25); + transform: scale3d(0.25, 0.25, 0.25); + } + 100% { + opacity: 1; + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } +} +@keyframes ajs-zoomIn { + 0% { + opacity: 0; + -webkit-transform: scale3d(0.25, 0.25, 0.25); + transform: scale3d(0.25, 0.25, 0.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(0.25, 0.25, 0.25); + transform: scale3d(0.25, 0.25, 0.25); + } +} +@keyframes ajs-zoomOut { + 0% { + opacity: 1; + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } + 100% { + opacity: 0; + -webkit-transform: scale3d(0.25, 0.25, 0.25); + transform: scale3d(0.25, 0.25, 0.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-transition-duration: 250ms; + transition-duration: 250ms; + -webkit-transition-timing-function: linear; + transition-timing-function: linear; +} +.alertify-notifier .ajs-message.ajs-visible { + -webkit-transition-duration: 500ms; + transition-duration: 500ms; + -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-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; +} diff --git a/web/pgadmin/static/css/alertifyjs/alertify.min.css b/web/pgadmin/static/css/alertifyjs/alertify.min.css new file mode 100644 index 000000000..627768483 --- /dev/null +++ b/web/pgadmin/static/css/alertifyjs/alertify.min.css @@ -0,0 +1,3 @@ +/*! AlertifyJS - v1.1.0 - Mohammad Younes (http://alertifyjs.com) */ + +.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;outline:0}.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 -24px 0;padding:16px 24px}.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}.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-closable .ajs-commands button.ajs-close,.alertify.ajs-maximizable .ajs-commands button.ajs-maximize,.alertify.ajs-maximizable .ajs-commands button.ajs-restore{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-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:#3593D2 dotted 1px}}.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:500ms;animation-duration:500ms}.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,.885,.32,1.275);animation-timing-function:cubic-bezier(0.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(0.6,-.28,.735,.045);animation-timing-function:cubic-bezier(0.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(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(0.3,.3,.3);transform:scale3d(0.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(0.9,.9,.9);transform:scale3d(0.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(0.97,.97,.97);transform:scale3d(0.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,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(0.3,.3,.3);transform:scale3d(0.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(0.9,.9,.9);transform:scale3d(0.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(0.97,.97,.97);transform:scale3d(0.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(0.9,.9,.9);transform:scale3d(0.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(0.3,.3,.3);transform:scale3d(0.3,.3,.3)}}@keyframes ajs-pulseOut{20%{-webkit-transform:scale3d(0.9,.9,.9);transform:scale3d(0.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(0.3,.3,.3);transform:scale3d(0.3,.3,.3)}}@-webkit-keyframes ajs-zoomIn{0%{opacity:0;-webkit-transform:scale3d(0.25,.25,.25);transform:scale3d(0.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(0.25,.25,.25);transform:scale3d(0.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(0.25,.25,.25);transform:scale3d(0.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(0.25,.25,.25);transform:scale3d(0.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-transition-duration:250ms;transition-duration:250ms;-webkit-transition-timing-function:linear;transition-timing-function:linear}.alertify-notifier .ajs-message.ajs-visible{-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(0.175,.885,.32,1.275);transition-timing-function:cubic-bezier(0.175,.885,.32,1.275);opacity:1;max-height:100%;padding:15px;margin-top:10px}.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} \ No newline at end of file diff --git a/web/pgadmin/static/css/alertifyjs/alertify.rtl.css b/web/pgadmin/static/css/alertifyjs/alertify.rtl.css new file mode 100644 index 000000000..2d02ef55c --- /dev/null +++ b/web/pgadmin/static/css/alertifyjs/alertify.rtl.css @@ -0,0 +1,874 @@ +.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; +} +.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; +} +.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; +} +.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-resizable .ajs-dialog, +.alertify.ajs-maximized .ajs-dialog { + padding: 0; +} +.alertify.ajs-resizable .ajs-commands, +.alertify.ajs-maximized .ajs-commands { + margin: 14px 0 0 24px; +} +.alertify.ajs-resizable .ajs-header, +.alertify.ajs-maximized .ajs-header { + position: absolute; + top: 0; + right: 0; + left: 0; + margin: 0; + padding: 16px 24px; +} +.alertify.ajs-resizable .ajs-body, +.alertify.ajs-maximized .ajs-body { + min-height: 224px; + display: inline-block; +} +.alertify.ajs-resizable .ajs-body .ajs-content, +.alertify.ajs-maximized .ajs-body .ajs-content { + position: absolute; + top: 50px; + left: 24px; + bottom: 50px; + right: 24px; + overflow: auto; +} +.alertify.ajs-resizable .ajs-footer, +.alertify.ajs-maximized .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: none; +} +.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 /*IE fallback*/; + } +} +@-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: 500ms; + animation-duration: 500ms; +} +.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%, + 20%, + 40%, + 60%, + 80%, + 100% { + -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(0.3, 0.3, 0.3); + transform: scale3d(0.3, 0.3, 0.3); + } + 20% { + -webkit-transform: scale3d(1.1, 1.1, 1.1); + transform: scale3d(1.1, 1.1, 1.1); + } + 40% { + -webkit-transform: scale3d(0.9, 0.9, 0.9); + transform: scale3d(0.9, 0.9, 0.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(0.97, 0.97, 0.97); + transform: scale3d(0.97, 0.97, 0.97); + } + 100% { + opacity: 1; + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } +} +@keyframes ajs-pulseIn { + 0%, + 20%, + 40%, + 60%, + 80%, + 100% { + -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(0.3, 0.3, 0.3); + transform: scale3d(0.3, 0.3, 0.3); + } + 20% { + -webkit-transform: scale3d(1.1, 1.1, 1.1); + transform: scale3d(1.1, 1.1, 1.1); + } + 40% { + -webkit-transform: scale3d(0.9, 0.9, 0.9); + transform: scale3d(0.9, 0.9, 0.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(0.97, 0.97, 0.97); + transform: scale3d(0.97, 0.97, 0.97); + } + 100% { + opacity: 1; + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } +} +@-webkit-keyframes ajs-pulseOut { + 20% { + -webkit-transform: scale3d(0.9, 0.9, 0.9); + transform: scale3d(0.9, 0.9, 0.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(0.3, 0.3, 0.3); + transform: scale3d(0.3, 0.3, 0.3); + } +} +@keyframes ajs-pulseOut { + 20% { + -webkit-transform: scale3d(0.9, 0.9, 0.9); + transform: scale3d(0.9, 0.9, 0.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(0.3, 0.3, 0.3); + transform: scale3d(0.3, 0.3, 0.3); + } +} +@-webkit-keyframes ajs-zoomIn { + 0% { + opacity: 0; + -webkit-transform: scale3d(0.25, 0.25, 0.25); + transform: scale3d(0.25, 0.25, 0.25); + } + 100% { + opacity: 1; + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } +} +@keyframes ajs-zoomIn { + 0% { + opacity: 0; + -webkit-transform: scale3d(0.25, 0.25, 0.25); + transform: scale3d(0.25, 0.25, 0.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(0.25, 0.25, 0.25); + transform: scale3d(0.25, 0.25, 0.25); + } +} +@keyframes ajs-zoomOut { + 0% { + opacity: 1; + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } + 100% { + opacity: 0; + -webkit-transform: scale3d(0.25, 0.25, 0.25); + transform: scale3d(0.25, 0.25, 0.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-transition-duration: 250ms; + transition-duration: 250ms; + -webkit-transition-timing-function: linear; + transition-timing-function: linear; +} +.alertify-notifier .ajs-message.ajs-visible { + -webkit-transition-duration: 500ms; + transition-duration: 500ms; + -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-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; +} diff --git a/web/pgadmin/static/css/alertifyjs/alertify.rtl.min.css b/web/pgadmin/static/css/alertifyjs/alertify.rtl.min.css new file mode 100644 index 000000000..16278dbd4 --- /dev/null +++ b/web/pgadmin/static/css/alertifyjs/alertify.rtl.min.css @@ -0,0 +1,3 @@ +/*! AlertifyJS - v1.1.0 - Mohammad Younes (http://alertifyjs.com) */ + +.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;outline:0}.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 -24px 0;padding:16px 24px}.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}.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-closable .ajs-commands button.ajs-close,.alertify.ajs-maximizable .ajs-commands button.ajs-maximize,.alertify.ajs-maximizable .ajs-commands button.ajs-restore{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-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:#3593D2 dotted 1px}}.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:500ms;animation-duration:500ms}.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,.885,.32,1.275);animation-timing-function:cubic-bezier(0.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(0.6,-.28,.735,.045);animation-timing-function:cubic-bezier(0.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(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(0.3,.3,.3);transform:scale3d(0.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(0.9,.9,.9);transform:scale3d(0.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(0.97,.97,.97);transform:scale3d(0.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,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(0.3,.3,.3);transform:scale3d(0.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(0.9,.9,.9);transform:scale3d(0.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(0.97,.97,.97);transform:scale3d(0.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(0.9,.9,.9);transform:scale3d(0.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(0.3,.3,.3);transform:scale3d(0.3,.3,.3)}}@keyframes ajs-pulseOut{20%{-webkit-transform:scale3d(0.9,.9,.9);transform:scale3d(0.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(0.3,.3,.3);transform:scale3d(0.3,.3,.3)}}@-webkit-keyframes ajs-zoomIn{0%{opacity:0;-webkit-transform:scale3d(0.25,.25,.25);transform:scale3d(0.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(0.25,.25,.25);transform:scale3d(0.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(0.25,.25,.25);transform:scale3d(0.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(0.25,.25,.25);transform:scale3d(0.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-transition-duration:250ms;transition-duration:250ms;-webkit-transition-timing-function:linear;transition-timing-function:linear}.alertify-notifier .ajs-message.ajs-visible{-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(0.175,.885,.32,1.275);transition-timing-function:cubic-bezier(0.175,.885,.32,1.275);opacity:1;max-height:100%;padding:15px;margin-top:10px}.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} \ No newline at end of file diff --git a/web/pgadmin/static/css/alertifyjs/themes/bootstrap.css b/web/pgadmin/static/css/alertifyjs/themes/bootstrap.css new file mode 100644 index 000000000..adf36de51 --- /dev/null +++ b/web/pgadmin/static/css/alertifyjs/themes/bootstrap.css @@ -0,0 +1,55 @@ +.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, 0.2); + box-shadow: 0 5px 15px rgba(0, 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: black; +} +.alertify.ajs-resizable .ajs-content, +.alertify.ajs-maximized:not(.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, 0.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, 0.95); + text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.5); +} +.alertify-notifier .ajs-message.ajs-error { + color: #fff; + background: rgba(217, 92, 92, 0.95); + text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.5); +} +.alertify-notifier .ajs-message.ajs-warning { + background: rgba(252, 248, 215, 0.95); + border-color: #999; +} diff --git a/web/pgadmin/static/css/alertifyjs/themes/bootstrap.min.css b/web/pgadmin/static/css/alertifyjs/themes/bootstrap.min.css new file mode 100644 index 000000000..ee9d80de3 --- /dev/null +++ b/web/pgadmin/static/css/alertifyjs/themes/bootstrap.min.css @@ -0,0 +1,3 @@ +/*! AlertifyJS - v1.1.0 - Mohammad Younes (http://alertifyjs.com) */ + +.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);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:1px solid #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/web/pgadmin/static/css/alertifyjs/themes/bootstrap.rtl.css b/web/pgadmin/static/css/alertifyjs/themes/bootstrap.rtl.css new file mode 100644 index 000000000..c35a1995e --- /dev/null +++ b/web/pgadmin/static/css/alertifyjs/themes/bootstrap.rtl.css @@ -0,0 +1,55 @@ +.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, 0.2); + box-shadow: 0 5px 15px rgba(0, 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: black; +} +.alertify.ajs-resizable .ajs-content, +.alertify.ajs-maximized:not(.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, 0.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, 0.95); + text-shadow: 1px -1px 0 rgba(0, 0, 0, 0.5); +} +.alertify-notifier .ajs-message.ajs-error { + color: #fff; + background: rgba(217, 92, 92, 0.95); + text-shadow: 1px -1px 0 rgba(0, 0, 0, 0.5); +} +.alertify-notifier .ajs-message.ajs-warning { + background: rgba(252, 248, 215, 0.95); + border-color: #999; +} diff --git a/web/pgadmin/static/css/alertifyjs/themes/bootstrap.rtl.min.css b/web/pgadmin/static/css/alertifyjs/themes/bootstrap.rtl.min.css new file mode 100644 index 000000000..937233aac --- /dev/null +++ b/web/pgadmin/static/css/alertifyjs/themes/bootstrap.rtl.min.css @@ -0,0 +1,3 @@ +/*! AlertifyJS - v1.1.0 - Mohammad Younes (http://alertifyjs.com) */ + +.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);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:1px solid #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/web/pgadmin/static/css/bootstrap-dialog.css b/web/pgadmin/static/css/bootstrap-dialog.css deleted file mode 100755 index 0ac8692fa..000000000 --- a/web/pgadmin/static/css/bootstrap-dialog.css +++ /dev/null @@ -1,120 +0,0 @@ -.bootstrap-dialog { - -} -.bootstrap-dialog .modal-header { - border-top-left-radius: 4px; - border-top-right-radius: 4px; -} -.bootstrap-dialog .bootstrap-dialog-title { - color: #fff; - display: inline-block; -} -.bootstrap-dialog.type-default .bootstrap-dialog-title { - color: #333; -} -.bootstrap-dialog .bootstrap-dialog-title { - font-size: 16px; -} -.bootstrap-dialog.size-large .bootstrap-dialog-title { - font-size: 24px; -} -.bootstrap-dialog .bootstrap-dialog-close-button { - float: right; - filter:alpha(opacity=90); - -moz-opacity:0.9; - -khtml-opacity: 0.9; - opacity: 0.9; -} -.bootstrap-dialog .bootstrap-dialog-close-button { - font-size: 20px; -} -.bootstrap-dialog.size-large .bootstrap-dialog-close-button { - font-size: 30px; -} -.bootstrap-dialog .bootstrap-dialog-close-button:hover { - cursor: pointer; - filter: alpha(opacity=100); - -moz-opacity: 1; - -khtml-opacity: 1; - opacity: 1; -} -.bootstrap-dialog .bootstrap-dialog-message { - font-size: 14px; -} -.bootstrap-dialog.size-large .bootstrap-dialog-message { - font-size: 18px; -} -.bootstrap-dialog.type-default .modal-header { - background-color: #fff; -} -.bootstrap-dialog.type-info .modal-header { - background-color: #5bc0de; -} -.bootstrap-dialog.type-primary .modal-header { - background-color: #428bca; -} -.bootstrap-dialog.type-success .modal-header { - background-color: #5cb85c; -} -.bootstrap-dialog.type-warning .modal-header { - background-color: #f0ad4e; -} -.bootstrap-dialog.type-danger .modal-header { - background-color: #d9534f; -} -.bootstrap-dialog .bootstrap-dialog-button-icon { - margin-right: 3px; -} - -/** - * Icon animation - * Copied from font-awesome: http://fontawesome.io/ - **/ -.icon-spin { - display: inline-block; - -moz-animation: spin 2s infinite linear; - -o-animation: spin 2s infinite linear; - -webkit-animation: spin 2s infinite linear; - animation: spin 2s infinite linear; -} -@-moz-keyframes spin { - 0% { - -moz-transform: rotate(0deg); -} -100% { - -moz-transform: rotate(359deg); -} -} -@-webkit-keyframes spin { - 0% { - -webkit-transform: rotate(0deg); -} -100% { - -webkit-transform: rotate(359deg); -} -} -@-o-keyframes spin { - 0% { - -o-transform: rotate(0deg); -} -100% { - -o-transform: rotate(359deg); -} -} -@-ms-keyframes spin { - 0% { - -ms-transform: rotate(0deg); -} -100% { - -ms-transform: rotate(359deg); -} -} -@keyframes spin { - 0% { - transform: rotate(0deg); -} -100% { - transform: rotate(359deg); -} -} -/** End of icon animation **/ \ No newline at end of file diff --git a/web/pgadmin/static/css/bootstrap-dialog.min.css b/web/pgadmin/static/css/bootstrap-dialog.min.css deleted file mode 100755 index 67a35d419..000000000 --- a/web/pgadmin/static/css/bootstrap-dialog.min.css +++ /dev/null @@ -1 +0,0 @@ -.bootstrap-dialog .modal-header{border-top-left-radius:4px;border-top-right-radius:4px}.bootstrap-dialog .bootstrap-dialog-title{color:#fff;display:inline-block}.bootstrap-dialog.type-default .bootstrap-dialog-title{color:#333}.bootstrap-dialog .bootstrap-dialog-title{font-size:16px}.bootstrap-dialog.size-large .bootstrap-dialog-title{font-size:24px}.bootstrap-dialog .bootstrap-dialog-close-button{float:right;filter:alpha(opacity=90);-moz-opacity:.9;-khtml-opacity:.9;opacity:.9}.bootstrap-dialog .bootstrap-dialog-close-button{font-size:20px}.bootstrap-dialog.size-large .bootstrap-dialog-close-button{font-size:30px}.bootstrap-dialog .bootstrap-dialog-close-button:hover{cursor:pointer;filter:alpha(opacity=100);-moz-opacity:1;-khtml-opacity:1;opacity:1}.bootstrap-dialog .bootstrap-dialog-message{font-size:14px}.bootstrap-dialog.size-large .bootstrap-dialog-message{font-size:18px}.bootstrap-dialog.type-default .modal-header{background-color:#fff}.bootstrap-dialog.type-info .modal-header{background-color:#5bc0de}.bootstrap-dialog.type-primary .modal-header{background-color:#428bca}.bootstrap-dialog.type-success .modal-header{background-color:#5cb85c}.bootstrap-dialog.type-warning .modal-header{background-color:#f0ad4e}.bootstrap-dialog.type-danger .modal-header{background-color:#d9534f}.bootstrap-dialog .bootstrap-dialog-button-icon{margin-right:3px}.icon-spin{display:inline-block;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0{-moz-transform:rotate(0)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0{-o-transform:rotate(0)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0{-ms-transform:rotate(0)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0{transform:rotate(0)}100%{transform:rotate(359deg)}} \ No newline at end of file diff --git a/web/pgadmin/static/css/overrides.css b/web/pgadmin/static/css/overrides.css index f73c3750d..934b76908 100644 --- a/web/pgadmin/static/css/overrides.css +++ b/web/pgadmin/static/css/overrides.css @@ -1 +1,11 @@ /* Overrides/fixes for pgAdmin specific styling in Bootstrap */ + +/* Restyle the Alertify dialogs */ +.alertify .ajs-dialog { + border: 0px solid rgba(0,0,0,.2); +} + +.alertify .ajs-header { + background-color: #428bca; + color: #fff; +} diff --git a/web/pgadmin/static/js/vendor/alertifyjs/alertify.js b/web/pgadmin/static/js/vendor/alertifyjs/alertify.js new file mode 100644 index 000000000..d378e7e87 --- /dev/null +++ b/web/pgadmin/static/js/vendor/alertifyjs/alertify.js @@ -0,0 +1,3257 @@ +/** + * AlertifyJS + * AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. + * + * @author Mohammad Younes (http://alertifyjs.com) + * @copyright 2015 + * @license MIT + * @link http://alertifyjs.com + * @module AlertifyJS + * @version 1.1.0 + */ +( function ( window ) { + 'use strict'; + + /** + * Keys enum + * @type {Object} + */ + var keys = { + ENTER: 13, + ESC: 27, + F1: 112, + F12: 123, + LEFT: 37, + RIGHT: 39 + }; + /** + * Default options + * @type {Object} + */ + var defaults = { + modal:true, + basic:false, + frameless:false, + movable:true, + resizable:true, + closable:true, + maximizable:true, + startMaximized:false, + pinnable:true, + pinned:true, + padding: true, + overflow:true, + maintainFocus:true, + transition:'pulse', + notifier:{ + delay:5, + position:'bottom-right' + }, + 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', + } + }; + + //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 classes = classNames.split(' '); + 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 + }; + } + + + /** + * 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, + //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 = { + base: 'alertify', + prefix: 'ajs-', + hidden: 'ajs-hidden', + noSelection: 'ajs-no-selection', + noOverflow: 'ajs-no-overflow', + noPadding:'ajs-no-padding', + modeless: 'ajs-modeless', + movable: 'ajs-movable', + resizable: 'ajs-resizable', + capture: 'ajs-capture', + fixed: 'ajs-fixed', + closable:'ajs-closable', + maximizable:'ajs-maximizable', + maximize: 'ajs-maximize', + restore: 'ajs-restore', + pinnable:'ajs-pinnable', + unpinned:'ajs-unpinned', + pin:'ajs-pin', + maximized: 'ajs-maximized', + animationIn: 'ajs-in', + animationOut: 'ajs-out', + shake:'ajs-shake', + basic:'ajs-basic', + frameless:'ajs-frameless' + }; + + /** + * Helper: initializes the dialog instance + * + * @return {Number} The total count of currently open modals. + */ + function initialize(instance){ + + if(!instance.__internal){ + + //no need to expose init after this. + delete instance.__init; + + //in case the script was included before body. + //after first dialog gets initialized, it won't be null anymore! + if(null === reflow){ + // set tabindex attribute on body element this allows script to give it + // focus after the dialog is closed + document.body.setAttribute( 'tabindex', '0' ); + } + + //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 = {}; + } + + var internal = instance.__internal = { + /** + * Flag holding the open state of the dialog + * + * @type {Boolean} + */ + isOpen:false, + /** + * Active element is the element that will receive focus after + * closing the dialog. It defaults as the body tag, but gets updated + * to the last focused element before the dialog was opened. + * + * @type {Node} + */ + activeElement:document.body, + timerIn:undefined, + timerOut:undefined, + buttons: setup.buttons || [], + focus: setup.focus, + options: { + title: undefined, + modal: undefined, + basic:undefined, + frameless:undefined, + pinned: undefined, + movable: undefined, + resizable: undefined, + closable: undefined, + maximizable: undefined, + startMaximized: undefined, + pinnable: undefined, + transition: undefined, + padding:undefined, + overflow:undefined, + onshow:undefined, + onclose:undefined, + onfocus:undefined, + }, + resetHandler:undefined, + beginMoveHandler:undefined, + beginResizeHandler:undefined, + bringToFrontHandler:undefined, + modalClickHandler:undefined, + buttonsClickHandler:undefined, + commandsClickHandler:undefined, + transitionInHandler:undefined, + transitionOutHandler:undefined + }; + + + var elements = {}; + //root node + elements.root = document.createElement('div'); + + elements.root.className = classes.base + ' ' + classes.hidden + ' '; + + elements.root.innerHTML = templates.dimmer + templates.modal; + + //dimmer + elements.dimmer = elements.root.firstChild; + + //dialog + elements.modal = elements.root.lastChild; + elements.modal.innerHTML = templates.dialog; + elements.dialog = elements.modal.firstChild; + elements.dialog.innerHTML = templates.reset + templates.commands + templates.header + templates.body + templates.footer + templates.resizeHandle + templates.reset; + + //reset links + elements.reset = []; + elements.reset.push(elements.dialog.firstChild); + elements.reset.push(elements.dialog.lastChild); + + //commands + elements.commands = {}; + elements.commands.container = elements.reset[0].nextSibling; + elements.commands.pin = elements.commands.container.firstChild; + elements.commands.maximize = elements.commands.pin.nextSibling; + elements.commands.close = elements.commands.maximize.nextSibling; + + //header + elements.header = elements.commands.container.nextSibling; + + //body + elements.body = elements.header.nextSibling; + elements.body.innerHTML = templates.content; + elements.content = elements.body.firstChild; + + //footer + elements.footer = elements.body.nextSibling; + elements.footer.innerHTML = templates.buttons.auxiliary + templates.buttons.primary; + + //resize handle + elements.resizeHandle = elements.footer.nextSibling; + + //buttons + elements.buttons = {}; + elements.buttons.auxiliary = elements.footer.firstChild; + elements.buttons.primary = elements.buttons.auxiliary.nextSibling; + elements.buttons.primary.innerHTML = templates.button; + elements.buttonTemplate = elements.buttons.primary.firstChild; + //remove button template + elements.buttons.primary.removeChild(elements.buttonTemplate); + + for(var x=0; x < instance.__internal.buttons.length; x+=1) { + var button = instance.__internal.buttons[x]; + + // add to the list of used keys. + if(usedKeys.indexOf(button.key) < 0){ + usedKeys.push(button.key); + } + + button.element = elements.buttonTemplate.cloneNode(); + button.element.innerHTML = button.text; + if(typeof button.className === 'string' && button.className !== ''){ + addClass(button.element, button.className); + } + for(var key in button.attrs){ + if(key !== 'className' && button.attrs.hasOwnProperty(key)){ + button.element.setAttribute(key, button.attrs[key]); + } + } + if(button.scope === 'auxiliary'){ + elements.buttons.auxiliary.appendChild(button.element); + }else{ + elements.buttons.primary.appendChild(button.element); + } + } + //make elements pubic + instance.elements = elements; + + //save event handlers delegates + internal.resetHandler = delegate(instance, onReset); + internal.beginMoveHandler = delegate(instance, beginMove); + internal.beginResizeHandler = delegate(instance, beginResize); + internal.bringToFrontHandler = delegate(instance, bringToFront); + internal.modalClickHandler = delegate(instance, modalClickHandler); + internal.buttonsClickHandler = delegate(instance, buttonsClickHandler); + internal.commandsClickHandler = delegate(instance, commandsClickHandler); + internal.transitionInHandler = delegate(instance, handleTransitionInEvent); + internal.transitionOutHandler = delegate(instance, handleTransitionOutEvent); + + + //settings + instance.set('title', setup.options.title === undefined ? alertify.defaults.glossary.title : setup.options.title); + + instance.set('modal', setup.options.modal === undefined ? alertify.defaults.modal : setup.options.modal); + instance.set('basic', setup.options.basic === undefined ? alertify.defaults.basic : setup.options.basic); + instance.set('frameless', setup.options.frameless === undefined ? alertify.defaults.frameless : setup.options.frameless); + + instance.set('movable', setup.options.movable === undefined ? alertify.defaults.movable : setup.options.movable); + instance.set('resizable', setup.options.resizable === undefined ? alertify.defaults.resizable : setup.options.resizable); + + instance.set('closable', setup.options.closable === undefined ? alertify.defaults.closable : setup.options.closable); + instance.set('maximizable', setup.options.maximizable === undefined ? alertify.defaults.maximizable : setup.options.maximizable); + instance.set('startMaximized', setup.options.startMaximized === undefined ? alertify.defaults.startMaximized : setup.options.startMaximized); + + instance.set('pinnable', setup.options.pinnable === undefined ? alertify.defaults.pinnable : setup.options.pinnable); + instance.set('pinned', setup.options.pinned === undefined ? alertify.defaults.pinned : setup.options.pinned); + + instance.set('transition', setup.options.transition === undefined ? alertify.defaults.transition : setup.options.transition); + + instance.set('padding', setup.options.padding === undefined ? alertify.defaults.padding : setup.options.padding); + instance.set('overflow', setup.options.overflow === undefined ? alertify.defaults.overflow : setup.options.overflow); + + + // allow dom customization + if(typeof instance.build === 'function'){ + instance.build(); + } + } + + //add to the end of the DOM tree. + document.body.appendChild(instance.elements.root); + } + + /** + * Helper: adds/removes no-overflow class from body + * + */ + function ensureNoOverflow(){ + var requiresNoOverflow = 0; + for(var x=0;x 0 && document.body.className.indexOf(classes.noOverflow) < 0){ + //first open modal or first maximized one + addClass(document.body, classes.noOverflow); + } + } + + /** + * 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 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 -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 ((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 modal + if (instance && instance.isModal()) { + // determine reset target to enable forward/backward tab cycle. + var resetTarget, target = event.srcElement || event.target; + var lastResetElement = target === instance.elements.reset[1] || (instance.__internal.buttons.length === 0 && target === document.body); + + // if last reset link, then go to maximize or close + if (lastResetElement) { + if (instance.get('maximizable')) { + resetTarget = instance.elements.commands.maximize; + } else if (instance.get('closable')) { + resetTarget = instance.elements.commands.close; + } + } + // if no reset target found, try finding the best button + if (resetTarget === undefined) { + if (typeof instance.__internal.focus.element === 'number') { + // button focus element, go to first available button + if (target === instance.elements.reset[0]) { + resetTarget = instance.elements.buttons.auxiliary.firstChild || instance.elements.buttons.primary.firstChild; + } else if (lastResetElement) { + //restart the cycle by going to first reset link + resetTarget = instance.elements.reset[0]; + } + } else { + // will reach here when tapping backwards, so go to last child + // The focus element SHOULD NOT be a button (logically!). + if (target === instance.elements.reset[0]) { + resetTarget = instance.elements.buttons.primary.lastChild || instance.elements.buttons.auxiliary.lastChild; + } + } + } + // focus + setFocus(instance, resetTarget); + } + } + /** + * Transition in transitionend event handler. + * + * @param {Event} TransitionEnd event object. + * @param {Object} The dilog instance. + * + * @return {undefined} + */ + function handleTransitionInEvent(event, instance) { + // clear the timer + clearTimeout(instance.__internal.timerIn); + + // once transition is complete, set focus + setFocus(instance); + + // allow handling key up after transition ended. + cancelKeyup = false; + + // allow custom `onfocus` method + if (typeof instance.get('onfocus') === 'function') { + instance.get('onfocus')(); + } + + // unbind the event + off(instance.elements.dialog, transition.type, instance.__internal.transitionInHandler); + + removeClass(instance.elements.root, classes.animationIn); + } + + /** + * Transition out transitionend event handler. + * + * @param {Event} TransitionEnd event object. + * @param {Object} The dilog instance. + * + * @return {undefined} + */ + function handleTransitionOutEvent(event, instance) { + // clear the timer + clearTimeout(instance.__internal.timerOut); + // unbind the event + off(instance.elements.dialog, transition.type, instance.__internal.transitionOutHandler); + + // reset move updates + resetMove(instance); + // reset resize updates + resetResize(instance); + + // restore if maximized + if (instance.isMaximized() && !instance.get('startMaximized')) { + restore(instance); + } + + // return focus to the last active element + if (alertify.defaults.maintainFocus && instance.__internal.activeElement) { + instance.__internal.activeElement.focus(); + instance.__internal.activeElement = null; + } + } + /* Controls moving a dialog around */ + //holde the current moving instance + var movable = null, + //holds the current X offset when move starts + offsetX = 0, + //holds the current Y offset when move starts + offsetY = 0, + xProp = 'pageX', + yProp = 'pageY' + ; + + /** + * Helper: sets the element top/left coordinates + * + * @param {Event} event DOM event object. + * @param {Node} element The element being moved. + * + * @return {undefined} + */ + function moveElement(event, element) { + element.style.left = (event[xProp] - offsetX) + 'px'; + element.style.top = (event[yProp] - offsetY) + 'px'; + } + + /** + * Triggers the start of a move event, attached to the header 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 beginMove(event, instance) { + if (resizable === null && !instance.isMaximized() && instance.get('movable')) { + var eventSrc; + if (event.type === 'touchstart') { + event.preventDefault(); + eventSrc = event.targetTouches[0]; + xProp = 'clientX'; + yProp = 'clientY'; + } else if (event.button === 0) { + eventSrc = event; + } + + if (eventSrc) { + + movable = instance; + offsetX = eventSrc[xProp]; + offsetY = eventSrc[yProp]; + + var element = instance.elements.dialog; + addClass(element, classes.capture); + + if (element.style.left) { + offsetX -= parseInt(element.style.left, 10); + } + + if (element.style.top) { + offsetY -= parseInt(element.style.top, 10); + } + moveElement(eventSrc, element); + + addClass(document.body, classes.noSelection); + return false; + } + } + } + + /** + * The actual move handler, attached to document.body mousemove event. + * + * @param {Event} event DOM event object. + * + * @return {undefined} + */ + function move(event) { + if (movable) { + var eventSrc; + if (event.type === 'touchmove') { + event.preventDefault(); + eventSrc = event.targetTouches[0]; + } else if (event.button === 0) { + eventSrc = event; + } + if (eventSrc) { + moveElement(eventSrc, movable.elements.dialog); + } + } + } + + /** + * Triggers the end of a move event, attached to document.body mouseup event. + * Removes no-selection class from document.body, allowing selection. + * + * @return {undefined} + */ + function endMove() { + if (movable) { + var element = movable.elements.dialog; + movable = null; + removeClass(document.body, classes.noSelection); + removeClass(element, classes.capture); + } + } + + /** + * Resets any changes made by moving the element to its original state, + * + * @param {Object} instance The dilog instance. + * + * @return {undefined} + */ + function resetMove(instance) { + movable = null; + var element = instance.elements.dialog; + element.style.left = element.style.top = ''; + } + + /** + * 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 updateMovable(instance) { + if (instance.get('movable')) { + // add class + addClass(instance.elements.root, classes.movable); + if (instance.isOpen()) { + bindMovableEvents(instance); + } + } else { + + //reset + resetMove(instance); + // remove class + removeClass(instance.elements.root, classes.movable); + if (instance.isOpen()) { + unbindMovableEvents(instance); + } + } + } + + /* Controls moving a dialog around */ + //holde the current instance being resized + var resizable = null, + //holds the staring left offset when resize starts. + startingLeft = Number.Nan, + //holds the staring width when resize starts. + startingWidth = 0, + //holds the initial width when resized for the first time. + minWidth = 0, + //holds the offset of the resize handle. + handleOffset = 0 + ; + + /** + * Helper: sets the element width/height and updates left coordinate if neccessary. + * + * @param {Event} event DOM mousemove event object. + * @param {Node} element The element being moved. + * @param {Boolean} pinned A flag indicating if the element being resized is pinned to the screen. + * + * @return {undefined} + */ + function resizeElement(event, element, pageRelative) { + + //calculate offsets from 0,0 + var current = element; + var offsetLeft = 0; + var offsetTop = 0; + do { + offsetLeft += current.offsetLeft; + offsetTop += current.offsetTop; + } while (current = current.offsetParent); + + // determine X,Y coordinates. + var X, Y; + if (pageRelative === true) { + X = event.pageX; + Y = event.pageY; + } else { + X = event.clientX; + Y = event.clientY; + } + // rtl handling + var isRTL = isRightToLeft(); + if (isRTL) { + // reverse X + X = document.body.offsetWidth - X; + // if has a starting left, calculate offsetRight + if (!isNaN(startingLeft)) { + offsetLeft = document.body.offsetWidth - offsetLeft - element.offsetWidth; + } + } + + // set width/height + element.style.height = (Y - offsetTop + handleOffset) + 'px'; + element.style.width = (X - offsetLeft + handleOffset) + 'px'; + + // if the element being resized has a starting left, maintain it. + // the dialog is centered, divide by half the offset to maintain the margins. + if (!isNaN(startingLeft)) { + var diff = Math.abs(element.offsetWidth - startingWidth) * 0.5; + if (isRTL) { + //negate the diff, why? + //when growing it should decrease left + //when shrinking it should increase left + diff *= -1; + } + if (element.offsetWidth > 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) { + 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 element = resizable.elements.dialog; + resizable = null; + removeClass(document.body, classes.noSelection); + removeClass(element, classes.capture); + cancelClick = true; + } + } + + /** + * 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]; + 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); + on(document.documentElement, 'mouseup', endMove); + on(document.documentElement, 'touchend', endMove); + //resize + on(document.documentElement, 'mousemove', resize); + on(document.documentElement, 'touchmove', resize); + 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], 'focus', instance.__internal.resetHandler); + on(instance.elements.reset[1], 'focus', 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], 'focus', instance.__internal.resetHandler); + off(instance.elements.reset[1], 'focus', 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); + } + + /** + * 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); + } + + + + /** + * 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); + } + + /** + * 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); + } + + /** + * 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; + }, + /** + * 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)){ + 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'; + } + 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} width The new dialog width in pixels. + * @param {Number} height The new dialog height in pixels. + * + * @return {Object} The dialog instance. + */ + resizeTo:function(width,height){ + if(!isNaN(width) && !isNaN(height) && this.get('resizable') === true){ + 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 = width + 'px'; + element.style.height = height + 'px'; + } + 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') { + this.element.innerHTML = content; + } else { + this.element.appendChild(content); + } + 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 !== '') ? ' ajs-' + 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(undefined, 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, + duratuin: 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(undefined, closeEvent); + if (typeof returnValue !== 'undefined') { + closeEvent.cancel = !returnValue; + } + } + break; + case 1: + if (typeof this.get('oncancel') === 'function') { + returnValue = this.get('oncancel').call(undefined, 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') { + p.innerHTML = message; + } else if (message instanceof window.HTMLElement && p.firstChild !== message) { + p.innerHTML = ''; + p.appendChild(message); + } + }, + settings: { + message: undefined, + labels: undefined, + onok: undefined, + oncancel: undefined, + value: '', + reverseButtons: undefined, + }, + settingUpdated: function (key, oldValue, newValue) { + switch (key) { + case 'message': + this.setMessage(newValue); + break; + case 'value': + input.value = newValue; + 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.value = input.value; + if (typeof this.get('onok') === 'function') { + returnValue = this.get('onok').call(undefined, closeEvent, this.value); + if (typeof returnValue !== 'undefined') { + closeEvent.cancel = !returnValue; + } + } + break; + case 1: + if (typeof this.get('oncancel') === 'function') { + returnValue = this.get('oncancel').call(undefined, closeEvent); + if (typeof returnValue !== 'undefined') { + closeEvent.cancel = !returnValue; + } + } + break; + } + } + }; + }); + + // AMD and window support + if ( typeof define === 'function' ) { + define( [], function () { + return alertify; + } ); + } else if ( !window.alertify ) { + window.alertify = alertify; + } + +} ( this ) ); diff --git a/web/pgadmin/static/js/vendor/alertifyjs/alertify.min.js b/web/pgadmin/static/js/vendor/alertifyjs/alertify.min.js new file mode 100644 index 000000000..2fa3c5d9d --- /dev/null +++ b/web/pgadmin/static/js/vendor/alertifyjs/alertify.min.js @@ -0,0 +1,3 @@ +/*! AlertifyJS - v1.1.0 - Mohammad Younes (http://alertifyjs.com) */ +!function(a){"use strict";function b(a,b){a.className+=" "+b}function c(a,b){for(var c=b.split(" "),d=0;d0){for(var c=[],d=0;d0&&document.body.className.indexOf(sb.noOverflow)<0&&b(document.body,sb.noOverflow)}function p(a,d,e){"string"==typeof e&&c(a.elements.root,sb.prefix+e),b(a.elements.root,sb.prefix+d),pb=a.elements.root.offsetWidth}function q(a){a.get("modal")?(c(a.elements.root,sb.modeless),a.isOpen()&&(hb(a),G(a),k())):(b(a.elements.root,sb.modeless),a.isOpen()&&(gb(a),G(a),k()))}function s(a){a.get("basic")?b(a.elements.root,sb.basic):c(a.elements.root,sb.basic)}function t(a){a.get("frameless")?b(a.elements.root,sb.frameless):c(a.elements.root,sb.frameless)}function u(a,b){for(var c=l.indexOf(b),d=c+1;d-1?(L(b,function(a){return a.key===c}),!1):void 0}function O(a){var b=l[l.length-1],c=a.keyCode;if(c===j.LEFT||c===j.RIGHT){for(var d=b.__internal.buttons,e=0;ej.F1-1&&ob.indexOf(c)>-1)return a.preventDefault(),a.stopPropagation(),L(b,function(a){return a.key===c}),!1}function P(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=a.get("basic")===!0?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)}"undefined"!=typeof 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 Q(a,b){if(!b)for(var c=l.length-1;c>-1;c-=1)if(l[c].isModal()){b=l[c];break}if(b&&b.isModal()){var d,e=a.srcElement||a.target,f=e===b.elements.reset[1]||0===b.__internal.buttons.length&&e===document.body;f&&(b.get("maximizable")?d=b.elements.commands.maximize:b.get("closable")&&(d=b.elements.commands.close)),void 0===d&&("number"==typeof b.__internal.focus.element?e===b.elements.reset[0]?d=b.elements.buttons.auxiliary.firstChild||b.elements.buttons.primary.firstChild:f&&(d=b.elements.reset[0]):e===b.elements.reset[0]&&(d=b.elements.buttons.primary.lastChild||b.elements.buttons.auxiliary.lastChild)),P(b,d)}}function R(a,b){clearTimeout(b.__internal.timerIn),P(b),ub=!1,"function"==typeof b.get("onfocus")&&b.get("onfocus")(),n(b.elements.dialog,o.type,b.__internal.transitionInHandler),c(b.elements.root,sb.animationIn)}function S(a,b){clearTimeout(b.__internal.timerOut),n(b.elements.dialog,o.type,b.__internal.transitionOutHandler),X(b),bb(b),b.isMaximized()&&!b.get("startMaximized")&&C(b),r.defaults.maintainFocus&&b.__internal.activeElement&&(b.__internal.activeElement.focus(),b.__internal.activeElement=null)}function T(a,b){b.style.left=a[yb]-wb+"px",b.style.top=a[zb]-xb+"px"}function U(a,c){if(null===Ab&&!c.isMaximized()&&c.get("movable")){var d;if("touchstart"===a.type?(a.preventDefault(),d=a.targetTouches[0],yb="clientX",zb="clientY"):0===a.button&&(d=a),d){vb=c,wb=d[yb],xb=d[zb];var e=c.elements.dialog;return b(e,sb.capture),e.style.left&&(wb-=parseInt(e.style.left,10)),e.style.top&&(xb-=parseInt(e.style.top,10)),T(d,e),b(document.body,sb.noSelection),!1}}}function V(a){if(vb){var b;"touchmove"===a.type?(a.preventDefault(),b=a.targetTouches[0]):0===a.button&&(b=a),b&&T(b,vb.elements.dialog)}}function W(){if(vb){var a=vb.elements.dialog;vb=null,c(document.body,sb.noSelection),c(a,sb.capture)}}function X(a){vb=null;var b=a.elements.dialog;b.style.left=b.style.top=""}function Y(a){a.get("movable")?(b(a.elements.root,sb.movable),a.isOpen()&&ib(a)):(X(a),c(a.elements.root,sb.movable),a.isOpen()&&jb(a))}function Z(a,b,c){var e=b,f=0,g=0;do f+=e.offsetLeft,g+=e.offsetTop;while(e=e.offsetParent);var h,i;c===!0?(h=a.pageX,i=a.pageY):(h=a.clientX,i=a.clientY);var j=d();if(j&&(h=document.body.offsetWidth-h,isNaN(Bb)||(f=document.body.offsetWidth-f-b.offsetWidth)),b.style.height=i-g+Eb+"px",b.style.width=h-f+Eb+"px",!isNaN(Bb)){var k=.5*Math.abs(b.offsetWidth-Cb);j&&(k*=-1),b.offsetWidth>Cb?b.style.left=Bb+k+"px":b.offsetWidth>=Db&&(b.style.left=Bb-k+"px")}}function $(a,c){if(!c.isMaximized()){var d;if("touchstart"===a.type?(a.preventDefault(),d=a.targetTouches[0]):0===a.button&&(d=a),d){Ab=c,Eb=c.elements.resizeHandle.offsetHeight/2;var e=c.elements.dialog;return b(e,sb.capture),Bb=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=(Cb=e.offsetWidth)+"px","none"!==e.style.maxWidth&&(e.style.minWidth=(Db=e.offsetWidth)+"px"),e.style.maxWidth="none",b(document.body,sb.noSelection),!1}}}function _(a){if(Ab){var b;"touchmove"===a.type?(a.preventDefault(),b=a.targetTouches[0]):0===a.button&&(b=a),b&&Z(b,Ab.elements.dialog,!Ab.get("modal")&&!Ab.get("pinned"))}}function ab(){if(Ab){var a=Ab.elements.dialog;Ab=null,c(document.body,sb.noSelection),c(a,sb.capture),tb=!0}}function bb(a){Ab=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="",Bb=Number.Nan,Cb=Db=Eb=0)}function cb(a){a.get("resizable")?(b(a.elements.root,sb.resizable),a.isOpen()&&kb(a)):(bb(a),c(a.elements.root,sb.resizable),a.isOpen()&&lb(a))}function db(){for(var a=0;a-1&&a.navigator.userAgent.indexOf("Chrome")<0,rb={dimmer:'
',modal:'
',dialog:'
',reset:'',commands:'
',header:'
',body:'
',content:'
',footer:'',buttons:{primary:'
',auxiliary:'
'},button:'',resizeHandle:'
'},sb={base:"alertify",prefix:"ajs-",hidden:"ajs-hidden",noSelection:"ajs-no-selection",noOverflow:"ajs-no-overflow",noPadding:"ajs-no-padding",modeless:"ajs-modeless",movable:"ajs-movable",resizable:"ajs-resizable",capture:"ajs-capture",fixed:"ajs-fixed",closable:"ajs-closable",maximizable:"ajs-maximizable",maximize:"ajs-maximize",restore:"ajs-restore",pinnable:"ajs-pinnable",unpinned:"ajs-unpinned",pin:"ajs-pin",maximized:"ajs-maximized",animationIn:"ajs-in",animationOut:"ajs-out",shake:"ajs-shake",basic:"ajs-basic",frameless:"ajs-frameless"},tb=!1,ub=!1,vb=null,wb=0,xb=0,yb="pageX",zb="pageY",Ab=null,Bb=Number.Nan,Cb=0,Db=0,Eb=0;return{__init:i,isOpen:function(){return this.__internal.isOpen},isModal:function(){return this.elements.root.className.indexOf(sb.modeless)<0},isMaximized:function(){return this.elements.root.className.indexOf(sb.maximized)>-1},isPinned:function(){return this.elements.root.className.indexOf(sb.unpinned)<0},maximize:function(){return this.isMaximized()||B(this),this},restore:function(){return this.isMaximized()&&C(this),this},pin:function(){return this.isPinned()||z(this),this},unpin:function(){return this.isPinned()&&A(this),this},moveTo:function(a,b){if(!isNaN(a)&&!isNaN(b)){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"}return this},resizeTo:function(a,b){if(!isNaN(a)&&!isNaN(b)&&this.get("resizable")===!0){var c=this.elements.dialog;"none"!==c.style.maxWidth&&(c.style.minWidth=(Db=c.offsetWidth)+"px"),c.style.maxWidth="none",c.style.minHeight=this.elements.header.offsetHeight+this.elements.footer.offsetHeight+"px",c.style.width=a+"px",c.style.height=b+"px"}return this},setting:function(a,b){var c=this,d=w(this,this.__internal.options,function(a,b,d){v(c,a,b,d)},a,b);if("get"===d.op)return d.found?d.value:"undefined"!=typeof this.settings?w(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(a){return"string"==typeof a?this.element.innerHTML=a:this.element.appendChild(a),this},dismissOthers:function(){return q.dismissAll(this),this}})}var i,j,k=[],l={base:"alertify-notifier",message:"ajs-message",top:"ajs-top",right:"ajs-right",bottom:"ajs-bottom",left:"ajs-left",visible:"ajs-visible",hidden:"ajs-hidden"};return{setting:function(b,c){if(a(this),"undefined"==typeof c)return this.__internal[b];switch(b){case"position":this.__internal.position=c,f(this);break;case"delay":this.__internal.delay=c}return this},set:function(a,b){return this.setting(a,b),this},get:function(a){return this.setting(a)},create:function(b,c){a(this);var d=document.createElement("div");return d.className=l.message+("string"==typeof b&&""!==b?" ajs-"+b:""),h(d,c)},dismissAll:function(a){for(var b=k.slice(0),c=0;c= 3.3.0, updating z-index is unnecessary. - */ - updateZIndex: function() { - var zIndexBackdrop = 1040; - var zIndexModal = 1050; - var dialogCount = 0; - $.each(BootstrapDialog.dialogs, function(dialogId, dialogInstance) { - dialogCount++; - }); - var $modal = this.getModal(); - var $backdrop = $modal.data('bs.modal').$backdrop; - $modal.css('z-index', zIndexModal + (dialogCount - 1) * 20); - $backdrop.css('z-index', zIndexBackdrop + (dialogCount - 1) * 20); - - return this; - }, - open: function() { - !this.isRealized() && this.realize(); - this.getModal().modal('show'); - this.updateZIndex(); - this.setOpened(true); - - return this; - } - }; - BootstrapDialog.METHODS_TO_OVERRIDE['v3.2'] = { - handleModalBackdropEvent: BootstrapDialog.METHODS_TO_OVERRIDE['v3.1']['handleModalBackdropEvent'], - updateZIndex: BootstrapDialog.METHODS_TO_OVERRIDE['v3.1']['updateZIndex'], - open: BootstrapDialog.METHODS_TO_OVERRIDE['v3.1']['open'] - }; - BootstrapDialog.METHODS_TO_OVERRIDE['v3.3'] = {}; - BootstrapDialog.prototype = { - constructor: BootstrapDialog, - initOptions: function(options) { - this.options = $.extend(true, this.defaultOptions, options); - - return this; - }, - holdThisInstance: function() { - BootstrapDialog.dialogs[this.getId()] = this; - - return this; - }, - initModalStuff: function() { - this.setModal(this.createModal()) - .setModalDialog(this.createModalDialog()) - .setModalContent(this.createModalContent()) - .setModalHeader(this.createModalHeader()) - .setModalBody(this.createModalBody()) - .setModalFooter(this.createModalFooter()); - - this.getModal().append(this.getModalDialog()); - this.getModalDialog().append(this.getModalContent()); - this.getModalContent() - .append(this.getModalHeader()) - .append(this.getModalBody()) - .append(this.getModalFooter()); - - return this; - }, - createModal: function() { - var $modal = $(''); - $modal.prop('id', this.getId()).attr('aria-labelledby', this.getId() + '_title'); - - return $modal; - }, - getModal: function() { - return this.$modal; - }, - setModal: function($modal) { - this.$modal = $modal; - - return this; - }, - createModalDialog: function() { - return $(''); - }, - getModalDialog: function() { - return this.$modalDialog; - }, - setModalDialog: function($modalDialog) { - this.$modalDialog = $modalDialog; - - return this; - }, - createModalContent: function() { - return $(''); - }, - getModalContent: function() { - return this.$modalContent; - }, - setModalContent: function($modalContent) { - this.$modalContent = $modalContent; - - return this; - }, - createModalHeader: function() { - return $(''); - }, - getModalHeader: function() { - return this.$modalHeader; - }, - setModalHeader: function($modalHeader) { - this.$modalHeader = $modalHeader; - - return this; - }, - createModalBody: function() { - return $(''); - }, - getModalBody: function() { - return this.$modalBody; - }, - setModalBody: function($modalBody) { - this.$modalBody = $modalBody; - - return this; - }, - createModalFooter: function() { - return $(''); - }, - getModalFooter: function() { - return this.$modalFooter; - }, - setModalFooter: function($modalFooter) { - this.$modalFooter = $modalFooter; - - return this; - }, - createDynamicContent: function(rawContent) { - var content = null; - if (typeof rawContent === 'function') { - content = rawContent.call(rawContent, this); - } else { - content = rawContent; - } - if (typeof content === 'string') { - content = this.formatStringContent(content); - } - - return content; - }, - formatStringContent: function(content) { - if (this.options.nl2br) { - return content.replace(/\r\n/g, '
').replace(/[\r\n]/g, '
'); - } - - return content; - }, - setData: function(key, value) { - this.options.data[key] = value; - - return this; - }, - getData: function(key) { - return this.options.data[key]; - }, - setId: function(id) { - this.options.id = id; - - return this; - }, - getId: function() { - return this.options.id; - }, - getType: function() { - return this.options.type; - }, - setType: function(type) { - this.options.type = type; - this.updateType(); - - return this; - }, - updateType: function() { - if (this.isRealized()) { - var types = [BootstrapDialog.TYPE_DEFAULT, - BootstrapDialog.TYPE_INFO, - BootstrapDialog.TYPE_PRIMARY, - BootstrapDialog.TYPE_SUCCESS, - BootstrapDialog.TYPE_WARNING, - BootstrapDialog.TYPE_DANGER]; - - this.getModal().removeClass(types.join(' ')).addClass(this.getType()); - } - - return this; - }, - getSize: function() { - return this.options.size; - }, - setSize: function(size) { - this.options.size = size; - this.updateSize(); - - return this; - }, - updateSize: function() { - if (this.isRealized()) { - var dialog = this; - - // Dialog size - this.getModal().removeClass(BootstrapDialog.SIZE_NORMAL) - .removeClass(BootstrapDialog.SIZE_SMALL) - .removeClass(BootstrapDialog.SIZE_WIDE) - .removeClass(BootstrapDialog.SIZE_LARGE); - this.getModal().addClass(this.getSize()); - - // Smaller dialog. - this.getModalDialog().removeClass('modal-sm'); - if (this.getSize() === BootstrapDialog.SIZE_SMALL) { - this.getModalDialog().addClass('modal-sm'); - } - - // Wider dialog. - this.getModalDialog().removeClass('modal-lg'); - if (this.getSize() === BootstrapDialog.SIZE_WIDE) { - this.getModalDialog().addClass('modal-lg'); - } - - // Button size - $.each(this.options.buttons, function(index, button) { - var $button = dialog.getButton(button.id); - var buttonSizes = ['btn-lg', 'btn-sm', 'btn-xs']; - var sizeClassSpecified = false; - if (typeof button['cssClass'] === 'string') { - var btnClasses = button['cssClass'].split(' '); - $.each(btnClasses, function(index, btnClass) { - if ($.inArray(btnClass, buttonSizes) !== -1) { - sizeClassSpecified = true; - } - }); - } - if (!sizeClassSpecified) { - $button.removeClass(buttonSizes.join(' ')); - $button.addClass(dialog.getButtonSize()); - } - }); - } - - return this; - }, - getCssClass: function() { - return this.options.cssClass; - }, - setCssClass: function(cssClass) { - this.options.cssClass = cssClass; - - return this; - }, - getTitle: function() { - return this.options.title; - }, - setTitle: function(title) { - this.options.title = title; - this.updateTitle(); - - return this; - }, - updateTitle: function() { - if (this.isRealized()) { - var title = this.getTitle() !== null ? this.createDynamicContent(this.getTitle()) : this.getDefaultText(); - this.getModalHeader().find('.' + this.getNamespace('title')).html('').append(title).prop('id', this.getId() + '_title'); - } - - return this; - }, - getMessage: function() { - return this.options.message; - }, - setMessage: function(message) { - this.options.message = message; - this.updateMessage(); - - return this; - }, - updateMessage: function() { - if (this.isRealized()) { - var message = this.createDynamicContent(this.getMessage()); - this.getModalBody().find('.' + this.getNamespace('message')).html('').append(message); - } - - return this; - }, - isClosable: function() { - return this.options.closable; - }, - setClosable: function(closable) { - this.options.closable = closable; - this.updateClosable(); - - return this; - }, - setCloseByBackdrop: function(closeByBackdrop) { - this.options.closeByBackdrop = closeByBackdrop; - - return this; - }, - canCloseByBackdrop: function() { - return this.options.closeByBackdrop; - }, - setCloseByKeyboard: function(closeByKeyboard) { - this.options.closeByKeyboard = closeByKeyboard; - - return this; - }, - canCloseByKeyboard: function() { - return this.options.closeByKeyboard; - }, - isAnimate: function() { - return this.options.animate; - }, - setAnimate: function(animate) { - this.options.animate = animate; - - return this; - }, - updateAnimate: function() { - if (this.isRealized()) { - this.getModal().toggleClass('fade', this.isAnimate()); - } - - return this; - }, - getSpinicon: function() { - return this.options.spinicon; - }, - setSpinicon: function(spinicon) { - this.options.spinicon = spinicon; - - return this; - }, - addButton: function(button) { - this.options.buttons.push(button); - - return this; - }, - addButtons: function(buttons) { - var that = this; - $.each(buttons, function(index, button) { - that.addButton(button); - }); - - return this; - }, - getButtons: function() { - return this.options.buttons; - }, - setButtons: function(buttons) { - this.options.buttons = buttons; - this.updateButtons(); - - return this; - }, - /** - * If there is id provided for a button option, it will be in dialog.indexedButtons list. - * - * In that case you can use dialog.getButton(id) to find the button. - * - * @param {type} id - * @returns {undefined} - */ - getButton: function(id) { - if (typeof this.indexedButtons[id] !== 'undefined') { - return this.indexedButtons[id]; - } - - return null; - }, - getButtonSize: function() { - if (typeof BootstrapDialog.BUTTON_SIZES[this.getSize()] !== 'undefined') { - return BootstrapDialog.BUTTON_SIZES[this.getSize()]; - } - - return ''; - }, - updateButtons: function() { - if (this.isRealized()) { - if (this.getButtons().length === 0) { - this.getModalFooter().hide(); - } else { - this.getModalFooter().find('.' + this.getNamespace('footer')).html('').append(this.createFooterButtons()); - } - } - - return this; - }, - isAutodestroy: function() { - return this.options.autodestroy; - }, - setAutodestroy: function(autodestroy) { - this.options.autodestroy = autodestroy; - }, - getDescription: function() { - return this.options.description; - }, - setDescription: function(description) { - this.options.description = description; - - return this; - }, - getDefaultText: function() { - return BootstrapDialog.DEFAULT_TEXTS[this.getType()]; - }, - getNamespace: function(name) { - return BootstrapDialog.NAMESPACE + '-' + name; - }, - createHeaderContent: function() { - var $container = $('
'); - $container.addClass(this.getNamespace('header')); - - // title - $container.append(this.createTitleContent()); - - // Close button - $container.prepend(this.createCloseButton()); - - return $container; - }, - createTitleContent: function() { - var $title = $('
'); - $title.addClass(this.getNamespace('title')); - - return $title; - }, - createCloseButton: function() { - var $container = $('
'); - $container.addClass(this.getNamespace('close-button')); - var $icon = $(''); - $container.append($icon); - $container.on('click', {dialog: this}, function(event) { - event.data.dialog.close(); - }); - - return $container; - }, - createBodyContent: function() { - var $container = $('
'); - $container.addClass(this.getNamespace('body')); - - // Message - $container.append(this.createMessageContent()); - - return $container; - }, - createMessageContent: function() { - var $message = $('
'); - $message.addClass(this.getNamespace('message')); - - return $message; - }, - createFooterContent: function() { - var $container = $('
'); - $container.addClass(this.getNamespace('footer')); - - return $container; - }, - createFooterButtons: function() { - var that = this; - var $container = $('
'); - $container.addClass(this.getNamespace('footer-buttons')); - this.indexedButtons = {}; - $.each(this.options.buttons, function(index, button) { - if (!button.id) { - button.id = BootstrapDialog.newGuid(); - } - var $button = that.createButton(button); - that.indexedButtons[button.id] = $button; - $container.append($button); - }); - - return $container; - }, - createButton: function(button) { - var $button = $(''); - $button.prop('id', button.id); - - // Icon - if (typeof button.icon !== 'undefined' && $.trim(button.icon) !== '') { - $button.append(this.createButtonIcon(button.icon)); - } - - // Label - if (typeof button.label !== 'undefined') { - $button.append(button.label); - } - - // Css class - if (typeof button.cssClass !== 'undefined' && $.trim(button.cssClass) !== '') { - $button.addClass(button.cssClass); - } else { - $button.addClass('btn-default'); - } - - // Hotkey - if (typeof button.hotkey !== 'undefined') { - this.registeredButtonHotkeys[button.hotkey] = $button; - } - - // Button on click - $button.on('click', {dialog: this, $button: $button, button: button}, function(event) { - var dialog = event.data.dialog; - var $button = event.data.$button; - var button = event.data.button; - if (typeof button.action === 'function') { - button.action.call($button, dialog); - } - - if (button.autospin) { - $button.toggleSpin(true); - } - }); - - // Dynamically add extra functions to $button - this.enhanceButton($button); - - return $button; - }, - /** - * Dynamically add extra functions to $button - * - * Using '$this' to reference 'this' is just for better readability. - * - * @param {type} $button - * @returns {_L13.BootstrapDialog.prototype} - */ - enhanceButton: function($button) { - $button.dialog = this; - - // Enable / Disable - $button.toggleEnable = function(enable) { - var $this = this; - if (typeof enable !== 'undefined') { - $this.prop("disabled", !enable).toggleClass('disabled', !enable); - } else { - $this.prop("disabled", !$this.prop("disabled")); - } - - return $this; - }; - $button.enable = function() { - var $this = this; - $this.toggleEnable(true); - - return $this; - }; - $button.disable = function() { - var $this = this; - $this.toggleEnable(false); - - return $this; - }; - - // Icon spinning, helpful for indicating ajax loading status. - $button.toggleSpin = function(spin) { - var $this = this; - var dialog = $this.dialog; - var $icon = $this.find('.' + dialog.getNamespace('button-icon')); - if (typeof spin === 'undefined') { - spin = !($button.find('.icon-spin').length > 0); - } - if (spin) { - $icon.hide(); - $button.prepend(dialog.createButtonIcon(dialog.getSpinicon()).addClass('icon-spin')); - } else { - $icon.show(); - $button.find('.icon-spin').remove(); - } - - return $this; - }; - $button.spin = function() { - var $this = this; - $this.toggleSpin(true); - - return $this; - }; - $button.stopSpin = function() { - var $this = this; - $this.toggleSpin(false); - - return $this; - }; - - return this; - }, - createButtonIcon: function(icon) { - var $icon = $(''); - $icon.addClass(this.getNamespace('button-icon')).addClass(icon); - - return $icon; - }, - /** - * Invoke this only after the dialog is realized. - * - * @param {type} enable - * @returns {undefined} - */ - enableButtons: function(enable) { - $.each(this.indexedButtons, function(id, $button) { - $button.toggleEnable(enable); - }); - - return this; - }, - /** - * Invoke this only after the dialog is realized. - * - * @returns {undefined} - */ - updateClosable: function() { - if (this.isRealized()) { - // Close button - this.getModalHeader().find('.' + this.getNamespace('close-button')).toggle(this.isClosable()); - } - - return this; - }, - /** - * Set handler for modal event 'show.bs.modal'. - * This is a setter! - */ - onShow: function(onshow) { - this.options.onshow = onshow; - - return this; - }, - /** - * Set handler for modal event 'shown.bs.modal'. - * This is a setter! - */ - onShown: function(onshown) { - this.options.onshown = onshown; - - return this; - }, - /** - * Set handler for modal event 'hide.bs.modal'. - * This is a setter! - */ - onHide: function(onhide) { - this.options.onhide = onhide; - - return this; - }, - /** - * Set handler for modal event 'hidden.bs.modal'. - * This is a setter! - */ - onHidden: function(onhidden) { - this.options.onhidden = onhidden; - - return this; - }, - isRealized: function() { - return this.realized; - }, - setRealized: function(realized) { - this.realized = realized; - - return this; - }, - isOpened: function() { - return this.opened; - }, - setOpened: function(opened) { - this.opened = opened; - - return this; - }, - handleModalEvents: function() { - this.getModal().on('show.bs.modal', {dialog: this}, function(event) { - var dialog = event.data.dialog; - if (dialog.isModalEvent(event) && typeof dialog.options.onshow === 'function') { - return dialog.options.onshow(dialog); - } - }); - this.getModal().on('shown.bs.modal', {dialog: this}, function(event) { - var dialog = event.data.dialog; - dialog.isModalEvent(event) && typeof dialog.options.onshown === 'function' && dialog.options.onshown(dialog); - }); - this.getModal().on('hide.bs.modal', {dialog: this}, function(event) { - var dialog = event.data.dialog; - if (dialog.isModalEvent(event) && typeof dialog.options.onhide === 'function') { - return dialog.options.onhide(dialog); - } - }); - this.getModal().on('hidden.bs.modal', {dialog: this}, function(event) { - var dialog = event.data.dialog; - dialog.isModalEvent(event) && typeof dialog.options.onhidden === 'function' && dialog.options.onhidden(dialog); - dialog.isAutodestroy() && $(this).remove(); - BootstrapDialog.moveFocus(); - }); - - // Backdrop, I did't find a way to change bs3 backdrop option after the dialog is popped up, so here's a new wheel. - this.handleModalBackdropEvent(); - - // ESC key support - this.getModal().on('keyup', {dialog: this}, function(event) { - event.which === 27 && event.data.dialog.isClosable() && event.data.dialog.canCloseByKeyboard() && event.data.dialog.close(); - }); - - // Button hotkey - this.getModal().on('keyup', {dialog: this}, function(event) { - var dialog = event.data.dialog; - if (typeof dialog.registeredButtonHotkeys[event.which] !== 'undefined') { - var $button = $(dialog.registeredButtonHotkeys[event.which]); - !$button.prop('disabled') && $button.focus().trigger('click'); - } - }); - - return this; - }, - handleModalBackdropEvent: function() { - this.getModal().on('click', {dialog: this}, function(event) { - $(event.target).hasClass('modal-backdrop') && event.data.dialog.isClosable() && event.data.dialog.canCloseByBackdrop() && event.data.dialog.close(); - }); - - return this; - }, - isModalEvent: function(event) { - return typeof event.namespace !== 'undefined' && event.namespace === 'bs.modal'; - }, - makeModalDraggable: function() { - if (this.options.draggable) { - this.getModalHeader().addClass(this.getNamespace('draggable')).on('mousedown', {dialog: this}, function(event) { - var dialog = event.data.dialog; - dialog.draggableData.isMouseDown = true; - var dialogOffset = dialog.getModalDialog().offset(); - dialog.draggableData.mouseOffset = { - top: event.clientY - dialogOffset.top, - left: event.clientX - dialogOffset.left - }; - }); - this.getModal().on('mouseup mouseleave', {dialog: this}, function(event) { - event.data.dialog.draggableData.isMouseDown = false; - }); - $('body').on('mousemove', {dialog: this}, function(event) { - var dialog = event.data.dialog; - if (!dialog.draggableData.isMouseDown) { - return; - } - dialog.getModalDialog().offset({ - top: event.clientY - dialog.draggableData.mouseOffset.top, - left: event.clientX - dialog.draggableData.mouseOffset.left - }); - }); - } - - return this; - }, - realize: function() { - this.initModalStuff(); - this.getModal().addClass(BootstrapDialog.NAMESPACE) - .addClass(this.getCssClass()); - this.updateSize(); - if (this.getDescription()) { - this.getModal().attr('aria-describedby', this.getDescription()); - } - this.getModalFooter().append(this.createFooterContent()); - this.getModalHeader().append(this.createHeaderContent()); - this.getModalBody().append(this.createBodyContent()); - this.getModal().data('bs.modal', new BootstrapDialogModal(this.getModal(), { - backdrop: 'static', - keyboard: false, - show: false - })); - this.makeModalDraggable(); - this.handleModalEvents(); - this.setRealized(true); - this.updateButtons(); - this.updateType(); - this.updateTitle(); - this.updateMessage(); - this.updateClosable(); - this.updateAnimate(); - this.updateSize(); - - return this; - }, - open: function() { - !this.isRealized() && this.realize(); - this.getModal().modal('show'); - this.setOpened(true); - - return this; - }, - close: function() { - if (this.isAutodestroy()) { - delete BootstrapDialog.dialogs[this.getId()]; - } - this.getModal().modal('hide'); - this.setOpened(false); - - return this; - } - }; - - // Add compatible methods. - BootstrapDialog.prototype = $.extend(BootstrapDialog.prototype, BootstrapDialog.METHODS_TO_OVERRIDE[BootstrapDialogModal.getModalVersion()]); - - /** - * RFC4122 version 4 compliant unique id creator. - * - * Added by https://github.com/tufanbarisyildirim/ - * - * @returns {String} - */ - BootstrapDialog.newGuid = function() { - return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { - var r = Math.random() * 16 | 0, v = c === 'x' ? r : (r & 0x3 | 0x8); - return v.toString(16); - }); - }; - - /* ================================================ - * For lazy people - * ================================================ */ - - /** - * Shortcut function: show - * - * @param {type} options - * @returns the created dialog instance - */ - BootstrapDialog.show = function(options) { - return new BootstrapDialog(options).open(); - }; - - /** - * Alert window - * - * @returns the created dialog instance - */ - BootstrapDialog.alert = function() { - var options = {}; - var defaultOptions = { - type: BootstrapDialog.TYPE_PRIMARY, - title: null, - message: null, - closable: true, - buttonLabel: BootstrapDialog.DEFAULT_TEXTS.OK, - callback: null - }; - - if (typeof arguments[0] === 'object' && arguments[0].constructor === {}.constructor) { - options = $.extend(true, defaultOptions, arguments[0]); - } else { - options = $.extend(true, defaultOptions, { - message: arguments[0], - closable: false, - buttonLabel: BootstrapDialog.DEFAULT_TEXTS.OK, - callback: typeof arguments[1] !== 'undefined' ? arguments[1] : null - }); - } - - return new BootstrapDialog({ - type: options.type, - title: options.title, - message: options.message, - closable: options.closable, - data: { - callback: options.callback - }, - onhide: function(dialog) { - !dialog.getData('btnClicked') && dialog.isClosable() && typeof dialog.getData('callback') === 'function' && dialog.getData('callback')(false); - }, - buttons: [{ - label: options.buttonLabel, - action: function(dialog) { - dialog.setData('btnClicked', true); - typeof dialog.getData('callback') === 'function' && dialog.getData('callback')(true); - dialog.close(); - } - }] - }).open(); - }; - - /** - * Confirm window - * - * @param {type} message - * @param {type} callback - * @returns the created dialog instance - */ - BootstrapDialog.confirm = function(message, callback) { - return new BootstrapDialog({ - title: 'Confirmation', - message: message, - closable: false, - data: { - 'callback': callback - }, - buttons: [{ - label: BootstrapDialog.DEFAULT_TEXTS.CANCEL, - action: function(dialog) { - typeof dialog.getData('callback') === 'function' && dialog.getData('callback')(false); - dialog.close(); - } - }, { - label: BootstrapDialog.DEFAULT_TEXTS.OK, - cssClass: 'btn-primary', - action: function(dialog) { - typeof dialog.getData('callback') === 'function' && dialog.getData('callback')(true); - dialog.close(); - } - }] - }).open(); - }; - - /** - * Warning window - * - * @param {type} message - * @returns the created dialog instance - */ - BootstrapDialog.warning = function(message, callback) { - return new BootstrapDialog({ - type: BootstrapDialog.TYPE_WARNING, - message: message - }).open(); - }; - - /** - * Danger window - * - * @param {type} message - * @returns the created dialog instance - */ - BootstrapDialog.danger = function(message, callback) { - return new BootstrapDialog({ - type: BootstrapDialog.TYPE_DANGER, - message: message - }).open(); - }; - - /** - * Success window - * - * @param {type} message - * @returns the created dialog instance - */ - BootstrapDialog.success = function(message, callback) { - return new BootstrapDialog({ - type: BootstrapDialog.TYPE_SUCCESS, - message: message - }).open(); - }; - - return BootstrapDialog; - -})); diff --git a/web/pgadmin/static/js/vendor/bootstrap-dialog.min.js b/web/pgadmin/static/js/vendor/bootstrap-dialog.min.js deleted file mode 100755 index 40628ce5d..000000000 --- a/web/pgadmin/static/js/vendor/bootstrap-dialog.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(a,b){if(typeof module!=="undefined"&&module.exports){module.exports=b(require("jquery")(a))}else{if(typeof define==="function"&&define.amd){define("bootstrap-dialog",["jquery"],function(c){return b(c)})}else{a.BootstrapDialog=b(a.jQuery)}}}(this,function(d){var b=d.fn.modal.Constructor;var c=function(f,e){b.call(this,f,e)};c.getModalVersion=function(){var e=null;if(typeof d.fn.modal.Constructor.VERSION==="undefined"){e="v3.1"}else{if(/3\.2\.\d+/.test(d.fn.modal.Constructor.VERSION)){e="v3.2"}else{e="v3.3"}}return e};c.ORIGINAL_BODY_PADDING=d("body").css("padding-right")||0;c.METHODS_TO_OVERRIDE={};c.METHODS_TO_OVERRIDE["v3.1"]={};c.METHODS_TO_OVERRIDE["v3.2"]={hide:function(g){if(g){g.preventDefault()}g=d.Event("hide.bs.modal");this.$element.trigger(g);if(!this.isShown||g.isDefaultPrevented()){return}this.isShown=false;var f=this.getGlobalOpenedDialogs();if(f.length===0){this.$body.removeClass("modal-open")}this.resetScrollbar();this.escape();d(document).off("focusin.bs.modal");this.$element.removeClass("in").attr("aria-hidden",true).off("click.dismiss.bs.modal");d.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",d.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal()}};c.METHODS_TO_OVERRIDE["v3.3"]={setScrollbar:function(){var e=c.ORIGINAL_BODY_PADDING;if(this.bodyIsOverflowing){this.$body.css("padding-right",e+this.scrollbarWidth)}},resetScrollbar:function(){var e=this.getGlobalOpenedDialogs();if(e.length===0){this.$body.css("padding-right",c.ORIGINAL_BODY_PADDING)}},hideModal:function(){this.$element.hide();this.backdrop(d.proxy(function(){var e=this.getGlobalOpenedDialogs();if(e.length===0){this.$body.removeClass("modal-open")}this.resetAdjustments();this.resetScrollbar();this.$element.trigger("hidden.bs.modal")},this))}};c.prototype={constructor:c,getGlobalOpenedDialogs:function(){var e=[];d.each(a.dialogs,function(g,f){if(f.isRealized()&&f.isOpened()){e.push(f)}});return e}};c.prototype=d.extend(c.prototype,b.prototype,c.METHODS_TO_OVERRIDE[c.getModalVersion()]);var a=function(e){this.defaultOptions=d.extend(true,{id:a.newGuid(),buttons:[],data:{},onshow:null,onshown:null,onhide:null,onhidden:null},a.defaultOptions);this.indexedButtons={};this.registeredButtonHotkeys={};this.draggableData={isMouseDown:false,mouseOffset:{}};this.realized=false;this.opened=false;this.initOptions(e);this.holdThisInstance()};a.NAMESPACE="bootstrap-dialog";a.TYPE_DEFAULT="type-default";a.TYPE_INFO="type-info";a.TYPE_PRIMARY="type-primary";a.TYPE_SUCCESS="type-success";a.TYPE_WARNING="type-warning";a.TYPE_DANGER="type-danger";a.DEFAULT_TEXTS={};a.DEFAULT_TEXTS[a.TYPE_DEFAULT]="Information";a.DEFAULT_TEXTS[a.TYPE_INFO]="Information";a.DEFAULT_TEXTS[a.TYPE_PRIMARY]="Information";a.DEFAULT_TEXTS[a.TYPE_SUCCESS]="Success";a.DEFAULT_TEXTS[a.TYPE_WARNING]="Warning";a.DEFAULT_TEXTS[a.TYPE_DANGER]="Danger";a.DEFAULT_TEXTS.OK="OK";a.DEFAULT_TEXTS.CANCEL="Cancel";a.SIZE_NORMAL="size-normal";a.SIZE_SMALL="size-small";a.SIZE_WIDE="size-wide";a.SIZE_LARGE="size-large";a.BUTTON_SIZES={};a.BUTTON_SIZES[a.SIZE_NORMAL]="";a.BUTTON_SIZES[a.SIZE_SMALL]="";a.BUTTON_SIZES[a.SIZE_WIDE]="";a.BUTTON_SIZES[a.SIZE_LARGE]="btn-lg";a.ICON_SPINNER="glyphicon glyphicon-asterisk";a.defaultOptions={type:a.TYPE_PRIMARY,size:a.SIZE_NORMAL,cssClass:"",title:null,message:null,nl2br:true,closable:true,closeByBackdrop:true,closeByKeyboard:true,spinicon:a.ICON_SPINNER,autodestroy:true,draggable:false,animate:true,description:""};a.configDefaultOptions=function(e){a.defaultOptions=d.extend(true,a.defaultOptions,e)};a.dialogs={};a.openAll=function(){d.each(a.dialogs,function(f,e){e.open()})};a.closeAll=function(){d.each(a.dialogs,function(f,e){e.close()})};a.moveFocus=function(){var e=null;d.each(a.dialogs,function(g,f){e=f});if(e!==null&&e.isRealized()){e.getModal().focus()}};a.METHODS_TO_OVERRIDE={};a.METHODS_TO_OVERRIDE["v3.1"]={handleModalBackdropEvent:function(){this.getModal().on("click",{dialog:this},function(e){e.target===this&&e.data.dialog.isClosable()&&e.data.dialog.canCloseByBackdrop()&&e.data.dialog.close()});return this},updateZIndex:function(){var g=1040;var h=1050;var i=0;d.each(a.dialogs,function(j,k){i++});var f=this.getModal();var e=f.data("bs.modal").$backdrop;f.css("z-index",h+(i-1)*20);e.css("z-index",g+(i-1)*20);return this},open:function(){!this.isRealized()&&this.realize();this.getModal().modal("show");this.updateZIndex();this.setOpened(true);return this}};a.METHODS_TO_OVERRIDE["v3.2"]={handleModalBackdropEvent:a.METHODS_TO_OVERRIDE["v3.1"]["handleModalBackdropEvent"],updateZIndex:a.METHODS_TO_OVERRIDE["v3.1"]["updateZIndex"],open:a.METHODS_TO_OVERRIDE["v3.1"]["open"]};a.METHODS_TO_OVERRIDE["v3.3"]={};a.prototype={constructor:a,initOptions:function(e){this.options=d.extend(true,this.defaultOptions,e);return this},holdThisInstance:function(){a.dialogs[this.getId()]=this;return this},initModalStuff:function(){this.setModal(this.createModal()).setModalDialog(this.createModalDialog()).setModalContent(this.createModalContent()).setModalHeader(this.createModalHeader()).setModalBody(this.createModalBody()).setModalFooter(this.createModalFooter());this.getModal().append(this.getModalDialog());this.getModalDialog().append(this.getModalContent());this.getModalContent().append(this.getModalHeader()).append(this.getModalBody()).append(this.getModalFooter());return this},createModal:function(){var e=d('');e.prop("id",this.getId()).attr("aria-labelledby",this.getId()+"_title");return e},getModal:function(){return this.$modal},setModal:function(e){this.$modal=e;return this},createModalDialog:function(){return d('')},getModalDialog:function(){return this.$modalDialog},setModalDialog:function(e){this.$modalDialog=e;return this},createModalContent:function(){return d('')},getModalContent:function(){return this.$modalContent},setModalContent:function(e){this.$modalContent=e;return this},createModalHeader:function(){return d('')},getModalHeader:function(){return this.$modalHeader},setModalHeader:function(e){this.$modalHeader=e;return this},createModalBody:function(){return d('')},getModalBody:function(){return this.$modalBody},setModalBody:function(e){this.$modalBody=e;return this},createModalFooter:function(){return d('')},getModalFooter:function(){return this.$modalFooter},setModalFooter:function(e){this.$modalFooter=e;return this},createDynamicContent:function(f){var e=null;if(typeof f==="function"){e=f.call(f,this)}else{e=f}if(typeof e==="string"){e=this.formatStringContent(e)}return e},formatStringContent:function(e){if(this.options.nl2br){return e.replace(/\r\n/g,"
").replace(/[\r\n]/g,"
")}return e},setData:function(e,f){this.options.data[e]=f;return this},getData:function(e){return this.options.data[e]},setId:function(e){this.options.id=e;return this},getId:function(){return this.options.id},getType:function(){return this.options.type},setType:function(e){this.options.type=e;this.updateType();return this},updateType:function(){if(this.isRealized()){var e=[a.TYPE_DEFAULT,a.TYPE_INFO,a.TYPE_PRIMARY,a.TYPE_SUCCESS,a.TYPE_WARNING,a.TYPE_DANGER];this.getModal().removeClass(e.join(" ")).addClass(this.getType())}return this},getSize:function(){return this.options.size},setSize:function(e){this.options.size=e;this.updateSize();return this},updateSize:function(){if(this.isRealized()){var e=this;this.getModal().removeClass(a.SIZE_NORMAL).removeClass(a.SIZE_SMALL).removeClass(a.SIZE_WIDE).removeClass(a.SIZE_LARGE);this.getModal().addClass(this.getSize());this.getModalDialog().removeClass("modal-sm");if(this.getSize()===a.SIZE_SMALL){this.getModalDialog().addClass("modal-sm")}this.getModalDialog().removeClass("modal-lg");if(this.getSize()===a.SIZE_WIDE){this.getModalDialog().addClass("modal-lg")}d.each(this.options.buttons,function(g,i){var k=e.getButton(i.id);var f=["btn-lg","btn-sm","btn-xs"];var j=false;if(typeof i.cssClass==="string"){var h=i.cssClass.split(" ");d.each(h,function(l,m){if(d.inArray(m,f)!==-1){j=true}})}if(!j){k.removeClass(f.join(" "));k.addClass(e.getButtonSize())}})}return this},getCssClass:function(){return this.options.cssClass},setCssClass:function(e){this.options.cssClass=e;return this},getTitle:function(){return this.options.title},setTitle:function(e){this.options.title=e;this.updateTitle();return this},updateTitle:function(){if(this.isRealized()){var e=this.getTitle()!==null?this.createDynamicContent(this.getTitle()):this.getDefaultText();this.getModalHeader().find("."+this.getNamespace("title")).html("").append(e).prop("id",this.getId()+"_title")}return this},getMessage:function(){return this.options.message},setMessage:function(e){this.options.message=e;this.updateMessage();return this},updateMessage:function(){if(this.isRealized()){var e=this.createDynamicContent(this.getMessage());this.getModalBody().find("."+this.getNamespace("message")).html("").append(e)}return this},isClosable:function(){return this.options.closable},setClosable:function(e){this.options.closable=e;this.updateClosable();return this},setCloseByBackdrop:function(e){this.options.closeByBackdrop=e;return this},canCloseByBackdrop:function(){return this.options.closeByBackdrop},setCloseByKeyboard:function(e){this.options.closeByKeyboard=e;return this},canCloseByKeyboard:function(){return this.options.closeByKeyboard},isAnimate:function(){return this.options.animate},setAnimate:function(e){this.options.animate=e;return this},updateAnimate:function(){if(this.isRealized()){this.getModal().toggleClass("fade",this.isAnimate())}return this},getSpinicon:function(){return this.options.spinicon},setSpinicon:function(e){this.options.spinicon=e;return this},addButton:function(e){this.options.buttons.push(e);return this},addButtons:function(f){var e=this;d.each(f,function(g,h){e.addButton(h)});return this},getButtons:function(){return this.options.buttons},setButtons:function(e){this.options.buttons=e;this.updateButtons();return this},getButton:function(e){if(typeof this.indexedButtons[e]!=="undefined"){return this.indexedButtons[e]}return null},getButtonSize:function(){if(typeof a.BUTTON_SIZES[this.getSize()]!=="undefined"){return a.BUTTON_SIZES[this.getSize()]}return""},updateButtons:function(){if(this.isRealized()){if(this.getButtons().length===0){this.getModalFooter().hide()}else{this.getModalFooter().find("."+this.getNamespace("footer")).html("").append(this.createFooterButtons())}}return this},isAutodestroy:function(){return this.options.autodestroy},setAutodestroy:function(e){this.options.autodestroy=e},getDescription:function(){return this.options.description},setDescription:function(e){this.options.description=e;return this},getDefaultText:function(){return a.DEFAULT_TEXTS[this.getType()]},getNamespace:function(e){return a.NAMESPACE+"-"+e},createHeaderContent:function(){var e=d("
");e.addClass(this.getNamespace("header"));e.append(this.createTitleContent());e.prepend(this.createCloseButton());return e},createTitleContent:function(){var e=d("
");e.addClass(this.getNamespace("title"));return e},createCloseButton:function(){var f=d("
");f.addClass(this.getNamespace("close-button"));var e=d('');f.append(e);f.on("click",{dialog:this},function(g){g.data.dialog.close()});return f},createBodyContent:function(){var e=d("
");e.addClass(this.getNamespace("body"));e.append(this.createMessageContent());return e},createMessageContent:function(){var e=d("
");e.addClass(this.getNamespace("message"));return e},createFooterContent:function(){var e=d("
");e.addClass(this.getNamespace("footer"));return e},createFooterButtons:function(){var e=this;var f=d("
");f.addClass(this.getNamespace("footer-buttons"));this.indexedButtons={};d.each(this.options.buttons,function(g,h){if(!h.id){h.id=a.newGuid()}var i=e.createButton(h);e.indexedButtons[h.id]=i;f.append(i)});return f},createButton:function(e){var f=d('');f.prop("id",e.id);if(typeof e.icon!=="undefined"&&d.trim(e.icon)!==""){f.append(this.createButtonIcon(e.icon))}if(typeof e.label!=="undefined"){f.append(e.label)}if(typeof e.cssClass!=="undefined"&&d.trim(e.cssClass)!==""){f.addClass(e.cssClass)}else{f.addClass("btn-default")}if(typeof e.hotkey!=="undefined"){this.registeredButtonHotkeys[e.hotkey]=f}f.on("click",{dialog:this,$button:f,button:e},function(i){var h=i.data.dialog;var j=i.data.$button;var g=i.data.button;if(typeof g.action==="function"){g.action.call(j,h)}if(g.autospin){j.toggleSpin(true)}});this.enhanceButton(f);return f},enhanceButton:function(e){e.dialog=this;e.toggleEnable=function(f){var g=this;if(typeof f!=="undefined"){g.prop("disabled",!f).toggleClass("disabled",!f)}else{g.prop("disabled",!g.prop("disabled"))}return g};e.enable=function(){var f=this;f.toggleEnable(true);return f};e.disable=function(){var f=this;f.toggleEnable(false);return f};e.toggleSpin=function(i){var h=this;var g=h.dialog;var f=h.find("."+g.getNamespace("button-icon"));if(typeof i==="undefined"){i=!(e.find(".icon-spin").length>0)}if(i){f.hide();e.prepend(g.createButtonIcon(g.getSpinicon()).addClass("icon-spin"))}else{f.show();e.find(".icon-spin").remove()}return h};e.spin=function(){var f=this;f.toggleSpin(true);return f};e.stopSpin=function(){var f=this;f.toggleSpin(false);return f};return this},createButtonIcon:function(f){var e=d("");e.addClass(this.getNamespace("button-icon")).addClass(f);return e},enableButtons:function(e){d.each(this.indexedButtons,function(g,f){f.toggleEnable(e)});return this},updateClosable:function(){if(this.isRealized()){this.getModalHeader().find("."+this.getNamespace("close-button")).toggle(this.isClosable())}return this},onShow:function(e){this.options.onshow=e;return this},onShown:function(e){this.options.onshown=e;return this},onHide:function(e){this.options.onhide=e;return this},onHidden:function(e){this.options.onhidden=e;return this},isRealized:function(){return this.realized},setRealized:function(e){this.realized=e;return this},isOpened:function(){return this.opened},setOpened:function(e){this.opened=e;return this},handleModalEvents:function(){this.getModal().on("show.bs.modal",{dialog:this},function(f){var e=f.data.dialog;if(e.isModalEvent(f)&&typeof e.options.onshow==="function"){return e.options.onshow(e)}});this.getModal().on("shown.bs.modal",{dialog:this},function(f){var e=f.data.dialog;e.isModalEvent(f)&&typeof e.options.onshown==="function"&&e.options.onshown(e)});this.getModal().on("hide.bs.modal",{dialog:this},function(f){var e=f.data.dialog;if(e.isModalEvent(f)&&typeof e.options.onhide==="function"){return e.options.onhide(e)}});this.getModal().on("hidden.bs.modal",{dialog:this},function(f){var e=f.data.dialog;e.isModalEvent(f)&&typeof e.options.onhidden==="function"&&e.options.onhidden(e);e.isAutodestroy()&&d(this).remove();a.moveFocus()});this.handleModalBackdropEvent();this.getModal().on("keyup",{dialog:this},function(e){e.which===27&&e.data.dialog.isClosable()&&e.data.dialog.canCloseByKeyboard()&&e.data.dialog.close()});this.getModal().on("keyup",{dialog:this},function(f){var e=f.data.dialog;if(typeof e.registeredButtonHotkeys[f.which]!=="undefined"){var g=d(e.registeredButtonHotkeys[f.which]);!g.prop("disabled")&&g.focus().trigger("click")}});return this},handleModalBackdropEvent:function(){this.getModal().on("click",{dialog:this},function(e){d(e.target).hasClass("modal-backdrop")&&e.data.dialog.isClosable()&&e.data.dialog.canCloseByBackdrop()&&e.data.dialog.close()});return this},isModalEvent:function(e){return typeof e.namespace!=="undefined"&&e.namespace==="bs.modal"},makeModalDraggable:function(){if(this.options.draggable){this.getModalHeader().addClass(this.getNamespace("draggable")).on("mousedown",{dialog:this},function(g){var f=g.data.dialog;f.draggableData.isMouseDown=true;var e=f.getModalDialog().offset();f.draggableData.mouseOffset={top:g.clientY-e.top,left:g.clientX-e.left}});this.getModal().on("mouseup mouseleave",{dialog:this},function(e){e.data.dialog.draggableData.isMouseDown=false});d("body").on("mousemove",{dialog:this},function(f){var e=f.data.dialog;if(!e.draggableData.isMouseDown){return}e.getModalDialog().offset({top:f.clientY-e.draggableData.mouseOffset.top,left:f.clientX-e.draggableData.mouseOffset.left})})}return this},realize:function(){this.initModalStuff();this.getModal().addClass(a.NAMESPACE).addClass(this.getCssClass());this.updateSize();if(this.getDescription()){this.getModal().attr("aria-describedby",this.getDescription())}this.getModalFooter().append(this.createFooterContent());this.getModalHeader().append(this.createHeaderContent());this.getModalBody().append(this.createBodyContent());this.getModal().data("bs.modal",new c(this.getModal(),{backdrop:"static",keyboard:false,show:false}));this.makeModalDraggable();this.handleModalEvents();this.setRealized(true);this.updateButtons();this.updateType();this.updateTitle();this.updateMessage();this.updateClosable();this.updateAnimate();this.updateSize();return this},open:function(){!this.isRealized()&&this.realize();this.getModal().modal("show");this.setOpened(true);return this},close:function(){if(this.isAutodestroy()){delete a.dialogs[this.getId()]}this.getModal().modal("hide");this.setOpened(false);return this}};a.prototype=d.extend(a.prototype,a.METHODS_TO_OVERRIDE[c.getModalVersion()]);a.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(g){var f=Math.random()*16|0,e=g==="x"?f:(f&3|8);return e.toString(16)})};a.show=function(e){return new a(e).open()};a.alert=function(){var f={};var e={type:a.TYPE_PRIMARY,title:null,message:null,closable:true,buttonLabel:a.DEFAULT_TEXTS.OK,callback:null};if(typeof arguments[0]==="object"&&arguments[0].constructor==={}.constructor){f=d.extend(true,e,arguments[0])}else{f=d.extend(true,e,{message:arguments[0],closable:false,buttonLabel:a.DEFAULT_TEXTS.OK,callback:typeof arguments[1]!=="undefined"?arguments[1]:null})}return new a({type:f.type,title:f.title,message:f.message,closable:f.closable,data:{callback:f.callback},onhide:function(g){!g.getData("btnClicked")&&g.isClosable()&&typeof g.getData("callback")==="function"&&g.getData("callback")(false)},buttons:[{label:f.buttonLabel,action:function(g){g.setData("btnClicked",true);typeof g.getData("callback")==="function"&&g.getData("callback")(true);g.close()}}]}).open()};a.confirm=function(e,f){return new a({title:"Confirmation",message:e,closable:false,data:{callback:f},buttons:[{label:a.DEFAULT_TEXTS.CANCEL,action:function(g){typeof g.getData("callback")==="function"&&g.getData("callback")(false);g.close()}},{label:a.DEFAULT_TEXTS.OK,cssClass:"btn-primary",action:function(g){typeof g.getData("callback")==="function"&&g.getData("callback")(true);g.close()}}]}).open()};a.warning=function(e,f){return new a({type:a.TYPE_WARNING,message:e}).open()};a.danger=function(e,f){return new a({type:a.TYPE_DANGER,message:e}).open()};a.success=function(e,f){return new a({type:a.TYPE_SUCCESS,message:e}).open()};return a})); \ No newline at end of file diff --git a/web/pgadmin/templates/base.html b/web/pgadmin/templates/base.html index ccce9b98d..319c7e861 100755 --- a/web/pgadmin/templates/base.html +++ b/web/pgadmin/templates/base.html @@ -15,7 +15,8 @@ - + +