diff --git a/framework/assets/js/cache.js b/framework/assets/js/cache.js deleted file mode 100644 index 28d55ce2..00000000 --- a/framework/assets/js/cache.js +++ /dev/null @@ -1,18 +0,0 @@ -PhoneGap.addPlugin = function(name, obj) { - if ( !window.plugins ) { - window.plugins = {}; - } - - if ( !window.plugins[name] ) { - window.plugins[name] = obj; - } -} - -function Cache() { -} - -Cache.prototype.getCachedPathForURI = function(uri, success, fail) { - PhoneGap.execAsync(success, fail, 'com.phonegap.api.impl.Cache', 'getCachedPathForURI', [uri]); -}; - -PhoneGap.addPlugin('cache', new Cache()); \ No newline at end of file diff --git a/framework/assets/js/phonegap.js.base b/framework/assets/js/phonegap.js.base index 0e24a82a..237a19ee 100755 --- a/framework/assets/js/phonegap.js.base +++ b/framework/assets/js/phonegap.js.base @@ -136,6 +136,19 @@ PhoneGap.addConstructor = function(func) { }); }; +/** + * Adds a plugin object to window.plugins + */ +PhoneGap.addPlugin = function(name, obj) { + if ( !window.plugins ) { + window.plugins = {}; + } + + if ( !window.plugins[name] ) { + window.plugins[name] = obj; + } +} + /** * onDOMContentLoaded channel is fired when the DOM content * of the page has been parsed. @@ -216,23 +229,22 @@ PhoneGap.callbacks = {}; * @param {String[]} [args] Zero or more arguments to pass to the method */ PhoneGap.exec = function(clazz, action, args) { - CommandManager.exec(clazz, action, callbackId, args.join('__PHONEGAP__'), false); + CommandManager.exec(clazz, action, callbackId, JSON.stringify(args), false); }; PhoneGap.execAsync = function(success, fail, clazz, action, args) { var callbackId = clazz + PhoneGap.callbackId++; PhoneGap.callbacks[callbackId] = {success:success, fail:fail}; - CommandManager.exec(clazz, action, callbackId, args.join('__PHONEGAP__'), true); - return callbackId; + return CommandManager.exec(clazz, action, callbackId, JSON.stringify(args), true); }; PhoneGap.callbackSuccess = function(callbackId, args) { - PhoneGap.callbacks[callbackId].success.apply(this, JSON.parse(args)); + PhoneGap.callbacks[callbackId].success(args); delete PhoneGap.callbacks[callbackId]; }; -PhoneGap.callbackFailure = function(callbackId, args) { - PhoneGap.callbacks[callbackId].fail.apply(this, JSON.parse(args)); +PhoneGap.callbackError = function(callbackId, args) { + PhoneGap.callbacks[callbackId].fail(args); delete PhoneGap.callbacks[callbackId]; }; @@ -353,7 +365,7 @@ PhoneGap.UUIDcreatePart = function(length) { }; PhoneGap.close = function(context, func, params) { - if (null == params) { + if (typeof params === 'undefined') { return function() { return func.apply(context, arguments); } diff --git a/framework/assets/js/splashscreen.js b/framework/assets/js/splashscreen.js new file mode 100644 index 00000000..cf27f765 --- /dev/null +++ b/framework/assets/js/splashscreen.js @@ -0,0 +1,5 @@ +PhoneGap.addConstructor(function() { + if (typeof navigator.splashScreen == "undefined") { + navigator.splashScreen = SplashScreen; // SplashScreen object come from native side through addJavaScriptInterface + } +}); \ No newline at end of file diff --git a/framework/build.xml b/framework/build.xml index ce0af6a5..285c1908 100644 --- a/framework/build.xml +++ b/framework/build.xml @@ -64,21 +64,53 @@ --> - - + + + + var alert=function(){},device={},Element={},debug={}; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + diff --git a/framework/gen/com/phonegap/R.java b/framework/gen/com/phonegap/R.java index 81a21810..7db0ceb3 100644 --- a/framework/gen/com/phonegap/R.java +++ b/framework/gen/com/phonegap/R.java @@ -12,15 +12,13 @@ public final class R { } public static final class drawable { public static final int icon=0x7f020000; + public static final int splash=0x7f020001; } public static final class id { public static final int appView=0x7f050000; - public static final int go=0x7f050002; - public static final int surface=0x7f050001; } public static final class layout { public static final int main=0x7f030000; - public static final int preview=0x7f030001; } public static final class string { public static final int app_name=0x7f040000; diff --git a/framework/res/drawable/splash.png b/framework/res/drawable/splash.png new file mode 100755 index 00000000..aa3cbc51 Binary files /dev/null and b/framework/res/drawable/splash.png differ diff --git a/framework/res/layout/preview.xml b/framework/res/layout/preview.xml deleted file mode 100644 index f7fe83aa..00000000 --- a/framework/res/layout/preview.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - -