Ran linter and autofixed most of the warnings in the new React code
This commit is contained in:
parent
8a97afb89e
commit
b52738be8e
@ -14,7 +14,7 @@ module.exports = function (grunt) {
|
||||
tasks: ['force:jscs:check'],
|
||||
options: {
|
||||
event: ['all'],
|
||||
spawn: true
|
||||
spawn: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -28,7 +28,7 @@ module.exports = function (grunt) {
|
||||
esnext: true,
|
||||
},
|
||||
},
|
||||
fix: {
|
||||
autofix: {
|
||||
src: ['**/*.js', '**/*.jsx'],
|
||||
options: {
|
||||
config: '.jscsrc',
|
||||
@ -51,13 +51,11 @@ module.exports = function (grunt) {
|
||||
limit: 3,
|
||||
},
|
||||
meteor_watch: {
|
||||
tasks: ['shell:start_meteor', 'watch']
|
||||
tasks: ['shell:start_meteor', 'watch'],
|
||||
},
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.loadNpmTasks('grunt-coffeelint');
|
||||
grunt.loadNpmTasks('grunt-jscs');
|
||||
grunt.loadNpmTasks('grunt-force-task');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
|
@ -5,20 +5,21 @@ import {Chat} from '/imports/ui/chat/Chat.jsx';
|
||||
|
||||
MainContainer = React.createClass({
|
||||
handleShield() {
|
||||
$(".tooltip").hide();
|
||||
$('.tooltip').hide();
|
||||
toggleShield();
|
||||
return closeMenus();
|
||||
},
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div id="testing">
|
||||
<Header />
|
||||
<div id="panels">
|
||||
<div onClick={this.handleShield} className="shield"></div>
|
||||
<Whiteboard />
|
||||
<Chat />
|
||||
</div>
|
||||
<div id="testing">
|
||||
<Header />
|
||||
<div id="panels">
|
||||
<div onClick={this.handleShield} className="shield"></div>
|
||||
<Whiteboard />
|
||||
<Chat />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
@ -119,7 +119,6 @@ Handlebars.registerHelper('isCurrentUser', userId => {
|
||||
return userId === null || userId === ((ref = BBB.getCurrentUser()) != null ? ref.userId : void 0);
|
||||
});
|
||||
|
||||
|
||||
//Retreives a username for a private chat tab from the database if it exists
|
||||
Handlebars.registerHelper('privateChatName', () => {
|
||||
let obj, ref;
|
||||
@ -139,7 +138,7 @@ Handlebars.registerHelper('isCurrentUserSharingVideo', () => {
|
||||
return BBB.amISharingVideo();
|
||||
});
|
||||
|
||||
Handlebars.registerHelper("isCurrentUserPresenter", () => {
|
||||
Handlebars.registerHelper('isCurrentUserPresenter', () => {
|
||||
return BBB.isUserPresenter(getInSession('userId'));
|
||||
});
|
||||
|
||||
@ -194,7 +193,7 @@ Handlebars.registerHelper('messageFontSize', () => {
|
||||
});
|
||||
|
||||
//#TODO REMOVE
|
||||
Handlebars.registerHelper("pointerLocation", () => {
|
||||
Handlebars.registerHelper('pointerLocation', () => {
|
||||
let currentPresentation, currentSlideDoc, pointer, presentationId, ref;
|
||||
currentPresentation = Meteor.Presentations.findOne({
|
||||
'presentation.current': true,
|
||||
@ -235,19 +234,19 @@ Handlebars.registerHelper('containerPosition', section => {
|
||||
Template.registerHelper('emojiIcons', function () {
|
||||
return [
|
||||
{ name: 'sad', icon: 'sad-face', title: '' },
|
||||
{ name: 'happy', icon: 'happy-face', title: ''},
|
||||
{ name: 'confused', icon: 'confused-face', title: ''},
|
||||
{ name: 'neutral', icon: 'neutral-face', title: ''},
|
||||
{ name: 'away', icon: 'clock', title: ''},
|
||||
{ name: 'raiseHand', icon: 'hand', title: 'Lower your Hand'}
|
||||
{ name: 'happy', icon: 'happy-face', title: '' },
|
||||
{ name: 'confused', icon: 'confused-face', title: '' },
|
||||
{ name: 'neutral', icon: 'neutral-face', title: '' },
|
||||
{ name: 'away', icon: 'clock', title: '' },
|
||||
{ name: 'raiseHand', icon: 'hand', title: 'Lower your Hand' },
|
||||
];
|
||||
});
|
||||
|
||||
// scale the whiteboard to adapt to the resized window
|
||||
this.scaleWhiteboard = function(whiteboardPaperModel) {
|
||||
this.scaleWhiteboard = function (whiteboardPaperModel) {
|
||||
let adjustedDimensions;
|
||||
adjustedDimensions = scaleSlide(getInSession('slideOriginalWidth'), getInSession('slideOriginalHeight'));
|
||||
if(typeof whiteboardPaperModel !== "undefined" && whiteboardPaperModel !== null) {
|
||||
if (typeof whiteboardPaperModel !== 'undefined' && whiteboardPaperModel !== null) {
|
||||
whiteboardPaperModel.scale(adjustedDimensions.width, adjustedDimensions.height);
|
||||
}
|
||||
/* if(callback) {
|
||||
|
@ -13,12 +13,14 @@ import '/imports/ui/stylesheets/whiteboard.less';
|
||||
let loadLib;
|
||||
|
||||
// Helper to load javascript libraries from the BBB server
|
||||
loadLib = function(libname) {
|
||||
loadLib = function (libname) {
|
||||
let retryMessageCallback, successCallback;
|
||||
successCallback = function() {};
|
||||
retryMessageCallback = function(param) {
|
||||
return console.log("Failed to load library", param);
|
||||
successCallback = function () {};
|
||||
|
||||
retryMessageCallback = function (param) {
|
||||
return console.log('Failed to load library', param);
|
||||
};
|
||||
|
||||
return Meteor.Loader.loadJs(`${window.location.origin}/client/lib/${libname}`, successCallback, 10000).fail(retryMessageCallback);
|
||||
};
|
||||
|
||||
@ -35,7 +37,7 @@ Meteor.startup(() => {
|
||||
set(key, value) {
|
||||
Session.set.apply(this, arguments);
|
||||
amplify.store.sessionStorage(key, value);
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
@ -45,17 +47,18 @@ Template.menu.events({
|
||||
toggleSettingsMenu();
|
||||
return $('.slideButton').blur();
|
||||
},
|
||||
|
||||
'click .toggleChatButton'(event) {
|
||||
return toggleChatbar();
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Template.main.rendered = function() {
|
||||
ReactDOM.render(<MainContainer />, document.getElementById("main"));
|
||||
Template.main.rendered = function () {
|
||||
ReactDOM.render(<MainContainer />, document.getElementById('main'));
|
||||
ReactDOM.render(<UserListContainer />, document.getElementById('user-contents'));
|
||||
|
||||
let lastOrientationWasLandscape;
|
||||
$("#dialog").dialog({
|
||||
$('#dialog').dialog({
|
||||
modal: true,
|
||||
draggable: false,
|
||||
resizable: false,
|
||||
@ -64,42 +67,45 @@ Template.main.rendered = function() {
|
||||
buttons: [
|
||||
{
|
||||
text: 'Yes',
|
||||
click: function() {
|
||||
userLogout(BBB.getMeetingId(), getInSession("userId"), true);
|
||||
return $(this).dialog("close");
|
||||
click: function () {
|
||||
userLogout(BBB.getMeetingId(), getInSession('userId'), true);
|
||||
return $(this).dialog('close');
|
||||
},
|
||||
"class": 'btn btn-xs btn-primary active'
|
||||
|
||||
class: 'btn btn-xs btn-primary active',
|
||||
}, {
|
||||
text: 'No',
|
||||
click: function() {
|
||||
$(this).dialog("close");
|
||||
return $(".tooltip").hide();
|
||||
click: function () {
|
||||
$(this).dialog('close');
|
||||
return $('.tooltip').hide();
|
||||
},
|
||||
"class": 'btn btn-xs btn-default'
|
||||
}
|
||||
|
||||
class: 'btn btn-xs btn-default',
|
||||
},
|
||||
],
|
||||
open(event, ui) {
|
||||
return $('.ui-widget-overlay').bind('click', () => {
|
||||
if(isMobile()) {
|
||||
return $("#dialog").dialog('close');
|
||||
if (isMobile()) {
|
||||
return $('#dialog').dialog('close');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
position: {
|
||||
my: 'right top',
|
||||
at: 'right bottom',
|
||||
of: '.signOutIcon'
|
||||
}
|
||||
of: '.signOutIcon',
|
||||
},
|
||||
});
|
||||
lastOrientationWasLandscape = isLandscape();
|
||||
$(window).resize(() => {
|
||||
$('#dialog').dialog('close');
|
||||
|
||||
// when the orientation switches call the handler
|
||||
if(isLandscape() && !lastOrientationWasLandscape) {
|
||||
if (isLandscape() && !lastOrientationWasLandscape) {
|
||||
orientationBecameLandscape();
|
||||
return lastOrientationWasLandscape = true;
|
||||
} else if(isPortrait() && lastOrientationWasLandscape) {
|
||||
} else if (isPortrait() && lastOrientationWasLandscape) {
|
||||
orientationBecamePortrait();
|
||||
return lastOrientationWasLandscape = false;
|
||||
}
|
||||
@ -107,14 +113,14 @@ Template.main.rendered = function() {
|
||||
$('#shield').click(() => {
|
||||
return toggleSlidingMenu();
|
||||
});
|
||||
if(Meteor.config.app.autoJoinAudio) {
|
||||
if(Meteor.config.app.skipCheck) {
|
||||
if (Meteor.config.app.autoJoinAudio) {
|
||||
if (Meteor.config.app.skipCheck) {
|
||||
return joinVoiceCall(this, {
|
||||
isListenOnly: Meteor.config.app.listenOnly
|
||||
isListenOnly: Meteor.config.app.listenOnly,
|
||||
});
|
||||
} else {
|
||||
$("#settingsModal").foundation('reveal', 'open');
|
||||
if(Meteor.config.app.listenOnly) {
|
||||
$('#settingsModal').foundation('reveal', 'open');
|
||||
if (Meteor.config.app.listenOnly) {
|
||||
return $('#joinMicrophone').prop('disabled', true);
|
||||
}
|
||||
}
|
||||
@ -124,29 +130,30 @@ Template.main.rendered = function() {
|
||||
Template.main.gestures({
|
||||
'panstart #container'(event, template) {
|
||||
let initTransformValue, menuPanned, panIsValid, screenWidth;
|
||||
if(isPortraitMobile() && isPanHorizontal(event)) {
|
||||
if (isPortraitMobile() && isPanHorizontal(event)) {
|
||||
panIsValid = getInSession('panIsValid');
|
||||
initTransformValue = getInSession('initTransform');
|
||||
menuPanned = getInSession('menuPanned');
|
||||
screenWidth = $('#container').width();
|
||||
setInSession('panStarted', true);
|
||||
if(panIsValid && menuPanned === 'left' && initTransformValue + event.deltaX >= 0 && initTransformValue + event.deltaX <= $('.left-drawer').width()) {
|
||||
if (panIsValid && menuPanned === 'left' && initTransformValue + event.deltaX >= 0 && initTransformValue + event.deltaX <= $('.left-drawer').width()) {
|
||||
return $('.left-drawer').css('transform', `translateX(${initTransformValue + event.deltaX}px)`);
|
||||
} else if(panIsValid && menuPanned === 'right' && initTransformValue + event.deltaX >= screenWidth - $('.right-drawer').width() && initTransformValue + event.deltaX <= screenWidth) {
|
||||
} else if (panIsValid && menuPanned === 'right' && initTransformValue + event.deltaX >= screenWidth - $('.right-drawer').width() && initTransformValue + event.deltaX <= screenWidth) {
|
||||
return $('.right-drawer').css('transform', `translateX(${initTransformValue + event.deltaX}px)`);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
'panend #container'(event, template) {
|
||||
let leftDrawerWidth, menuPanned, panIsValid, screenWidth;
|
||||
if(isPortraitMobile()) {
|
||||
if (isPortraitMobile()) {
|
||||
panIsValid = getInSession('panIsValid');
|
||||
menuPanned = getInSession('menuPanned');
|
||||
leftDrawerWidth = $('.left-drawer').width();
|
||||
screenWidth = $('#container').width();
|
||||
setInSession('panStarted', false);
|
||||
if(panIsValid && menuPanned === 'left' && $('.left-drawer').css('transform') !== 'none') {
|
||||
if(parseInt($('.left-drawer').css('transform').split(',')[4]) < leftDrawerWidth / 2) {
|
||||
if (panIsValid && menuPanned === 'left' && $('.left-drawer').css('transform') !== 'none') {
|
||||
if (parseInt($('.left-drawer').css('transform').split(',')[4]) < leftDrawerWidth / 2) {
|
||||
$('.shield').removeClass('animatedShield');
|
||||
$('.shield').css('opacity', '');
|
||||
$('.left-drawer').removeClass('menuOut');
|
||||
@ -161,8 +168,9 @@ Template.main.gestures({
|
||||
$('.toggleUserlistButton').addClass('menuToggledOn');
|
||||
}
|
||||
}
|
||||
if(panIsValid && menuPanned === 'right' && parseInt($('.right-drawer').css('transform').split(',')[4]) !== leftDrawerWidth) {
|
||||
if(parseInt($('.right-drawer').css('transform').split(',')[4]) > screenWidth - $('.right-drawer').width() / 2) {
|
||||
|
||||
if (panIsValid && menuPanned === 'right' && parseInt($('.right-drawer').css('transform').split(',')[4]) !== leftDrawerWidth) {
|
||||
if (parseInt($('.right-drawer').css('transform').split(',')[4]) > screenWidth - $('.right-drawer').width() / 2) {
|
||||
$('.shield').removeClass('animatedShield');
|
||||
$('.shield').css('opacity', '');
|
||||
$('.right-drawer').css('transform', `translateX(${screenWidth}px)`);
|
||||
@ -178,70 +186,76 @@ Template.main.gestures({
|
||||
$('.toggleMenuButton').addClass('menuToggledOn');
|
||||
}
|
||||
}
|
||||
|
||||
$('.left-drawer').addClass('userlistMenu');
|
||||
$('.userlistMenu').removeClass('left-drawer');
|
||||
$('.right-drawer').addClass('settingsMenu');
|
||||
return $('.settingsMenu').removeClass('right-drawer');
|
||||
}
|
||||
},
|
||||
|
||||
'panright #container, panleft #container'(event, template) {
|
||||
let initTransformValue, leftDrawerWidth, menuPanned, panIsValid, rightDrawerWidth, screenWidth;
|
||||
if(isPortraitMobile() && isPanHorizontal(event)) {
|
||||
if (isPortraitMobile() && isPanHorizontal(event)) {
|
||||
|
||||
// panright/panleft is always triggered once right before panstart
|
||||
if(!getInSession('panStarted')) {
|
||||
if (!getInSession('panStarted')) {
|
||||
|
||||
// opening the left-hand menu
|
||||
if(event.type === 'panright' && event.center.x <= $('#container').width() * 0.1) {
|
||||
if (event.type === 'panright' && event.center.x <= $('#container').width() * 0.1) {
|
||||
setInSession('panIsValid', true);
|
||||
setInSession('menuPanned', 'left');
|
||||
|
||||
// closing the left-hand menu
|
||||
} else if(event.type === 'panleft' && event.center.x < $('#container').width() * 0.9) {
|
||||
} else if (event.type === 'panleft' && event.center.x < $('#container').width() * 0.9) {
|
||||
setInSession('panIsValid', true);
|
||||
setInSession('menuPanned', 'left');
|
||||
|
||||
// opening the right-hand menu
|
||||
} else if(event.type === 'panleft' && event.center.x >= $('#container').width() * 0.9) {
|
||||
} else if (event.type === 'panleft' && event.center.x >= $('#container').width() * 0.9) {
|
||||
setInSession('panIsValid', true);
|
||||
setInSession('menuPanned', 'right');
|
||||
|
||||
// closing the right-hand menu
|
||||
} else if(event.type === 'panright' && event.center.x > $('#container').width() * 0.1) {
|
||||
} else if (event.type === 'panright' && event.center.x > $('#container').width() * 0.1) {
|
||||
setInSession('panIsValid', true);
|
||||
setInSession('menuPanned', 'right');
|
||||
} else {
|
||||
setInSession('panIsValid', false);
|
||||
}
|
||||
|
||||
setInSession('eventType', event.type);
|
||||
if(getInSession('menuPanned') === 'left') {
|
||||
if($('.userlistMenu').css('transform') !== 'none') { // menu is already transformed
|
||||
if (getInSession('menuPanned') === 'left') {
|
||||
if ($('.userlistMenu').css('transform') !== 'none') { // menu is already transformed
|
||||
setInSession(
|
||||
'initTransform',
|
||||
parseInt($('.userlistMenu').css('transform').split(',')[4])
|
||||
); // translateX value
|
||||
} else if($('.userlistMenu').hasClass('menuOut')) {
|
||||
} else if ($('.userlistMenu').hasClass('menuOut')) {
|
||||
setInSession('initTransform', $('.userlistMenu').width());
|
||||
} else {
|
||||
setInSession('initTransform', 0);
|
||||
}
|
||||
|
||||
$('.userlistMenu').addClass('left-drawer');
|
||||
$('.left-drawer').removeClass('userlistMenu');
|
||||
} else if(getInSession('menuPanned') === 'right') {
|
||||
if($('.settingsMenu').css('transform') !== 'none') { // menu is already transformed
|
||||
} else if (getInSession('menuPanned') === 'right') {
|
||||
if ($('.settingsMenu').css('transform') !== 'none') { // menu is already transformed
|
||||
setInSession(
|
||||
'initTransform',
|
||||
parseInt($('.settingsMenu').css('transform').split(',')[4])
|
||||
); // translateX value
|
||||
} else if($('.settingsMenu').hasClass('menuOut')) {
|
||||
} else if ($('.settingsMenu').hasClass('menuOut')) {
|
||||
setInSession('initTransform', $('.settingsMenu').width());
|
||||
} else {
|
||||
setInSession('initTransform', 0);
|
||||
}
|
||||
|
||||
$('.settingsMenu').addClass('right-drawer');
|
||||
$('.right-drawer').removeClass('settingsMenu');
|
||||
}
|
||||
}
|
||||
|
||||
initTransformValue = getInSession('initTransform');
|
||||
panIsValid = getInSession('panIsValid');
|
||||
menuPanned = getInSession('menuPanned');
|
||||
@ -250,35 +264,39 @@ Template.main.gestures({
|
||||
screenWidth = $('#container').width();
|
||||
|
||||
// moving the left-hand menu
|
||||
if(panIsValid &&
|
||||
if (panIsValid &&
|
||||
menuPanned === 'left' &&
|
||||
initTransformValue + event.deltaX >= 0 &&
|
||||
initTransformValue + event.deltaX <= leftDrawerWidth) {
|
||||
if($('.settingsMenu').hasClass('menuOut')) {
|
||||
if ($('.settingsMenu').hasClass('menuOut')) {
|
||||
toggleSettingsMenu();
|
||||
}
|
||||
|
||||
$('.left-drawer').css('transform', `translateX(${initTransformValue + event.deltaX}px)`);
|
||||
if(!getInSession('panStarted')) {
|
||||
if (!getInSession('panStarted')) {
|
||||
$('.shield').addClass('animatedShield');
|
||||
}
|
||||
|
||||
return $('.shield').css('opacity', 0.5 * (initTransformValue + event.deltaX) / leftDrawerWidth);
|
||||
} else if(panIsValid &&
|
||||
} else if (panIsValid &&
|
||||
menuPanned === 'right' &&
|
||||
initTransformValue + event.deltaX >= screenWidth - rightDrawerWidth &&
|
||||
initTransformValue + event.deltaX <= screenWidth) { // moving the right-hand menu
|
||||
if($('.userlistMenu').hasClass('menuOut')) {
|
||||
if ($('.userlistMenu').hasClass('menuOut')) {
|
||||
toggleUserlistMenu();
|
||||
}
|
||||
|
||||
$('.right-drawer').css('transform', `translateX(${initTransformValue + event.deltaX}px)`);
|
||||
if(!getInSession('panStarted')) {
|
||||
if (!getInSession('panStarted')) {
|
||||
$('.shield').addClass('animatedShield');
|
||||
}
|
||||
|
||||
return $('.shield').css('opacity', 0.5 * (screenWidth - initTransformValue - event.deltaX) / rightDrawerWidth);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Template.makeButton.rendered = function() {
|
||||
Template.makeButton.rendered = function () {
|
||||
return $('button[rel=tooltip]').tooltip();
|
||||
};
|
||||
|
@ -13,10 +13,9 @@ export let EmojiIcon = React.createClass({
|
||||
},
|
||||
|
||||
renderIcon() {
|
||||
if(this.props.iconName === 'raiseHand') {
|
||||
if (this.props.iconName === 'raiseHand') {
|
||||
return (<i className={classNames(this.props.className, 'ion-android-hand')}></i>);
|
||||
}
|
||||
else if(this.props.iconName === 'happy') {
|
||||
} else if (this.props.iconName === 'happy') {
|
||||
return (
|
||||
<svg width="25" height="25" viewBox="0 0 50 50">
|
||||
<circle cx="25" cy="25" r="14" stroke="white" strokeWidth="3" fill="transparent"/>
|
||||
@ -24,9 +23,8 @@ export let EmojiIcon = React.createClass({
|
||||
<circle cx="31" cy="22" r="1" stroke="white" strokeWidth="2" fill="white"/>
|
||||
<path d="m18 30 C 21 33, 29 33, 32 30" stroke="white" strokeWidth="3" strokeLinecap="round" stroke-linejoin="round" fill="none" />
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
else if(this.props.iconName === 'neutral') {
|
||||
);
|
||||
} else if (this.props.iconName === 'neutral') {
|
||||
return (
|
||||
<svg width="25" height="25" viewBox="0 0 50 50">
|
||||
<circle cx="25" cy="25" r="14" stroke="white" strokeWidth="3" fill="transparent"/>
|
||||
@ -34,9 +32,8 @@ export let EmojiIcon = React.createClass({
|
||||
<circle cx="31" cy="22" r="1" stroke="white" strokeWidth="2" fill="white"/>
|
||||
<path d="m18 30 l 14 0" stroke="white" strokeWidth="3" strokeLinecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
else if(this.props.iconName === 'confused') {
|
||||
);
|
||||
} else if (this.props.iconName === 'confused') {
|
||||
return (
|
||||
<svg width="25" height="25" viewBox="0 0 50 50">
|
||||
<circle cx="25" cy="25" r="14" stroke="white" strokeWidth="3" fill="transparent"/>
|
||||
@ -44,9 +41,8 @@ export let EmojiIcon = React.createClass({
|
||||
<circle cx="31" cy="22" r="1" stroke="white" strokeWidth="2" fill="white"/>
|
||||
<path d="M18 30 C 20 28, 22 28, 25 30 S 30 32, 32 30" stroke="white" strokeWidth="3" strokeLinecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
else if(this.props.iconName === 'sad') {
|
||||
);
|
||||
} else if (this.props.iconName === 'sad') {
|
||||
return (
|
||||
<svg width="25" height="25" viewBox="0 0 50 50">
|
||||
<circle cx="25" cy="25" r="14" stroke="white" strokeWidth="3" fill="transparent"/>
|
||||
@ -54,24 +50,22 @@ export let EmojiIcon = React.createClass({
|
||||
<circle cx="31" cy="22" r="1" stroke="white" strokeWidth="2" fill="white"/>
|
||||
<path d="m18 30 C 21 27, 29 27, 32 30" stroke="white" strokeWidth="3" strokeLinecap="round" stroke-linejoin="round" fill="none" />
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
else if(this.props.iconName === 'away') {
|
||||
);
|
||||
} else if (this.props.iconName === 'away') {
|
||||
return (
|
||||
<svg width="25" height="25" viewBox="0 0 50 50">
|
||||
<circle cx="25" cy="25" r="14" stroke="white" strokeWidth="3" fill="transparent"/>
|
||||
<path d="m25 25 l 0 -8" stroke="white" strokeWidth="3" strokeLinecap="round" stroke-linejoin="round" />
|
||||
<path d="m25 25 l 5 5" stroke="white" strokeWidth="3" strokeLinecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
else if(this.props.iconName === 'plus') {
|
||||
);
|
||||
} else if (this.props.iconName === 'plus') {
|
||||
return (
|
||||
<svg width="25" height="25" viewBox="0 0 50 50">
|
||||
<path d="m25 18 l 0 14" stroke="white" strokeWidth="3" strokeLinecap="round" stroke-linejoin="round" />
|
||||
<path d="m18 25 l 14 0" stroke="white" strokeWidth="3" strokeLinecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
)
|
||||
);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
@ -8,22 +8,23 @@ export let Chat = React.createClass({
|
||||
getMeteorData() {
|
||||
let chatMessages, privateChatName, chattingWith, user, messageFontSize, temp, user_exists;
|
||||
|
||||
messageFontSize = { fontSize: getInSession("messageFontSize") + 'px' };
|
||||
messageFontSize = { fontSize: getInSession('messageFontSize') + 'px' };
|
||||
chattingWith = getInSession('inChatWith');
|
||||
if(chattingWith === 'PUBLIC_CHAT') { // find all public and system messages
|
||||
chatMessages = Meteor.Chat.find({ 'message.chat_type': { $in: ["SYSTEM_MESSAGE", "PUBLIC_CHAT"] }},
|
||||
{ sort: { 'message.from_time': 1 }}).fetch();
|
||||
if (chattingWith === 'PUBLIC_CHAT') { // find all public and system messages
|
||||
chatMessages = Meteor.Chat.find({ 'message.chat_type': { $in: ['SYSTEM_MESSAGE', 'PUBLIC_CHAT'] } },
|
||||
{ sort: { 'message.from_time': 1 } }).fetch();
|
||||
} else {
|
||||
chatMessages = Meteor.Chat.find({ 'message.chat_type': 'PRIVATE_CHAT', $or: [{ 'message.to_userid': chattingWith },
|
||||
{ 'message.from_userid': chattingWith }]}).fetch();
|
||||
}
|
||||
chatMessages = Meteor.Chat.find({ 'message.chat_type': 'PRIVATE_CHAT', $or: [{ 'message.to_userid': chattingWith },
|
||||
{ 'message.from_userid': chattingWith }, ], }).fetch();
|
||||
}
|
||||
|
||||
user = Meteor.Users.findOne({ userId: chattingWith });
|
||||
if(user != null) {
|
||||
if (user != null) {
|
||||
privateChatName = user.user.name;
|
||||
}
|
||||
|
||||
if(getInSession('inChatWith') === "PUBLIC_CHAT" || Meteor.Users.findOne({
|
||||
userId: getInSession('inChatWith')
|
||||
if (getInSession('inChatWith') === 'PUBLIC_CHAT' || Meteor.Users.findOne({
|
||||
userId: getInSession('inChatWith'),
|
||||
}) != null) {
|
||||
user_exists = true;
|
||||
} else {
|
||||
@ -34,48 +35,51 @@ export let Chat = React.createClass({
|
||||
chatMessages: chatMessages,
|
||||
privateChatName: privateChatName,
|
||||
messageFontSize: messageFontSize,
|
||||
user_exists: user_exists
|
||||
};
|
||||
user_exists: user_exists,
|
||||
};
|
||||
},
|
||||
|
||||
detectUnreadChat: function() {
|
||||
detectUnreadChat: function () {
|
||||
//if the current tab is not the same as the tab we just published in
|
||||
return Meteor.Chat.find({}).observe({
|
||||
added: (_this => {
|
||||
return function(chatMessage) {
|
||||
return function (chatMessage) {
|
||||
let findDestinationTab;
|
||||
findDestinationTab = function() {
|
||||
findDestinationTab = function () {
|
||||
let ref, ref1;
|
||||
if(((ref = chatMessage.message) != null ? ref.chat_type : void 0) === "PUBLIC_CHAT") {
|
||||
return "PUBLIC_CHAT";
|
||||
if (((ref = chatMessage.message) != null ? ref.chat_type : void 0) === 'PUBLIC_CHAT') {
|
||||
return 'PUBLIC_CHAT';
|
||||
} else {
|
||||
return (ref1 = chatMessage.message) != null ? ref1.from_userid : void 0;
|
||||
}
|
||||
};
|
||||
|
||||
return Tracker.autorun(comp => {
|
||||
let destinationTab, tabsTime;
|
||||
tabsTime = getInSession('userListRenderedTime');
|
||||
if((tabsTime != null) && chatMessage.message.from_userid !== "SYSTEM_MESSAGE" && chatMessage.message.from_time - tabsTime > 0) {
|
||||
if ((tabsTime != null) && chatMessage.message.from_userid !== 'SYSTEM_MESSAGE' && chatMessage.message.from_time - tabsTime > 0) {
|
||||
populateNotifications(chatMessage); // check if we need to show a new notification
|
||||
destinationTab = findDestinationTab();
|
||||
if(destinationTab !== getInSession("inChatWith")) {
|
||||
if (destinationTab !== getInSession('inChatWith')) {
|
||||
setInSession('chats', getInSession('chats').map(tab => {
|
||||
if(tab.userId === destinationTab) {
|
||||
if (tab.userId === destinationTab) {
|
||||
tab.gotMail = true;
|
||||
tab.number++;
|
||||
}
|
||||
|
||||
return tab;
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
return comp.stop();
|
||||
});
|
||||
};
|
||||
})(this)
|
||||
})(this),
|
||||
});
|
||||
},
|
||||
|
||||
componentDidMount: function(){
|
||||
componentDidMount: function () {
|
||||
this.detectUnreadChat();
|
||||
},
|
||||
|
||||
@ -83,17 +87,18 @@ export let Chat = React.createClass({
|
||||
let deleted, i, j, len;
|
||||
len = msgs != null ? msgs.length : void 0; // get length of messages
|
||||
i = 0;
|
||||
while(i < len) { // Must be a do while, for loop compiles and stores the length of array which can change inside the loop!
|
||||
if(msgs[i].message.from_userid !== 'System') { // skip system messages
|
||||
while (i < len) { // Must be a do while, for loop compiles and stores the length of array which can change inside the loop!
|
||||
if (msgs[i].message.from_userid !== 'System') { // skip system messages
|
||||
j = i + 1; // Start looking at messages right after the current one
|
||||
while(j < len) {
|
||||
while (j < len) {
|
||||
deleted = false;
|
||||
if(msgs[j].message.from_userid !== 'System') { // Ignore system messages
|
||||
if (msgs[j].message.from_userid !== 'System') { // Ignore system messages
|
||||
// Check if the time discrepancy between the two messages exceeds window for grouping
|
||||
if((parseFloat(msgs[j].message.from_time) - parseFloat(msgs[i].message.from_time)) >= 60000) { // 60 seconds/1 minute
|
||||
if ((parseFloat(msgs[j].message.from_time) - parseFloat(msgs[i].message.from_time)) >= 60000) { // 60 seconds/1 minute
|
||||
break; // Messages are too far between, so them seperated and stop joining here
|
||||
}
|
||||
if(msgs[i].message.from_userid === msgs[j].message.from_userid) { // Both messages are from the same user
|
||||
|
||||
if (msgs[i].message.from_userid === msgs[j].message.from_userid) { // Both messages are from the same user
|
||||
// insert a '\r' carriage return character between messages to put them on a new line
|
||||
msgs[i].message.message += `${CARRIAGE_RETURN}${msgs[j].message.message}`; // Combine the messages
|
||||
msgs.splice(j, 1); // Delete the message from the collection
|
||||
@ -104,44 +109,47 @@ export let Chat = React.createClass({
|
||||
} else {
|
||||
break; // This is the break point in the chat, don't merge
|
||||
}
|
||||
|
||||
len = msgs.length;
|
||||
if(!deleted) {
|
||||
if (!deleted) {
|
||||
++j;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
++i;
|
||||
len = msgs.length;
|
||||
}
|
||||
|
||||
return msgs;
|
||||
},
|
||||
|
||||
inPrivateChat(){
|
||||
inPrivateChat() {
|
||||
return (getInSession('inChatWith') !== 'PUBLIC_CHAT');
|
||||
},
|
||||
|
||||
render(){
|
||||
render() {
|
||||
return (
|
||||
<div id="chat" className="component">
|
||||
<div className="chatBodyContainer">
|
||||
{this.inPrivateChat() ?
|
||||
<div id="chat" className="component">
|
||||
<div className="chatBodyContainer">
|
||||
{this.inPrivateChat() ?
|
||||
<PrivateChatToolBar inPrivateChat={this.inPrivateChat} privateChatName={this.data.privateChatName}/>
|
||||
: null }
|
||||
<div id="chatbody">
|
||||
<ul className="chat" style={this.data.messageFontSize}>
|
||||
: null }
|
||||
<div id="chatbody">
|
||||
<ul className="chat" style={this.data.messageFontSize}>
|
||||
{this.getCombinedMessagesForChat(this.data.chatMessages).map((message) =>
|
||||
<ChatMessage key={message._id} message={message} messageFontSize={this.data.messageFontSize}/>
|
||||
)}
|
||||
{this.data.user_exists ? null : <li>The user has left</li> }
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{this.data.user_exists ? null : <li>The user has left</li> }
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{this.data.user_exists ?
|
||||
<div className="panel-footer">
|
||||
<ChatInputControls inPrivateChat={this.inPrivateChat()}/>
|
||||
<div className="panel-footer">
|
||||
<ChatInputControls inPrivateChat={this.inPrivateChat()}/>
|
||||
</div>
|
||||
: null }
|
||||
: null }
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,99 +1,102 @@
|
||||
import React from 'react';
|
||||
|
||||
export let ChatMessage = React.createClass({
|
||||
sanitizeAndFormat: function(str) {
|
||||
export let ChatMessage = React.createClass({
|
||||
sanitizeAndFormat: function (str) {
|
||||
let res;
|
||||
if(typeof str === 'string') { // First, replace replace all tags with the ascii equivalent (excluding those involved in anchor tags)
|
||||
if (typeof str === 'string') { // First, replace replace all tags with the ascii equivalent (excluding those involved in anchor tags)
|
||||
res = str.replace(/&/g, '&').replace(/<(?![au\/])/g, '<').replace(/\/([^au])>/g, '$1>').replace(/([^=])"(?!>)/g, '$1"');
|
||||
res = this.toClickable(res);
|
||||
return res = this.activateBreakLines(res);
|
||||
}
|
||||
},
|
||||
|
||||
toClickable: function(str) {
|
||||
toClickable: function (str) {
|
||||
let res;
|
||||
if(typeof str === 'string') {
|
||||
if (typeof str === 'string') {
|
||||
res = str.replace(/<a href='event:/gim, "<a target='_blank' href='");
|
||||
return res = res.replace(/<a href="event:/gim, '<a target="_blank" href="');
|
||||
}
|
||||
},
|
||||
|
||||
activateBreakLines: function(str) {
|
||||
activateBreakLines: function (str) {
|
||||
let res;
|
||||
if(typeof str === 'string') { // turn '\r' carriage return characters into '<br/>' break lines
|
||||
if (typeof str === 'string') { // turn '\r' carriage return characters into '<br/>' break lines
|
||||
res = str.replace(new RegExp(CARRIAGE_RETURN, 'g'), BREAK_LINE);
|
||||
return res;
|
||||
}
|
||||
},
|
||||
|
||||
autoscroll: function() {
|
||||
autoscroll: function () {
|
||||
let ref;
|
||||
$('#chatbody').scrollTop((ref = $('#chatbody')[0]) != null ? ref.scrollHeight : void 0);
|
||||
return false;
|
||||
},
|
||||
|
||||
componentDidUpdate: function() {
|
||||
componentDidUpdate: function () {
|
||||
this.autoscroll();
|
||||
},
|
||||
|
||||
componentDidMount: function() {
|
||||
componentDidMount: function () {
|
||||
this.autoscroll();
|
||||
},
|
||||
|
||||
toClockTime: function(epochTime) {
|
||||
toClockTime: function (epochTime) {
|
||||
let dateObj, hours, local, minutes, offset;
|
||||
if(epochTime === null) {
|
||||
return "";
|
||||
if (epochTime === null) {
|
||||
return '';
|
||||
}
|
||||
|
||||
local = new Date();
|
||||
offset = local.getTimezoneOffset();
|
||||
epochTime = epochTime - offset * 60000; // 1 min = 60 s = 60,000 ms
|
||||
dateObj = new Date(epochTime);
|
||||
hours = dateObj.getUTCHours();
|
||||
minutes = dateObj.getUTCMinutes();
|
||||
if(minutes < 10) {
|
||||
if (minutes < 10) {
|
||||
minutes = `0${minutes}`;
|
||||
}
|
||||
|
||||
return `${hours}:${minutes}`;
|
||||
},
|
||||
|
||||
getTime: function() {
|
||||
var floatRight = {float: 'right'};
|
||||
getTime: function () {
|
||||
var floatRight = { float: 'right' };
|
||||
|
||||
if(this.props.message.message.from_time) {
|
||||
if (this.props.message.message.from_time) {
|
||||
return (
|
||||
<span style={floatRight}>
|
||||
<span style={this.props.messageFontSize}>{this.toClockTime(this.props.message.message.from_time)}</span>
|
||||
<span style={this.props.messageFontSize} className="glyphicon glyphicon-time"></span>
|
||||
<span style={floatRight}>
|
||||
<span style={this.props.messageFontSize}>{this.toClockTime(this.props.message.message.from_time)}</span>
|
||||
<span style={this.props.messageFontSize} className="glyphicon glyphicon-time"></span>
|
||||
</span>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<span style={floatRight}>
|
||||
<span style={floatRight}>
|
||||
</span>
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
render(){
|
||||
render() {
|
||||
var messageColor = { color: colourToHex(this.props.message.message.from_color) };
|
||||
var floatLeft = {float: 'left'};
|
||||
function createMarkup(str) { return {__html: str}; };
|
||||
var floatLeft = { float: 'left' };
|
||||
function createMarkup(str) { return { __html: str }; };
|
||||
|
||||
return (
|
||||
<li>
|
||||
<span style={floatLeft}>
|
||||
<li>
|
||||
<span style={floatLeft}>
|
||||
{this.props.message.message.from_username ?
|
||||
<span className="userNameEntry" rel="tooltip" data-placement="bottom" title={this.props.message.message.from_username}>
|
||||
{this.props.message.message.from_username}
|
||||
<span className="userNameEntry" rel="tooltip" data-placement="bottom" title={this.props.message.message.from_username}>
|
||||
{this.props.message.message.from_username}
|
||||
</span>
|
||||
: null }
|
||||
</span>
|
||||
{this.getTime()}
|
||||
<br/>
|
||||
<div style={ messageColor } dangerouslySetInnerHTML={createMarkup(this.sanitizeAndFormat(this.props.message.message.message))}>
|
||||
</div>
|
||||
{this.autoscroll()}
|
||||
: null }
|
||||
</span>
|
||||
{this.getTime()}
|
||||
<br/>
|
||||
<div style={ messageColor } dangerouslySetInnerHTML={createMarkup(this.sanitizeAndFormat(this.props.message.message.message))}>
|
||||
</div>
|
||||
{this.autoscroll()}
|
||||
</li>
|
||||
);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
@ -2,25 +2,25 @@ import React from 'react';
|
||||
import { Button } from '../shared/Button.jsx';
|
||||
|
||||
export let PrivateChatToolBar = React.createClass({
|
||||
componentDidMount: function() {
|
||||
if(isLandscape() || isPortrait()) {
|
||||
return $("#newMessageInput").focus();
|
||||
componentDidMount: function () {
|
||||
if (isLandscape() || isPortrait()) {
|
||||
return $('#newMessageInput').focus();
|
||||
}
|
||||
},
|
||||
|
||||
handleClick: function() {
|
||||
console.log("I'm in the handleClick function");
|
||||
handleClick: function () {
|
||||
setInSession('inChatWith', 'PUBLIC_CHAT');
|
||||
return setInSession('chats', getInSession('chats').map(chat => {
|
||||
if(chat.userId === "PUBLIC_CHAT") {
|
||||
if (chat.userId === 'PUBLIC_CHAT') {
|
||||
chat.gotMail = false;
|
||||
chat.number = 0;
|
||||
}
|
||||
$('.ui-tooltip').hide();
|
||||
return chat;
|
||||
}));
|
||||
},
|
||||
|
||||
render(){
|
||||
render() {
|
||||
return (
|
||||
<div className="privateChatTab">
|
||||
<Button onClick={this.handleClick} id="close" btn_class=" secondary tiny toPublic " i_class="ion-ios-arrow-left" rel="tooltip"
|
||||
@ -30,5 +30,5 @@ export let PrivateChatToolBar = React.createClass({
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
@ -6,7 +6,7 @@ export let Header = React.createClass({
|
||||
getMeteorData() {
|
||||
let in_audio, whiteboard_title, in_listen_only, is_muted, is_talking;
|
||||
in_audio = BBB.amIInAudio();
|
||||
whiteboard_title = BBB.currentPresentationName() || "No active presentation";
|
||||
whiteboard_title = BBB.currentPresentationName() || 'No active presentation';
|
||||
in_listen_only = BBB.amIListenOnlyAudio();
|
||||
is_muted = BBB.amIMuted();
|
||||
is_talking = BBB.amITalking();
|
||||
@ -22,72 +22,76 @@ export let Header = React.createClass({
|
||||
handleLeaveAudioButton(event) {
|
||||
return exitVoiceCall(event);
|
||||
},
|
||||
|
||||
handleMuteButton(event) {
|
||||
$(".tooltip").hide();
|
||||
$('.tooltip').hide();
|
||||
return toggleMic(this);
|
||||
},
|
||||
|
||||
handleToggleUserlistButton(event) {
|
||||
if(isLandscape() || isLandscapeMobile()) {
|
||||
if (isLandscape() || isLandscapeMobile()) {
|
||||
return toggleUsersList();
|
||||
} else {
|
||||
if($('.settingsMenu').hasClass('menuOut')) {
|
||||
if ($('.settingsMenu').hasClass('menuOut')) {
|
||||
toggleSettingsMenu();
|
||||
} else {
|
||||
toggleShield();
|
||||
}
|
||||
|
||||
return toggleUserlistMenu();
|
||||
}
|
||||
},
|
||||
|
||||
handleToggleMenuButton(event) {
|
||||
if($('.userlistMenu').hasClass('menuOut')) {
|
||||
if ($('.userlistMenu').hasClass('menuOut')) {
|
||||
toggleUserlistMenu();
|
||||
} else {
|
||||
toggleShield();
|
||||
}
|
||||
|
||||
$('.toggleMenuButton').blur();
|
||||
return toggleSettingsMenu();
|
||||
},
|
||||
|
||||
|
||||
handleSettingsButton(event) {
|
||||
return $("#settingsModal").foundation('reveal', 'open');
|
||||
return $('#settingsModal').foundation('reveal', 'open');
|
||||
},
|
||||
|
||||
handleSignOutButton(event) {
|
||||
$('.signOutIcon').blur();
|
||||
return $("#logoutModal").foundation('reveal', 'open');
|
||||
return $('#logoutModal').foundation('reveal', 'open');
|
||||
},
|
||||
|
||||
render() {
|
||||
return (
|
||||
<nav id="navbar" className="myNavbar top-bar" role="navigation">
|
||||
<Button onClick={this.handleToggleUserlistButton} btn_class=" toggleUserlistButton navbarButton" i_class="ion-navicon" rel="tooltip" title="Toggle Userlist" span={true} notification="all_chats" />
|
||||
{this.data.in_audio ?
|
||||
<div className="audioNavbarSection">
|
||||
<nav id="navbar" className="myNavbar top-bar" role="navigation">
|
||||
<Button onClick={this.handleToggleUserlistButton} btn_class=" toggleUserlistButton navbarButton" i_class="ion-navicon" rel="tooltip" title="Toggle Userlist" span={true} notification="all_chats" />
|
||||
{this.data.in_audio ?
|
||||
<div className="audioNavbarSection">
|
||||
{this.data.in_listen_only ?
|
||||
<Button onClick={this.handleLeaveAudioButton} btn_class=" navbarButton leaveAudioButton" i_class="icon fi-volume-none" rel="tooltip" title="Exit Audio" />
|
||||
: null }
|
||||
{this.data.is_muted ?
|
||||
: null }
|
||||
{this.data.is_muted ?
|
||||
<Button onClick={this.handleMuteButton} btn_class=" navbarButton muteIcon" i_class="ion-ios-mic-off" rel="tooltip" title="Unmute" />
|
||||
: null }
|
||||
: null }
|
||||
{this.data.is_talking ?
|
||||
<Button onClick={this.handleMuteButton} btn_class=" navbarButton muteIcon" i_class="ion-ios-mic" rel="tooltip" title="Mute" />
|
||||
: <Button onClick={this.handleMuteButton} btn_class=" navbarButton muteIcon" i_class="ion-ios-mic-outline" rel="tooltip" title="Mute"/>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
: null }
|
||||
<span className="navbarTitle defaultTitle">
|
||||
{this.data.whiteboard_title}
|
||||
</span>
|
||||
|
||||
<div className="rightNavbarSection">
|
||||
: null }
|
||||
<span className="navbarTitle defaultTitle">
|
||||
{this.data.whiteboard_title}
|
||||
</span>
|
||||
|
||||
<div className="rightNavbarSection">
|
||||
<Button onclick={this.handleSettingsButton} id="settingsIcon" btn_class=" settingsIcon navbarButton" i_class="ion-gear-b" rel="tooltip"
|
||||
title="BigBlueButton Settings" />
|
||||
<Button onclick={this.handleSignOutButton} id="logout" btn_class=" signOutIcon navbarButton" i_class="ion-log-out" rel="tooltip" title="Logout" />
|
||||
</div>
|
||||
<Button onClick={this.handleToggleMenuButton} btn_class=" toggleMenuButton navbarButton"
|
||||
i_class="ion-android-more-vertical" rel="tooltip" title="Toggle Menu" span={true} />
|
||||
title="BigBlueButton Settings" />
|
||||
<Button onclick={this.handleSignOutButton} id="logout" btn_class=" signOutIcon navbarButton" i_class="ion-log-out" rel="tooltip" title="Logout" />
|
||||
</div>
|
||||
<Button onClick={this.handleToggleMenuButton} btn_class=" toggleMenuButton navbarButton"
|
||||
i_class="ion-android-more-vertical" rel="tooltip" title="Toggle Menu" span={true} />
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
File diff suppressed because one or more lines are too long
@ -43,7 +43,7 @@ export let UserListItem = React.createClass({
|
||||
const user = this.props.user;
|
||||
let statusIcons = [];
|
||||
|
||||
if(user.emoji !== 'none' && !user.isPresenter) {
|
||||
if (user.emoji !== 'none' && !user.isPresenter) {
|
||||
statusIcons.push((
|
||||
<EmojiIcon key="1" iconName={user.emoji}/>
|
||||
));
|
||||
|
@ -2,23 +2,24 @@ import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { Button } from '../shared/Button.jsx';
|
||||
|
||||
export let EmojiContainer = React.createClass ({
|
||||
export let EmojiContainer = React.createClass({
|
||||
mixins: [ReactMeteorData],
|
||||
getMeteorData() {
|
||||
let user, emoji_status, current_presentation;
|
||||
user = BBB.getCurrentUser();
|
||||
if(user != null) {
|
||||
if (user != null) {
|
||||
emoji_status = user.user.emoji_status;
|
||||
} else {
|
||||
emoji_status = "none";
|
||||
emoji_status = 'none';
|
||||
}
|
||||
|
||||
current_presentation = Meteor.Presentations.findOne({
|
||||
'presentation.current': true
|
||||
'presentation.current': true,
|
||||
});
|
||||
current_presentation ? current_presentation = true : current_presentation = false;
|
||||
return {
|
||||
emoji_status: emoji_status,
|
||||
current_presentation: current_presentation
|
||||
current_presentation: current_presentation,
|
||||
};
|
||||
},
|
||||
|
||||
@ -28,17 +29,17 @@ export let EmojiContainer = React.createClass ({
|
||||
|
||||
emojiIcons() {
|
||||
return [
|
||||
{ name: 'sad', icon: 'sad-face', title: ''},
|
||||
{ name: 'happy', icon: 'happy-face', title: ''},
|
||||
{ name: 'confused', icon: 'confused-face', title: ''},
|
||||
{ name: 'neutral', icon: 'neutral-face', title: ''},
|
||||
{ name: 'away', icon: 'clock', title: ''},
|
||||
{ name: 'raiseHand', icon: 'hand', title: 'Lower your Hand'}
|
||||
{ name: 'sad', icon: 'sad-face', title: '' },
|
||||
{ name: 'happy', icon: 'happy-face', title: '' },
|
||||
{ name: 'confused', icon: 'confused-face', title: '' },
|
||||
{ name: 'neutral', icon: 'neutral-face', title: '' },
|
||||
{ name: 'away', icon: 'clock', title: '' },
|
||||
{ name: 'raiseHand', icon: 'hand', title: 'Lower your Hand' },
|
||||
];
|
||||
},
|
||||
|
||||
handleInactive(name, event) {
|
||||
if($(event.target).css('opacity') === '1') {
|
||||
if ($(event.target).css('opacity') === '1') {
|
||||
BBB.setEmojiStatus(
|
||||
BBB.getMeetingId(),
|
||||
getInSession('userId'),
|
||||
@ -52,13 +53,13 @@ export let EmojiContainer = React.createClass ({
|
||||
},
|
||||
|
||||
handleActive(event) {
|
||||
if($('.activeEmojiButton').css('opacity') === '1') {
|
||||
if ($('.activeEmojiButton').css('opacity') === '1') {
|
||||
BBB.setEmojiStatus(
|
||||
BBB.getMeetingId(),
|
||||
getInSession('userId'),
|
||||
getInSession('userId'),
|
||||
getInSession('authToken'),
|
||||
"none"
|
||||
'none'
|
||||
);
|
||||
$('.FABTriggerButton').blur();
|
||||
return toggleEmojisFAB();
|
||||
@ -72,14 +73,14 @@ export let EmojiContainer = React.createClass ({
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className={ classNames('FABContainer', !this.data.current_presentation ? 'noPresentation' : '' ) }>
|
||||
<Button onClick={ this.handleFABTriggerButton } btn_class=" FABTriggerButton" i_class="ion-android-hand"/>
|
||||
<div className={ classNames('FABContainer', !this.data.current_presentation ? 'noPresentation' : '') }>
|
||||
<Button onClick={ this.handleFABTriggerButton } btn_class=" FABTriggerButton" i_class="ion-android-hand"/>
|
||||
{this.emojiIcons().map((emoji) =>
|
||||
<Button btn_class={ classNames(' ' + emoji.name + 'EmojiButton', this.getCurrentUserEmojiStatus(emoji.name) ? 'activeEmojiButton' : 'inactiveEmojiButton') }
|
||||
onClick={ this.getCurrentUserEmojiStatus(emoji.name) ? this.handleActive : this.handleInactive.bind(null, emoji.name) }
|
||||
key={emoji.name} emoji={ emoji.icon }/>
|
||||
)}
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
@ -1,65 +1,59 @@
|
||||
import React from 'react';
|
||||
|
||||
export let EmojisSVG = React.createClass ({
|
||||
export let EmojisSVG = React.createClass({
|
||||
render() {
|
||||
if(this.props.emoji == "happy-face") {
|
||||
return ( <svg width={this.props.size} height={this.props.size} viewBox="0 0 50 50">
|
||||
<circle cx="25" cy="25" r="14" stroke="white" strokeWidth="3" fill="transparent"/>
|
||||
<circle cx="19" cy="22" r="1" stroke="white" strokeWidth="2" fill="white"/>
|
||||
<circle cx="31" cy="22" r="1" stroke="white" strokeWidth="2" fill="white"/>
|
||||
<path d="m18 30 C 21 33, 29 33, 32 30" stroke="white" strokeWidth="3" strokeLinecap="round" stroke-linejoin="round" fill="none" />
|
||||
</svg>
|
||||
if (this.props.emoji == 'happy-face') {
|
||||
return (<svg width={this.props.size} height={this.props.size} viewBox="0 0 50 50">
|
||||
<circle cx="25" cy="25" r="14" stroke="white" strokeWidth="3" fill="transparent"/>
|
||||
<circle cx="19" cy="22" r="1" stroke="white" strokeWidth="2" fill="white"/>
|
||||
<circle cx="31" cy="22" r="1" stroke="white" strokeWidth="2" fill="white"/>
|
||||
<path d="m18 30 C 21 33, 29 33, 32 30" stroke="white" strokeWidth="3" strokeLinecap="round" stroke-linejoin="round" fill="none" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
else if(this.props.emoji == "neutral-face") {
|
||||
} else if (this.props.emoji == 'neutral-face') {
|
||||
return (
|
||||
<svg width={this.props.size} height={this.props.size} viewBox="0 0 50 50">
|
||||
<circle cx="25" cy="25" r="14" stroke="white" strokeWidth="3" fill="transparent"/>
|
||||
<circle cx="19" cy="22" r="1" stroke="white" strokeWidth="2" fill="white"/>
|
||||
<circle cx="31" cy="22" r="1" stroke="white" strokeWidth="2" fill="white"/>
|
||||
<path d="m18 30 l 14 0" stroke="white" strokeWidth="3" strokeLinecap="round" stroke-linejoin="round" />
|
||||
<svg width={this.props.size} height={this.props.size} viewBox="0 0 50 50">
|
||||
<circle cx="25" cy="25" r="14" stroke="white" strokeWidth="3" fill="transparent"/>
|
||||
<circle cx="19" cy="22" r="1" stroke="white" strokeWidth="2" fill="white"/>
|
||||
<circle cx="31" cy="22" r="1" stroke="white" strokeWidth="2" fill="white"/>
|
||||
<path d="m18 30 l 14 0" stroke="white" strokeWidth="3" strokeLinecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
else if(this.props.emoji == "confused-face") {
|
||||
return(
|
||||
<svg width={this.props.size} height={this.props.size} viewBox="0 0 50 50">
|
||||
<circle cx="25" cy="25" r="14" stroke="white" strokeWidth="3" fill="transparent"/>
|
||||
<circle cx="19" cy="22" r="1" stroke="white" strokeWidth="2" fill="white"/>
|
||||
<circle cx="31" cy="22" r="1" stroke="white" strokeWidth="2" fill="white"/>
|
||||
<path d="M18 30 C 20 28, 22 28, 25 30 S 30 32, 32 30" stroke="white" strokeWidth="3" strokeLinecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
else if(this.props.emoji == "sad-face") {
|
||||
return(
|
||||
<svg width={this.props.size} height={this.props.size} viewBox="0 0 50 50">
|
||||
<circle cx="25" cy="25" r="14" stroke="white" strokeWidth="3" fill="transparent"/>
|
||||
<circle cx="19" cy="22" r="1" stroke="white" strokeWidth="2" fill="white"/>
|
||||
<circle cx="31" cy="22" r="1" stroke="white" strokeWidth="2" fill="white"/>
|
||||
<path d="m18 30 C 21 27, 29 27, 32 30" stroke="white" strokeWidth="3" strokeLinecap="round" stroke-linejoin="round" fill="none" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
else if(this.props.emoji == "clock") {
|
||||
} else if (this.props.emoji == 'confused-face') {
|
||||
return (
|
||||
<svg width={this.props.size} height={this.props.size} viewBox="0 0 50 50">
|
||||
<circle cx="25" cy="25" r="14" stroke="white" strokeWidth="3" fill="transparent"/>
|
||||
<path d="m25 25 l 0 -8" stroke="white" strokeWidth="3" strokeLinecap="round" stroke-linejoin="round" />
|
||||
<path d="m25 25 l 5 5" stroke="white" strokeWidth="3" strokeLinecap="round" stroke-linejoin="round" />
|
||||
<svg width={this.props.size} height={this.props.size} viewBox="0 0 50 50">
|
||||
<circle cx="25" cy="25" r="14" stroke="white" strokeWidth="3" fill="transparent"/>
|
||||
<circle cx="19" cy="22" r="1" stroke="white" strokeWidth="2" fill="white"/>
|
||||
<circle cx="31" cy="22" r="1" stroke="white" strokeWidth="2" fill="white"/>
|
||||
<path d="M18 30 C 20 28, 22 28, 25 30 S 30 32, 32 30" stroke="white" strokeWidth="3" strokeLinecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
);
|
||||
} else if (this.props.emoji == 'sad-face') {
|
||||
return (
|
||||
<svg width={this.props.size} height={this.props.size} viewBox="0 0 50 50">
|
||||
<circle cx="25" cy="25" r="14" stroke="white" strokeWidth="3" fill="transparent"/>
|
||||
<circle cx="19" cy="22" r="1" stroke="white" strokeWidth="2" fill="white"/>
|
||||
<circle cx="31" cy="22" r="1" stroke="white" strokeWidth="2" fill="white"/>
|
||||
<path d="m18 30 C 21 27, 29 27, 32 30" stroke="white" strokeWidth="3" strokeLinecap="round" stroke-linejoin="round" fill="none" />
|
||||
</svg>
|
||||
);
|
||||
} else if (this.props.emoji == 'clock') {
|
||||
return (
|
||||
<svg width={this.props.size} height={this.props.size} viewBox="0 0 50 50">
|
||||
<circle cx="25" cy="25" r="14" stroke="white" strokeWidth="3" fill="transparent"/>
|
||||
<path d="m25 25 l 0 -8" stroke="white" strokeWidth="3" strokeLinecap="round" stroke-linejoin="round" />
|
||||
<path d="m25 25 l 5 5" stroke="white" strokeWidth="3" strokeLinecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
else if(this.props.emoji == "hand") {
|
||||
} else if (this.props.emoji == 'hand') {
|
||||
return (
|
||||
<span rel="tooltip" data-placement="bottom" title="{{title}}">
|
||||
<i className="ion-android-hand"></i>
|
||||
<span rel="tooltip" data-placement="bottom" title="{{title}}">
|
||||
<i className="ion-android-hand"></i>
|
||||
</span>
|
||||
);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
console.log("This shouldn't be happening");
|
||||
return ( <span></span> );
|
||||
return (<span></span>);
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
@ -8,47 +8,48 @@ export let Polling = React.createClass({
|
||||
let poll;
|
||||
poll = BBB.getCurrentPoll(getInSession('userId'));
|
||||
return {
|
||||
poll: poll
|
||||
poll: poll,
|
||||
};
|
||||
},
|
||||
|
||||
componentDidMount: function() {
|
||||
|
||||
componentDidMount: function () {
|
||||
return scaleWhiteboard();
|
||||
},
|
||||
|
||||
componentWillUnmount: function() {
|
||||
componentWillUnmount: function () {
|
||||
setTimeout(scaleWhiteboard, 0);
|
||||
},
|
||||
|
||||
getStyledAnswers(poll) {
|
||||
let number, buttonStyle, answers;
|
||||
if(poll != null) {
|
||||
let number, buttonStyle, answers;
|
||||
if (poll != null) {
|
||||
number = poll.poll_info.poll.answers.length;
|
||||
buttonStyle = {
|
||||
width: 'calc(75%/' + number + ')',
|
||||
marginLeft: 'calc(25%/' + number * 2 + ')',
|
||||
marginRight: 'calc(25%/ ' + number * 2 + ')'
|
||||
marginRight: 'calc(25%/ ' + number * 2 + ')',
|
||||
};
|
||||
answers = poll.poll_info.poll.answers;
|
||||
for(j = 0; j < number; j++) {
|
||||
for (j = 0; j < number; j++) {
|
||||
answers[j].style = buttonStyle;
|
||||
}
|
||||
return answers;
|
||||
|
||||
return answers;
|
||||
}
|
||||
},
|
||||
|
||||
handleClick: function(label, answer) {
|
||||
handleClick: function (label, answer) {
|
||||
return BBB.sendPollResponseMessage(label, answer);
|
||||
},
|
||||
|
||||
render(){
|
||||
render() {
|
||||
return (
|
||||
<div className="polling">
|
||||
<div className="polling">
|
||||
{this.data.poll ? this.getStyledAnswers(this.data.poll).map((question) =>
|
||||
<Button onClick={this.handleClick.bind(null, question.key, question.id)} btn_class=" pollButtons" rel="tooltip" data_placement="top"
|
||||
label={question.key} style={question.style} key={question.id}/>
|
||||
) : null }
|
||||
) : null }
|
||||
</div>
|
||||
)
|
||||
}
|
||||
);
|
||||
},
|
||||
});
|
||||
|
@ -2,44 +2,44 @@ import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
|
||||
export let PresentationList = React.createClass({
|
||||
handleShow(name){
|
||||
handleShow(name) {
|
||||
return console.info('Should show the file `' + name + '`');
|
||||
},
|
||||
|
||||
handleDelete(name){
|
||||
handleDelete(name) {
|
||||
return console.info('Should delete the file `' + name + '`');
|
||||
},
|
||||
|
||||
render() {
|
||||
return(
|
||||
<ul className="presenter-uploader-file-list">
|
||||
return (
|
||||
<ul className="presenter-uploader-file-list">
|
||||
{this.props.files ? this.props.files.map((file) =>
|
||||
<li className="presenter-uploader-file-item is-uploading" key={file.name}>
|
||||
<span className="presenter-uploader-file-item-name">
|
||||
{file.name}
|
||||
</span>
|
||||
<span className="presenter-uploader-file-item-progress">
|
||||
{file.percUploaded}
|
||||
</span>
|
||||
<li className="presenter-uploader-file-item is-uploading" key={file.name}>
|
||||
<span className="presenter-uploader-file-item-name">
|
||||
{file.name}
|
||||
</span>
|
||||
<span className="presenter-uploader-file-item-progress">
|
||||
{file.percUploaded}
|
||||
</span>
|
||||
</li>
|
||||
)
|
||||
: null }
|
||||
|
||||
: null }
|
||||
|
||||
{this.props.presentations ? this.props.presentations.map((presentation) =>
|
||||
<li key={presentation.id} className={ classNames('presenter-uploader-file-item', presentation.current ? 'current' : '') }>
|
||||
<span onClick={this.handleShow.bind(null, presentation.name)} className="presenter-uploader-file-item-name" data-action-show>
|
||||
{presentation.name}
|
||||
</span>
|
||||
<span className="presenter-uploader-file-item-actions">
|
||||
<li key={presentation.id} className={ classNames('presenter-uploader-file-item', presentation.current ? 'current' : '') }>
|
||||
<span onClick={this.handleShow.bind(null, presentation.name)} className="presenter-uploader-file-item-name" data-action-show>
|
||||
{presentation.name}
|
||||
</span>
|
||||
<span className="presenter-uploader-file-item-actions">
|
||||
{presentation.current ? null :
|
||||
<i onClick={this.handleShow.bind(null, presentation.name)} className="ion-ios-eye-outline" data-action-show></i>
|
||||
}
|
||||
<i onClick={this.handleDelete.bind(null, presentation.name)} className="ion-ios-trash-outline" data-action-delete></i>
|
||||
</span>
|
||||
}
|
||||
<i onClick={this.handleDelete.bind(null, presentation.name)} className="ion-ios-trash-outline" data-action-delete></i>
|
||||
</span>
|
||||
</li>
|
||||
)
|
||||
: null }
|
||||
: null }
|
||||
</ul>
|
||||
);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
@ -1,19 +1,19 @@
|
||||
import React from 'react';
|
||||
|
||||
this.scaleSlide = function(originalWidth, originalHeight) {
|
||||
this.scaleSlide = function (originalWidth, originalHeight) {
|
||||
let adjustedHeight, adjustedWidth, boardHeight, boardWidth;
|
||||
|
||||
// set the size of the whiteboard space (frame) where the slide will be displayed
|
||||
if(window.matchMedia('(orientation: landscape)').matches) {
|
||||
if (window.matchMedia('(orientation: landscape)').matches) {
|
||||
// for landscape orientation we want "fit to height" so that we can
|
||||
// minimize the empty space above and below the slide (for best readability)
|
||||
boardWidth = $("#whiteboard-container").width();
|
||||
boardHeight = $("#whiteboard-container").height();
|
||||
boardWidth = $('#whiteboard-container').width();
|
||||
boardHeight = $('#whiteboard-container').height();
|
||||
} else {
|
||||
// for portrait orientation we want "fit to width" so that we can
|
||||
// minimize the empty space on the sides of the slide (for best readability)
|
||||
boardWidth = $("#whiteboard-container").width();
|
||||
boardHeight = 1.4 * $("#whiteboard-container").width();
|
||||
boardWidth = $('#whiteboard-container').width();
|
||||
boardHeight = 1.4 * $('#whiteboard-container').width();
|
||||
}
|
||||
|
||||
// this is the best fitting pair
|
||||
@ -21,7 +21,7 @@ this.scaleSlide = function(originalWidth, originalHeight) {
|
||||
adjustedHeight = null;
|
||||
|
||||
// the slide image is in portrait orientation
|
||||
if(originalWidth <= originalHeight) {
|
||||
if (originalWidth <= originalHeight) {
|
||||
adjustedWidth = boardHeight * originalWidth / originalHeight;
|
||||
if (boardWidth < adjustedWidth) {
|
||||
adjustedHeight = boardHeight * boardWidth / adjustedWidth;
|
||||
@ -40,11 +40,12 @@ this.scaleSlide = function(originalWidth, originalHeight) {
|
||||
adjustedWidth = boardWidth;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
width: adjustedWidth,
|
||||
height: adjustedHeight,
|
||||
boardWidth: boardWidth,
|
||||
boardHeight: boardHeight
|
||||
boardHeight: boardHeight,
|
||||
};
|
||||
};
|
||||
|
||||
@ -54,9 +55,9 @@ export let Slide = React.createClass({
|
||||
let currentSlide, shapes, pointer;
|
||||
currentSlide = BBB.getCurrentSlide();
|
||||
|
||||
if(currentSlide != null) {
|
||||
if (currentSlide != null) {
|
||||
shapes = Meteor.Shapes.find({
|
||||
whiteboardId: currentSlide.slide.id
|
||||
whiteboardId: currentSlide.slide.id,
|
||||
}).fetch();
|
||||
}
|
||||
|
||||
@ -66,25 +67,27 @@ export let Slide = React.createClass({
|
||||
};
|
||||
},
|
||||
|
||||
componentDidMount: function() {
|
||||
componentDidMount: function () {
|
||||
//console.log('componentDidMount');
|
||||
this.reactOnSlideChange();
|
||||
},
|
||||
|
||||
componentWillUpdate: function() {
|
||||
if(typeof this.whiteboardPaperModel !== "undefined" && this.whiteboardPaperModel !== null) {
|
||||
componentWillUpdate: function () {
|
||||
if (typeof this.whiteboardPaperModel !== 'undefined' && this.whiteboardPaperModel !== null) {
|
||||
wpm = this.whiteboardPaperModel;
|
||||
wpm.clearShapes();
|
||||
|
||||
//this.manuallyDisplayShapes();
|
||||
}
|
||||
|
||||
//console.log('componentWillUpdate');
|
||||
},
|
||||
|
||||
componentDidUpdate: function() {
|
||||
componentDidUpdate: function () {
|
||||
//console.log('componentDidUpdate');
|
||||
if(this.data.current_slide){
|
||||
if (this.data.current_slide) {
|
||||
this.reactOnSlideChange();
|
||||
if(this.data.shapes){
|
||||
if (this.data.shapes) {
|
||||
this.data.shapes.map((shape) =>
|
||||
this.renderShape(shape));
|
||||
}
|
||||
@ -93,16 +96,16 @@ export let Slide = React.createClass({
|
||||
}
|
||||
},
|
||||
|
||||
componentWillUnmount: function() {
|
||||
componentWillUnmount: function () {
|
||||
//console.log('componentWillUnmount');
|
||||
},
|
||||
|
||||
createWhiteboardPaper: function(callback) {
|
||||
createWhiteboardPaper: function (callback) {
|
||||
this.whiteboardPaperModel = new Meteor.WhiteboardPaperModel('whiteboard-paper');
|
||||
return callback(this.whiteboardPaperModel);
|
||||
},
|
||||
|
||||
displaySlide: function(wpm) {
|
||||
displaySlide: function (wpm) {
|
||||
let adjustedDimensions, currentSlide, ref;
|
||||
currentSlide = BBB.getCurrentSlide();
|
||||
wpm.create();
|
||||
@ -118,102 +121,113 @@ export let Slide = React.createClass({
|
||||
|
||||
clearSlide() {
|
||||
let ref;
|
||||
|
||||
//clear the slide
|
||||
if(typeof this.whiteboardPaperModel !== "undefined" && this.whiteboardPaperModel !== null) {
|
||||
if (typeof this.whiteboardPaperModel !== 'undefined' && this.whiteboardPaperModel !== null) {
|
||||
this.whiteboardPaperModel.removeAllImagesFromPaper();
|
||||
}
|
||||
|
||||
//hide the cursor
|
||||
return typeof this.whiteboardPaperModel !== "undefined" && this.whiteboardPaperModel !== null ? (ref = this.whiteboardPaperModel.cursor) != null ? ref.remove() : void 0 : void 0;
|
||||
return typeof this.whiteboardPaperModel !== 'undefined' && this.whiteboardPaperModel !== null ? (ref = this.whiteboardPaperModel.cursor) != null ? ref.remove() : void 0 : void 0;
|
||||
},
|
||||
|
||||
manuallyDisplayShapes: function() {
|
||||
manuallyDisplayShapes: function () {
|
||||
let currentSlide, i, j, len, len1, num, ref, ref1, ref2, results, s, shapeInfo, shapeType, shapes, wpm;
|
||||
if(Meteor.WhiteboardCleanStatus.findOne({
|
||||
in_progress: true
|
||||
if (Meteor.WhiteboardCleanStatus.findOne({
|
||||
in_progress: true,
|
||||
}) != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
currentSlide = BBB.getCurrentSlide();
|
||||
wpm = this.whiteboardPaperModel;
|
||||
shapes = Meteor.Shapes.find({
|
||||
whiteboardId: currentSlide != null ? (ref = currentSlide.slide) != null ? ref.id : void 0 : void 0
|
||||
whiteboardId: currentSlide != null ? (ref = currentSlide.slide) != null ? ref.id : void 0 : void 0,
|
||||
}).fetch();
|
||||
|
||||
results = [];
|
||||
for(i = 0, len1 = shapes.length; i < len1; i++) {
|
||||
for (i = 0, len1 = shapes.length; i < len1; i++) {
|
||||
s = shapes[i];
|
||||
shapeInfo = ((ref1 = s.shape) != null ? ref1.shape : void 0) || (s != null ? s.shape : void 0);
|
||||
shapeType = shapeInfo != null ? shapeInfo.type : void 0;
|
||||
if(shapeType !== "text") {
|
||||
if (shapeType !== 'text') {
|
||||
len = shapeInfo.points.length;
|
||||
for(num = j = 0, ref2 = len; 0 <= ref2 ? j <= ref2 : j >= ref2; num = 0 <= ref2 ? ++j : --j) { // the coordinates must be in the range 0 to 1
|
||||
if(shapeInfo != null) {
|
||||
for (num = j = 0, ref2 = len; 0 <= ref2 ? j <= ref2 : j >= ref2; num = 0 <= ref2 ? ++j : --j) { // the coordinates must be in the range 0 to 1
|
||||
if (shapeInfo != null) {
|
||||
shapeInfo.points[num] = (shapeInfo != null ? shapeInfo.points[num] : void 0) / 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(wpm != null) {
|
||||
|
||||
if (wpm != null) {
|
||||
wpm.makeShape(shapeType, shapeInfo);
|
||||
}
|
||||
|
||||
results.push(wpm != null ? wpm.updateShape(shapeType, shapeInfo) : void 0);
|
||||
}
|
||||
|
||||
return results;
|
||||
},
|
||||
|
||||
reactOnSlideChange: function() {
|
||||
reactOnSlideChange: function () {
|
||||
var _this = this;
|
||||
var currentSlide, pic, ref;
|
||||
currentSlide = BBB.getCurrentSlide("slide.rendered");
|
||||
currentSlide = BBB.getCurrentSlide('slide.rendered');
|
||||
pic = new Image();
|
||||
pic.onload = function() {
|
||||
pic.onload = function () {
|
||||
var ref;
|
||||
setInSession('slideOriginalWidth', this.width);
|
||||
setInSession('slideOriginalHeight', this.height);
|
||||
$(window).resize(function() {
|
||||
$(window).resize(function () {
|
||||
if (!$('.panel-footer').hasClass('ui-resizable-resizing')) {
|
||||
scaleWhiteboard(_this.whiteboardPaperModel);
|
||||
}
|
||||
});
|
||||
|
||||
if ((currentSlide != null ? (ref = currentSlide.slide) != null ? ref.img_uri : void 0 : void 0) != null) {
|
||||
return _this.createWhiteboardPaper(function(wpm) {
|
||||
return _this.createWhiteboardPaper(function (wpm) {
|
||||
return _this.displaySlide(wpm);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
pic.src = currentSlide != null ? (ref = currentSlide.slide) != null ? ref.img_uri : void 0 : void 0;
|
||||
return "";
|
||||
return '';
|
||||
},
|
||||
|
||||
updatePointerLocation(pointer) {
|
||||
if(typeof this.whiteboardPaperModel !== "undefined" && this.whiteboardPaperModel !== null) {
|
||||
if (typeof this.whiteboardPaperModel !== 'undefined' && this.whiteboardPaperModel !== null) {
|
||||
this.whiteboardPaperModel.moveCursor(pointer.x, pointer.y);
|
||||
}
|
||||
},
|
||||
|
||||
renderShape(data) {
|
||||
let i, len, num, ref, ref1, shapeInfo, shapeType, wpm;
|
||||
|
||||
// @data is the shape object coming from the {{#each}} in the html file
|
||||
shapeInfo = ((ref = data.shape) != null ? ref.shape : void 0) || data.shape;
|
||||
shapeType = shapeInfo != null ? shapeInfo.type : void 0;
|
||||
if(shapeType !== "text") {
|
||||
if (shapeType !== 'text') {
|
||||
len = shapeInfo.points.length;
|
||||
for (num = i = 0, ref1 = len; 0 <= ref1 ? i <= ref1 : i >= ref1; num = 0 <= ref1 ? ++i : --i) { // the coordinates must be in the range 0 to 1
|
||||
shapeInfo.points[num] = shapeInfo.points[num] / 100;
|
||||
}
|
||||
}
|
||||
if(typeof this.whiteboardPaperModel !== "undefined" && this.whiteboardPaperModel !== null) {
|
||||
|
||||
if (typeof this.whiteboardPaperModel !== 'undefined' && this.whiteboardPaperModel !== null) {
|
||||
wpm = this.whiteboardPaperModel;
|
||||
if(wpm != null) {
|
||||
if (wpm != null) {
|
||||
wpm.makeShape(shapeType, shapeInfo);
|
||||
}
|
||||
|
||||
return wpm != null ? wpm.updateShape(shapeType, shapeInfo) : void 0;
|
||||
}
|
||||
},
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div id="whiteboard-paper">
|
||||
<div id="whiteboard-paper">
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
@ -3,8 +3,8 @@ import classNames from 'classnames';
|
||||
import { Button } from '../shared/Button.jsx';
|
||||
import { PresentationList } from './PresentationList.jsx';
|
||||
|
||||
export let UploaderControls = React.createClass ({
|
||||
getDefaultProps: function() {
|
||||
export let UploaderControls = React.createClass({
|
||||
getDefaultProps: function () {
|
||||
return {
|
||||
isOpen: new ReactiveVar(false),
|
||||
files: new ReactiveList({
|
||||
@ -13,25 +13,25 @@ export let UploaderControls = React.createClass ({
|
||||
let ref, ref1;
|
||||
return (ref = a.isUploading === b.isUploading) != null ? ref : {
|
||||
0: (ref1 = a.isUploading) != null ? ref1 : -{
|
||||
1: 1
|
||||
}
|
||||
1: 1,
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
}),
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
mixins: [ReactMeteorData],
|
||||
getMeteorData() {
|
||||
let presentations;
|
||||
presentations = Meteor.Presentations.find({}, {
|
||||
sort: {
|
||||
'presentation.current': -1,
|
||||
'presentation.name': 1
|
||||
'presentation.name': 1,
|
||||
},
|
||||
fields: {
|
||||
'presentation': 1
|
||||
}
|
||||
presentation: 1,
|
||||
},
|
||||
}).fetch();
|
||||
|
||||
return {
|
||||
@ -39,32 +39,35 @@ export let UploaderControls = React.createClass ({
|
||||
};
|
||||
},
|
||||
|
||||
fakeUpload (file, list) {
|
||||
fakeUpload(file, list) {
|
||||
return setTimeout((() => {
|
||||
file.uploadedSize = file.uploadedSize + (Math.floor(Math.random() * file.size + file.uploadedSize) / 10);
|
||||
file.percUploaded = Math.round((file.uploadedSize / file.size) * 100) + "%";
|
||||
file.percUploaded = Math.round((file.uploadedSize / file.size) * 100) + '%';
|
||||
if (!(file.size > file.uploadedSize)) {
|
||||
file.uploadedSize = file.size;
|
||||
file.isUploading = false;
|
||||
}
|
||||
|
||||
list.update(file.name, file);
|
||||
this.forceUpdate();
|
||||
if(file.isUploading === true) {
|
||||
if (file.isUploading === true) {
|
||||
return this.fakeUpload(file, list);
|
||||
} else {
|
||||
list.remove(file.name); // TODO: Here we should remove and update te presentation on mongo
|
||||
this.forceUpdate();
|
||||
return
|
||||
return;
|
||||
}
|
||||
}), 200);
|
||||
},
|
||||
|
||||
|
||||
isOpen() {
|
||||
return this.props.isOpen.get() ? "is-open" : ""
|
||||
return this.props.isOpen.get() ? 'is-open' : '';
|
||||
},
|
||||
|
||||
files() {
|
||||
return this.props.files ? this.props.files.fetch() : null;
|
||||
},
|
||||
|
||||
presentations() {
|
||||
return this.data.presentations.map(x => {
|
||||
return x.presentation;
|
||||
@ -78,7 +81,7 @@ export let UploaderControls = React.createClass ({
|
||||
return _.each(files, file => {
|
||||
file.isUploading = true;
|
||||
file.uploadedSize = 0;
|
||||
file.percUploaded = "0";
|
||||
file.percUploaded = '0';
|
||||
this.props.files.insert(file.name, file);
|
||||
return this.fakeUpload(file, this.props.files);
|
||||
});
|
||||
@ -106,23 +109,23 @@ export let UploaderControls = React.createClass ({
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className={classNames('presenter-uploader-control', this.isOpen() ? "is-open" : "")} >
|
||||
<div className="presenter-uploader-container">
|
||||
<PresentationList files={this.files()} presentations={this.presentations()} />
|
||||
<div onDrop={this.handleInput} onDragOver={this.handleDragOver} onDragLeave={this.handleDragLeave} className="presenter-uploader-dropzone" data-dropzone>
|
||||
<input onChange={this.handleInput} type="file" className="presenter-uploader-dropzone-fileinput" multiple />
|
||||
<i className="presenter-uploader-dropzone-icon ion-archive"></i>
|
||||
<span className="presenter-uploader-dropzone-label">Drop files here <br/>or click to upload</span>
|
||||
</div>
|
||||
<Button onClick={this.handleClose} btn_class=" presenter-uploader-control-btn js-close" i_class="ion-ios-close-outline"/>
|
||||
<div className="presenter-uploader-tip">
|
||||
UPLOAD ANY OFFICE DOCUMENT OR PORTABLE DOCUMENT FORMAT (PDF) FILE.
|
||||
<br/>
|
||||
FOR BEST RESULTS UPLOAD PDF.
|
||||
</div>
|
||||
</div>
|
||||
<Button onClick={this.handleOpen} btn_class=" presenter-uploader-control-btn js-open" i_class="ion-ios-upload-outline"/>
|
||||
<div className={classNames('presenter-uploader-control', this.isOpen() ? 'is-open' : '')} >
|
||||
<div className="presenter-uploader-container">
|
||||
<PresentationList files={this.files()} presentations={this.presentations()} />
|
||||
<div onDrop={this.handleInput} onDragOver={this.handleDragOver} onDragLeave={this.handleDragLeave} className="presenter-uploader-dropzone" data-dropzone>
|
||||
<input onChange={this.handleInput} type="file" className="presenter-uploader-dropzone-fileinput" multiple />
|
||||
<i className="presenter-uploader-dropzone-icon ion-archive"></i>
|
||||
<span className="presenter-uploader-dropzone-label">Drop files here <br/>or click to upload</span>
|
||||
</div>
|
||||
<Button onClick={this.handleClose} btn_class=" presenter-uploader-control-btn js-close" i_class="ion-ios-close-outline"/>
|
||||
<div className="presenter-uploader-tip">
|
||||
UPLOAD ANY OFFICE DOCUMENT OR PORTABLE DOCUMENT FORMAT (PDF) FILE.
|
||||
<br/>
|
||||
FOR BEST RESULTS UPLOAD PDF.
|
||||
</div>
|
||||
</div>
|
||||
<Button onClick={this.handleOpen} btn_class=" presenter-uploader-control-btn js-open" i_class="ion-ios-upload-outline"/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
);
|
||||
},
|
||||
});
|
||||
|
@ -6,33 +6,33 @@ import { Polling } from './Polling.jsx';
|
||||
import { Button } from '../shared/Button.jsx';
|
||||
import { WhiteboardControls } from './WhiteboardControls.jsx';
|
||||
|
||||
|
||||
export let Whiteboard = React.createClass({
|
||||
mixins: [ReactMeteorData],
|
||||
getMeteorData() {
|
||||
let poll_started, is_presenter, is_mobile, whiteboard_size;
|
||||
if(BBB.isPollGoing(getInSession('userId'))) {
|
||||
if (BBB.isPollGoing(getInSession('userId'))) {
|
||||
poll_started = true;
|
||||
} else {
|
||||
poll_started = false;
|
||||
}
|
||||
|
||||
if(BBB.isUserPresenter(getInSession('userId'))) {
|
||||
if (BBB.isUserPresenter(getInSession('userId'))) {
|
||||
is_presenter = true;
|
||||
} else {
|
||||
is_presenter = false;
|
||||
}
|
||||
|
||||
is_mobile = isMobile();
|
||||
if(BBB.isUserPresenter(getInSession('userId'))) {
|
||||
if (BBB.isUserPresenter(getInSession('userId'))) {
|
||||
whiteboard_size = 'presenter-whiteboard';
|
||||
} else {
|
||||
if(BBB.isPollGoing(getInSession('userId'))) {
|
||||
whiteboard_size = 'poll-whiteboard';
|
||||
} else {
|
||||
whiteboard_size = 'viewer-whiteboard';
|
||||
if (BBB.isPollGoing(getInSession('userId'))) {
|
||||
whiteboard_size = 'poll-whiteboard';
|
||||
} else {
|
||||
whiteboard_size = 'viewer-whiteboard';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
whiteboard_size: whiteboard_size,
|
||||
is_mobile: is_mobile,
|
||||
@ -42,7 +42,7 @@ export let Whiteboard = React.createClass({
|
||||
},
|
||||
|
||||
isPollStarted() {
|
||||
if(BBB.isPollGoing(getInSession('userId'))) {
|
||||
if (BBB.isPollGoing(getInSession('userId'))) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@ -56,17 +56,19 @@ export let Whiteboard = React.createClass({
|
||||
resize() {
|
||||
return adjustChatInputHeight();
|
||||
},
|
||||
|
||||
start() {
|
||||
if($('#chat').width() / $('#panels').width() > 0.2) { // chat shrinking can't make it smaller than one fifth of the whiteboard-chat area
|
||||
if ($('#chat').width() / $('#panels').width() > 0.2) { // chat shrinking can't make it smaller than one fifth of the whiteboard-chat area
|
||||
return $('#whiteboard').resizable('option', 'maxWidth', $('#panels').width() - 200); // gives the chat enough space (200px)
|
||||
} else {
|
||||
return $('#whiteboard').resizable('option', 'maxWidth', $('#whiteboard').width());
|
||||
}
|
||||
},
|
||||
|
||||
stop() {
|
||||
$('#whiteboard').css('width', `${100 * $('#whiteboard').width() / $('#panels').width()}%`); // transforms width to %
|
||||
return $('#whiteboard').resizable('option', 'maxWidth', null);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
// whiteboard element needs to be available
|
||||
@ -74,23 +76,23 @@ export let Whiteboard = React.createClass({
|
||||
|
||||
return $(document).foundation(); // initialize foundation javascript
|
||||
},
|
||||
|
||||
|
||||
handleWhiteboardFullScreen() {
|
||||
return enterWhiteboardFullscreen();
|
||||
},
|
||||
|
||||
handleExitFullScreen() {
|
||||
if(document.exitFullscreen) {
|
||||
if (document.exitFullscreen) {
|
||||
return document.exitFullscreen();
|
||||
} else if(document.mozCancelFullScreen) {
|
||||
} else if (document.mozCancelFullScreen) {
|
||||
return document.mozCancelFullScreen();
|
||||
} else if(document.webkitExitFullscreen) {
|
||||
} else if (document.webkitExitFullscreen) {
|
||||
return document.webkitExitFullscreen();
|
||||
}
|
||||
},
|
||||
|
||||
isFullScreen() {
|
||||
if($( ".fullscreenButton" ).hasClass( "exitFullscreenButton" )) {
|
||||
if ($('.fullscreenButton').hasClass('exitFullscreenButton')) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@ -99,23 +101,23 @@ export let Whiteboard = React.createClass({
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div id="whiteboard" className="component">
|
||||
<div id="whiteboard-container" className={ classNames(this.data.whiteboard_size) }>
|
||||
<Slide />
|
||||
<EmojiContainer />
|
||||
<div id="whiteboard" className="component">
|
||||
<div id="whiteboard-container" className={ classNames(this.data.whiteboard_size) }>
|
||||
<Slide />
|
||||
<EmojiContainer />
|
||||
{this.data.is_mobile ?
|
||||
<Button onClick={this.isFullScreen() ? this.handleExitFullScreen : this.handleWhiteboardFullScreen} btn_class=" soaringButton fullscreenButton whiteboardFullscreenButton" i_class="ion-arrow-expand" />
|
||||
: null }
|
||||
</div>
|
||||
<div>
|
||||
: null }
|
||||
</div>
|
||||
<div>
|
||||
{this.data.is_presenter ?
|
||||
<WhiteboardControls />
|
||||
: null }
|
||||
: null }
|
||||
{this.data.poll_started ?
|
||||
<Polling/>
|
||||
: null }
|
||||
</div>
|
||||
: null }
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
@ -2,32 +2,33 @@ import React from 'react';
|
||||
import { Button } from '../shared/Button.jsx';
|
||||
import { UploaderControls } from './UploaderControls.jsx';
|
||||
|
||||
|
||||
export let WhiteboardControls = React.createClass ({
|
||||
export let WhiteboardControls = React.createClass({
|
||||
mixins: [ReactMeteorData],
|
||||
getMeteorData() {
|
||||
let currentPresentation, currentSlide, currentSlideNum, ref, ref1, totalSlideNum;
|
||||
currentSlideNum = 0;
|
||||
totalSlideNum = 0;
|
||||
currentPresentation = Meteor.Presentations.findOne({
|
||||
'presentation.current': true
|
||||
'presentation.current': true,
|
||||
});
|
||||
if(currentPresentation != null) {
|
||||
if (currentPresentation != null) {
|
||||
currentSlide = Meteor.Slides.findOne({
|
||||
'presentationId': currentPresentation.presentation.id,
|
||||
'slide.current': true
|
||||
})
|
||||
if(currentSlide != null) {
|
||||
presentationId: currentPresentation.presentation.id,
|
||||
'slide.current': true,
|
||||
});
|
||||
if (currentSlide != null) {
|
||||
currentSlideNum = currentSlide.slide.num;
|
||||
}
|
||||
totalSlides = Meteor.Slides.find({ 'presentationId': currentPresentation.presentation.id });
|
||||
if(totalSlides != null) {
|
||||
|
||||
totalSlides = Meteor.Slides.find({ presentationId: currentPresentation.presentation.id });
|
||||
if (totalSlides != null) {
|
||||
totalSlideNum = totalSlides.count();
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
currentSlideNum: currentSlideNum,
|
||||
totalSlideNum: totalSlideNum
|
||||
totalSlideNum: totalSlideNum,
|
||||
};
|
||||
},
|
||||
|
||||
@ -35,7 +36,7 @@ export let WhiteboardControls = React.createClass ({
|
||||
setTimeout(scaleWhiteboard, 0);
|
||||
},
|
||||
|
||||
componentWillUnmount () {
|
||||
componentWillUnmount() {
|
||||
setTimeout(scaleWhiteboard, 0);
|
||||
},
|
||||
|
||||
@ -49,26 +50,26 @@ export let WhiteboardControls = React.createClass ({
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div id="whiteboard-controls">
|
||||
<div className="whiteboard-buttons-left">
|
||||
<div id="whiteboard-controls">
|
||||
<div className="whiteboard-buttons-left">
|
||||
{/* TODO: Adjust the presenter uploader for mobile views on iOS devices
|
||||
you cant upload PDFs, only images from camera/gallery */
|
||||
!isMobile() ?
|
||||
!isMobile() ?
|
||||
<UploaderControls />
|
||||
: null }
|
||||
</div>
|
||||
<div className="whiteboard-buttons-right">
|
||||
</div>
|
||||
<div className="whiteboard-buttons-center">
|
||||
<div className="whiteboard-buttons-slide">
|
||||
<Button onClick={this.handlePrevious} btn_class=" prev" i_class="ion-arrow-left-a" rel="tooltip" data_placement="top" title="Previous"/>
|
||||
<span className="current">
|
||||
{this.data.currentSlideNum + '/' + this.data.totalSlideNum}
|
||||
</span>
|
||||
<Button onClick={this.handleNext} btn_class=" next" i_class="ion-arrow-right-a" rel="tooltip" data_placement="top" title="Next"/>
|
||||
</div>
|
||||
</div>
|
||||
: null }
|
||||
</div>
|
||||
<div className="whiteboard-buttons-right">
|
||||
</div>
|
||||
<div className="whiteboard-buttons-center">
|
||||
<div className="whiteboard-buttons-slide">
|
||||
<Button onClick={this.handlePrevious} btn_class=" prev" i_class="ion-arrow-left-a" rel="tooltip" data_placement="top" title="Previous"/>
|
||||
<span className="current">
|
||||
{this.data.currentSlideNum + '/' + this.data.totalSlideNum}
|
||||
</span>
|
||||
<Button onClick={this.handleNext} btn_class=" next" i_class="ion-arrow-right-a" rel="tooltip" data_placement="top" title="Next"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
);
|
||||
},
|
||||
});
|
||||
|
@ -45,20 +45,20 @@ this.addShapeToCollection = function (meetingId, whiteboardId, shapeObject) {
|
||||
|
||||
// the mouse button was released - the drawing is complete
|
||||
// TODO: pencil messages currently don't send draw_end and are labeled all as DRAW_START
|
||||
} else if(shapeObject != null && (shapeObject.status === "DRAW_START" || shapeObject.status === "DRAW_UPDATE" || shapeObject.status === "DRAW_END")) {
|
||||
shape = Meteor.Shapes.findOne({
|
||||
"shape.id": shapeObject.shape.id
|
||||
} else if (shapeObject != null && (shapeObject.status === 'DRAW_START' || shapeObject.status === 'DRAW_UPDATE' || shapeObject.status === 'DRAW_END')) {
|
||||
shape = Meteor.Shapes.findOne({
|
||||
'shape.id': shapeObject.shape.id,
|
||||
});
|
||||
if(shape != null) {
|
||||
return id = Meteor.Shapes.update({
|
||||
"shape.id": shapeObject.shape.id
|
||||
if (shape != null) {
|
||||
return id = Meteor.Shapes.update({
|
||||
'shape.id': shapeObject.shape.id,
|
||||
}, {
|
||||
$set: {
|
||||
"shape.shape.points": shapeObject.shape.points
|
||||
}
|
||||
'shape.shape.points': shapeObject.shape.points,
|
||||
},
|
||||
});
|
||||
} else {
|
||||
entry = {
|
||||
} else {
|
||||
entry = {
|
||||
meetingId: meetingId,
|
||||
whiteboardId: whiteboardId,
|
||||
shape: {
|
||||
@ -83,8 +83,8 @@ this.addShapeToCollection = function (meetingId, whiteboardId, shapeObject) {
|
||||
},
|
||||
};
|
||||
return id = Meteor.Shapes.insert(entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
this.removeAllShapesFromSlide = function (meetingId, whiteboardId) {
|
||||
|
@ -65,8 +65,8 @@ Meteor.RedisPubSub = (function () {
|
||||
let eventName, message, messagesWeIgnore;
|
||||
message = JSON.parse(jsonMsg);
|
||||
eventName = message.header.name;
|
||||
messagesWeIgnore = ["BbbPubSubPongMessage", "bbb_apps_is_alive_message", "broadcast_layout_message"];
|
||||
if(indexOf.call(messagesWeIgnore, eventName) < 0) {
|
||||
messagesWeIgnore = ['BbbPubSubPongMessage', 'bbb_apps_is_alive_message', 'broadcast_layout_message'];
|
||||
if (indexOf.call(messagesWeIgnore, eventName) < 0) {
|
||||
// Uncomment for DEVELOPMENT purposes only
|
||||
// Otherwise dynamic shapes' updates will slow down significantly
|
||||
// Meteor.log.info(`Q ${eventName} ${Meteor.myQueue.total()}`);
|
||||
|
@ -45,6 +45,7 @@ Meteor.startup(() => {
|
||||
return '';
|
||||
}
|
||||
};
|
||||
|
||||
// Uncomment for DEVELOPMENT purposes only
|
||||
// Otherwise dynamic shapes' updates will slow down significantly
|
||||
//Meteor.log.info(`in callback after handleRedisMessage ${eventName}. ${lengthString()}`);
|
||||
@ -107,7 +108,8 @@ Meteor.startup(() => {
|
||||
Meteor.log.error('ERROR!! No header or payload');
|
||||
callback();
|
||||
}
|
||||
if(eventName, indexOf.call(notLoggedEventTypes, eventName) < 0) {
|
||||
|
||||
if (eventName, indexOf.call(notLoggedEventTypes, eventName) < 0) {
|
||||
// Uncomment for DEVELOPMENT purposes only
|
||||
// Otherwise dynamic shapes' updates will slow down significantly
|
||||
/*
|
||||
@ -659,7 +661,7 @@ Meteor.startup(() => {
|
||||
if (indexOf.call(notLoggedEventTypes, eventName) < 0) {
|
||||
Meteor.log.info(`WARNING!!! THE JSON MESSAGE WAS NOT OF TYPE SUPPORTED BY THIS APPLICATION
|
||||
${eventName}
|
||||
{JSON.stringify(message)}` );
|
||||
{JSON.stringify(message)}`);
|
||||
}
|
||||
|
||||
return callback();
|
||||
|
Loading…
Reference in New Issue
Block a user