From 766623f65ca90afcb7c12421c746d1c8e06ca24f Mon Sep 17 00:00:00 2001 From: Alib Date: Thu, 18 Mar 2010 10:44:47 +0100 Subject: added delete timer --- js/istreamdev.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'js') 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 = ''; + submitbuttons += '
  • Delete
  • '; $('#timer').append(submitbuttons); } else { -- cgit v1.2.3