Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cancelAll method #17

Open
luigi37 opened this issue Mar 7, 2014 · 1 comment
Open

cancelAll method #17

luigi37 opened this issue Mar 7, 2014 · 1 comment

Comments

@luigi37
Copy link
Contributor

luigi37 commented Mar 7, 2014

Can we add a javascript method to cancelAll alaram in one?

@Red-Folder
Copy link
Owner

Luigi provided some workaround code in #18

Quick and dirty....

 function cancelAllAlarm(dataA) {
        for (var x in dataA) {
        console.log("----------------------------------------------- Alarm:"+dataA[x].id);
        scheduler.cancelAlarm( dataA[x].id,
            function(data) {
            scheduler.getAlarms(    function(dataA) { console.log("------ Alarm list:"+data) },
            function(data) { console.log("----- Scheduler cancel alarm" +dataA[x].id+" ok:"+data) });
            },
            function(data) { console.log("----- Scheduler cancel alarm"+dataA[x].id+" PROBLEM:"+data) }
        ); 
        };
    } 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants