Selaa lähdekoodia

Displays reservation system error if one is returned by the focus.

j8
paweldomas 10 vuotta sitten
vanhempi
commit
9123923818
5 muutettua tiedostoa jossa 18315 lisäystä ja 18265 poistoa
  1. 1
    1
      index.html
  2. 18289
    18264
      libs/app.bundle.js
  3. 11
    0
      modules/UI/UI.js
  4. 13
    0
      modules/xmpp/moderator.js
  5. 1
    0
      service/xmpp/XMPPEvents.js

+ 1
- 1
index.html Näytä tiedosto

@@ -19,7 +19,7 @@
19 19
     <script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
20 20
     <script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
21 21
     <script src="interface_config.js?v=5"></script>
22
-    <script src="libs/app.bundle.js?v=22"></script>
22
+    <script src="libs/app.bundle.js?v=23"></script>
23 23
     <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
24 24
     <link rel="stylesheet" href="css/font.css?v=6"/>
25 25
     <link rel="stylesheet" href="css/toastr.css?v=1">

+ 18289
- 18264
libs/app.bundle.js
File diff suppressed because it is too large
Näytä tiedosto


+ 11
- 0
modules/UI/UI.js Näytä tiedosto

@@ -143,6 +143,17 @@ function registerListeners() {
143 143
             ' Please try again later.'
144 144
         );
145 145
     });
146
+    APP.xmpp.addListener(XMPPEvents.RESERVATION_ERROR, function (code, msg) {
147
+        messageHandler.openDialog(
148
+            'Reservation system error',
149
+            'Error code: ' + code + ', message: ' + msg,
150
+            true, {},
151
+            function (event, value, message, formVals)
152
+            {
153
+                return false;
154
+            }
155
+        );
156
+    });
146 157
     APP.xmpp.addListener(XMPPEvents.KICKED, function () {
147 158
         messageHandler.openMessageDialog("dialog.sessTerminated", "Session Terminated",
148 159
             "dialog.kickMessage", "Ouch! You have been kicked out of the meet!");

+ 13
- 0
modules/xmpp/moderator.js Näytä tiedosto

@@ -279,6 +279,19 @@ var Moderator = {
279 279
                     eventEmitter.emit(XMPPEvents.GRACEFUL_SHUTDOWN);
280 280
                     return;
281 281
                 }
282
+                // Check for error returned by the reservation system
283
+                var reservationErr = $(error).find('>error>reservation-error');
284
+                if (reservationErr.length) {
285
+                    // Trigger error event
286
+                    var errorCode = reservationErr.attr('error-code');
287
+                    var errorMsg;
288
+                    if ($(error).find('>error>text')) {
289
+                        errorMsg = $(error).find('>error>text').text();
290
+                    }
291
+                    eventEmitter.emit(
292
+                        XMPPEvents.RESERVATION_ERROR, errorCode, errorMsg);
293
+                    return;
294
+                }
282 295
                 // Not authorized to create new room
283 296
                 if ($(error).find('>error>not-authorized').length) {
284 297
                     console.warn("Unauthorized to start the conference", error);

+ 1
- 0
service/xmpp/XMPPEvents.js Näytä tiedosto

@@ -17,6 +17,7 @@ var XMPPEvents = {
17 17
     REMOTE_STATS: "xmpp.remote_stats",
18 18
     LOCALROLE_CHANGED: "xmpp.localrole_changed",
19 19
     PRESENCE_STATUS: "xmpp.presence_status",
20
+    RESERVATION_ERROR: "xmpp.room_reservation_error",
20 21
     SUBJECT_CHANGED: "xmpp.subject_changed",
21 22
     MESSAGE_RECEIVED: "xmpp.message_received",
22 23
     SENDING_CHAT_MESSAGE: "xmpp.sending_chat_message",

Loading…
Peruuta
Tallenna