Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
2922eaecd2
@ -40,6 +40,8 @@ phpMyAdmin - ChangeLog
|
||||
- bug [display] Added missing icons in original theme
|
||||
- bug #3516761 [edit] Query error after search
|
||||
- bug #3516405 [display] Chart title is getting wrong within chart export
|
||||
- bug #3517021 [interface] Header links except 'More' hide after closing dialog
|
||||
- bug #3516817 [interface] "More" actions in table structure
|
||||
|
||||
3.5.0.0 (2012-04-07)
|
||||
+ rfe #2021981 [interface] Add support for mass prefix change.
|
||||
|
||||
170
js/functions.js
170
js/functions.js
@ -1350,9 +1350,9 @@ function PMA_showNoticeForEnum(selectElement)
|
||||
function PMA_createTableDialog( $div, url , target)
|
||||
{
|
||||
/**
|
||||
* @var button_options Object that stores the options passed to jQueryUI
|
||||
* dialog
|
||||
*/
|
||||
* @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() {
|
||||
@ -1372,8 +1372,8 @@ function PMA_createTableDialog( $div, url , target)
|
||||
|
||||
var $msgbox = PMA_ajaxShowMessage();
|
||||
|
||||
$.get( target , url , function(data) {
|
||||
//in the case of an error, show the error message returned.
|
||||
$.get(target, 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)
|
||||
@ -1385,7 +1385,8 @@ function PMA_createTableDialog( $div, url , target)
|
||||
})// end dialog options
|
||||
//remove the redundant [Back] link in the error message.
|
||||
.find('fieldset').remove();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
var size = getWindowSize();
|
||||
var timeout;
|
||||
$div
|
||||
@ -1437,12 +1438,15 @@ function PMA_createTableDialog( $div, url , target)
|
||||
close: function() {
|
||||
$(window).unbind('resize.dialog-resizer');
|
||||
$('#content-hide > *').unwrap();
|
||||
// resize topmenu
|
||||
menuResize();
|
||||
menuResize(); // somehow need to call it twice to work
|
||||
},
|
||||
buttons: button_options
|
||||
}); // end dialog options
|
||||
}
|
||||
PMA_convertFootnotesToTooltips($div);
|
||||
PMA_ajaxRemoveMessage($msgbox);
|
||||
PMA_convertFootnotesToTooltips($div);
|
||||
PMA_ajaxRemoveMessage($msgbox);
|
||||
}); // end $.get()
|
||||
|
||||
}
|
||||
@ -2065,80 +2069,6 @@ $(document).ready(function() {
|
||||
|
||||
}, 'top.frame_content'); //end $(document).ready for 'Create Table'
|
||||
|
||||
/**
|
||||
* jQuery coding for 'Change Table' and 'Add Column'. Used on tbl_structure.php *
|
||||
* Attach Ajax Event handlers for Change Table
|
||||
*/
|
||||
$(document).ready(function() {
|
||||
/**
|
||||
*Ajax action for submitting the "Column Change" and "Add Column" form
|
||||
**/
|
||||
$("#append_fields_form input[name=do_save_data]").live('click', function(event) {
|
||||
event.preventDefault();
|
||||
/**
|
||||
* @var the_form object referring to the export form
|
||||
*/
|
||||
var $form = $("#append_fields_form");
|
||||
|
||||
/*
|
||||
* First validate the form; if there is a problem, avoid submitting it
|
||||
*
|
||||
* checkTableEditForm() needs a pure element and not a jQuery object,
|
||||
* this is why we pass $form[0] as a parameter (the jQuery object
|
||||
* is actually an array of DOM elements)
|
||||
*/
|
||||
if (checkTableEditForm($form[0], $form.find('input[name=orig_num_fields]').val())) {
|
||||
// OK, form passed validation step
|
||||
if ($form.hasClass('ajax')) {
|
||||
PMA_prepareForAjaxRequest($form);
|
||||
//User wants to submit the form
|
||||
$.post($form.attr('action'), $form.serialize()+"&do_save_data=Save", function(data) {
|
||||
if ($("#sqlqueryresults").length != 0) {
|
||||
$("#sqlqueryresults").remove();
|
||||
} else if ($("div.error").length != 0) {
|
||||
$("div.error").remove();
|
||||
}
|
||||
if (data.success == true) {
|
||||
PMA_ajaxShowMessage(data.message);
|
||||
$("<div id='sqlqueryresults'></div>").insertAfter("#floating_menubar");
|
||||
$("#sqlqueryresults").html(data.sql_query);
|
||||
$("#result_query .notice").remove();
|
||||
$("#result_query").prepend((data.message));
|
||||
if ($("#change_column_dialog").length > 0) {
|
||||
$("#change_column_dialog").dialog("close").remove();
|
||||
} else if ($("#add_columns").length > 0) {
|
||||
$("#add_columns").dialog("close").remove();
|
||||
}
|
||||
/*Reload the field form*/
|
||||
$.post($("#fieldsForm").attr('action'), $("#fieldsForm").serialize()+"&ajax_request=true", function(form_data) {
|
||||
$("#fieldsForm").remove();
|
||||
$("#addColumns").remove();
|
||||
var $temp_div = $("<div id='temp_div'><div>").append(form_data);
|
||||
if ($("#sqlqueryresults").length != 0) {
|
||||
$temp_div.find("#fieldsForm").insertAfter("#sqlqueryresults");
|
||||
} else {
|
||||
$temp_div.find("#fieldsForm").insertAfter("div.error");
|
||||
}
|
||||
$temp_div.find("#addColumns").insertBefore("iframe.IE_hack");
|
||||
/*Call the function to display the more options in table*/
|
||||
displayMoreTableOpts();
|
||||
});
|
||||
} else {
|
||||
var $temp_div = $("<div id='temp_div'><div>").append(data);
|
||||
var $error = $temp_div.find(".error code").addClass("error");
|
||||
PMA_ajaxShowMessage($error, false);
|
||||
}
|
||||
}); // end $.post()
|
||||
} else {
|
||||
// non-Ajax submit
|
||||
$form.append('<input type="hidden" name="do_save_data" value="Save" />');
|
||||
$form.submit();
|
||||
}
|
||||
}
|
||||
}); // end change table button "do_save_data"
|
||||
|
||||
}, 'top.frame_content'); //end $(document).ready for 'Change Table'
|
||||
|
||||
/**
|
||||
* jQuery coding for 'Table operations'. Used on tbl_operations.php
|
||||
* Attach Ajax Event handlers for Table operations
|
||||
@ -2666,82 +2596,6 @@ $(document).ready(function() {
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Hides certain table structure actions, replacing them
|
||||
* with the word "More". They are displayed in a dropdown
|
||||
* menu when the user hovers over the word "More."
|
||||
*/
|
||||
$(document).ready(function() {
|
||||
displayMoreTableOpts();
|
||||
});
|
||||
|
||||
function displayMoreTableOpts()
|
||||
{
|
||||
// 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 ($("input[type='hidden'][name='table_type']").val() == "table") {
|
||||
var $table = $("table#tablestructure");
|
||||
$table.find("td.replaced_by_more").remove();
|
||||
$table.find("th.action").attr("colspan", 3);
|
||||
|
||||
// Display the "more" text
|
||||
$table.find("td.more_opts").show();
|
||||
|
||||
// Position the dropdown
|
||||
$("div.structure_actions_dropdown").each(function() {
|
||||
// Optimize DOM querying
|
||||
var $this_dropdown = $(this);
|
||||
// The top offset must be set for IE even if it didn't change
|
||||
var cell_right_edge_offset = $this_dropdown.parent().position().left + $this_dropdown.parent().innerWidth();
|
||||
var left_offset = cell_right_edge_offset - $this_dropdown.innerWidth();
|
||||
var top_offset = $this_dropdown.parent().position().top + $this_dropdown.parent().innerHeight();
|
||||
$this_dropdown.offset({ top: top_offset, left: left_offset });
|
||||
});
|
||||
|
||||
// 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
|
||||
var $after_field = $("select[name='after_field']");
|
||||
$("iframe.IE_hack")
|
||||
.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
|
||||
$table.find("td.more_opts")
|
||||
.mouseenter(function() {
|
||||
if ($.browser.msie && $.browser.version == "6.0") {
|
||||
$("iframe.IE_hack")
|
||||
.show()
|
||||
.width($after_field.width()+4)
|
||||
.height($after_field.height()+4)
|
||||
.offset({
|
||||
top: $after_field.offset().top,
|
||||
left: $after_field.offset().left
|
||||
});
|
||||
}
|
||||
$("div.structure_actions_dropdown").hide(); // Hide all the other ones that may be open
|
||||
$(this).children("div.structure_actions_dropdown").show();
|
||||
// Need to do this again for IE otherwise the offset is wrong
|
||||
if ($.browser.msie) {
|
||||
var left_offset_IE = $(this).offset().left + $(this).innerWidth() - $(this).children("div.structure_actions_dropdown").innerWidth();
|
||||
var top_offset_IE = $(this).offset().top + $(this).innerHeight();
|
||||
$(this).children("div.structure_actions_dropdown").offset({
|
||||
top: top_offset_IE,
|
||||
left: left_offset_IE });
|
||||
}
|
||||
})
|
||||
.mouseleave(function() {
|
||||
$(this).children("div.structure_actions_dropdown").hide();
|
||||
if ($.browser.msie && $.browser.version == "6.0") {
|
||||
$("iframe.IE_hack").hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
$(document).ready(function() {
|
||||
PMA_convertFootnotesToTooltips();
|
||||
});
|
||||
|
||||
@ -495,3 +495,209 @@ function changeColumns(action,url)
|
||||
}); // end $.get()
|
||||
}
|
||||
|
||||
/**
|
||||
* jQuery coding for 'Change Table' and 'Add Column'. Used on tbl_structure.php *
|
||||
* Attach Ajax Event handlers for Change Table
|
||||
*/
|
||||
$(document).ready(function() {
|
||||
/**
|
||||
*Ajax action for submitting the "Column Change" and "Add Column" form
|
||||
**/
|
||||
$("#append_fields_form input[name=do_save_data]").live('click', function(event) {
|
||||
event.preventDefault();
|
||||
/**
|
||||
* @var the_form object referring to the export form
|
||||
*/
|
||||
var $form = $("#append_fields_form");
|
||||
|
||||
/*
|
||||
* First validate the form; if there is a problem, avoid submitting it
|
||||
*
|
||||
* checkTableEditForm() needs a pure element and not a jQuery object,
|
||||
* this is why we pass $form[0] as a parameter (the jQuery object
|
||||
* is actually an array of DOM elements)
|
||||
*/
|
||||
if (checkTableEditForm($form[0], $form.find('input[name=orig_num_fields]').val())) {
|
||||
// OK, form passed validation step
|
||||
if ($form.hasClass('ajax')) {
|
||||
PMA_prepareForAjaxRequest($form);
|
||||
//User wants to submit the form
|
||||
$.post($form.attr('action'), $form.serialize()+"&do_save_data=Save", function(data) {
|
||||
if ($("#sqlqueryresults").length != 0) {
|
||||
$("#sqlqueryresults").remove();
|
||||
} else if ($(".error").length != 0) {
|
||||
$(".error").remove();
|
||||
}
|
||||
if (data.success == true) {
|
||||
PMA_ajaxShowMessage(data.message);
|
||||
$("<div id='sqlqueryresults'></div>").insertAfter("#floating_menubar");
|
||||
$("#sqlqueryresults").html(data.sql_query);
|
||||
$("#result_query .notice").remove();
|
||||
$("#result_query").prepend((data.message));
|
||||
if ($("#change_column_dialog").length > 0) {
|
||||
$("#change_column_dialog").dialog("close").remove();
|
||||
} else if ($("#add_columns").length > 0) {
|
||||
$("#add_columns").dialog("close").remove();
|
||||
}
|
||||
/*Reload the field form*/
|
||||
$.post($("#fieldsForm").attr('action'), $("#fieldsForm").serialize()+"&ajax_request=true", function(form_data) {
|
||||
$("#fieldsForm").remove();
|
||||
$("#addColumns").remove();
|
||||
var $temp_div = $("<div id='temp_div'><div>").append(form_data);
|
||||
if ($("#sqlqueryresults").length != 0) {
|
||||
$temp_div.find("#fieldsForm").insertAfter("#sqlqueryresults");
|
||||
} else {
|
||||
$temp_div.find("#fieldsForm").insertAfter(".error");
|
||||
}
|
||||
$temp_div.find("#addColumns").insertBefore("iframe.IE_hack");
|
||||
/*Call the function to display the more options in table*/
|
||||
$table_clone = false;
|
||||
moreOptsMenuResize();
|
||||
});
|
||||
} else {
|
||||
var $temp_div = $("<div id='temp_div'><div>").append(data);
|
||||
var $error = $temp_div.find(".error code").addClass("error");
|
||||
PMA_ajaxShowMessage($error, false);
|
||||
}
|
||||
}) // end $.post()
|
||||
} else {
|
||||
// non-Ajax submit
|
||||
$form.append('<input type="hidden" name="do_save_data" value="Save" />');
|
||||
$form.submit();
|
||||
}
|
||||
}
|
||||
}) // end change table button "do_save_data"
|
||||
|
||||
}, 'top.frame_content'); //end $(document).ready for 'Change Table'
|
||||
|
||||
/**
|
||||
* Hides certain table structure actions, replacing them
|
||||
* with the word "More". They are displayed in a dropdown
|
||||
* menu when the user hovers over the word "More."
|
||||
*/
|
||||
|
||||
var $table_clone = false;
|
||||
|
||||
function moreOptsMenuResize() {
|
||||
var $table = $("table#tablestructure");
|
||||
|
||||
// don't use More menu if we're only showing icons and no text
|
||||
if ($table.length == 0 || $table.hasClass("PropertiesIconic")) {
|
||||
return;
|
||||
}
|
||||
|
||||
// reset table to defaults
|
||||
if ($table_clone === false) {
|
||||
$table_clone = $table.clone();
|
||||
}
|
||||
else {
|
||||
$table.replaceWith($table_clone);
|
||||
$table = $table_clone;
|
||||
$table_clone = $table.clone();
|
||||
}
|
||||
|
||||
var getCurWidth = function() {
|
||||
var cur_width = 0;
|
||||
$table.find("tr").eq(1)
|
||||
.find("td.edit, td.drop, .replaced_by_more:visible, .more_opts:visible")
|
||||
.each(function () {
|
||||
cur_width += $(this).outerWidth();
|
||||
});
|
||||
return cur_width;
|
||||
};
|
||||
|
||||
// get window width
|
||||
var window_width = $(window).width();
|
||||
// find out maximum action links width
|
||||
var max_width = window_width;
|
||||
$table.find("th").each(function () {
|
||||
if ($(this).index() < 8) {
|
||||
max_width -= $(this).outerWidth() + 1;
|
||||
}
|
||||
});
|
||||
// current action links width
|
||||
var cur_width = getCurWidth();
|
||||
|
||||
// remove some links if current width is wider than maximum allowed
|
||||
if (cur_width > max_width) {
|
||||
while (cur_width > max_width
|
||||
&& $(".replaced_by_more:visible").length > 0) {
|
||||
|
||||
// hide last visible element
|
||||
var css_class = $table.find("tr").eq(1)
|
||||
.find(".replaced_by_more:visible").last().prop("className").split(" ");
|
||||
$table.find("." + css_class.join(".")).hide();
|
||||
// show corresponding more-menu entry
|
||||
$table.find(".replace_in_more.action_" + css_class[0]).show();
|
||||
// recalculate width
|
||||
cur_width = getCurWidth();
|
||||
}
|
||||
}
|
||||
|
||||
if ($(".replaced_by_more:hidden").length == 0) {
|
||||
$table.find("td.more_opts").hide();
|
||||
}
|
||||
else {
|
||||
$table.find("td.more_opts").show();
|
||||
}
|
||||
|
||||
// Position the dropdown
|
||||
$(".structure_actions_dropdown").each(function() {
|
||||
// Optimize DOM querying
|
||||
var $this_dropdown = $(this);
|
||||
// The top offset must be set for IE even if it didn't change
|
||||
var cell_right_edge_offset = $this_dropdown.parent().position().left + $this_dropdown.parent().innerWidth();
|
||||
var left_offset = cell_right_edge_offset - $this_dropdown.innerWidth();
|
||||
var top_offset = $this_dropdown.parent().position().top + $this_dropdown.parent().innerHeight();
|
||||
$this_dropdown.offset({ top: top_offset, left: left_offset });
|
||||
});
|
||||
|
||||
// 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
|
||||
var $after_field = $("select[name='after_field']");
|
||||
$("iframe[class='IE_hack']")
|
||||
.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
|
||||
$table.find("td.more_opts")
|
||||
.unbind("mouseenter")
|
||||
.bind("mouseenter", function() {
|
||||
if($.browser.msie && $.browser.version == "6.0") {
|
||||
$("iframe[class='IE_hack']")
|
||||
.show()
|
||||
.width($after_field.width()+4)
|
||||
.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
|
||||
$(this).children(".structure_actions_dropdown").show();
|
||||
// Need to do this again for IE otherwise the offset is wrong
|
||||
if($.browser.msie) {
|
||||
var left_offset_IE = $(this).offset().left + $(this).innerWidth() - $(this).children(".structure_actions_dropdown").innerWidth();
|
||||
var top_offset_IE = $(this).offset().top + $(this).innerHeight();
|
||||
$(this).children(".structure_actions_dropdown").offset({
|
||||
top: top_offset_IE,
|
||||
left: left_offset_IE });
|
||||
}
|
||||
})
|
||||
.unbind("mouseleave")
|
||||
.bind("mouseleave", function() {
|
||||
$(this).children(".structure_actions_dropdown").hide();
|
||||
if($.browser.msie && $.browser.version == "6.0") {
|
||||
$("iframe[class='IE_hack']").hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
$(window).resize(moreOptsMenuResize);
|
||||
$(function () {
|
||||
$(".replace_in_more").hide();
|
||||
moreOptsMenuResize();
|
||||
});
|
||||
|
||||
@ -3026,6 +3026,22 @@ function PMA_extractFieldSpec($fieldspec)
|
||||
$attribute = 'UNSIGNED ZEROFILL';
|
||||
}
|
||||
|
||||
$can_contain_collation = false;
|
||||
if (
|
||||
! $binary
|
||||
&&
|
||||
preg_match("@^(char|varchar|text|tinytext|mediumtext|longtext|set|enum)@", $type)) {
|
||||
$can_contain_collation = true;
|
||||
}
|
||||
|
||||
// for the case ENUM('–','“')
|
||||
$displayed_type = htmlspecialchars($printtype);
|
||||
if (strlen($printtype) > $GLOBALS['cfg']['LimitChars']) {
|
||||
$displayed_type = '<abbr title="' . $printtype . '">';
|
||||
$displayed_type .= substr($printtype, 0, $GLOBALS['cfg']['LimitChars']);
|
||||
$displayed_type .= '</abbr>';
|
||||
}
|
||||
|
||||
return array(
|
||||
'type' => $type,
|
||||
'spec_in_brackets' => $spec_in_brackets,
|
||||
@ -3035,6 +3051,8 @@ function PMA_extractFieldSpec($fieldspec)
|
||||
'unsigned' => $unsigned,
|
||||
'zerofill' => $zerofill,
|
||||
'attribute' => $attribute,
|
||||
'can_contain_collation' => $can_contain_collation,
|
||||
'displayed_type' => $displayed_type
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -193,7 +193,8 @@ $i = 0;
|
||||
echo '"table" />';
|
||||
} ?>
|
||||
|
||||
<table id="tablestructure" class="data">
|
||||
<table id="tablestructure" class="data<?php
|
||||
if ($GLOBALS['cfg']['PropertiesIconic'] === true) echo ' PropertiesIconic'; ?>">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
@ -207,8 +208,16 @@ $i = 0;
|
||||
<th><?php echo __('Extra'); ?></th>
|
||||
<?php if ($db_is_information_schema || $tbl_is_view) { ?>
|
||||
<th><?php echo __('View'); ?></th>
|
||||
<?php } else { /* see functions.js, displayMoreTableOpts() */?>
|
||||
<th colspan="9" class="action"><?php echo __('Action'); ?></th>
|
||||
<?php } else { /* see tbl_structure.js, function moreOptsMenuResize() */ ?>
|
||||
<th colspan="<?php
|
||||
$colspan = 9;
|
||||
if (PMA_DRIZZLE) {
|
||||
$colspan -= 2;
|
||||
}
|
||||
if ($GLOBALS['cfg']['PropertiesIconic']) {
|
||||
$colspan--;
|
||||
}
|
||||
echo $colspan; ?>" class="action"><?php echo __('Action'); ?></th>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -257,36 +266,10 @@ foreach ($fields as $row) {
|
||||
if (empty($type)) {
|
||||
$type = ' ';
|
||||
}
|
||||
// for the case ENUM('–','“')
|
||||
$type = htmlspecialchars($type);
|
||||
// in case it is too long
|
||||
$start = 0;
|
||||
if (strlen($type) > $GLOBALS['cfg']['LimitChars']) {
|
||||
$start = 13;
|
||||
$type = '<abbr title="' . $type . '">' . substr($type, 0, $GLOBALS['cfg']['LimitChars']) . '</abbr>';
|
||||
}
|
||||
|
||||
unset($field_charset);
|
||||
if ((substr($type, $start, 4) == 'char'
|
||||
|| substr($type, $start, 7) == 'varchar'
|
||||
|| substr($type, $start, 4) == 'text'
|
||||
|| substr($type, $start, 8) == 'tinytext'
|
||||
|| substr($type, $start, 10) == 'mediumtext'
|
||||
|| substr($type, $start, 8) == 'longtext'
|
||||
|| substr($type, $start, 3) == 'set'
|
||||
|| substr($type, $start, 4) == 'enum')
|
||||
&& !$extracted_fieldspec['binary']
|
||||
) {
|
||||
if (strpos($type, ' character set ')) {
|
||||
$type = substr($type, 0, strpos($type, ' character set '));
|
||||
}
|
||||
if (!empty($row['Collation'])) {
|
||||
$field_charset = $row['Collation'];
|
||||
} else {
|
||||
$field_charset = '';
|
||||
}
|
||||
} else {
|
||||
$field_charset = '';
|
||||
$field_charset = '';
|
||||
if ($extracted_fieldspec['can_contain_collation'] && ! empty($row['Collation'])) {
|
||||
$field_charset = $row['Collation'];
|
||||
}
|
||||
|
||||
// Display basic mimetype [MIME]
|
||||
@ -343,7 +326,7 @@ foreach ($fields as $row) {
|
||||
<?php echo $rownum; ?>
|
||||
</td>
|
||||
<th class="nowrap"><label for="checkbox_row_<?php echo $rownum; ?>"><?php echo $displayed_field_name; ?></label></th>
|
||||
<td<?php echo $type_nowrap; ?>><bdo dir="ltr" lang="en"><?php echo $type; echo $type_mime; ?></bdo></td>
|
||||
<td<?php echo $type_nowrap; ?>><bdo dir="ltr" lang="en"><?php echo $extracted_fieldspec['displayed_type']; echo $type_mime; ?></bdo></td>
|
||||
<td><?php echo (empty($field_charset) ? '' : '<dfn title="' . PMA_getCollationDescr($field_charset) . '">' . $field_charset . '</dfn>'); ?></td>
|
||||
<td class="column_attribute nowrap"><?php echo $attribute; ?></td>
|
||||
<td><?php echo (($row['Null'] == 'YES') ? __('Yes') : __('No')); ?></td>
|
||||
@ -359,10 +342,6 @@ foreach ($fields as $row) {
|
||||
echo '<i>' . _pgettext('None for default', 'None') . '</i>';
|
||||
} ?></td>
|
||||
<td class="nowrap"><?php echo strtoupper($row['Extra']); ?></td>
|
||||
<td class="replaced_by_more center">
|
||||
<a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('SELECT COUNT(*) AS ' . PMA_backquote(__('Rows')) . ', ' . PMA_backquote($row['Field']) . ' FROM ' . PMA_backquote($table) . ' GROUP BY ' . PMA_backquote($row['Field']) . ' ORDER BY ' . PMA_backquote($row['Field'])); ?>">
|
||||
<?php echo $titles['BrowseDistinctValues']; ?></a>
|
||||
</td>
|
||||
<?php if (! $tbl_is_view && ! $db_is_information_schema) { ?>
|
||||
<td class="edit center">
|
||||
<a href="tbl_alter.php?<?php echo $url_query; ?>&field=<?php echo $field_encoded; ?>">
|
||||
@ -372,7 +351,12 @@ foreach ($fields as $row) {
|
||||
<a <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? ' class="drop_column_anchor"' : ''); ?> href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' DROP ' . PMA_backquote($row['Field'])); ?>&dropped_column=<?php echo urlencode($row['Field']); ?>&message_to_show=<?php echo urlencode(sprintf(__('Column %s has been dropped'), htmlspecialchars($row['Field']))); ?>" >
|
||||
<?php echo $titles['Drop']; ?></a>
|
||||
</td>
|
||||
<td class="replaced_by_more center">
|
||||
<?php } ?>
|
||||
<td class="replaced_by_more center browse">
|
||||
<a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('SELECT COUNT(*) AS ' . PMA_backquote(__('Rows')) . ', ' . PMA_backquote($row['Field']) . ' FROM ' . PMA_backquote($table) . ' GROUP BY ' . PMA_backquote($row['Field']) . ' ORDER BY ' . PMA_backquote($row['Field'])); ?>"> <?php echo $titles['BrowseDistinctValues']; ?></a>
|
||||
</td>
|
||||
<?php if (! $tbl_is_view && ! $db_is_information_schema) { ?>
|
||||
<td class="center primary replaced_by_more">
|
||||
<?php
|
||||
if ($type == 'text' || $type == 'blob' || 'ARCHIVE' == $tbl_storage_engine || ($primary && $primary->hasColumn($field_name))) {
|
||||
echo $titles['NoPrimary'] . "\n";
|
||||
@ -387,7 +371,7 @@ foreach ($fields as $row) {
|
||||
echo "\n";
|
||||
?>
|
||||
</td>
|
||||
<td class="replaced_by_more center">
|
||||
<td class="unique replaced_by_more center">
|
||||
<?php
|
||||
if ($type == 'text' || $type == 'blob' || 'ARCHIVE' == $tbl_storage_engine || isset($columns_with_unique_index[$field_name])) {
|
||||
echo $titles['NoUnique'] . "\n";
|
||||
@ -402,7 +386,7 @@ foreach ($fields as $row) {
|
||||
echo "\n";
|
||||
?>
|
||||
</td>
|
||||
<td class="replaced_by_more center">
|
||||
<td class="index replaced_by_more center">
|
||||
<?php
|
||||
if ($type == 'text' || $type == 'blob' || 'ARCHIVE' == $tbl_storage_engine) {
|
||||
echo $titles['NoIndex'] . "\n";
|
||||
@ -418,7 +402,10 @@ foreach ($fields as $row) {
|
||||
echo "\n";
|
||||
?>
|
||||
</td>
|
||||
<td class="replaced_by_more center">
|
||||
<?php
|
||||
if (!PMA_DRIZZLE) { ?>
|
||||
<td class="spatial replaced_by_more center">
|
||||
|
||||
<?php
|
||||
$spatial_types = array(
|
||||
'geometry', 'point', 'linestring', 'polygon', 'multipoint',
|
||||
@ -444,7 +431,7 @@ foreach ($fields as $row) {
|
||||
&& (strpos(' ' . $type, 'text') || strpos(' ' . $type, 'char'))) {
|
||||
echo "\n";
|
||||
?>
|
||||
<td class="replaced_by_more center nowrap">
|
||||
<td class="fulltext replaced_by_more center nowrap">
|
||||
<a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD FULLTEXT(' . PMA_backquote($row['Field']) . ')'); ?>&message_to_show=<?php echo urlencode(sprintf(__('An index has been added on %s'), htmlspecialchars($row['Field']))); ?>">
|
||||
<?php echo $titles['IdxFulltext']; ?></a>
|
||||
<?php $fulltext_enabled = true; ?>
|
||||
@ -453,24 +440,25 @@ foreach ($fields as $row) {
|
||||
} else {
|
||||
echo "\n";
|
||||
?>
|
||||
<td class="replaced_by_more center nowrap">
|
||||
<td class="fulltext replaced_by_more center nowrap">
|
||||
<?php echo $titles['NoIdxFulltext'] . "\n"; ?>
|
||||
<?php $fulltext_enabled = false; ?>
|
||||
</td>
|
||||
<?php
|
||||
}
|
||||
} // end if... else...
|
||||
echo "\n";
|
||||
?>
|
||||
if ($GLOBALS['cfg']['PropertiesIconic'] !== true) { ?>
|
||||
<td class="more_opts" id="more_opts<?php echo $rownum; ?>">
|
||||
<?php echo PMA_getImage('more.png', __('Show more actions')); ?> <?php echo __('More'); ?>
|
||||
<div class="structure_actions_dropdown" id="row_<?php echo $rownum; ?>">
|
||||
|
||||
<div class="action_browse">
|
||||
<div class="action_browse replace_in_more">
|
||||
<a href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('SELECT COUNT(*) AS ' . PMA_backquote(__('Rows')) . ', ' . PMA_backquote($row['Field']) . ' FROM ' . PMA_backquote($table) . ' GROUP BY ' . PMA_backquote($row['Field']) . ' ORDER BY ' . PMA_backquote($row['Field'])); ?>&browse_distinct=1">
|
||||
<?php echo $hidden_titles['BrowseDistinctValues']; ?>
|
||||
</a>
|
||||
</div>
|
||||
<div <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? ' class="action_primary"' : ''); ?>>
|
||||
<div class="<?php echo ($GLOBALS['cfg']['AjaxEnable'] ? 'action_primary ' : ''); ?>replace_in_more">
|
||||
<?php
|
||||
if (isset($primary_enabled)) {
|
||||
if ($primary_enabled) { ?>
|
||||
@ -483,7 +471,7 @@ foreach ($fields as $row) {
|
||||
}
|
||||
} ?>
|
||||
</div>
|
||||
<div class="action_unique">
|
||||
<div class="action_unique replace_in_more">
|
||||
<?php
|
||||
if (isset($unique_enabled)) {
|
||||
if ($unique_enabled) { ?>
|
||||
@ -496,7 +484,7 @@ foreach ($fields as $row) {
|
||||
}
|
||||
} ?>
|
||||
</div>
|
||||
<div class="action_index">
|
||||
<div class="action_index replace_in_more">
|
||||
<?php
|
||||
if (isset($index_enabled)) {
|
||||
if ($index_enabled) { ?>
|
||||
@ -510,7 +498,7 @@ foreach ($fields as $row) {
|
||||
} ?>
|
||||
</div>
|
||||
<?php if (!PMA_DRIZZLE) { ?>
|
||||
<div class="action_spatial">
|
||||
<div class="action_spatial replace_in_more">
|
||||
<?php
|
||||
if (isset($spatial_enabled)) {
|
||||
if ($spatial_enabled) { ?>
|
||||
@ -523,7 +511,7 @@ foreach ($fields as $row) {
|
||||
}
|
||||
} ?>
|
||||
</div>
|
||||
<div class="action_fulltext">
|
||||
<div class="action_fulltext replace_in_more">
|
||||
<?php
|
||||
if (isset($fulltext_enabled)) {
|
||||
if ($fulltext_enabled) { ?>
|
||||
@ -540,6 +528,7 @@ foreach ($fields as $row) {
|
||||
</div>
|
||||
</td>
|
||||
<?php
|
||||
} // end if (GLOBALS['cfg']['PropertiesIconic'] !== true)
|
||||
} // end if (! $tbl_is_view && ! $db_is_information_schema)
|
||||
?>
|
||||
</tr>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user