-
Notifications
You must be signed in to change notification settings - Fork 508
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
17 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "jquery-confirm2", | ||
"version": "1.7.9", | ||
"version": "1.8.0", | ||
"homepage": "https://github.com/craftpip/jquery-confirm", | ||
"authors": [ | ||
"boniface pereira <[email protected]>" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/*! | ||
* jquery-confirm v1.7.9 (http://craftpip.github.io/jquery-confirm/) | ||
* jquery-confirm v1.8.0 (http://craftpip.github.io/jquery-confirm/) | ||
* Author: boniface pereira | ||
* Website: www.craftpip.com | ||
* Contact: [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/*! | ||
* jquery-confirm v1.7.9 (http://craftpip.github.io/jquery-confirm/) | ||
* jquery-confirm v1.8.0 (http://craftpip.github.io/jquery-confirm/) | ||
* Author: boniface pereira | ||
* Website: www.craftpip.com | ||
* Contact: [email protected] | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/*! | ||
* jquery-confirm v1.7.9 (http://craftpip.github.io/jquery-confirm/) | ||
* jquery-confirm v1.8.0 (http://craftpip.github.io/jquery-confirm/) | ||
* Author: Boniface Pereira | ||
* Website: www.craftpip.com | ||
* Contact: [email protected] | ||
|
@@ -73,8 +73,6 @@ var jconfirm, Jconfirm; | |
}, | ||
animations: ['anim-scale', 'anim-top', 'anim-bottom', 'anim-left', 'anim-right', 'anim-zoom', 'anim-opacity', 'anim-none', 'anim-rotate', 'anim-rotatex', 'anim-rotatey', 'anim-scalex', 'anim-scaley'], | ||
_buildHTML: function () { | ||
var that = this; | ||
|
||
/* | ||
* Cleaning animations. | ||
*/ | ||
|
@@ -91,12 +89,13 @@ var jconfirm, Jconfirm; | |
this.CSS = { | ||
'-webkit-transition-duration': this.animationSpeed / 1000 + 's', | ||
'transition-duration': this.animationSpeed / 1000 + 's', | ||
'-webkjit-transition-timing-function': 'cubic-bezier(0.27, 1.12, 0.32, ' + this.animationBounce + ')', | ||
'-webkit-transition-timing-function': 'cubic-bezier(0.27, 1.12, 0.32, ' + this.animationBounce + ')', | ||
'transition-timing-function': 'cubic-bezier(0.27, 1.12, 0.32, ' + this.animationBounce + ')' | ||
}; | ||
|
||
this.$el.find('.jconfirm-bg').css(this.CSS); | ||
this.$b = this.$el.find('.jconfirm-box').css(this.CSS).addClass(this.animation); | ||
this.$body = this.$b; // alias | ||
|
||
/* | ||
* Add rtl class if rtl option has selected | ||
|
@@ -109,14 +108,16 @@ var jconfirm, Jconfirm; | |
*/ | ||
this.setTitle(); | ||
this.contentDiv = this.$el.find('div.content'); | ||
|
||
this.$content = this.contentDiv; // alias | ||
|
||
/* | ||
* Settings up buttons | ||
*/ | ||
this.$btnc = this.$el.find('.buttons'); | ||
if (this.confirmButton && this.confirmButton.trim() !== '') { | ||
this.$confirmButton = $('<button class="btn">' + this.confirmButton + '</button>').appendTo(this.$btnc).addClass(this.confirmButtonClass); | ||
} | ||
|
||
if (this.cancelButton && this.cancelButton.trim() !== '') { | ||
this.$cancelButton = $('<button class="btn">' + this.cancelButton + '</button>').appendTo(this.$btnc).addClass(this.cancelButtonClass); | ||
} | ||
|
@@ -125,7 +126,7 @@ var jconfirm, Jconfirm; | |
this.$btnc.remove(); | ||
} | ||
|
||
if (!this.confirmButton && !this.cancelButton && this.closeIcon == null) { | ||
if (!this.confirmButton && !this.cancelButton && this.closeIcon === null) { | ||
this.$closeButton = this.$b.find('.closeIcon').show(); | ||
} | ||
|
||
|
@@ -298,7 +299,7 @@ var jconfirm, Jconfirm; | |
|
||
var key = e.which; | ||
// Do not react if Enter/Space is pressed on input elements | ||
if (this.$b.find(':input').is(':focus') && /13|32/.test(key)) | ||
if (this.contentDiv.find(':input').is(':focus') && /13|32/.test(key)) | ||
return false; | ||
|
||
if ($.inArray(key, this.cancelKeys) !== -1) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters