From cb5463a35be619ef802b8fbed2748fbd9c28ce2f Mon Sep 17 00:00:00 2001 From: Alib Date: Mon, 22 Feb 2010 01:25:00 +0100 Subject: finalised edit_timer template. --- edit_timer.html | 221 ++++++++++++++++++++++++-------------------------------- 1 file changed, 94 insertions(+), 127 deletions(-) (limited to 'edit_timer.html') diff --git a/edit_timer.html b/edit_timer.html index b940b9f..6cbdcb0 100755 --- a/edit_timer.html +++ b/edit_timer.html @@ -7,6 +7,8 @@ + + Title of your page @@ -35,6 +37,66 @@ function updateOrientation() { frm = document.getElementById(formid); frm.submit(); } +function openSelectDate() { + var now = new Date(); + var now_year = now.getFullYear(); + var now_month = now.getMonth()+1; + var now_day = now.getDate(); + var layer = 'layer_date'; + var days = { }; + var years = { }; + var months = { 1: 'Jan', 2: 'Feb', 3: 'Mar', 4: 'Apr', 5: 'May', 6: 'Jun', 7: 'Jul', 8: 'Aug', 9: 'Sep', 10: 'Oct', 11: 'Nov', 12: 'Dec' }; + + for( var i = 1; i < 32; i += 1 ) { + days[i] = i; + } + + for( i = now.getFullYear(); i < now.getFullYear()+5; i += 1 ) { + years[i] = i; + } + + SpinningWheel.addSlot(days, 'right', now_day); + SpinningWheel.addSlot(months, '', now_month); + SpinningWheel.addSlot(years, 'right', now_year ); + + SpinningWheel.setCancelAction(cancel_date); + SpinningWheel.setDoneAction(done_date); + + SpinningWheel.open(); +} + +function done_date() { + var results = SpinningWheel.getSelectedValues(); + document.getElementById('layer_date').innerHTML = results.values.join('-'); + document.timer.timer_date.value = results.keys.join('-'); + +} + +function cancel_date() { +} +function openSelectTime(layer) { + var now = new Date(); + var now_hour = now.getHours(); + var now_minute = now.getMinutes()+1; + var hours = { }; + var minutes = { }; + + for( var i = 00; i < 24; i += 1 ) { + hours[i] = i; + } + + for( var i = 00; i < 60; i += 1 ) { + minutes[i] = i; + } + + SpinningWheel.addSlot(hours, 'right', now_hour); + SpinningWheel.addSlot({ separator: 'h' }, 'readonly shrink'); + SpinningWheel.addSlot(minutes, '', now_minute); + + SpinningWheel.setCancelAction( function() {} ); + SpinningWheel.setDoneAction(function () {var results = SpinningWheel.getSelectedValues(); document.getElementById(layer).innerHTML = results.values.join('');if ( layer == 'layer_starttime' ) { var forminput = 'timer_starttime'; } else { var forminput = 'timer_endtime'; }; eval ("document.timer." + forminput + ".value = results.keys.join('')"); }); + SpinningWheel.open(); +} @@ -50,154 +112,59 @@ iStream
Edit Timer + +
  • Recording name
  • - +
  • Channel
  • - - + - - + +
+
    -
  • Start time
  • -
  • - -
  • -
  • - -
  • +
  • Date
  • + +
-
    -
  • End time
  • -
  • - -
  • -
  • - -
  • + + + + + + + +
    • -
    • -
    + +
+