Selaa lähdekoodia

Unifrms messageHandler access and adds enable disable

j8
yanas 9 vuotta sitten
vanhempi
commit
57815cb2fe

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

1
 /* global $, APP, config, interfaceConfig */
1
 /* global $, APP, config, interfaceConfig */
2
 import UIEvents from "../../service/UI/UIEvents";
2
 import UIEvents from "../../service/UI/UIEvents";
3
 
3
 
4
-/*
5
- * Created by Yana Stamcheva on 2/10/15.
6
- */
7
-var messageHandler = require("./util/MessageHandler");
8
-
9
 /**
4
 /**
10
  * Constructs the html for the overall feedback window.
5
  * Constructs the html for the overall feedback window.
11
  *
6
  *

+ 1
- 1
modules/UI/UI.js Näytä tiedosto

430
         $("#downloadlog").css("display", "none");
430
         $("#downloadlog").css("display", "none");
431
         BottomToolbar.hide();
431
         BottomToolbar.hide();
432
         FilmStrip.setupFilmStripOnly();
432
         FilmStrip.setupFilmStripOnly();
433
-        messageHandler.disableNotifications();
433
+        messageHandler.enableNotifications(false);
434
         $('body').popover("disable");
434
         $('body').popover("disable");
435
         JitsiPopover.enabled = false;
435
         JitsiPopover.enabled = false;
436
     }
436
     }

+ 3
- 5
modules/UI/authentication/LoginDialog.js Näytä tiedosto

1
 /* global $, APP, config*/
1
 /* global $, APP, config*/
2
 
2
 
3
-var messageHandler = require('../util/MessageHandler');
4
-
5
 /**
3
 /**
6
  * Build html for "password required" dialog.
4
  * Build html for "password required" dialog.
7
  * @returns {string} html string
5
  * @returns {string} html string
123
         }
121
         }
124
     };
122
     };
125
 
123
 
126
-    var connDialog = messageHandler.openDialogWithStates(
124
+    var connDialog = APP.UI.messageHandler.openDialogWithStates(
127
         states, { persistent: true, closeText: '' }, null
125
         states, { persistent: true, closeText: '' }, null
128
     );
126
     );
129
 
127
 
182
      * @returns auth dialog
180
      * @returns auth dialog
183
      */
181
      */
184
     showExternalAuthDialog: function (url, callback) {
182
     showExternalAuthDialog: function (url, callback) {
185
-        var dialog = messageHandler.openCenteredPopup(
183
+        var dialog = APP.UI.messageHandler.openCenteredPopup(
186
             url, 910, 660,
184
             url, 910, 660,
187
             // On closed
185
             // On closed
188
             callback
186
             callback
189
         );
187
         );
190
 
188
 
191
         if (!dialog) {
189
         if (!dialog) {
192
-            messageHandler.openMessageDialog(null, "dialog.popupError");
190
+            APP.UI.messageHandler.openMessageDialog(null, "dialog.popupError");
193
         }
191
         }
194
 
192
 
195
         return dialog;
193
         return dialog;

+ 17
- 14
modules/UI/authentication/RoomLocker.js Näytä tiedosto

1
 /* global APP, JitsiMeetJS */
1
 /* global APP, JitsiMeetJS */
2
-import messageHandler from '../util/MessageHandler';
3
 import UIUtil from '../util/UIUtil';
2
 import UIUtil from '../util/UIUtil';
4
 //FIXME:
3
 //FIXME:
5
 import AnalyticsAdapter from '../../statistics/AnalyticsAdapter';
4
 import AnalyticsAdapter from '../../statistics/AnalyticsAdapter';
19
     `;
18
     `;
20
 
19
 
21
     return new Promise(function (resolve, reject) {
20
     return new Promise(function (resolve, reject) {
22
-        messageHandler.openTwoButtonDialog(
21
+        APP.UI.messageHandler.openTwoButtonDialog(
23
             null, null, null,
22
             null, null, null,
24
             msg, false, "dialog.Save",
23
             msg, false, "dialog.Save",
25
             function (e, v, m, f) {
24
             function (e, v, m, f) {
27
                     resolve(UIUtil.escapeHtml(f.lockKey));
26
                     resolve(UIUtil.escapeHtml(f.lockKey));
28
                 }
27
                 }
29
                 else {
28
                 else {
30
-                    reject(messageHandler.CANCEL);
29
+                    reject(APP.UI.messageHandler.CANCEL);
31
                 }
30
                 }
32
             },
31
             },
33
             null, null, 'input:first'
32
             null, null, 'input:first'
51
                placeholder="${passMsg}" autofocus>
50
                placeholder="${passMsg}" autofocus>
52
     `;
51
     `;
53
     return new Promise(function (resolve, reject) {
52
     return new Promise(function (resolve, reject) {
54
-        messageHandler.openTwoButtonDialog(
53
+        APP.UI.messageHandler.openTwoButtonDialog(
55
             null, null, null, msg,
54
             null, null, null, msg,
56
             true, "dialog.Ok",
55
             true, "dialog.Ok",
57
             function (e, v, m, f) {}, null,
56
             function (e, v, m, f) {}, null,
59
                 if (v && f.lockKey) {
58
                 if (v && f.lockKey) {
60
                     resolve(UIUtil.escapeHtml(f.lockKey));
59
                     resolve(UIUtil.escapeHtml(f.lockKey));
61
                 } else {
60
                 } else {
62
-                    reject(messageHandler.CANCEL);
61
+                    reject(APP.UI.messageHandler.CANCEL);
63
                 }
62
                 }
64
             },
63
             },
65
             ':input:first'
64
             ':input:first'
73
  */
72
  */
74
 function askToUnlock () {
73
 function askToUnlock () {
75
     return new Promise(function (resolve, reject) {
74
     return new Promise(function (resolve, reject) {
76
-        messageHandler.openTwoButtonDialog(
75
+        APP.UI.messageHandler.openTwoButtonDialog(
77
             null, null, "dialog.passwordCheck",
76
             null, null, "dialog.passwordCheck",
78
             null, false, "dialog.Remove",
77
             null, false, "dialog.Remove",
79
             function (e, v) {
78
             function (e, v) {
80
                 if (v) {
79
                 if (v) {
81
                     resolve();
80
                     resolve();
82
                 } else {
81
                 } else {
83
-                    reject(messageHandler.CANCEL);
82
+                    reject(APP.UI.messageHandler.CANCEL);
84
                 }
83
                 }
85
             }
84
             }
86
         );
85
         );
93
  */
92
  */
94
 function notifyPasswordNotSupported () {
93
 function notifyPasswordNotSupported () {
95
     console.warn('room passwords not supported');
94
     console.warn('room passwords not supported');
96
-    messageHandler.showError("dialog.warning", "dialog.passwordNotSupported");
95
+    APP.UI.messageHandler.showError(
96
+        "dialog.warning", "dialog.passwordNotSupported");
97
 }
97
 }
98
 
98
 
99
 /**
99
 /**
102
  */
102
  */
103
 function notifyPasswordFailed(err) {
103
 function notifyPasswordFailed(err) {
104
     console.warn('setting password failed', err);
104
     console.warn('setting password failed', err);
105
-    messageHandler.showError("dialog.lockTitle", "dialog.lockMessage");
105
+    APP.UI.messageHandler.showError(
106
+        "dialog.lockTitle", "dialog.lockMessage");
106
 }
107
 }
107
 
108
 
108
 const ConferenceErrors = JitsiMeetJS.errors.conference;
109
 const ConferenceErrors = JitsiMeetJS.errors.conference;
153
                 AnalyticsAdapter.sendEvent('toolbar.lock.disabled');
154
                 AnalyticsAdapter.sendEvent('toolbar.lock.disabled');
154
             }).catch(
155
             }).catch(
155
                 reason => {
156
                 reason => {
156
-                    if (reason !== messageHandler.CANCEL)
157
+                    if (reason !== APP.UI.messageHandler.CANCEL)
157
                         console.error(reason);
158
                         console.error(reason);
158
                 }
159
                 }
159
             );
160
             );
171
                 AnalyticsAdapter.sendEvent('toolbar.lock.enabled');
172
                 AnalyticsAdapter.sendEvent('toolbar.lock.enabled');
172
             }).catch(
173
             }).catch(
173
                 reason => {
174
                 reason => {
174
-                    if (reason !== messageHandler.CANCEL)
175
+                    if (reason !== APP.UI.messageHandler.CANCEL)
175
                         console.error(reason);
176
                         console.error(reason);
176
                 }
177
                 }
177
             );
178
             );
185
                 newPass => { password = newPass; }
186
                 newPass => { password = newPass; }
186
             ).catch(
187
             ).catch(
187
                 reason => {
188
                 reason => {
188
-                    if (reason !== messageHandler.CANCEL)
189
+                    if (reason !== APP.UI.messageHandler.CANCEL)
189
                         console.error(reason);
190
                         console.error(reason);
190
                 }
191
                 }
191
             );
192
             );
196
          */
197
          */
197
         notifyModeratorRequired () {
198
         notifyModeratorRequired () {
198
             if (password) {
199
             if (password) {
199
-                messageHandler.openMessageDialog(null, "dialog.passwordError");
200
+                APP.UI.messageHandler
201
+                    .openMessageDialog(null, "dialog.passwordError");
200
             } else {
202
             } else {
201
-                messageHandler.openMessageDialog(null, "dialog.passwordError2");
203
+                APP.UI.messageHandler
204
+                    .openMessageDialog(null, "dialog.passwordError2");
202
             }
205
             }
203
         }
206
         }
204
     };
207
     };

+ 2
- 0
modules/UI/recording/Recording.js Näytä tiedosto

236
             Feedback.enableFeedback(false);
236
             Feedback.enableFeedback(false);
237
             Toolbar.enable(false);
237
             Toolbar.enable(false);
238
             BottomToolbar.enable(false);
238
             BottomToolbar.enable(false);
239
+            APP.UI.messageHandler.enableNotifications(false);
240
+            APP.UI.messageHandler.enablePopups(false);
239
         }
241
         }
240
     },
242
     },
241
 
243
 

+ 3
- 4
modules/UI/shared_video/SharedVideo.js Näytä tiedosto

1
 /* global $, APP, YT, onPlayerReady, onPlayerStateChange, onPlayerError */
1
 /* global $, APP, YT, onPlayerReady, onPlayerStateChange, onPlayerError */
2
 
2
 
3
-import messageHandler from '../util/MessageHandler';
4
 import UIUtil from '../util/UIUtil';
3
 import UIUtil from '../util/UIUtil';
5
 import UIEvents from '../../../service/UI/UIEvents';
4
 import UIEvents from '../../../service/UI/UIEvents';
6
 
5
 
71
                 this.emitter.emit(
70
                 this.emitter.emit(
72
                     UIEvents.UPDATE_SHARED_VIDEO, this.url, 'stop'));
71
                     UIEvents.UPDATE_SHARED_VIDEO, this.url, 'stop'));
73
         } else {
72
         } else {
74
-            messageHandler.openMessageDialog(
73
+            APP.UI.messageHandler.openMessageDialog(
75
                 "dialog.shareVideoTitle",
74
                 "dialog.shareVideoTitle",
76
                 "dialog.alreadySharedVideoMsg"
75
                 "dialog.alreadySharedVideoMsg"
77
             );
76
             );
701
  */
700
  */
702
 function showStopVideoPropmpt() {
701
 function showStopVideoPropmpt() {
703
     return new Promise(function (resolve, reject) {
702
     return new Promise(function (resolve, reject) {
704
-        messageHandler.openTwoButtonDialog(
703
+        APP.UI.messageHandler.openTwoButtonDialog(
705
             "dialog.removeSharedVideoTitle",
704
             "dialog.removeSharedVideoTitle",
706
             null,
705
             null,
707
             "dialog.removeSharedVideoMsg",
706
             "dialog.removeSharedVideoMsg",
736
     const defaultUrl = i18n.translateString("defaultLink", i18nOptions);
735
     const defaultUrl = i18n.translateString("defaultLink", i18nOptions);
737
 
736
 
738
     return new Promise(function (resolve, reject) {
737
     return new Promise(function (resolve, reject) {
739
-        let dialog = messageHandler.openDialogWithStates({
738
+        let dialog = APP.UI.messageHandler.openDialogWithStates({
740
             state0: {
739
             state0: {
741
                 html:  `
740
                 html:  `
742
                     <h2>${title}</h2>
741
                     <h2>${title}</h2>

+ 3
- 4
modules/UI/toolbars/Toolbar.js Näytä tiedosto

1
 /* global APP, $, config, interfaceConfig */
1
 /* global APP, $, config, interfaceConfig */
2
 /* jshint -W101 */
2
 /* jshint -W101 */
3
-import messageHandler from '../util/MessageHandler';
4
 import UIUtil from '../util/UIUtil';
3
 import UIUtil from '../util/UIUtil';
5
 import AnalyticsAdapter from '../../statistics/AnalyticsAdapter';
4
 import AnalyticsAdapter from '../../statistics/AnalyticsAdapter';
6
 import UIEvents from '../../../service/UI/UIEvents';
5
 import UIEvents from '../../../service/UI/UIEvents';
21
     } else {
20
     } else {
22
         inviteAttributes = "value=\"" + encodeURI(roomUrl) + "\"";
21
         inviteAttributes = "value=\"" + encodeURI(roomUrl) + "\"";
23
     }
22
     }
24
-    messageHandler.openTwoButtonDialog(
23
+    APP.UI.messageHandler.openTwoButtonDialog(
25
         "dialog.shareLink", null, null,
24
         "dialog.shareLink", null, null,
26
         `<input id="inviteLinkRef" type="text" ${inviteAttributes} onclick="this.select();" readonly>`,
25
         `<input id="inviteLinkRef" type="text" ${inviteAttributes} onclick="this.select();" readonly>`,
27
         false, "dialog.Invite",
26
         false, "dialog.Invite",
129
     "toolbar_button_logout": function () {
128
     "toolbar_button_logout": function () {
130
         AnalyticsAdapter.sendEvent('toolbar.authenticate.logout.clicked');
129
         AnalyticsAdapter.sendEvent('toolbar.authenticate.logout.clicked');
131
         // Ask for confirmation
130
         // Ask for confirmation
132
-        messageHandler.openTwoButtonDialog(
131
+        APP.UI.messageHandler.openTwoButtonDialog(
133
             "dialog.logoutTitle",
132
             "dialog.logoutTitle",
134
             null,
133
             null,
135
             "dialog.logoutQuestion",
134
             "dialog.logoutQuestion",
167
         : '';
166
         : '';
168
 
167
 
169
     let sipMsg = APP.translation.generateTranslationHTML("dialog.sipMsg");
168
     let sipMsg = APP.translation.generateTranslationHTML("dialog.sipMsg");
170
-    messageHandler.openTwoButtonDialog(
169
+    APP.UI.messageHandler.openTwoButtonDialog(
171
         null, null, null,
170
         null, null, null,
172
         `<h2>${sipMsg}</h2>
171
         `<h2>${sipMsg}</h2>
173
             <input name="sipNumber" type="text" value="${defaultNumber}" autofocus>`,
172
             <input name="sipNumber" type="text" value="${defaultNumber}" autofocus>`,

+ 58
- 39
modules/UI/util/MessageHandler.js Näytä tiedosto

7
  * Flag for enable/disable of the notifications.
7
  * Flag for enable/disable of the notifications.
8
  * @type {boolean}
8
  * @type {boolean}
9
  */
9
  */
10
-var notificationsEnabled = true;
10
+let notificationsEnabled = true;
11
+
12
+/**
13
+ * Flag for enabling/disabling popups.
14
+ * @type {boolean}
15
+ */
16
+let popupEnabled = true;
17
+
18
+var messageHandler = {
19
+    OK: "dialog.OK",
20
+    CANCEL: "dialog.Cancel",
11
 
21
 
12
-var messageHandler = (function(my) {
13
-    my.OK = "dialog.OK",
14
-    my.CANCEL = "dialog.Cancel",
15
     /**
22
     /**
16
      * Shows a message to the user.
23
      * Shows a message to the user.
17
      *
24
      *
24
      * @param message the message to show. If a falsy value is provided,
31
      * @param message the message to show. If a falsy value is provided,
25
      * messageKey will be used to get a message via the translation API.
32
      * messageKey will be used to get a message via the translation API.
26
      */
33
      */
27
-    my.openMessageDialog = function(titleKey, messageKey, title, message) {
34
+    openMessageDialog: function(titleKey, messageKey, title, message) {
35
+        if (!popupEnabled)
36
+            return;
37
+
28
         if (!title) {
38
         if (!title) {
29
             title = APP.translation.generateTranslationHTML(titleKey);
39
             title = APP.translation.generateTranslationHTML(titleKey);
30
         }
40
         }
35
         $.prompt(message,
45
         $.prompt(message,
36
             {title: title, persistent: false}
46
             {title: title, persistent: false}
37
         );
47
         );
38
-    };
39
-
48
+    },
40
     /**
49
     /**
41
      * Shows a message to the user with two buttons: first is given as a
50
      * Shows a message to the user with two buttons: first is given as a
42
      * parameter and the second is Cancel.
51
      * parameter and the second is Cancel.
55
      * @param defaultButton index of default button which will be activated when
64
      * @param defaultButton index of default button which will be activated when
56
      *        the user press 'enter'. Indexed from 0.
65
      *        the user press 'enter'. Indexed from 0.
57
      */
66
      */
58
-    my.openTwoButtonDialog = function(titleKey, titleString, msgKey, msgString,
67
+    openTwoButtonDialog: function(titleKey, titleString, msgKey, msgString,
59
         persistent, leftButtonKey, submitFunction, loadedFunction,
68
         persistent, leftButtonKey, submitFunction, loadedFunction,
60
         closeFunction, focus, defaultButton) {
69
         closeFunction, focus, defaultButton) {
70
+
71
+        if (!popupEnabled)
72
+            return;
73
+
61
         var buttons = [];
74
         var buttons = [];
62
 
75
 
63
         var leftButton = APP.translation.generateTranslationHTML(leftButtonKey);
76
         var leftButton = APP.translation.generateTranslationHTML(leftButtonKey);
84
             submit: submitFunction,
97
             submit: submitFunction,
85
             close: closeFunction
98
             close: closeFunction
86
         });
99
         });
87
-    };
100
+    },
88
 
101
 
89
     /**
102
     /**
90
      * Shows a message to the user with two buttons: first is given as a
103
      * Shows a message to the user with two buttons: first is given as a
101
      * @param loadedFunction function to be called after the prompt is fully
114
      * @param loadedFunction function to be called after the prompt is fully
102
      *        loaded
115
      *        loaded
103
      */
116
      */
104
-    my.openDialog = function (titleString, msgString, persistent, buttons,
117
+    openDialog: function (titleString, msgString, persistent, buttons,
105
                               submitFunction, loadedFunction) {
118
                               submitFunction, loadedFunction) {
119
+        if (!popupEnabled)
120
+            return;
121
+
106
         var args = {
122
         var args = {
107
             title: titleString,
123
             title: titleString,
108
             persistent: persistent,
124
             persistent: persistent,
115
             args.closeText = '';
131
             args.closeText = '';
116
         }
132
         }
117
         return new Impromptu(msgString, args);
133
         return new Impromptu(msgString, args);
118
-    };
134
+    },
119
 
135
 
120
     /**
136
     /**
121
      * Closes currently opened dialog.
137
      * Closes currently opened dialog.
122
      */
138
      */
123
-    my.closeDialog = function () {
139
+    closeDialog: function () {
124
         $.prompt.close();
140
         $.prompt.close();
125
-    };
141
+    },
126
 
142
 
127
     /**
143
     /**
128
      * Shows a dialog with different states to the user.
144
      * Shows a dialog with different states to the user.
129
      *
145
      *
130
      * @param statesObject object containing all the states of the dialog.
146
      * @param statesObject object containing all the states of the dialog.
131
      */
147
      */
132
-    my.openDialogWithStates = function (statesObject, options) {
148
+    openDialogWithStates: function (statesObject, options) {
149
+        if (!popupEnabled)
150
+            return;
151
+
133
         return new Impromptu(statesObject, options);
152
         return new Impromptu(statesObject, options);
134
-    };
153
+    },
135
 
154
 
136
     /**
155
     /**
137
      * Opens new popup window for given <tt>url</tt> centered over current
156
      * Opens new popup window for given <tt>url</tt> centered over current
146
      * @returns {object} popup window object if opened successfully or undefined
165
      * @returns {object} popup window object if opened successfully or undefined
147
      *          in case we failed to open it(popup blocked)
166
      *          in case we failed to open it(popup blocked)
148
      */
167
      */
149
-    my.openCenteredPopup = function (url, w, h, onPopupClosed) {
168
+    openCenteredPopup: function (url, w, h, onPopupClosed) {
169
+        if (!popupEnabled)
170
+            return;
171
+
150
         var l = window.screenX + (window.innerWidth / 2) - (w / 2);
172
         var l = window.screenX + (window.innerWidth / 2) - (w / 2);
151
         var t = window.screenY + (window.innerHeight / 2) - (h / 2);
173
         var t = window.screenY + (window.innerHeight / 2) - (h / 2);
152
         var popup = window.open(
174
         var popup = window.open(
161
             }, 200);
183
             }, 200);
162
         }
184
         }
163
         return popup;
185
         return popup;
164
-    };
186
+    },
165
 
187
 
166
     /**
188
     /**
167
      * Shows a dialog prompting the user to send an error report.
189
      * Shows a dialog prompting the user to send an error report.
170
      * @param msgKey the text of the message
192
      * @param msgKey the text of the message
171
      * @param error the error that is being reported
193
      * @param error the error that is being reported
172
      */
194
      */
173
-    my.openReportDialog = function(titleKey, msgKey, error) {
174
-        my.openMessageDialog(titleKey, msgKey);
195
+    openReportDialog: function(titleKey, msgKey, error) {
196
+        this.openMessageDialog(titleKey, msgKey);
175
         console.log(error);
197
         console.log(error);
176
         //FIXME send the error to the server
198
         //FIXME send the error to the server
177
-    };
199
+    },
178
 
200
 
179
     /**
201
     /**
180
      *  Shows an error dialog to the user.
202
      *  Shows an error dialog to the user.
181
      * @param titleKey the title of the message.
203
      * @param titleKey the title of the message.
182
      * @param msgKey the text of the message.
204
      * @param msgKey the text of the message.
183
      */
205
      */
184
-    my.showError = function(titleKey, msgKey) {
206
+    showError: function(titleKey, msgKey) {
185
 
207
 
186
         if (!titleKey) {
208
         if (!titleKey) {
187
             titleKey = "dialog.oops";
209
             titleKey = "dialog.oops";
190
             msgKey = "dialog.defaultError";
212
             msgKey = "dialog.defaultError";
191
         }
213
         }
192
         messageHandler.openMessageDialog(titleKey, msgKey);
214
         messageHandler.openMessageDialog(titleKey, msgKey);
193
-    };
215
+    },
194
 
216
 
195
     /**
217
     /**
196
      * Displayes notification.
218
      * Displayes notification.
201
      * @param messageArguments object with the arguments for the message.
223
      * @param messageArguments object with the arguments for the message.
202
      * @param options object with language options.
224
      * @param options object with language options.
203
      */
225
      */
204
-    my.notify = function(displayName, displayNameKey,
226
+    notify: function(displayName, displayNameKey,
205
                          cls, messageKey, messageArguments, options) {
227
                          cls, messageKey, messageArguments, options) {
228
+
206
         if(!notificationsEnabled)
229
         if(!notificationsEnabled)
207
             return;
230
             return;
231
+
208
         var displayNameSpan = '<span class="nickname" ';
232
         var displayNameSpan = '<span class="nickname" ';
209
         if (displayName) {
233
         if (displayName) {
210
             displayNameSpan += ">" + UIUtil.escapeHtml(displayName);
234
             displayNameSpan += ">" + UIUtil.escapeHtml(displayName);
222
             APP.translation.translateString(messageKey,
246
             APP.translation.translateString(messageKey,
223
                 messageArguments) +
247
                 messageArguments) +
224
             '</span>', null, options);
248
             '</span>', null, options);
225
-    };
249
+    },
226
 
250
 
227
     /**
251
     /**
228
      * Removes the toaster.
252
      * Removes the toaster.
229
      * @param toasterElement
253
      * @param toasterElement
230
      */
254
      */
231
-    my.remove = function(toasterElement) {
255
+    remove: function(toasterElement) {
232
         toasterElement.remove();
256
         toasterElement.remove();
233
-    };
234
-
235
-    /**
236
-     * Disables notifications.
237
-     */
238
-    my.disableNotifications = function () {
239
-        notificationsEnabled = false;
240
-    };
257
+    },
241
 
258
 
242
     /**
259
     /**
243
-     * Enables notifications.
260
+     * Enables / disables notifications.
244
      */
261
      */
245
-    my.enableNotifications = function () {
246
-        notificationsEnabled = true;
247
-    };
262
+    enableNotifications: function (enable) {
263
+        notificationsEnabled = enable;
264
+    },
248
 
265
 
249
-    return my;
250
-}(messageHandler || {}));
266
+    enablePopups: function (enable) {
267
+        popupEnabled = enable;
268
+    }
269
+};
251
 
270
 
252
 module.exports = messageHandler;
271
 module.exports = messageHandler;

Loading…
Peruuta
Tallenna