mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-23 01:06:31 -06:00
made tooltip consistent across the application (#5351)
Ensure that the tooltips are consistent throughout the entire application. #5293
This commit is contained in:
parent
d147b41d19
commit
94ca48674a
@ -20,6 +20,7 @@ New features
|
||||
Housekeeping
|
||||
************
|
||||
|
||||
| `Issue #5293 <https://github.com/pgadmin-org/pgadmin4/issues/5293>`_ - Ensure that the tooltips are consistent throughout the entire application.
|
||||
|
||||
Bug fixes
|
||||
*********
|
||||
|
@ -168,7 +168,7 @@
|
||||
"underscore": "^1.13.1",
|
||||
"url-loader": "^1.1.2",
|
||||
"valid-filename": "^2.0.1",
|
||||
"webcabin-docker": "git+https://github.com/EnterpriseDB/wcDocker/#40d025e0d86ee3cf058a52e01d2042113f134cdd",
|
||||
"webcabin-docker": "git+https://github.com/EnterpriseDB/wcDocker/#b4d58f29b3a308ab555085ee444fa7010aa4b991",
|
||||
"wkx": "^0.5.0",
|
||||
"xterm": "^4.11.0",
|
||||
"xterm-addon-fit": "^0.5.0",
|
||||
|
@ -482,9 +482,11 @@ define('pgadmin.browser', [
|
||||
*/
|
||||
let cacheIntervalId = setInterval(()=> {
|
||||
let sqlEditPreferences = obj.get_preferences_for_module('sqleditor');
|
||||
if(sqlEditPreferences) {
|
||||
let browserPreferences = obj.get_preferences_for_module('browser');
|
||||
if(sqlEditPreferences && browserPreferences) {
|
||||
clearInterval(cacheIntervalId);
|
||||
obj.reflectPreferences('sqleditor');
|
||||
obj.reflectPreferences('browser');
|
||||
}
|
||||
}, 500);
|
||||
|
||||
@ -493,6 +495,11 @@ define('pgadmin.browser', [
|
||||
obj.reflectPreferences('sqleditor');
|
||||
});
|
||||
|
||||
/* Check for browser preference changes */
|
||||
obj.onPreferencesChange('browser', function() {
|
||||
obj.reflectPreferences('browser');
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
obj?.editor?.setValue('-- ' + select_object_msg);
|
||||
obj?.editor?.refresh();
|
||||
|
@ -13,6 +13,8 @@ import $ from 'jquery';
|
||||
import pgWindow from 'sources/window';
|
||||
import Notify from '../../../static/js/helpers/Notifier';
|
||||
import { calcFontSize } from '../../../static/js/utils';
|
||||
import { shortcutToString } from '../../../static/js/components/ShortcutTitle';
|
||||
import gettext from 'sources/gettext';
|
||||
|
||||
|
||||
const pgBrowser = pgAdmin.Browser = pgAdmin.Browser || {};
|
||||
@ -132,6 +134,27 @@ _.extend(pgBrowser, {
|
||||
obj?.editor?.setOption('matchBrackets', sqlEditPreferences.brace_matching);
|
||||
obj?.editor?.refresh();
|
||||
}
|
||||
//browser preference
|
||||
if(module === 'browser') {
|
||||
let browserPreferences = obj.get_preferences_for_module('browser');
|
||||
let buttonList = obj?.panels?.browser?.panel?._buttonList;
|
||||
buttonList.forEach(btn => {
|
||||
let key = null;
|
||||
switch(btn.name) {
|
||||
case gettext('Query Tool'):
|
||||
key = shortcutToString(browserPreferences.sub_menu_query_tool,null,true);
|
||||
obj?.panels?.browser?.panel?.updateButton(gettext('Query Tool'), {key});
|
||||
break;
|
||||
case gettext('View Data'):
|
||||
key = shortcutToString(browserPreferences.sub_menu_view_data,null,true);
|
||||
obj?.panels?.browser?.panel?.updateButton(gettext('View Data'), {key});
|
||||
break;
|
||||
case gettext('Search objects'):
|
||||
key = shortcutToString(browserPreferences.sub_menu_search_objects,null,true);
|
||||
obj?.panels?.browser?.panel?.updateButton(gettext('Search objects'), {key});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
onPreferencesChange: function(module, eventHandler) {
|
||||
|
@ -344,3 +344,25 @@
|
||||
.wcMenuSubMenu::before{
|
||||
content: none;
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
font-size: 0.7rem;
|
||||
line-height: 1.4em;
|
||||
}
|
||||
|
||||
.tooltip.show {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.wcTooltip-shortcut {
|
||||
justify-content: center;
|
||||
margin-top: 0.125rem;
|
||||
display: flex
|
||||
}
|
||||
|
||||
.wcTooltip-shortcut-key{
|
||||
padding: 0 0.25rem;
|
||||
border: 1px solid $border-color;
|
||||
margin-right: 0.125rem;
|
||||
border-radius: $border-radius
|
||||
}
|
||||
|
@ -11419,12 +11419,13 @@ watchpack@^2.2.0:
|
||||
glob-to-regexp "^0.4.1"
|
||||
graceful-fs "^4.1.2"
|
||||
|
||||
"webcabin-docker@git+https://github.com/EnterpriseDB/wcDocker/#40d025e0d86ee3cf058a52e01d2042113f134cdd":
|
||||
"webcabin-docker@git+https://github.com/EnterpriseDB/wcDocker/#b4d58f29b3a308ab555085ee444fa7010aa4b991":
|
||||
version "2.2.5"
|
||||
resolved "git+https://github.com/EnterpriseDB/wcDocker/#40d025e0d86ee3cf058a52e01d2042113f134cdd"
|
||||
resolved "git+https://github.com/EnterpriseDB/wcDocker/#b4d58f29b3a308ab555085ee444fa7010aa4b991"
|
||||
dependencies:
|
||||
"@fortawesome/fontawesome-free" "^5.14.0"
|
||||
FileSaver "^0.10.0"
|
||||
bootstrap "^4.3.1"
|
||||
jquery "^3.3.1"
|
||||
jquery-contextmenu "^2.6.4"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user