Quellcode durchsuchen

Adds a (hidden) dialpad button to the toolbar.

j8
Boris Grozev vor 10 Jahren
Ursprung
Commit
8075d0a0fd
3 geänderte Dateien mit 24 neuen und 1 gelöschten Zeilen
  1. 5
    0
      index.html
  2. 2
    1
      lang/main.json
  3. 17
    0
      modules/UI/toolbars/Toolbar.js

+ 5
- 0
index.html Datei anzeigen

@@ -201,6 +201,11 @@
201 201
                         <a class="button" id="toolbar_button_sip" data-container="body" data-toggle="popover" data-placement="bottom" content="Call SIP number" data-i18n="[content]toolbar.sip">
202 202
                             <i class="icon-telephone"></i></a>
203 203
                     </span>
204
+                    <span id="dialPadButton" style="display: none">
205
+                        <div class="header_button_separator"></div>
206
+                        <a class="button" id="toolbar_button_dialpad" data-container="body" data-toggle="popover" data-placement="bottom" content="Open dialpad" data-i18n="[content]toolbar.dialpad">
207
+                            <i class="icon-dialpad"></i></a>
208
+                    </span>
204 209
                     <div class="header_button_separator"></div>
205 210
                     <a class="button" id="toolbar_button_settings" data-container="body" data-toggle="popover" data-placement="bottom" content="Settings" data-i18n="[content]toolbar.Settings">
206 211
                         <i id="settingsButton" class="icon-settings"></i>

+ 2
- 1
lang/main.json Datei anzeigen

@@ -62,7 +62,8 @@
62 62
         "Settings": "Settings",
63 63
         "hangup": "Hang Up",
64 64
         "login": "Login",
65
-        "logout": "Logout"
65
+        "logout": "Logout",
66
+        "dialpad": "Show dialpad"
66 67
     },
67 68
     "bottomtoolbar": {
68 69
         "chat": "Open / close chat",

+ 17
- 0
modules/UI/toolbars/Toolbar.js Datei anzeigen

@@ -54,6 +54,9 @@ var buttonHandlers =
54 54
     "toolbar_button_sip": function () {
55 55
         return callSipButtonClicked();
56 56
     },
57
+    "toolbar_button_dialpad": function () {
58
+        return dialpadButtonClicked();
59
+    },
57 60
     "toolbar_button_settings": function () {
58 61
         PanelToggler.toggleSettingsMenu();
59 62
     },
@@ -221,6 +224,11 @@ function inviteParticipants() {
221 224
     window.open("mailto:?subject=" + subject + "&body=" + body, '_blank');
222 225
 }
223 226
 
227
+function dialpadButtonClicked()
228
+{
229
+    //TODO show the dialpad window
230
+}
231
+
224 232
 function callSipButtonClicked()
225 233
 {
226 234
     var defaultNumber
@@ -568,6 +576,15 @@ var Toolbar = (function (my) {
568 576
         }
569 577
     };
570 578
 
579
+    // Shows or hides the dialpad button
580
+    my.showDialPadButton = function (show) {
581
+        if (show) {
582
+            $('#dialPadButton').css({display: "inline-block"});
583
+        } else {
584
+            $('#dialPadButton').css({display: "none"});
585
+        }
586
+    };
587
+
571 588
     /**
572 589
      * Displays user authenticated identity name(login).
573 590
      * @param authIdentity identity name to be displayed.

Laden…
Abbrechen
Speichern