mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Added zoom scaling options with keyboard shortcuts in runtime. Fixes #6271
This commit is contained in:
@@ -836,7 +836,7 @@ define('pgadmin.browser', [
|
||||
enable: (_m.enable == '' ? true : (_.isString(_m.enable) &&
|
||||
_m.enable.toLowerCase() == 'false') ?
|
||||
false : _m.enable),
|
||||
node: _m.node, checked: _m.checked,
|
||||
node: _m.node, checked: _m.checked, below: _m.below,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ define([
|
||||
var menu_opts = [
|
||||
'name', 'label', 'priority', 'module', 'callback', 'data', 'enable',
|
||||
'category', 'target', 'url' /* Do not show icon in the menus, 'icon' */ , 'node',
|
||||
'checked', 'menu_items',
|
||||
'checked', 'below', 'menu_items',
|
||||
],
|
||||
defaults = {
|
||||
url: '#',
|
||||
@@ -101,7 +101,14 @@ define([
|
||||
|
||||
url.append(textSpan);
|
||||
|
||||
this.$el = $('<li/>').append(url);
|
||||
var mnu_element = $('<li/>').append(url);
|
||||
// Check if below parameter is defined and true then we need to add
|
||||
// separator.
|
||||
if (!_.isUndefined(this.below) && this.below === true) {
|
||||
mnu_element.append('<li class="dropdown-divider"></li>');
|
||||
}
|
||||
|
||||
this.$el = mnu_element;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@@ -39,6 +39,34 @@ _.extend(pgBrowser, {
|
||||
mnu_viewlog_runtime: function() {
|
||||
this.send_signal_to_runtime('Runtime Open View Log');
|
||||
},
|
||||
|
||||
// This function is callback function when 'Enter Full Screen' menu is clicked.
|
||||
mnu_toggle_fullscreen_runtime: function() {
|
||||
var menu_label = document.querySelector('#mnu_toggle_fullscreen_runtime span').innerHTML;
|
||||
|
||||
if (menu_label.indexOf('Enter Full Screen') > 0) {
|
||||
document.querySelector('#mnu_toggle_fullscreen_runtime span').innerHTML = menu_label.replace('Enter', 'Exit');
|
||||
} else if (menu_label.indexOf('Exit Full Screen') > 0) {
|
||||
document.querySelector('#mnu_toggle_fullscreen_runtime span').innerHTML = menu_label.replace('Exit', 'Enter');
|
||||
}
|
||||
|
||||
this.send_signal_to_runtime('Runtime Toggle Full Screen');
|
||||
},
|
||||
|
||||
// This function is callback function when 'Actual Size' menu is clicked.
|
||||
mnu_actual_size_runtime: function() {
|
||||
this.send_signal_to_runtime('Runtime Actual Size');
|
||||
},
|
||||
|
||||
// This function is callback function when 'Zoom In' menu is clicked.
|
||||
mnu_zoomin_runtime: function() {
|
||||
this.send_signal_to_runtime('Runtime Zoom In');
|
||||
},
|
||||
|
||||
// This function is callback function when 'Zoom Out' menu is clicked.
|
||||
mnu_zoomout_runtime: function() {
|
||||
this.send_signal_to_runtime('Runtime Zoom Out');
|
||||
}
|
||||
});
|
||||
|
||||
export {pgBrowser};
|
||||
|
||||
Reference in New Issue
Block a user