Adds toolbar splitter button
This commit is contained in:
parent
ad2fb28f97
commit
9641dbf373
|
@ -44,15 +44,28 @@
|
||||||
width: auto;
|
width: auto;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* First button in the toolbar.
|
||||||
|
*/
|
||||||
.first {
|
.first {
|
||||||
border-bottom-left-radius: 3px;
|
border-bottom-left-radius: 3px;
|
||||||
border-top-left-radius: 3px;
|
border-top-left-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Last button in the toolbar.
|
||||||
|
*/
|
||||||
.last {
|
.last {
|
||||||
border-bottom-right-radius: 3px;
|
border-bottom-right-radius: 3px;
|
||||||
border-top-right-radius: 3px;
|
border-top-right-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Splitter button in the toolbar.
|
||||||
|
*/
|
||||||
|
.splitter {
|
||||||
|
margin-left: $splitterToolbarButtonLeftMargin;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#extendedToolbar {
|
#extendedToolbar {
|
||||||
|
|
|
@ -1,8 +1,3 @@
|
||||||
/**
|
|
||||||
* Theme
|
|
||||||
*/
|
|
||||||
@import 'themes/light';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Style variables
|
* Style variables
|
||||||
*/
|
*/
|
||||||
|
@ -33,10 +28,10 @@ $tooltipBg: rgba(0,0,0, 0.7);
|
||||||
|
|
||||||
// Toolbar
|
// Toolbar
|
||||||
$toolbarSelectBackground: rgba(0, 0, 0, .6);
|
$toolbarSelectBackground: rgba(0, 0, 0, .6);
|
||||||
|
|
||||||
$toolbarBadgeBackground: #165ECC;
|
$toolbarBadgeBackground: #165ECC;
|
||||||
$toolbarBadgeColor: #FFFFFF;
|
$toolbarBadgeColor: #FFFFFF;
|
||||||
$toolbarToggleBackground: #12499C;
|
$toolbarToggleBackground: #12499C;
|
||||||
|
$splitterToolbarButtonLeftMargin: 0px;
|
||||||
|
|
||||||
// Main controls
|
// Main controls
|
||||||
$inputSemiBackground: rgba(132, 132, 132, .8);
|
$inputSemiBackground: rgba(132, 132, 132, .8);
|
||||||
|
|
|
@ -20,6 +20,7 @@ var interfaceConfig = { // eslint-disable-line no-unused-vars
|
||||||
// the toolbar buttons line is intentionally left in one line, to be able
|
// the toolbar buttons line is intentionally left in one line, to be able
|
||||||
// to easily override values or remove them using regex
|
// to easily override values or remove them using regex
|
||||||
MAIN_TOOLBAR_BUTTONS: ['microphone', 'camera', 'desktop', 'invite', 'fullscreen', 'hangup'], // jshint ignore:line
|
MAIN_TOOLBAR_BUTTONS: ['microphone', 'camera', 'desktop', 'invite', 'fullscreen', 'hangup'], // jshint ignore:line
|
||||||
|
MAIN_TOOLBAR_SPLITTER_INDEX: -1,
|
||||||
TOOLBAR_BUTTONS: ['profile', 'authentication', 'microphone', 'camera', 'desktop', 'recording', 'security', 'raisehand', 'chat', 'etherpad', 'sharedvideo', 'sip', 'dialpad', 'settings', 'hangup', 'filmstrip', 'contacts'], // jshint ignore:line
|
TOOLBAR_BUTTONS: ['profile', 'authentication', 'microphone', 'camera', 'desktop', 'recording', 'security', 'raisehand', 'chat', 'etherpad', 'sharedvideo', 'sip', 'dialpad', 'settings', 'hangup', 'filmstrip', 'contacts'], // jshint ignore:line
|
||||||
SETTINGS_SECTIONS: ['language', 'devices', 'moderator'],
|
SETTINGS_SECTIONS: ['language', 'devices', 'moderator'],
|
||||||
// Determines how the video would fit the screen. 'both' would fit the whole
|
// Determines how the video would fit the screen. 'both' would fit the whole
|
||||||
|
|
|
@ -710,7 +710,10 @@ Toolbar = {
|
||||||
this._addMainToolbarButton(
|
this._addMainToolbarButton(
|
||||||
button,
|
button,
|
||||||
(index === 0),
|
(index === 0),
|
||||||
(index === interfaceConfig.MAIN_TOOLBAR_BUTTONS.length -1));
|
(index === interfaceConfig.MAIN_TOOLBAR_BUTTONS.length -1),
|
||||||
|
(interfaceConfig.MAIN_TOOLBAR_SPLITTER_INDEX
|
||||||
|
&& index
|
||||||
|
=== interfaceConfig.MAIN_TOOLBAR_SPLITTER_INDEX));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -723,13 +726,16 @@ Toolbar = {
|
||||||
* toolbar
|
* toolbar
|
||||||
* @param {boolean} isLast indicates if this is the last button in the
|
* @param {boolean} isLast indicates if this is the last button in the
|
||||||
* toolbar
|
* toolbar
|
||||||
|
* @param {boolean} isSplitter if this button is a splitter button for
|
||||||
|
* the dialog, which means that a special splitter style will be applied
|
||||||
*/
|
*/
|
||||||
_addMainToolbarButton(button, isFirst, isLast) {
|
_addMainToolbarButton(button, isFirst, isLast, isSplitter) {
|
||||||
let buttonElement = document.createElement("a");
|
let buttonElement = document.createElement("a");
|
||||||
if (button.className)
|
if (button.className)
|
||||||
buttonElement.className = button.className
|
buttonElement.className = button.className
|
||||||
+ ((isFirst) ? " first" : "")
|
+ ((isFirst) ? " first" : "")
|
||||||
+ ((isLast) ? " last" : "");
|
+ ((isLast) ? " last" : "")
|
||||||
|
+ ((isSplitter) ? " splitter": "");
|
||||||
|
|
||||||
buttonElement.id = button.id;
|
buttonElement.id = button.id;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue