Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

Commit

Permalink
Fixes for Notify sample to match docs and correct JavaScript
Browse files Browse the repository at this point in the history
  • Loading branch information
timwindsor committed Apr 1, 2014
1 parent 28b3f7b commit d57b1ce
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion notify/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ limitations under the License.
version="1.0.0"
id="notifySample">
<name>Notification Sample</name>
<content src="index.htm"/>
<content src="index.html"/>
<author>Research In Motion Ltd.</author>
<license href="http://www.apache.org/licenses/LICENSE-2.0">
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
21 changes: 10 additions & 11 deletions notify/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@
function onInvoked(data) {
var ele = document.createElement("div"), sb = [], log = document.getElementById("log");

sb.append("<p>Source: " + data.source + "</p>");
sb.append("<p>Target: " + data.target + "</p>");
sb.append("<p>Action: " + data.action + "</p>");
sb.append("<p>Type: " + data.type + "</p>");
sb.append("<p>URI: " + data.uri + "</p>");
sb.append("<p>Data: " + data.data + "</p>");
sb.push("<p>Source: " + data.source + "</p>");
sb.push("<p>Target: " + data.target + "</p>");
sb.push("<p>Action: " + data.action + "</p>");
sb.push("<p>Type: " + data.type + "</p>");
sb.push("<p>URI: " + data.uri + "</p>");
sb.push("<p>Data: " + data.data + "</p>");

ele.innerHTML = sb.toString();
if (log) {
log.appendChild(ele);
}
};
}

function notifySimple () {
var n = new Notification("simple notification");
Expand All @@ -69,10 +69,9 @@

function notifyParams () {
var n = new Notification("button4", {
'target' : "notifyTest",
'targetAction' : "bb.action.OPEN",
'payloadURI' : "http://www.blackberry.com",
'payloadType' : "text/html"
'payLoadURI' : "http://www.blackberry.com",
'payLoadType' : "text/html"
});
console.log(n);
}
Expand All @@ -97,7 +96,7 @@
}

function setButtonListeners() {
};
}

window.addEventListener("load", function () {
document.addEventListener("deviceready", function(e) {
Expand Down

0 comments on commit d57b1ce

Please sign in to comment.