aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2015-03-18 09:18:58 +0000
committerSean Whitton <spwhitton@spwhitton.name>2015-03-18 09:18:58 +0000
commite5f6fb9d984d8de4984ba360531caf739d36c00f (patch)
treef0b2efb982eb746bc5404db7dc2ff123edb6602f
parent29605b6806c4cb1aa6b54c5906f3979935b0c013 (diff)
downloadsariulclocks-e5f6fb9d984d8de4984ba360531caf739d36c00f.tar.gz
other sound buttons
-rw-r--r--assets/js/main.js15
-rw-r--r--src/sariulclocks.hs7
2 files changed, 20 insertions, 2 deletions
diff --git a/assets/js/main.js b/assets/js/main.js
index 6e4379f..b3ad26e 100644
--- a/assets/js/main.js
+++ b/assets/js/main.js
@@ -347,6 +347,21 @@ $(document).bind('keydown', 'b', function (){$.ionSound.play("school_bell");});
$(document).ready(function(){
+ $('#klaxon').button();
+ $('#klaxon').click(function (){$.ionSound.play("klaxon");});
+
+ $('#bell').button();
+ $('#bell').click(function (){$.ionSound.play("school_bell");});
+
+ $('#one-two-three').button();
+ $('#one-two-three').click(function (){$.ionSound.play("onetwothree");});
+
+ $('#too-noisy').button();
+ $('#too-noisy').click(function (){$.ionSound.play("too_noisy");});
+
+ $('#sit-down-quickly').button();
+ $('#sit-down-quickly').click(function (){$.ionSound.play("sit_down_quickly");});
+
$('#start-lesson').button();
$('#start-lesson').click(function (){ startLesson(); });
diff --git a/src/sariulclocks.hs b/src/sariulclocks.hs
index 920a209..e3ac20e 100644
--- a/src/sariulclocks.hs
+++ b/src/sariulclocks.hs
@@ -40,8 +40,11 @@ navBar = do
, strAttr "href" "#"]
<< ("Play sound " +++ thespan # "caret" << noHtml)
+++ ulist # "dropdown-menu" ! [strAttr "role" "menu"]
- << ((li << anchor ! [strAttr "href" "#"] << "Klaxon")
- +++ (li << anchor ! [strAttr "href" "#"] << "Too noisy")))
+ << ((li << anchor #= "klaxon" ! [strAttr "href" "#"] << "Klaxon")
+ +++ (li << anchor #= "bell" ! [strAttr "href" "#"] << "Bell")
+ +++ (li << anchor #= "one-two-three" ! [strAttr "href" "#"] << "One, two, three")
+ +++ (li << anchor #= "too-noisy" ! [strAttr "href" "#"] << "Too noisy")
+ +++ (li << anchor #= "sit-down-quickly" ! [strAttr "href" "#"] << "Sit down quickly")))
lessonButtons :: Maybe Class -> Html
lessonButtons Nothing = bsButton "start-lesson" "btn btn-info" "Start lesson"