@oat-sa/tao-core-ui 1.58.1 → 1.58.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/dist/actionbar.js +386 -395
  2. package/dist/adder.js +21 -19
  3. package/dist/animable/absorbable/absorbable.js +204 -213
  4. package/dist/animable/absorbable/css/absorb.css +1 -0
  5. package/dist/animable/absorbable/css/absorb.css.map +1 -1
  6. package/dist/animable/pulsable/pulsable.js +168 -177
  7. package/dist/autocomplete/css/autocomplete.css +1 -0
  8. package/dist/autocomplete/css/autocomplete.css.map +1 -1
  9. package/dist/autocomplete.js +68 -66
  10. package/dist/badge/badge.js +188 -197
  11. package/dist/badge/css/badge.css +1 -0
  12. package/dist/badge/css/badge.css.map +1 -1
  13. package/dist/breadcrumbs.js +275 -284
  14. package/dist/btngrouper.js +5 -5
  15. package/dist/bulkActionPopup.js +490 -495
  16. package/dist/button.js +283 -291
  17. package/dist/cascadingComboBox.js +249 -258
  18. package/dist/ckeditor/ckConfigurator.js +26 -19
  19. package/dist/ckeditor/dtdHandler.js +11 -9
  20. package/dist/class/selector.js +441 -450
  21. package/dist/component/resizable.js +1 -1
  22. package/dist/component/windowed.js +285 -294
  23. package/dist/component.js +419 -428
  24. package/dist/contextualPopup.js +417 -426
  25. package/dist/dashboard.js +300 -309
  26. package/dist/datalist.js +753 -762
  27. package/dist/datatable/filterStrategy/multiple.js +1 -1
  28. package/dist/datatable/filterStrategy/single.js +1 -1
  29. package/dist/datatable.js +1527 -1550
  30. package/dist/dateRange/dateRange.js +393 -402
  31. package/dist/datetime/picker.js +665 -672
  32. package/dist/deleter.js +368 -377
  33. package/dist/destination/selector.js +286 -295
  34. package/dist/dialog/alert.js +3 -3
  35. package/dist/dialog/confirm.js +1 -1
  36. package/dist/dialog/confirmDelete.js +216 -225
  37. package/dist/dialog.js +650 -654
  38. package/dist/disabler.js +8 -8
  39. package/dist/documentViewer/providers/pdfViewer/fallback/viewer.js +166 -175
  40. package/dist/documentViewer/providers/pdfViewer/pdfjs/findBar.js +518 -527
  41. package/dist/documentViewer/providers/pdfViewer/pdfjs/pageView.js +380 -389
  42. package/dist/documentViewer/providers/pdfViewer/pdfjs/searchEngine.js +539 -548
  43. package/dist/documentViewer/providers/pdfViewer/pdfjs/viewer.js +369 -378
  44. package/dist/documentViewer/providers/pdfViewer.js +184 -193
  45. package/dist/documentViewer.js +292 -301
  46. package/dist/dropdown.js +383 -392
  47. package/dist/durationer.js +5 -5
  48. package/dist/dynamicComponent.js +597 -598
  49. package/dist/feedback.js +356 -362
  50. package/dist/figure/FigureStateActive.js +117 -108
  51. package/dist/filesender.js +2 -2
  52. package/dist/filter.js +230 -239
  53. package/dist/form/dropdownForm.js +355 -357
  54. package/dist/form/form.js +919 -690
  55. package/dist/form/simpleForm.js +1 -1
  56. package/dist/form/validator/renderer.js +233 -235
  57. package/dist/form/validator/validator.js +257 -189
  58. package/dist/form/widget/definitions.js +1 -1
  59. package/dist/form/widget/providers/checkBox.js +254 -259
  60. package/dist/form/widget/providers/comboBox.js +187 -192
  61. package/dist/form/widget/providers/default.js +8 -9
  62. package/dist/form/widget/providers/hidden.js +170 -179
  63. package/dist/form/widget/providers/hiddenBox.js +262 -267
  64. package/dist/form/widget/providers/radioBox.js +216 -225
  65. package/dist/form/widget/providers/textArea.js +187 -196
  66. package/dist/form/widget/providers/textBox.js +2 -3
  67. package/dist/form/widget/widget.js +473 -475
  68. package/dist/formValidator/formValidator.js +1 -1
  69. package/dist/formValidator/highlighters/message.js +1 -1
  70. package/dist/generis/form/form.js +314 -323
  71. package/dist/generis/validator/validator.js +209 -218
  72. package/dist/generis/widget/checkBox/checkBox.js +218 -227
  73. package/dist/generis/widget/comboBox/comboBox.js +179 -188
  74. package/dist/generis/widget/hiddenBox/hiddenBox.js +220 -229
  75. package/dist/generis/widget/textBox/textBox.js +169 -178
  76. package/dist/generis/widget/widget.js +246 -255
  77. package/dist/groupedComboBox.js +222 -231
  78. package/dist/groupvalidator.js +2 -2
  79. package/dist/highlighter.js +967 -958
  80. package/dist/image/ImgStateActive/helper.js +7 -5
  81. package/dist/image/ImgStateActive/initHelper.js +49 -43
  82. package/dist/image/ImgStateActive/initMediaEditor.js +24 -20
  83. package/dist/image/ImgStateActive/mediaSizer.js +14 -12
  84. package/dist/image/ImgStateActive.js +72 -70
  85. package/dist/incrementer.js +6 -6
  86. package/dist/inplacer.js +6 -6
  87. package/dist/itemButtonList/css/item-button-list.css +1 -0
  88. package/dist/itemButtonList/css/item-button-list.css.map +1 -1
  89. package/dist/itemButtonList.js +439 -435
  90. package/dist/keyNavigation/navigableDomElement.js +51 -38
  91. package/dist/keyNavigation/navigator.js +85 -70
  92. package/dist/listbox.js +460 -469
  93. package/dist/liststyler.js +8 -8
  94. package/dist/loadingButton/loadingButton.js +209 -218
  95. package/dist/lock.js +476 -485
  96. package/dist/login/login.js +475 -484
  97. package/dist/maths/calculator/basicCalculator.js +235 -244
  98. package/dist/maths/calculator/calculatorComponent.js +3 -3
  99. package/dist/maths/calculator/core/board.js +772 -781
  100. package/dist/maths/calculator/core/expression.js +476 -485
  101. package/dist/maths/calculator/core/labels.js +228 -237
  102. package/dist/maths/calculator/core/tokenizer.js +1 -1
  103. package/dist/maths/calculator/core/tokens.js +163 -170
  104. package/dist/maths/calculator/plugins/keyboard/templateKeyboard/templateKeyboard.js +244 -253
  105. package/dist/maths/calculator/plugins/screen/simpleScreen/simpleScreen.js +279 -288
  106. package/dist/maths/calculator/scientificCalculator.js +327 -336
  107. package/dist/mediaEditor/mediaEditorComponent.js +238 -245
  108. package/dist/mediaEditor/plugins/mediaAlignment/helper.js +7 -7
  109. package/dist/mediaEditor/plugins/mediaAlignment/mediaAlignmentComponent.js +229 -235
  110. package/dist/mediaEditor/plugins/mediaDimension/mediaDimensionComponent.js +580 -589
  111. package/dist/mediaplayer/players/html5.js +666 -675
  112. package/dist/mediaplayer/players/youtube.js +419 -424
  113. package/dist/mediaplayer/support.js +11 -10
  114. package/dist/mediaplayer/utils/reminder.js +14 -13
  115. package/dist/mediaplayer/utils/timeObserver.js +10 -11
  116. package/dist/mediaplayer/youtubeManager.js +164 -145
  117. package/dist/mediaplayer.js +1565 -1520
  118. package/dist/mediasizer.js +669 -678
  119. package/dist/modal.js +10 -17
  120. package/dist/pageSizeSelector.js +219 -228
  121. package/dist/pagination/providers/pages.js +280 -289
  122. package/dist/pagination/providers/simple.js +192 -201
  123. package/dist/previewer.js +30 -30
  124. package/dist/progressbar.js +4 -4
  125. package/dist/report.js +347 -356
  126. package/dist/resource/filters.js +271 -280
  127. package/dist/resource/list.js +1264 -1273
  128. package/dist/resource/selector.js +865 -874
  129. package/dist/resource/tree.js +1483 -1492
  130. package/dist/resourcemgr/fileBrowser.js +564 -569
  131. package/dist/resourcemgr/filePreview.js +16 -16
  132. package/dist/resourcemgr/fileSelector.js +515 -524
  133. package/dist/resourcemgr/util/updatePermissions.js +2 -2
  134. package/dist/resourcemgr.js +306 -315
  135. package/dist/searchModal/advancedSearch.js +796 -767
  136. package/dist/searchModal.js +114 -91
  137. package/dist/switch/switch.js +298 -307
  138. package/dist/tabs.js +598 -575
  139. package/dist/taskQueue/status.js +312 -321
  140. package/dist/taskQueue/table.js +375 -384
  141. package/dist/taskQueue/taskQueueModel.js +488 -472
  142. package/dist/taskQueueButton/taskable.js +264 -273
  143. package/dist/taskQueueButton/treeButton.js +189 -198
  144. package/dist/themeLoader.js +24 -23
  145. package/dist/themes.js +1 -1
  146. package/dist/toggler.js +3 -3
  147. package/dist/tooltip.js +295 -304
  148. package/dist/transformer.js +2 -2
  149. package/dist/tristateCheckboxGroup.js +311 -320
  150. package/dist/uploader.js +687 -696
  151. package/dist/validator/Report.js +1 -1
  152. package/dist/validator/Validator.js +3 -3
  153. package/dist/validator/validators.js +9 -9
  154. package/dist/validator.js +240 -230
  155. package/dist/waitForMedia.js +1 -1
  156. package/package.json +3 -3
  157. package/src/animable/absorbable/css/absorb.css +1 -0
  158. package/src/animable/absorbable/css/absorb.css.map +1 -1
  159. package/src/autocomplete/css/autocomplete.css +1 -0
  160. package/src/autocomplete/css/autocomplete.css.map +1 -1
  161. package/src/badge/css/badge.css +1 -0
  162. package/src/badge/css/badge.css.map +1 -1
  163. package/src/ckeditor/ckConfigurator.js +4 -0
  164. package/src/itemButtonList/css/item-button-list.css +1 -0
  165. package/src/itemButtonList/css/item-button-list.css.map +1 -1
  166. package/src/.DS_Store +0 -0
  167. package/src/css/basic.css +0 -7826
  168. package/src/css/basic.css.map +0 -1
  169. package/src/css/ckeditor/skins/tao/css/dialog.css +0 -950
  170. package/src/css/ckeditor/skins/tao/css/dialog.css.map +0 -1
  171. package/src/css/ckeditor/skins/tao/css/editor.css +0 -1850
  172. package/src/css/ckeditor/skins/tao/css/editor.css.map +0 -1
  173. package/src/scss/.DS_Store +0 -0
  174. package/src/scss/basic.scss +0 -16
  175. package/src/scss/ckeditor/skins/tao/scss/dialog.scss +0 -763
  176. package/src/scss/ckeditor/skins/tao/scss/editor.scss +0 -111
  177. package/src/scss/ckeditor/skins/tao/scss/inc/_ck-icons.scss +0 -59
  178. package/src/scss/ckeditor/skins/tao/scss/inc/_colorpanel.scss +0 -118
  179. package/src/scss/ckeditor/skins/tao/scss/inc/_elementspath.scss +0 -69
  180. package/src/scss/ckeditor/skins/tao/scss/inc/_mainui.scss +0 -194
  181. package/src/scss/ckeditor/skins/tao/scss/inc/_menu.scss +0 -181
  182. package/src/scss/ckeditor/skins/tao/scss/inc/_panel.scss +0 -200
  183. package/src/scss/ckeditor/skins/tao/scss/inc/_presets.scss +0 -32
  184. package/src/scss/ckeditor/skins/tao/scss/inc/_reset.scss +0 -101
  185. package/src/scss/ckeditor/skins/tao/scss/inc/_richcombo.scss +0 -213
  186. package/src/scss/ckeditor/skins/tao/scss/inc/_tao.scss +0 -59
  187. package/src/scss/ckeditor/skins/tao/scss/inc/_toolbar.scss +0 -301
  188. package/src/scss/font/source-sans-pro/source-sans-pro-italic.eot +0 -0
  189. package/src/scss/font/source-sans-pro/source-sans-pro-italic.eot.b64 +0 -1
  190. package/src/scss/font/source-sans-pro/source-sans-pro-italic.woff +0 -0
  191. package/src/scss/font/source-sans-pro/source-sans-pro-italic.woff.b64 +0 -1
  192. package/src/scss/font/source-sans-pro/source-sans-pro-regular.eot +0 -0
  193. package/src/scss/font/source-sans-pro/source-sans-pro-regular.eot.b64 +0 -1
  194. package/src/scss/font/source-sans-pro/source-sans-pro-regular.woff +0 -0
  195. package/src/scss/font/source-sans-pro/source-sans-pro-regular.woff.b64 +0 -1
  196. package/src/scss/font/source-sans-pro/source-sans-pro-semibold-italic.eot +0 -0
  197. package/src/scss/font/source-sans-pro/source-sans-pro-semibold-italic.eot.b64 +0 -1
  198. package/src/scss/font/source-sans-pro/source-sans-pro-semibold-italic.woff +0 -0
  199. package/src/scss/font/source-sans-pro/source-sans-pro-semibold-italic.woff.b64 +0 -1
  200. package/src/scss/font/source-sans-pro/source-sans-pro-semibold.eot +0 -0
  201. package/src/scss/font/source-sans-pro/source-sans-pro-semibold.eot.b64 +0 -1
  202. package/src/scss/font/source-sans-pro/source-sans-pro-semibold.woff +0 -0
  203. package/src/scss/font/source-sans-pro/source-sans-pro-semibold.woff.b64 +0 -1
  204. package/src/scss/font/tao/tao.eot +0 -0
  205. package/src/scss/font/tao/tao.svg +0 -235
  206. package/src/scss/font/tao/tao.ttf +0 -0
  207. package/src/scss/font/tao/tao.woff +0 -0
  208. package/src/scss/inc/_base.scss +0 -496
  209. package/src/scss/inc/_bootstrap.scss +0 -6
  210. package/src/scss/inc/_buttons.scss +0 -114
  211. package/src/scss/inc/_colors.scss +0 -88
  212. package/src/scss/inc/_feedback.scss +0 -150
  213. package/src/scss/inc/_flex-grid.scss +0 -15
  214. package/src/scss/inc/_fonts.scss +0 -4
  215. package/src/scss/inc/_forms.scss +0 -827
  216. package/src/scss/inc/_functions.scss +0 -283
  217. package/src/scss/inc/_grid.scss +0 -66
  218. package/src/scss/inc/_jquery.nouislider.scss +0 -254
  219. package/src/scss/inc/_normalize.scss +0 -528
  220. package/src/scss/inc/_report.scss +0 -68
  221. package/src/scss/inc/_secondary-properties.scss +0 -89
  222. package/src/scss/inc/_select2.scss +0 -634
  223. package/src/scss/inc/_toolbars.scss +0 -155
  224. package/src/scss/inc/_tooltip.scss +0 -312
  225. package/src/scss/inc/_variables.scss +0 -21
  226. package/src/scss/inc/base/_highlight.scss +0 -5
  227. package/src/scss/inc/base/_list-style.scss +0 -59
  228. package/src/scss/inc/base/_svg.scss +0 -3
  229. package/src/scss/inc/base/_table.scss +0 -63
  230. package/src/scss/inc/fonts/_source-sans-pro.scss +0 -29
  231. package/src/scss/inc/fonts/_tao-icon-classes.scss +0 -226
  232. package/src/scss/inc/fonts/_tao-icon-def.scss +0 -12
  233. package/src/scss/inc/fonts/_tao-icon-vars.scss +0 -240
@@ -1,349 +1,331 @@
1
1
  define(['jquery', 'lodash', 'core/pluginifier', 'ui/resourcemgr/fileBrowser', 'ui/resourcemgr/filePreview', 'ui/resourcemgr/fileSelector', 'handlebars', 'i18n', 'lib/dompurify/purify', 'ui/modal', 'css!ui/resourcemgr/css/resourcemgr.css'], function ($$1, _, Pluginifier, fileBrowser, filePreview, fileSelector, Handlebars, __, DOMPurify, modal, resourcemgr_css) { 'use strict';
2
2
 
3
- $$1 = $$1 && Object.prototype.hasOwnProperty.call($$1, 'default') ? $$1['default'] : $$1;
4
- _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;
5
- Pluginifier = Pluginifier && Object.prototype.hasOwnProperty.call(Pluginifier, 'default') ? Pluginifier['default'] : Pluginifier;
6
- fileBrowser = fileBrowser && Object.prototype.hasOwnProperty.call(fileBrowser, 'default') ? fileBrowser['default'] : fileBrowser;
7
- filePreview = filePreview && Object.prototype.hasOwnProperty.call(filePreview, 'default') ? filePreview['default'] : filePreview;
8
- fileSelector = fileSelector && Object.prototype.hasOwnProperty.call(fileSelector, 'default') ? fileSelector['default'] : fileSelector;
9
- Handlebars = Handlebars && Object.prototype.hasOwnProperty.call(Handlebars, 'default') ? Handlebars['default'] : Handlebars;
10
- __ = __ && Object.prototype.hasOwnProperty.call(__, 'default') ? __['default'] : __;
11
- DOMPurify = DOMPurify && Object.prototype.hasOwnProperty.call(DOMPurify, 'default') ? DOMPurify['default'] : DOMPurify;
12
-
3
+ $$1 = $$1 && Object.prototype.hasOwnProperty.call($$1, 'default') ? $$1['default'] : $$1;
4
+ _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;
5
+ Pluginifier = Pluginifier && Object.prototype.hasOwnProperty.call(Pluginifier, 'default') ? Pluginifier['default'] : Pluginifier;
6
+ fileBrowser = fileBrowser && Object.prototype.hasOwnProperty.call(fileBrowser, 'default') ? fileBrowser['default'] : fileBrowser;
7
+ filePreview = filePreview && Object.prototype.hasOwnProperty.call(filePreview, 'default') ? filePreview['default'] : filePreview;
8
+ fileSelector = fileSelector && Object.prototype.hasOwnProperty.call(fileSelector, 'default') ? fileSelector['default'] : fileSelector;
9
+ Handlebars = Handlebars && Object.prototype.hasOwnProperty.call(Handlebars, 'default') ? Handlebars['default'] : Handlebars;
10
+ __ = __ && Object.prototype.hasOwnProperty.call(__, 'default') ? __['default'] : __;
11
+ DOMPurify = DOMPurify && Object.prototype.hasOwnProperty.call(DOMPurify, 'default') ? DOMPurify['default'] : DOMPurify;
12
+
13
+ function _typeof(obj) {
14
+ "@babel/helpers - typeof";
15
+
16
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
17
+ return typeof obj;
18
+ } : function (obj) {
19
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
20
+ }, _typeof(obj);
21
+ }
22
+
23
+ function Helpers0 (hb) {
24
+ //register a i18n helper
25
+ hb.registerHelper('__', function (key) {
26
+ return __(key);
27
+ });
13
28
  /**
14
- * This program is free software; you can redistribute it and/or
15
- * modify it under the terms of the GNU General Public License
16
- * as published by the Free Software Foundation; under version 2
17
- * of the License (non-upgradable).
18
- *
19
- * This program is distributed in the hope that it will be useful,
20
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
- * GNU General Public License for more details.
23
- *
24
- * You should have received a copy of the GNU General Public License
25
- * along with this program; if not, write to the Free Software
26
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27
- *
28
- * Copyright (c) 2013-2019 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);
29
- *
29
+ * Register dompurify helper
30
30
  *
31
+ * https://github.com/cure53/DOMPurify
32
+ * with config SAFE_FOR_TEMPLATES: true
33
+ * to make output safe for template systems
31
34
  */
32
- function Helpers0 (hb) {
33
- //register a i18n helper
34
- hb.registerHelper('__', function (key) {
35
- return __(key);
36
- });
37
- /**
38
- * Register dompurify helper
39
- *
40
- * https://github.com/cure53/DOMPurify
41
- * with config SAFE_FOR_TEMPLATES: true
42
- * to make output safe for template systems
43
- */
44
-
45
- hb.registerHelper('dompurify', function (context) {
46
- return DOMPurify.sanitize(context);
47
- });
48
- /**
49
- * Register join helper
50
- *
51
- * Example :
52
- * var values = {a:v1, b:v2, c:v3};
53
- * Using {{{join attributes '=' ' ' '"'}}} will return : a="v1" b="v2" c="v3"
54
- * Using {{{join values null ' or ' '*'}}} will return : *v1* or *v2* or *v3*
55
- */
56
-
57
- hb.registerHelper('join', function (arr, keyValueGlue, fragmentGlue, wrapper) {
58
- var fragments = [];
59
- keyValueGlue = typeof keyValueGlue === 'string' ? keyValueGlue : undefined;
60
- fragmentGlue = typeof fragmentGlue === 'string' ? fragmentGlue : ' ';
61
- wrapper = typeof wrapper === 'string' ? wrapper : '"';
62
-
63
- _.forIn(arr, function (value, key) {
64
- var fragment = '';
65
-
66
- if (value !== null || value !== undefined) {
67
- if (typeof value === 'boolean') {
68
- value = value ? 'true' : 'false';
69
- } else if (typeof value === 'object') {
70
- value = _.values(value).join(' ');
71
- }
72
- } else {
73
- value = '';
74
- }
75
35
 
76
- if (keyValueGlue !== undefined) {
77
- fragment += key + keyValueGlue;
78
- }
36
+ hb.registerHelper('dompurify', function (context) {
37
+ return DOMPurify.sanitize(context);
38
+ });
39
+ /**
40
+ * Register join helper
41
+ *
42
+ * Example :
43
+ * var values = {a:v1, b:v2, c:v3};
44
+ * Using {{{join attributes '=' ' ' '"'}}} will return : a="v1" b="v2" c="v3"
45
+ * Using {{{join values null ' or ' '*'}}} will return : *v1* or *v2* or *v3*
46
+ */
79
47
 
80
- fragment += wrapper + value + wrapper;
81
- fragments.push(fragment);
82
- });
48
+ hb.registerHelper('join', function (arr, keyValueGlue, fragmentGlue, wrapper) {
49
+ var fragments = [];
50
+ keyValueGlue = typeof keyValueGlue === 'string' ? keyValueGlue : undefined;
51
+ fragmentGlue = typeof fragmentGlue === 'string' ? fragmentGlue : ' ';
52
+ wrapper = typeof wrapper === 'string' ? wrapper : '"';
83
53
 
84
- return fragments.join(fragmentGlue);
85
- }); //register a classic "for loop" helper
86
- //it also adds a local variable "i" as the index in each iteration loop
54
+ _.forIn(arr, function (value, key) {
55
+ var fragment = '';
87
56
 
88
- hb.registerHelper('for', function (startIndex, stopIndex, increment, options) {
89
- var ret = '';
90
- startIndex = parseInt(startIndex);
91
- stopIndex = parseInt(stopIndex);
92
- increment = parseInt(increment);
57
+ if (value !== null || value !== undefined) {
58
+ if (typeof value === 'boolean') {
59
+ value = value ? 'true' : 'false';
60
+ } else if (_typeof(value) === 'object') {
61
+ value = _.values(value).join(' ');
62
+ }
63
+ } else {
64
+ value = '';
65
+ }
93
66
 
94
- for (var i = startIndex; i < stopIndex; i += increment) {
95
- ret += options.fn(_.extend({}, this, {
96
- i: i
97
- }));
67
+ if (keyValueGlue !== undefined) {
68
+ fragment += key + keyValueGlue;
98
69
  }
99
70
 
100
- return ret;
71
+ fragment += wrapper + value + wrapper;
72
+ fragments.push(fragment);
101
73
  });
102
- hb.registerHelper('equal', function (var1, var2, options) {
103
- if (var1 == var2) {
104
- return options.fn(this);
105
- } else {
106
- return options.inverse(this);
107
- }
108
- }); // register a "get property" helper
109
- // it gets the named property from the provided context
110
74
 
111
- hb.registerHelper('property', function (name, context) {
112
- return context[name] || '';
113
- }); // register an 'includes' helper
114
- // it checks if value is in array
75
+ return fragments.join(fragmentGlue);
76
+ }); //register a classic "for loop" helper
77
+ //it also adds a local variable "i" as the index in each iteration loop
115
78
 
116
- hb.registerHelper('includes', function (haystack, needle, options) {
117
- if (_.contains(haystack, needle)) {
118
- return options.fn(this);
119
- }
120
- });
121
- }
79
+ hb.registerHelper('for', function (startIndex, stopIndex, increment, options) {
80
+ var ret = '';
81
+ startIndex = parseInt(startIndex);
82
+ stopIndex = parseInt(stopIndex);
83
+ increment = parseInt(increment);
122
84
 
123
- if (!Helpers0.__initialized) {
124
- Helpers0(Handlebars);
125
- Helpers0.__initialized = true;
126
- }
127
- var Template = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
128
- this.compilerInfo = [4,'>= 1.0.0'];
129
- helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
130
- var buffer = "", stack1, helper, options, functionType="function", escapeExpression=this.escapeExpression, helperMissing=helpers.helperMissing;
131
-
132
-
133
- buffer += "<div class=\"resourcemgr modal\">\n\n <h2>";
134
- if (helper = helpers.title) { stack1 = helper.call(depth0, {hash:{},data:data}); }
135
- else { helper = (depth0 && depth0.title); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
136
- buffer += escapeExpression(stack1)
137
- + "</h2>\n\n <div class=\"file-wrapper\">\n\n <!-- left section: items selection -->\n <section class=\"file-browser\">\n <h1>"
138
- + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Browse resources", options) : helperMissing.call(depth0, "__", "Browse resources", options)))
139
- + "</h1>\n <div class=\"file-browser-wrapper\"></div>\n </section>\n\n <!-- test editor -->\n <section class=\"file-selector\">\n\n <h1>\n <div class=\"title lft\"></div>\n <div class=\"upload-switcher rgt\">\n <a href=\"#\" class=\"btn-info small upload hidden\"><span class=\"icon-add\"></span>"
140
- + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Add file(s)", options) : helperMissing.call(depth0, "__", "Add file(s)", options)))
141
- + "</a>\n <a href=\"#\" class=\"btn-info small listing\"><span class=\"icon-undo\"></span>"
142
- + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Back to listing", options) : helperMissing.call(depth0, "__", "Back to listing", options)))
143
- + "</a>\n </div>\n </h1>\n\n <div class=\"empty\">\n "
144
- + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "No files", options) : helperMissing.call(depth0, "__", "No files", options)))
145
- + "\n </div>\n\n <ul class=\"files\"></ul>\n\n <div class=\"file-upload-container\"></div>\n\n <div class=\"pagination-bottom\"></div>\n\n </section>\n\n <section class=\"file-preview\">\n\n <h1>"
146
- + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Preview", options) : helperMissing.call(depth0, "__", "Preview", options)))
147
- + "</h1>\n\n <div class=\"previewer\">\n <p class=\"nopreview\"></p>\n </div>\n\n <h2 class=\"toggler\" data-toggle=\"~ .file-properties\">"
148
- + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "File Properties", options) : helperMissing.call(depth0, "__", "File Properties", options)))
149
- + "</h2>\n\n <div class=\"file-properties\">\n\n <div class=\"grid-row\">\n <div class=\"col-2\">\n "
150
- + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Type", options) : helperMissing.call(depth0, "__", "Type", options)))
151
- + "\n </div>\n <div class=\"col-10 prop-type\"></div>\n </div>\n\n <div class=\"grid-row\">\n <div class=\"col-2\">\n "
152
- + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Size", options) : helperMissing.call(depth0, "__", "Size", options)))
153
- + "\n </div>\n <div class=\"col-10 prop-size\"></div>\n </div>\n\n <div class=\"grid-row prop-url\">\n <div class=\"actions\">\n <a href=\"#\" download=\"\" target=\"_blank\" class=\"tlb-button-off download hidden\" title=\""
154
- + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Download this file", options) : helperMissing.call(depth0, "__", "Download this file", options)))
155
- + "\">\n <button class=\"btn-info small\">\n <span class=\"icon-download\"></span>"
156
- + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Download this file", options) : helperMissing.call(depth0, "__", "Download this file", options)))
157
- + "\n </button>\n </a>\n </div>\n </div>\n </div>\n\n <h2 class=\"toggler\" data-toggle=\"~ .actions\">"
158
- + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Actions", options) : helperMissing.call(depth0, "__", "Actions", options)))
159
- + "</h2>\n\n <div class=\"actions\">\n <button class=\"btn-success select-action small\" disabled>\n <span class=\"icon-move-item\"></span>"
160
- + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Select", options) : helperMissing.call(depth0, "__", "Select", options)))
161
- + "\n </button>\n </div>\n\n </section>\n\n </div>\n</div>\n";
162
- return buffer;
163
- });
164
- function layout(data, options, asString) {
165
- var html = Template(data, options);
166
- return (asString || true) ? html : $(html);
167
- }
85
+ for (var i = startIndex; i < stopIndex; i += increment) {
86
+ ret += options.fn(_.extend({}, this, {
87
+ i: i
88
+ }));
89
+ }
90
+
91
+ return ret;
92
+ });
93
+ hb.registerHelper('equal', function (var1, var2, options) {
94
+ if (var1 == var2) {
95
+ return options.fn(this);
96
+ } else {
97
+ return options.inverse(this);
98
+ }
99
+ }); // register a "get property" helper
100
+ // it gets the named property from the provided context
101
+
102
+ hb.registerHelper('property', function (name, context) {
103
+ return context[name] || '';
104
+ }); // register an 'includes' helper
105
+ // it checks if value is in array
168
106
 
169
- var ns = 'resourcemgr';
170
- var dataNs = 'ui.' + ns;
171
- var defaults = {
172
- mediaSources: [{
173
- root: 'local',
174
- path: '/'
175
- }],
176
- open: true,
177
- appendContainer: '.tao-scope:first',
178
- title: ''
179
- };
107
+ hb.registerHelper('includes', function (haystack, needle, options) {
108
+ if (_.contains(haystack, needle)) {
109
+ return options.fn(this);
110
+ }
111
+ });
112
+ }
113
+
114
+ if (!Helpers0.__initialized) {
115
+ Helpers0(Handlebars);
116
+ Helpers0.__initialized = true;
117
+ }
118
+ var Template = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
119
+ this.compilerInfo = [4,'>= 1.0.0'];
120
+ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
121
+ var buffer = "", stack1, helper, options, functionType="function", escapeExpression=this.escapeExpression, helperMissing=helpers.helperMissing;
122
+
123
+
124
+ buffer += "<div class=\"resourcemgr modal\">\n\n <h2>";
125
+ if (helper = helpers.title) { stack1 = helper.call(depth0, {hash:{},data:data}); }
126
+ else { helper = (depth0 && depth0.title); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
127
+ buffer += escapeExpression(stack1)
128
+ + "</h2>\n\n <div class=\"file-wrapper\">\n\n <!-- left section: items selection -->\n <section class=\"file-browser\">\n <h1>"
129
+ + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Browse resources", options) : helperMissing.call(depth0, "__", "Browse resources", options)))
130
+ + "</h1>\n <div class=\"file-browser-wrapper\"></div>\n </section>\n\n <!-- test editor -->\n <section class=\"file-selector\">\n\n <h1>\n <div class=\"title lft\"></div>\n <div class=\"upload-switcher rgt\">\n <a href=\"#\" class=\"btn-info small upload hidden\"><span class=\"icon-add\"></span>"
131
+ + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Add file(s)", options) : helperMissing.call(depth0, "__", "Add file(s)", options)))
132
+ + "</a>\n <a href=\"#\" class=\"btn-info small listing\"><span class=\"icon-undo\"></span>"
133
+ + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Back to listing", options) : helperMissing.call(depth0, "__", "Back to listing", options)))
134
+ + "</a>\n </div>\n </h1>\n\n <div class=\"empty\">\n "
135
+ + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "No files", options) : helperMissing.call(depth0, "__", "No files", options)))
136
+ + "\n </div>\n\n <ul class=\"files\"></ul>\n\n <div class=\"file-upload-container\"></div>\n\n <div class=\"pagination-bottom\"></div>\n\n </section>\n\n <section class=\"file-preview\">\n\n <h1>"
137
+ + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Preview", options) : helperMissing.call(depth0, "__", "Preview", options)))
138
+ + "</h1>\n\n <div class=\"previewer\">\n <p class=\"nopreview\"></p>\n </div>\n\n <h2 class=\"toggler\" data-toggle=\"~ .file-properties\">"
139
+ + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "File Properties", options) : helperMissing.call(depth0, "__", "File Properties", options)))
140
+ + "</h2>\n\n <div class=\"file-properties\">\n\n <div class=\"grid-row\">\n <div class=\"col-2\">\n "
141
+ + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Type", options) : helperMissing.call(depth0, "__", "Type", options)))
142
+ + "\n </div>\n <div class=\"col-10 prop-type\"></div>\n </div>\n\n <div class=\"grid-row\">\n <div class=\"col-2\">\n "
143
+ + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Size", options) : helperMissing.call(depth0, "__", "Size", options)))
144
+ + "\n </div>\n <div class=\"col-10 prop-size\"></div>\n </div>\n\n <div class=\"grid-row prop-url\">\n <div class=\"actions\">\n <a href=\"#\" download=\"\" target=\"_blank\" class=\"tlb-button-off download hidden\" title=\""
145
+ + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Download this file", options) : helperMissing.call(depth0, "__", "Download this file", options)))
146
+ + "\">\n <button class=\"btn-info small\">\n <span class=\"icon-download\"></span>"
147
+ + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Download this file", options) : helperMissing.call(depth0, "__", "Download this file", options)))
148
+ + "\n </button>\n </a>\n </div>\n </div>\n </div>\n\n <h2 class=\"toggler\" data-toggle=\"~ .actions\">"
149
+ + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Actions", options) : helperMissing.call(depth0, "__", "Actions", options)))
150
+ + "</h2>\n\n <div class=\"actions\">\n <button class=\"btn-success select-action small\" disabled>\n <span class=\"icon-move-item\"></span>"
151
+ + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Select", options) : helperMissing.call(depth0, "__", "Select", options)))
152
+ + "\n </button>\n </div>\n\n </section>\n\n </div>\n</div>\n";
153
+ return buffer;
154
+ });
155
+ function layout(data, options, asString) {
156
+ var html = Template(data, options);
157
+ return (asString || true) ? html : $(html);
158
+ }
159
+
160
+ var ns = 'resourcemgr';
161
+ var dataNs = 'ui.' + ns;
162
+ var defaults = {
163
+ mediaSources: [{
164
+ root: 'local',
165
+ path: '/'
166
+ }],
167
+ open: true,
168
+ appendContainer: '.tao-scope:first',
169
+ title: ''
170
+ };
171
+ /**
172
+ * The ResourceMgr component helps you to browse and select external resources.
173
+ * @exports ui/resourcemgr
174
+ */
175
+
176
+ var resourceMgr = {
180
177
  /**
181
- * The ResourceMgr component helps you to browse and select external resources.
182
- * @exports ui/resourcemgr
178
+ * Initialize the plugin.
179
+ *
180
+ * Called the jQuery way once registered by the Pluginifier.
181
+ * @example $('selector').resourcemgr({
182
+ *
183
+ * });
184
+ *
185
+ * @constructor
186
+ * @param {Object} options - the plugin options
187
+ * @param {Sring|Boolean} [options.bindEvent = 'click'] - the event that trigger the toggling
188
+ * @param {String} options.url - the URL of the service used to retrieve the resources.
189
+ * @fires ResourceMgr#create.resourcemgr
190
+ * @returns {jQueryElement} for chaining
183
191
  */
192
+ init: function init(options) {
193
+ var self = resourceMgr; //get options using default
184
194
 
185
- var resourceMgr = {
186
- /**
187
- * Initialize the plugin.
188
- *
189
- * Called the jQuery way once registered by the Pluginifier.
190
- * @example $('selector').resourcemgr({
191
- *
192
- * });
193
- *
194
- * @constructor
195
- * @param {Object} options - the plugin options
196
- * @param {Sring|Boolean} [options.bindEvent = 'click'] - the event that trigger the toggling
197
- * @param {String} options.url - the URL of the service used to retrieve the resources.
198
- * @fires ResourceMgr#create.resourcemgr
199
- * @returns {jQueryElement} for chaining
200
- */
201
- init: function (options) {
202
- var self = resourceMgr; //get options using default
203
-
204
- options = _.defaults(options, defaults);
205
- return this.each(function () {
206
- var $elt = $$1(this);
207
- var $target;
208
-
209
- if (!$elt.data(dataNs)) {
210
- //add data to the element
211
- $elt.data(dataNs, options); //auto bind events configured in options
212
-
213
- _.functions(options).forEach(function (eventName) {
214
- $elt.on(eventName + '.' + ns, function () {
215
- options[eventName].apply($elt, arguments);
216
- });
217
- });
218
-
219
- $target = options.$target || self._createTarget($elt);
220
- $target.modal({
221
- startClosed: true,
222
- minWidth: 'responsive'
223
- }); //rethrow some events
195
+ options = _.defaults(options, defaults);
196
+ return this.each(function () {
197
+ var $elt = $$1(this);
198
+ var $target;
224
199
 
225
- $target.on('select.' + ns, function (e, files) {
226
- self._close($elt);
200
+ if (!$elt.data(dataNs)) {
201
+ //add data to the element
202
+ $elt.data(dataNs, options); //auto bind events configured in options
227
203
 
228
- $elt.trigger(e, [files]);
204
+ _.functions(options).forEach(function (eventName) {
205
+ $elt.on(eventName + '.' + ns, function () {
206
+ options[eventName].apply($elt, arguments);
229
207
  });
230
- $target.on('closed.modal', function () {
231
- $elt.trigger('close.' + ns);
232
- }); //initialize the components
233
-
234
- var $fileBrowser = $$1('.file-browser .file-browser-wrapper', $target);
235
-
236
- if (options.mediaSourcesUrl) {
237
- $$1.getJSON(options.mediaSourcesUrl).done(function (data) {
238
- var mediaSources = data || defaults.mediaSources;
239
-
240
- for (var i = 0; i < mediaSources.length; i++) {
241
- options.root = mediaSources[i].root;
242
- options.path = mediaSources[i].path;
243
- $fileBrowser.append('<div class="' + options.root + '"><ul class="folders"></ul></div>');
244
- fileBrowser(options);
245
- }
246
- }).fail(function () {
247
- for (var i = 0; i < defaults.mediaSources.length; i++) {
248
- options.root = defaults.mediaSources[i].root;
249
- options.path = defaults.mediaSources[i].path;
250
- $fileBrowser.append('<div class="' + options.root + '"><ul class="folders"></ul></div>');
251
- fileBrowser(options);
252
- }
253
- });
254
- } else if (options.path && options.root) {
255
- $fileBrowser.append('<div class="' + options.root + '"><ul class="folders"></ul></div>');
256
- fileBrowser(options);
257
- }
258
-
259
- $fileBrowser.find('li.root:last').addClass('active');
260
- fileSelector(options);
261
- filePreview(options);
262
- /**
263
- * The plugin have been created.
264
- * @event ResourceMgr#create.resourcemgr
265
- */
208
+ });
209
+
210
+ $target = options.$target || self._createTarget($elt);
211
+ $target.modal({
212
+ startClosed: true,
213
+ minWidth: 'responsive'
214
+ }); //rethrow some events
215
+
216
+ $target.on('select.' + ns, function (e, files) {
217
+ self._close($elt);
218
+
219
+ $elt.trigger(e, [files]);
220
+ });
221
+ $target.on('closed.modal', function () {
222
+ $elt.trigger('close.' + ns);
223
+ }); //initialize the components
224
+
225
+ var $fileBrowser = $$1('.file-browser .file-browser-wrapper', $target);
226
+
227
+ if (options.mediaSourcesUrl) {
228
+ $$1.getJSON(options.mediaSourcesUrl).done(function (data) {
229
+ var mediaSources = data || defaults.mediaSources;
230
+
231
+ for (var i = 0; i < mediaSources.length; i++) {
232
+ options.root = mediaSources[i].root;
233
+ options.path = mediaSources[i].path;
234
+ $fileBrowser.append('<div class="' + options.root + '"><ul class="folders"></ul></div>');
235
+ fileBrowser(options);
236
+ }
237
+ }).fail(function () {
238
+ for (var i = 0; i < defaults.mediaSources.length; i++) {
239
+ options.root = defaults.mediaSources[i].root;
240
+ options.path = defaults.mediaSources[i].path;
241
+ $fileBrowser.append('<div class="' + options.root + '"><ul class="folders"></ul></div>');
242
+ fileBrowser(options);
243
+ }
244
+ });
245
+ } else if (options.path && options.root) {
246
+ $fileBrowser.append('<div class="' + options.root + '"><ul class="folders"></ul></div>');
247
+ fileBrowser(options);
248
+ }
266
249
 
267
- $elt.trigger('create.' + ns, [$target[0]]);
250
+ $fileBrowser.find('li.root:last').addClass('active');
251
+ fileSelector(options);
252
+ filePreview(options);
253
+ /**
254
+ * The plugin have been created.
255
+ * @event ResourceMgr#create.resourcemgr
256
+ */
268
257
 
269
- if (options.open) {
270
- self._open($elt);
271
- }
272
- } else {
273
- options = $elt.data(dataNs);
258
+ $elt.trigger('create.' + ns, [$target[0]]);
274
259
 
275
- if (options.open) {
276
- self._open($elt);
277
- }
260
+ if (options.open) {
261
+ self._open($elt);
278
262
  }
279
- });
280
- },
281
- _createTarget: function ($elt) {
282
- var options = $elt.data(dataNs);
283
-
284
- if (options) {
285
- //create an identifier to the target content
286
- options.targetId = 'resourcemgr-' + $$1(document).find('.resourcemgr').length; //generate
263
+ } else {
264
+ options = $elt.data(dataNs);
287
265
 
288
- options.$target = $$1(layout({
289
- title: options.title || ''
290
- }));
291
- options.$target.attr('id', options.targetId).css('display', 'none').appendTo(options.appendContainer);
292
- $elt.data(dataNs, options);
266
+ if (options.open) {
267
+ self._open($elt);
268
+ }
293
269
  }
270
+ });
271
+ },
272
+ _createTarget: function _createTarget($elt) {
273
+ var options = $elt.data(dataNs);
274
+
275
+ if (options) {
276
+ //create an identifier to the target content
277
+ options.targetId = 'resourcemgr-' + $$1(document).find('.resourcemgr').length; //generate
278
+
279
+ options.$target = $$1(layout({
280
+ title: options.title || ''
281
+ }));
282
+ options.$target.attr('id', options.targetId).css('display', 'none').appendTo(options.appendContainer);
283
+ $elt.data(dataNs, options);
284
+ }
294
285
 
295
- return options.$target;
296
- },
297
- _open: function ($elt) {
298
- var options = $elt.data(dataNs);
286
+ return options.$target;
287
+ },
288
+ _open: function _open($elt) {
289
+ var options = $elt.data(dataNs);
299
290
 
300
- if (options && options.$target) {
301
- options.$target.modal('open');
302
- /**
303
- * Open the resource manager.
304
- * @event ResourceMgr#open.resourcemgr
305
- */
291
+ if (options && options.$target) {
292
+ options.$target.modal('open');
293
+ /**
294
+ * Open the resource manager.
295
+ * @event ResourceMgr#open.resourcemgr
296
+ */
306
297
 
307
- $elt.trigger('open.' + ns);
308
- }
309
- },
310
- _close: function ($elt) {
298
+ $elt.trigger('open.' + ns);
299
+ }
300
+ },
301
+ _close: function _close($elt) {
302
+ var options = $elt.data(dataNs);
303
+
304
+ if (options && options.$target) {
305
+ options.$target.modal('close');
306
+ }
307
+ },
308
+
309
+ /**
310
+ * Destroy completely the plugin.
311
+ *
312
+ * Called the jQuery way once registered by the Pluginifier.
313
+ * @example $('selector').resourcemgr('destroy');
314
+ * @public
315
+ */
316
+ destroy: function destroy() {
317
+ this.each(function () {
318
+ var $elt = $$1(this);
311
319
  var options = $elt.data(dataNs);
320
+ $elt.data(dataNs, null);
312
321
 
313
- if (options && options.$target) {
314
- options.$target.modal('close');
322
+ if (options.bindEvent !== undefined && options.bindEvent !== false) {
323
+ $elt.off(options.bindEvent);
315
324
  }
316
- },
317
-
318
- /**
319
- * Destroy completely the plugin.
320
- *
321
- * Called the jQuery way once registered by the Pluginifier.
322
- * @example $('selector').resourcemgr('destroy');
323
- * @public
324
- */
325
- destroy: function () {
326
- this.each(function () {
327
- var $elt = $$1(this);
328
- var options = $elt.data(dataNs);
329
- $elt.data(dataNs, null);
330
-
331
- if (options.bindEvent !== undefined && options.bindEvent !== false) {
332
- $elt.off(options.bindEvent);
333
- }
334
325
 
335
- if (options.targetId) {
336
- options.$target.on('closed.modal', function () {
337
- $$1('#' + options.targetId).remove();
338
- $$1(window).off('resize.resourcemgr');
339
- /**
340
- * The plugin have been destroyed.
341
- * @event ResourceMgr#destroy.resourcemgr
342
- */
343
-
344
- $elt.trigger('destroy.' + ns);
345
- }).modal('close');
346
- } else {
326
+ if (options.targetId) {
327
+ options.$target.on('closed.modal', function () {
328
+ $$1('#' + options.targetId).remove();
347
329
  $$1(window).off('resize.resourcemgr');
348
330
  /**
349
331
  * The plugin have been destroyed.
@@ -351,11 +333,20 @@ define(['jquery', 'lodash', 'core/pluginifier', 'ui/resourcemgr/fileBrowser', 'u
351
333
  */
352
334
 
353
335
  $elt.trigger('destroy.' + ns);
354
- }
355
- });
356
- }
357
- }; //Register the resourcemgr to behave as a jQuery plugin.
336
+ }).modal('close');
337
+ } else {
338
+ $$1(window).off('resize.resourcemgr');
339
+ /**
340
+ * The plugin have been destroyed.
341
+ * @event ResourceMgr#destroy.resourcemgr
342
+ */
343
+
344
+ $elt.trigger('destroy.' + ns);
345
+ }
346
+ });
347
+ }
348
+ }; //Register the resourcemgr to behave as a jQuery plugin.
358
349
 
359
- Pluginifier.register(ns, resourceMgr);
350
+ Pluginifier.register(ns, resourceMgr);
360
351
 
361
352
  });