[UPDATE] mute blocknotify

This commit is contained in:
iAmShorty 2014-05-22 16:06:13 +02:00
parent ff677348be
commit e5ef906494
2 changed files with 16 additions and 0 deletions

View File

@ -37,6 +37,9 @@
</tbody>
</table>
</div>
<div class="panel-footer text-right">
Blocknotify Sound <a href="#" id="mute_false" onclick="myMute(this, false);">on</a> / <a href="#" id="mute_true" onclick="myMute(this, true);">off</a>
</div>
</div>
</div>
{/if}

View File

@ -1,6 +1,19 @@
{if $smarty.session.AUTHENTICATED|default}
<script src="{$PATH}/js/plugins/date.format.js"></script>
<script src="{$PATH}/js/plugins/soundjs-0.5.2.min.js"></script>
<script type="text/javascript">
function myMute(obj,flag) {
if(flag!==createjs.Sound.getMute()) {
createjs.Sound.setMute(flag);
obj.style.textDecoration="underline";
obj.style.color="#FFFF00";
flag=!flag;
obj=document.getElementById("mute_"+flag.toString());
obj.style.textDecoration="none";
obj.style.color="#FF0000";
}
}
</script>
<div class="row">
<div class="col-lg-12">