From d27a3ffe0f0dfdbbe4942ec5a505e3424f9d22a9 Mon Sep 17 00:00:00 2001 From: rolux Date: Sun, 15 Apr 2012 14:18:14 +0200 Subject: [PATCH] in index.js, use .one(), not .bindOnce() --- index.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index 9bbab353..af1104be 100644 --- a/index.js +++ b/index.js @@ -226,7 +226,7 @@ Ox.load(function() { app.$ui.screen = app.ui.screen(); app.$ui.loading = app.ui.loading(); app.$ui.logo = app.ui.logo() - .bindOnce({ + .one({ load: function() { Ox.$('body') .append(app.$ui.screen) @@ -582,7 +582,8 @@ Ox.load(function() { if (current.page != app.history.page) { app.$ui.panel.select(current.page); } - if (current.item != app.history.item) { + //if (current.item != app.history.item) { + if (current.item) { Ox.print('setting selected!') app.$ui[current.page].options({selected: current.item}); } @@ -592,11 +593,13 @@ Ox.load(function() { app.$ui[current.page].options({selected: current.item}); } */ - (!current.page || !app.history.page ? app.animate : Ox.void)(function() { - //app.url.replace(url); - app.history = current; - Ox.print('CALLBACK, HISTORY', app.history) - }); + (!current.page || !app.history.page ? app.animate : Ox.void)( + function() { + //app.url.replace(url); + app.history = current; + Ox.print('CALLBACK, HISTORY', app.history) + } + ); }, user: Ox.localStorage('OxJS') };