Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
fdb480cf7f
@ -19,6 +19,7 @@ phpMyAdmin - ChangeLog
|
||||
+ rfe #3488185 draggable columns vs copy column name
|
||||
+ Patch #3507001 Contest-4: Textarea for large character columns
|
||||
+ Removed the PHP version of the ENUM editor
|
||||
+ Patch #3507111 Display distinct results, linked to corresponding data rows
|
||||
|
||||
3.5.1.0 (not yet released)
|
||||
- bug #3510784 [edit] Limit clause ignored when sort order is remembered
|
||||
|
||||
@ -719,6 +719,14 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
|
||||
// empty all edit area, then rebuild it based on $td classes
|
||||
$editArea.empty();
|
||||
|
||||
// add show data row link if the data resulted by 'browse distinct values' in table structure
|
||||
if ($td.find('input').hasClass('data_browse_link')) {
|
||||
var showDataRowLink = document.createElement('div');
|
||||
showDataRowLink.className = 'goto_link';
|
||||
$(showDataRowLink).append("<a href='" + $td.find('.data_browse_link').val() + "'>" + g.showDataRowLinkText + "</a>");
|
||||
$editArea.append(showDataRowLink);
|
||||
}
|
||||
|
||||
// add goto link, if this cell contains a link
|
||||
if ($td.find('a').length > 0) {
|
||||
@ -1591,6 +1599,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
|
||||
g.saveCellWarning = PMA_messages['strSaveCellWarning'];
|
||||
g.alertNonUnique = PMA_messages['strAlertNonUnique'];
|
||||
g.gotoLinkText = PMA_messages['strGoToLink'];
|
||||
g.showDataRowLinkText = PMA_messages['strShowDataRowLink'];
|
||||
|
||||
// initialize cell editing configuration
|
||||
g.saveCellsAtOnce = $('#save_cells_at_once').val();
|
||||
|
||||
@ -353,6 +353,7 @@ $js_messages['strGridEditFeatureHint'] = __('You can also edit most columns<br /
|
||||
$js_messages['strGoToLink'] = __('Go to link');
|
||||
$js_messages['strColNameCopyTitle'] = __('Copy column name');
|
||||
$js_messages['strColNameCopyText'] = __('Right-click the column name to copy it to your clipboard.');
|
||||
$js_messages['strShowDataRowLink'] = __('Show data row(s)');
|
||||
|
||||
/* password generation */
|
||||
$js_messages['strGeneratePassword'] = __('Generate password');
|
||||
|
||||
@ -2784,6 +2784,8 @@ function PMA_handle_non_printable_contents($category, $content, $transform_funct
|
||||
function PMA_prepare_row_data($class, $condition_field, $analyzed_sql, $meta, $map, $data, $transform_function, $default_function, $nowrap, $where_comparison, $transform_options, $is_field_truncated )
|
||||
{
|
||||
|
||||
global $db;
|
||||
|
||||
$result = ' class="' . PMA_addClass($class, $condition_field, $meta, $nowrap, $is_field_truncated, $transform_function, $default_function) . '">';
|
||||
|
||||
if (isset($analyzed_sql[0]['select_expr']) && is_array($analyzed_sql[0]['select_expr'])) {
|
||||
@ -2862,6 +2864,26 @@ function PMA_prepare_row_data($class, $condition_field, $analyzed_sql, $meta, $m
|
||||
} else {
|
||||
$result .= ($transform_function != $default_function ? $transform_function($data, $transform_options, $meta) : $transform_function($data, array(), $meta));
|
||||
}
|
||||
|
||||
// create hidden field if results from structure table
|
||||
if (isset($_GET['browse_distinct']) && ($_GET['browse_distinct'] == 1)) {
|
||||
|
||||
$where_comparison = " = '" . $data . "'";
|
||||
|
||||
$_url_params_for_show_data_row = array(
|
||||
'db' => $db,
|
||||
'table' => $meta->orgtable,
|
||||
'pos' => '0',
|
||||
'sql_query' => 'SELECT * FROM '
|
||||
. PMA_backquote($db) . '.' . PMA_backquote($meta->orgtable)
|
||||
. ' WHERE ' . PMA_backquote($meta->orgname)
|
||||
. $where_comparison,
|
||||
);
|
||||
|
||||
$result .= '<input type="hidden" class="data_browse_link" value="' . PMA_generate_common_url($_url_params_for_show_data_row). '" />';
|
||||
|
||||
}
|
||||
|
||||
$result .= '</td>' . "\n";
|
||||
|
||||
return $result;
|
||||
|
||||
@ -466,7 +466,7 @@ foreach ($fields as $row) {
|
||||
<div class="structure_actions_dropdown" id="row_<?php echo $rownum; ?>">
|
||||
|
||||
<div class="action_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'])); ?>">
|
||||
<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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user