From 137944a1a755308f952b83f2f4a67e374ecb3ebb Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 30 Nov 2011 15:56:01 +0100 Subject: [PATCH] minor changes --- source/Ox.UI/js/Form/Ox.Form.js | 2 +- source/Ox.UI/js/Form/Ox.PlacePicker.js | 2 ++ source/Ox.UI/js/Form/Ox.Range.js | 1 + source/Ox.UI/js/List/Ox.TextList.js | 2 +- source/Ox/js/Collection.js | 3 +++ source/Ox/js/Core.js | 2 ++ 6 files changed, 10 insertions(+), 2 deletions(-) diff --git a/source/Ox.UI/js/Form/Ox.Form.js b/source/Ox.UI/js/Form/Ox.Form.js index ac8d62cd..1477d3b8 100644 --- a/source/Ox.UI/js/Form/Ox.Form.js +++ b/source/Ox.UI/js/Form/Ox.Form.js @@ -48,7 +48,7 @@ Ox.Form = function(options, self) { self.itemIsValid[i] = item.value().length > 0; } self.itemIds[i] = item.options('id') || item.id; - that.append(self.$items[i] = Ox.FormItem({element: item})); + self.$items[i] = Ox.FormItem({element: item}).appendTo(that); item.bindEvent({ /* blur: function(data) { diff --git a/source/Ox.UI/js/Form/Ox.PlacePicker.js b/source/Ox.UI/js/Form/Ox.PlacePicker.js index 568da32f..e4696ab5 100644 --- a/source/Ox.UI/js/Form/Ox.PlacePicker.js +++ b/source/Ox.UI/js/Form/Ox.PlacePicker.js @@ -138,6 +138,8 @@ Ox.PlacePicker = function(options, self) { self.$map = Ox.Map({ clickable: true, id: self.options.id + 'Map', + // fixme: this is retarded, allow for map without places + places: [{south: -85, west: -179, north: -85, east: 179}] //places: [self.options.value] }) .css({ diff --git a/source/Ox.UI/js/Form/Ox.Range.js b/source/Ox.UI/js/Form/Ox.Range.js index 0fd32344..81ecc392 100644 --- a/source/Ox.UI/js/Form/Ox.Range.js +++ b/source/Ox.UI/js/Form/Ox.Range.js @@ -231,6 +231,7 @@ Ox.Range = function(options, self) { } function setTrackColors() { + // fixme: remove outdated -webkit format, and add -o self.$track.css({ backgroundImage: $.browser.mozilla ? ('-moz-linear-gradient(left, ' + diff --git a/source/Ox.UI/js/List/Ox.TextList.js b/source/Ox.UI/js/List/Ox.TextList.js index 380d2106..677c1c51 100644 --- a/source/Ox.UI/js/List/Ox.TextList.js +++ b/source/Ox.UI/js/List/Ox.TextList.js @@ -59,7 +59,7 @@ Ox.TextList = function(options, self) { columnWidth: [40, 800], draggable: false, id: '', - items: null, // function() {} {sort, range, keys, callback} or array + items: null, keys: [], max: -1, min: 0, diff --git a/source/Ox/js/Collection.js b/source/Ox/js/Collection.js index 44f63a54..03893975 100644 --- a/source/Ox/js/Collection.js +++ b/source/Ox/js/Collection.js @@ -495,6 +495,9 @@ Ox.map Transforms the values of an array, object or string # [0] @*/ +// FIXME: it would sometimes be nice to have Ox.map(3, function(i) {...}) +// instead of Ox.range(3).map(function(i) {...}) + Ox.map = function(obj, fn) { // fixme: return null to filter out may be a bit esoteric var isObject = Ox.isObject(obj), diff --git a/source/Ox/js/Core.js b/source/Ox/js/Core.js index 6bfd9735..38b7307d 100644 --- a/source/Ox/js/Core.js +++ b/source/Ox/js/Core.js @@ -70,6 +70,8 @@ Some conventions: : expression; */ +// FIXME: add memoize + // todo: check http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/ // also see https://github.com/tlrobinson/narwhal/blob/master/lib/util.js