diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2015-03-18 09:18:58 +0000 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2015-03-18 09:18:58 +0000 |
commit | e5f6fb9d984d8de4984ba360531caf739d36c00f (patch) | |
tree | f0b2efb982eb746bc5404db7dc2ff123edb6602f | |
parent | 29605b6806c4cb1aa6b54c5906f3979935b0c013 (diff) | |
download | sariulclocks-e5f6fb9d984d8de4984ba360531caf739d36c00f.tar.gz |
other sound buttons
-rw-r--r-- | assets/js/main.js | 15 | ||||
-rw-r--r-- | src/sariulclocks.hs | 7 |
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" |