Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update to 2.3.0rc2

  • Loading branch information...
commit 476b6869409e43879a1c011ae4c6e2bf177f1349 1 parent 7bd2fbf
@purplecabbage purplecabbage authored
View
2  VERSION
@@ -1 +1 @@
-2.3.0rc1
+2.3.0rc2
View
110 example/www/cordova-2.3.0.js
@@ -1,6 +1,6 @@
-// commit c46b14085ce80cda5f72d6af22bc22afe4c2151d
+// commit 861ff3d507fd5c64ed789d8abe360690e588252e
-// File generated at :: Mon Nov 26 2012 15:31:36 GMT-0800 (Pacific Standard Time)
+// File generated at :: Fri Dec 14 2012 15:28:53 GMT-0800 (Pacific Standard Time)
/*
Licensed to the Apache Software Foundation (ASF) under one
@@ -3110,18 +3110,55 @@ define("cordova/plugin/InAppBrowser", function(require, exports, module) {
var exec = require('cordova/exec');
-var InAppBrowser = {
- open : function(strUrl, strWindowName, strWindowFeatures) {
- exec(null, null, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]);
- return InAppBrowser;
- },
- close : function() {
- exec(null, null, "InAppBrowser", "close", []);
+function InAppBrowser()
+{
+ var _channel = require('cordova/channel');
+ this.channels = {
+ 'loadstart': _channel.create('loadstart'),
+ 'loadstop' : _channel.create('loadstop'),
+ 'exit' : _channel.create('exit')
+ };
+}
+
+InAppBrowser.prototype._eventHandler = function(event)
+{
+ if (event.type in this.channels) {
+ this.channels[event.type].fire(event);
}
-};
+}
+
+InAppBrowser.open = function(strUrl, strWindowName, strWindowFeatures)
+{
+ var iab = new InAppBrowser();
+ var cb = function(eventname) {
+ iab._eventHandler(eventname);
+ }
+ exec(cb, null, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]);
+ return iab;
+}
+
+InAppBrowser.prototype.close = function(eventname, f)
+{
+ exec(null, null, "InAppBrowser", "close", []);
+}
+
+InAppBrowser.prototype.addEventListener = function(eventname, f)
+{
+ if (eventname in this.channels) {
+ this.channels[eventname].subscribe(f);
+ }
+}
+
+InAppBrowser.prototype.removeEventListener = function(eventname, f)
+{
+ if (eventname in this.channels) {
+ this.channels[eventname].unsubscribe(f);
+ }
+}
module.exports = InAppBrowser.open;
+
});
// file: lib\common\plugin\LocalFileSystem.js
@@ -5840,7 +5877,7 @@ if (!docDomain || docDomain.length === 0) {
newUrl = newUrl.split(":/")[1];
}
// prefix relative urls to our physical root
- if(newUrl.indexOf("app/www/") < 0)
+ if(newUrl.indexOf("app/www/") < 0 && this.getContentLocation() == this.contentLocation.ISOLATED_STORAGE)
{
newUrl = "app/www/" + newUrl;
}
@@ -5907,26 +5944,51 @@ if (!docDomain || docDomain.length === 0) {
alias.onError(evt.code);
};
- var gotFile = function gotFile(file) {
- var reader = new FileReader();
- reader.onloadend = function (evt) {
- alias.onResult.apply(alias,[evt.target.result]);
+ if (alias.getContentLocation() == this.contentLocation.RESOURCES) {
+ var exec = require('cordova/exec');
+ exec(function(result) {
+ alias.onResult.apply(alias, [result]);
+ },
+ fail,
+ "File", "readResourceAsText", [alias._url]
+ );
+ }
+ else {
+ var gotFile = function gotFile(file) {
+ var reader = new FileReader();
+ reader.onloadend = function (evt) {
+ alias.onResult.apply(alias,[evt.target.result]);
+ };
+ reader.readAsText(file);
};
- reader.readAsText(file);
- };
- var gotEntry = function gotEntry(entry) {
- entry.file(gotFile, fail);
- };
+ var gotEntry = function gotEntry(entry) {
+ entry.file(gotFile, fail);
+ };
- var gotFS = function gotFS(fs) {
- fs.root.getFile(alias._url, null, gotEntry, fail);
- };
+ var gotFS = function gotFS(fs) {
+ fs.root.getFile(alias._url, null, gotEntry, fail);
+ };
- window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail);
+ window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail);
+ }
+ }
+ },
+ getContentLocation: function () {
+ if (window.contentLocation === undefined) {
+ window.contentLocation = (navigator.userAgent.toUpperCase().indexOf('MSIE 10') > -1) ?
+ this.contentLocation.RESOURCES : this.contentLocation.ISOLATED_STORAGE;
}
+
+ return window.contentLocation;
+ },
+
+ contentLocation:{
+ ISOLATED_STORAGE: 0,
+ RESOURCES: 1
},
+
status: 404
};
} // if doc domain
View
2  templates/full/VERSION
@@ -1 +1 @@
-2.3.0rc1
+2.3.0rc2
View
110 templates/full/www/cordova-2.3.0.js
@@ -1,6 +1,6 @@
-// commit c46b14085ce80cda5f72d6af22bc22afe4c2151d
+// commit 861ff3d507fd5c64ed789d8abe360690e588252e
-// File generated at :: Mon Nov 26 2012 15:31:36 GMT-0800 (Pacific Standard Time)
+// File generated at :: Fri Dec 14 2012 15:28:53 GMT-0800 (Pacific Standard Time)
/*
Licensed to the Apache Software Foundation (ASF) under one
@@ -3110,18 +3110,55 @@ define("cordova/plugin/InAppBrowser", function(require, exports, module) {
var exec = require('cordova/exec');
-var InAppBrowser = {
- open : function(strUrl, strWindowName, strWindowFeatures) {
- exec(null, null, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]);
- return InAppBrowser;
- },
- close : function() {
- exec(null, null, "InAppBrowser", "close", []);
+function InAppBrowser()
+{
+ var _channel = require('cordova/channel');
+ this.channels = {
+ 'loadstart': _channel.create('loadstart'),
+ 'loadstop' : _channel.create('loadstop'),
+ 'exit' : _channel.create('exit')
+ };
+}
+
+InAppBrowser.prototype._eventHandler = function(event)
+{
+ if (event.type in this.channels) {
+ this.channels[event.type].fire(event);
}
-};
+}
+
+InAppBrowser.open = function(strUrl, strWindowName, strWindowFeatures)
+{
+ var iab = new InAppBrowser();
+ var cb = function(eventname) {
+ iab._eventHandler(eventname);
+ }
+ exec(cb, null, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]);
+ return iab;
+}
+
+InAppBrowser.prototype.close = function(eventname, f)
+{
+ exec(null, null, "InAppBrowser", "close", []);
+}
+
+InAppBrowser.prototype.addEventListener = function(eventname, f)
+{
+ if (eventname in this.channels) {
+ this.channels[eventname].subscribe(f);
+ }
+}
+
+InAppBrowser.prototype.removeEventListener = function(eventname, f)
+{
+ if (eventname in this.channels) {
+ this.channels[eventname].unsubscribe(f);
+ }
+}
module.exports = InAppBrowser.open;
+
});
// file: lib\common\plugin\LocalFileSystem.js
@@ -5840,7 +5877,7 @@ if (!docDomain || docDomain.length === 0) {
newUrl = newUrl.split(":/")[1];
}
// prefix relative urls to our physical root
- if(newUrl.indexOf("app/www/") < 0)
+ if(newUrl.indexOf("app/www/") < 0 && this.getContentLocation() == this.contentLocation.ISOLATED_STORAGE)
{
newUrl = "app/www/" + newUrl;
}
@@ -5907,26 +5944,51 @@ if (!docDomain || docDomain.length === 0) {
alias.onError(evt.code);
};
- var gotFile = function gotFile(file) {
- var reader = new FileReader();
- reader.onloadend = function (evt) {
- alias.onResult.apply(alias,[evt.target.result]);
+ if (alias.getContentLocation() == this.contentLocation.RESOURCES) {
+ var exec = require('cordova/exec');
+ exec(function(result) {
+ alias.onResult.apply(alias, [result]);
+ },
+ fail,
+ "File", "readResourceAsText", [alias._url]
+ );
+ }
+ else {
+ var gotFile = function gotFile(file) {
+ var reader = new FileReader();
+ reader.onloadend = function (evt) {
+ alias.onResult.apply(alias,[evt.target.result]);
+ };
+ reader.readAsText(file);
};
- reader.readAsText(file);
- };
- var gotEntry = function gotEntry(entry) {
- entry.file(gotFile, fail);
- };
+ var gotEntry = function gotEntry(entry) {
+ entry.file(gotFile, fail);
+ };
- var gotFS = function gotFS(fs) {
- fs.root.getFile(alias._url, null, gotEntry, fail);
- };
+ var gotFS = function gotFS(fs) {
+ fs.root.getFile(alias._url, null, gotEntry, fail);
+ };
- window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail);
+ window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail);
+ }
+ }
+ },
+ getContentLocation: function () {
+ if (window.contentLocation === undefined) {
+ window.contentLocation = (navigator.userAgent.toUpperCase().indexOf('MSIE 10') > -1) ?
+ this.contentLocation.RESOURCES : this.contentLocation.ISOLATED_STORAGE;
}
+
+ return window.contentLocation;
+ },
+
+ contentLocation:{
+ ISOLATED_STORAGE: 0,
+ RESOURCES: 1
},
+
status: 404
};
} // if doc domain
View
2  templates/standalone/VERSION
@@ -1 +1 @@
-2.3.0rc1
+2.3.0rc2
View
110 templates/standalone/www/cordova-2.3.0.js
@@ -1,6 +1,6 @@
-// commit c46b14085ce80cda5f72d6af22bc22afe4c2151d
+// commit 861ff3d507fd5c64ed789d8abe360690e588252e
-// File generated at :: Mon Nov 26 2012 15:31:36 GMT-0800 (Pacific Standard Time)
+// File generated at :: Fri Dec 14 2012 15:28:53 GMT-0800 (Pacific Standard Time)
/*
Licensed to the Apache Software Foundation (ASF) under one
@@ -3110,18 +3110,55 @@ define("cordova/plugin/InAppBrowser", function(require, exports, module) {
var exec = require('cordova/exec');
-var InAppBrowser = {
- open : function(strUrl, strWindowName, strWindowFeatures) {
- exec(null, null, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]);
- return InAppBrowser;
- },
- close : function() {
- exec(null, null, "InAppBrowser", "close", []);
+function InAppBrowser()
+{
+ var _channel = require('cordova/channel');
+ this.channels = {
+ 'loadstart': _channel.create('loadstart'),
+ 'loadstop' : _channel.create('loadstop'),
+ 'exit' : _channel.create('exit')
+ };
+}
+
+InAppBrowser.prototype._eventHandler = function(event)
+{
+ if (event.type in this.channels) {
+ this.channels[event.type].fire(event);
}
-};
+}
+
+InAppBrowser.open = function(strUrl, strWindowName, strWindowFeatures)
+{
+ var iab = new InAppBrowser();
+ var cb = function(eventname) {
+ iab._eventHandler(eventname);
+ }
+ exec(cb, null, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]);
+ return iab;
+}
+
+InAppBrowser.prototype.close = function(eventname, f)
+{
+ exec(null, null, "InAppBrowser", "close", []);
+}
+
+InAppBrowser.prototype.addEventListener = function(eventname, f)
+{
+ if (eventname in this.channels) {
+ this.channels[eventname].subscribe(f);
+ }
+}
+
+InAppBrowser.prototype.removeEventListener = function(eventname, f)
+{
+ if (eventname in this.channels) {
+ this.channels[eventname].unsubscribe(f);
+ }
+}
module.exports = InAppBrowser.open;
+
});
// file: lib\common\plugin\LocalFileSystem.js
@@ -5840,7 +5877,7 @@ if (!docDomain || docDomain.length === 0) {
newUrl = newUrl.split(":/")[1];
}
// prefix relative urls to our physical root
- if(newUrl.indexOf("app/www/") < 0)
+ if(newUrl.indexOf("app/www/") < 0 && this.getContentLocation() == this.contentLocation.ISOLATED_STORAGE)
{
newUrl = "app/www/" + newUrl;
}
@@ -5907,26 +5944,51 @@ if (!docDomain || docDomain.length === 0) {
alias.onError(evt.code);
};
- var gotFile = function gotFile(file) {
- var reader = new FileReader();
- reader.onloadend = function (evt) {
- alias.onResult.apply(alias,[evt.target.result]);
+ if (alias.getContentLocation() == this.contentLocation.RESOURCES) {
+ var exec = require('cordova/exec');
+ exec(function(result) {
+ alias.onResult.apply(alias, [result]);
+ },
+ fail,
+ "File", "readResourceAsText", [alias._url]
+ );
+ }
+ else {
+ var gotFile = function gotFile(file) {
+ var reader = new FileReader();
+ reader.onloadend = function (evt) {
+ alias.onResult.apply(alias,[evt.target.result]);
+ };
+ reader.readAsText(file);
};
- reader.readAsText(file);
- };
- var gotEntry = function gotEntry(entry) {
- entry.file(gotFile, fail);
- };
+ var gotEntry = function gotEntry(entry) {
+ entry.file(gotFile, fail);
+ };
- var gotFS = function gotFS(fs) {
- fs.root.getFile(alias._url, null, gotEntry, fail);
- };
+ var gotFS = function gotFS(fs) {
+ fs.root.getFile(alias._url, null, gotEntry, fail);
+ };
- window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail);
+ window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail);
+ }
+ }
+ },
+ getContentLocation: function () {
+ if (window.contentLocation === undefined) {
+ window.contentLocation = (navigator.userAgent.toUpperCase().indexOf('MSIE 10') > -1) ?
+ this.contentLocation.RESOURCES : this.contentLocation.ISOLATED_STORAGE;
}
+
+ return window.contentLocation;
+ },
+
+ contentLocation:{
+ ISOLATED_STORAGE: 0,
+ RESOURCES: 1
},
+
status: 404
};
} // if doc domain
Please sign in to comment.
Something went wrong with that request. Please try again.