mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Icon and toolbar cleanup/consistency.
This commit is contained in:
@@ -7,7 +7,7 @@ function(_, pgAdmin) {
|
||||
pgAdmin.Browser.Frame = function(options) {
|
||||
var defaults = [
|
||||
'name', 'title', 'width', 'height', 'showTitle', 'isCloseable',
|
||||
'isPrivate', 'url'];
|
||||
'isPrivate', 'url', 'icon'];
|
||||
_.extend(this, _.pick(options, defaults));
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ function(_, pgAdmin) {
|
||||
isClosable: true,
|
||||
isPrivate: false,
|
||||
url: '',
|
||||
icon: '',
|
||||
panel: null,
|
||||
frame: null,
|
||||
load: function(docker) {
|
||||
@@ -31,8 +32,12 @@ function(_, pgAdmin) {
|
||||
onCreate: function(myPanel) {
|
||||
$(myPanel).data('pgAdminName', that.name);
|
||||
myPanel.initSize(that.width, that.height);
|
||||
|
||||
if (myPanel.showTitle == false)
|
||||
myPanel.title(false);
|
||||
|
||||
myPanel.icon(that.icon)
|
||||
|
||||
myPanel.closeable(!!that.isCloseable);
|
||||
|
||||
var $frameArea = $('<div style="width:100%;height:100%;position:relative;display:table">');
|
||||
|
||||
@@ -7,7 +7,7 @@ function(_, pgAdmin) {
|
||||
pgAdmin.Browser.Panel = function(options) {
|
||||
var defaults = [
|
||||
'name', 'title', 'width', 'height', 'showTitle', 'isCloseable',
|
||||
'isPrivate', 'content', 'events'];
|
||||
'isPrivate', 'content', 'icon', 'events'];
|
||||
_.extend(this, _.pick(options, defaults));
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ function(_, pgAdmin) {
|
||||
isCloseable: true,
|
||||
isPrivate: false,
|
||||
content: '',
|
||||
icon: '',
|
||||
panel: null,
|
||||
load: function(docker, title) {
|
||||
var that = this;
|
||||
@@ -30,10 +31,15 @@ function(_, pgAdmin) {
|
||||
onCreate: function(myPanel) {
|
||||
$(myPanel).data('pgAdminName', that.name);
|
||||
myPanel.initSize(that.width, that.height);
|
||||
|
||||
if (!that.showTitle)
|
||||
myPanel.title(false);
|
||||
else
|
||||
else {
|
||||
myPanel.title(title || that.title);
|
||||
if (that.icon != '')
|
||||
myPanel.icon(that.icon)
|
||||
}
|
||||
|
||||
myPanel.closeable(!!that.isCloseable);
|
||||
myPanel.layout().addItem(
|
||||
$('<div>', {
|
||||
|
||||
Reference in New Issue
Block a user