aboutsummaryrefslogtreecommitdiff
path: root/views/_acknowledge_input.haml
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-06-15 19:47:24 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-06-15 19:47:24 +0100
commitfc0327f91fb134e1df994143a78c22df7d8f62e4 (patch)
tree9fb1161dbdece4428e6c65b1d555a67c7908fa9e /views/_acknowledge_input.haml
parent3576923edf788eecb4320e034f5afaaf625bd62e (diff)
Big interface clear up
Diffstat (limited to 'views/_acknowledge_input.haml')
-rw-r--r--views/_acknowledge_input.haml31
1 files changed, 31 insertions, 0 deletions
diff --git a/views/_acknowledge_input.haml b/views/_acknowledge_input.haml
new file mode 100644
index 0000000..b6fc24b
--- /dev/null
+++ b/views/_acknowledge_input.haml
@@ -0,0 +1,31 @@
+Acknowledge these alerts for
+%input#n_hours{ :name => 'n_hours', :type => "number", :min => 0, :max => 48, :value => 2, :style => "min-width: 6ex;"}
+%select#type_hours{:name => 'type_of_hours' }
+ -# Default to daytime hours
+ %option{ :value => "working" } working
+ %option{ :value => "daytime", :selected => "selected"} daytime
+ %option{ :value => "wallclock" } wall-clock
+hours
+%span#ack_until_text
+%input#ack_until{ :value => '', :type => :hidden, :name => 'ack_until' }
+%input{ :type => 'submit', :value => 'Go!' }
+:javascript
+ // Change of value in the hours box
+ $('#n_hours').change( function() {
+ updateDate();
+ });
+ // As above, but on keypress, with a delay
+ $('#n_hours').keyup( function() {
+ clearTimeout($.data(this, 'timer'));
+ var wait = setTimeout(updateDate, 500);
+ $(this).data('timer', wait);
+ });
+ // Same as the n_hours change function
+ $('#type_hours').change( function() {
+ $('#n_hours').change();
+ });
+ // Setup the ack text on load.
+ $(document).ready( function() {
+ $('#n_hours').change();
+ });
+