diff --git a/modules/backend/assets/css/october.css b/modules/backend/assets/css/october.css index 71d373066..ef806b653 100644 --- a/modules/backend/assets/css/october.css +++ b/modules/backend/assets/css/october.css @@ -15010,3 +15010,570 @@ div[data-control="balloon-selector"]:not(.control-disabled) ul li:hover { display: block !important; } } +@-webkit-keyframes showSweetAlert { + 0% { + transform: scale(0.7); + -webkit-transform: scale(0.7); + } + 45% { + transform: scale(1.05); + -webkit-transform: scale(1.05); + } + 80% { + transform: scale(0.95); + -webkit-tranform: scale(0.95); + } + 100% { + transform: scale(1); + -webkit-transform: scale(1); + } +} +@keyframes showSweetAlert { + 0% { + transform: scale(0.7); + -webkit-transform: scale(0.7); + } + 45% { + transform: scale(1.05); + -webkit-transform: scale(1.05); + } + 80% { + transform: scale(0.95); + -webkit-tranform: scale(0.95); + } + 100% { + transform: scale(1); + -webkit-transform: scale(1); + } +} +@-webkit-keyframes hideSweetAlert { + 0% { + transform: scale(1); + -webkit-transform: scale(1); + } + 100% { + transform: scale(0.5); + -webkit-transform: scale(0.5); + } +} +@keyframes hideSweetAlert { + 0% { + transform: scale(1); + -webkit-transform: scale(1); + } + 100% { + transform: scale(0.5); + -webkit-transform: scale(0.5); + } +} +.showSweetAlert { + -webkit-animation: showSweetAlert 0.3s; + animation: showSweetAlert 0.3s; +} +.hideSweetAlert { + -webkit-animation: hideSweetAlert 0.2s; + animation: hideSweetAlert 0.2s; +} +@-webkit-keyframes animateSuccessTip { + 0% { + width: 0; + left: 1px; + top: 19px; + } + 54% { + width: 0; + left: 1px; + top: 19px; + } + 70% { + width: 50px; + left: -8px; + top: 37px; + } + 84% { + width: 17px; + left: 21px; + top: 48px; + } + 100% { + width: 25px; + left: 14px; + top: 45px; + } +} +@keyframes animateSuccessTip { + 0% { + width: 0; + left: 1px; + top: 19px; + } + 54% { + width: 0; + left: 1px; + top: 19px; + } + 70% { + width: 50px; + left: -8px; + top: 37px; + } + 84% { + width: 17px; + left: 21px; + top: 48px; + } + 100% { + width: 25px; + left: 14px; + top: 45px; + } +} +@-webkit-keyframes animateSuccessLong { + 0% { + width: 0; + right: 46px; + top: 54px; + } + 65% { + width: 0; + right: 46px; + top: 54px; + } + 84% { + width: 55px; + right: 0px; + top: 35px; + } + 100% { + width: 47px; + right: 8px; + top: 38px; + } +} +@keyframes animateSuccessLong { + 0% { + width: 0; + right: 46px; + top: 54px; + } + 65% { + width: 0; + right: 46px; + top: 54px; + } + 84% { + width: 55px; + right: 0px; + top: 35px; + } + 100% { + width: 47px; + right: 8px; + top: 38px; + } +} +@-webkit-keyframes rotatePlaceholder { + 0% { + transform: rotate(-45deg); + -webkit-transform: rotate(-45deg); + } + 5% { + transform: rotate(-45deg); + -webkit-transform: rotate(-45deg); + } + 12% { + transform: rotate(-405deg); + -webkit-transform: rotate(-405deg); + } + 100% { + transform: rotate(-405deg); + -webkit-transform: rotate(-405deg); + } +} +@keyframes rotatePlaceholder { + 0% { + transform: rotate(-45deg); + -webkit-transform: rotate(-45deg); + } + 5% { + transform: rotate(-45deg); + -webkit-transform: rotate(-45deg); + } + 12% { + transform: rotate(-405deg); + -webkit-transform: rotate(-405deg); + } + 100% { + transform: rotate(-405deg); + -webkit-transform: rotate(-405deg); + } +} +.animateSuccessTip { + -webkit-animation: animateSuccessTip 0.75s; + animation: animateSuccessTip 0.75s; +} +.animateSuccessLong { + -webkit-animation: animateSuccessLong 0.75s; + animation: animateSuccessLong 0.75s; +} +.icon.success.animate::after { + -webkit-animation: rotatePlaceholder 4.25s ease-in; + animation: rotatePlaceholder 4.25s ease-in; +} +@-webkit-keyframes animateErrorIcon { + 0% { + transform: rotateX(100deg); + -webkit-transform: rotateX(100deg); + opacity: 0; + } + 100% { + transform: rotateX(0deg); + -webkit-transform: rotateX(0deg); + opacity: 1; + } +} +@keyframes animateErrorIcon { + 0% { + transform: rotateX(100deg); + -webkit-transform: rotateX(100deg); + opacity: 0; + } + 100% { + transform: rotateX(0deg); + -webkit-transform: rotateX(0deg); + opacity: 1; + } +} +.animateErrorIcon { + -webkit-animation: animateErrorIcon 0.5s; + animation: animateErrorIcon 0.5s; +} +@-webkit-keyframes animateXMark { + 0% { + transform: scale(0.4); + -webkit-transform: scale(0.4); + margin-top: 26px; + opacity: 0; + } + 50% { + transform: scale(0.4); + -webkit-transform: scale(0.4); + margin-top: 26px; + opacity: 0; + } + 80% { + transform: scale(1.15); + -webkit-transform: scale(1.15); + margin-top: -6px; + } + 100% { + transform: scale(1); + -webkit-transform: scale(1); + margin-top: 0; + opacity: 1; + } +} +@keyframes animateXMark { + 0% { + transform: scale(0.4); + -webkit-transform: scale(0.4); + margin-top: 26px; + opacity: 0; + } + 50% { + transform: scale(0.4); + -webkit-transform: scale(0.4); + margin-top: 26px; + opacity: 0; + } + 80% { + transform: scale(1.15); + -webkit-transform: scale(1.15); + margin-top: -6px; + } + 100% { + transform: scale(1); + -webkit-transform: scale(1); + margin-top: 0; + opacity: 1; + } +} +.animateXMark { + -webkit-animation: animateXMark 0.5s; + animation: animateXMark 0.5s; +} +@-webkit-keyframes pulseWarning { + 0% { + border-color: #F8D486; + } + 100% { + border-color: #F8BB86; + } +} +@keyframes pulseWarning { + 0% { + border-color: #F8D486; + } + 100% { + border-color: #F8BB86; + } +} +.pulseWarning { + -webkit-animation: pulseWarning 0.75s infinite alternate; + animation: pulseWarning 0.75s infinite alternate; +} +@-webkit-keyframes pulseWarningIns { + 0% { + background-color: #F8D486; + } + 100% { + background-color: #F8BB86; + } +} +@keyframes pulseWarningIns { + 0% { + background-color: #F8D486; + } + 100% { + background-color: #F8BB86; + } +} +.pulseWarningIns { + -webkit-animation: pulseWarningIns 0.75s infinite alternate; + animation: pulseWarningIns 0.75s infinite alternate; +} +.sweet-overlay { + background-color: rgba(0, 0, 0, 0.4); + position: fixed; + left: 0; + right: 0; + top: 0; + bottom: 0; + display: none; + z-index: 1050; +} +.sweet-alert { + background-color: #ffffff; + width: 478px; + padding: 17px; + border-radius: 5px; + text-align: center; + position: fixed; + left: 50%; + top: 50%; + margin-left: -256px; + margin-top: -200px; + overflow: hidden; + display: none; + z-index: 2000; +} +.sweet-alert h4 { + margin: 30px 0; +} +@media all and (max-width: 767px) { + .sweet-alert { + width: auto; + margin-left: 0; + margin-right: 0; + left: 15px; + right: 15px; + } +} +.sweet-alert .icon { + width: 80px; + height: 80px; + border: 4px solid gray; + border-radius: 50%; + margin: 20px auto; + position: relative; + box-sizing: content-box; +} +.sweet-alert .icon.error { + border-color: #d43f3a; +} +.sweet-alert .icon.error .x-mark { + position: relative; + display: block; +} +.sweet-alert .icon.error .line { + position: absolute; + height: 5px; + width: 47px; + background-color: #d9534f; + display: block; + top: 37px; + border-radius: 2px; +} +.sweet-alert .icon.error .line.left { + -webkit-transform: rotate(45deg); + transform: rotate(45deg); + left: 17px; +} +.sweet-alert .icon.error .line.right { + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); + right: 16px; +} +.sweet-alert .icon.warning { + border-color: #eea236; +} +.sweet-alert .icon.warning .body { + position: absolute; + width: 5px; + height: 47px; + left: 50%; + top: 10px; + border-radius: 2px; + margin-left: -2px; + background-color: #f0ad4e; +} +.sweet-alert .icon.warning .dot { + position: absolute; + width: 7px; + height: 7px; + border-radius: 50%; + margin-left: -3px; + left: 50%; + bottom: 10px; + background-color: #f0ad4e; +} +.sweet-alert .icon.info { + border-color: #46b8da; +} +.sweet-alert .icon.info::before { + content: ""; + position: absolute; + width: 5px; + height: 29px; + left: 50%; + bottom: 17px; + border-radius: 2px; + margin-left: -2px; + background-color: #5bc0de; +} +.sweet-alert .icon.info::after { + content: ""; + position: absolute; + width: 7px; + height: 7px; + border-radius: 50%; + margin-left: -3px; + top: 19px; + background-color: #5bc0de; +} +.sweet-alert .icon.success { + border-color: #4cae4c; +} +.sweet-alert .icon.success::before, +.sweet-alert .icon.success::after { + content: ''; + border-radius: 50%; + position: absolute; + width: 60px; + height: 120px; + background: white; + -webkit-transform: rotate(45deg); + transform: rotate(45deg); +} +.sweet-alert .icon.success::before { + border-radius: 120px 0 0 120px; + top: -7px; + left: -33px; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); + -webkit-transform-origin: 60px 60px; + transform-origin: 60px 60px; +} +.sweet-alert .icon.success::after { + border-radius: 0 120px 120px 0; + top: -11px; + left: 30px; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); + -webkit-transform-origin: 0px 60px; + transform-origin: 0px 60px; +} +.sweet-alert .icon.success .placeholder { + width: 80px; + height: 80px; + border: 4px solid rgba(92, 184, 92, 0.2); + border-radius: 50%; + box-sizing: content-box; + position: absolute; + left: -4px; + top: -4px; + z-index: 2; +} +.sweet-alert .icon.success .fix { + width: 5px; + height: 90px; + background-color: #ffffff; + position: absolute; + left: 28px; + top: 8px; + z-index: 1; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); +} +.sweet-alert .icon.success .line { + height: 5px; + background-color: #5cb85c; + display: block; + border-radius: 2px; + position: absolute; + z-index: 2; +} +.sweet-alert .icon.success .line.tip { + width: 25px; + left: 14px; + top: 46px; + -webkit-transform: rotate(45deg); + transform: rotate(45deg); +} +.sweet-alert .icon.success .line.long { + width: 47px; + right: 8px; + top: 38px; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); +} +.sweet-alert .icon.custom { + background-size: contain; + border-radius: 0; + border: none; + background-position: center center; + background-repeat: no-repeat; +} +.sweet-alert .btn-default:focus { + border-color: #e3e3e3; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(227, 227, 227, 0.6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(227, 227, 227, 0.6); +} +.sweet-alert .btn-success:focus { + border-color: #4cae4c; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(76, 174, 76, 0.6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(76, 174, 76, 0.6); +} +.sweet-alert .btn-info:focus { + border-color: #46b8da; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(70, 184, 218, 0.6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(70, 184, 218, 0.6); +} +.sweet-alert .btn-danger:focus { + border-color: #d43f3a; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(212, 63, 58, 0.6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(212, 63, 58, 0.6); +} +.sweet-alert .btn-warning:focus { + border-color: #eea236; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(238, 162, 54, 0.6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(238, 162, 54, 0.6); +} +.sweet-alert button::-moz-focus-inner { + border: 0; +} diff --git a/modules/backend/assets/js/october.utils.js b/modules/backend/assets/js/october.utils.js index ff16c55f2..2daacf752 100644 --- a/modules/backend/assets/js/october.utils.js +++ b/modules/backend/assets/js/october.utils.js @@ -9,10 +9,9 @@ $(window).on('ajaxErrorMessage', function(event, message){ swal({ - title: '', - text: message, - type: 'error', - confirmButtonClass: 'btn-danger' + title: message, + // type: 'error', + confirmButtonClass: 'btn-default' }) // Prevent the default alert() message @@ -23,9 +22,8 @@ $(window).on('ajaxErrorMessage', function(event, message){ $(window).on('ajaxConfirmMessage', function(event, message){ swal({ - title: '', - text: message, - type: 'warning', + title: message, + // type: 'warning', showCancelButton: true, confirmButtonClass: 'btn-primary' }, function(isConfirm){ diff --git a/modules/backend/assets/less/october.less b/modules/backend/assets/less/october.less index a9b16c33f..c4ed2e01e 100644 --- a/modules/backend/assets/less/october.less +++ b/modules/backend/assets/less/october.less @@ -45,3 +45,6 @@ @import "controls/treeview.less"; @import "controls/callout.less"; @import "controls/sidenav-tree.less"; + +// Vendor +@import "../vendor/sweet-alert/sweet-alert.less"; \ No newline at end of file diff --git a/modules/backend/assets/vendor/sweet-alert/sweet-alert.js b/modules/backend/assets/vendor/sweet-alert/sweet-alert.js index ee598d51f..9ca8e0f97 100644 --- a/modules/backend/assets/vendor/sweet-alert/sweet-alert.js +++ b/modules/backend/assets/vendor/sweet-alert/sweet-alert.js @@ -177,7 +177,7 @@ */ window.sweetAlertInitialize = function() { - var sweetHTML = '

Title

Text

', + var sweetHTML = '

Title

Text

', sweetWrap = document.createElement('div'); sweetWrap.innerHTML = sweetHTML; @@ -449,7 +449,7 @@ function setParameters(params) { var modal = getModal(); - var $title = modal.querySelector('h2'), + var $title = modal.querySelector('h4'), $text = modal.querySelector('p'), $cancelBtn = modal.querySelector('button.cancel'), $confirmBtn = modal.querySelector('button.confirm'); @@ -546,7 +546,7 @@ } // Reset confirm buttons to default class (Ugly fix) - $confirmBtn.className = 'confirm btn btn-lg' + $confirmBtn.className = 'confirm btn' // Set confirm button to selected class addClass($confirmBtn, params.confirmButtonClass); diff --git a/modules/backend/assets/vendor/sweet-alert/sweet-alert.less b/modules/backend/assets/vendor/sweet-alert/sweet-alert.less index ddc429697..166c8247e 100644 --- a/modules/backend/assets/vendor/sweet-alert/sweet-alert.less +++ b/modules/backend/assets/vendor/sweet-alert/sweet-alert.less @@ -37,6 +37,10 @@ display: none; z-index: 2000; + h4 { + margin: 30px 0; + } + @media all and (max-width: @screen-xs-max) { width: auto; margin-left: 0; diff --git a/modules/backend/assets/vendor/sweet-alert/sweet-alert.min.js b/modules/backend/assets/vendor/sweet-alert/sweet-alert.min.js deleted file mode 100644 index 39405488a..000000000 --- a/modules/backend/assets/vendor/sweet-alert/sweet-alert.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(a,b){function c(b){var c=p(),d=c.querySelector("h2"),e=c.querySelector("p"),f=c.querySelector("button.cancel"),g=c.querySelector("button.confirm");if(d.innerHTML=u(b.title).split("\n").join("
"),e.innerHTML=u(b.text||"").split("\n").join("
"),b.text&&w(e),y(c.querySelectorAll(".icon")),b.type){for(var h=!1,i=0;i=0;)c=c.replace(" "+b+" "," ");a.className=c.replace(/^\s+|\s+$/g,"")}},u=function(a){var c=b.createElement("div");return c.appendChild(b.createTextNode(a)),c.innerHTML},v=function(a){a.style.opacity="",a.style.display="block"},w=function(a){if(a&&!a.length)return v(a);for(var b=0;b0?setTimeout(d,b):a.style.display="none"};d()},D=function(c){if(MouseEvent){var d=new MouseEvent("click",{view:a,bubbles:!1,cancelable:!0});c.dispatchEvent(d)}else if(b.createEvent){var e=b.createEvent("MouseEvents");e.initEvent("click",!1,!1),c.dispatchEvent(e)}else b.createEventObject?c.fireEvent("onclick"):"function"==typeof c.onclick&&c.onclick()},E=function(b){"function"==typeof b.stopPropagation?(b.stopPropagation(),b.preventDefault()):a.event&&a.event.hasOwnProperty("cancelBubble")&&(a.event.cancelBubble=!0)};a.sweetAlertInitialize=function(){var a='

Title

Text

',c=b.createElement("div");c.innerHTML=a,b.body.appendChild(c)},a.sweetAlert=a.swal=function(){function h(a){var b=a.keyCode||a.which;if(-1!==[9,13,32,27].indexOf(b)){for(var c=a.target||a.srcElement,d=-1,e=0;e-1,d=r(n,"visible"),e=m.doneFunction&&"true"===n.getAttribute("data-has-done-function");switch(a.type){case"click":if(c&&e&&d)m.doneFunction(!0),m.closeOnConfirm&&f();else if(e&&d){var g=String(m.doneFunction).replace(/\s/g,""),h="function("===g.substring(0,9)&&")"!==g.substring(9,10);h&&m.doneFunction(!1),m.closeOnCancel&&f()}else f()}},s=n.querySelectorAll("button"),t=0;tpageTitle)) ?> | -