Fix bug - duplicate ID in some data and text for makegrid.js
This commit is contained in:
parent
11e1ead21c
commit
8eff621a15
@ -1193,15 +1193,15 @@
|
||||
g.tableCreateTime = $('#table_create_time').val();
|
||||
|
||||
// assign column reorder & column sort hint
|
||||
g.reorderHint = $('#col_order_hint').val();
|
||||
g.sortHint = $('#sort_hint').val();
|
||||
g.markHint = $('#col_mark_hint').val();
|
||||
g.colVisibHint = $('#col_visib_hint').val();
|
||||
g.showAllColText = $('#show_all_col_text').val();
|
||||
g.reorderHint = PMA_messages['strColOrderHint'];
|
||||
g.sortHint = PMA_messages['strSortHint'];
|
||||
g.markHint = PMA_messages['strColMarkHint'];
|
||||
g.colVisibHint = PMA_messages['strColVisibHint'];
|
||||
g.showAllColText = PMA_messages['strShowAllCol'];
|
||||
|
||||
// assign cell editing hint
|
||||
g.cellEditHint = $('#cell_edit_hint').val();
|
||||
g.saveCellWarning = $('#save_cell_warning').val();
|
||||
g.cellEditHint = PMA_messages['strCellEditHint'];
|
||||
g.saveCellWarning = PMA_messages['strSaveCellWarning'];
|
||||
|
||||
// initialize cell editing configuration
|
||||
g.saveCellsAtOnce = $('#save_cells_at_once').val();
|
||||
|
||||
@ -227,6 +227,15 @@ $js_messages['strLeavingDesigner'] = __('You haven\'t saved the changes in the l
|
||||
/* Visual query builder (pmd/scripts/move.js) */
|
||||
$js_messages['strAddOption'] = __('Add an option for column ');
|
||||
|
||||
/* For makegrid.js (column reordering, show/hide column, grid editing) */
|
||||
$js_messages['strCellEditHint'] = __('Press escape to cancel editing');
|
||||
$js_messages['strSaveCellWarning'] = __('You have edited some data and they have not been saved. Are you sure you want to leave this page before saving the data?');
|
||||
$js_messages['strColOrderHint'] = __('Drag to reorder');
|
||||
$js_messages['strSortHint'] = __('Click to sort');
|
||||
$js_messages['strColMarkHint'] = __('Click to mark/unmark');
|
||||
$js_messages['strColVisibHint'] = __('Click the drop-down arrow<br />to toggle column\'s visibility');
|
||||
$js_messages['strShowAllCol'] = __('Show all');
|
||||
|
||||
/* password generation */
|
||||
$js_messages['strGeneratePassword'] = __('Generate password');
|
||||
$js_messages['strGenerate'] = __('Generate');
|
||||
@ -241,6 +250,7 @@ $js_messages['strNewerVersion'] = __('A newer version of phpMyAdmin is available
|
||||
$js_messages['strLatestAvailable'] = __(', latest stable version:');
|
||||
$js_messages['strUpToDate'] = __('up to date');
|
||||
|
||||
|
||||
echo "var PMA_messages = new Array();\n";
|
||||
foreach ($js_messages as $name => $js_message) {
|
||||
PMA_printJsValue("PMA_messages['" . $name . "']", $js_message);
|
||||
|
||||
@ -394,45 +394,12 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, $id_for_di
|
||||
<input type="submit" value="<?php echo __('Save edited data'); ?>" />
|
||||
<div class="navigation_separator">|</div>
|
||||
</div>
|
||||
<?php echo '<input id="save_cells_at_once" type="hidden" value="' . $GLOBALS['cfg']['SaveCellsAtOnce'] . '" />'; ?>
|
||||
<?php echo '<input id="cell_edit_hint" type="hidden" value="' . __('Press escape to cancel editing') . '" />'; ?>
|
||||
<?php echo '<input id="save_cell_warning" type="hidden" value="' . __('You have edited some data and they have not been saved. Are you sure you want to leave this page before saving the data?') . '" />'; ?>
|
||||
<?php
|
||||
// data usually get from window.parent, which don't exist when we open only right frame in new window/tab
|
||||
// P.S. not sure to put these in here, but can't find other better place to put
|
||||
echo '<div class="common_hidden_inputs">';
|
||||
echo PMA_generate_common_hidden_inputs($db, $table);
|
||||
echo '</div>';
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<div class="restore_column hide">
|
||||
<input type="submit" value="<?php echo __('Restore column order'); ?>" />
|
||||
<div class="navigation_separator">|</div>
|
||||
</div>
|
||||
<?php
|
||||
if (PMA_isSelect()) {
|
||||
// generate the column order, if it is set
|
||||
$pmatable = new PMA_Table($GLOBALS['table'], $GLOBALS['db']);
|
||||
$col_order = $pmatable->getUiProp(PMA_Table::PROP_COLUMN_ORDER);
|
||||
if ($col_order) {
|
||||
echo '<input id="col_order" type="hidden" value="' . implode(',', $col_order) . '" />';
|
||||
}
|
||||
$col_visib = $pmatable->getUiProp(PMA_Table::PROP_COLUMN_VISIB);
|
||||
if ($col_visib) {
|
||||
echo '<input id="col_visib" type="hidden" value="' . implode(',', $col_visib) . '" />';
|
||||
}
|
||||
// generate table create time
|
||||
echo '<input id="table_create_time" type="hidden" value="' .
|
||||
PMA_Table::sGetStatusInfo($GLOBALS['db'], $GLOBALS['table'], 'Create_time') . '" />';
|
||||
}
|
||||
// generate hints
|
||||
echo '<input id="col_order_hint" type="hidden" value="' . __('Drag to reorder') . '" />';
|
||||
echo '<input id="sort_hint" type="hidden" value="' . __('Click to sort') . '" />';
|
||||
echo '<input id="col_mark_hint" type="hidden" value="' . __('Click to mark/unmark') . '" />';
|
||||
echo '<input id="col_visib_hint" type="hidden" value="' . __('Click the drop-down arrow<br />to toggle column\'s visibility') . '" />';
|
||||
echo '<input id="show_all_col_text" type="hidden" value="' . __('Show all') . '" />';
|
||||
?>
|
||||
</td>
|
||||
|
||||
<?php // if displaying a VIEW, $unlim_num_rows could be zero because
|
||||
@ -583,6 +550,29 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
|
||||
}
|
||||
|
||||
|
||||
// Output data needed for grid editing
|
||||
echo '<input id="save_cells_at_once" type="hidden" value="' . $GLOBALS['cfg']['SaveCellsAtOnce'] . '" />';
|
||||
echo '<div class="common_hidden_inputs">';
|
||||
echo PMA_generate_common_hidden_inputs($db, $table);
|
||||
echo '</div>';
|
||||
// Output data needed for column reordering and show/hide column
|
||||
if (PMA_isSelect()) {
|
||||
// generate the column order, if it is set
|
||||
$pmatable = new PMA_Table($GLOBALS['table'], $GLOBALS['db']);
|
||||
$col_order = $pmatable->getUiProp(PMA_Table::PROP_COLUMN_ORDER);
|
||||
if ($col_order) {
|
||||
echo '<input id="col_order" type="hidden" value="' . implode(',', $col_order) . '" />';
|
||||
}
|
||||
$col_visib = $pmatable->getUiProp(PMA_Table::PROP_COLUMN_VISIB);
|
||||
if ($col_visib) {
|
||||
echo '<input id="col_visib" type="hidden" value="' . implode(',', $col_visib) . '" />';
|
||||
}
|
||||
// generate table create time
|
||||
echo '<input id="table_create_time" type="hidden" value="' .
|
||||
PMA_Table::sGetStatusInfo($GLOBALS['db'], $GLOBALS['table'], 'Create_time') . '" />';
|
||||
}
|
||||
|
||||
|
||||
$vertical_display['emptypre'] = 0;
|
||||
$vertical_display['emptyafter'] = 0;
|
||||
$vertical_display['textbtn'] = '';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user