Icon and toolbar cleanup/consistency.

This commit is contained in:
Dave Page
2016-04-15 13:29:57 +01:00
parent 58fcbd943a
commit 4d7d3bd5e1
9 changed files with 70 additions and 49 deletions

View File

@@ -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">');

View File

@@ -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>', {