summaryrefslogtreecommitdiff
path: root/resources/src/jquery/jquery.confirmable.js
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:30:02 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:30:02 -0400
commit1de335ad3f395ca6861085393ba366a9e3fb4a0d (patch)
treef1fdd326034e05177596851be6a7127615d81498 /resources/src/jquery/jquery.confirmable.js
parent9c75fa8ff6d4d38ef552c00fef5969fb154765e8 (diff)
parentf6d65e533c62f6deb21342d4901ece24497b433e (diff)
Merge commit 'f6d65'
# Conflicts: # skins/ArchLinux/ArchLinux.php
Diffstat (limited to 'resources/src/jquery/jquery.confirmable.js')
-rw-r--r--resources/src/jquery/jquery.confirmable.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/resources/src/jquery/jquery.confirmable.js b/resources/src/jquery/jquery.confirmable.js
index 339e65a4..1ecce6ca 100644
--- a/resources/src/jquery/jquery.confirmable.js
+++ b/resources/src/jquery/jquery.confirmable.js
@@ -40,6 +40,8 @@
* @param {string} [options.i18n.confirm] Text to use for the confirmation question.
* @param {string} [options.i18n.yes] Text to use for the 'Yes' button.
* @param {string} [options.i18n.no] Text to use for the 'No' button.
+ * @param {string} [options.i18n.yesTitle] Title text to use for the 'Yes' button.
+ * @param {string} [options.i18n.noTitle] Title text to use for the 'No' button.
*
* @chainable
*/
@@ -108,6 +110,9 @@
if ( options.handler ) {
$buttonYes.on( options.events, options.handler );
}
+ if ( options.i18n.yesTitle ) {
+ $buttonYes.attr( 'title', options.i18n.yesTitle );
+ }
$buttonYes = options.buttonCallback( $buttonYes, 'yes' );
// Clone it without any events and prevent default action to represent the 'No' button.
@@ -120,6 +125,11 @@
$interface.css( 'width', 0 );
e.preventDefault();
} );
+ if ( options.i18n.noTitle ) {
+ $buttonNo.attr( 'title', options.i18n.noTitle );
+ } else {
+ $buttonNo.removeAttr( 'title' );
+ }
$buttonNo = options.buttonCallback( $buttonNo, 'no' );
// Prevent memory leaks
@@ -164,7 +174,9 @@
space: ' ',
confirm: 'Are you sure?',
yes: 'Yes',
- no: 'No'
+ no: 'No',
+ yesTitle: undefined,
+ noTitle: undefined
}
};
}( jQuery ) );