Commit 864d5d2e authored by Sebastián Katzer's avatar Sebastián Katzer
Browse files

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

Zusätzlichen Success-Handler hinzugefügt, um die Foreground/Background Callbacks aufzurufen zu können
parent 011703f9
Loading
Loading
Loading
Loading
+7 −1
Changes for www/local-notification.js: 7 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -30,6 +30,12 @@ LocalNotification.prototype = {
            foreground: ''
        };

        var callbackFn = function (callbackName, id) {
            if (callbackName) {
                eval(callbackName + '(' + id + ')');
            }
        };

        for (var key in defaults) {
            if (options[key] !== undefined) {
                defaults[key] = options[key];
@@ -40,7 +46,7 @@ LocalNotification.prototype = {
            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;
    },