From 96e06b2cb236e769aec6c47368a827f190c14405 Mon Sep 17 00:00:00 2001 From: Rolux Date: Sat, 20 Feb 2010 09:28:46 +0530 Subject: [PATCH] updating dialog --- build/css/ox.ui.css | 6 +++--- build/js/ox.ui.js | 16 +++++++--------- demos/test/index.html | 4 ++-- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/build/css/ox.ui.css b/build/css/ox.ui.css index e67a9536..3812cae2 100644 --- a/build/css/ox.ui.css +++ b/build/css/ox.ui.css @@ -69,8 +69,8 @@ Dialog //left: 0px; //right: 0px; //height: 16px; - padding: 3px 8px 5px 8px; - padding: 3px 0 5px 0; + //padding: 3px 8px 5px 8px; + //padding: 3px 0 5px 0; cursor: move; overflow: hidden; white-space: nowrap; @@ -81,7 +81,7 @@ Dialog } .OxDialog > .OxTitleBar > .OxTitle { - margin: 0 8px 0 8px; + margin: 3px 8px 0 8px; font-size: 13px; font-weight: bold; text-overflow: ellipsis; diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index ae0c98d0..924d2410 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -26,11 +26,9 @@ requires }, getBarSize: function(size) { var sizes = { - xsmall: 16, - small: 24, - medium: 28, - large: 32, - xlarge: 40 + small: 20, + medium: 24, + large: 28, }; return sizes[size]; }, @@ -240,8 +238,6 @@ requires $eventHandler.unbind(event, callback); }, unbindKeyboard: function(id) { - //Ox.print(keyboardEvents) - //Ox.print("unbindKeyboard", id, keyboardEvents[id]) $.each(keyboardEvents[id] || [], function(event, callback) { $eventHandler.unbind(event, callback); }); @@ -462,7 +458,6 @@ requires $document.keydown(function(event) { var $element = $("input:focus"); if ($element.length) { - console.log("@", $element[0].selectionStart, $element[0].selectionEnd) if ( ( keyNames[event.keyCode] == "up" && @@ -484,7 +479,7 @@ requires function keypress(event) { var key, keys = [], - ret = true, + //ret = true, time; $.each(modifierNames, function(k, v) { if (event[k]) { @@ -1178,6 +1173,8 @@ requires .options(options || {}) .addClass("OxBar Ox" + Ox.toTitleCase(self.options.orientation)), dimensions = oxui.getDimensions(self.options.orientation); + self.options.size = Ox.isString(self.options.size) ? + oxui.getBarSize(self.options.size) : self.options.size; that.css(dimensions[0], "100%") .css(dimensions[1], self.options.size + "px"); return that; @@ -1215,6 +1212,7 @@ requires }; + // fixme: no need for this Ox.Toolbar = function(options, self) { var self = self || {}, that = new Ox.Bar({ diff --git a/demos/test/index.html b/demos/test/index.html index 7035da81..18df1512 100644 --- a/demos/test/index.html +++ b/demos/test/index.html @@ -166,7 +166,7 @@ ], size: "large" }); - var bottomPanel = Ox.Toolbar({size: "small"}) + var bottomPanel = Ox.Bar({size: "small"}) .css({ zIndex: 2, MozBoxShadow: "0 0 4px rgb(0, 0, 0)", @@ -217,7 +217,7 @@ }).appendTo(mainPanel); for (var i = 0; i < 5; i++) { - $toolbars[i] = Ox.Toolbar({size: i ? "small" : "medium"}).appendTo(mainPanel); + $toolbars[i] = Ox.Bar({size: i ? "medium" : "large"}).appendTo(mainPanel); } $toolbars[5] = Ox.Bar({size: 24}).appendTo(mainPanel);