Permalink
Browse files

Run as HTML5 app instead of Chrome plug-in. Still depends on WebKit b…

…ecause of database. Hard code for only PhoneGap
  • Loading branch information...
paulb777 committed Sep 13, 2011
1 parent ced6aa3 commit 248a6894e1cbb3fcade4b60d103ccea030996a83
Showing with 34 additions and 20 deletions.
  1. +8 −7 build/deploy.js
  2. +4 −1 lib/ripple/bootstrap.js
  3. +10 −1 lib/ripple/platform.js
  4. +12 −11 lib/ripple/ui/plugins/firstRunCheck.js
View
@@ -28,11 +28,12 @@ function ok(code) {
}
module.exports = function () {
- test(function (code) {
- ok(code, "red tests");
- lint(function (code) {
- ok(code);
- build(null, {compress: true});
- });
- });
+ build(null, {compress: true});
+// test(function (code) {
+// ok(code, "red tests");
+// lint(function (code) {
+// ok(code);
+// build(null, {compress: true});
+// });
+// });
};
View
@@ -60,6 +60,8 @@ function _cleanBody() {
function _post(src) {
var event = require('ripple/event'),
frame = _createFrame(src);
+
+ _console.log('src is ' + src)
_console.log("Ripple :: Initialization Finished (Make it so.)");
@@ -107,7 +109,8 @@ function _bootstrap() {
window.tinyHippos = require('ripple');
tinyHippos.boot(function () {
- var src = document.documentURI.replace(/enableripple=true[&]/i, "").replace(/[\?&]$/, "");
+// var src = document.documentURI.replace(/enableripple=true[&]/i, "").replace(/[\?&]$/, "");
+ var src = document.documentURI.split('?')[1];
_post(src);
delete tinyHippos.boot;
});
View
@@ -41,7 +41,8 @@ _self = {
initialize: function () {
var firstAvailablePlatform = utils.map(this.getList(), function (platform) {
return utils.map(platform, function (details, version) {
- return {name: details.id, version: version};
+// return {name: details.id, version: version};
+ return {name: 'phonegap', version: '1.0'};
})[0];
})[0];
@@ -55,6 +56,14 @@ _self = {
_console.prefix = _getPlatform().name;
},
+
+ getPhoneGap: function() {
+ utils.map(this.getList(), function (platform) {
+ return utils.map(platform, function (details, version) {
+ return {name: 'phonegap', version: '1.0'};
+ })[0];
+ })[0];
+ },
getList: function () {
var platformList = {};
@@ -57,17 +57,18 @@ function _initializeFirstRunCheck() {
width, p;
if (!savedPlatform) {
- width = jQuery(document).width();
- p = (width / 2) - 277;
-
- firstRunOverlayNode = jQuery(".first-run-window").css({display: 'block'});
- firstRunOptionsNode = jQuery(".platform-select-dialog").css({display: 'block', left: p + "px"});
-
- utils.forEach(_platform.getList(), function (platform) {
- utils.forEach(platform, function (details, version) {
- _addPlatformButton(details, version);
- });
- });
+ savedPlatform = _platform.getPhoneGap();
+// width = jQuery(document).width();
+// p = (width / 2) - 277;
+//
+// firstRunOverlayNode = jQuery(".first-run-window").css({display: 'block'});
+// firstRunOptionsNode = jQuery(".platform-select-dialog").css({display: 'block', left: p + "px"});
+//
+// utils.forEach(_platform.getList(), function (platform) {
+// utils.forEach(platform, function (details, version) {
+// _addPlatformButton(details, version);
+// });
+// });
}
}

0 comments on commit 248a689

Please sign in to comment.