diff --git a/build/css/ox.ui.css b/build/css/ox.ui.css index 8e96ee77..70845c05 100644 --- a/build/css/ox.ui.css +++ b/build/css/ox.ui.css @@ -55,6 +55,38 @@ Bars white-space: nowrap; } +.OxResizebar.OxHorizontal { + width: 100%; + height: 5px; + margin: -2px 0 -2px 0; + cursor: ns-resize; +} +.OxResizebar.OxHorizontal > .OxLine { + width: 100%; + height: 1px; +} +.OxResizebar.OxHorizontal > .OxSpace { + width: 100%; + height: 2px; +} + +.OxResizebar.OxVertical { + width: 5px; + height: 100%; + margin: 0 -2px 0 -2px; + cursor: ew-resize; +} +.OxResizebar.OxVertical > .OxLine { + float: left; + width: 1px; + height: 100%; +} +.OxResizebar.OxVertical > .OxSpace { + float: left; + width: 2px; + height: 100%; +} + .OxTabbar > .OxButtonGroup { margin: 4px 0 0 4px; } @@ -594,6 +626,7 @@ Lists .OxTextList .OxPage { position: absolute; } + /* ================================================================================ Menus @@ -661,7 +694,6 @@ Menus padding: 2px 8px 0 0; } - .OxMenu { position: absolute; display: none; @@ -847,7 +879,6 @@ Panels right: 0; } - .OxPanel { overflow: auto; } @@ -860,6 +891,9 @@ Panels bottom: 0; overflow: hidden; } +.OxSplitPanel > div { + position: absolute; +} /* ================================================================================ diff --git a/build/css/ox.ui.modern.css b/build/css/ox.ui.modern.css index e3a55983..3620db38 100644 --- a/build/css/ox.ui.modern.css +++ b/build/css/ox.ui.modern.css @@ -24,6 +24,10 @@ Bars background: -webkit-gradient(linear, left top, left bottom, from(rgb(64, 64, 64)), to(rgb(32, 32, 32))); } +.OxThemeModern .OxResizebar > .OxLine { + background: rgb(48, 48, 48); +} + /* ================================================================================ Dialog diff --git a/build/js/ox.js b/build/js/ox.js index 6083ea10..338d70f6 100644 --- a/build/js/ox.js +++ b/build/js/ox.js @@ -1307,6 +1307,7 @@ Ox.limit = function(num, min, max) { >>> Ox.limit(2, 1) 1 */ + Ox.print(num, min, max) var len = arguments.length; max = arguments[len - 1]; min = len == 3 ? min : 0; diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index 06c6a392..cd7d939a 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -920,10 +920,10 @@ requires args, ret; if (length == 0) { // options() - ret = self.options; + ret = self.options || options; // this is silly. make sure self.options get populated with options } else if (length == 1 && typeof arguments[0] == "string") { // options(str) - ret = self.options[arguments[0]] + ret = self.options ? self.options[arguments[0]] : options[arguments[0]]; } else { // options (str, val) or options({str: val, ...}) // translate (str, val) to ({str: val}) @@ -1209,6 +1209,93 @@ requires return that; }; + /* + ---------------------------------------------------------------------------- + Ox.Resizebar + ---------------------------------------------------------------------------- + */ + + Ox.Resizebar = function(options, self) { + + var self = self || {}, + that = new Ox.Element({}, self) + .defaults({ + collapsible: true, + edge: "left", + elements: [], + orientation: "horizontal", + parent: null, + resizable: true, + resize: [], + size: 0 + }) + .options(options || {}) // fixme: options function should be able to handle undefined, no need for || {} + .addClass("OxResizebar Ox" + Ox.toTitleCase(self.options.orientation)) + /* + .attr({ + draggable: "true" + }) + .bind("dragstart", function(e) { + // e.originalEvent.dataTransfer.setDragImage($("