Commit 864d5d2e by Sebastián Katzer

Zusätzlichen Success-Handler hinzugefügt, um die Foreground/Background Callbacks…

Zusätzlichen Success-Handler hinzugefügt, um die Foreground/Background Callbacks aufzurufen zu können
parent 011703f9
...@@ -30,6 +30,12 @@ LocalNotification.prototype = { ...@@ -30,6 +30,12 @@ LocalNotification.prototype = {
foreground: '' foreground: ''
}; };
var callbackFn = function (callbackName, id) {
if (callbackName) {
eval(callbackName + '(' + id + ')');
}
};
for (var key in defaults) { for (var key in defaults) {
if (options[key] !== undefined) { if (options[key] !== undefined) {
defaults[key] = options[key]; defaults[key] = options[key];
...@@ -40,7 +46,7 @@ LocalNotification.prototype = { ...@@ -40,7 +46,7 @@ LocalNotification.prototype = {
defaults.date = Math.round(defaults.date.getTime()/1000); defaults.date = Math.round(defaults.date.getTime()/1000);
} }
cordova.exec(null, null, 'LocalNotification','add', [defaults]); cordova.exec(callbackFn, null, 'LocalNotification', 'add', [defaults]);
return defaults.id; return defaults.id;
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment