diff --git a/build/js/ox.load.js b/build/js/ox.load.js index aa26fa39..33c79345 100644 --- a/build/js/ox.load.js +++ b/build/js/ox.load.js @@ -1,7 +1,18 @@ $(function() { var $body = $('body'), - $head = $('head'), + $div = $('
') + .css({ + position: 'absolute', + left: 0, + top: 0, + right: 0, + bottom: 0, + background: 'rgb(240, 240, 240)', + opacity: 1, + zIndex: 1000 + }) + .appendTo($body), css = { position: 'absolute', left: 0, @@ -50,7 +61,7 @@ $(function() { width: '32px', height: '32px' })) - .appendTo($body), + .appendTo($div), deg = 0, interval = setInterval(function() { deg = (deg + 30) % 360; @@ -85,7 +96,7 @@ $(function() { } }); function loaded() { - var $div = $('
') + var $div_ = $('
') .css($.extend(css, { width: (length * 72) + 'px', height: '72px' @@ -127,9 +138,9 @@ $(function() { }, 250); }) ) - .appendTo($div); + .appendTo($div_); }); - $div.appendTo($body); + $div_.appendTo($div); //throw new Error('User Agent not supported.'); } } diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index f6011489..1953f70a 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -216,10 +216,15 @@ requires $.getJSON(self.options.config, function(data) { var config = data; that.request(self.options.init, getUserData(), function(data) { - Ox.print('!!!', data) var user = data.data.user; $(function() { - $('body').empty(); + var $div = $body.find('div'); + $body.find('img').remove(); + $div.animate({ + opacity: 0 + }, 1000, function() { + $div.remove(); + }); callback({ config: config, user: user @@ -636,6 +641,9 @@ requires Ox.Request = function() { + // fixme: do we want, instead of request('find', data, callback), + // something like server.find(data, callback)? + var cache = {}, pending = {}, requests = {},