Permalink
Browse files

Grid editing hint for double-click

  • Loading branch information...
lem9 committed Nov 11, 2012
1 parent 62071f9 commit 8cad8c6b7bedf8a1e1955520dbacf73347827c34
Showing with 13 additions and 2 deletions.
  1. +3 −1 js/makegrid.js
  2. +10 −1 js/messages.php
View
@@ -1720,7 +1720,9 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
$(g.gDiv).append(g.cEdit);
// add hint for grid editing feature when hovering "Edit" link in each table row
- PMA_createqTip($(g.t).find('.edit_row_anchor a'), PMA_messages['strGridEditFeatureHint']);
+ if (PMA_messages['strGridEditFeatureHint'] != undefined) {
+ PMA_createqTip($(g.t).find('.edit_row_anchor a'), PMA_messages['strGridEditFeatureHint']);
+ }
}
};
View
@@ -355,7 +355,16 @@
$js_messages['strColVisibHint'] = __('Click the drop-down arrow<br />to toggle column\'s visibility');
$js_messages['strShowAllCol'] = __('Show all');
$js_messages['strAlertNonUnique'] = __('This table does not contain a unique column. Features related to the grid edit, checkbox, Edit, Copy and Delete links may not work after saving.');
-$js_messages['strGridEditFeatureHint'] = __('You can also edit most columns<br />by clicking directly on their content.');
+
+// this approach does not work when the parameter is changed via user prefs
+switch ($GLOBALS['cfg']['GridEditing']) {
+case 'double-click':
+ $js_messages['strGridEditFeatureHint'] = __('You can also edit most columns<br />by double-clicking directly on their content.');
+ break;
+case 'click':
+ $js_messages['strGridEditFeatureHint'] = __('You can also edit most columns<br />by clicking directly on their content.');
+case 'click':
@roccivic

roccivic Nov 11, 2012

Contributor

This line looks odd....

Maybe you meant

    break;
default:
    break;

?

+}
$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.');

1 comment on commit 8cad8c6

Contributor

lem9 commented on 8cad8c6 Nov 11, 2012

Thanks, I was too fast. Fixed in 342db8b.

Please sign in to comment.