Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -163,41 +163,6 @@ $(function() { | |
}); // end $.PMA_confirm() | ||
}); //end Drop Primary Key/Index | ||
|
||
/** | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
roccivic
Author
Contributor
|
||
*Ajax event handler for multi column change | ||
**/ | ||
$("#fieldsForm.ajax .mult_submit[value=change]").live('click', function(event){ | ||
event.preventDefault(); | ||
|
||
/*Check whether atleast one row is selected for change*/ | ||
if ($("#tablestructure tbody tr").hasClass("marked")) { | ||
/*Define the action and $url variabls for the post method*/ | ||
var $form = $("#fieldsForm"); | ||
var action = $form.attr('action'); | ||
var url = $form.serialize()+"&ajax_request=true&submit_mult=change"; | ||
/*Calling for the changeColumns fucntion*/ | ||
changeColumns(action,url); | ||
} else { | ||
PMA_ajaxShowMessage(PMA_messages['strNoRowSelected']); | ||
} | ||
}); | ||
|
||
/** | ||
*Ajax event handler for single column change | ||
**/ | ||
$("#fieldsForm.ajax #tablestructure tbody tr td.edit a.ajax").live('click', function(event){ | ||
event.preventDefault(); | ||
/*Define the action and $url variabls for the post method*/ | ||
var action = "tbl_alter.php"; | ||
var url = $(this).attr('href'); | ||
if (url.substring(0, 13) == "tbl_alter.php") { | ||
url = url.substring(14, url.length); | ||
} | ||
url = url + "&ajax_request=true"; | ||
/*Calling for the changeColumns fucntion*/ | ||
changeColumns(action,url); | ||
}); | ||
|
||
/** | ||
*Ajax event handler for index edit | ||
**/ | ||
|
@@ -547,81 +512,6 @@ $(function() { | |
}); | ||
}); // end $() | ||
|
||
/** | ||
* Loads the append_fields_form to the Change dialog allowing users | ||
* to change the columns | ||
* @param string action Variable which parses the name of the | ||
* destination file | ||
* @param string $url Variable which parses the data for the | ||
* post action | ||
*/ | ||
function changeColumns(action,url) | ||
{ | ||
/*Remove the hidden dialogs if there are*/ | ||
if ($('#change_column_dialog').length != 0) { | ||
$('#change_column_dialog').remove(); | ||
} | ||
if ($('#result_query').length != 0) { | ||
$('#result_query').remove(); | ||
} | ||
var $div = $('<div id="change_column_dialog"></div>'); | ||
|
||
/** | ||
* @var button_options Object that stores the options passed to jQueryUI | ||
* dialog | ||
*/ | ||
var button_options = {}; | ||
// in the following function we need to use $(this) | ||
button_options[PMA_messages['strCancel']] = function() { | ||
$(this).dialog('close'); | ||
}; | ||
|
||
var button_options_error = {}; | ||
button_options_error[PMA_messages['strOK']] = function() { | ||
$(this).dialog('close'); | ||
}; | ||
var $msgbox = PMA_ajaxShowMessage(); | ||
|
||
$.get( action , url , function(data) { | ||
//in the case of an error, show the error message returned. | ||
if (data.success != undefined && data.success == false) { | ||
$div | ||
.append(data.error) | ||
.dialog({ | ||
title: PMA_messages['strChangeTbl'], | ||
height: 230, | ||
width: 900, | ||
modal: true, | ||
open: PMA_verifyColumnsProperties, | ||
close: function() { | ||
$(this).remove(); | ||
}, | ||
buttons : button_options_error | ||
}); // end dialog options | ||
} else { | ||
$div | ||
.append(data.message) | ||
.dialog({ | ||
title: PMA_messages['strChangeTbl'], | ||
height: 600, | ||
width: 900, | ||
modal: true, | ||
open: PMA_verifyColumnsProperties, | ||
close: function() { | ||
$(this).remove(); | ||
}, | ||
buttons : button_options | ||
}); // end dialog options | ||
$("#append_fields_form input[name=do_save_data]").addClass("ajax"); | ||
/*changed the z-index of the enum editor to allow the edit*/ | ||
$("#enum_editor").css("z-index", "1100"); | ||
$div = $("#change_column_dialog"); | ||
PMA_showHints($div); | ||
} | ||
PMA_ajaxRemoveMessage($msgbox); | ||
}); // end $.get() | ||
} | ||
|
||
/** | ||
* jQuery coding for 'Change Table' and 'Add Column'. Used on tbl_structure.php * | ||
* Attach Ajax Event handlers for Change Table | ||
|
Rouslan,
what replaced this dropped code?