From e5ef906494b33351449faf100984c90a135dcb3e Mon Sep 17 00:00:00 2001 From: iAmShorty Date: Thu, 22 May 2014 16:06:13 +0200 Subject: [PATCH 1/3] [UPDATE] mute blocknotify --- templates/bootstrap/dashboard/blocks/default.tpl | 3 +++ templates/bootstrap/dashboard/default.tpl | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/templates/bootstrap/dashboard/blocks/default.tpl b/templates/bootstrap/dashboard/blocks/default.tpl index 46467cd6..85201d0c 100644 --- a/templates/bootstrap/dashboard/blocks/default.tpl +++ b/templates/bootstrap/dashboard/blocks/default.tpl @@ -37,6 +37,9 @@ + {/if} diff --git a/templates/bootstrap/dashboard/default.tpl b/templates/bootstrap/dashboard/default.tpl index e042fa1e..dbb3b8aa 100644 --- a/templates/bootstrap/dashboard/default.tpl +++ b/templates/bootstrap/dashboard/default.tpl @@ -1,6 +1,19 @@ {if $smarty.session.AUTHENTICATED|default} +
From 6210a1a28fd05c75b6e88bda59c1dd55c1fb2f7b Mon Sep 17 00:00:00 2001 From: iAmShorty Date: Fri, 23 May 2014 11:07:56 +0200 Subject: [PATCH 2/3] [UPDATE] changed behavior and use jQuery --- .../bootstrap/dashboard/blocks/default.tpl | 4 ++-- templates/bootstrap/dashboard/default.tpl | 13 ------------- templates/bootstrap/dashboard/js/api.tpl | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/templates/bootstrap/dashboard/blocks/default.tpl b/templates/bootstrap/dashboard/blocks/default.tpl index 85201d0c..376e9d08 100644 --- a/templates/bootstrap/dashboard/blocks/default.tpl +++ b/templates/bootstrap/dashboard/blocks/default.tpl @@ -38,8 +38,8 @@
-{/if} +{/if} \ No newline at end of file diff --git a/templates/bootstrap/dashboard/default.tpl b/templates/bootstrap/dashboard/default.tpl index dbb3b8aa..e042fa1e 100644 --- a/templates/bootstrap/dashboard/default.tpl +++ b/templates/bootstrap/dashboard/default.tpl @@ -1,19 +1,6 @@ {if $smarty.session.AUTHENTICATED|default} -
diff --git a/templates/bootstrap/dashboard/js/api.tpl b/templates/bootstrap/dashboard/js/api.tpl index f81a1fe0..f2c2b7f3 100644 --- a/templates/bootstrap/dashboard/js/api.tpl +++ b/templates/bootstrap/dashboard/js/api.tpl @@ -5,6 +5,7 @@ $(document).ready(function(){ var audioPath = "{/literal}{$PATH}{literal}/audio/"; var manifest = [ {id:"ding", src:"ding.ogg"} ]; + var muteFlag = 1; createjs.Sound.alternateExtensionseExtensions = ["mp3"]; createjs.Sound.registerManifest(manifest, audioPath); @@ -250,6 +251,23 @@ $(document).ready(function(){ } }); })(); + + // Mute Button + $('#muteButton').click(function(){ + if(muteFlag == 2) { + muteFlag = 1; + createjs.Sound.setMute(false); + $(this).toggleClass("btn-xs btn-danger").toggleClass("btn-xs btn-success"); + //$(this).find($(".fa")).removeClass('fa-volume-off').addClass('fa-volume-up'); + } else { + muteFlag = 2; + createjs.Sound.setMute(true); + $(this).toggleClass("btn-xs btn-success").toggleClass("btn-xs btn-danger"); + //$(this).find($(".fa")).removeClass('fa-volume-up').addClass('fa-volume-off'); + } + }); + + }); {/literal} From 80909ef2db877516718488ebd5e3e644bdde5dd4 Mon Sep 17 00:00:00 2001 From: iAmShorty Date: Wed, 4 Jun 2014 14:45:51 +0200 Subject: [PATCH 3/3] [UPDATE] change loading behavior, check if soundjs can be executed --- .../bootstrap/dashboard/blocks/default.tpl | 6 +++-- templates/bootstrap/dashboard/js/api.tpl | 27 +++++++++++++------ 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/templates/bootstrap/dashboard/blocks/default.tpl b/templates/bootstrap/dashboard/blocks/default.tpl index 376e9d08..dabd89d9 100644 --- a/templates/bootstrap/dashboard/blocks/default.tpl +++ b/templates/bootstrap/dashboard/blocks/default.tpl @@ -37,8 +37,10 @@
-
diff --git a/templates/bootstrap/dashboard/js/api.tpl b/templates/bootstrap/dashboard/js/api.tpl index f2c2b7f3..91891fe1 100644 --- a/templates/bootstrap/dashboard/js/api.tpl +++ b/templates/bootstrap/dashboard/js/api.tpl @@ -3,11 +3,20 @@