diff options
author | Alib <aliboba@free.fr> | 2010-03-18 10:44:47 +0100 |
---|---|---|
committer | Alib <aliboba@free.fr> | 2010-03-18 10:44:47 +0100 |
commit | 766623f65ca90afcb7c12421c746d1c8e06ca24f (patch) | |
tree | a0e44f55dd00075877df6048d5c0f4f69f9e8495 /js | |
parent | 10d99171582e17fe26b11e93bdfe319559fd80ad (diff) | |
download | istreamdev-766623f65ca90afcb7c12421c746d1c8e06ca24f.tar.gz istreamdev-766623f65ca90afcb7c12421c746d1c8e06ca24f.tar.bz2 |
added delete timer
Diffstat (limited to 'js')
-rw-r--r-- | js/istreamdev.js | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/js/istreamdev.js b/js/istreamdev.js index 764b521..290121c 100644 --- a/js/istreamdev.js +++ b/js/istreamdev.js @@ -650,6 +650,22 @@ $('#timers li[class="arrow"] a').tap(function(event) { }
});
+$('#edittimer a[rel="deletetimer"]').tap(function(event) {
+ event.preventDefault();
+ json_start(this);
+ var timer_id = $("input#timer_id").val();
+ dataString = 'action=delTimer&id=' + timer_id;
+ $.getJSON("bin/backend.php",
+ dataString,
+ function(data) {
+ message = data.status + ": " + data.message;
+ gen_timers("true");
+ showStatus( 0,message );
+ return false;
+ });
+});
+
+
// gen Timers
function gen_timers(edit) {
$('#timers ul[rel="timers"]').html('');
@@ -712,7 +728,7 @@ function gen_edittimer(id,name,active,channumber,channame,date,starttime,endtime $('#a_endtime').attr('href', "javascript:openSelectTime('layer_endtime','" + wheelend_h + "','" + wheelend_m + "')");
submitbuttons = '<ul ref="submitbut" class="individual">';
submitbuttons += '<li><a class="submit_form" href="#">Edit</a></li>';
- submitbuttons += '<li><a class="abutton" href="javascript:deletetimer(\'id\');">Delete</a></li></ul>';
+ submitbuttons += '<li><a class="abutton" rel="deletetimer" href="#">Delete</a></li></ul>';
$('#timer').append(submitbuttons);
}
else {
|