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)
|
||||
.defaults({
|
||||
buttons: [],
|
||||
borderless: false,
|
||||
controlsBottom: [],
|
||||
controlsTop: [],
|
||||
closeButton: false,
|
||||
|
|
@ -73,7 +74,7 @@ Ox.Dialog = function(options, self) {
|
|||
.appendTo(Ox.Fullscreen.element ? Ox.Fullscreen.element : Ox.$body);
|
||||
|
||||
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.initialMaxWidth = self.options.maxWidth;
|
||||
self.titleMargin = 8 + (self.options.closeButton ? 20 : 0)
|
||||
|
|
@ -94,7 +95,9 @@ Ox.Dialog = function(options, self) {
|
|||
size: 24
|
||||
})
|
||||
.addClass('OxTitlebar')
|
||||
.appendTo(that);
|
||||
if (!self.options.borderless) {
|
||||
self.$titlebar.appendTo(that);
|
||||
}
|
||||
|
||||
if (self.options.closeButton) {
|
||||
self.$closeButton = Ox.Button({
|
||||
|
|
@ -605,6 +608,13 @@ Ox.Dialog = function(options, self) {
|
|||
borderBottomRightRadius: '8px'
|
||||
})
|
||||
.appendTo(that);
|
||||
if (self.options.borderless) {
|
||||
self.$content.css({
|
||||
top: 0,
|
||||
borderTopLeftRadius: '8px',
|
||||
borderTopRightRadius: '8px'
|
||||
})
|
||||
}
|
||||
!isImage && self.$content.append(
|
||||
self.options.content.css(self.hasButtons ? {} : {
|
||||
borderBottomLeftRadius: '8px',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue