Merge branch 'master' of ssh://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin
This commit is contained in:
@@ -2135,19 +2135,20 @@ $(document).ready(function() {
|
|||||||
*/
|
*/
|
||||||
// Remove the actions from the table cells (they are available by default for JavaScript-disabled browsers)
|
// Remove the actions from the table cells (they are available by default for JavaScript-disabled browsers)
|
||||||
// if the table is not a view or information_schema (otherwise there is only one action to hide and there's no point)
|
// if the table is not a view or information_schema (otherwise there is only one action to hide and there's no point)
|
||||||
if($("input[type='hidden'][name='table_type']").attr("value") == "table") {
|
if($("input[type='hidden'][name='table_type']").val() == "table") {
|
||||||
$("table[id='tablestructure'] td[class='browse']").remove();
|
var $table = $("table[id='tablestructure']");
|
||||||
$("table[id='tablestructure'] td[class='primary']").remove();
|
$table.find("td[class='browse']").remove();
|
||||||
$("table[id='tablestructure'] td[class='unique']").remove();
|
$table.find("td[class='primary']").remove();
|
||||||
$("table[id='tablestructure'] td[class='index']").remove();
|
$table.find("td[class='unique']").remove();
|
||||||
$("table[id='tablestructure'] td[class='fulltext']").remove();
|
$table.find("td[class='index']").remove();
|
||||||
$("table[id='tablestructure'] th[class='action']").attr("colspan", 3);
|
$table.find("td[class='fulltext']").remove();
|
||||||
|
$table.find("th[class='action']").attr("colspan", 3);
|
||||||
|
|
||||||
// Display the "more" text
|
// Display the "more" text
|
||||||
$("table[id='tablestructure'] td[class='more_opts']").show()
|
$table.find("td[class='more_opts']").show();
|
||||||
|
|
||||||
// Position the dropdown
|
// Position the dropdown
|
||||||
$.each($(".structure_actions_dropdown"), function() {
|
$(".structure_actions_dropdown").each(function() {
|
||||||
// The top offset must be set for IE even if it didn't change
|
// The top offset must be set for IE even if it didn't change
|
||||||
var cell_right_edge_offset = $(this).parent().offset().left + $(this).parent().innerWidth();
|
var cell_right_edge_offset = $(this).parent().offset().left + $(this).parent().innerWidth();
|
||||||
var left_offset = cell_right_edge_offset - $(this).innerWidth();
|
var left_offset = cell_right_edge_offset - $(this).innerWidth();
|
||||||
@@ -2157,18 +2158,27 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
// A hack for IE6 to prevent the after_field select element from being displayed on top of the dropdown by
|
// A hack for IE6 to prevent the after_field select element from being displayed on top of the dropdown by
|
||||||
// positioning an iframe directly on top of it
|
// positioning an iframe directly on top of it
|
||||||
$("iframe[class='IE_hack']").width($("select[name='after_field']").width());
|
var $after_field = $("select[name='after_field']");
|
||||||
$("iframe[class='IE_hack']").height($("select[name='after_field']").height());
|
$("iframe[class='IE_hack']")
|
||||||
$("iframe[class='IE_hack']").offset({ top: $("select[name='after_field']").offset().top, left: $("select[name='after_field']").offset().left });
|
.width($after_field.width())
|
||||||
|
.height($after_field.height())
|
||||||
|
.offset({
|
||||||
|
top: $after_field.offset().top,
|
||||||
|
left: $after_field.offset().left
|
||||||
|
});
|
||||||
|
|
||||||
// When "more" is hovered over, show the hidden actions
|
// When "more" is hovered over, show the hidden actions
|
||||||
$("table[id='tablestructure'] td[class='more_opts']").mouseenter(
|
$table.find("td[class='more_opts']")
|
||||||
function() {
|
.mouseenter(function() {
|
||||||
if($.browser.msie && $.browser.version == "6.0") {
|
if($.browser.msie && $.browser.version == "6.0") {
|
||||||
$("iframe[class='IE_hack']").show();
|
$("iframe[class='IE_hack']")
|
||||||
$("iframe[class='IE_hack']").width($("select[name='after_field']").width()+4);
|
.show()
|
||||||
$("iframe[class='IE_hack']").height($("select[name='after_field']").height()+4);
|
.width($after_field.width()+4)
|
||||||
$("iframe[class='IE_hack']").offset({ top: $("select[name='after_field']").offset().top, left: $("select[name='after_field']").offset().left});
|
.height($after_field.height()+4)
|
||||||
|
.offset({
|
||||||
|
top: $after_field.offset().top,
|
||||||
|
left: $after_field.offset().left
|
||||||
|
});
|
||||||
}
|
}
|
||||||
$(".structure_actions_dropdown").hide(); // Hide all the other ones that may be open
|
$(".structure_actions_dropdown").hide(); // Hide all the other ones that may be open
|
||||||
$(this).children(".structure_actions_dropdown").show();
|
$(this).children(".structure_actions_dropdown").show();
|
||||||
@@ -2176,11 +2186,13 @@ $(document).ready(function() {
|
|||||||
if($.browser.msie) {
|
if($.browser.msie) {
|
||||||
var left_offset_IE = $(this).offset().left + $(this).innerWidth() - $(this).children(".structure_actions_dropdown").innerWidth();
|
var left_offset_IE = $(this).offset().left + $(this).innerWidth() - $(this).children(".structure_actions_dropdown").innerWidth();
|
||||||
var top_offset_IE = $(this).offset().top + $(this).innerHeight();
|
var top_offset_IE = $(this).offset().top + $(this).innerHeight();
|
||||||
$(this).children(".structure_actions_dropdown").offset({ top: top_offset_IE, left: left_offset_IE });
|
$(this).children(".structure_actions_dropdown").offset({
|
||||||
|
top: top_offset_IE,
|
||||||
|
left: left_offset_IE });
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
$(".structure_actions_dropdown").mouseleave(function() {
|
.mouseleave(function() {
|
||||||
$(this).hide();
|
$(this).children(".structure_actions_dropdown").hide();
|
||||||
if($.browser.msie && $.browser.version == "6.0") {
|
if($.browser.msie && $.browser.version == "6.0") {
|
||||||
$("iframe[class='IE_hack']").hide();
|
$("iframe[class='IE_hack']").hide();
|
||||||
}
|
}
|
||||||
|
@@ -1610,6 +1610,10 @@ a.close_enum_editor {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.structure_actions_dropdown a {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
td.more_opts {
|
td.more_opts {
|
||||||
display: none;
|
display: none;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@@ -1551,6 +1551,10 @@ a.close_enum_editor {
|
|||||||
z-index: 100;
|
z-index: 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.structure_actions_dropdown a {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
td.more_opts {
|
td.more_opts {
|
||||||
display: none;
|
display: none;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
Reference in New Issue
Block a user