From 391c0670d0e30290403c2c6aa254cc26aa890b83 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 14 Sep 2010 15:50:51 +0200 Subject: [PATCH] use apiURL --- build/js/ox.ui.js | 40 ++++++++++++++++++------------------ build/json/ox.ui.images.json | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index 3deb1f3..8a570f5 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -125,9 +125,9 @@ requires Ox.App = function() { /* options: - requestTimeout - requestType - requestURL + apiTimeout + apiType + apiURL */ return function(options) { @@ -138,12 +138,11 @@ requires self.time = +new Date(); self.options = $.extend({ - id: '', - init: '', - name: '', - requestTimeout: 15000, - requestType: 'POST', - requestURL: '', // fixme: should be apiURL etc + apiTimeout: 15000, + apiType: 'POST', + apiURL: '', + config: '', + init: '' }, options); function getUserAgent() { @@ -201,7 +200,7 @@ requires that.api = { api: function(callback) { Ox.Request.send({ - url: self.options.requestURL, + url: self.options.apiURL, data: { action: 'api' }, @@ -217,19 +216,20 @@ requires var time = +new Date(), userAgent = getUserAgent(), userAgents = ['Chrome', 'Firefox', 'Safari']; - document.title = self.options.name; $.ajaxSetup({ - timeout: self.options.requestTimeout, - type: self.options.requestType, - url: self.options.requestURL + timeout: self.options.apiTimeout, + type: self.options.apiType, + url: self.options.apiURL }); userAgents.indexOf(userAgent) > -1 ? start() : stop(); function start() { - loadImages(function() { + $.getJSON(self.options.config, function(data) { + var config = data; + Ox.print('config', config); + document.title = config.site.name; window.google = function() {}; $.getScript('http://maps.google.com/maps/api/js?callback=google&sensor=false', function() { - $.getJSON(self.options.config, function(data) { - var config = data; + loadImages(function() { that.api.api(function(result) { $.each(result.data.actions, function(i, action) { that.api[action] = function(data, callback) { @@ -238,9 +238,8 @@ requires data = {}; } console.log('api', action, data) - console.log('sending', self.options.requestURL, {action: action, data: data}) return Ox.Request.send({ - url: self.options.requestURL, + url: self.options.apiURL, data: { action: action, data: JSON.stringify(data) @@ -5906,7 +5905,8 @@ requires } function mousedown(e) { - e.preventDefault(); + // fixme: preventDefault keeps image from being draggable in safari - but also keeps the list from getting focus + // e.preventDefault(); } function mouseenter() { diff --git a/build/json/ox.ui.images.json b/build/json/ox.ui.images.json index c491fb6..4a18e79 100644 --- a/build/json/ox.ui.images.json +++ b/build/json/ox.ui.images.json @@ -1 +1 @@ -["png/ox.ui/browserChrome128.png", "png/ox.ui/browserFirefox128.png", "png/ox.ui/browserInternetExplorer128.png", "png/ox.ui/browserOpera128.png", "png/ox.ui/browserSafari128.png", "png/ox.ui/markerBlue.png", "png/ox.ui/markerGreen.png", "png/ox.ui/markerRed.png", "png/ox.ui/markerYellow.png", "png/ox.ui/videoMarkerCut.png", "png/ox.ui/videoMarkerIn.png", "png/ox.ui/videoMarkerInBottom.png", "png/ox.ui/videoMarkerInTop.png", "png/ox.ui/videoMarkerOut.png", "png/ox.ui/videoMarkerOutBottom.png", "png/ox.ui/videoMarkerOutTop.png", "png/ox.ui/videoMarkerPlay.png", "png/ox.ui.classic/loading.png", "png/ox.ui.classic/scrollbarHorizontalDecrement.png", "png/ox.ui.classic/scrollbarHorizontalIncrement.png", "png/ox.ui.classic/scrollbarVerticalDecrement.png", "png/ox.ui.classic/scrollbarVerticalIncrement.png", "png/ox.ui.classic/symbolAbove.png", "png/ox.ui.classic/symbolAdd.png", "png/ox.ui.classic/symbolBelow.png", "png/ox.ui.classic/symbolCheck.png", "png/ox.ui.classic/symbolClear.png", "png/ox.ui.classic/symbolClose.png", "png/ox.ui.classic/symbolCollapse.png", "png/ox.ui.classic/symbolDate.png", "png/ox.ui.classic/symbolEdit.png", "png/ox.ui.classic/symbolExpand.png", "png/ox.ui.classic/symbolFind.png", "png/ox.ui.classic/symbolHelp.png", "png/ox.ui.classic/symbolInfo.png", "png/ox.ui.classic/symbolLocation.png", "png/ox.ui.classic/symbolLock.png", "png/ox.ui.classic/symbolMute.png", "png/ox.ui.classic/symbolNext.png", "png/ox.ui.classic/symbolNone.png", "png/ox.ui.classic/symbolPause.png", "png/ox.ui.classic/symbolPlay.png", "png/ox.ui.classic/symbolPrevious.png", "png/ox.ui.classic/symbolRemove.png", "png/ox.ui.classic/symbolSelect.png", "png/ox.ui.classic/symbolSpin.png", "png/ox.ui.classic/symbolTime.png", "png/ox.ui.classic/symbolUnlock.png", "png/ox.ui.classic/symbolUnmute.png", "png/ox.ui.classic/symbolUser.png", "png/ox.ui.classic/symbolVolume.png", "png/ox.ui.classic/symbolWarning.png", "png/ox.ui.future/buttonAdd.png", "png/ox.ui.future/buttonClose.png", "png/ox.ui.future/buttonPause.png", "png/ox.ui.future/buttonPlay.png", "png/ox.ui.future/buttonRemove.png", "png/ox.ui.modern/buttonClear.png", "png/ox.ui.modern/icon.png", "png/ox.ui.modern/iconFind.png", "png/ox.ui.modern/loading.png", "png/ox.ui.modern/scrollbarHorizontalDecrement.png", "png/ox.ui.modern/scrollbarHorizontalIncrement.png", "png/ox.ui.modern/scrollbarVerticalDecrement.png", "png/ox.ui.modern/scrollbarVerticalIncrement.png", "png/ox.ui.modern/symbolAbove.png", "png/ox.ui.modern/symbolAdd.png", "png/ox.ui.modern/symbolBelow.png", "png/ox.ui.modern/symbolCheck.png", "png/ox.ui.modern/symbolClear.png", "png/ox.ui.modern/symbolClose.png", "png/ox.ui.modern/symbolCollapse.png", "png/ox.ui.modern/symbolDate.png", "png/ox.ui.modern/symbolEdit.png", "png/ox.ui.modern/symbolExpand.png", "png/ox.ui.modern/symbolFind.png", "png/ox.ui.modern/symbolGoToIn.png", "png/ox.ui.modern/symbolGoToOut.png", "png/ox.ui.modern/symbolHelp.png", "png/ox.ui.modern/symbolInfo.png", "png/ox.ui.modern/symbolLocation.png", "png/ox.ui.modern/symbolLock.png", "png/ox.ui.modern/symbolMute.png", "png/ox.ui.modern/symbolNext.png", "png/ox.ui.modern/symbolNone.png", "png/ox.ui.modern/symbolPause.png", "png/ox.ui.modern/symbolPlay.png", "png/ox.ui.modern/symbolPlayInToOut.png", "png/ox.ui.modern/symbolPrevious.png", "png/ox.ui.modern/symbolRemove.png", "png/ox.ui.modern/symbolSelect.png", "png/ox.ui.modern/symbolSetIn.png", "png/ox.ui.modern/symbolSetOut.png", "png/ox.ui.modern/symbolTime.png", "png/ox.ui.modern/symbolUnlock.png", "png/ox.ui.modern/symbolUnmute.png", "png/ox.ui.modern/symbolUser.png", "png/ox.ui.modern/symbolVolume.png", "png/ox.ui.modern/symbolWarning.png"] \ No newline at end of file +["png/ox.ui/browserChrome128.png", "png/ox.ui/browserFirefox128.png", "png/ox.ui/browserInternetExplorer128.png", "png/ox.ui/browserOpera128.png", "png/ox.ui/browserSafari128.png", "png/ox.ui/markerBlue.png", "png/ox.ui/markerGreen.png", "png/ox.ui/markerRed.png", "png/ox.ui/markerYellow.png", "png/ox.ui/transparent.png", "png/ox.ui/videoMarkerCut.png", "png/ox.ui/videoMarkerIn.png", "png/ox.ui/videoMarkerInBottom.png", "png/ox.ui/videoMarkerInTop.png", "png/ox.ui/videoMarkerOut.png", "png/ox.ui/videoMarkerOutBottom.png", "png/ox.ui/videoMarkerOutTop.png", "png/ox.ui/videoMarkerPlay.png", "png/ox.ui.classic/loading.png", "png/ox.ui.classic/scrollbarHorizontalDecrement.png", "png/ox.ui.classic/scrollbarHorizontalIncrement.png", "png/ox.ui.classic/scrollbarVerticalDecrement.png", "png/ox.ui.classic/scrollbarVerticalIncrement.png", "png/ox.ui.classic/symbolAbove.png", "png/ox.ui.classic/symbolAdd.png", "png/ox.ui.classic/symbolBelow.png", "png/ox.ui.classic/symbolCheck.png", "png/ox.ui.classic/symbolClear.png", "png/ox.ui.classic/symbolClose.png", "png/ox.ui.classic/symbolCollapse.png", "png/ox.ui.classic/symbolDate.png", "png/ox.ui.classic/symbolEdit.png", "png/ox.ui.classic/symbolExpand.png", "png/ox.ui.classic/symbolFind.png", "png/ox.ui.classic/symbolHelp.png", "png/ox.ui.classic/symbolInfo.png", "png/ox.ui.classic/symbolLocation.png", "png/ox.ui.classic/symbolLock.png", "png/ox.ui.classic/symbolMute.png", "png/ox.ui.classic/symbolNext.png", "png/ox.ui.classic/symbolNone.png", "png/ox.ui.classic/symbolPause.png", "png/ox.ui.classic/symbolPlay.png", "png/ox.ui.classic/symbolPrevious.png", "png/ox.ui.classic/symbolRemove.png", "png/ox.ui.classic/symbolSelect.png", "png/ox.ui.classic/symbolSpin.png", "png/ox.ui.classic/symbolTime.png", "png/ox.ui.classic/symbolUnlock.png", "png/ox.ui.classic/symbolUnmute.png", "png/ox.ui.classic/symbolUser.png", "png/ox.ui.classic/symbolVolume.png", "png/ox.ui.classic/symbolWarning.png", "png/ox.ui.future/buttonAdd.png", "png/ox.ui.future/buttonClose.png", "png/ox.ui.future/buttonPause.png", "png/ox.ui.future/buttonPlay.png", "png/ox.ui.future/buttonRemove.png", "png/ox.ui.modern/buttonClear.png", "png/ox.ui.modern/icon.png", "png/ox.ui.modern/iconFind.png", "png/ox.ui.modern/loading.png", "png/ox.ui.modern/scrollbarHorizontalDecrement.png", "png/ox.ui.modern/scrollbarHorizontalIncrement.png", "png/ox.ui.modern/scrollbarVerticalDecrement.png", "png/ox.ui.modern/scrollbarVerticalIncrement.png", "png/ox.ui.modern/symbolAbove.png", "png/ox.ui.modern/symbolAdd.png", "png/ox.ui.modern/symbolBelow.png", "png/ox.ui.modern/symbolCheck.png", "png/ox.ui.modern/symbolClear.png", "png/ox.ui.modern/symbolClose.png", "png/ox.ui.modern/symbolCollapse.png", "png/ox.ui.modern/symbolDate.png", "png/ox.ui.modern/symbolEdit.png", "png/ox.ui.modern/symbolExpand.png", "png/ox.ui.modern/symbolFind.png", "png/ox.ui.modern/symbolGoToIn.png", "png/ox.ui.modern/symbolGoToOut.png", "png/ox.ui.modern/symbolHelp.png", "png/ox.ui.modern/symbolInfo.png", "png/ox.ui.modern/symbolLocation.png", "png/ox.ui.modern/symbolLock.png", "png/ox.ui.modern/symbolMute.png", "png/ox.ui.modern/symbolNext.png", "png/ox.ui.modern/symbolNone.png", "png/ox.ui.modern/symbolPause.png", "png/ox.ui.modern/symbolPlay.png", "png/ox.ui.modern/symbolPlayInToOut.png", "png/ox.ui.modern/symbolPrevious.png", "png/ox.ui.modern/symbolRemove.png", "png/ox.ui.modern/symbolSelect.png", "png/ox.ui.modern/symbolSetIn.png", "png/ox.ui.modern/symbolSetOut.png", "png/ox.ui.modern/symbolTime.png", "png/ox.ui.modern/symbolUnlock.png", "png/ox.ui.modern/symbolUnmute.png", "png/ox.ui.modern/symbolUser.png", "png/ox.ui.modern/symbolVolume.png", "png/ox.ui.modern/symbolWarning.png"] \ No newline at end of file