Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2014-06-01 19:15:49 +02:00
commit f79aa4e4ea
2 changed files with 33 additions and 1 deletions

View File

@ -20,6 +20,7 @@ phpMyAdmin - ChangeLog
- bug #4396 Problem copying constraints (such as Sakila)
- bug #4433 Missing privileges submenu
- bug #4394 Drop db confirmation message when dropping a user
- bug #4415 prompts about leaving the page after updating row data from browse tab
4.2.2.0 (2014-05-20)
- bug #4388 Disable database expansion when enabled throws Error 500 when database name is clicked in navigation tree

View File

@ -249,6 +249,8 @@ function verificationsAfterFieldChange(urlField, multi_edit, theType)
* Unbind all event handlers before tearing down a page
*/
AJAX.registerTeardown('tbl_change.js', function () {
$("a").die('click');
$("form#insertForm :input:not([type=hidden])").unbind('change');
$('span.open_gis_editor').die('click');
$("input[name='gis_data[save]']").die('click');
$('input.checkbox_null').die('click');
@ -257,6 +259,7 @@ AJAX.registerTeardown('tbl_change.js', function () {
$("select[name*='funcs']").die('click');
});
/**
* Ajax handlers for Change Table page
*
@ -267,6 +270,35 @@ AJAX.registerTeardown('tbl_change.js', function () {
AJAX.registerOnload('tbl_change.js', function () {
$.datepicker.initialized = false;
// State of the form
var $unsavedForm = false;
/**
* If user navigates away from the page
* without saving the changes, a prompt
* will be displayed to confirm navigation
*/
$('a').on('click', function(e){
e.preventDefault();
if ($unsavedForm) {
var is_confirmed = confirm(PMA_messages.strConfirmNavigation);
if (! is_confirmed) {
return false;
} else {
unsavedForm = false;
return true;
}
}
});
/**
* If any form elements are changed, set $unsavedForm to true
*/
$("form#insertForm :input:not([type=hidden])").change(function(){
$unsavedForm = true;
});
$('span.open_gis_editor').live('click', function (event) {
event.preventDefault();
@ -315,7 +347,6 @@ AJAX.registerOnload('tbl_change.js', function () {
);
});
/**
* Reset the auto_increment column to 0 when selecting any of the
* insert options in submit_type-dropdown. Only perform the reset