rubyfox-server 2.16.0.4 → 2.16.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b343aa9bf90403947275994b93796b85c036bae786498ab427e0b881b9776687
4
- data.tar.gz: 62bc50d0bdbee58669805abf78ccaa08cb170e662f57e1108a2786ef1301d28f
3
+ metadata.gz: 78505908a4f0116314da0cff18ddaf3f2dcedba9b7b22ff2da3753bed015b2a4
4
+ data.tar.gz: 72e8bc4e928445932262453d77266e1c3d29fb6c3c4e782cc8f2942328e307cd
5
5
  SHA512:
6
- metadata.gz: 4d7b43af9c58d53b14fb17370674f9c580e6c9134ecc98b3a799eb5b48175ba49671616ab6533d1d322cd94b4d51dc5c7d3197ee30c84018bf2d742d1ad7a66c
7
- data.tar.gz: 7dca014767988ce06000f8d01a714e1e23648dc45e6e10ac4900bc88b907198aac01f882930a43a2a93e3641575f826918fd4e8186e773cd27190358a06abf30
6
+ metadata.gz: 7f9918d561bb4c6a50c1fa339dc3f6cc4952f07c999938bbf9f199ee9308474d1096b92150f57fd32faa33b6ee6ab08ca142ddb7a5e88c6a8410966a5bed4768
7
+ data.tar.gz: a2b489607af7281bd63c81f4faac84872c5794cee092afeff64efa61a310998c77d992beed77d5d6bfde2d27d8558782d9d94f31497b0a6169db2c76a7e9ca2f
@@ -9,4 +9,4 @@ if [ -d "$JRE_FOLDER" ]; then
9
9
  fi
10
10
 
11
11
  CPATH="./:lib/*:lib/apache-tomcat/bin/*:extensions/__lib__/*"
12
- exec ${JAVA_CMD} -cp ${CPATH} -Dfile.encoding=UTF-8 com.smartfoxserver.v2.Main $1 $2
12
+ ${JAVA_CMD} -cp ${CPATH} -Dfile.encoding=UTF-8 com.smartfoxserver.v2.Main $1 $2
@@ -155,12 +155,13 @@ view-stack.adjust-height-100 {
155
155
  border: none !important;
156
156
  }
157
157
 
158
- .k-input, .k-textbox {
158
+ .k-input, .k-textbox, .k-textarea {
159
159
  color: #495057 !important;
160
160
  text-indent: 0 !important;
161
161
  }
162
162
 
163
163
  .k-textbox:focus,
164
+ .k-textarea:focus,
164
165
  .k-numerictextbox .k-state-focused,
165
166
  .k-numerictextbox .k-state-hover,
166
167
  .k-combobox .k-state-focused {
@@ -169,6 +170,7 @@ view-stack.adjust-height-100 {
169
170
  }
170
171
 
171
172
  .k-textbox:focus,
173
+ .k-textarea:focus,
172
174
  .k-dropdown .k-state-focused,
173
175
  .k-numerictextbox .k-state-focused,
174
176
  .k-numerictextbox .k-state-hover,
@@ -1057,7 +1057,7 @@ class ShellController
1057
1057
 
1058
1058
  this.VERSION_MAJOR = 3;
1059
1059
  this.VERSION_MINOR = 2;
1060
- this.VERSION_SUB = 1;
1060
+ this.VERSION_SUB = 4;
1061
1061
 
1062
1062
  this.DEFAULT_WS_PORT = 8080;
1063
1063
  this.DEFAULT_WSS_PORT = 8443;
@@ -2205,4 +2205,4 @@ module.exports = jQuery;
2205
2205
  /***/ })
2206
2206
 
2207
2207
  /******/ });
2208
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2pzL2NvcmUvYXBwbGljYXRpb24uYnVuZGxlLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vYXBwbGljYXRpb24vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vYXBwbGljYXRpb24vLi9zcmMvYXBwbGljYXRpb24uanMiLCJ3ZWJwYWNrOi8vYXBwbGljYXRpb24vLi9zcmMvY29tcG9uZW50cy92aWV3LXN0YWNrLmpzIiwid2VicGFjazovL2FwcGxpY2F0aW9uLy4vc3JjL21hbmFnZXJzL2NoYXQtbWFuYWdlci5qcyIsIndlYnBhY2s6Ly9hcHBsaWNhdGlvbi8uL3NyYy9tYW5hZ2Vycy9jb25uZWN0aW9uLW1hbmFnZXIuanMiLCJ3ZWJwYWNrOi8vYXBwbGljYXRpb24vLi9zcmMvbWFuYWdlcnMvb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0E7QUFDQTtBQUNBO0FBQ0E7Ozs7Ozs7Ozs7Ozs7QUNYQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7Ozs7Ozs7Ozs7Ozs7QSIsInNvdXJjZVJvb3QiOiIifQ==
@@ -374,9 +374,6 @@ class ServletManager extends _base_module__WEBPACK_IMPORTED_MODULE_0__["BaseModu
374
374
  // Create file data source manager
375
375
  this._fileManager = new _managers_file_datasource_manager__WEBPACK_IMPORTED_MODULE_1__["FileDataSourceManager"](null, [], this._fileSeparator);
376
376
 
377
- // Retrieve HTTP port to be used for files uploading
378
- const uploadHttpPort = data.getInt('httpPort');
379
-
380
377
  // Retrieve module id sent by the server (required because multiple modules use file uploading service)
381
378
  const uploadModuleId = data.getUtfString('modId');
382
379
 
@@ -384,8 +381,9 @@ class ServletManager extends _base_module__WEBPACK_IMPORTED_MODULE_0__["BaseModu
384
381
  this._uploadTargetConfig = {
385
382
  sessionToken: this.smartFox.sessionToken,
386
383
  host: this.smartFox.config.host,
387
- httpPort: uploadHttpPort,
384
+ port: this.smartFox.config.port,
388
385
  moduleId: uploadModuleId,
386
+ protocol: this.smartFox.config.useSSL ? 'https' : 'http'
389
387
  };
390
388
 
391
389
  // Request Servlet files data to server instance
@@ -468,7 +466,7 @@ class ServletManager extends _base_module__WEBPACK_IMPORTED_MODULE_0__["BaseModu
468
466
  if (requester == this.smartFox.mySelf.name)
469
467
  {
470
468
  // Expand parent
471
- this._filesList.expand($(`#svm-fileList .file-controls[data-item-id="${parentPath}"]`).closest('tr'));
469
+ this._filesList.expand($(`#svm-fileList .file-controls[data-item-id="${$.escapeSelector(parentPath)}"]`).closest('tr'));
472
470
 
473
471
  if (!isUpload)
474
472
  {
@@ -476,7 +474,7 @@ class ServletManager extends _base_module__WEBPACK_IMPORTED_MODULE_0__["BaseModu
476
474
  this._addFolderModal.modal('hide');
477
475
 
478
476
  // Select upload file
479
- this._filesList.select($(`#svm-fileList .file-controls[data-item-id="${filePath}"]`).closest('tr'));
477
+ this._filesList.select($(`#svm-fileList .file-controls[data-item-id="${$.escapeSelector(filePath)}"]`).closest('tr'));
480
478
  }
481
479
 
482
480
  // Update selection
@@ -526,7 +524,7 @@ class ServletManager extends _base_module__WEBPACK_IMPORTED_MODULE_0__["BaseModu
526
524
 
527
525
  // Collapse parent if the last of its children was deleted
528
526
  if (parentItem && !parentItem.hasChildren)
529
- this._filesList.collapse($(`#svm-fileList .file-controls[data-item-id="${parentItem.id}"]`).closest('tr'));
527
+ this._filesList.collapse($(`#svm-fileList .file-controls[data-item-id="${$.escapeSelector(parentItem.id)}"]`).closest('tr'));
530
528
  }
531
529
 
532
530
  if (requester == this.smartFox.mySelf.name)
@@ -573,7 +571,7 @@ class ServletManager extends _base_module__WEBPACK_IMPORTED_MODULE_0__["BaseModu
573
571
  {
574
572
  // Hide control buttons on currently selected item
575
573
  if (this._selectedItem)
576
- $(`#svm-fileList .file-controls[data-item-id="${this._selectedItem.id}"]`).hide();
574
+ $(`#svm-fileList .file-controls[data-item-id="${$.escapeSelector(this._selectedItem.id)}"]`).hide();
577
575
 
578
576
  // Get selected item
579
577
  let selectedRows = this._filesList.select();
@@ -584,7 +582,7 @@ class ServletManager extends _base_module__WEBPACK_IMPORTED_MODULE_0__["BaseModu
584
582
  this._selectedItem = this._filesList.dataItem(selectedRows[0]);
585
583
 
586
584
  // Show control buttons on new selected item
587
- $(`#svm-fileList .file-controls[data-item-id="${this._selectedItem.id}"]`).show();
585
+ $(`#svm-fileList .file-controls[data-item-id="${$.escapeSelector(this._selectedItem.id)}"]`).show();
588
586
  }
589
587
  else
590
588
  this._selectedItem = null;
@@ -648,7 +646,7 @@ class ServletManager extends _base_module__WEBPACK_IMPORTED_MODULE_0__["BaseModu
648
646
  $('#svm-clearFilesBt').attr('disabled', true);
649
647
 
650
648
  // Set destination url
651
- const url = 'http://' + this._uploadTargetConfig.host + ':' + this._uploadTargetConfig.httpPort + '/BlueBox/SFS2XFileUpload?sessHashId=' + this._uploadTargetConfig.sessionToken;
649
+ const url = this._uploadTargetConfig.protocol + '://' + this._uploadTargetConfig.host + ':' + this._uploadTargetConfig.port + '/BlueBox/SFS2XFileUpload?sessHashId=' + this._uploadTargetConfig.sessionToken;
652
650
 
653
651
  e.sender.options.async.saveUrl = url;
654
652
 
@@ -763,4 +761,4 @@ class ServletManager extends _base_module__WEBPACK_IMPORTED_MODULE_0__["BaseModu
763
761
  /***/ })
764
762
 
765
763
  }]);
766
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2pzL2NvcmUvbW9kdWxlcy9tb2R1bGUtMTAuYnVuZGxlLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vYXBwbGljYXRpb24vLi9zcmMvbWFuYWdlcnMvZmlsZS1kYXRhc291cmNlLW1hbmFnZXIuanMiLCJ3ZWJwYWNrOi8vYXBwbGljYXRpb24vLi9zcmMvbW9kdWxlcy9zZXJ2bGV0LW1hbmFnZXIuanMiXSwic291cmNlc0NvbnRlb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@@
1
1
  /*! (c) gotoAndPlay | All rights reserved */
2
2
  (window["webpackJsonpapplication"] = window["webpackJsonpapplication"] || []).push([["module-12"],{
3
3
 
4
+ /***/ "./src/components/module-specific/words-files-manager.js":
5
+ /*!***************************************************************!*\
6
+ !*** ./src/components/module-specific/words-files-manager.js ***!
7
+ \***************************************************************/
8
+ /*! exports provided: WordsFilesManager */
9
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
10
+
11
+ "use strict";
12
+ __webpack_require__.r(__webpack_exports__);
13
+ /* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WordsFilesManager", function() { return WordsFilesManager; });
14
+ /* harmony import */ var _utils_utilities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/utilities */ "./src/utils/utilities.js");
15
+
16
+
17
+ class WordsFilesManager extends HTMLElement
18
+ {
19
+ constructor()
20
+ {
21
+ super();
22
+
23
+ this.REFRESH_WORDS_FILES_CLICK_EVENT = 'refreshWordsFilesClick';
24
+ this.EDIT_WORDS_FILE_CLICK_EVENT = 'editWordsFileClick';
25
+ this.SAVE_WORDS_FILE_CLICK_EVENT = 'saveWordsFileClick';
26
+ this.REMOVE_WORDS_FILE_CLICK_EVENT = 'removeWordsFileClick';
27
+ this.ASSIGN_WORDS_FILE_CLICK_EVENT = 'assingWordsFileClick';
28
+
29
+ this.CONFIG_FOLDER = 'config/';
30
+ this.WORDS_FILE_EXT = '.words.txt';
31
+
32
+ this._modalHtml = `
33
+ <div class="modal" id="editModal" tabindex="-1" role="dialog" aria-labelledby="editModalTitle" aria-hidden="true">
34
+ <div class="modal-dialog modal-dialog-centered" role="document">
35
+ <div class="modal-content">
36
+ <div class="modal-header">
37
+ <h5 class="modal-title text-primary" id="editModalTitle">Word File Editor</h5>
38
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
39
+ <span aria-hidden="true">&times;</span>
40
+ </button>
41
+ </div>
42
+ <div class="modal-body in-flow-invalid-msg">
43
+ <fieldset id="editFieldset">
44
+ <div class="form-group">
45
+ <div class="col-form-label form-label-container">
46
+ <label for="filename" class="form-label">Filename <i class="fas fa-question-circle text-muted help" title="Name of the words file. The file will be saved in server's <em>config</em> folder."></i></label>
47
+ </div>
48
+ <div class="inner-widget">
49
+ <div class="input-group">
50
+ <input type="text" id="filename" name="filename" class="form-control k-textbox" autocomplete="off" required data-required-msg="Required" aria-describedby="extension" />
51
+ <div class="input-group-append">
52
+ <span class="input-group-text" id="extension">.words.txt</span>
53
+ </div>
54
+ </div>
55
+ <span class="k-invalid-msg position-static" data-for="filename"></span>
56
+ </div>
57
+ </div>
58
+ <div class="form-group">
59
+ <div class="col-form-label form-label-container">
60
+ <label for="content" class="form-label">Content <i class="fas fa-question-circle text-muted help" title="Enter a word or a valid regular expression per line. See configuration's <em>Words file</em> field description for additional information."></i></label>
61
+ </div>
62
+ <div class="inner-widget">
63
+ <textarea id="content" name="content" class="form-control k-textarea w-100" rows="10"></textarea>
64
+ <span class="k-invalid-msg position-static" data-for="content"></span>
65
+ </div>
66
+ </div>
67
+ </fieldset>
68
+ </div>
69
+ <div class="modal-footer flex-column">
70
+ <div class="d-flex w-100">
71
+ <div class="flex-grow-1 text-left">
72
+ <button id="saveWordFileButton" type="button" class="k-button k-primary"><i class="fas fa-save mr-1"></i>Save word file</button>
73
+ <i id="saveSpinner" class="fas fa-circle-notch fa-spin text-primary align-middle ml-1"></i>
74
+ </div>
75
+ <div class="flex-grow-1 text-right">
76
+ <button type="button" class="k-button k-secondary" data-dismiss="modal">Cancel</button>
77
+ </div>
78
+ </div>
79
+ </div>
80
+ </div>
81
+ </div>
82
+ </div>
83
+ `;
84
+
85
+ //-------------------------------------------
86
+
87
+ $(this).append(`
88
+ <div class="col-sm-5 col-lg-4 col-form-label form-label-container">
89
+ <label class="form-label">Available words files <i class="fas fa-question-circle text-muted help" title="The list of words files found in server's <em>config</em> folder. Click on the Assign button to set the <strong>Words file</strong> field to the selected file. Configuration submission is then required to save the new value."></i></label>
90
+ </div>
91
+ <div class="inner-widget align-self-center col-sm">
92
+ <div>
93
+ <div id="wordsFiles" class="limited-height"></div>
94
+ <div id="actionButtons" class="mt-2 text-right" disabled>
95
+ <i id="actionSpinner" class="fas fa-circle-notch fa-spin text-primary align-middle"></i>
96
+ <button id="refreshButton" type="button" class="k-button k-secondary ml-2" title="Refresh"><i class="fas fa-redo-alt"></i></button>
97
+ <button id="addButton" type="button" class="k-button k-secondary ml-2" title="Add"><i class="fas fa-plus"></i></button>
98
+ <button id="editButton" type="button" class="k-button k-secondary ml-2" title="Edit" disabled><i class="fas fa-pen"></i></button>
99
+ <button id="removeButton" type="button" class="k-button k-secondary ml-2" title="Remove" disabled><i class="fas fa-times"></i></button>
100
+ <button id="assignButton" type="button" class="k-button k-secondary ml-2" title="Assign" disabled><i class="fas fa-compress-arrows-alt"></i></button>
101
+ </div>
102
+ </div>
103
+ </div>
104
+ `);
105
+
106
+ //-------------------------------------------
107
+
108
+ // Initialize grid
109
+ this._wordsFilesGrid = $('#wordsFiles', $(this)).kendoGrid({
110
+ resizable: true,
111
+ selectable: 'row',
112
+ change: $.proxy(this._onWordsFilesGridSelectionChange, this),
113
+ columns: [
114
+ {
115
+ field: 'name',
116
+ title: 'Filename',
117
+ width: 120
118
+ },
119
+ {
120
+ field: 'date',
121
+ title: 'Date',
122
+ width: 80
123
+ },
124
+ {
125
+ field: 'size',
126
+ title: 'Size',
127
+ width: 80
128
+ }
129
+ ],
130
+ noRecords: {
131
+ template: 'No files.'
132
+ }
133
+ }).data('kendoGrid');
134
+
135
+ // Add listeners to button clicks
136
+ $('#refreshButton', $(this)).on('click', $.proxy(this._onReloadClick, this));
137
+ $('#addButton', $(this)).on('click', $.proxy(this._onAddClick, this));
138
+ $('#editButton', $(this)).on('click', $.proxy(this._onEditClick, this));
139
+ $('#removeButton', $(this)).on('click', $.proxy(this._onRemoveClick, this));
140
+ $('#assignButton', $(this)).on('click', $.proxy(this._onAssignClick, this));
141
+ }
142
+
143
+ destroy()
144
+ {
145
+ // Destroy grid
146
+ this._wordsFilesGrid.destroy();
147
+
148
+ // Remove event listeners
149
+ $('#refreshButton', $(this)).off('click');
150
+ $('#addButton', $(this)).off('click');
151
+ $('#editButton', $(this)).off('click');
152
+ $('#removeButton', $(this)).off('click');
153
+ $('#assignButton', $(this)).off('click');
154
+
155
+ // Hide modal (which in turn destroys it)
156
+ let modalElement = $('#editModal', $(this));
157
+
158
+ if (modalElement)
159
+ modalElement.modal('hide');
160
+ }
161
+
162
+ get enabled()
163
+ {
164
+ return this._isEnabled;
165
+ }
166
+
167
+ set enabled(value)
168
+ {
169
+ this._isEnabled = value;
170
+
171
+ // Enable/disable buttons
172
+ $('#actionButtons', this).attr('disabled', !value);
173
+
174
+ // Hide spinner
175
+ if (value)
176
+ this.actionSpinnerVisible = false;
177
+
178
+ // Enable/disable modal
179
+ let modalElement = $('#editModal', $(this));
180
+
181
+ if (modalElement)
182
+ {
183
+ // Disable modal close buttons
184
+ $('button[data-dismiss="modal"]', modalElement).attr('disabled', !value);
185
+
186
+ // Disable save button
187
+ $('#saveWordFileButton', modalElement).attr('disabled', !value);
188
+
189
+ // Disable fieldset
190
+ $('#editFieldset', modalElement).attr('disabled', !value);
191
+
192
+ // Hide spinner
193
+ if (value)
194
+ this.saveSpinnerVisible = false;
195
+ }
196
+ }
197
+
198
+ set actionSpinnerVisible(value)
199
+ {
200
+ if (value)
201
+ $('#actionSpinner', $(this)).show();
202
+ else
203
+ $('#actionSpinner', $(this)).hide();
204
+ }
205
+
206
+ set saveSpinnerVisible(value)
207
+ {
208
+ let modalElement = $('#editModal', $(this));
209
+
210
+ if (modalElement)
211
+ {
212
+ if (value)
213
+ $('#saveSpinner', modalElement).show();
214
+ else
215
+ $('#saveSpinner', modalElement).hide();
216
+ }
217
+ }
218
+
219
+ refreshWordsFilesList(wordsFilesList, hideEditModal)
220
+ {
221
+ if (hideEditModal)
222
+ {
223
+ let modalElement = $('#editModal', $(this));
224
+
225
+ if (modalElement)
226
+ modalElement.modal('hide');
227
+ }
228
+
229
+ let files = [];
230
+ this._existingFilenames = [];
231
+
232
+ for (let f = 0; f < wordsFilesList.size(); f++)
233
+ {
234
+ const file = wordsFilesList.getSFSObject(f);
235
+
236
+ const fileObj = {};
237
+ fileObj.name = file.getUtfString('name');
238
+ fileObj.date = file.getUtfString('date') + ' ' + file.getUtfString('time');
239
+ fileObj.size = Object(_utils_utilities__WEBPACK_IMPORTED_MODULE_0__["bytesToSize"])(file.getLong('size'), 2);
240
+
241
+ // Populate files list
242
+ files.push(fileObj);
243
+
244
+ // Save ref to existing filenames, to check them when a new file is created
245
+ this._existingFilenames.push(fileObj.name);
246
+ }
247
+
248
+ // Assign data source to grid
249
+ this._setWordsFilesGridDataSource(files);
250
+ this._onWordsFilesGridSelectionChange();
251
+
252
+ // Enable
253
+ this.enabled = true;
254
+ }
255
+
256
+ getSelectedWordsFileName()
257
+ {
258
+ if (this._wordsFilesGrid.select() != null)
259
+ {
260
+ let selectedIndex = this._wordsFilesGrid.select().index();
261
+ return this._wordsFilesGrid.dataSource.at(selectedIndex).name;
262
+ }
263
+ else
264
+ return null;
265
+ }
266
+
267
+ editWordsFile(filename, content)
268
+ {
269
+ this._isNewFile = false;
270
+
271
+ this.enabled = true;
272
+
273
+ // Show modal
274
+ this._showModal();
275
+
276
+ // Remove default extension from filename
277
+ filename = filename.substring(0, filename.lastIndexOf(this.WORDS_FILE_EXT));
278
+
279
+ // Enter content filename and content in modal form
280
+ $('#editModal #filename', $(this)).val(filename);
281
+ $('#editModal #content', $(this)).val(content);
282
+
283
+ // Set filename field as not editable and hide note
284
+ $('#editModal #filename', $(this)).attr('disabled', true);
285
+ $('#editModal #filenameNote', $(this)).hide();
286
+ }
287
+
288
+ getExistingFilenames()
289
+ {
290
+ return this._existingFilenames;
291
+ }
292
+
293
+ _setWordsFilesGridDataSource(ds)
294
+ {
295
+ // Read current horizontal scroll value
296
+ const scrollLeft = $('#wordsFiles .k-grid-content', this._wordsFilesGrid.wrapper).scrollLeft();
297
+
298
+ // Assign data source to grid
299
+ this._wordsFilesGrid.setDataSource(ds);
300
+
301
+ // Set horizontal scroll
302
+ $('#wordsFiles .k-grid-content', this._wordsFilesGrid.wrapper).scrollLeft(scrollLeft);
303
+ }
304
+
305
+ _onWordsFilesGridSelectionChange()
306
+ {
307
+ // Enable/disable buttons
308
+ const selectedRows = this._wordsFilesGrid.select();
309
+ $('#editButton').attr('disabled', selectedRows.length == 0);
310
+ $('#removeButton').attr('disabled', selectedRows.length == 0);
311
+ $('#assignButton').attr('disabled', selectedRows.length == 0);
312
+ }
313
+
314
+ _onReloadClick()
315
+ {
316
+ // Fire event to request file content to server
317
+ let evt = new CustomEvent(this.REFRESH_WORDS_FILES_CLICK_EVENT, {
318
+ detail: null,
319
+ bubbles: false,
320
+ cancelable: false
321
+ });
322
+
323
+ this.dispatchEvent(evt);
324
+ }
325
+
326
+ _onAddClick()
327
+ {
328
+ this._isNewFile = true;
329
+
330
+ // Show modal
331
+ this._showModal();
332
+ }
333
+
334
+ _onEditClick()
335
+ {
336
+ // Disable buttons
337
+ this.enabled = false;
338
+ this.actionSpinnerVisible = true;
339
+
340
+ // Fire event to request file content to server
341
+ let evt = new CustomEvent(this.EDIT_WORDS_FILE_CLICK_EVENT, {
342
+ detail: this.getSelectedWordsFileName(),
343
+ bubbles: false,
344
+ cancelable: false
345
+ });
346
+
347
+ this.dispatchEvent(evt);
348
+ }
349
+
350
+ _onRemoveClick()
351
+ {
352
+ // Fire event to request file removal to server
353
+ let evt = new CustomEvent(this.REMOVE_WORDS_FILE_CLICK_EVENT, {
354
+ detail: this.getSelectedWordsFileName(),
355
+ bubbles: false,
356
+ cancelable: false
357
+ });
358
+
359
+ this.dispatchEvent(evt);
360
+ }
361
+
362
+ _onAssignClick()
363
+ {
364
+ // Fire event to substitute path in configuration
365
+ let evt = new CustomEvent(this.ASSIGN_WORDS_FILE_CLICK_EVENT, {
366
+ detail: this.CONFIG_FOLDER + this.getSelectedWordsFileName(),
367
+ bubbles: false,
368
+ cancelable: false
369
+ });
370
+
371
+ this.dispatchEvent(evt);
372
+ }
373
+
374
+ _onSaveWordFileClick()
375
+ {
376
+ if (this._validator.validate())
377
+ {
378
+ // Show spinner
379
+ $('#editModal #saveSpinner', $(this)).show();
380
+
381
+ // Fire event to request file to be saved by server
382
+ let evt = new CustomEvent(this.SAVE_WORDS_FILE_CLICK_EVENT, {
383
+ detail: {
384
+ filename: $('#editModal #filename', $(this)).val() + this.WORDS_FILE_EXT,
385
+ isNew: this._isNewFile,
386
+ content: $('#editModal #content', $(this)).val()
387
+ },
388
+ bubbles: false,
389
+ cancelable: false
390
+ });
391
+
392
+ this.dispatchEvent(evt);
393
+ }
394
+ }
395
+
396
+ _showModal()
397
+ {
398
+ // Append modal html
399
+ $(this).append(this._modalHtml);
400
+
401
+ let modalElement = $('#editModal', $(this));
402
+
403
+ // Initialize kendo validation
404
+ this._validator = modalElement.find('#editFieldset').kendoValidator({
405
+ validateOnBlur: true,
406
+ rules: {
407
+ requiredFilename: $.proxy(function(input) {
408
+ let valid = true;
409
+ if (input.is('[name=filename]'))
410
+ valid = input.val() !== '';
411
+ return valid;
412
+ }, this),
413
+ validFilename: $.proxy(function(input) {
414
+ let valid = true;
415
+ if (input.is('[name=filename]'))
416
+ valid = (!input.val().includes('\\') && !input.val().includes('/'));
417
+ return valid;
418
+ }, this)
419
+ },
420
+ messages: {
421
+ requiredFilename: 'Required',
422
+ validFilename: 'Contains invalid characters (slash, backslash)'
423
+ }
424
+ }).data('kendoValidator');
425
+
426
+ // Hide save spinner
427
+ $('#saveSpinner', modalElement).hide();
428
+
429
+ // Add listener to Save button click
430
+ $('#saveWordFileButton', modalElement).on('click', $.proxy(this._onSaveWordFileClick, this));
431
+
432
+ // Add listener to modal hide event
433
+ modalElement.on('hidden.bs.modal', $.proxy(this._destroyModal, this));
434
+
435
+ // Initialize bootstrap modal
436
+ modalElement.modal({
437
+ backdrop: 'static',
438
+ keyboard: false,
439
+ });
440
+ }
441
+
442
+ _destroyModal()
443
+ {
444
+ let modalElement = $('#editModal', $(this));
445
+
446
+ if (modalElement)
447
+ {
448
+ // Remove listeners
449
+ $('#saveWordFileButton', modalElement).off('click');
450
+ modalElement.off('hidden.bs.modal');
451
+
452
+ // Destroy everything Kendo
453
+ kendo.destroy(modalElement);
454
+
455
+ // Dispose modal
456
+ modalElement.modal('dispose');
457
+
458
+ // Remove html
459
+ modalElement.remove();
460
+ modalElement = null;
461
+ }
462
+ }
463
+ }
464
+
465
+ // DEFINE COMPONENT
466
+ if (!window.customElements.get('words-files-manager'))
467
+ window.customElements.define('words-files-manager', WordsFilesManager);
468
+
469
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "jquery")))
470
+
471
+ /***/ }),
472
+
4
473
  /***/ "./src/components/sidebar-layout.js":
5
474
  /*!******************************************!*\
6
475
  !*** ./src/components/sidebar-layout.js ***!
@@ -150,6 +619,8 @@ __webpack_require__.r(__webpack_exports__);
150
619
  /* harmony import */ var _components_sidebar_layout__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/sidebar-layout */ "./src/components/sidebar-layout.js");
151
620
  /* harmony import */ var _utils_uibuilder_config_interface_builder__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/uibuilder/config-interface-builder */ "./src/utils/uibuilder/config-interface-builder.js");
152
621
  /* harmony import */ var _utils_utilities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/utilities */ "./src/utils/utilities.js");
622
+ /* harmony import */ var _components_module_specific_words_files_manager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../components/module-specific/words-files-manager */ "./src/components/module-specific/words-files-manager.js");
623
+
153
624
 
154
625
 
155
626
 
@@ -179,6 +650,11 @@ class ZoneConfigurator extends _base_module__WEBPACK_IMPORTED_MODULE_0__["BaseMo
179
650
  this.REQ_NEW_ROOM_CONFIG = 'newRoomConfig';
180
651
  this.REQ_DELETE_ROOM_CONFIG = 'delRoomConfig';
181
652
 
653
+ this.REQ_REFRESH_WORDS_FILE = 'refreshWordsFiles';
654
+ this.REQ_EDIT_WORDS_FILE = 'editWordsFile';
655
+ this.REQ_SAVE_WORDS_FILE = 'saveWordsFile';
656
+ this.REQ_DELETE_WORDS_FILE = 'delWordsFile';
657
+
182
658
  // Incoming responses
183
659
  this.RESP_ZONES = 'zones';
184
660
 
@@ -195,6 +671,10 @@ class ZoneConfigurator extends _base_module__WEBPACK_IMPORTED_MODULE_0__["BaseMo
195
671
  this.RESP_ROOM_ADDED = 'roomAdded';
196
672
  this.RESP_ROOM_REFUSED = 'roomRefused';
197
673
  this.RESP_ROOM_DELETED = 'roomDel';
674
+
675
+ this.RESP_REFRESH_WORDS_FILES = 'refreshWordsFiles';
676
+ this.RESP_WORDS_FILE_CONTENT = 'wordsFile';
677
+ this.RESP_WORDS_FILE_ERROR = 'wordsFileErr';
198
678
  }
199
679
 
200
680
  //------------------------------------
@@ -223,7 +703,7 @@ class ZoneConfigurator extends _base_module__WEBPACK_IMPORTED_MODULE_0__["BaseMo
223
703
  change: $.proxy(this._onZoneRoomChange, this),
224
704
  }).data('kendoTreeView');
225
705
 
226
- // Lestend to treeview double-click event
706
+ // Listen to treeview double-click event
227
707
  $('#znc-treeView').on('dblclick', $.proxy(this._onTreeItemDoubleClick, this));
228
708
 
229
709
  // Request zones & rooms list to server instance
@@ -251,6 +731,14 @@ class ZoneConfigurator extends _base_module__WEBPACK_IMPORTED_MODULE_0__["BaseMo
251
731
  $('#znc-cancelButton').on('click', $.proxy(this._onCancelClick, this));
252
732
  $('#znc-reloadButton').on('click', $.proxy(this._onReloadClick, this));
253
733
  $('#znc-submitButton').on('click', $.proxy(this._onSubmitClick, this));
734
+
735
+ // Save ref to words files manager and add custom event listeners
736
+ this._wordsFilesManager = document.getElementById('znc-wordsFilesManager');
737
+ $(this._wordsFilesManager).on(this._wordsFilesManager.REFRESH_WORDS_FILES_CLICK_EVENT, $.proxy(this._onWordsFileReloadClick, this));
738
+ $(this._wordsFilesManager).on(this._wordsFilesManager.EDIT_WORDS_FILE_CLICK_EVENT, $.proxy(this._onWordsFileEditClick, this));
739
+ $(this._wordsFilesManager).on(this._wordsFilesManager.SAVE_WORDS_FILE_CLICK_EVENT, $.proxy(this._onWordsFileSaveClick, this));
740
+ $(this._wordsFilesManager).on(this._wordsFilesManager.REMOVE_WORDS_FILE_CLICK_EVENT, $.proxy(this._onWordsFileRemoveClick, this));
741
+ $(this._wordsFilesManager).on(this._wordsFilesManager.ASSIGN_WORDS_FILE_CLICK_EVENT, $.proxy(this._onWordsFileAssignClick, this));
254
742
  }
255
743
 
256
744
  destroy()
@@ -276,6 +764,13 @@ class ZoneConfigurator extends _base_module__WEBPACK_IMPORTED_MODULE_0__["BaseMo
276
764
  $('#znc-reloadButton').off('click');
277
765
  $('#znc-submitButton').off('click');
278
766
 
767
+ // Remove listeners to words files manager
768
+ $(this._wordsFilesManager).off(this._wordsFilesManager.REFRESH_WORDS_FILES_CLICK_EVENT);
769
+ $(this._wordsFilesManager).off(this._wordsFilesManager.EDIT_WORDS_FILE_CLICK_EVENT);
770
+ $(this._wordsFilesManager).off(this._wordsFilesManager.SAVE_WORDS_FILE_CLICK_EVENT);
771
+ $(this._wordsFilesManager).off(this._wordsFilesManager.REMOVE_WORDS_FILE_CLICK_EVENT);
772
+ $(this._wordsFilesManager).off(this._wordsFilesManager.ASSIGN_WORDS_FILE_CLICK_EVENT);
773
+
279
774
  // Clear tabs container
280
775
  this._clearTabs();
281
776
  }
@@ -598,6 +1093,34 @@ class ZoneConfigurator extends _base_module__WEBPACK_IMPORTED_MODULE_0__["BaseMo
598
1093
  this._treeview.dataSource.sync();
599
1094
  }
600
1095
 
1096
+ /****** WORDS FILES ******/
1097
+
1098
+ // Words files list received
1099
+ else if (command == this.RESP_REFRESH_WORDS_FILES)
1100
+ {
1101
+ this._wordsFilesManager.refreshWordsFilesList(data.getSFSArray('wf'), username == this.smartFox.mySelf.name);
1102
+
1103
+ // If another user caused a refresh (for example deleting a file, or adding a new one) show a notification
1104
+ if (username != null && username != this.smartFox.mySelf.name && this._editedZoneId > -1)
1105
+ this.shellCtrl.showNotification('Words files modified', `Administrator ${username} has added, modified or deleted a words file.`);
1106
+ }
1107
+
1108
+ // Words file content received
1109
+ else if (command == this.RESP_WORDS_FILE_CONTENT)
1110
+ {
1111
+ this._wordsFilesManager.editWordsFile(data.getUtfString('filename'), data.getText('content'));
1112
+ }
1113
+
1114
+ // Words file error (edit/save)
1115
+ else if (command == this.RESP_WORDS_FILE_ERROR)
1116
+ {
1117
+ // Enable buttons
1118
+ this._wordsFilesManager.enabled = true;
1119
+
1120
+ // Show alert
1121
+ this.shellCtrl.showSimpleAlert(data.getUtfString('error'), true);
1122
+ }
1123
+
601
1124
  // else if ()
602
1125
  }
603
1126
 
@@ -832,6 +1355,85 @@ class ZoneConfigurator extends _base_module__WEBPACK_IMPORTED_MODULE_0__["BaseMo
832
1355
  }
833
1356
  }
834
1357
 
1358
+ _onWordsFileReloadClick(evt)
1359
+ {
1360
+ // Send request to server
1361
+ this.sendExtensionRequest(this.REQ_REFRESH_WORDS_FILE);
1362
+ }
1363
+
1364
+ _onWordsFileEditClick(evt)
1365
+ {
1366
+ // Send request to server
1367
+ let params = new SFS2X.SFSObject();
1368
+ params.putUtfString('filename', evt.detail);
1369
+ this.sendExtensionRequest(this.REQ_EDIT_WORDS_FILE, params);
1370
+ }
1371
+
1372
+ _onWordsFileSaveClick(evt)
1373
+ {
1374
+ this._tempWordsFileData = evt.detail;
1375
+
1376
+ // Check if a new file is being created
1377
+ if (this._tempWordsFileData.isNew)
1378
+ {
1379
+ // If yes, check if name already exists
1380
+ if (this._wordsFilesManager.getExistingFilenames().includes(this._tempWordsFileData.filename))
1381
+ {
1382
+ // Show confirm dialog
1383
+ this.shellCtrl.showConfirmWarning('A words file with the entered name already exists; do you want to proceed anyway? The existing file will be overwritten.', $.proxy(this._onWordsFileSaveConfirm, this));
1384
+ return;
1385
+ }
1386
+ }
1387
+
1388
+ // Proceed
1389
+ this._onWordsFileSaveConfirm();
1390
+ }
1391
+
1392
+ _onWordsFileSaveConfirm()
1393
+ {
1394
+ // Disable words files manager buttons
1395
+ this._wordsFilesManager.enabled = false;
1396
+ this._wordsFilesManager.saveSpinnerVisible = true;
1397
+
1398
+ // Send request to server
1399
+ let params = new SFS2X.SFSObject();
1400
+ params.putUtfString('filename', this._tempWordsFileData.filename);
1401
+ params.putText('content', this._tempWordsFileData.content);
1402
+ this.sendExtensionRequest(this.REQ_SAVE_WORDS_FILE, params);
1403
+ }
1404
+
1405
+ _onWordsFileRemoveClick(evt)
1406
+ {
1407
+ this.shellCtrl.showConfirmWarning('Are you sure you want to delete the selected words file?', $.proxy(this._onWordsFileRemoveConfirm, this));
1408
+ }
1409
+
1410
+ _onWordsFileRemoveConfirm()
1411
+ {
1412
+ let wordsFile = this._wordsFilesManager.getSelectedWordsFileName();
1413
+
1414
+ if (wordsFile != null)
1415
+ {
1416
+ // Disable words files manager buttons
1417
+ this._wordsFilesManager.enabled = false;
1418
+ this._wordsFilesManager.actionSpinnerVisible = true;
1419
+
1420
+ // Send request to server
1421
+ let params = new SFS2X.SFSObject();
1422
+ params.putUtfString('filename', wordsFile);
1423
+ this.sendExtensionRequest(this.REQ_DELETE_WORDS_FILE, params);
1424
+ }
1425
+ }
1426
+
1427
+ _onWordsFileAssignClick(evt)
1428
+ {
1429
+ let path = evt.detail;
1430
+
1431
+ // Write path of the selected words file in "wordsFilter.wordsFile" dynamically created field
1432
+ const wordsFileFormItem = this._interfaceBuilder.getConfigFormItem('wordsFilter.wordsFile');
1433
+ wordsFileFormItem.data.value = path;
1434
+ wordsFileFormItem._setWidgetValue();
1435
+ }
1436
+
835
1437
  //---------------------------------
836
1438
  // PRIVATE METHODS
837
1439
  //---------------------------------
@@ -1181,4 +1783,4 @@ class ZoneConfigurator extends _base_module__WEBPACK_IMPORTED_MODULE_0__["BaseMo
1181
1783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