From 97d4c947603e6379648f6f150bc66cc35f46ea74 Mon Sep 17 00:00:00 2001
From: Piotr Dabrowski
Date: Thu, 29 Aug 2013 11:45:13 +0200
Subject: [PATCH] [HybridWebApp] updated HybridWebApp sources
Change-Id: I4f17845375a414c9d1f116f090b06c6249ee4475
---
js/main.js | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/js/main.js b/js/main.js
index a204526..bb0befd 100644
--- a/js/main.js
+++ b/js/main.js
@@ -30,9 +30,9 @@ $(document).delegate("#main", "pageinit", function() {
$("#btn-start").bind("vclick", function(){
if(gLocalMessagePort) {
- showAlert("Already running.");
+ showAlert("Cannot start:
already running");
} else if(isStarting){
- showAlert("Now starting...");
+ showAlert("Cannot start:
service is starting");
} else {
isStarting = true;
start();
@@ -40,10 +40,12 @@ $(document).delegate("#main", "pageinit", function() {
return false;
});
$("#btn-stop").bind("vclick", function(){
- if(gRemoteMessagePort) {
+ if(isStarting) {
+ showAlert("Cannot stop:
service is starting");
+ } else if(gRemoteMessagePort) {
sendCommand("stop");
} else {
- showAlert("Not running.");
+ showAlert("Cannot stop:
not running");
}
return false;
});
@@ -201,12 +203,13 @@ function launchServiceApp() {
console.log("Launching [" + gServiceAppId + "] ...");
tizen.application.launch(gServiceAppId, onSuccess, onError);
} catch (exc) {
- showAlert("launch exc:" + exc.message);
+ console.log("Exception while launching HybridServiceApp: " + exc.message);
+ showAlert("Exception while launching HybridServiceApp:
" + exc.message);
}
}
function showAlert(message) {
var alertPopup = $("#alert-popup");
- alertPopup.find("#message").text(message);
+ alertPopup.find("#message").html(message);
alertPopup.popup("open", {positionTo: "window"});
}
\ No newline at end of file
--
2.7.4