From 3ca88e4a266ec62a231a3f3a26f144e410fd74b4 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Tue, 1 Feb 2011 09:56:16 +0000 Subject: [PATCH] merging changes --- build/js/ox.js | 4 + build/js/ox.ui.js | 199 +++++++++++++++++++++++++++++++++++++++-- demos/form2/js/form.js | 8 ++ 3 files changed, 204 insertions(+), 7 deletions(-) diff --git a/build/js/ox.js b/build/js/ox.js index 2560185a..a7364fd9 100644 --- a/build/js/ox.js +++ b/build/js/ox.js @@ -1485,6 +1485,10 @@ Ox.formatPercent = function(num, total, dec) { return Ox.formatNumber(num / total * 100, dec) + '%' }; +Ox.formatResolution = function(arr, str) { + return arr[0] + ' x ' + arr[1] + ' ' + str; +} + Ox.formatString = function (s, args) { /* Python(ish) string formatting: * >>> format('{0}', ['zzz']) diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index 7a2120dc..6cdebba0 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -181,7 +181,7 @@ requires var counter = 0, length = data.length; data.forEach(function(src, i) { - image = new Image(); + var image = new Image(); image.src = oxui.path + src; image.onload = function() { (++counter == length) && callback(); @@ -244,7 +244,6 @@ requires }; }); that.api.init(getUserData(), function(result) { - // fixme: rename config to site? config = result.data.config, user = result.data.user; document.title = config.site.name; @@ -2982,16 +2981,18 @@ requires .appendTo(that); } - self.$input = $('') + self.$input = $(self.options.type == 'textarea' ? '