diff --git a/source/UI/js/Window/Dialog.js b/source/UI/js/Window/Dialog.js index 30a44a58..c027db68 100644 --- a/source/UI/js/Window/Dialog.js +++ b/source/UI/js/Window/Dialog.js @@ -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',