Permalink
Browse files

renamed navigator.apps to navigator.mozApps

  • Loading branch information...
1 parent ffec3b1 commit a480fa5bb0eb5abfb797405c025904cc7db6c12d @ianb ianb committed Sep 21, 2011
View
@@ -51,7 +51,7 @@ gDashboardState.pages = [];
var gLastInstalledApp = "";
function saveDashboardState( callback ) {
- navigator.apps.mgmt.saveState(gDashboardState, callback);
+ navigator.mozApps.mgmt.saveState(gDashboardState, callback);
}
@@ -182,12 +182,12 @@ function checkSavedData(save) {
// and then proceeds to bring the visual depiction into synchrony with the data, with the least visual interruption.
function updateDashboard( completionCallback ) {
//both the app list and dashboard data functions are asynchronous, so we need to do everything in the cal
- navigator.apps.mgmt.list( function (listOfInstalledApps) {
+ navigator.mozApps.mgmt.list( function (listOfInstalledApps) {
gApps = listOfInstalledApps;
//now, in the list callback, load the dashboard state
- navigator.apps.mgmt.loadState( function (dashState) {
+ navigator.mozApps.mgmt.loadState( function (dashState) {
gDashboardState = checkSavedData(dashState);
renderList();
@@ -213,7 +213,7 @@ function makeOpenAppTabFn(origin32)
$(this).removeClass("ui-draggable-dragged");
return false;
}
- navigator.apps.mgmt.launch(Base32.decode(origin32));
+ navigator.mozApps.mgmt.launch(Base32.decode(origin32));
}
} catch (e) {
if (typeof console !== "undefined") console.log("error launching: " + e);
@@ -301,7 +301,7 @@ function renderList(andLaunch) {
if (results.length == 1 && andLaunch)
{
- navigator.apps.mgmt.launch(results[0].origin);
+ navigator.mozApps.mgmt.launch(results[0].origin);
}
}
@@ -384,7 +384,7 @@ function onFocus(event)
}
function updateLoginStatus() {
- navigator.apps.mgmt.loginStatus(function (userInfo, loginInfo) {
+ navigator.mozApps.mgmt.loginStatus(function (userInfo, loginInfo) {
if (! userInfo) {
$('#login-link a').attr('href', loginInfo.loginLink);
$('#login-link').show();
@@ -461,7 +461,7 @@ if (window.addEventListener) {
// delButton.text("DELETE ?");
// } else {
//
-// navigator.apps.mgmt.uninstall( install.origin, function() {
+// navigator.mozApps.mgmt.uninstall( install.origin, function() {
// removeAppFromDock(install.origin32);
// removeWidget(install.origin32);
// saveDashboardState( function () {updateDashboard();} );
View
@@ -50,7 +50,7 @@ var gLastInstalledApp = "";
var gOverDock = false;
function saveDashboardState( callback ) {
- navigator.apps.mgmt.saveState(gDashboardState, callback);
+ navigator.mozApps.mgmt.saveState(gDashboardState, callback);
}
@@ -369,12 +369,12 @@ function checkSavedData(save) {
// and then proceeds to bring the visual depiction into synchrony with the data, with the least visual interruption.
function updateDashboard( completionCallback ) {
//both the app list and dashboard data functions are asynchronous, so we need to do everything in the cal
- navigator.apps.mgmt.list( function (listOfInstalledApps) {
+ navigator.mozApps.mgmt.list( function (listOfInstalledApps) {
gApps = listOfInstalledApps;
//now, in the list callback, load the dashboard state
- navigator.apps.mgmt.loadState( function (dashState) {
+ navigator.mozApps.mgmt.loadState( function (dashState) {
gDashboardState = checkSavedData(dashState);
//now, in the loadState callback, update everything.
@@ -406,7 +406,7 @@ function makeOpenAppTabFn(origin32)
$(this).removeClass("ui-draggable-dragged");
return false;
}
- navigator.apps.mgmt.launch(Base32.decode(origin32));
+ navigator.mozApps.mgmt.launch(Base32.decode(origin32));
}
} catch (e) {
if (typeof console !== "undefined") console.log("error launching: " + e);
@@ -447,7 +447,7 @@ function renderList(andLaunch) {
}
if (results.length == 1 && andLaunch)
{
- navigator.apps.mgmt.launch(results[0].origin);
+ navigator.mozApps.mgmt.launch(results[0].origin);
}
}
@@ -906,7 +906,7 @@ function onFocus(event)
}
function updateLoginStatus() {
- navigator.apps.mgmt.loginStatus(function (userInfo, loginInfo) {
+ navigator.mozApps.mgmt.loginStatus(function (userInfo, loginInfo) {
if (! userInfo) {
$('#login-link a').attr('href', loginInfo.loginLink);
$('#login-link').show();
@@ -998,7 +998,7 @@ function createAppInfoPane(origin32) {
delButton.text("DELETE ?");
} else {
- navigator.apps.mgmt.uninstall( install.origin, function() {
+ navigator.mozApps.mgmt.uninstall( install.origin, function() {
removeAppFromDock(install.origin32);
removeWidget(install.origin32);
saveDashboardState( function () {updateDashboard();} );
View
@@ -50,7 +50,7 @@ var gLastInstalledApp = "";
var gOverDock = false;
function saveDashboardState( callback ) {
- navigator.apps.mgmt.saveState(gDashboardState, callback);
+ navigator.mozApps.mgmt.saveState(gDashboardState, callback);
}
@@ -368,12 +368,12 @@ function checkSavedData(save) {
// and then proceeds to bring the visual depiction into synchrony with the data, with the least visual interruption.
function updateDashboard( completionCallback ) {
//both the app list and dashboard data functions are asynchronous, so we need to do everything in the cal
- navigator.apps.mgmt.list( function (listOfInstalledApps) {
+ navigator.mozApps.mgmt.list( function (listOfInstalledApps) {
gApps = listOfInstalledApps;
//now, in the list callback, load the dashboard state
- navigator.apps.mgmt.loadState( function (dashState) {
+ navigator.mozApps.mgmt.loadState( function (dashState) {
gDashboardState = checkSavedData(dashState);
//now, in the loadState callback, update everything.
@@ -403,7 +403,7 @@ function makeOpenAppTabFn(origin32)
$(this).removeClass("ui-draggable-dragged");
return false;
}
- navigator.apps.mgmt.launch(Base32.decode(origin32));
+ navigator.mozApps.mgmt.launch(Base32.decode(origin32));
}
} catch (e) {
if (typeof console !== "undefined") console.log("error launching: " + e);
@@ -444,7 +444,7 @@ function renderList(andLaunch) {
}
if (results.length == 1 && andLaunch)
{
- navigator.apps.mgmt.launch(results[0].origin);
+ navigator.mozApps.mgmt.launch(results[0].origin);
}
}
@@ -787,7 +787,7 @@ function onFocus(event)
}
function updateLoginStatus() {
- navigator.apps.mgmt.loginStatus(function (userInfo, loginInfo) {
+ navigator.mozApps.mgmt.loginStatus(function (userInfo, loginInfo) {
if (! userInfo) {
$('#login-link a').attr('href', loginInfo.loginLink);
$('#login-link').show();
@@ -879,7 +879,7 @@ function createAppInfoPane(origin32) {
delButton.text("DELETE ?");
} else {
- navigator.apps.mgmt.uninstall( install.origin, function() {
+ navigator.mozApps.mgmt.uninstall( install.origin, function() {
removeAppFromDock(install.origin32);
removeWidget(install.origin32);
saveDashboardState( function () {updateDashboard();} );
View
@@ -226,7 +226,7 @@ $(document).ready(function() {
function saveDashboardState( callback ) {
- navigator.apps.mgmt.saveState(gDashboardState, callback);
+ navigator.mozApps.mgmt.saveState(gDashboardState, callback);
}
@@ -277,7 +277,7 @@ function updateDashboard( completionCallback ) {
computeLayoutVars();
$(".background").css({width: screenWidth, height: screenHeight});
- navigator.apps.mgmt.list( function (listOfInstalledApps) {
+ navigator.mozApps.mgmt.list( function (listOfInstalledApps) {
gApps = listOfInstalledApps;
@@ -295,7 +295,7 @@ function updateDashboard( completionCallback ) {
//now, in the list callback, load the dashboard state
- navigator.apps.mgmt.loadState( function (dashState)
+ navigator.mozApps.mgmt.loadState( function (dashState)
{
gDashboardState = checkSavedData(dashState);
@@ -469,7 +469,7 @@ function createAppItem(install)
}
clickyIcon.click(function() {
- navigator.apps.mgmt.launch(install.origin);
+ navigator.mozApps.mgmt.launch(install.origin);
});
clickyIcon.append(appIcon);
@@ -581,7 +581,7 @@ function createAppItem(install)
// //NEED TO CHECK Y OFFSET! THEY MAY HAVE MOVED OFF ICON
// console.log("app tapped");
// var origin32 = $(e.target.parentNode).attr("origin32");
-// navigator.apps.mgmt.launch(Base32.decode(origin32));
+// navigator.mozApps.mgmt.launch(Base32.decode(origin32));
// } else if (flick) {
// //we go to the next page in the direction specified by the flick
// console.log("was flicked");
@@ -636,7 +636,7 @@ function createAppItem(install)
// }
//
// function updateLoginStatus() {
-// navigator.apps.mgmt.loginStatus(function (userInfo, loginInfo) {
+// navigator.mozApps.mgmt.loginStatus(function (userInfo, loginInfo) {
// if (! userInfo) {
// $('#login-link a').attr('href', loginInfo.loginLink);
// $('#login-link').show();
View
@@ -208,7 +208,7 @@ $(document).ready(function() {
function saveDashboardState( callback ) {
- navigator.apps.mgmt.saveState(gDashboardState, callback);
+ navigator.mozApps.mgmt.saveState(gDashboardState, callback);
}
@@ -259,7 +259,7 @@ function updateDashboard( completionCallback ) {
computeLayoutVars();
$(".background").css({width: screenWidth, height: screenHeight});
- navigator.apps.mgmt.list( function (listOfInstalledApps) {
+ navigator.mozApps.mgmt.list( function (listOfInstalledApps) {
gApps = listOfInstalledApps;
@@ -277,7 +277,7 @@ function updateDashboard( completionCallback ) {
//now, in the list callback, load the dashboard state
- navigator.apps.mgmt.loadState( function (dashState)
+ navigator.mozApps.mgmt.loadState( function (dashState)
{
gDashboardState = checkSavedData(dashState);
@@ -435,7 +435,7 @@ function createAppItem(install)
}
clickyIcon.click(function() {
- navigator.apps.mgmt.launch(install.origin);
+ navigator.mozApps.mgmt.launch(install.origin);
});
clickyIcon.append(appIcon);
@@ -547,7 +547,7 @@ function createAppItem(install)
// //NEED TO CHECK Y OFFSET! THEY MAY HAVE MOVED OFF ICON
// console.log("app tapped");
// var origin32 = $(e.target.parentNode).attr("origin32");
-// navigator.apps.mgmt.launch(Base32.decode(origin32));
+// navigator.mozApps.mgmt.launch(Base32.decode(origin32));
// } else if (flick) {
// //we go to the next page in the direction specified by the flick
// console.log("was flicked");
@@ -602,7 +602,7 @@ function createAppItem(install)
// }
//
// function updateLoginStatus() {
-// navigator.apps.mgmt.loginStatus(function (userInfo, loginInfo) {
+// navigator.mozApps.mgmt.loginStatus(function (userInfo, loginInfo) {
// if (! userInfo) {
// $('#login-link a').attr('href', loginInfo.loginLink);
// $('#login-link').show();
View
@@ -33,7 +33,7 @@ navigator.allApps = (function() {
function doList(onsuccess, onerror) {
// First get list of web apps
- navigator.apps.mgmt.list(
+ navigator.mozApps.mgmt.list(
function(webapps) {
getNativeApps(webapps, onsuccess, onerror);
},
@@ -51,17 +51,17 @@ navigator.allApps = (function() {
);
onsuccess(true);
} else {
- navigator.apps.mgmt.launch(id, onsuccess, onerror);
+ navigator.mozApps.mgmt.launch(id, onsuccess, onerror);
}
}
return {
mgmt: {
list: doList,
launch: doLaunch,
- loadState: navigator.apps.mgmt.loadState,
- saveState: navigator.apps.mgmt.saveState,
- uninstall: navigator.apps.mgmt.uninstall,
+ loadState: navigator.mozApps.mgmt.loadState,
+ saveState: navigator.mozApps.mgmt.saveState,
+ uninstall: navigator.mozApps.mgmt.uninstall,
}
};
})();
@@ -1,5 +1,5 @@
// Inject a new API into navigator to present a merged web & native app list
-navigator.apps = (function() {
+navigator.mozApps = (function() {
var _state;
var _nativeApps = {};
var _demoNativeApps = {
@@ -1,5 +1,5 @@
// Inject a new API into navigator to present a merged web & native app list
-navigator.apps = (function() {
+navigator.mozApps = (function() {
var _state;
var _nativeApps = {};
View
@@ -43,17 +43,17 @@
-Lloyd Hilaiel. Mozilla
**/
-// inject into navigator.apps if it doesn't exist
-if (!navigator.apps) {
- navigator.apps = {};
+// inject into navigator.mozApps if it doesn't exist
+if (!navigator.mozApps) {
+ navigator.mozApps = {};
}
-// inject if navigator.apps.install isn't defined or if
-// navigator.apps.html5Implementation is true (this latter check
+// inject if navigator.mozApps.install isn't defined or if
+// navigator.mozApps.html5Implementation is true (this latter check
// works around bad firefox behavior which doesn't properly
// restoring navigator.XXX to a pristine state upon reload)
-if (!navigator.apps.install || navigator.apps.html5Implementation) {
- navigator.apps = (function() {
+if (!navigator.mozApps.install || navigator.mozApps.html5Implementation) {
+ navigator.mozApps = (function() {
////////////////////////////////////////////////////////////
// an inline copy of jschannel - http://github.com/mozilla/jschannel
View
@@ -1,5 +1,5 @@
// Inject a new API into navigator to present a merged web & native app list
-navigator.apps = (function() {
+navigator.mozApps = (function() {
var _state;
function doList(onsuccess, onerror) {
@@ -63,13 +63,13 @@ $(document).ready(function() {
$(".upsell").unbind('click').html("I'm installed! You can check me out on your <a href='https://myapps.mozillalabs.com'>dashboard</a>.");
}
- navigator.apps.amInstalled(function(data) {
+ navigator.mozApps.amInstalled(function(data) {
if (data) {
izInstalled();
} else {
var contents = $("<span>Wanna <span>install me</span>? Then click!</span>");
$(".upsell").append(contents).click(function() {
- navigator.apps.install({
+ navigator.mozApps.install({
url: "/manifest.webapp",
onsuccess: function() {
izInstalled();
@@ -32,10 +32,11 @@ def main():
phantom_proc = subprocess.Popen(
['pyphantomjs', 'js/phantomrunner.js', '--server-port', str(SERVER_PORT)], cwd=here)
phantom_proc.communicate()
+ returncode = phantom_proc.returncode
phantom_proc = None
os.kill(server_proc.pid, signal.SIGKILL)
server_proc = None
- sys.exit(phantom_proc.returncode)
+ sys.exit(returncode)
finally:
if server_proc is not None:
print 'Killing node server'
Oops, something went wrong.

0 comments on commit a480fa5

Please sign in to comment.