Dialog default sizing.

pull/3/head
Ashesh Vashi 2016-05-25 11:17:56 +01:00 committed by Dave Page
parent 75fb99651a
commit cf0f692d00
7 changed files with 838 additions and 29 deletions

View File

@ -7,7 +7,8 @@ function(_, pgAdmin) {
pgAdmin.Browser.Panel = function(options) {
var defaults = [
'name', 'title', 'width', 'height', 'showTitle', 'isCloseable',
'isPrivate', 'content', 'icon', 'events', 'onCreate'];
'isPrivate', 'content', 'icon', 'events', 'onCreate', 'elContainer'
];
_.extend(this, _.pick(options, defaults));
}
@ -23,6 +24,7 @@ function(_, pgAdmin) {
icon: '',
panel: null,
onCreate: null,
elContainer: false,
load: function(docker, title) {
var that = this;
if (!that.panel) {
@ -71,6 +73,18 @@ function(_, pgAdmin) {
if (that.onCreate && _.isFunction(that.onCreate)) {
that.onCreate.apply(that, [myPanel, $container]);
}
if (that.elContainer) {
myPanel.pgElContainer = $container;
$container.addClass('pg-el-container');
_.each([
wcDocker.EVENT.RESIZED, wcDocker.EVENT.ATTACHED,
wcDocker.EVENT.DETACHED, wcDocker.EVENT.VISIBILITY_CHANGED
], function(ev) {
myPanel.on(ev, that.resizedContainer.bind(myPanel));
});
that.resizedContainer.apply(myPanel);
}
}
});
}
@ -89,6 +103,37 @@ function(_, pgAdmin) {
} catch (e) {
console.log(e);
}
},
resizedContainer: function() {
var p = this;
if (p.pgElContainer && !p.pgResizeTimeout) {
if (!p.isVisible()) {
clearTimeout(p.pgResizeTimeout);
p.pgResizeTimeout = null;
return;
}
p.pgResizeTimeout = setTimeout(
function() {
var w = p.width();
p.pgResizeTimeout = null;
if (w <= 480) {
w = 'xs';
} else if (w < 600) {
w = 'sm';
} else if (w < 768) {
w = 'md';
} else {
w = 'lg';
}
p.pgElContainer.attr('el', w);
},
100
);
}
}
});

View File

@ -68,6 +68,7 @@ function(require, $, _, S, Bootstrap, pgAdmin, alertify, CodeMirror) {
width: 500,
isCloseable: false,
isPrivate: true,
elContainer: true,
content: '<div class="obj_properties"><div class="alert alert-info pg-panel-message">{{ _('Please select an object in the tree view.') }}</div></div>',
events: panelEvents,
onCreate: function(myPanel, $container) {

View File

@ -299,10 +299,11 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) {
showTitle: true,
isCloseable: true,
isPrivate: true,
elContainer: true,
content: '<div class="obj_properties"><div class="alert alert-info pg-panel-message">{{ _('Please wait while we fetch information about the node from the server!') }}</div></div>',
onCreate: function(myPanel, $container) {
$container.addClass('pg-no-overflow');
}
onCreate: function(myPanel, $container) {
$container.addClass('pg-no-overflow');
}
});
p.load(pgBrowser.docker);
},
@ -363,8 +364,8 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) {
d.body.insertBefore(el, d.body.firstChild);
var pW = screen.width < 800 ? '95%' : '70%',
pH = screen.height < 600 ? '95%' : '70%';
var pW = screen.width < 800 ? '95%' : '500px',
pH = screen.height < 600 ? '95%' : '550px';
w = pgAdmin.toPx(el, self.width || pW, 'width', true),
h = pgAdmin.toPx(el, self.height|| pH, 'height', true),
x = (b.offsetWidth - w) / 2,

View File

@ -227,7 +227,6 @@ iframe {
}
.control-label {
min-width: 250px;
margin: 0px;
padding: 5px;
display: inline-block;
@ -235,12 +234,10 @@ iframe {
}
.pgadmin-controls {
min-width: 290px;
padding-right: 3px;
padding-left: 3px;
}
.pgadmin-controls.SQL {
min-width: 290px;
padding-right: 3px;
padding-left: 1px;
}

View File

@ -0,0 +1,764 @@
.pg-el-xs-1, .pg-el-xs-2, .pg-el-xs-3, .pg-el-xs-4, .pg-el-xs-5, .pg-el-xs-6, .pg-el-xs-7, .pg-el-xs-8, .pg-el-xs-9, .pg-el-xs-10, .pg-el-xs-11, .pg-el-xs-12 {
float: left;
}
.pg-el-container[el=lg] .pg-el-sm-1, .pg-el-container[el=lg] .pg-el-sm-2, .pg-el-container[el=lg] .pg-el-sm-3, .pg-el-container[el=lg] .pg-el-sm-4, .pg-el-container[el=lg] .pg-el-sm-5, .pg-el-container[el=lg] .pg-el-sm-6, .pg-el-container[el=lg] .pg-el-sm-7, .pg-el-container[el=lg] .pg-el-sm-8, .pg-el-container[el=lg] .pg-el-sm-9, .pg-el-container[el=lg] .pg-el-sm-10, .pg-el-container[el=lg] .pg-el-sm-11, .pg-el-container[el=lg] .pg-el-sm-12,
.pg-el-container[el=md] .pg-el-sm-1, .pg-el-container[el=md] .pg-el-sm-2, .pg-el-container[el=md] .pg-el-sm-3, .pg-el-container[el=md] .pg-el-sm-4, .pg-el-container[el=md] .pg-el-sm-5, .pg-el-container[el=md] .pg-el-sm-6, .pg-el-container[el=md] .pg-el-sm-7, .pg-el-container[el=md] .pg-el-sm-8, .pg-el-container[el=md] .pg-el-sm-9, .pg-el-container[el=md] .pg-el-sm-10, .pg-el-container[el=md] .pg-el-sm-11, .pg-el-container[el=md] .pg-el-sm-12,
.pg-el-container[el=sm] .pg-el-sm-1, .pg-el-container[el=sm] .pg-el-sm-2, .pg-el-container[el=sm] .pg-el-sm-3, .pg-el-container[el=sm] .pg-el-sm-4, .pg-el-container[el=sm] .pg-el-sm-5, .pg-el-container[el=sm] .pg-el-sm-6, .pg-el-container[el=sm] .pg-el-sm-7, .pg-el-container[el=sm] .pg-el-sm-8, .pg-el-container[el=sm] .pg-el-sm-9, .pg-el-container[el=sm] .pg-el-sm-10, .pg-el-container[el=sm] .pg-el-sm-11, .pg-el-container[el=sm] .pg-el-sm-12 {
float: left;
}
.pg-el-container[el=lg] .pg-el-md-1, .pg-el-container[el=lg] .pg-el-md-2, .pg-el-container[el=lg] .pg-el-md-3, .pg-el-container[el=lg] .pg-el-md-4, .pg-el-container[el=lg] .pg-el-md-5, .pg-el-container[el=lg] .pg-el-md-6, .pg-el-container[el=lg] .pg-el-md-7, .pg-el-container[el=lg] .pg-el-md-8, .pg-el-container[el=lg] .pg-el-md-9, .pg-el-container[el=lg] .pg-el-md-10, .pg-el-container[el=lg] .pg-el-md-11, .pg-el-container[el=lg] .pg-el-md-12,
.pg-el-container[el=md] .pg-el-md-1, .pg-el-container[el=md] .pg-el-md-2, .pg-el-container[el=md] .pg-el-md-3, .pg-el-container[el=md] .pg-el-md-4, .pg-el-container[el=md] .pg-el-md-5, .pg-el-container[el=md] .pg-el-md-6, .pg-el-container[el=md] .pg-el-md-7, .pg-el-container[el=md] .pg-el-md-8, .pg-el-container[el=md] .pg-el-md-9, .pg-el-container[el=md] .pg-el-md-10, .pg-el-container[el=md] .pg-el-md-11, .pg-el-container[el=md] .pg-el-md-12 {
float: left;
}
.pg-el-container[el=lg] .pg-el-lg-1, .pg-el-container[el=lg] .pg-el-lg-2, .pg-el-container[el=lg] .pg-el-lg-3, .pg-el-container[el=lg] .pg-el-lg-4, .pg-el-container[el=lg] .pg-el-lg-5, .pg-el-container[el=lg] .pg-el-lg-6, .pg-el-container[el=lg] .pg-el-lg-7, .pg-el-container[el=lg] .pg-el-lg-8, .pg-el-container[el=lg] .pg-el-lg-9, .pg-el-container[el=lg] .pg-el-lg-10, .pg-el-container[el=lg] .pg-el-lg-11, .pg-el-container[el=lg] .pg-el-lg-12 {
float: left;
}
.pg-el-xs-1, .pg-el-xs-2, .pg-el-xs-3, .pg-el-xs-4, .pg-el-xs-5, .pg-el-xs-6, .pg-el-xs-7, .pg-el-xs-8, .pg-el-xs-9, .pg-el-xs-10, .pg-el-xs-11, .pg-el-xs-12,
.pg-el-sm-1, .pg-el-sm-2, .pg-el-sm-3, .pg-el-sm-4, .pg-el-sm-5, .pg-el-sm-6, .pg-el-sm-7, .pg-el-sm-8, .pg-el-sm-9, .pg-el-sm-10, .pg-el-sm-11, .pg-el-sm-12,
.pg-el-md-1, .pg-el-md-2, .pg-el-md-3, .pg-el-md-4, .pg-el-md-5, .pg-el-md-6, .pg-el-md-7, .pg-el-md-8, .pg-el-md-9, .pg-el-md-10, .pg-el-md-11, .pg-el-md-12,
.pg-el-lg-1, .pg-el-lg-2, .pg-el-lg-3, .pg-el-lg-4, .pg-el-lg-5, .pg-el-lg-6, .pg-el-lg-7, .pg-el-lg-8, .pg-el-lg-9, .pg-el-lg-10, .pg-el-lg-11, .pg-el-lg-12 {
position: relative;
min-height: 32px;
padding: 1px 3px;
}
/* Large container */
.pg-el-lg-12 {
width: 100%;
}
.pg-el-lg-11 {
width: 91.66666666666666%;
}
.pg-el-lg-10 {
width: 83.33333333333333%;
}
.pg-el-lg-9 {
width: 75%;
}
.pg-el-lg-8 {
width: 66.66666666666666%;
}
.pg-el-lg-7 {
width: 58.33333333333333%;
}
.pg-el-lg-6 {
width: 50%;
}
.pg-el-lg-5 {
width: 41.66666666666666%;
}
.pg-el-lg-4 {
width: 33.33333333333333%;
}
.pg-el-lg-3 {
width: 25%;
}
.pg-el-lg-2 {
width: 16.6666666666666%;
}
.pg-el-lg-1 {
width: 8.33333333333333%;
}
.pg-el-md-12 {
width: 100%;
}
.pg-el-md-11 {
width: 91.66666666666666%;
}
.pg-el-md-10 {
width: 83.33333333333333%;
}
.pg-el-md-9 {
width: 75%;
}
.pg-el-md-8 {
width: 66.66666666666666%;
}
.pg-el-md-7 {
width: 58.33333333333333%;
}
.pg-el-md-6 {
width: 50%;
}
.pg-el-md-5 {
width: 41.66666666666666%;
}
.pg-el-md-4 {
width: 33.33333333333333%;
}
.pg-el-md-3 {
width: 25%;
}
.pg-el-md-2 {
width: 16.6666666666666%;
}
.pg-el-md-1 {
width: 8.33333333333333%;
}
/* Small container */
.pg-el-sm-12 {
width: 100%;
}
.pg-el-sm-11 {
width: 91.66666666666666%;
}
.pg-el-sm-10 {
width: 83.33333333333333%;
}
.pg-el-sm-9 {
width: 75%;
}
.pg-el-sm-8 {
width: 66.66666666666666%;
}
.pg-el-sm-7 {
width: 58.33333333333333%;
}
.pg-el-sm-6 {
width: 50%;
}
.pg-el-sm-5 {
width: 41.66666666666666%;
}
.pg-el-sm-4 {
width: 33.33333333333333%;
}
.pg-el-sm-3 {
width: 25%;
}
.pg-el-sm-2 {
width: 16.6666666666666%;
}
.pg-el-sm-1 {
width: 8.33333333333333%;
}
/* Extra small container */
.pg-el-xs-12 {
width: 100%;
}
.pg-el-xs-11 {
width: 91.66666666666666%;
}
.pg-el-xs-10 {
width: 83.33333333333333%;
}
.pg-el-xs-9 {
width: 75%;
}
.pg-el-xs-8 {
width: 66.66666666666666%;
}
.pg-el-xs-7 {
width: 58.33333333333333%;
}
.pg-el-xs-6 {
width: 50%;
}
.pg-el-xs-5 {
width: 41.66666666666666%;
}
.pg-el-xs-4 {
width: 33.33333333333333%;
}
.pg-el-xs-3 {
width: 25%;
}
.pg-el-xs-2 {
width: 16.6666666666666%;
}
.pg-el-xs-1 {
width: 8.33333333333333%;
}
.pg-el-container[el=lg] .pg-el-sm-12,
.pg-el-container[el=md] .pg-el-sm-12 {
width: 100%;
}
.pg-el-container[el=lg] .pg-el-sm-11,
.pg-el-container[el=md] .pg-el-sm-11 {
width: 91.66666666666666%;
}
.pg-el-container[el=lg] .pg-el-sm-10,
.pg-el-container[el=md] .pg-el-sm-10 {
width: 83.33333333333333%;
}
.pg-el-container[el=lg] .pg-el-sm-9,
.pg-el-container[el=md] .pg-el-sm-9 {
width: 75%;
}
.pg-el-container[el=lg] .pg-el-sm-8,
.pg-el-container[el=md] .pg-el-sm-8 {
width: 66.66666666666666%;
}
.pg-el-container[el=lg] .pg-el-sm-7,
.pg-el-container[el=md] .pg-el-sm-7 {
width: 58.33333333333333%;
}
.pg-el-container[el=lg] .pg-el-sm-6,
.pg-el-container[el=md] .pg-el-sm-6 {
width: 50%;
}
.pg-el-container[el=lg] .pg-el-sm-5,
.pg-el-container[el=md] .pg-el-sm-5 {
width: 41.66666666666666%;
}
.pg-el-container[el=lg] .pg-el-sm-4,
.pg-el-container[el=md] .pg-el-sm-4 {
width: 33.33333333333333%;
}
.pg-el-container[el=lg] .pg-el-sm-3,
.pg-el-container[el=md] .pg-el-sm-3 {
width: 25%;
}
.pg-el-container[el=lg] .pg-el-sm-2,
.pg-el-container[el=md] .pg-el-sm-2 {
width: 16.6666666666666%;
}
.pg-el-container[el=lg] .pg-el-sm-1,
.pg-el-container[el=md] .pg-el-sm-1 {
width: 8.33333333333333%;
}
.pg-el-container[el=sm] .pg-el-sm-12 {
width: 100%;
}
.pg-el-container[el=sm] .pg-el-sm-11 {
width: 91.66666666666666%;
}
.pg-el-container[el=sm] .pg-el-sm-10 {
width: 83.33333333333333%;
}
.pg-el-container[el=sm] .pg-el-sm-9 {
width: 75%;
}
.pg-el-container[el=sm] .pg-el-sm-8 {
width: 66.66666666666666%;
}
.pg-el-container[el=sm] .pg-el-sm-7 {
width: 58.33333333333333%;
}
.pg-el-container[el=sm] .pg-el-sm-6 {
width: 50%;
}
.pg-el-container[el=sm] .pg-el-sm-5 {
width: 41.66666666666666%;
}
.pg-el-container[el=sm] .pg-el-sm-4 {
width: 33.33333333333333%;
}
.pg-el-container[el=sm] .pg-el-sm-3 {
width: 25%;
}
.pg-el-container[el=sm] .pg-el-sm-2 {
width: 16.6666666666666%;
}
.pg-el-container[el=sm] .pg-el-sm-1 {
width: 8.33333333333333%;
}
.pg-el-container[el=lg] .pg-el-md-12 {
width: 100%;
}
.pg-el-container[el=lg] .pg-el-md-11 {
width: 91.66666666666666%;
}
.pg-el-container[el=lg] .pg-el-md-10 {
width: 83.33333333333333%;
}
.pg-el-container[el=lg] .pg-el-md-9 {
width: 75%;
}
.pg-el-container[el=lg] .pg-el-md-8 {
width: 66.66666666666666%;
}
.pg-el-container[el=lg] .pg-el-md-7 {
width: 58.33333333333333%;
}
.pg-el-container[el=lg] .pg-el-md-6 {
width: 50%;
}
.pg-el-container[el=lg] .pg-el-md-5 {
width: 41.66666666666666%;
}
.pg-el-container[el=lg] .pg-el-md-4 {
width: 33.33333333333333%;
}
.pg-el-container[el=lg] .pg-el-md-3 {
width: 25%;
}
.pg-el-container[el=lg] .pg-el-md-2 {
width: 16.6666666666666%;
}
.pg-el-container[el=lg] .pg-el-md-1 {
width: 8.33333333333333%;
}
/* Medium container */
.pg-el-container[el=md] .pg-el-md-12 {
width: 100%;
}
.pg-el-container[el=md] .pg-el-md-11 {
width: 91.66666666666666%;
}
.pg-el-container[el=md] .pg-el-md-10 {
width: 83.33333333333333%;
}
.pg-el-container[el=md] .pg-el-md-9 {
width: 75%;
}
.pg-el-container[el=md] .pg-el-md-8 {
width: 66.66666666666666%;
}
.pg-el-container[el=md] .pg-el-md-7 {
width: 58.33333333333333%;
}
.pg-el-container[el=md] .pg-el-md-6 {
width: 50%;
}
.pg-el-container[el=md] .pg-el-md-5 {
width: 41.66666666666666%;
}
.pg-el-container[el=md] .pg-el-md-4 {
width: 33.33333333333333%;
}
.pg-el-container[el=md] .pg-el-md-3 {
width: 25%;
}
.pg-el-container[el=md] .pg-el-md-2 {
width: 16.6666666666666%;
}
.pg-el-container[el=md] .pg-el-md-1 {
width: 8.33333333333333%;
}
/* Large container */
.pg-el-container[el=lg] .pg-el-lg-12 {
width: 100%;
}
.pg-el-container[el=lg] .pg-el-lg-11 {
width: 91.66666666666666%;
}
.pg-el-container[el=lg] .pg-el-lg-10 {
width: 83.33333333333333%;
}
.pg-el-container[el=lg] .pg-el-lg-9 {
width: 75%;
}
.pg-el-container[el=lg] .pg-el-lg-8 {
width: 66.66666666666666%;
}
.pg-el-container[el=lg] .pg-el-lg-7 {
width: 58.33333333333333%;
}
.pg-el-container[el=lg] .pg-el-lg-6 {
width: 50%;
}
.pg-el-container[el=lg] .pg-el-lg-5 {
width: 41.66666666666666%;
}
.pg-el-container[el=lg] .pg-el-lg-4 {
width: 33.33333333333333%;
}
.pg-el-container[el=lg] .pg-el-lg-3 {
width: 25%;
}
.pg-el-container[el=lg] .pg-el-lg-2 {
width: 16.6666666666666%;
}
.pg-el-container[el=lg] .pg-el-lg-1 {
width: 8.33333333333333%;
}
/* Large container */
.pg-el-container .pg-el-sub-container .pg-el-lg-12 {
width: 100%;
}
.pg-el-container .pg-el-sub-container .pg-el-lg-11 {
width: 91.66666666666666%;
}
.pg-el-container .pg-el-sub-container .pg-el-lg-10 {
width: 83.33333333333333%;
}
.pg-el-container .pg-el-sub-container .pg-el-lg-9 {
width: 75%;
}
.pg-el-container .pg-el-sub-container .pg-el-lg-8 {
width: 66.66666666666666%;
}
.pg-el-container .pg-el-sub-container .pg-el-lg-7 {
width: 58.33333333333333%;
}
.pg-el-container .pg-el-sub-container .pg-el-lg-6 {
width: 50%;
}
.pg-el-container .pg-el-sub-container .pg-el-lg-5 {
width: 41.66666666666666%;
}
.pg-el-container .pg-el-sub-container .pg-el-lg-4 {
width: 33.33333333333333%;
}
.pg-el-container .pg-el-sub-container .pg-el-lg-3 {
width: 25%;
}
.pg-el-container .pg-el-sub-container .pg-el-lg-2 {
width: 16.6666666666666%;
}
.pg-el-container .pg-el-sub-container .pg-el-lg-1 {
width: 8.33333333333333%;
}
.pg-el-container .pg-el-sub-container .pg-el-md-12 {
width: 100%;
}
.pg-el-container .pg-el-sub-container .pg-el-md-11 {
width: 91.66666666666666%;
}
.pg-el-container .pg-el-sub-container .pg-el-md-10 {
width: 83.33333333333333%;
}
.pg-el-container .pg-el-sub-container .pg-el-md-9 {
width: 75%;
}
.pg-el-container .pg-el-sub-container .pg-el-md-8 {
width: 66.66666666666666%;
}
.pg-el-container .pg-el-sub-container .pg-el-md-7 {
width: 58.33333333333333%;
}
.pg-el-container .pg-el-sub-container .pg-el-md-6 {
width: 50%;
}
.pg-el-container .pg-el-sub-container .pg-el-md-5 {
width: 41.66666666666666%;
}
.pg-el-container .pg-el-sub-container .pg-el-md-4 {
width: 33.33333333333333%;
}
.pg-el-container .pg-el-sub-container .pg-el-md-3 {
width: 25%;
}
.pg-el-container .pg-el-sub-container .pg-el-md-2 {
width: 16.6666666666666%;
}
.pg-el-container .pg-el-sub-container .pg-el-md-1 {
width: 8.33333333333333%;
}
/* Small container */
.pg-el-container .pg-el-sub-container .pg-el-sm-12 {
width: 100%;
}
.pg-el-container .pg-el-sub-container .pg-el-sm-11 {
width: 91.66666666666666%;
}
.pg-el-container .pg-el-sub-container .pg-el-sm-10 {
width: 83.33333333333333%;
}
.pg-el-container .pg-el-sub-container .pg-el-sm-9 {
width: 75%;
}
.pg-el-container .pg-el-sub-container .pg-el-sm-8 {
width: 66.66666666666666%;
}
.pg-el-container .pg-el-sub-container .pg-el-sm-7 {
width: 58.33333333333333%;
}
.pg-el-container .pg-el-sub-container .pg-el-sm-6 {
width: 50%;
}
.pg-el-container .pg-el-sub-container .pg-el-sm-5 {
width: 41.66666666666666%;
}
.pg-el-container .pg-el-sub-container .pg-el-sm-4 {
width: 33.33333333333333%;
}
.pg-el-container .pg-el-sub-container .pg-el-sm-3 {
width: 25%;
}
.pg-el-container .pg-el-sub-container .pg-el-sm-2 {
width: 16.6666666666666%;
}
.pg-el-container .pg-el-sub-container .pg-el-sm-1 {
width: 8.33333333333333%;
}
/* Extra small container */
.pg-el-container .pg-el-sub-container .pg-el-xs-12 {
width: 100%;
}
.pg-el-container .pg-el-sub-container .pg-el-xs-11 {
width: 91.66666666666666%;
}
.pg-el-container .pg-el-sub-container .pg-el-xs-10 {
width: 83.33333333333333%;
}
.pg-el-container .pg-el-sub-container .pg-el-xs-9 {
width: 75%;
}
.pg-el-container .pg-el-sub-container .pg-el-xs-8 {
width: 66.66666666666666%;
}
.pg-el-container .pg-el-sub-container .pg-el-xs-7 {
width: 58.33333333333333%;
}
.pg-el-container .pg-el-sub-container .pg-el-xs-6 {
width: 50%;
}
.pg-el-container .pg-el-sub-container .pg-el-xs-5 {
width: 41.66666666666666%;
}
.pg-el-container .pg-el-sub-container .pg-el-xs-4 {
width: 33.33333333333333%;
}
.pg-el-container .pg-el-sub-container .pg-el-xs-3 {
width: 25%;
}
.pg-el-container .pg-el-sub-container .pg-el-xs-2 {
width: 16.6666666666666%;
}
.pg-el-container .pg-el-sub-container .pg-el-xs-1 {
width: 8.33333333333333%;
}
/* Small container */
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-lg-12,
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-md-12,
.pg-el-container .pg-el-sub-container[el=md] .pg-el-sm-12,
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-sm-12,
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-sm-12 {
width: 100%;
}
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-lg-11,
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-md-11,
.pg-el-container .pg-el-sub-container[el=md] .pg-el-sm-11,
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-sm-11,
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-sm-11 {
width: 91.66666666666666%;
}
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-lg-10,
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-md-10,
.pg-el-container .pg-el-sub-container[el=md] .pg-el-sm-10,
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-sm-10,
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-sm-10 {
width: 83.33333333333333%;
}
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-lg-9,
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-md-9,
.pg-el-container .pg-el-sub-container[el=md] .pg-el-sm-9,
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-sm-9,
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-sm-9 {
width: 75%;
}
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-lg-8,
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-md-8,
.pg-el-container .pg-el-sub-container[el=md] .pg-el-sm-8,
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-sm-8,
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-sm-8 {
width: 66.66666666666666%;
}
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-lg-7,
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-md-7,
.pg-el-container .pg-el-sub-container[el=md] .pg-el-sm-7,
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-sm-7,
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-sm-7 {
width: 58.33333333333333%;
}
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-lg-6,
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-md-6,
.pg-el-container .pg-el-sub-container[el=md] .pg-el-sm-6,
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-sm-6,
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-sm-6 {
width: 50%;
}
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-lg-5,
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-md-5,
.pg-el-container .pg-el-sub-container[el=md] .pg-el-sm-5,
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-sm-5,
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-sm-5 {
width: 41.66666666666666%;
}
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-lg-4,
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-md-4,
.pg-el-container .pg-el-sub-container[el=md] .pg-el-sm-4,
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-sm-4,
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-sm-4 {
width: 33.33333333333333%;
}
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-lg-3,
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-md-3,
.pg-el-container .pg-el-sub-container[el=md] .pg-el-sm-3,
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-sm-3,
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-sm-3 {
width: 25%;
}
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-lg-2,
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-md-2,
.pg-el-container .pg-el-sub-container[el=md] .pg-el-sm-2,
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-sm-2,
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-sm-2 {
width: 16.6666666666666%;
}
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-lg-1,
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-md-1,
.pg-el-container .pg-el-sub-container[el=md] .pg-el-sm-1,
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-sm-1,
.pg-el-container .pg-el-sub-container[el=sm] .pg-el-sm-1 {
width: 8.33333333333333%;
}
/* Medium container */
.pg-el-container .pg-el-sub-container[el=md] .pg-el-lg-12,
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-md-12,
.pg-el-container .pg-el-sub-container[el=md] .pg-el-md-12 {
width: 100%;
}
.pg-el-container .pg-el-sub-container[el=md] .pg-el-lg-11,
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-md-11,
.pg-el-container .pg-el-sub-container[el=md] .pg-el-md-11 {
width: 91.66666666666666%;
}
.pg-el-container .pg-el-sub-container[el=md] .pg-el-lg-10,
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-md-10,
.pg-el-container .pg-el-sub-container[el=md] .pg-el-md-10 {
width: 83.33333333333333%;
}
.pg-el-container .pg-el-sub-container[el=md] .pg-el-lg-9,
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-md-9,
.pg-el-container .pg-el-sub-container[el=md] .pg-el-md-9 {
width: 75%;
}
lgg-el-container[el=md] .pg-el-lg-8,
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-md-8,
.pg-el-container .pg-el-sub-container[el=md] .pg-el-md-8 {
width: 66.66666666666666%;
}
.pg-el-container .pg-el-sub-container[el=md] .pg-el-lg-7,
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-md-7,
.pg-el-container .pg-el-sub-container[el=md] .pg-el-md-7 {
width: 58.33333333333333%;
}
.pg-el-container .pg-el-sub-container[el=md] .pg-el-lg-6,
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-md-6,
.pg-el-container .pg-el-sub-container[el=md] .pg-el-md-6 {
width: 50%;
}
.pg-el-container .pg-el-sub-container[el=md] .pg-el-lg-5,
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-md-5,
.pg-el-container .pg-el-sub-container[el=md] .pg-el-md-5 {
width: 41.66666666666666%;
}
.pg-el-container .pg-el-sub-container[el=md] .pg-el-lg-4,
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-md-4,
.pg-el-container .pg-el-sub-container[el=md] .pg-el-md-4 {
width: 33.33333333333333%;
}
.pg-el-container .pg-el-sub-container[el=md] .pg-el-lg-3,
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-md-3,
.pg-el-container .pg-el-sub-container[el=md] .pg-el-md-3 {
width: 25%;
}
.pg-el-container .pg-el-sub-container[el=md] .pg-el-lg-2,
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-md-2,
.pg-el-container .pg-el-sub-container[el=md] .pg-el-md-2 {
width: 16.6666666666666%;
}
.pg-el-container .pg-el-sub-container[el=md] .pg-el-lg-1,
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-md-1,
.pg-el-container .pg-el-sub-container[el=md] .pg-el-md-1 {
width: 8.33333333333333%;
}
/* Large container */
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-lg-12 {
width: 100%;
}
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-lg-11 {
width: 91.66666666666666%;
}
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-lg-10 {
width: 83.33333333333333%;
}
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-lg-9 {
width: 75%;
}
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-lg-8 {
width: 66.66666666666666%;
}
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-lg-7 {
width: 58.33333333333333%;
}
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-lg-6 {
width: 50%;
}
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-lg-5 {
width: 41.66666666666666%;
}
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-lg-4 {
width: 33.33333333333333%;
}
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-lg-3 {
width: 25%;
}
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-lg-2 {
width: 16.6666666666666%;
}
.pg-el-container .pg-el-sub-container[el=lg] .pg-el-lg-1 {
width: 8.33333333333333%;
}
.pgadmin-control-group {
min-width: 34px;
}
.control-label {
margin: 0px;
padding-top: 6px;
padding-bottom: 6px;
padding-left: 5px;
padding-right: 5px;
display: inline-block;
vertical-align: middle;
min-height: 28px;
}
.pgadmin-controls {
padding-right: 3px;
padding-left: 3px;
}
.pgadmin-controls.SQL {
padding-left: 1px;
}
.pgadmin-controls > div.checkbox {
height: 28px;
}
.pgadmin-controls > .uneditable-input,
.pgadmin-controls > .pgadmin-node-select,
.pgadmin-controls > input.form-control,
.pgadmin-controls > select.form-control,
.pgadmin-controls > textarea.form-control,
.pgadmin-controls > span.select2 {
min-height: 28px;
min-width: 100%;
max-width: 100%;
}
.pgadmin-controls > .uneditable-input,
.pgadmin-controls > .pgadmin-node-select,
.pgadmin-controls > input.form-control,
.pgadmin-controls > select.form-control,
.pgadmin-controls > textarea.form-control {
padding: 3px 6px;
}
.pgadmin-controls > span.select2 .select2-selection--single .select2-selection__rendered {
line-height: 32px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
top: 5px;
}

View File

@ -48,12 +48,12 @@
// HTML markup global class names. More can be added by individual controls
// using _.extend. Look at RadioControl as an example.
_.extend(Backform, {
controlLabelClassName: "control-label col-sm-4",
controlsClassName: "pgadmin-controls col-sm-8",
groupClassName: "pgadmin-control-group form-group col-xs-12",
setGroupClassName: "set-group col-xs-12",
tabClassName: "backform-tab col-xs-12",
setGroupContentClassName: "fieldset-content col-xs-12"
controlLabelClassName: "control-label pg-el-sm-3 pg-el-xs-12",
controlsClassName: "pgadmin-controls pg-el-sm-9 pg-el-xs-12",
groupClassName: "pgadmin-control-group form-group pg-el-xs-12",
setGroupClassName: "set-group pg-el-xs-12",
tabClassName: "backform-tab pg-el-xs-12",
setGroupContentClassName: "fieldset-content pg-el-xs-12"
});
var controlMapper = Backform.controlMapper = {
@ -196,7 +196,7 @@
if (_.isEmpty(error)) return;
self.$el.addClass(Backform.errorClassName).append(
$("<div></div>").addClass('pgadmin-control-error-message col-xs-offset-4 col-xs-8 help-block').text(error)
$("<div></div>").addClass('pgadmin-control-error-message pg-el-xs-offset-4 pg-el-xs-8 help-block').text(error)
);
});
},
@ -414,7 +414,7 @@
'[type="radio"]'
).append(
$("<div></div>").addClass(
'pgadmin-control-error-message col-xs-offset-4 col-xs-8 col-xs-8 help-block'
'pgadmin-control-error-message pg-el-xs-offset-4 pg-el-xs-8 pg-el-xs-8 help-block'
).text(error));
});
}
@ -489,7 +489,7 @@
tagName: "div",
legend: true,
className: function() {
return 'col-sm-12 col-md-12 col-lg-12 col-xs-12';
return 'pg-el-sm-12 pg-el-md-12 pg-el-lg-12 pg-el-xs-12';
},
tabPanelClassName: function() {
return Backform.tabClassName;
@ -520,7 +520,7 @@
' id="<%=hId%>" aria-controls="<%=cId%>">',
'<%=label%></a></li>'].join(" ")),
'panel': _.template(
'<div role="tabpanel" class="tab-pane <%=label%> col-sm-12 col-md-12 col-lg-12 col-xs-12 fade" id="<%=cId%>" aria-labelledby="<%=hId%>"></div>'
'<div role="tabpanel" class="tab-pane <%=label%> pg-el-sm-12 pg-el-md-12 pg-el-lg-12 pg-el-xs-12 fade" id="<%=cId%>" aria-labelledby="<%=hId%>"></div>'
)},
render: function() {
this.cleanup();
@ -545,7 +545,7 @@
var tabHead = $('<ul class="nav nav-tabs" role="tablist"></ul>')
.appendTo(this.$el);
var tabContent = $('<ul class="tab-content col-sm-12 col-md-12 col-lg-12 col-xs-12"></ul>')
var tabContent = $('<ul class="tab-content pg-el-sm-12 pg-el-md-12 pg-el-lg-12 pg-el-xs-12"></ul>')
.appendTo(this.$el);
_.each(this.schema, function(o) {
@ -617,7 +617,7 @@
var Fieldset = Backform.Fieldset = Backform.Dialog.extend({
className: function() {
return 'set-group col-xs-12';
return 'set-group pg-el-xs-12';
},
tabPanelClassName: function() {
return Backform.tabClassName;
@ -972,10 +972,10 @@
showGridControl: function(data) {
var gridHeader = _.template([
'<div class="subnode-header">',
' <label class="control-label col-sm-4"><%-label%></label>',
' <label class="control-label pg-el-sm-4"><%-label%></label>',
' <button class="btn-sm btn-default add" <%=canAdd ? "" : "disabled=\'disabled\'"%>><%-add_label%></buttton>',
'</div>'].join("\n")),
gridBody = $('<div class="pgadmin-control-group backgrid form-group col-xs-12 object subnode"></div>').append(
gridBody = $('<div class="pgadmin-control-group backgrid form-group pg-el-xs-12 object subnode"></div>').append(
gridHeader(data)
);
@ -1138,7 +1138,7 @@
if (_.isEmpty(error)) return;
self.$el.addClass("subnode-error").append(
$("<div></div>").addClass('pgadmin-control-error-message col-xs-offset-4 col-xs-8 help-block').text(error)
$("<div></div>").addClass('pgadmin-control-error-message pg-el-xs-offset-4 pg-el-xs-8 help-block').text(error)
);
});
}
@ -1195,7 +1195,7 @@
if (_.isEmpty(error)) return;
self.$el.addClass('subnode-error').append(
$("<div></div>").addClass('pgadmin-control-error-message col-xs-offset-4 col-xs-8 help-block').text(error)
$("<div></div>").addClass('pgadmin-control-error-message pg-el-xs-offset-4 pg-el-xs-8 help-block').text(error)
);
},
clearInvalid: function() {
@ -1205,10 +1205,10 @@
},
showGridControl: function(data) {
var gridHeader = ["<div class='subnode-header'>",
" <label class='control-label col-sm-4'>" + data.label + "</label>" ,
" <label class='control-label pg-el-sm-4'>" + data.label + "</label>" ,
" <button class='btn-sm btn-default add'>ADD</buttton>",
"</div>"].join("\n");
gridBody = $("<div class='pgadmin-control-group backgrid form-group col-xs-12 object subnode'></div>").append(gridHeader);
gridBody = $("<div class='pgadmin-control-group backgrid form-group pg-el-xs-12 object subnode'></div>").append(gridHeader);
var subnode = data.subnode.schema ? data.subnode : data.subnode.prototype,
gridSchema = Backform.generateGridColumnsFromModel(
@ -1339,7 +1339,7 @@
var SqlTabControl = Backform.SqlTabControl = Backform.Control.extend({
defaults: {
label: "",
controlsClassName: "pgadmin-controls col-sm-12 SQL",
controlsClassName: "pgadmin-controls pg-el-sm-12 SQL",
extraClasses: [],
helpMessage: null
},
@ -2139,7 +2139,7 @@
noteClass: 'backform_control_notes'
},
template: _.template([
'<div class="<%=noteClass%> col-xs-12 <%=extraClasses.join(\' \')%>">',
'<div class="<%=noteClass%> pg-el-xs-12 <%=extraClasses.join(\' \')%>">',
'<label class="control-label"><%=label%>:</label>',
'<span><%=text%></span></div>'
].join("\n"))

View File

@ -35,6 +35,7 @@
{% endfor %}
<link type="text/css" rel="stylesheet" href="{{ url_for('static', filename='css/overrides.css') }}"/>
<link type="text/css" rel="stylesheet" href="{{ url_for('static', filename='css/pgadmin.css') }}"/>
{% block css_link %}{% endblock %}
<!-- Base template scripts -->