bigbluebutton-Github/bigbluebutton-html5/app/client/views/modals/modals.js

78 lines
2.2 KiB
JavaScript
Raw Normal View History

2016-01-13 04:15:16 +08:00
Template.settingsModal.helpers({
getBBBSettingsInfo() {
let info, result;
info = getBuildInformation();
return result = `(c) ${info.copyrightYear} BigBlueButton Inc. [build ${info.html5ClientBuild}] - For more information visit ${info.link}`;
}
});
Template.logoutModal.events({
"click #yes"() {
return userLogout(getInSession("meetingId"), getInSession("userId"));
},
"click #no"() {
return $("#logoutModal").foundation('reveal', 'close');
},
"click .logoutButton"() {
return $(".tooltip").hide();
}
});
Template.settingsAudio.events({
"click #exitAudio"() {
return exitVoiceCall();
},
"click .joinAudioButton"(event) {
return $("#settingsModal").foundation('reveal', 'close');
},
"click #joinListenOnly"(event) {
return joinVoiceCall(this, {
isListenOnly: true
});
},
"click #joinMicrophone"(event) {
return joinVoiceCall(this, {
isListenOnly: false
});
}
});
Template.settingsModal.events({
"click #closeSettings"() {
return $("#settingsModal").foundation('reveal', 'close');
}
});
Template.optionsFontSize.events({
"click #decreaseFontSize"(event) {
2016-01-15 13:46:41 +08:00
if(getInSession("messageFontSize") === 8) { // min
2016-01-13 04:15:16 +08:00
$('#decreaseFontSize').disabled = true;
$('#decreaseFontSize').removeClass('icon fi-minus');
return $('#decreaseFontSize').html('MIN');
} else {
setInSession("messageFontSize", getInSession("messageFontSize") - 2);
adjustChatInputHeight();
setTimeout(scrollChatDown, 0);
if($('#increaseFontSize').html() === 'MAX') {
$('#increaseFontSize').html('');
return $('#increaseFontSize').addClass('icon fi-plus');
}
}
},
"click #increaseFontSize"(event) {
2016-01-15 13:46:41 +08:00
if(getInSession("messageFontSize") === 40) { // max
2016-01-13 04:15:16 +08:00
$('#increaseFontSize').disabled = true;
$('#increaseFontSize').removeClass('icon fi-plus');
return $('#increaseFontSize').html('MAX');
} else {
setInSession("messageFontSize", getInSession("messageFontSize") + 2);
adjustChatInputHeight();
setTimeout(scrollChatDown, 0);
if($('#decreaseFontSize').html() === 'MIN') {
$('#decreaseFontSize').html('');
return $('#decreaseFontSize').addClass('icon fi-minus');
}
}
}
});