support disalogs without titlebar, i.e. preview vidieo player
This commit is contained in:
parent
bc5b1b961c
commit
ec5b050496
1 changed files with 12 additions and 2 deletions
|
|
@ -19,6 +19,7 @@ Ox.Dialog = function(options, self) {
|
||||||
var that = Ox.Element({}, self)
|
var that = Ox.Element({}, self)
|
||||||
.defaults({
|
.defaults({
|
||||||
buttons: [],
|
buttons: [],
|
||||||
|
borderless: false,
|
||||||
controlsBottom: [],
|
controlsBottom: [],
|
||||||
controlsTop: [],
|
controlsTop: [],
|
||||||
closeButton: false,
|
closeButton: false,
|
||||||
|
|
@ -73,7 +74,7 @@ Ox.Dialog = function(options, self) {
|
||||||
.appendTo(Ox.Fullscreen.element ? Ox.Fullscreen.element : Ox.$body);
|
.appendTo(Ox.Fullscreen.element ? Ox.Fullscreen.element : Ox.$body);
|
||||||
|
|
||||||
self.hasButtons = !!self.options.buttons.length;
|
self.hasButtons = !!self.options.buttons.length;
|
||||||
self.barsHeight = 24 + 24 * self.hasButtons;
|
self.barsHeight = !self.options.borderless*24 + 24 * self.hasButtons;
|
||||||
self.initialMaxHeight = self.options.maxHeight;
|
self.initialMaxHeight = self.options.maxHeight;
|
||||||
self.initialMaxWidth = self.options.maxWidth;
|
self.initialMaxWidth = self.options.maxWidth;
|
||||||
self.titleMargin = 8 + (self.options.closeButton ? 20 : 0)
|
self.titleMargin = 8 + (self.options.closeButton ? 20 : 0)
|
||||||
|
|
@ -94,7 +95,9 @@ Ox.Dialog = function(options, self) {
|
||||||
size: 24
|
size: 24
|
||||||
})
|
})
|
||||||
.addClass('OxTitlebar')
|
.addClass('OxTitlebar')
|
||||||
.appendTo(that);
|
if (!self.options.borderless) {
|
||||||
|
self.$titlebar.appendTo(that);
|
||||||
|
}
|
||||||
|
|
||||||
if (self.options.closeButton) {
|
if (self.options.closeButton) {
|
||||||
self.$closeButton = Ox.Button({
|
self.$closeButton = Ox.Button({
|
||||||
|
|
@ -605,6 +608,13 @@ Ox.Dialog = function(options, self) {
|
||||||
borderBottomRightRadius: '8px'
|
borderBottomRightRadius: '8px'
|
||||||
})
|
})
|
||||||
.appendTo(that);
|
.appendTo(that);
|
||||||
|
if (self.options.borderless) {
|
||||||
|
self.$content.css({
|
||||||
|
top: 0,
|
||||||
|
borderTopLeftRadius: '8px',
|
||||||
|
borderTopRightRadius: '8px'
|
||||||
|
})
|
||||||
|
}
|
||||||
!isImage && self.$content.append(
|
!isImage && self.$content.append(
|
||||||
self.options.content.css(self.hasButtons ? {} : {
|
self.options.content.css(self.hasButtons ? {} : {
|
||||||
borderBottomLeftRadius: '8px',
|
borderBottomLeftRadius: '8px',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue