Ver código fonte

_.template removed

j8
Konstantyn Pahsura 8 anos atrás
pai
commit
9f280e320d

+ 8
- 8
modules/UI/side_pannels/chat/Chat.js Ver arquivo

@@ -1,4 +1,4 @@
1
-/* global APP, $, _ */
1
+/* global APP, $ */
2 2
 
3 3
 import {processReplacements, linkify} from './Replacement';
4 4
 import CommandsProcessor from './Commands';
@@ -10,8 +10,9 @@ import UIEvents from '../../../../service/UI/UIEvents';
10 10
 
11 11
 import { smileys } from './smileys';
12 12
 
13
-const sidePannelsContainerId = 'sideToolbarContainer';
14
-const compiledTpl = _.template(`
13
+let unreadMessages = 0;
14
+const sidePanelsContainerId = 'sideToolbarContainer';
15
+const htmlStr = `
15 16
     <div id="chat_container" class="sideToolbarContainer__inner">
16 17
         <div id="nickname">
17 18
             <span data-i18n="chat.nickname.title"></span>
@@ -31,14 +32,13 @@ const compiledTpl = _.template(`
31 32
                 <img src="images/smile.svg"/>
32 33
             </div>
33 34
         </div>
34
-    </div>`);
35
+    </div>`;
36
+
35 37
 function initHTML() {
36
-    $(`#${sidePannelsContainerId}`)
37
-        .append(compiledTpl());
38
+    $(`#${sidePanelsContainerId}`)
39
+        .append(htmlStr);
38 40
 }
39 41
 
40
-var unreadMessages = 0;
41
-
42 42
 /**
43 43
  * The container id, which is and the element id.
44 44
  */

+ 7
- 7
modules/UI/side_pannels/contactlist/ContactListView.js Ver arquivo

@@ -1,21 +1,21 @@
1
-/* global $, APP, interfaceConfig, _ */
1
+/* global $, APP, interfaceConfig */
2 2
 import Avatar from '../../avatar/Avatar';
3 3
 import UIEvents from '../../../../service/UI/UIEvents';
4 4
 import UIUtil from '../../util/UIUtil';
5 5
 
6
-const sidePannelsContainerId = 'sideToolbarContainer';
7
-const compiledTpl = _.template(`
6
+let numberOfContacts = 0;
7
+const sidePanelsContainerId = 'sideToolbarContainer';
8
+const htmlStr = `
8 9
     <div id="contacts_container" class="sideToolbarContainer__inner">
9 10
         <div class="title" data-i18n="contactlist"
10 11
             data-i18n-options='{"pcount":"1"}'></div>
11 12
         <ul id="contacts"></ul>
12
-    </div>`);
13
+    </div>`;
13 14
 
14 15
 function initHTML() {
15
-    $(`#${sidePannelsContainerId}`)
16
-        .append(compiledTpl());
16
+    $(`#${sidePanelsContainerId}`)
17
+        .append(htmlStr);
17 18
 }
18
-let numberOfContacts = 0;
19 19
 
20 20
 /**
21 21
  * Updates the number of participants in the contact list button and sets

+ 7
- 6
modules/UI/side_pannels/profile/Profile.js Ver arquivo

@@ -1,10 +1,10 @@
1
-/* global $, _ */
1
+/* global $ */
2 2
 import UIUtil from "../../util/UIUtil";
3 3
 import UIEvents from "../../../../service/UI/UIEvents";
4 4
 import Settings from '../../../settings/Settings';
5 5
 
6
-const sidePannelsContainerId = 'sideToolbarContainer';
7
-const compiledTpl = _.template(`
6
+const sidePanelsContainerId = 'sideToolbarContainer';
7
+const htmlStr = `
8 8
     <div id="profile_container" class="sideToolbarContainer__inner">
9 9
         <div class="title" data-i18n="profile.title"></div>
10 10
         <div class="sideToolbarBlock first">
@@ -31,10 +31,11 @@ const compiledTpl = _.template(`
31 31
                 </li>
32 32
             </ul>
33 33
         </div>
34
-    </div>`);
34
+    </div>`;
35
+
35 36
 function initHTML() {
36
-    $(`#${sidePannelsContainerId}`)
37
-        .append(compiledTpl());
37
+    $(`#${sidePanelsContainerId}`)
38
+        .append(htmlStr);
38 39
 }
39 40
 
40 41
 export default {

+ 7
- 6
modules/UI/side_pannels/settings/SettingsMenu.js Ver arquivo

@@ -1,12 +1,12 @@
1
-/* global $, _, APP, AJS, interfaceConfig, JitsiMeetJS */
1
+/* global $, APP, AJS, interfaceConfig, JitsiMeetJS */
2 2
 
3 3
 import UIUtil from "../../util/UIUtil";
4 4
 import UIEvents from "../../../../service/UI/UIEvents";
5 5
 import languages from "../../../../service/translation/languages";
6 6
 import Settings from '../../../settings/Settings';
7 7
 
8
-const sidePannelsContainerId = 'sideToolbarContainer';
9
-const compiledTpl = _.template(`
8
+const sidePanelsContainerId = 'sideToolbarContainer';
9
+const htmlStr = `
10 10
     <div id="settings_container" class="sideToolbarContainer__inner">
11 11
         <div class="title" data-i18n="settings.title"></div>
12 12
         <form class="aui">
@@ -55,10 +55,11 @@ const compiledTpl = _.template(`
55 55
                 </div>
56 56
             </div>
57 57
         </form>
58
-    </div>`);
58
+    </div>`;
59
+
59 60
 function initHTML() {
60
-    $(`#${sidePannelsContainerId}`)
61
-        .append(compiledTpl());
61
+    $(`#${sidePanelsContainerId}`)
62
+        .append(htmlStr);
62 63
 }
63 64
 
64 65
 /**

Carregando…
Cancelar
Salvar