Changed button html to template

This commit is contained in:
perroned 2014-06-17 08:08:34 -07:00
parent 9f34755d88
commit 1280a4dccf

View File

@ -6,13 +6,9 @@
{{#if compareUserIds this.user.userId ../user.userId}}
<td>
{{#if user.handRaised}}
<button type="submit" id="{{user.externUserId}}" class="raiseHand btn btn-primary" disabled>
<i class="glyphicon glyphicon-hand-up"></i> <!-- Hand Raised -->
</button>
{{> makeButton id=user.externUserId btn_class="raiseHand btn-primary" i_class="hand-up" _id=_id isDisabled="disabled"}}
{{else}}
<button type="submit" id="{{user.externUserId}}" class="raiseHand btn btn-primary">
<i class="glyphicon glyphicon-hand-up"></i> <!-- Hand Raised -->
</button>
{{> makeButton id=user.externUserId btn_class="raiseHand btn-primary" i_class="hand-up" _id=_id}}
{{/if}}
</td>
{{> displayOwnControls}}
@ -28,39 +24,32 @@
<template name="displayStandardUserControls">
<td>
{{#if user.presenter}}
<button type="submit" id="{{user.externUserId}}" class="setPresenter btn btn-primary" disabled><i class="glyphicon glyphicon-picture"></i></button>
{{> makeButton id=user.externUserId btn_class="setPresenter btn-primary" i_class="picture" _id=_id isDisabled="disabled"}}
{{else}}
<button type="submit" id="{{user.externUserId}}" class="setPresenter btn btn-primary">
<i class="glyphicon glyphicon-picture"></i></button>
{{> makeButton id=user.externUserId btn_class="setPresenter btn-primary" i_class="picture" _id=_id}}
{{/if}}
</td>
<td>
<button type="submit" id="{{user.externUserId}}" class="kickUser btn btn-primary">
<i class="glyphicon glyphicon-remove-circle"></i></button>
</td>
<td>{{> makeButton id=user.externUserId btn_class="kickUser btn-primary" i_class="remove-circle" _id=_id}}</td>
</template>
<!-- ####################################################################################### -->
<template name="displayOwnControls">
<!-- toggles for own user's mic and cam-->
<td>
{{#if user.sharingAudio}}
<button type="submit" id="{{user.externUserId}}" class="disableMic btn btn-primary">
<i class="glyphicon glyphicon-bullhorn"></i></button>
{{#if user.sharingVideo}}
{{> makeButton id=user.externUserId btn_class="disableCam btn-primary" i_class="facetime-video" _id=_id}}
{{else}}
<button type="submit" id="{{user.externUserId}}" class="enableMic btn btn-primary">
<i class="glyphicon glyphicon-volume-off"></i></button>
{{> makeButton id=user.externUserId btn_class="enableCam btn-primary" i_class="stop" _id=_id}}
{{/if}}
</td>
<td>
{{#if user.sharingVideo}}
<button type="submit" id="{{user.externUserId}}" class="disableCam btn btn-primary">
<i class="glyphicon glyphicon-facetime-video"></i></button>
{{#if user.sharingAudio}}
{{> makeButton id=user.externUserId btn_class="disableMic btn-primary" i_class="bullhorn" _id=_id}}
{{else}}
<button type="submit" id="{{user.externUserId}}" class="enableCam btn btn-primary">
<i class="glyphicon glyphicon-stop"></i></button>
{{> makeButton id=user.externUserId btn_class="enableMic btn-primary" i_class="volume-off" _id=_id}}
{{/if}}
</td>
</td>
</template>
<!-- ####################################################################################### -->
@ -68,21 +57,6 @@
<!-- toggles for another user's mic and cam-->
<!-- if the current user is a mod, display all buttons with the id of the user being displayed -->
{{#with getCurrentUser}}
<td>
{{#if this.user.permissions.disableMic}} <!-- if user viewing has ability to disable -->
{{#if ../../user.sharingAudio}}
<button type="submit" id="{{../../user.externUserId}}" class="disableMic btn btn-primary"><i class="glyphicon glyphicon-bullhorn"></i></button>
{{else}}
<button type="submit" id="{{../../user.externUserId}}" class="enableMic btn btn-primary"><i class="glyphicon glyphicon-volume-off"></i></button>
{{/if}}
{{else}}
{{#if ../../user.sharingAudio}}
<button type="submit" id="{{../../user.externUserId}}" class="disableMic btn btn-primary" disabled><i class="glyphicon glyphicon-bullhorn"></i></button>
{{else}}
<button type="submit" id="{{../../user.externUserId}}" class="enableMic btn btn-primary" disabled><i class="glyphicon glyphicon-volume-off"></i></button>
{{/if}}
{{/if}}
</td>
<td>
{{#if this.user.permissions.disableCam}} <!-- if user viewing has ability to disable -->
{{#if ../../user.sharingVideo}}
@ -98,6 +72,20 @@
{{/if}}
{{/if}}
</td>
<td>
{{#if this.user.permissions.disableMic}} <!-- if user viewing has ability to disable -->
{{#if ../../user.sharingAudio}}
<button type="submit" id="{{../../user.externUserId}}" class="disableMic btn btn-primary"><i class="glyphicon glyphicon-bullhorn"></i></button>
{{else}}
<button type="submit" id="{{../../user.externUserId}}" class="enableMic btn btn-primary"><i class="glyphicon glyphicon-volume-off"></i></button>
{{/if}}
{{else}}
{{#if ../../user.sharingAudio}}
<button type="submit" id="{{../../user.externUserId}}" class="disableMic btn btn-primary" disabled><i class="glyphicon glyphicon-bullhorn"></i></button>
{{else}}
<button type="submit" id="{{../../user.externUserId}}" class="enableMic btn btn-primary" disabled><i class="glyphicon glyphicon-volume-off"></i></button>
{{/if}}
{{/if}}
</td>
{{/with}}
</template>