@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,547 +1,542 @@
1
1
  define(['jquery', 'lodash', 'i18n', 'handlebars', 'lib/dompurify/purify', 'ui/component', 'ui/keyNavigation/navigator', 'ui/keyNavigation/navigableDomElement', 'util/shortcut/registry', 'util/shortcut', 'util/namespace', 'ui/modal', 'select2', 'css!ui/bulkActionPopup/css/bulkActionPopup.css'], function ($$1, _, __, Handlebars, DOMPurify, component, keyNavigator, navigableDomElement, shortcutRegistry, globalShortcut, namespaceHelper, modal, select2, bulkActionPopup_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
- __ = __ && Object.prototype.hasOwnProperty.call(__, 'default') ? __['default'] : __;
6
- Handlebars = Handlebars && Object.prototype.hasOwnProperty.call(Handlebars, 'default') ? Handlebars['default'] : Handlebars;
7
- DOMPurify = DOMPurify && Object.prototype.hasOwnProperty.call(DOMPurify, 'default') ? DOMPurify['default'] : DOMPurify;
8
- component = component && Object.prototype.hasOwnProperty.call(component, 'default') ? component['default'] : component;
9
- keyNavigator = keyNavigator && Object.prototype.hasOwnProperty.call(keyNavigator, 'default') ? keyNavigator['default'] : keyNavigator;
10
- navigableDomElement = navigableDomElement && Object.prototype.hasOwnProperty.call(navigableDomElement, 'default') ? navigableDomElement['default'] : navigableDomElement;
11
- shortcutRegistry = shortcutRegistry && Object.prototype.hasOwnProperty.call(shortcutRegistry, 'default') ? shortcutRegistry['default'] : shortcutRegistry;
12
- globalShortcut = globalShortcut && Object.prototype.hasOwnProperty.call(globalShortcut, 'default') ? globalShortcut['default'] : globalShortcut;
13
- namespaceHelper = namespaceHelper && Object.prototype.hasOwnProperty.call(namespaceHelper, 'default') ? namespaceHelper['default'] : namespaceHelper;
14
-
3
+ $$1 = $$1 && Object.prototype.hasOwnProperty.call($$1, 'default') ? $$1['default'] : $$1;
4
+ _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;
5
+ __ = __ && Object.prototype.hasOwnProperty.call(__, 'default') ? __['default'] : __;
6
+ Handlebars = Handlebars && Object.prototype.hasOwnProperty.call(Handlebars, 'default') ? Handlebars['default'] : Handlebars;
7
+ DOMPurify = DOMPurify && Object.prototype.hasOwnProperty.call(DOMPurify, 'default') ? DOMPurify['default'] : DOMPurify;
8
+ component = component && Object.prototype.hasOwnProperty.call(component, 'default') ? component['default'] : component;
9
+ keyNavigator = keyNavigator && Object.prototype.hasOwnProperty.call(keyNavigator, 'default') ? keyNavigator['default'] : keyNavigator;
10
+ navigableDomElement = navigableDomElement && Object.prototype.hasOwnProperty.call(navigableDomElement, 'default') ? navigableDomElement['default'] : navigableDomElement;
11
+ shortcutRegistry = shortcutRegistry && Object.prototype.hasOwnProperty.call(shortcutRegistry, 'default') ? shortcutRegistry['default'] : shortcutRegistry;
12
+ globalShortcut = globalShortcut && Object.prototype.hasOwnProperty.call(globalShortcut, 'default') ? globalShortcut['default'] : globalShortcut;
13
+ namespaceHelper = namespaceHelper && Object.prototype.hasOwnProperty.call(namespaceHelper, 'default') ? namespaceHelper['default'] : namespaceHelper;
14
+
15
+ function _typeof(obj) {
16
+ "@babel/helpers - typeof";
17
+
18
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
19
+ return typeof obj;
20
+ } : function (obj) {
21
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
22
+ }, _typeof(obj);
23
+ }
24
+
25
+ function Helpers0 (hb) {
26
+ //register a i18n helper
27
+ hb.registerHelper('__', function (key) {
28
+ return __(key);
29
+ });
15
30
  /**
16
- * This program is free software; you can redistribute it and/or
17
- * modify it under the terms of the GNU General Public License
18
- * as published by the Free Software Foundation; under version 2
19
- * of the License (non-upgradable).
20
- *
21
- * This program is distributed in the hope that it will be useful,
22
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
23
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24
- * GNU General Public License for more details.
25
- *
26
- * You should have received a copy of the GNU General Public License
27
- * along with this program; if not, write to the Free Software
28
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
29
- *
30
- * Copyright (c) 2013-2019 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);
31
+ * Register dompurify helper
31
32
  *
33
+ * https://github.com/cure53/DOMPurify
34
+ * with config SAFE_FOR_TEMPLATES: true
35
+ * to make output safe for template systems
36
+ */
37
+
38
+ hb.registerHelper('dompurify', function (context) {
39
+ return DOMPurify.sanitize(context);
40
+ });
41
+ /**
42
+ * Register join helper
32
43
  *
44
+ * Example :
45
+ * var values = {a:v1, b:v2, c:v3};
46
+ * Using {{{join attributes '=' ' ' '"'}}} will return : a="v1" b="v2" c="v3"
47
+ * Using {{{join values null ' or ' '*'}}} will return : *v1* or *v2* or *v3*
33
48
  */
34
- function Helpers0 (hb) {
35
- //register a i18n helper
36
- hb.registerHelper('__', function (key) {
37
- return __(key);
38
- });
39
- /**
40
- * Register dompurify helper
41
- *
42
- * https://github.com/cure53/DOMPurify
43
- * with config SAFE_FOR_TEMPLATES: true
44
- * to make output safe for template systems
45
- */
46
49
 
47
- hb.registerHelper('dompurify', function (context) {
48
- return DOMPurify.sanitize(context);
49
- });
50
- /**
51
- * Register join helper
52
- *
53
- * Example :
54
- * var values = {a:v1, b:v2, c:v3};
55
- * Using {{{join attributes '=' ' ' '"'}}} will return : a="v1" b="v2" c="v3"
56
- * Using {{{join values null ' or ' '*'}}} will return : *v1* or *v2* or *v3*
57
- */
50
+ hb.registerHelper('join', function (arr, keyValueGlue, fragmentGlue, wrapper) {
51
+ var fragments = [];
52
+ keyValueGlue = typeof keyValueGlue === 'string' ? keyValueGlue : undefined;
53
+ fragmentGlue = typeof fragmentGlue === 'string' ? fragmentGlue : ' ';
54
+ wrapper = typeof wrapper === 'string' ? wrapper : '"';
58
55
 
59
- hb.registerHelper('join', function (arr, keyValueGlue, fragmentGlue, wrapper) {
60
- var fragments = [];
61
- keyValueGlue = typeof keyValueGlue === 'string' ? keyValueGlue : undefined;
62
- fragmentGlue = typeof fragmentGlue === 'string' ? fragmentGlue : ' ';
63
- wrapper = typeof wrapper === 'string' ? wrapper : '"';
64
-
65
- _.forIn(arr, function (value, key) {
66
- var fragment = '';
67
-
68
- if (value !== null || value !== undefined) {
69
- if (typeof value === 'boolean') {
70
- value = value ? 'true' : 'false';
71
- } else if (typeof value === 'object') {
72
- value = _.values(value).join(' ');
73
- }
74
- } else {
75
- value = '';
76
- }
56
+ _.forIn(arr, function (value, key) {
57
+ var fragment = '';
77
58
 
78
- if (keyValueGlue !== undefined) {
79
- fragment += key + keyValueGlue;
59
+ if (value !== null || value !== undefined) {
60
+ if (typeof value === 'boolean') {
61
+ value = value ? 'true' : 'false';
62
+ } else if (_typeof(value) === 'object') {
63
+ value = _.values(value).join(' ');
80
64
  }
65
+ } else {
66
+ value = '';
67
+ }
81
68
 
82
- fragment += wrapper + value + wrapper;
83
- fragments.push(fragment);
84
- });
85
-
86
- return fragments.join(fragmentGlue);
87
- }); //register a classic "for loop" helper
88
- //it also adds a local variable "i" as the index in each iteration loop
89
-
90
- hb.registerHelper('for', function (startIndex, stopIndex, increment, options) {
91
- var ret = '';
92
- startIndex = parseInt(startIndex);
93
- stopIndex = parseInt(stopIndex);
94
- increment = parseInt(increment);
95
-
96
- for (var i = startIndex; i < stopIndex; i += increment) {
97
- ret += options.fn(_.extend({}, this, {
98
- i: i
99
- }));
69
+ if (keyValueGlue !== undefined) {
70
+ fragment += key + keyValueGlue;
100
71
  }
101
72
 
102
- return ret;
73
+ fragment += wrapper + value + wrapper;
74
+ fragments.push(fragment);
103
75
  });
104
- hb.registerHelper('equal', function (var1, var2, options) {
105
- if (var1 == var2) {
106
- return options.fn(this);
107
- } else {
108
- return options.inverse(this);
109
- }
110
- }); // register a "get property" helper
111
- // it gets the named property from the provided context
112
76
 
113
- hb.registerHelper('property', function (name, context) {
114
- return context[name] || '';
115
- }); // register an 'includes' helper
116
- // it checks if value is in array
77
+ return fragments.join(fragmentGlue);
78
+ }); //register a classic "for loop" helper
79
+ //it also adds a local variable "i" as the index in each iteration loop
117
80
 
118
- hb.registerHelper('includes', function (haystack, needle, options) {
119
- if (_.contains(haystack, needle)) {
120
- return options.fn(this);
121
- }
122
- });
123
- }
81
+ hb.registerHelper('for', function (startIndex, stopIndex, increment, options) {
82
+ var ret = '';
83
+ startIndex = parseInt(startIndex);
84
+ stopIndex = parseInt(stopIndex);
85
+ increment = parseInt(increment);
124
86
 
125
- if (!Helpers0.__initialized) {
126
- Helpers0(Handlebars);
127
- Helpers0.__initialized = true;
128
- }
129
- var Template = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
130
- this.compilerInfo = [4,'>= 1.0.0'];
131
- helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
132
- var buffer = "", stack1, helper, options, functionType="function", escapeExpression=this.escapeExpression, helperMissing=helpers.helperMissing, self=this;
133
-
134
- function program1(depth0,data) {
135
-
136
- var buffer = "", stack1;
137
- buffer += "\n ";
138
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.single), {hash:{},inverse:self.program(4, program4, data),fn:self.program(2, program2, data),data:data});
139
- if(stack1 || stack1 === 0) { buffer += stack1; }
140
- buffer += "\n ";
141
- return buffer;
142
- }
143
- function program2(depth0,data) {
144
-
145
- var buffer = "", stack1, helper, options;
146
- buffer += "\n <div class=\"single\" data-resource=\""
147
- + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.allowedResources)),stack1 == null || stack1 === false ? stack1 : stack1[0])),stack1 == null || stack1 === false ? stack1 : stack1.id)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
148
- + "\">\n <p>\n "
149
- + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "The action will be applied to", options) : helperMissing.call(depth0, "__", "The action will be applied to", options)))
150
- + " ";
151
- if (helper = helpers.resourceType) { stack1 = helper.call(depth0, {hash:{},data:data}); }
152
- else { helper = (depth0 && depth0.resourceType); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
153
- buffer += escapeExpression(stack1)
154
- + " <span class=\"resource-label\">"
155
- + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.allowedResources)),stack1 == null || stack1 === false ? stack1 : stack1[0])),stack1 == null || stack1 === false ? stack1 : stack1.label)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
156
- + "</span>\n </p>\n </div>\n ";
157
- return buffer;
87
+ for (var i = startIndex; i < stopIndex; i += increment) {
88
+ ret += options.fn(_.extend({}, this, {
89
+ i: i
90
+ }));
158
91
  }
159
92
 
160
- function program4(depth0,data) {
161
-
162
- var buffer = "", stack1, helper, options;
163
- buffer += "\n <div class=\"multiple\">\n <p>\n "
164
- + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "The action will be applied to the following", options) : helperMissing.call(depth0, "__", "The action will be applied to the following", options)))
165
- + " <span class=\"resource-count\">";
166
- if (helper = helpers.resourceCount) { stack1 = helper.call(depth0, {hash:{},data:data}); }
167
- else { helper = (depth0 && depth0.resourceCount); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
168
- buffer += escapeExpression(stack1)
169
- + "</span> ";
170
- if (helper = helpers.resourceTypes) { stack1 = helper.call(depth0, {hash:{},data:data}); }
171
- else { helper = (depth0 && depth0.resourceTypes); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
172
- buffer += escapeExpression(stack1)
173
- + ":\n </p>\n <ul class=\"plain applicables\">\n ";
174
- stack1 = helpers.each.call(depth0, (depth0 && depth0.allowedResources), {hash:{},inverse:self.noop,fn:self.program(5, program5, data),data:data});
175
- if(stack1 || stack1 === 0) { buffer += stack1; }
176
- buffer += "\n </ul>\n </div>\n ";
177
- return buffer;
178
- }
179
- function program5(depth0,data) {
180
-
181
- var buffer = "", stack1, helper;
182
- buffer += "\n <li data-resource=\"";
183
- if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
184
- else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
185
- buffer += escapeExpression(stack1)
186
- + "\">\n <span class=\"resource-label\">";
187
- if (helper = helpers.label) { stack1 = helper.call(depth0, {hash:{},data:data}); }
188
- else { helper = (depth0 && depth0.label); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
189
- buffer += escapeExpression(stack1)
190
- + "</span>\n </li>\n ";
191
- return buffer;
93
+ return ret;
94
+ });
95
+ hb.registerHelper('equal', function (var1, var2, options) {
96
+ if (var1 == var2) {
97
+ return options.fn(this);
98
+ } else {
99
+ return options.inverse(this);
192
100
  }
101
+ }); // register a "get property" helper
102
+ // it gets the named property from the provided context
193
103
 
194
- function program7(depth0,data) {
195
-
196
- var buffer = "", stack1;
197
- buffer += "\n ";
198
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.singleDenied), {hash:{},inverse:self.program(10, program10, data),fn:self.program(8, program8, data),data:data});
199
- if(stack1 || stack1 === 0) { buffer += stack1; }
200
- buffer += "\n ";
201
- return buffer;
202
- }
203
- function program8(depth0,data) {
204
-
205
- var buffer = "", stack1, helper, options;
206
- buffer += "\n <div class=\"single\" data-resource=\""
207
- + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.deniedResources)),stack1 == null || stack1 === false ? stack1 : stack1[0])),stack1 == null || stack1 === false ? stack1 : stack1.id)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
208
- + "\">\n <p>\n "
209
- + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "The action will not be applied to ", options) : helperMissing.call(depth0, "__", "The action will not be applied to ", options)))
210
- + " ";
211
- if (helper = helpers.resourceType) { stack1 = helper.call(depth0, {hash:{},data:data}); }
212
- else { helper = (depth0 && depth0.resourceType); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
213
- buffer += escapeExpression(stack1)
214
- + "\n <span class=\"resource-label\">"
215
- + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.deniedResources)),stack1 == null || stack1 === false ? stack1 : stack1[0])),stack1 == null || stack1 === false ? stack1 : stack1.label)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
216
- + "</span>\n <span class=\"reason\">("
217
- + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.deniedResources)),stack1 == null || stack1 === false ? stack1 : stack1[0])),stack1 == null || stack1 === false ? stack1 : stack1.reason)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
218
- + ")</span>\n </p>\n </div>\n ";
219
- return buffer;
220
- }
104
+ hb.registerHelper('property', function (name, context) {
105
+ return context[name] || '';
106
+ }); // register an 'includes' helper
107
+ // it checks if value is in array
221
108
 
222
- function program10(depth0,data) {
223
-
224
- var buffer = "", stack1, helper, options;
225
- buffer += "\n <p>\n "
226
- + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "The action will not be applied to the following", options) : helperMissing.call(depth0, "__", "The action will not be applied to the following", options)))
227
- + " ";
228
- if (helper = helpers.resourceTypes) { stack1 = helper.call(depth0, {hash:{},data:data}); }
229
- else { helper = (depth0 && depth0.resourceTypes); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
230
- buffer += escapeExpression(stack1)
231
- + ":\n </p>\n <ul class=\"plain no-applicables\">\n ";
232
- stack1 = helpers.each.call(depth0, (depth0 && depth0.deniedResources), {hash:{},inverse:self.noop,fn:self.program(11, program11, data),data:data});
233
- if(stack1 || stack1 === 0) { buffer += stack1; }
234
- buffer += "\n </ul>\n ";
235
- return buffer;
236
- }
237
- function program11(depth0,data) {
238
-
239
- var buffer = "", stack1, helper;
240
- buffer += "\n <li data-resource=\"";
241
- if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
242
- else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
243
- buffer += escapeExpression(stack1)
244
- + "\">\n <span class=\"resource-label\">";
245
- if (helper = helpers.label) { stack1 = helper.call(depth0, {hash:{},data:data}); }
246
- else { helper = (depth0 && depth0.label); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
247
- buffer += escapeExpression(stack1)
248
- + "</span>\n <span class=\"reason\">(";
249
- if (helper = helpers.reason) { stack1 = helper.call(depth0, {hash:{},data:data}); }
250
- else { helper = (depth0 && depth0.reason); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
251
- buffer += escapeExpression(stack1)
252
- + ")</span>\n </li>\n ";
253
- return buffer;
109
+ hb.registerHelper('includes', function (haystack, needle, options) {
110
+ if (_.contains(haystack, needle)) {
111
+ return options.fn(this);
254
112
  }
113
+ });
114
+ }
115
+
116
+ if (!Helpers0.__initialized) {
117
+ Helpers0(Handlebars);
118
+ Helpers0.__initialized = true;
119
+ }
120
+ var Template = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
121
+ this.compilerInfo = [4,'>= 1.0.0'];
122
+ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
123
+ var buffer = "", stack1, helper, options, functionType="function", escapeExpression=this.escapeExpression, helperMissing=helpers.helperMissing, self=this;
124
+
125
+ function program1(depth0,data) {
126
+
127
+ var buffer = "", stack1;
128
+ buffer += "\n ";
129
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.single), {hash:{},inverse:self.program(4, program4, data),fn:self.program(2, program2, data),data:data});
130
+ if(stack1 || stack1 === 0) { buffer += stack1; }
131
+ buffer += "\n ";
132
+ return buffer;
133
+ }
134
+ function program2(depth0,data) {
135
+
136
+ var buffer = "", stack1, helper, options;
137
+ buffer += "\n <div class=\"single\" data-resource=\""
138
+ + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.allowedResources)),stack1 == null || stack1 === false ? stack1 : stack1[0])),stack1 == null || stack1 === false ? stack1 : stack1.id)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
139
+ + "\">\n <p>\n "
140
+ + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "The action will be applied to", options) : helperMissing.call(depth0, "__", "The action will be applied to", options)))
141
+ + " ";
142
+ if (helper = helpers.resourceType) { stack1 = helper.call(depth0, {hash:{},data:data}); }
143
+ else { helper = (depth0 && depth0.resourceType); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
144
+ buffer += escapeExpression(stack1)
145
+ + " <span class=\"resource-label\">"
146
+ + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.allowedResources)),stack1 == null || stack1 === false ? stack1 : stack1[0])),stack1 == null || stack1 === false ? stack1 : stack1.label)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
147
+ + "</span>\n </p>\n </div>\n ";
148
+ return buffer;
149
+ }
255
150
 
256
- function program13(depth0,data) {
257
-
258
- var buffer = "", helper, options;
259
- buffer += "\n <div class=\"reason\">\n <p>\n "
260
- + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Please provide a reason", options) : helperMissing.call(depth0, "__", "Please provide a reason", options)))
261
- + ":\n </p>\n <div class=\"categories\"></div>\n <div class=\"comment\">\n <textarea placeholder=\""
262
- + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "comment...", options) : helperMissing.call(depth0, "__", "comment...", options)))
263
- + "\"></textarea>\n </div>\n </div>\n ";
264
- return buffer;
265
- }
151
+ function program4(depth0,data) {
152
+
153
+ var buffer = "", stack1, helper, options;
154
+ buffer += "\n <div class=\"multiple\">\n <p>\n "
155
+ + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "The action will be applied to the following", options) : helperMissing.call(depth0, "__", "The action will be applied to the following", options)))
156
+ + " <span class=\"resource-count\">";
157
+ if (helper = helpers.resourceCount) { stack1 = helper.call(depth0, {hash:{},data:data}); }
158
+ else { helper = (depth0 && depth0.resourceCount); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
159
+ buffer += escapeExpression(stack1)
160
+ + "</span> ";
161
+ if (helper = helpers.resourceTypes) { stack1 = helper.call(depth0, {hash:{},data:data}); }
162
+ else { helper = (depth0 && depth0.resourceTypes); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
163
+ buffer += escapeExpression(stack1)
164
+ + ":\n </p>\n <ul class=\"plain applicables\">\n ";
165
+ stack1 = helpers.each.call(depth0, (depth0 && depth0.allowedResources), {hash:{},inverse:self.noop,fn:self.program(5, program5, data),data:data});
166
+ if(stack1 || stack1 === 0) { buffer += stack1; }
167
+ buffer += "\n </ul>\n </div>\n ";
168
+ return buffer;
169
+ }
170
+ function program5(depth0,data) {
171
+
172
+ var buffer = "", stack1, helper;
173
+ buffer += "\n <li data-resource=\"";
174
+ if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
175
+ else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
176
+ buffer += escapeExpression(stack1)
177
+ + "\">\n <span class=\"resource-label\">";
178
+ if (helper = helpers.label) { stack1 = helper.call(depth0, {hash:{},data:data}); }
179
+ else { helper = (depth0 && depth0.label); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
180
+ buffer += escapeExpression(stack1)
181
+ + "</span>\n </li>\n ";
182
+ return buffer;
183
+ }
266
184
 
267
- function program15(depth0,data) {
268
-
269
- var buffer = "", stack1, helper;
270
- buffer += "\n <div class=\"message\">\n ";
271
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.icon), {hash:{},inverse:self.noop,fn:self.program(16, program16, data),data:data});
272
- if(stack1 || stack1 === 0) { buffer += stack1; }
273
- buffer += "\n ";
274
- if (helper = helpers.message) { stack1 = helper.call(depth0, {hash:{},data:data}); }
275
- else { helper = (depth0 && depth0.message); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
276
- buffer += escapeExpression(stack1)
277
- + "\n </div>\n ";
278
- return buffer;
279
- }
280
- function program16(depth0,data) {
281
-
282
- var buffer = "", stack1, helper;
283
- buffer += "\n <span class=\"icon icon-";
284
- if (helper = helpers.icon) { stack1 = helper.call(depth0, {hash:{},data:data}); }
285
- else { helper = (depth0 && depth0.icon); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
286
- buffer += escapeExpression(stack1)
287
- + "\"></span>\n ";
288
- return buffer;
289
- }
185
+ function program7(depth0,data) {
186
+
187
+ var buffer = "", stack1;
188
+ buffer += "\n ";
189
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.singleDenied), {hash:{},inverse:self.program(10, program10, data),fn:self.program(8, program8, data),data:data});
190
+ if(stack1 || stack1 === 0) { buffer += stack1; }
191
+ buffer += "\n ";
192
+ return buffer;
193
+ }
194
+ function program8(depth0,data) {
195
+
196
+ var buffer = "", stack1, helper, options;
197
+ buffer += "\n <div class=\"single\" data-resource=\""
198
+ + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.deniedResources)),stack1 == null || stack1 === false ? stack1 : stack1[0])),stack1 == null || stack1 === false ? stack1 : stack1.id)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
199
+ + "\">\n <p>\n "
200
+ + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "The action will not be applied to ", options) : helperMissing.call(depth0, "__", "The action will not be applied to ", options)))
201
+ + " ";
202
+ if (helper = helpers.resourceType) { stack1 = helper.call(depth0, {hash:{},data:data}); }
203
+ else { helper = (depth0 && depth0.resourceType); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
204
+ buffer += escapeExpression(stack1)
205
+ + "\n <span class=\"resource-label\">"
206
+ + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.deniedResources)),stack1 == null || stack1 === false ? stack1 : stack1[0])),stack1 == null || stack1 === false ? stack1 : stack1.label)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
207
+ + "</span>\n <span class=\"reason\">("
208
+ + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.deniedResources)),stack1 == null || stack1 === false ? stack1 : stack1[0])),stack1 == null || stack1 === false ? stack1 : stack1.reason)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
209
+ + ")</span>\n </p>\n </div>\n ";
210
+ return buffer;
211
+ }
290
212
 
291
- buffer += "<div class=\"bulk-action-popup\">\n <h2 class=\"title\">"
292
- + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Action", options) : helperMissing.call(depth0, "__", "Action", options)))
293
- + ": ";
294
- if (helper = helpers.actionName) { stack1 = helper.call(depth0, {hash:{},data:data}); }
295
- else { helper = (depth0 && depth0.actionName); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
296
- buffer += escapeExpression(stack1)
297
- + "</h2>\n\n ";
298
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.resourceCount), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
299
- if(stack1 || stack1 === 0) { buffer += stack1; }
300
- buffer += "\n\n ";
301
- stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.deniedResources)),stack1 == null || stack1 === false ? stack1 : stack1.length), {hash:{},inverse:self.noop,fn:self.program(7, program7, data),data:data});
302
- if(stack1 || stack1 === 0) { buffer += stack1; }
303
- buffer += "\n\n ";
304
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.reason), {hash:{},inverse:self.noop,fn:self.program(13, program13, data),data:data});
305
- if(stack1 || stack1 === 0) { buffer += stack1; }
306
- buffer += "\n\n ";
307
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.message), {hash:{},inverse:self.noop,fn:self.program(15, program15, data),data:data});
308
- if(stack1 || stack1 === 0) { buffer += stack1; }
309
- buffer += "\n\n <div class=\"actions\">\n <button class=\"btn btn-info small done\">"
310
- + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "OK", options) : helperMissing.call(depth0, "__", "OK", options)))
311
- + "</button>\n <a href=\"#\" class=\"btn cancel\" title=\""
312
- + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "cancel the action", options) : helperMissing.call(depth0, "__", "cancel the action", options)))
313
- + "\">"
314
- + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "cancel", options) : helperMissing.call(depth0, "__", "cancel", options)))
315
- + "</a>\n </div>\n\n</div>";
316
- return buffer;
317
- });
318
- function layoutTpl(data, options, asString) {
319
- var html = Template(data, options);
320
- return (asString || true) ? html : $(html);
213
+ function program10(depth0,data) {
214
+
215
+ var buffer = "", stack1, helper, options;
216
+ buffer += "\n <p>\n "
217
+ + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "The action will not be applied to the following", options) : helperMissing.call(depth0, "__", "The action will not be applied to the following", options)))
218
+ + " ";
219
+ if (helper = helpers.resourceTypes) { stack1 = helper.call(depth0, {hash:{},data:data}); }
220
+ else { helper = (depth0 && depth0.resourceTypes); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
221
+ buffer += escapeExpression(stack1)
222
+ + ":\n </p>\n <ul class=\"plain no-applicables\">\n ";
223
+ stack1 = helpers.each.call(depth0, (depth0 && depth0.deniedResources), {hash:{},inverse:self.noop,fn:self.program(11, program11, data),data:data});
224
+ if(stack1 || stack1 === 0) { buffer += stack1; }
225
+ buffer += "\n </ul>\n ";
226
+ return buffer;
227
+ }
228
+ function program11(depth0,data) {
229
+
230
+ var buffer = "", stack1, helper;
231
+ buffer += "\n <li data-resource=\"";
232
+ if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
233
+ else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
234
+ buffer += escapeExpression(stack1)
235
+ + "\">\n <span class=\"resource-label\">";
236
+ if (helper = helpers.label) { stack1 = helper.call(depth0, {hash:{},data:data}); }
237
+ else { helper = (depth0 && depth0.label); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
238
+ buffer += escapeExpression(stack1)
239
+ + "</span>\n <span class=\"reason\">(";
240
+ if (helper = helpers.reason) { stack1 = helper.call(depth0, {hash:{},data:data}); }
241
+ else { helper = (depth0 && depth0.reason); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
242
+ buffer += escapeExpression(stack1)
243
+ + ")</span>\n </li>\n ";
244
+ return buffer;
321
245
  }
322
246
 
323
- /**
324
- * This program is free software; you can redistribute it and/or
325
- * modify it under the terms of the GNU General Public License
326
- * as published by the Free Software Foundation; under version 2
327
- * of the License (non-upgradable).
328
- *
329
- * This program is distributed in the hope that it will be useful,
330
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
331
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
332
- * GNU General Public License for more details.
333
- *
334
- * You should have received a copy of the GNU General Public License
335
- * along with this program; if not, write to the Free Software
336
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
337
- *
338
- * Copyright (c) 2015-2019 Open Assessment Technologies SA;
339
- */
340
- /**
341
- * Namespace used in events and shortcuts
342
- * @type {String}
343
- * @private
344
- */
247
+ function program13(depth0,data) {
248
+
249
+ var buffer = "", helper, options;
250
+ buffer += "\n <div class=\"reason\">\n <p>\n "
251
+ + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Please provide a reason", options) : helperMissing.call(depth0, "__", "Please provide a reason", options)))
252
+ + ":\n </p>\n <div class=\"categories\"></div>\n <div class=\"comment\">\n <textarea placeholder=\""
253
+ + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "comment...", options) : helperMissing.call(depth0, "__", "comment...", options)))
254
+ + "\"></textarea>\n </div>\n </div>\n ";
255
+ return buffer;
256
+ }
345
257
 
346
- const _ns = 'bulk-action-popup';
347
- /**
348
- * Builds an instance of the bulkActionPopup component
349
- *
350
- * @param {Object} config
351
- * @param {jQuery} config.renderTo - the jQuery container it should be rendered to
352
- * @param {String} config.actionName - the action name (use in the title text)
353
- * @param {String} config.resourceType - the name of the resource type (use in the text)
354
- * @param {Boolean} [config.allowShortcuts] - allow keyboard shortcuts (Esc to cancel, Enter to validate)
355
- * @param {String} [config.resourceTypes] - the name of the resource type in plural (use in the text)
356
- * @param {Boolean} [config.reason] - defines if the reason section should be displayed or not
357
- * @param {Function} [config.categoriesSelector] - callback renderer for categories
358
- * @param {Array} config.allowedResources - list of allowed resources to be displayed
359
- * @param {Array} [config.deniedResources] - list of denied resources to be displayed
360
- * @param {String} config.message - message or warning (will be shown at the bottom of the popup)
361
- * @param {String} config.icon - icon from the TAO font (will be shown before the message)
362
- * @returns {bulkActionPopup}
363
- */
258
+ function program15(depth0,data) {
259
+
260
+ var buffer = "", stack1, helper;
261
+ buffer += "\n <div class=\"message\">\n ";
262
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.icon), {hash:{},inverse:self.noop,fn:self.program(16, program16, data),data:data});
263
+ if(stack1 || stack1 === 0) { buffer += stack1; }
264
+ buffer += "\n ";
265
+ if (helper = helpers.message) { stack1 = helper.call(depth0, {hash:{},data:data}); }
266
+ else { helper = (depth0 && depth0.message); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
267
+ buffer += escapeExpression(stack1)
268
+ + "\n </div>\n ";
269
+ return buffer;
270
+ }
271
+ function program16(depth0,data) {
272
+
273
+ var buffer = "", stack1, helper;
274
+ buffer += "\n <span class=\"icon icon-";
275
+ if (helper = helpers.icon) { stack1 = helper.call(depth0, {hash:{},data:data}); }
276
+ else { helper = (depth0 && depth0.icon); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
277
+ buffer += escapeExpression(stack1)
278
+ + "\"></span>\n ";
279
+ return buffer;
280
+ }
364
281
 
365
- function bulkActionPopupFactory(config) {
366
- //private object to hold the state of edition
367
- const state = {
368
- reasons: null,
369
- comment: ''
370
- };
371
- const instance = component({
372
- /**
373
- * Validates the dialog, and closes it (action performed when hitting the Ok button)
374
- * @returns {Boolean} Returns `true` if the dialog has been successively validated (and closed)
375
- */
376
- validate() {
377
- const $element = this.getElement();
378
-
379
- if ($element) {
380
- $$1('.feedback-error', $element).remove();
381
-
382
- if (!checkRequiredFields($element)) {
383
- const $error = $$1('<div class="feedback-error small"></div>').text(__('All fields are required'));
384
- $element.find('.actions').prepend($error);
385
- return false;
386
- }
387
- }
282
+ buffer += "<div class=\"bulk-action-popup\">\n <h2 class=\"title\">"
283
+ + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Action", options) : helperMissing.call(depth0, "__", "Action", options)))
284
+ + ": ";
285
+ if (helper = helpers.actionName) { stack1 = helper.call(depth0, {hash:{},data:data}); }
286
+ else { helper = (depth0 && depth0.actionName); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
287
+ buffer += escapeExpression(stack1)
288
+ + "</h2>\n\n ";
289
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.resourceCount), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
290
+ if(stack1 || stack1 === 0) { buffer += stack1; }
291
+ buffer += "\n\n ";
292
+ stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.deniedResources)),stack1 == null || stack1 === false ? stack1 : stack1.length), {hash:{},inverse:self.noop,fn:self.program(7, program7, data),data:data});
293
+ if(stack1 || stack1 === 0) { buffer += stack1; }
294
+ buffer += "\n\n ";
295
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.reason), {hash:{},inverse:self.noop,fn:self.program(13, program13, data),data:data});
296
+ if(stack1 || stack1 === 0) { buffer += stack1; }
297
+ buffer += "\n\n ";
298
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.message), {hash:{},inverse:self.noop,fn:self.program(15, program15, data),data:data});
299
+ if(stack1 || stack1 === 0) { buffer += stack1; }
300
+ buffer += "\n\n <div class=\"actions\">\n <button class=\"btn btn-info small done\">"
301
+ + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "OK", options) : helperMissing.call(depth0, "__", "OK", options)))
302
+ + "</button>\n <a href=\"#\" class=\"btn cancel\" title=\""
303
+ + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "cancel the action", options) : helperMissing.call(depth0, "__", "cancel the action", options)))
304
+ + "\">"
305
+ + escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "cancel", options) : helperMissing.call(depth0, "__", "cancel", options)))
306
+ + "</a>\n </div>\n\n</div>";
307
+ return buffer;
308
+ });
309
+ function layoutTpl(data, options, asString) {
310
+ var html = Template(data, options);
311
+ return (asString || true) ? html : $(html);
312
+ }
313
+
314
+ /**
315
+ * This program is free software; you can redistribute it and/or
316
+ * modify it under the terms of the GNU General Public License
317
+ * as published by the Free Software Foundation; under version 2
318
+ * of the License (non-upgradable).
319
+ *
320
+ * This program is distributed in the hope that it will be useful,
321
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
322
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
323
+ * GNU General Public License for more details.
324
+ *
325
+ * You should have received a copy of the GNU General Public License
326
+ * along with this program; if not, write to the Free Software
327
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
328
+ *
329
+ * Copyright (c) 2015-2019 Open Assessment Technologies SA;
330
+ */
331
+ /**
332
+ * Namespace used in events and shortcuts
333
+ * @type {String}
334
+ * @private
335
+ */
336
+
337
+ var _ns = 'bulk-action-popup';
338
+ /**
339
+ * Builds an instance of the bulkActionPopup component
340
+ *
341
+ * @param {Object} config
342
+ * @param {jQuery} config.renderTo - the jQuery container it should be rendered to
343
+ * @param {String} config.actionName - the action name (use in the title text)
344
+ * @param {String} config.resourceType - the name of the resource type (use in the text)
345
+ * @param {Boolean} [config.allowShortcuts] - allow keyboard shortcuts (Esc to cancel, Enter to validate)
346
+ * @param {String} [config.resourceTypes] - the name of the resource type in plural (use in the text)
347
+ * @param {Boolean} [config.reason] - defines if the reason section should be displayed or not
348
+ * @param {Function} [config.categoriesSelector] - callback renderer for categories
349
+ * @param {Array} config.allowedResources - list of allowed resources to be displayed
350
+ * @param {Array} [config.deniedResources] - list of denied resources to be displayed
351
+ * @param {String} config.message - message or warning (will be shown at the bottom of the popup)
352
+ * @param {String} config.icon - icon from the TAO font (will be shown before the message)
353
+ * @returns {bulkActionPopup}
354
+ */
355
+
356
+ function bulkActionPopupFactory(config) {
357
+ //private object to hold the state of edition
358
+ var state = {
359
+ reasons: null,
360
+ comment: ''
361
+ };
362
+ var instance = component({
363
+ /**
364
+ * Validates the dialog, and closes it (action performed when hitting the Ok button)
365
+ * @returns {Boolean} Returns `true` if the dialog has been successively validated (and closed)
366
+ */
367
+ validate: function validate() {
368
+ var $element = this.getElement();
388
369
 
389
- this.trigger('ok', state);
390
- this.destroy();
391
- return true;
392
- },
393
-
394
- /**
395
- * Cancels and closes the dialog
396
- */
397
- cancel() {
398
- this.trigger('cancel');
399
- this.destroy();
370
+ if ($element) {
371
+ $$1('.feedback-error', $element).remove();
372
+
373
+ if (!checkRequiredFields($element)) {
374
+ var $error = $$1('<div class="feedback-error small"></div>').text(__('All fields are required'));
375
+ $element.find('.actions').prepend($error);
376
+ return false;
377
+ }
400
378
  }
401
379
 
402
- }).setTemplate(layoutTpl) // uninstalls the component
403
- .on('destroy', function () {
404
- // allows all registered shortcuts to be triggered and disables the dialog shortcuts
405
- globalShortcut.enable();
380
+ this.trigger('ok', state);
381
+ this.destroy();
382
+ return true;
383
+ },
406
384
 
407
- if (this.dialogShortcut) {
408
- this.dialogShortcut.disable();
409
- this.dialogShortcut.clear();
410
- this.dialogShortcut = null;
411
- }
385
+ /**
386
+ * Cancels and closes the dialog
387
+ */
388
+ cancel: function cancel() {
389
+ this.trigger('cancel');
390
+ this.destroy();
391
+ }
392
+ }).setTemplate(layoutTpl) // uninstalls the component
393
+ .on('destroy', function () {
394
+ // allows all registered shortcuts to be triggered and disables the dialog shortcuts
395
+ globalShortcut.enable();
396
+
397
+ if (this.dialogShortcut) {
398
+ this.dialogShortcut.disable();
399
+ this.dialogShortcut.clear();
400
+ this.dialogShortcut = null;
401
+ }
412
402
 
413
- if (this.navigator) {
414
- this.navigator.destroy();
415
- this.navigator = null;
416
- }
403
+ if (this.navigator) {
404
+ this.navigator.destroy();
405
+ this.navigator = null;
406
+ }
417
407
 
418
- this.getElement().removeClass('modal').modal('destroy');
419
- }) // event triggered when the OK button has been clicked or the related shortcut has been used
420
- .on('action-ok', function () {
421
- this.validate();
422
- }) // event triggered when the Cancel button has been clicked or the related shortcut has been used
423
- .on('action-cancel', function () {
424
- this.cancel();
425
- }) // renders the component
426
- .on('render', function () {
427
- const $element = this.getElement();
428
- initModal({
429
- disableEscape: true,
430
- width: this.config.single && !this.config.deniedResources.length && !this.config.reason ? 600 : 800
431
- });
408
+ this.getElement().removeClass('modal').modal('destroy');
409
+ }) // event triggered when the OK button has been clicked or the related shortcut has been used
410
+ .on('action-ok', function () {
411
+ this.validate();
412
+ }) // event triggered when the Cancel button has been clicked or the related shortcut has been used
413
+ .on('action-cancel', function () {
414
+ this.cancel();
415
+ }) // renders the component
416
+ .on('render', function () {
417
+ var _this = this;
418
+
419
+ var $element = this.getElement();
420
+ initModal({
421
+ disableEscape: true,
422
+ width: this.config.single && !this.config.deniedResources.length && !this.config.reason ? 600 : 800
423
+ });
424
+
425
+ if (_.isObject(this.config.categoriesSelector)) {
426
+ var $reason = $element.find('.reason').children('.categories');
427
+ this.config.categoriesSelector.render($reason);
428
+ }
429
+
430
+ $element.on(namespaceHelper.namespaceAll('selected.cascading-combobox', _ns), function (e, reasons) {
431
+ state.reasons = reasons;
432
432
 
433
- if (_.isObject(this.config.categoriesSelector)) {
434
- const $reason = $element.find('.reason').children('.categories');
435
- this.config.categoriesSelector.render($reason);
433
+ if (_this.config.allowShortcuts) {
434
+ // ensure the keyboard navigation is taking care of the possible new fields
435
+ initNavigator();
436
436
  }
437
437
 
438
- $element.on(namespaceHelper.namespaceAll('selected.cascading-combobox', _ns), (e, reasons) => {
439
- state.reasons = reasons;
438
+ _this.trigger('change', state);
439
+ }).on(namespaceHelper.namespaceAll('change', _ns), 'textarea', function (e) {
440
+ state.comment = $$1(e.currentTarget).val();
440
441
 
441
- if (this.config.allowShortcuts) {
442
- // ensure the keyboard navigation is taking care of the possible new fields
443
- initNavigator();
444
- }
442
+ _this.trigger('change', state);
443
+ }).on(namespaceHelper.namespaceAll('click', _ns), '.actions .done', function (e) {
444
+ e.preventDefault();
445
445
 
446
- this.trigger('change', state);
447
- }).on(namespaceHelper.namespaceAll('change', _ns), 'textarea', e => {
448
- state.comment = $$1(e.currentTarget).val();
449
- this.trigger('change', state);
450
- }).on(namespaceHelper.namespaceAll('click', _ns), '.actions .done', e => {
451
- e.preventDefault();
452
- this.trigger('action-ok');
453
- }).on(namespaceHelper.namespaceAll('click', _ns), '.actions .cancel', e => {
454
- e.preventDefault();
455
- this.trigger('action-cancel');
456
- });
446
+ _this.trigger('action-ok');
447
+ }).on(namespaceHelper.namespaceAll('click', _ns), '.actions .cancel', function (e) {
448
+ e.preventDefault();
457
449
 
458
- if (this.config.allowShortcuts) {
459
- // install the keyboard navigation
460
- initNavigator(); // prevents all registered shortcuts to be triggered and activate the dialog shortcuts
461
-
462
- globalShortcut.disable();
463
- this.dialogShortcut = shortcutRegistry($$1('body'), {
464
- avoidInput: true,
465
- propagate: false,
466
- prevent: true
467
- }) // prevents the TAB key to be used to move outside the dialog box, but handles navigation
468
- .add(namespaceHelper.namespaceAll('Tab', _ns, true), () => {
469
- this.navigator.next();
470
- }, {
471
- avoidInput: false
472
- }).add(namespaceHelper.namespaceAll('Shift+Tab', _ns, true), () => {
473
- this.navigator.previous();
474
- }, {
475
- avoidInput: false
476
- }) // handles the dialog's shortcuts: just fire the action using the event loop
477
- .add(namespaceHelper.namespaceAll('esc', _ns, true), function (e, shortcut) {
478
- instance.trigger('action-cancel', shortcut);
479
- }).add(namespaceHelper.namespaceAll('enter', _ns, true), function (e, shortcut) {
480
- instance.trigger('action-ok', shortcut);
481
- });
482
- }
450
+ _this.trigger('action-cancel');
483
451
  });
484
- /**
485
- * Validates that all required fields have been filled
486
- * @param {jQuery} $container
487
- * @returns {Boolean}
488
- */
489
452
 
490
- function checkRequiredFields($container) {
491
- return $$1('select, textarea', $container).filter(function () {
492
- return $$1.trim($$1(this).val()).length === 0;
493
- }).length === 0;
453
+ if (this.config.allowShortcuts) {
454
+ // install the keyboard navigation
455
+ initNavigator(); // prevents all registered shortcuts to be triggered and activate the dialog shortcuts
456
+
457
+ globalShortcut.disable();
458
+ this.dialogShortcut = shortcutRegistry($$1('body'), {
459
+ avoidInput: true,
460
+ propagate: false,
461
+ prevent: true
462
+ }) // prevents the TAB key to be used to move outside the dialog box, but handles navigation
463
+ .add(namespaceHelper.namespaceAll('Tab', _ns, true), function () {
464
+ _this.navigator.next();
465
+ }, {
466
+ avoidInput: false
467
+ }).add(namespaceHelper.namespaceAll('Shift+Tab', _ns, true), function () {
468
+ _this.navigator.previous();
469
+ }, {
470
+ avoidInput: false
471
+ }) // handles the dialog's shortcuts: just fire the action using the event loop
472
+ .add(namespaceHelper.namespaceAll('esc', _ns, true), function (e, shortcut) {
473
+ instance.trigger('action-cancel', shortcut);
474
+ }).add(namespaceHelper.namespaceAll('enter', _ns, true), function (e, shortcut) {
475
+ instance.trigger('action-ok', shortcut);
476
+ });
494
477
  }
495
- /**
496
- * Adds the form into a popup and displays it
497
- * @param {Object} modalConfig
498
- */
499
-
478
+ });
479
+ /**
480
+ * Validates that all required fields have been filled
481
+ * @param {jQuery} $container
482
+ * @returns {Boolean}
483
+ */
500
484
 
501
- function initModal(modalConfig) {
502
- instance.getElement().addClass('modal').on('closed.modal', function () {
503
- // always destroy the widget when closing
504
- instance.destroy();
505
- }).modal(modalConfig).focus();
506
- }
507
- /**
508
- * Sets a keyboard navigator on the dialog to take care of TAB navigation
509
- */
485
+ function checkRequiredFields($container) {
486
+ return $$1('select, textarea', $container).filter(function () {
487
+ return $$1.trim($$1(this).val()).length === 0;
488
+ }).length === 0;
489
+ }
490
+ /**
491
+ * Adds the form into a popup and displays it
492
+ * @param {Object} modalConfig
493
+ */
510
494
 
511
495
 
512
- function initNavigator() {
513
- const $element = instance.getElement();
514
- instance.navigator = keyNavigator({
515
- id: _ns,
516
- loop: true,
517
- group: $element,
518
- // the dialog is always set as first component, so ensure to start on the first field
519
- defaultPosition: 1,
520
- // take all input fields and the dialog as navigable components
521
- // but ignore buttons and select2 hidden fields
522
- elements: navigableDomElement.createFromDoms($element.find(':input:not(button,select.select2-offscreen)').add($element))
523
- }).on('activate', function (cursor, target) {
524
- if ($$1(target).is($element)) {
525
- instance.validate();
526
- }
527
- }) // put the focus on the keyboard navigation, to ensure the first field is selected
528
- // otherwise the user will have to hit twice the tab key before selecting it
529
- .focus();
530
- } //compute extra config data (essentially for the template)
531
-
532
-
533
- return instance.init(_.defaults(config, {
534
- deniedResources: [],
535
- reason: false,
536
- allowShortcuts: true,
537
- reasonRequired: false,
538
- resourceCount: config.allowedResources.length,
539
- single: config.allowedResources.length === 1,
540
- singleDenied: config.deniedResources && config.deniedResources.length === 1,
541
- resourceTypes: `${config.resourceType}s`
542
- }));
496
+ function initModal(modalConfig) {
497
+ instance.getElement().addClass('modal').on('closed.modal', function () {
498
+ // always destroy the widget when closing
499
+ instance.destroy();
500
+ }).modal(modalConfig).focus();
543
501
  }
502
+ /**
503
+ * Sets a keyboard navigator on the dialog to take care of TAB navigation
504
+ */
544
505
 
545
- return bulkActionPopupFactory;
506
+
507
+ function initNavigator() {
508
+ var $element = instance.getElement();
509
+ instance.navigator = keyNavigator({
510
+ id: _ns,
511
+ loop: true,
512
+ group: $element,
513
+ // the dialog is always set as first component, so ensure to start on the first field
514
+ defaultPosition: 1,
515
+ // take all input fields and the dialog as navigable components
516
+ // but ignore buttons and select2 hidden fields
517
+ elements: navigableDomElement.createFromDoms($element.find(':input:not(button,select.select2-offscreen)').add($element))
518
+ }).on('activate', function (cursor, target) {
519
+ if ($$1(target).is($element)) {
520
+ instance.validate();
521
+ }
522
+ }) // put the focus on the keyboard navigation, to ensure the first field is selected
523
+ // otherwise the user will have to hit twice the tab key before selecting it
524
+ .focus();
525
+ } //compute extra config data (essentially for the template)
526
+
527
+
528
+ return instance.init(_.defaults(config, {
529
+ deniedResources: [],
530
+ reason: false,
531
+ allowShortcuts: true,
532
+ reasonRequired: false,
533
+ resourceCount: config.allowedResources.length,
534
+ single: config.allowedResources.length === 1,
535
+ singleDenied: config.deniedResources && config.deniedResources.length === 1,
536
+ resourceTypes: "".concat(config.resourceType, "s")
537
+ }));
538
+ }
539
+
540
+ return bulkActionPopupFactory;
546
541
 
547
542
  });