浏览代码

Adds toolbar splitter button

j8
yanas 8 年前
父节点
当前提交
9641dbf373
共有 4 个文件被更改,包括 24 次插入9 次删除
  1. 13
    0
      css/_toolbars.scss
  2. 1
    6
      css/_variables.scss
  3. 1
    0
      interface_config.js
  4. 9
    3
      modules/UI/toolbars/Toolbar.js

+ 13
- 0
css/_toolbars.scss 查看文件

@@ -44,15 +44,28 @@
44 44
     width: auto;
45 45
     border-radius: 3px;
46 46
 
47
+    /**
48
+     * First button in the toolbar.
49
+     */
47 50
     .first {
48 51
         border-bottom-left-radius: 3px;
49 52
         border-top-left-radius: 3px;
50 53
     }
51 54
 
55
+    /**
56
+     * Last button in the toolbar.
57
+     */
52 58
     .last {
53 59
         border-bottom-right-radius: 3px;
54 60
         border-top-right-radius: 3px;
55 61
     }
62
+
63
+    /**
64
+     * Splitter button in the toolbar.
65
+     */
66
+    .splitter {
67
+        margin-left: $splitterToolbarButtonLeftMargin;
68
+    }
56 69
 }
57 70
 
58 71
 #extendedToolbar {

+ 1
- 6
css/_variables.scss 查看文件

@@ -1,8 +1,3 @@
1
-/**
2
-* Theme
3
-*/
4
-@import 'themes/light';
5
-
6 1
 /**
7 2
  * Style variables
8 3
  */
@@ -33,10 +28,10 @@ $tooltipBg: rgba(0,0,0, 0.7);
33 28
 
34 29
 // Toolbar
35 30
 $toolbarSelectBackground: rgba(0, 0, 0, .6);
36
-
37 31
 $toolbarBadgeBackground: #165ECC;
38 32
 $toolbarBadgeColor: #FFFFFF;
39 33
 $toolbarToggleBackground: #12499C;
34
+$splitterToolbarButtonLeftMargin: 0px;
40 35
 
41 36
 // Main controls
42 37
 $inputSemiBackground: rgba(132, 132, 132, .8);

+ 1
- 0
interface_config.js 查看文件

@@ -20,6 +20,7 @@ var interfaceConfig = { // eslint-disable-line no-unused-vars
20 20
     // the toolbar buttons line is intentionally left in one line, to be able
21 21
     // to easily override values or remove them using regex
22 22
     MAIN_TOOLBAR_BUTTONS: ['microphone', 'camera', 'desktop', 'invite', 'fullscreen', 'hangup'], // jshint ignore:line
23
+    MAIN_TOOLBAR_SPLITTER_INDEX: -1,
23 24
     TOOLBAR_BUTTONS: ['profile', 'authentication', 'microphone', 'camera', 'desktop', 'recording', 'security', 'raisehand', 'chat', 'etherpad', 'sharedvideo', 'sip', 'dialpad', 'settings', 'hangup', 'filmstrip', 'contacts'], // jshint ignore:line
24 25
     SETTINGS_SECTIONS: ['language', 'devices', 'moderator'],
25 26
     // Determines how the video would fit the screen. 'both' would fit the whole

+ 9
- 3
modules/UI/toolbars/Toolbar.js 查看文件

@@ -710,7 +710,10 @@ Toolbar = {
710 710
                 this._addMainToolbarButton(
711 711
                     button,
712 712
                     (index === 0),
713
-                    (index === interfaceConfig.MAIN_TOOLBAR_BUTTONS.length -1));
713
+                    (index === interfaceConfig.MAIN_TOOLBAR_BUTTONS.length -1),
714
+                    (interfaceConfig.MAIN_TOOLBAR_SPLITTER_INDEX
715
+                        && index
716
+                            === interfaceConfig.MAIN_TOOLBAR_SPLITTER_INDEX));
714 717
             }
715 718
         });
716 719
     },
@@ -723,13 +726,16 @@ Toolbar = {
723 726
      * toolbar
724 727
      * @param {boolean} isLast indicates if this is the last button in the
725 728
      * toolbar
729
+     * @param {boolean} isSplitter if this button is a splitter button for
730
+     * the dialog, which means that a special splitter style will be applied
726 731
      */
727
-    _addMainToolbarButton(button, isFirst, isLast) {
732
+    _addMainToolbarButton(button, isFirst, isLast, isSplitter) {
728 733
         let buttonElement = document.createElement("a");
729 734
         if (button.className)
730 735
             buttonElement.className = button.className
731 736
                                     + ((isFirst) ? " first" : "")
732
-                                    + ((isLast) ? " last" : "");
737
+                                    + ((isLast) ? " last" : "")
738
+                                    + ((isSplitter) ? " splitter": "");
733 739
 
734 740
         buttonElement.id = button.id;
735 741
 

正在加载...
取消
保存