Skip to content

Commit

Permalink
1.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MohammadYounes committed Apr 26, 2024
1 parent 08f79a5 commit 5e15b19
Show file tree
Hide file tree
Showing 42 changed files with 5,266 additions and 143 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module.exports = function (grunt) {
options: {
map: false,
processors: [
require('autoprefixer')({browsers: 'last 2 versions'}),
require('autoprefixer')(),
]
},
build: {
Expand Down
27 changes: 19 additions & 8 deletions build/alertify.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* alertifyjs 1.13.1 http://alertifyjs.com
* alertifyjs 1.14.0 http://alertifyjs.com
* AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications.
* Copyright 2019 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com)
* Copyright 2024 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com)
* Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/
( function ( window ) {
'use strict';
Expand Down Expand Up @@ -157,6 +157,16 @@
element.removeChild(element.lastChild);
}
}

/**
* detects strings, checks for both string and String instances
* this is unlike typeof(x) === 'string' which only accepts primitive strings
*
*/
function isString(thing) {
return Object.prototype.toString.call(thing) === '[object String]';
}

/**
* Extends a given prototype by merging properties from base into sub.
*
Expand Down Expand Up @@ -702,15 +712,15 @@
}
}
}

/**
* 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'){
if(isString(oldValue)){
removeClass(instance.elements.root,classes.prefix + oldValue);
}
addClass(instance.elements.root, classes.prefix + value);
Expand Down Expand Up @@ -2374,7 +2384,7 @@
* @return {undefined}
*/
setHeader:function(content){
if(typeof content === 'string'){
if(isString(content)){
clearContents(this.elements.header);
this.elements.header.innerHTML = content;
}else if (content instanceof window.HTMLElement && this.elements.header.firstChild !== content){
Expand All @@ -2390,7 +2400,7 @@
* @return {undefined}
*/
setContent:function(content){
if(typeof content === 'string'){
if(isString(content)){
clearContents(this.elements.content);
this.elements.content.innerHTML = content;
}else if (content instanceof window.HTMLElement && this.elements.content.firstChild !== content){
Expand Down Expand Up @@ -2595,6 +2605,7 @@
return this;
},
};

} () );
var notifier = (function () {
var reflow,
Expand Down Expand Up @@ -2819,7 +2830,7 @@
*
*/
setContent: function (content) {
if (typeof content === 'string') {
if (isString(content)) {
clearContents(this.element);
this.element.innerHTML = content;
} else if (content instanceof window.HTMLElement && this.element.firstChild !== content) {
Expand Down Expand Up @@ -3553,7 +3564,7 @@
//nothing
},
setMessage: function (message) {
if (typeof message === 'string') {
if (isString(message)) {
clearContents(p);
p.innerHTML = message;
} else if (message instanceof window.HTMLElement && p.firstChild !== message) {
Expand Down
6 changes: 3 additions & 3 deletions build/alertify.min.js

Large diffs are not rendered by default.

Binary file modified build/alertifyjs.zip
Binary file not shown.
10 changes: 5 additions & 5 deletions build/css/alertify.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* alertifyjs 1.13.1 http://alertifyjs.com
* alertifyjs 1.14.0 http://alertifyjs.com
* AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications.
* Copyright 2019 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com)
* Copyright 2024 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com)
* Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/
.alertify .ajs-dimmer {
position: fixed;
Expand All @@ -13,7 +13,7 @@
padding: 0;
margin: 0;
background-color: #252525;
opacity: .5;
opacity: 0.5;
}
.alertify .ajs-modal {
position: fixed;
Expand Down Expand Up @@ -335,8 +335,8 @@
.alertify .ajs-dialog.ajs-shake {
-webkit-animation-name: ajs-shake;
animation-name: ajs-shake;
-webkit-animation-duration: .1s;
animation-duration: .1s;
-webkit-animation-duration: 0.1s;
animation-duration: 0.1s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
Expand Down
6 changes: 3 additions & 3 deletions build/css/alertify.min.css

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions build/css/alertify.rtl.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* alertifyjs 1.13.1 http://alertifyjs.com
* alertifyjs 1.14.0 http://alertifyjs.com
* AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications.
* Copyright 2019 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com)
* Copyright 2024 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com)
* Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/
.alertify .ajs-dimmer {
position: fixed;
Expand All @@ -13,7 +13,7 @@
padding: 0;
margin: 0;
background-color: #252525;
opacity: .5;
opacity: 0.5;
}
.alertify .ajs-modal {
position: fixed;
Expand Down Expand Up @@ -335,8 +335,8 @@
.alertify .ajs-dialog.ajs-shake {
-webkit-animation-name: ajs-shake;
animation-name: ajs-shake;
-webkit-animation-duration: .1s;
animation-duration: .1s;
-webkit-animation-duration: 0.1s;
animation-duration: 0.1s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
Expand Down
6 changes: 3 additions & 3 deletions build/css/alertify.rtl.min.css

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions build/css/themes/bootstrap.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/**
* alertifyjs 1.13.1 http://alertifyjs.com
* alertifyjs 1.14.0 http://alertifyjs.com
* AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications.
* Copyright 2019 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com)
* Copyright 2024 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com)
* Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/
.alertify .ajs-dimmer {
background-color: #000;
opacity: .5;
opacity: 0.5;
}
.alertify .ajs-dialog {
max-width: 600px;
Expand Down
4 changes: 2 additions & 2 deletions build/css/themes/bootstrap.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions build/css/themes/bootstrap.rtl.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/**
* alertifyjs 1.13.1 http://alertifyjs.com
* alertifyjs 1.14.0 http://alertifyjs.com
* AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications.
* Copyright 2019 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com)
* Copyright 2024 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com)
* Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/
.alertify .ajs-dimmer {
background-color: #000;
opacity: .5;
opacity: 0.5;
}
.alertify .ajs-dialog {
max-width: 600px;
Expand Down
4 changes: 2 additions & 2 deletions build/css/themes/bootstrap.rtl.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions build/css/themes/default.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* alertifyjs 1.13.1 http://alertifyjs.com
* alertifyjs 1.14.0 http://alertifyjs.com
* AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications.
* Copyright 2019 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com)
* Copyright 2024 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com)
* Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/
.alertify .ajs-dialog {
background-color: white;
Expand Down
4 changes: 2 additions & 2 deletions build/css/themes/default.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions build/css/themes/default.rtl.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* alertifyjs 1.13.1 http://alertifyjs.com
* alertifyjs 1.14.0 http://alertifyjs.com
* AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications.
* Copyright 2019 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com)
* Copyright 2024 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com)
* Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/
.alertify .ajs-dialog {
background-color: white;
Expand Down
4 changes: 2 additions & 2 deletions build/css/themes/default.rtl.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions build/css/themes/semantic.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* alertifyjs 1.13.1 http://alertifyjs.com
* alertifyjs 1.14.0 http://alertifyjs.com
* AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications.
* Copyright 2019 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com)
* Copyright 2024 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com)
* Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/
.alertify .ajs-dimmer {
background-color: rgba(0, 0, 0, 0.85);
Expand Down Expand Up @@ -33,13 +33,13 @@
.alertify .ajs-body .ajs-content .ajs-input {
width: 100%;
margin: 0;
padding: .65em 1em;
padding: 0.65em 1em;
font-size: 1em;
background-color: #FFF;
border: 1px solid rgba(0, 0, 0, 0.15);
outline: 0;
color: rgba(0, 0, 0, 0.7);
border-radius: .3125em;
border-radius: 0.3125em;
-webkit-transition: background-color 0.3s ease-out, border-color 0.2s ease, -webkit-box-shadow 0.2s ease;
transition: background-color 0.3s ease-out, border-color 0.2s ease, -webkit-box-shadow 0.2s ease;
transition: background-color 0.3s ease-out, box-shadow 0.2s ease, border-color 0.2s ease;
Expand Down
4 changes: 2 additions & 2 deletions build/css/themes/semantic.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions build/css/themes/semantic.rtl.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* alertifyjs 1.13.1 http://alertifyjs.com
* alertifyjs 1.14.0 http://alertifyjs.com
* AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications.
* Copyright 2019 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com)
* Copyright 2024 Mohammad Younes <Mohammad@alertifyjs.com> (http://alertifyjs.com)
* Licensed under GPL 3 <https://opensource.org/licenses/gpl-3.0>*/
.alertify .ajs-dimmer {
background-color: rgba(0, 0, 0, 0.85);
Expand Down Expand Up @@ -33,13 +33,13 @@
.alertify .ajs-body .ajs-content .ajs-input {
width: 100%;
margin: 0;
padding: .65em 1em;
padding: 0.65em 1em;
font-size: 1em;
background-color: #FFF;
border: 1px solid rgba(0, 0, 0, 0.15);
outline: 0;
color: rgba(0, 0, 0, 0.7);
border-radius: .3125em;
border-radius: 0.3125em;
-webkit-transition: background-color 0.3s ease-out, border-color 0.2s ease, -webkit-box-shadow 0.2s ease;
transition: background-color 0.3s ease-out, border-color 0.2s ease, -webkit-box-shadow 0.2s ease;
transition: background-color 0.3s ease-out, box-shadow 0.2s ease, border-color 0.2s ease;
Expand Down
Loading

0 comments on commit 5e15b19

Please sign in to comment.