Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadhura Jayaratne <madhura.cj@gmail.com>2015-05-08 13:10:47 +0300
committerMadhura Jayaratne <madhura.cj@gmail.com>2015-05-08 13:10:47 +0300
commit470d61abafc0f32293374eeee26696a3c482566c (patch)
tree604d7c64bcaa9f291434dfc7514b77e85cec88da /js/functions.js
parent34c2837894d712ae0148be6aad385d3b3f77995a (diff)
bug #4894 Deleting without confirmation
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
Diffstat (limited to 'js/functions.js')
-rw-r--r--js/functions.js23
1 files changed, 17 insertions, 6 deletions
diff --git a/js/functions.js b/js/functions.js
index a81062617d..45b59a0147 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -3823,13 +3823,10 @@ AJAX.registerOnload('functions.js', function () {
* Enables the text generated by PMA_Util::linkOrButton() to be clickable
*/
$(document).on('click', 'a.formLinkSubmit', function (e) {
-
- if ($(this).attr('href').indexOf('=') != -1) {
- var data = $(this).attr('href').substr($(this).attr('href').indexOf('#') + 1).split('=', 2);
- $(this).parents('form').append('<input type="hidden" name="' + data[0] + '" value="' + data[1] + '"/>');
+ if (! $(this).hasClass('requireConfirm')) {
+ submitFormLink($(this));
+ return false;
}
- $(this).parents('form').submit();
- return false;
});
if ($('#update_recent_tables').length) {
@@ -3866,6 +3863,20 @@ AJAX.registerOnload('functions.js', function () {
}
}); // end of $()
+/**
+ * Submits the form placed in place of a link due to the excessive url length
+ *
+ * @param $link anchor
+ * @returns {Boolean}
+ */
+function submitFormLink($link)
+{
+ if ($link.attr('href').indexOf('=') != -1) {
+ var data = $link.attr('href').substr($link.attr('href').indexOf('#') + 1).split('=', 2);
+ $link.parents('form').append('<input type="hidden" name="' + data[0] + '" value="' + data[1] + '"/>');
+ }
+ $link.parents('form').submit();
+}
/**
* Initializes slider effect.