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-06-08 11:04:02 +0300
committerMadhura Jayaratne <madhura.cj@gmail.com>2015-06-08 11:04:02 +0300
commit380cd38ed106b81bf598765637bcc2f206353610 (patch)
tree9214f44a07ccc9deefed2ef1f45ce16b4319bea0 /js/tbl_structure.js
parent2a3fc5f4e1c3e44ee19b54e8d03c66522ca47eb9 (diff)
bug #4946 When hide table structure actions is false, action should be in a row
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
Diffstat (limited to 'js/tbl_structure.js')
-rw-r--r--js/tbl_structure.js29
1 files changed, 22 insertions, 7 deletions
diff --git a/js/tbl_structure.js b/js/tbl_structure.js
index 7f84008d4e..d0ef72efaf 100644
--- a/js/tbl_structure.js
+++ b/js/tbl_structure.js
@@ -61,7 +61,9 @@ function reloadFieldForm() {
$('#move_columns_dialog ul').replaceWith($temp_div.find("#move_columns_dialog ul"));
$("#moveColumns").removeClass("move-active");
/* reinitialise the more options in table */
- $('#fieldsForm ul.table-structure-actions').menuResizer(PMA_tbl_structure_menu_resizer_callback);
+ if ($('#fieldsForm').hasClass('HideStructureActions')) {
+ $('#fieldsForm ul.table-structure-actions').menuResizer(PMA_tbl_structure_menu_resizer_callback);
+ }
});
$('#page_content').show();
}
@@ -331,7 +333,9 @@ AJAX.registerOnload('tbl_structure.js', function () {
buttons: button_options_error
}); // end dialog options
} else {
- $('#fieldsForm ul.table-structure-actions').menuResizer('destroy');
+ if ($('#fieldsForm').hasClass('HideStructureActions')) {
+ $('#fieldsForm ul.table-structure-actions').menuResizer('destroy');
+ }
// sort the fields table
var $fields_table = $("table#tablestructure tbody");
// remove all existing rows and remember them
@@ -357,7 +361,9 @@ AJAX.registerOnload('tbl_structure.js', function () {
}
PMA_ajaxShowMessage(data.message);
$this.dialog('close');
- $('#fieldsForm ul.table-structure-actions').menuResizer(PMA_tbl_structure_menu_resizer_callback);
+ if ($('#fieldsForm').hasClass('HideStructureActions')) {
+ $('#fieldsForm ul.table-structure-actions').menuResizer(PMA_tbl_structure_menu_resizer_callback);
+ }
}
});
};
@@ -431,16 +437,25 @@ AJAX.registerOnload('tbl_structure.js', function () {
AJAX.registerOnload('tbl_structure.js', function () {
if ($('#fieldsForm').hasClass('HideStructureActions')) {
$('#fieldsForm ul.table-structure-actions').menuResizer(PMA_tbl_structure_menu_resizer_callback);
+ } else {
+ $('.table-structure-actions').width(function () {
+ var width = 5;
+ $(this).find('li').each(function () {
+ width += $(this).outerWidth(true);
+ });
+ return width;
+ });
}
});
AJAX.registerTeardown('tbl_structure.js', function () {
- $('#fieldsForm ul.table-structure-actions').menuResizer('destroy');
+ if ($('#fieldsForm').hasClass('HideStructureActions')) {
+ $('#fieldsForm ul.table-structure-actions').menuResizer('destroy');
+ }
});
$(function () {
$(window).resize($.throttle(function () {
- var $list = $('#fieldsForm ul.table-structure-actions');
- if ($list.length) {
- $list.menuResizer('resize');
+ if ($('#fieldsForm').length && $('#fieldsForm').hasClass('HideStructureActions')) {
+ $('#fieldsForm ul.table-structure-actions').menuResizer('resize');
}
}));
});