@oat-sa/tao-core-ui 1.60.2 → 1.62.0
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.
- package/LICENSE +339 -339
- package/README.md +23 -18
- package/dist/actionbar.js +393 -410
- package/dist/adder.js +143 -156
- package/dist/animable/absorbable/absorbable.js +208 -211
- package/dist/animable/absorbable/css/absorb.css +7 -8
- package/dist/animable/absorbable/css/absorb.css.map +1 -1
- package/dist/animable/pulsable/css/pulse.css +7 -7
- package/dist/animable/pulsable/css/pulse.css.map +1 -1
- package/dist/animable/pulsable/pulsable.js +174 -174
- package/dist/areaBroker.js +59 -72
- package/dist/autocomplete/css/autocomplete.css +7 -8
- package/dist/autocomplete/css/autocomplete.css.map +1 -1
- package/dist/autocomplete.js +494 -604
- package/dist/autoscroll.js +23 -25
- package/dist/badge/badge.js +201 -199
- package/dist/badge/css/badge.css +7 -8
- package/dist/badge/css/badge.css.map +1 -1
- package/dist/breadcrumbs/css/breadcrumbs.css +7 -7
- package/dist/breadcrumbs/css/breadcrumbs.css.map +1 -1
- package/dist/breadcrumbs.js +286 -285
- package/dist/btngrouper.js +83 -95
- package/dist/bulkActionPopup/css/bulkActionPopup.css +7 -7
- package/dist/bulkActionPopup/css/bulkActionPopup.css.map +1 -1
- package/dist/bulkActionPopup.js +503 -503
- package/dist/button.js +300 -293
- package/dist/calculator/css/calculator.css +10 -10
- package/dist/calculator/css/calculator.css.map +1 -1
- package/dist/calculator.js +59 -72
- package/dist/cascadingComboBox.js +257 -256
- package/dist/ckeditor/ckConfigurator.js +130 -154
- package/dist/ckeditor/dtdHandler.js +305 -345
- package/dist/class/css/selector.css +7 -7
- package/dist/class/css/selector.css.map +1 -1
- package/dist/class/selector.js +437 -470
- package/dist/component/alignable.js +97 -121
- package/dist/component/containable.js +53 -58
- package/dist/component/css/components.css +7 -7
- package/dist/component/css/components.css.map +1 -1
- package/dist/component/css/windowComponent.css +7 -7
- package/dist/component/css/windowComponent.css.map +1 -1
- package/dist/component/draggable.js +34 -36
- package/dist/component/placeable.js +84 -102
- package/dist/component/resizable.js +79 -89
- package/dist/component/stackable.js +21 -27
- package/dist/component/windowed.js +284 -297
- package/dist/component.js +439 -467
- package/dist/container.js +79 -98
- package/dist/contextualPopup/css/contextualPopup.css +7 -7
- package/dist/contextualPopup/css/contextualPopup.css.map +1 -1
- package/dist/contextualPopup.js +417 -436
- package/dist/dashboard/css/dashboard.css +7 -7
- package/dist/dashboard/css/dashboard.css.map +1 -1
- package/dist/dashboard.js +302 -305
- package/dist/datalist/css/datalist.css +7 -7
- package/dist/datalist/css/datalist.css.map +1 -1
- package/dist/datalist.js +783 -791
- package/dist/datatable/css/datatable.css +11 -7
- package/dist/datatable/css/datatable.css.map +1 -1
- package/dist/datatable/filterStrategy/filterStrategy.js +28 -30
- package/dist/datatable/filterStrategy/multiple.js +26 -45
- package/dist/datatable/filterStrategy/single.js +28 -40
- package/dist/datatable.js +1591 -1616
- package/dist/dateRange/css/dateRange.css +7 -7
- package/dist/dateRange/css/dateRange.css.map +1 -1
- package/dist/dateRange/dateRange.js +398 -412
- package/dist/datetime/css/picker.css +7 -7
- package/dist/datetime/css/picker.css.map +1 -1
- package/dist/datetime/picker.js +670 -703
- package/dist/deleter.js +383 -398
- package/dist/destination/css/selector.css +7 -7
- package/dist/destination/css/selector.css.map +1 -1
- package/dist/destination/selector.js +295 -293
- package/dist/dialog/alert.js +30 -32
- package/dist/dialog/confirm.js +29 -32
- package/dist/dialog/confirmDelete.js +223 -221
- package/dist/dialog.js +651 -695
- package/dist/disabler.js +108 -119
- package/dist/documentViewer/css/documentViewer.css +7 -7
- package/dist/documentViewer/css/documentViewer.css.map +1 -1
- package/dist/documentViewer/providers/pdfViewer/fallback/viewer.js +172 -169
- package/dist/documentViewer/providers/pdfViewer/pdfjs/areaBroker.js +32 -29
- package/dist/documentViewer/providers/pdfViewer/pdfjs/findBar.js +523 -564
- package/dist/documentViewer/providers/pdfViewer/pdfjs/pageView.js +376 -393
- package/dist/documentViewer/providers/pdfViewer/pdfjs/pagesManager.js +53 -68
- package/dist/documentViewer/providers/pdfViewer/pdfjs/searchEngine.js +517 -567
- package/dist/documentViewer/providers/pdfViewer/pdfjs/textManager.js +73 -96
- package/dist/documentViewer/providers/pdfViewer/pdfjs/viewer.js +381 -392
- package/dist/documentViewer/providers/pdfViewer/pdfjs/wrapper.js +125 -152
- package/dist/documentViewer/providers/pdfViewer.js +189 -191
- package/dist/documentViewer/viewerFactory.js +76 -81
- package/dist/documentViewer.js +303 -311
- package/dist/dropdown/css/dropdown.css +7 -7
- package/dist/dropdown/css/dropdown.css.map +1 -1
- package/dist/dropdown.js +392 -412
- package/dist/durationer.js +77 -85
- package/dist/dynamicComponent/css/dynamicComponent.css +7 -7
- package/dist/dynamicComponent/css/dynamicComponent.css.map +1 -1
- package/dist/dynamicComponent.js +595 -630
- package/dist/feedback.js +365 -375
- package/dist/figure/FigureStateActive.js +246 -296
- package/dist/filesender.js +44 -54
- package/dist/filter.js +244 -240
- package/dist/form/css/dropdownForm.css +7 -7
- package/dist/form/css/dropdownForm.css.map +1 -1
- package/dist/form/css/form.css +7 -7
- package/dist/form/css/form.css.map +1 -1
- package/dist/form/dropdownForm.js +357 -362
- package/dist/form/form.js +703 -984
- package/dist/form/simpleForm.js +74 -77
- package/dist/form/validator/css/validator.css +7 -7
- package/dist/form/validator/css/validator.css.map +1 -1
- package/dist/form/validator/renderer.js +235 -241
- package/dist/form/validator/validator.js +181 -267
- package/dist/form/widget/css/widget.css +7 -7
- package/dist/form/widget/css/widget.css.map +1 -1
- package/dist/form/widget/definitions.js +27 -28
- package/dist/form/widget/loader.js +16 -16
- package/dist/form/widget/providers/checkBox.js +257 -264
- package/dist/form/widget/providers/comboBox.js +194 -193
- package/dist/form/widget/providers/default.js +44 -50
- package/dist/form/widget/providers/hidden.js +179 -176
- package/dist/form/widget/providers/hiddenBox.js +262 -272
- package/dist/form/widget/providers/radioBox.js +222 -223
- package/dist/form/widget/providers/textArea.js +197 -193
- package/dist/form/widget/providers/textBox.js +36 -37
- package/dist/form/widget/widget.js +480 -508
- package/dist/form.js +12 -17
- package/dist/formValidator/formValidator.js +74 -91
- package/dist/formValidator/highlighters/highlighter.js +43 -51
- package/dist/formValidator/highlighters/message.js +31 -32
- package/dist/formValidator/highlighters/tooltip.js +33 -35
- package/dist/generis/form/css/form.css +7 -7
- package/dist/generis/form/css/form.css.map +1 -1
- package/dist/generis/form/form.js +323 -331
- package/dist/generis/validator/css/validator.css +7 -7
- package/dist/generis/validator/css/validator.css.map +1 -1
- package/dist/generis/validator/validator.js +215 -216
- package/dist/generis/widget/checkBox/checkBox.js +227 -225
- package/dist/generis/widget/comboBox/comboBox.js +189 -183
- package/dist/generis/widget/css/widget.css +7 -7
- package/dist/generis/widget/css/widget.css.map +1 -1
- package/dist/generis/widget/hiddenBox/hiddenBox.js +231 -232
- package/dist/generis/widget/loader.js +21 -23
- package/dist/generis/widget/textBox/textBox.js +178 -172
- package/dist/generis/widget/widget.js +255 -266
- package/dist/groupedComboBox.js +231 -226
- package/dist/groupvalidator.js +30 -34
- package/dist/hider.js +43 -50
- package/dist/highlighter.js +946 -1057
- package/dist/image/ImgStateActive/extractLabel.js +20 -21
- package/dist/image/ImgStateActive/helper.js +21 -25
- package/dist/image/ImgStateActive/initHelper.js +133 -162
- package/dist/image/ImgStateActive/initMediaEditor.js +72 -92
- package/dist/image/ImgStateActive/mediaSizer.js +48 -58
- package/dist/image/ImgStateActive.js +185 -215
- package/dist/incrementer.js +91 -110
- package/dist/inplacer.js +108 -132
- package/dist/interactUtils.js +56 -67
- package/dist/itemButtonList/css/item-button-list.css +23 -24
- package/dist/itemButtonList/css/item-button-list.css.map +1 -1
- package/dist/itemButtonList.js +444 -469
- package/dist/keyNavigation/navigableDomElement.js +124 -158
- package/dist/keyNavigation/navigator.js +235 -312
- package/dist/listbox/css/listbox.css +7 -7
- package/dist/listbox/css/listbox.css.map +1 -1
- package/dist/listbox.js +463 -476
- package/dist/liststyler.js +75 -76
- package/dist/loadingButton/css/button.css +7 -7
- package/dist/loadingButton/css/button.css.map +1 -1
- package/dist/loadingButton/loadingButton.js +219 -218
- package/dist/lock.js +484 -509
- package/dist/login/login.js +471 -486
- package/dist/maths/calculator/basicCalculator.js +247 -242
- package/dist/maths/calculator/calculatorComponent.js +34 -36
- package/dist/maths/calculator/core/areaBroker.js +30 -28
- package/dist/maths/calculator/core/board.js +805 -872
- package/dist/maths/calculator/core/expression.js +500 -518
- package/dist/maths/calculator/core/labels.js +240 -235
- package/dist/maths/calculator/core/plugin.js +20 -20
- package/dist/maths/calculator/core/terms.js +27 -27
- package/dist/maths/calculator/core/tokenizer.js +119 -132
- package/dist/maths/calculator/core/tokens.js +157 -168
- package/dist/maths/calculator/css/calculator.css +7 -7
- package/dist/maths/calculator/css/calculator.css.map +1 -1
- package/dist/maths/calculator/defaultCalculator.js +24 -27
- package/dist/maths/calculator/plugins/core/degrad.js +22 -30
- package/dist/maths/calculator/plugins/core/history.js +55 -67
- package/dist/maths/calculator/plugins/core/remind.js +22 -25
- package/dist/maths/calculator/plugins/core/stepNavigation.js +33 -49
- package/dist/maths/calculator/plugins/keyboard/templateKeyboard/templateKeyboard.js +255 -258
- package/dist/maths/calculator/plugins/modifiers/pow10.js +47 -52
- package/dist/maths/calculator/plugins/modifiers/sign.js +103 -130
- package/dist/maths/calculator/plugins/screen/simpleScreen/simpleScreen.js +288 -293
- package/dist/maths/calculator/pluginsLoader.js +22 -22
- package/dist/maths/calculator/scientificCalculator.js +339 -334
- package/dist/mediaEditor/mediaEditorComponent.js +244 -249
- package/dist/mediaEditor/plugins/mediaAlignment/helper.js +28 -33
- package/dist/mediaEditor/plugins/mediaAlignment/mediaAlignmentComponent.js +228 -236
- package/dist/mediaEditor/plugins/mediaAlignment/style.css +7 -7
- package/dist/mediaEditor/plugins/mediaDimension/helper.js +81 -106
- package/dist/mediaEditor/plugins/mediaDimension/mediaDimensionComponent.js +597 -635
- package/dist/mediaEditor/plugins/mediaDimension/style.css +141 -141
- package/dist/mediaplayer/css/player.css +7 -7
- package/dist/mediaplayer/css/player.css.map +1 -1
- package/dist/mediaplayer/players/html5.js +646 -706
- package/dist/mediaplayer/players/youtube.js +393 -438
- package/dist/mediaplayer/players.js +19 -19
- package/dist/mediaplayer/support.js +66 -79
- package/dist/mediaplayer/utils/reminder.js +117 -128
- package/dist/mediaplayer/utils/timeObserver.js +106 -109
- package/dist/mediaplayer/youtubeManager.js +142 -170
- package/dist/mediaplayer.js +1484 -1774
- package/dist/mediasizer.js +633 -676
- package/dist/modal.js +137 -153
- package/dist/movableComponent.js +37 -37
- package/dist/pageSizeSelector.js +231 -224
- package/dist/pageStatus.js +43 -46
- package/dist/pagination/css/pagination.css +7 -7
- package/dist/pagination/css/pagination.css.map +1 -1
- package/dist/pagination/paginationStrategy.js +24 -25
- package/dist/pagination/providers/pages.js +281 -291
- package/dist/pagination/providers/simple.js +202 -196
- package/dist/pagination.js +49 -72
- package/dist/previewer.js +113 -138
- package/dist/progressbar.js +70 -80
- package/dist/propertySelector/css/propertySelector.css +74 -0
- package/dist/propertySelector/css/propertySelector.css.map +1 -0
- package/dist/propertySelector/propertySelector.js +489 -0
- package/dist/report.js +356 -359
- package/dist/resource/css/selector.css +7 -7
- package/dist/resource/css/selector.css.map +1 -1
- package/dist/resource/filters.js +275 -289
- package/dist/resource/list.js +1589 -1371
- package/dist/resource/selectable.js +101 -136
- package/dist/resource/selector.js +855 -914
- package/dist/resource/tree.js +1796 -1612
- package/dist/resourcemgr/css/resourcemgr.css +7 -7
- package/dist/resourcemgr/css/resourcemgr.css.map +1 -1
- package/dist/resourcemgr/fileBrowser.js +540 -587
- package/dist/resourcemgr/filePreview.js +16 -25
- package/dist/resourcemgr/fileSelector.js +520 -547
- package/dist/resourcemgr/util/updatePermissions.js +10 -18
- package/dist/resourcemgr.js +325 -332
- package/dist/scroller.js +29 -33
- package/dist/searchModal/advancedSearch.js +949 -833
- package/dist/searchModal/css/advancedSearch.css +7 -14
- package/dist/searchModal/css/advancedSearch.css.map +1 -1
- package/dist/searchModal/css/searchModal.css +28 -8
- package/dist/searchModal/css/searchModal.css.map +1 -1
- package/dist/searchModal.js +616 -335
- package/dist/selecter.js +21 -28
- package/dist/stacker.js +52 -60
- package/dist/switch/css/switch.css +7 -7
- package/dist/switch/css/switch.css.map +1 -1
- package/dist/switch/switch.js +305 -311
- package/dist/tableModel.js +39 -49
- package/dist/tabs/css/tabs.css +12 -12
- package/dist/tabs/css/tabs.css.map +1 -1
- package/dist/tabs.js +588 -639
- package/dist/taskQueue/css/taskQueue.css +7 -7
- package/dist/taskQueue/css/taskQueue.css.map +1 -1
- package/dist/taskQueue/status.js +317 -322
- package/dist/taskQueue/table.js +383 -394
- package/dist/taskQueue/taskQueue.js +19 -19
- package/dist/taskQueue/taskQueueModel.js +459 -538
- package/dist/taskQueue.js +49 -67
- package/dist/taskQueueButton/css/taskable.css +7 -7
- package/dist/taskQueueButton/css/taskable.css.map +1 -1
- package/dist/taskQueueButton/css/treeButton.css +7 -7
- package/dist/taskQueueButton/css/treeButton.css.map +1 -1
- package/dist/taskQueueButton/standardButton.js +45 -43
- package/dist/taskQueueButton/taskable.js +267 -272
- package/dist/taskQueueButton/treeButton.js +200 -198
- package/dist/themeLoader.js +109 -129
- package/dist/themes.js +86 -100
- package/dist/toggler.js +76 -88
- package/dist/tooltip.js +296 -311
- package/dist/tooltipster.js +17 -17
- package/dist/transformer.js +140 -169
- package/dist/tristateCheckboxGroup/css/tristateCheckboxGroup.css +7 -7
- package/dist/tristateCheckboxGroup/css/tristateCheckboxGroup.css.map +1 -1
- package/dist/tristateCheckboxGroup.js +319 -325
- package/dist/uploader.js +691 -724
- package/dist/validator/Report.js +1 -2
- package/dist/validator/Validator.js +6 -25
- package/dist/validator/validators.js +66 -80
- package/dist/validator.js +218 -254
- package/dist/waitForMedia.js +45 -51
- package/dist/waitingDialog/css/waitingDialog.css +7 -7
- package/dist/waitingDialog/css/waitingDialog.css.map +1 -1
- package/dist/waitingDialog/waitingDialog.js +59 -77
- package/package.json +109 -107
- package/scss/basic.scss +16 -16
- package/scss/ckeditor/skins/tao/scss/inc/_ck-icons.scss +59 -59
- package/scss/ckeditor/skins/tao/scss/inc/_tao.scss +59 -59
- package/scss/font/tao/tao.svg +234 -234
- package/scss/inc/_base.scss +495 -495
- package/scss/inc/_bootstrap.scss +6 -6
- package/scss/inc/_buttons.scss +114 -114
- package/scss/inc/_colors.scss +93 -88
- package/scss/inc/_feedback.scss +150 -150
- package/scss/inc/_flex-grid.scss +15 -15
- package/scss/inc/_fonts.scss +4 -4
- package/scss/inc/_forms.scss +832 -832
- package/scss/inc/_functions.scss +283 -283
- package/scss/inc/_jquery.nouislider.scss +254 -254
- package/scss/inc/_normalize.scss +528 -528
- package/scss/inc/_report.scss +67 -67
- package/scss/inc/_secondary-properties.scss +89 -89
- package/scss/inc/_select2.scss +634 -634
- package/scss/inc/_toolbars.scss +155 -155
- package/scss/inc/_tooltip.scss +312 -312
- package/scss/inc/_variables.scss +21 -21
- package/scss/inc/base/_highlight.scss +5 -5
- package/scss/inc/base/_list-style.scss +58 -58
- package/scss/inc/base/_svg.scss +3 -3
- package/scss/inc/base/_table.scss +62 -62
- package/scss/inc/fonts/_source-sans-pro.scss +29 -29
- package/scss/inc/fonts/_tao-icon-classes.scss +226 -226
- package/scss/inc/fonts/_tao-icon-def.scss +12 -12
- package/scss/inc/fonts/_tao-icon-vars.scss +240 -240
- package/src/actionbar/tpl/main.tpl +8 -8
- package/src/actionbar.js +251 -251
- package/src/adder.js +250 -250
- package/src/animable/absorbable/absorbable.js +134 -134
- package/src/animable/absorbable/css/absorb.css +7 -8
- package/src/animable/absorbable/css/absorb.css.map +1 -1
- package/src/animable/absorbable/scss/absorb.scss +37 -37
- package/src/animable/pulsable/css/pulse.css +7 -7
- package/src/animable/pulsable/css/pulse.css.map +1 -1
- package/src/animable/pulsable/pulsable.js +90 -90
- package/src/animable/pulsable/scss/pulse.scss +22 -22
- package/src/areaBroker.js +160 -160
- package/src/autocomplete/css/autocomplete.css +7 -8
- package/src/autocomplete/css/autocomplete.css.map +1 -1
- package/src/autocomplete/scss/autocomplete.scss +37 -37
- package/src/autocomplete.js +1029 -1029
- package/src/autoscroll.js +57 -57
- package/src/badge/badge.js +119 -119
- package/src/badge/css/badge.css +7 -8
- package/src/badge/css/badge.css.map +1 -1
- package/src/badge/scss/badge.scss +92 -92
- package/src/badge/tpl/badge.tpl +4 -4
- package/src/breadcrumbs/css/breadcrumbs.css +7 -7
- package/src/breadcrumbs/css/breadcrumbs.css.map +1 -1
- package/src/breadcrumbs/scss/breadcrumbs.scss +52 -52
- package/src/breadcrumbs/tpl/breadcrumbs.tpl +20 -20
- package/src/breadcrumbs.js +99 -99
- package/src/btngrouper.js +213 -213
- package/src/bulkActionPopup/css/bulkActionPopup.css +7 -7
- package/src/bulkActionPopup/css/bulkActionPopup.css.map +1 -1
- package/src/bulkActionPopup/scss/bulkActionPopup.scss +63 -63
- package/src/bulkActionPopup/tpl/layout.tpl +76 -76
- package/src/bulkActionPopup/tpl/select.tpl +8 -8
- package/src/bulkActionPopup.js +274 -274
- package/src/button/tpl/button.tpl +4 -4
- package/src/button.js +135 -135
- package/src/calculator/css/calculator.css +10 -10
- package/src/calculator/css/calculator.css.map +1 -1
- package/src/calculator/scss/calculator.scss +139 -139
- package/src/calculator.js +188 -188
- package/src/cascadingComboBox.js +126 -126
- package/src/ckeditor/ckConfigurator.js +736 -736
- package/src/ckeditor/dtdHandler.js +1030 -1030
- package/src/class/css/selector.css +7 -7
- package/src/class/css/selector.css.map +1 -1
- package/src/class/scss/selector.scss +101 -101
- package/src/class/selector.js +329 -329
- package/src/class/tpl/listItem.tpl +9 -9
- package/src/class/tpl/selector.tpl +10 -10
- package/src/component/alignable.js +274 -274
- package/src/component/containable.js +122 -122
- package/src/component/css/components.css +7 -7
- package/src/component/css/components.css.map +1 -1
- package/src/component/css/windowComponent.css +7 -7
- package/src/component/css/windowComponent.css.map +1 -1
- package/src/component/draggable.js +104 -104
- package/src/component/placeable.js +233 -233
- package/src/component/resizable.js +195 -195
- package/src/component/scss/components.scss +507 -507
- package/src/component/scss/windowComponent.scss +62 -62
- package/src/component/stackable.js +67 -67
- package/src/component/tpl/window.tpl +7 -7
- package/src/component/windowed.js +206 -206
- package/src/component.js +401 -401
- package/src/container.js +200 -200
- package/src/contextualPopup/css/contextualPopup.css +7 -7
- package/src/contextualPopup/css/contextualPopup.css.map +1 -1
- package/src/contextualPopup/scss/contextualPopup.scss +78 -78
- package/src/contextualPopup/tpl/popup.tpl +10 -10
- package/src/contextualPopup.js +297 -297
- package/src/css/basic.css +103 -106
- package/src/css/basic.css.map +1 -1
- package/src/dashboard/css/dashboard.css +7 -7
- package/src/dashboard/css/dashboard.css.map +1 -1
- package/src/dashboard/scss/dashboard.scss +93 -93
- package/src/dashboard/tpl/dashboard.tpl +16 -16
- package/src/dashboard/tpl/dashboardMetricsList.tpl +15 -15
- package/src/dashboard.js +184 -184
- package/src/datalist/css/datalist.css +7 -7
- package/src/datalist/css/datalist.css.map +1 -1
- package/src/datalist/scss/datalist.scss +116 -116
- package/src/datalist/tpl/list.tpl +24 -24
- package/src/datalist/tpl/main.tpl +44 -44
- package/src/datalist.js +500 -500
- package/src/datatable/css/datatable.css +11 -7
- package/src/datatable/css/datatable.css.map +1 -1
- package/src/datatable/filterStrategy/filterStrategy.js +70 -70
- package/src/datatable/filterStrategy/multiple.js +126 -126
- package/src/datatable/filterStrategy/single.js +108 -108
- package/src/datatable/scss/datatable.scss +149 -146
- package/src/datatable/tpl/button.tpl +6 -6
- package/src/datatable/tpl/layout.tpl +158 -158
- package/src/datatable.js +1056 -1056
- package/src/dateRange/css/dateRange.css +7 -7
- package/src/dateRange/css/dateRange.css.map +1 -1
- package/src/dateRange/dateRange.js +341 -341
- package/src/dateRange/scss/dateRange.scss +7 -7
- package/src/dateRange/tpl/select.tpl +18 -18
- package/src/datetime/css/picker.css +7 -7
- package/src/datetime/css/picker.css.map +1 -1
- package/src/datetime/picker.js +576 -576
- package/src/datetime/scss/picker.scss +192 -192
- package/src/datetime/tpl/picker.tpl +18 -18
- package/src/deleter/undo.tpl +6 -6
- package/src/deleter.js +296 -296
- package/src/destination/css/selector.css +7 -7
- package/src/destination/css/selector.css.map +1 -1
- package/src/destination/scss/selector.scss +36 -36
- package/src/destination/selector.js +195 -195
- package/src/destination/tpl/selector.tpl +13 -13
- package/src/dialog/alert.js +70 -70
- package/src/dialog/confirm.js +85 -85
- package/src/dialog/confirmDelete.js +95 -95
- package/src/dialog/tpl/body.tpl +24 -24
- package/src/dialog/tpl/buttons.tpl +6 -6
- package/src/dialog/tpl/checkbox.tpl +5 -5
- package/src/dialog.js +517 -517
- package/src/disabler.js +230 -230
- package/src/documentViewer/css/documentViewer.css +7 -7
- package/src/documentViewer/css/documentViewer.css.map +1 -1
- package/src/documentViewer/providers/pdfViewer/fallback/viewer.js +69 -69
- package/src/documentViewer/providers/pdfViewer/pdfjs/areaBroker.js +41 -41
- package/src/documentViewer/providers/pdfViewer/pdfjs/findBar.js +475 -475
- package/src/documentViewer/providers/pdfViewer/pdfjs/findBar.tpl +20 -20
- package/src/documentViewer/providers/pdfViewer/pdfjs/match.tpl +1 -1
- package/src/documentViewer/providers/pdfViewer/pdfjs/page.tpl +4 -4
- package/src/documentViewer/providers/pdfViewer/pdfjs/pageView.js +318 -318
- package/src/documentViewer/providers/pdfViewer/pdfjs/pagesManager.js +167 -167
- package/src/documentViewer/providers/pdfViewer/pdfjs/searchEngine.js +451 -451
- package/src/documentViewer/providers/pdfViewer/pdfjs/textManager.js +252 -252
- package/src/documentViewer/providers/pdfViewer/pdfjs/viewer.js +299 -299
- package/src/documentViewer/providers/pdfViewer/pdfjs/viewer.tpl +16 -16
- package/src/documentViewer/providers/pdfViewer/pdfjs/wrapper.js +351 -351
- package/src/documentViewer/providers/pdfViewer.js +93 -93
- package/src/documentViewer/scss/documentViewer.scss +184 -184
- package/src/documentViewer/viewerFactory.js +191 -191
- package/src/documentViewer.js +238 -238
- package/src/dropdown/css/dropdown.css +7 -7
- package/src/dropdown/css/dropdown.css.map +1 -1
- package/src/dropdown/scss/dropdown.scss +99 -99
- package/src/dropdown/tpl/dropdown.tpl +8 -8
- package/src/dropdown/tpl/list-item.tpl +4 -4
- package/src/dropdown.js +255 -255
- package/src/durationer.js +222 -222
- package/src/dynamicComponent/css/dynamicComponent.css +7 -7
- package/src/dynamicComponent/css/dynamicComponent.css.map +1 -1
- package/src/dynamicComponent/scss/dynamicComponent.scss +98 -98
- package/src/dynamicComponent/tpl/layout.tpl +17 -17
- package/src/dynamicComponent.js +554 -554
- package/src/feedback/feedback.tpl +7 -7
- package/src/feedback.js +295 -295
- package/src/figure/FigureStateActive.js +174 -174
- package/src/filesender.js +114 -114
- package/src/filter/template.tpl +5 -5
- package/src/filter.js +135 -135
- package/src/form/css/dropdownForm.css +7 -7
- package/src/form/css/dropdownForm.css.map +1 -1
- package/src/form/css/form.css +7 -7
- package/src/form/css/form.css.map +1 -1
- package/src/form/dropdownForm.js +281 -281
- package/src/form/form.js +688 -688
- package/src/form/scss/dropdownForm.scss +60 -60
- package/src/form/scss/form.scss +25 -25
- package/src/form/simpleForm.js +125 -125
- package/src/form/tpl/dropdownForm.tpl +4 -4
- package/src/form/tpl/form.tpl +7 -7
- package/src/form/validator/css/validator.css +7 -7
- package/src/form/validator/css/validator.css.map +1 -1
- package/src/form/validator/renderer.js +118 -118
- package/src/form/validator/scss/validator.scss +14 -14
- package/src/form/validator/tpl/message.tpl +1 -1
- package/src/form/validator/tpl/validator.tpl +1 -1
- package/src/form/validator/validator.js +220 -220
- package/src/form/widget/css/widget.css +7 -7
- package/src/form/widget/css/widget.css.map +1 -1
- package/src/form/widget/definitions.js +51 -51
- package/src/form/widget/loader.js +40 -40
- package/src/form/widget/providers/checkBox.js +138 -138
- package/src/form/widget/providers/comboBox.js +63 -63
- package/src/form/widget/providers/default.js +90 -90
- package/src/form/widget/providers/hidden.js +62 -62
- package/src/form/widget/providers/hiddenBox.js +152 -152
- package/src/form/widget/providers/radioBox.js +99 -99
- package/src/form/widget/providers/textArea.js +52 -52
- package/src/form/widget/providers/textBox.js +48 -48
- package/src/form/widget/scss/widget.scss +55 -55
- package/src/form/widget/tpl/checkBox.tpl +25 -25
- package/src/form/widget/tpl/comboBox.tpl +13 -13
- package/src/form/widget/tpl/hidden.tpl +1 -1
- package/src/form/widget/tpl/hiddenBox.tpl +17 -17
- package/src/form/widget/tpl/label.tpl +6 -6
- package/src/form/widget/tpl/radioBox.tpl +25 -25
- package/src/form/widget/tpl/textArea.tpl +8 -8
- package/src/form/widget/tpl/widget.tpl +8 -8
- package/src/form/widget/widget.js +372 -372
- package/src/form.js +53 -53
- package/src/formValidator/formValidator.js +253 -253
- package/src/formValidator/highlighters/highlighter.js +102 -102
- package/src/formValidator/highlighters/message.js +70 -70
- package/src/formValidator/highlighters/tooltip.js +78 -78
- package/src/generis/form/css/form.css +7 -7
- package/src/generis/form/css/form.css.map +1 -1
- package/src/generis/form/form.js +239 -239
- package/src/generis/form/readme.md +70 -70
- package/src/generis/form/scss/form.scss +23 -23
- package/src/generis/form/tpl/form.tpl +16 -16
- package/src/generis/validator/css/validator.css +7 -7
- package/src/generis/validator/css/validator.css.map +1 -1
- package/src/generis/validator/readme.md +46 -46
- package/src/generis/validator/scss/validator.scss +13 -13
- package/src/generis/validator/validator.js +128 -128
- package/src/generis/widget/checkBox/checkBox.js +112 -112
- package/src/generis/widget/checkBox/checkBox.tpl +18 -18
- package/src/generis/widget/comboBox/comboBox.js +67 -67
- package/src/generis/widget/comboBox/comboBox.tpl +12 -12
- package/src/generis/widget/css/widget.css +7 -7
- package/src/generis/widget/css/widget.css.map +1 -1
- package/src/generis/widget/hiddenBox/hiddenBox.js +132 -132
- package/src/generis/widget/hiddenBox/hiddenBox.tpl +16 -16
- package/src/generis/widget/loader.js +49 -49
- package/src/generis/widget/readme.md +59 -59
- package/src/generis/widget/scss/widget.scss +61 -61
- package/src/generis/widget/textBox/textBox.js +65 -65
- package/src/generis/widget/textBox/textBox.tpl +7 -7
- package/src/generis/widget/widget.js +164 -164
- package/src/generis/widget/widget.tpl +5 -5
- package/src/groupedComboBox.js +99 -99
- package/src/groupvalidator.js +84 -84
- package/src/hider.js +88 -88
- package/src/highlighter.js +1166 -1166
- package/src/image/ImgStateActive/extractLabel.js +29 -29
- package/src/image/ImgStateActive/helper.js +36 -36
- package/src/image/ImgStateActive/initHelper.js +137 -137
- package/src/image/ImgStateActive/initMediaEditor.js +92 -92
- package/src/image/ImgStateActive/mediaSizer.js +63 -63
- package/src/image/ImgStateActive.js +115 -115
- package/src/incrementer.js +319 -319
- package/src/inplacer.js +316 -316
- package/src/interactUtils.js +140 -140
- package/src/itemButtonList/css/item-button-list.css +23 -24
- package/src/itemButtonList/css/item-button-list.css.map +1 -1
- package/src/itemButtonList/scss/item-button-list.scss +236 -236
- package/src/itemButtonList/tpl/itemButtonList.tpl +21 -21
- package/src/itemButtonList.js +274 -274
- package/src/keyNavigation/navigableDomElement.js +282 -282
- package/src/keyNavigation/navigator.js +543 -543
- package/src/listbox/css/listbox.css +7 -7
- package/src/listbox/css/listbox.css.map +1 -1
- package/src/listbox/scss/listbox.scss +116 -116
- package/src/listbox/tpl/list.tpl +14 -14
- package/src/listbox/tpl/main.tpl +9 -9
- package/src/listbox.js +251 -251
- package/src/liststyler.js +155 -155
- package/src/loadingButton/css/button.css +7 -7
- package/src/loadingButton/css/button.css.map +1 -1
- package/src/loadingButton/loadingButton.js +110 -110
- package/src/loadingButton/scss/button.scss +41 -41
- package/src/loadingButton/tpl/button.tpl +5 -5
- package/src/lock/lock.tpl +16 -16
- package/src/lock.js +395 -395
- package/src/login/login.js +322 -322
- package/src/login/tpl/login.tpl +29 -29
- package/src/login/tpl/passwordReveal.tpl +7 -7
- package/src/maths/calculator/basicCalculator.js +55 -55
- package/src/maths/calculator/calculatorComponent.js +128 -128
- package/src/maths/calculator/core/areaBroker.js +38 -38
- package/src/maths/calculator/core/board.js +841 -841
- package/src/maths/calculator/core/expression.js +430 -430
- package/src/maths/calculator/core/labels.js +116 -116
- package/src/maths/calculator/core/plugin.js +40 -40
- package/src/maths/calculator/core/terms.js +459 -459
- package/src/maths/calculator/core/tokenizer.js +245 -245
- package/src/maths/calculator/core/tokens.js +178 -178
- package/src/maths/calculator/core/tpl/board.tpl +4 -4
- package/src/maths/calculator/css/calculator.css +7 -7
- package/src/maths/calculator/css/calculator.css.map +1 -1
- package/src/maths/calculator/defaultCalculator.js +66 -66
- package/src/maths/calculator/plugins/core/degrad.js +90 -90
- package/src/maths/calculator/plugins/core/history.js +166 -166
- package/src/maths/calculator/plugins/core/remind.js +96 -96
- package/src/maths/calculator/plugins/core/stepNavigation.js +175 -175
- package/src/maths/calculator/plugins/keyboard/templateKeyboard/defaultTemplate.tpl +36 -36
- package/src/maths/calculator/plugins/keyboard/templateKeyboard/templateKeyboard.js +91 -91
- package/src/maths/calculator/plugins/modifiers/pow10.js +143 -143
- package/src/maths/calculator/plugins/modifiers/sign.js +339 -339
- package/src/maths/calculator/plugins/screen/simpleScreen/defaultTemplate.tpl +3 -3
- package/src/maths/calculator/plugins/screen/simpleScreen/history.tpl +3 -3
- package/src/maths/calculator/plugins/screen/simpleScreen/simpleScreen.js +191 -191
- package/src/maths/calculator/pluginsLoader.js +46 -46
- package/src/maths/calculator/scientificCalculator.js +74 -74
- package/src/maths/calculator/scss/calculator.scss +396 -396
- package/src/maths/calculator/tpl/basicKeyboard.tpl +37 -37
- package/src/maths/calculator/tpl/basicScreen.tpl +2 -2
- package/src/maths/calculator/tpl/scientificKeyboard.tpl +61 -61
- package/src/maths/calculator/tpl/scientificScreen.tpl +3 -3
- package/src/mediaEditor/mediaEditorComponent.js +141 -141
- package/src/mediaEditor/plugins/mediaAlignment/helper.js +62 -62
- package/src/mediaEditor/plugins/mediaAlignment/mediaAlignmentComponent.js +99 -99
- package/src/mediaEditor/plugins/mediaAlignment/style.css +7 -7
- package/src/mediaEditor/plugins/mediaAlignment/tpl/mediaAlignment.tpl +25 -25
- package/src/mediaEditor/plugins/mediaDimension/helper.js +189 -189
- package/src/mediaEditor/plugins/mediaDimension/mediaDimensionComponent.js +561 -561
- package/src/mediaEditor/plugins/mediaDimension/style.css +141 -141
- package/src/mediaEditor/plugins/mediaDimension/tpl/mediaDimension.tpl +55 -55
- package/src/mediaEditor/tpl/editor.tpl +4 -4
- package/src/mediaplayer/css/player.css +7 -7
- package/src/mediaplayer/css/player.css.map +1 -1
- package/src/mediaplayer/players/html5.js +564 -564
- package/src/mediaplayer/players/youtube.js +323 -323
- package/src/mediaplayer/players.js +29 -29
- package/src/mediaplayer/readme.md +305 -305
- package/src/mediaplayer/scss/player.scss +569 -569
- package/src/mediaplayer/support.js +126 -126
- package/src/mediaplayer/tpl/audio.tpl +6 -6
- package/src/mediaplayer/tpl/player.tpl +37 -37
- package/src/mediaplayer/tpl/source.tpl +1 -1
- package/src/mediaplayer/tpl/video.tpl +6 -6
- package/src/mediaplayer/tpl/youtube.tpl +1 -1
- package/src/mediaplayer/utils/reminder.js +184 -184
- package/src/mediaplayer/utils/timeObserver.js +143 -143
- package/src/mediaplayer/youtubeManager.js +161 -161
- package/src/mediaplayer.js +1606 -1606
- package/src/mediasizer/mediasizer.tpl +55 -55
- package/src/mediasizer.js +635 -635
- package/src/modal.js +365 -365
- package/src/movableComponent.js +78 -78
- package/src/pageSizeSelector/tpl/pageSizeSelector.tpl +9 -9
- package/src/pageSizeSelector.js +107 -107
- package/src/pageStatus.js +147 -147
- package/src/pagination/css/pagination.css +7 -7
- package/src/pagination/css/pagination.css.map +1 -1
- package/src/pagination/paginationStrategy.js +53 -53
- package/src/pagination/providers/pages.js +161 -161
- package/src/pagination/providers/simple.js +74 -74
- package/src/pagination/providers/tpl/pages/page.tpl +1 -1
- package/src/pagination/providers/tpl/pages.tpl +8 -8
- package/src/pagination/providers/tpl/simple.tpl +7 -7
- package/src/pagination/scss/pagination.scss +111 -111
- package/src/pagination.js +237 -237
- package/src/previewer.js +300 -300
- package/src/progressbar.js +165 -165
- package/src/propertySelector/css/propertySelector.css +74 -0
- package/src/propertySelector/css/propertySelector.css.map +1 -0
- package/src/propertySelector/propertySelector.js +286 -0
- package/src/propertySelector/scss/propertySelector.scss +66 -0
- package/src/propertySelector/tpl/highlighted-text.tpl +1 -0
- package/src/propertySelector/tpl/property-description.tpl +13 -0
- package/src/propertySelector/tpl/property-selector.tpl +7 -0
- package/src/report/feedback.tpl +11 -11
- package/src/report/layout.tpl +10 -10
- package/src/report.js +184 -184
- package/src/resource/css/selector.css +7 -7
- package/src/resource/css/selector.css.map +1 -1
- package/src/resource/filters.js +208 -208
- package/src/resource/list.js +200 -200
- package/src/resource/scss/_filters.scss +26 -26
- package/src/resource/scss/_resource-list.scss +107 -107
- package/src/resource/scss/_resource-tree.scss +205 -205
- package/src/resource/scss/selector.scss +187 -187
- package/src/resource/selectable.js +322 -322
- package/src/resource/selector.js +871 -871
- package/src/resource/tpl/filters.tpl +2 -2
- package/src/resource/tpl/list.tpl +7 -7
- package/src/resource/tpl/listNode.tpl +4 -4
- package/src/resource/tpl/selector.tpl +46 -46
- package/src/resource/tpl/tree.tpl +4 -4
- package/src/resource/tpl/treeNode.tpl +30 -30
- package/src/resource/tree.js +400 -400
- package/src/resourcemgr/css/resourcemgr.css +7 -7
- package/src/resourcemgr/css/resourcemgr.css.map +1 -1
- package/src/resourcemgr/fileBrowser.js +381 -381
- package/src/resourcemgr/filePreview.js +73 -73
- package/src/resourcemgr/fileSelector.js +348 -348
- package/src/resourcemgr/scss/resourcemgr.scss +254 -254
- package/src/resourcemgr/tpl/fileSelect.tpl +39 -39
- package/src/resourcemgr/tpl/folder.tpl +11 -11
- package/src/resourcemgr/tpl/layout.tpl +84 -84
- package/src/resourcemgr/tpl/rootFolder.tpl +13 -13
- package/src/resourcemgr/util/updatePermissions.js +53 -53
- package/src/resourcemgr.js +216 -216
- package/src/scroller.js +94 -94
- package/src/scss/basic.scss +16 -16
- package/src/searchModal/advancedSearch.js +638 -601
- package/src/searchModal/css/advancedSearch.css +7 -14
- package/src/searchModal/css/advancedSearch.css.map +1 -1
- package/src/searchModal/css/searchModal.css +28 -8
- package/src/searchModal/css/searchModal.css.map +1 -1
- package/src/searchModal/scss/advancedSearch.scss +171 -177
- package/src/searchModal/scss/searchModal.scss +393 -375
- package/src/searchModal/tpl/advanced-search.tpl +9 -9
- package/src/searchModal/tpl/criteria-alias.tpl +1 -0
- package/src/searchModal/tpl/criteria-class-label.tpl +1 -0
- package/src/searchModal/tpl/criteria-label.tpl +1 -0
- package/src/searchModal/tpl/highlighted-text.tpl +1 -0
- package/src/searchModal/tpl/info-message.tpl +3 -3
- package/src/searchModal/tpl/invalid-criteria-warning.tpl +10 -10
- package/src/searchModal/tpl/layout.tpl +27 -25
- package/src/searchModal/tpl/list-checkbox-criterion.tpl +17 -12
- package/src/searchModal/tpl/list-select-criterion.tpl +12 -6
- package/src/searchModal/tpl/property-select-button.tpl +1 -0
- package/src/searchModal/tpl/results-container.tpl +1 -0
- package/src/searchModal/tpl/text-criterion.tpl +11 -6
- package/src/searchModal.js +761 -496
- package/src/selecter.js +43 -43
- package/src/stacker.js +133 -133
- package/src/switch/css/switch.css +7 -7
- package/src/switch/css/switch.css.map +1 -1
- package/src/switch/scss/switch.scss +83 -83
- package/src/switch/switch.js +195 -195
- package/src/switch/tpl/switch.tpl +7 -7
- package/src/tableModel.js +112 -112
- package/src/tabs/css/tabs.css +12 -12
- package/src/tabs/css/tabs.css.map +1 -1
- package/src/tabs/scss/tabs.scss +50 -50
- package/src/tabs/tpl/panel.tpl +3 -3
- package/src/tabs/tpl/tabs.tpl +10 -10
- package/src/tabs.js +528 -528
- package/src/taskQueue/css/taskQueue.css +7 -7
- package/src/taskQueue/css/taskQueue.css.map +1 -1
- package/src/taskQueue/scss/taskQueue.scss +47 -47
- package/src/taskQueue/status.js +228 -228
- package/src/taskQueue/table.js +350 -350
- package/src/taskQueue/taskQueue.js +33 -33
- package/src/taskQueue/taskQueueModel.js +548 -548
- package/src/taskQueue/tpl/statusMessage.tpl +7 -7
- package/src/taskQueue.js +218 -218
- package/src/taskQueueButton/css/taskable.css +7 -7
- package/src/taskQueueButton/css/taskable.css.map +1 -1
- package/src/taskQueueButton/css/treeButton.css +7 -7
- package/src/taskQueueButton/css/treeButton.css.map +1 -1
- package/src/taskQueueButton/scss/taskable.scss +4 -4
- package/src/taskQueueButton/scss/treeButton.scss +34 -34
- package/src/taskQueueButton/standardButton.js +108 -108
- package/src/taskQueueButton/taskable.js +202 -202
- package/src/taskQueueButton/tpl/report.tpl +5 -5
- package/src/taskQueueButton/tpl/treeButton.tpl +6 -6
- package/src/taskQueueButton/treeButton.js +109 -109
- package/src/themeLoader.js +252 -252
- package/src/themes.js +162 -162
- package/src/toggler.js +200 -200
- package/src/tooltip/default.tpl +3 -3
- package/src/tooltip.js +160 -160
- package/src/tooltipster.js +25 -25
- package/src/transformer.js +327 -327
- package/src/tristateCheckboxGroup/css/tristateCheckboxGroup.css +7 -7
- package/src/tristateCheckboxGroup/css/tristateCheckboxGroup.css.map +1 -1
- package/src/tristateCheckboxGroup/scss/tristateCheckboxGroup.scss +15 -15
- package/src/tristateCheckboxGroup/tpl/li.tpl +6 -6
- package/src/tristateCheckboxGroup.js +207 -207
- package/src/uploader/fileEntry.tpl +6 -6
- package/src/uploader/uploader.tpl +32 -32
- package/src/uploader.js +594 -594
- package/src/validator/Report.js +10 -10
- package/src/validator/Validator.js +108 -108
- package/src/validator/validators.js +220 -220
- package/src/validator.js +264 -264
- package/src/waitForMedia.js +82 -82
- package/src/waitingDialog/css/waitingDialog.css +7 -7
- package/src/waitingDialog/css/waitingDialog.css.map +1 -1
- package/src/waitingDialog/scss/waitingDialog.scss +34 -34
- package/src/waitingDialog/waitingDialog.js +240 -240
package/dist/datatable.js
CHANGED
|
@@ -1,1765 +1,1740 @@
|
|
|
1
1
|
define(['jquery', 'lodash', 'i18n', 'core/pluginifier', 'handlebars', 'lib/dompurify/purify', 'ui/datatable/filterStrategy/filterStrategy', 'ui/pagination', 'layout/loading-bar', 'core/logger', 'util/httpErrorParser', 'ui/pageSizeSelector', 'css!ui/datatable/css/datatable.css'], function ($$1, _, __, Pluginifier, Handlebars, DOMPurify, filterStrategyFactory, paginationComponent, loadingBar, loggerFactory, httpErrorParser, pageSizeSelector, datatable_css) { 'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* https://github.com/cure53/DOMPurify
|
|
35
|
-
* with config SAFE_FOR_TEMPLATES: true
|
|
36
|
-
* to make output safe for template systems
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
hb.registerHelper('dompurify', function (context) {
|
|
40
|
-
return DOMPurify.sanitize(context);
|
|
41
|
-
});
|
|
42
|
-
/**
|
|
43
|
-
* Register join helper
|
|
44
|
-
*
|
|
45
|
-
* Example :
|
|
46
|
-
* var values = {a:v1, b:v2, c:v3};
|
|
47
|
-
* Using {{{join attributes '=' ' ' '"'}}} will return : a="v1" b="v2" c="v3"
|
|
48
|
-
* Using {{{join values null ' or ' '*'}}} will return : *v1* or *v2* or *v3*
|
|
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
|
+
Pluginifier = Pluginifier && Object.prototype.hasOwnProperty.call(Pluginifier, 'default') ? Pluginifier['default'] : Pluginifier;
|
|
7
|
+
Handlebars = Handlebars && Object.prototype.hasOwnProperty.call(Handlebars, 'default') ? Handlebars['default'] : Handlebars;
|
|
8
|
+
DOMPurify = DOMPurify && Object.prototype.hasOwnProperty.call(DOMPurify, 'default') ? DOMPurify['default'] : DOMPurify;
|
|
9
|
+
filterStrategyFactory = filterStrategyFactory && Object.prototype.hasOwnProperty.call(filterStrategyFactory, 'default') ? filterStrategyFactory['default'] : filterStrategyFactory;
|
|
10
|
+
paginationComponent = paginationComponent && Object.prototype.hasOwnProperty.call(paginationComponent, 'default') ? paginationComponent['default'] : paginationComponent;
|
|
11
|
+
loadingBar = loadingBar && Object.prototype.hasOwnProperty.call(loadingBar, 'default') ? loadingBar['default'] : loadingBar;
|
|
12
|
+
loggerFactory = loggerFactory && Object.prototype.hasOwnProperty.call(loggerFactory, 'default') ? loggerFactory['default'] : loggerFactory;
|
|
13
|
+
httpErrorParser = httpErrorParser && Object.prototype.hasOwnProperty.call(httpErrorParser, 'default') ? httpErrorParser['default'] : httpErrorParser;
|
|
14
|
+
pageSizeSelector = pageSizeSelector && Object.prototype.hasOwnProperty.call(pageSizeSelector, 'default') ? pageSizeSelector['default'] : pageSizeSelector;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* This program is free software; you can redistribute it and/or
|
|
18
|
+
* modify it under the terms of the GNU General Public License
|
|
19
|
+
* as published by the Free Software Foundation; under version 2
|
|
20
|
+
* of the License (non-upgradable).
|
|
21
|
+
*
|
|
22
|
+
* This program is distributed in the hope that it will be useful,
|
|
23
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
24
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
25
|
+
* GNU General Public License for more details.
|
|
26
|
+
*
|
|
27
|
+
* You should have received a copy of the GNU General Public License
|
|
28
|
+
* along with this program; if not, write to the Free Software
|
|
29
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
30
|
+
*
|
|
31
|
+
* Copyright (c) 2013-2019 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);
|
|
32
|
+
*
|
|
33
|
+
*
|
|
49
34
|
*/
|
|
35
|
+
function Helpers0 (hb) {
|
|
36
|
+
//register a i18n helper
|
|
37
|
+
hb.registerHelper('__', function (key) {
|
|
38
|
+
return __(key);
|
|
39
|
+
});
|
|
50
40
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Register dompurify helper
|
|
43
|
+
*
|
|
44
|
+
* https://github.com/cure53/DOMPurify
|
|
45
|
+
* with config SAFE_FOR_TEMPLATES: true
|
|
46
|
+
* to make output safe for template systems
|
|
47
|
+
*/
|
|
48
|
+
hb.registerHelper('dompurify', function (context) {
|
|
49
|
+
return DOMPurify.sanitize(context);
|
|
50
|
+
});
|
|
59
51
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Register join helper
|
|
54
|
+
*
|
|
55
|
+
* Example :
|
|
56
|
+
* var values = {a:v1, b:v2, c:v3};
|
|
57
|
+
* Using {{{join attributes '=' ' ' '"'}}} will return : a="v1" b="v2" c="v3"
|
|
58
|
+
* Using {{{join values null ' or ' '*'}}} will return : *v1* or *v2* or *v3*
|
|
59
|
+
*/
|
|
60
|
+
hb.registerHelper('join', function (arr, keyValueGlue, fragmentGlue, wrapper) {
|
|
61
|
+
var fragments = [];
|
|
62
|
+
keyValueGlue = typeof keyValueGlue === 'string' ? keyValueGlue : undefined;
|
|
63
|
+
fragmentGlue = typeof fragmentGlue === 'string' ? fragmentGlue : ' ';
|
|
64
|
+
wrapper = typeof wrapper === 'string' ? wrapper : '"';
|
|
65
|
+
_.forIn(arr, function (value, key) {
|
|
66
|
+
var fragment = '';
|
|
67
|
+
if (value !== null || value !== undefined) {
|
|
68
|
+
if (typeof value === 'boolean') {
|
|
69
|
+
value = value ? 'true' : 'false';
|
|
70
|
+
} else if (typeof value === 'object') {
|
|
71
|
+
value = _.values(value).join(' ');
|
|
72
|
+
}
|
|
73
|
+
} else {
|
|
74
|
+
value = '';
|
|
65
75
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
76
|
+
if (keyValueGlue !== undefined) {
|
|
77
|
+
fragment += key + keyValueGlue;
|
|
78
|
+
}
|
|
79
|
+
fragment += wrapper + value + wrapper;
|
|
80
|
+
fragments.push(fragment);
|
|
81
|
+
});
|
|
82
|
+
return fragments.join(fragmentGlue);
|
|
83
|
+
});
|
|
69
84
|
|
|
70
|
-
|
|
71
|
-
|
|
85
|
+
//register a classic "for loop" helper
|
|
86
|
+
//it also adds a local variable "i" as the index in each iteration loop
|
|
87
|
+
hb.registerHelper('for', function (startIndex, stopIndex, increment, options) {
|
|
88
|
+
var ret = '';
|
|
89
|
+
startIndex = parseInt(startIndex);
|
|
90
|
+
stopIndex = parseInt(stopIndex);
|
|
91
|
+
increment = parseInt(increment);
|
|
92
|
+
for (var i = startIndex; i < stopIndex; i += increment) {
|
|
93
|
+
ret += options.fn(_.extend({}, this, {
|
|
94
|
+
i: i
|
|
95
|
+
}));
|
|
96
|
+
}
|
|
97
|
+
return ret;
|
|
98
|
+
});
|
|
99
|
+
hb.registerHelper('equal', function (var1, var2, options) {
|
|
100
|
+
if (var1 == var2) {
|
|
101
|
+
return options.fn(this);
|
|
102
|
+
} else {
|
|
103
|
+
return options.inverse(this);
|
|
72
104
|
}
|
|
73
|
-
|
|
74
|
-
fragment += wrapper + value + wrapper;
|
|
75
|
-
fragments.push(fragment);
|
|
76
105
|
});
|
|
77
106
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
107
|
+
// register a "get property" helper
|
|
108
|
+
// it gets the named property from the provided context
|
|
109
|
+
hb.registerHelper('property', function (name, context) {
|
|
110
|
+
return context[name] || '';
|
|
111
|
+
});
|
|
81
112
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
113
|
+
// register an 'includes' helper
|
|
114
|
+
// it checks if value is in array
|
|
115
|
+
hb.registerHelper('includes', function (haystack, needle, options) {
|
|
116
|
+
if (_.contains(haystack, needle)) {
|
|
117
|
+
return options.fn(this);
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
}
|
|
87
121
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
122
|
+
if (!Helpers0.__initialized) {
|
|
123
|
+
Helpers0(Handlebars);
|
|
124
|
+
Helpers0.__initialized = true;
|
|
125
|
+
}
|
|
126
|
+
var Template = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
|
127
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
|
128
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
|
129
|
+
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, helperMissing=helpers.helperMissing;
|
|
130
|
+
|
|
131
|
+
function program1(depth0,data) {
|
|
132
|
+
|
|
133
|
+
var buffer = "", stack1;
|
|
134
|
+
buffer += "\n <aside class=\"filter\" data-column=\""
|
|
135
|
+
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.filter)),stack1 == null || stack1 === false ? stack1 : stack1.columns)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
|
136
|
+
+ "\">\n <input type=\"text\" value=\"\" name=\"filter\" placeholder=\""
|
|
137
|
+
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.labels)),stack1 == null || stack1 === false ? stack1 : stack1.filter)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
|
138
|
+
+ "\">\n <button class=\"icon-find\" type=\"button\"></button>\n </aside>\n ";
|
|
139
|
+
return buffer;
|
|
92
140
|
}
|
|
93
141
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
142
|
+
function program3(depth0,data,depth1) {
|
|
143
|
+
|
|
144
|
+
var buffer = "", stack1, helper;
|
|
145
|
+
buffer += "\n <h2>\n <span class=\"empty-list hidden\">";
|
|
146
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.empty), {hash:{},inverse:self.programWithDepth(6, program6, data, depth1),fn:self.program(4, program4, data),data:data});
|
|
147
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
148
|
+
buffer += "</span>\n <span class=\"available-list hidden\">\n <span class=\"text\">";
|
|
149
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.available), {hash:{},inverse:self.programWithDepth(10, program10, data, depth1),fn:self.program(8, program8, data),data:data});
|
|
150
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
151
|
+
buffer += "</span>:\n <span class=\"count\">";
|
|
152
|
+
if (helper = helpers.count) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
153
|
+
else { helper = (depth0 && depth0.count); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
154
|
+
buffer += escapeExpression(stack1)
|
|
155
|
+
+ "</span>\n </span>\n <span class=\"loading\">";
|
|
156
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.loading), {hash:{},inverse:self.programWithDepth(14, program14, data, depth1),fn:self.program(12, program12, data),data:data});
|
|
157
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
158
|
+
buffer += "...</span>\n </h2>\n ";
|
|
159
|
+
return buffer;
|
|
160
|
+
}
|
|
161
|
+
function program4(depth0,data) {
|
|
162
|
+
|
|
163
|
+
var stack1, helper;
|
|
164
|
+
if (helper = helpers.empty) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
165
|
+
else { helper = (depth0 && depth0.empty); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
166
|
+
return escapeExpression(stack1);
|
|
101
167
|
}
|
|
102
|
-
}); // register a "get property" helper
|
|
103
|
-
// it gets the named property from the provided context
|
|
104
|
-
|
|
105
|
-
hb.registerHelper('property', function (name, context) {
|
|
106
|
-
return context[name] || '';
|
|
107
|
-
}); // register an 'includes' helper
|
|
108
|
-
// it checks if value is in array
|
|
109
168
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
169
|
+
function program6(depth0,data,depth2) {
|
|
170
|
+
|
|
171
|
+
var stack1;
|
|
172
|
+
return escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth2 && depth2.options)),stack1 == null || stack1 === false ? stack1 : stack1.labels)),stack1 == null || stack1 === false ? stack1 : stack1.empty)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
|
|
113
173
|
}
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
if (!Helpers0.__initialized) {
|
|
118
|
-
Helpers0(Handlebars);
|
|
119
|
-
Helpers0.__initialized = true;
|
|
120
|
-
}
|
|
121
|
-
var Template = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
|
122
|
-
this.compilerInfo = [4,'>= 1.0.0'];
|
|
123
|
-
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
|
124
|
-
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, helperMissing=helpers.helperMissing;
|
|
125
|
-
|
|
126
|
-
function program1(depth0,data) {
|
|
127
|
-
|
|
128
|
-
var buffer = "", stack1;
|
|
129
|
-
buffer += "\r\n <aside class=\"filter\" data-column=\""
|
|
130
|
-
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.filter)),stack1 == null || stack1 === false ? stack1 : stack1.columns)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
|
131
|
-
+ "\">\r\n <input type=\"text\" value=\"\" name=\"filter\" placeholder=\""
|
|
132
|
-
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.labels)),stack1 == null || stack1 === false ? stack1 : stack1.filter)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
|
133
|
-
+ "\">\r\n <button class=\"icon-find\" type=\"button\"></button>\r\n </aside>\r\n ";
|
|
134
|
-
return buffer;
|
|
135
|
-
}
|
|
136
174
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
stack1 = helpers['if'].call(depth0, (depth0 && depth0.available), {hash:{},inverse:self.programWithDepth(10, program10, data, depth1),fn:self.program(8, program8, data),data:data});
|
|
145
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
146
|
-
buffer += "</span>:\r\n <span class=\"count\">";
|
|
147
|
-
if (helper = helpers.count) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
148
|
-
else { helper = (depth0 && depth0.count); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
149
|
-
buffer += escapeExpression(stack1)
|
|
150
|
-
+ "</span>\r\n </span>\r\n <span class=\"loading\">";
|
|
151
|
-
stack1 = helpers['if'].call(depth0, (depth0 && depth0.loading), {hash:{},inverse:self.programWithDepth(14, program14, data, depth1),fn:self.program(12, program12, data),data:data});
|
|
152
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
153
|
-
buffer += "...</span>\r\n </h2>\r\n ";
|
|
154
|
-
return buffer;
|
|
155
|
-
}
|
|
156
|
-
function program4(depth0,data) {
|
|
157
|
-
|
|
158
|
-
var stack1, helper;
|
|
159
|
-
if (helper = helpers.empty) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
160
|
-
else { helper = (depth0 && depth0.empty); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
161
|
-
return escapeExpression(stack1);
|
|
162
|
-
}
|
|
175
|
+
function program8(depth0,data) {
|
|
176
|
+
|
|
177
|
+
var stack1, helper;
|
|
178
|
+
if (helper = helpers.available) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
179
|
+
else { helper = (depth0 && depth0.available); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
180
|
+
return escapeExpression(stack1);
|
|
181
|
+
}
|
|
163
182
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
183
|
+
function program10(depth0,data,depth2) {
|
|
184
|
+
|
|
185
|
+
var stack1;
|
|
186
|
+
return escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth2 && depth2.options)),stack1 == null || stack1 === false ? stack1 : stack1.labels)),stack1 == null || stack1 === false ? stack1 : stack1.available)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
|
|
187
|
+
}
|
|
169
188
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
189
|
+
function program12(depth0,data) {
|
|
190
|
+
|
|
191
|
+
var stack1, helper;
|
|
192
|
+
if (helper = helpers.loading) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
193
|
+
else { helper = (depth0 && depth0.loading); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
194
|
+
return escapeExpression(stack1);
|
|
195
|
+
}
|
|
177
196
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
197
|
+
function program14(depth0,data,depth2) {
|
|
198
|
+
|
|
199
|
+
var stack1;
|
|
200
|
+
return escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth2 && depth2.options)),stack1 == null || stack1 === false ? stack1 : stack1.labels)),stack1 == null || stack1 === false ? stack1 : stack1.loading)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
|
|
201
|
+
}
|
|
183
202
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
return escapeExpression(stack1);
|
|
190
|
-
}
|
|
203
|
+
function program16(depth0,data) {
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
return "\n <div class=\"toolbox-container\"></div>\n ";
|
|
207
|
+
}
|
|
191
208
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
209
|
+
function program18(depth0,data) {
|
|
210
|
+
|
|
211
|
+
var buffer = "", stack1;
|
|
212
|
+
buffer += "\n <aside class=\"action-bar clearfix\">\n ";
|
|
213
|
+
stack1 = helpers.each.call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.tools), {hash:{},inverse:self.noop,fn:self.program(19, program19, data),data:data});
|
|
214
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
215
|
+
buffer += "\n </aside>\n ";
|
|
216
|
+
return buffer;
|
|
217
|
+
}
|
|
218
|
+
function program19(depth0,data) {
|
|
219
|
+
|
|
220
|
+
var buffer = "", stack1;
|
|
221
|
+
buffer += "\n <button class=\"btn-info small tool-";
|
|
222
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.id), {hash:{},inverse:self.program(22, program22, data),fn:self.program(20, program20, data),data:data});
|
|
223
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
224
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.massAction), {hash:{},inverse:self.noop,fn:self.program(24, program24, data),data:data});
|
|
225
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
226
|
+
buffer += "\"\n ";
|
|
227
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.title), {hash:{},inverse:self.noop,fn:self.program(26, program26, data),data:data});
|
|
228
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
229
|
+
buffer += ">\n <span class=\"icon-";
|
|
230
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.icon), {hash:{},inverse:self.program(30, program30, data),fn:self.program(28, program28, data),data:data});
|
|
231
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
232
|
+
buffer += "\"></span>\n ";
|
|
233
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.label), {hash:{},inverse:self.program(35, program35, data),fn:self.program(33, program33, data),data:data});
|
|
234
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
235
|
+
buffer += "\n </button>\n ";
|
|
236
|
+
return buffer;
|
|
237
|
+
}
|
|
238
|
+
function program20(depth0,data) {
|
|
239
|
+
|
|
240
|
+
var stack1, helper;
|
|
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
|
+
return escapeExpression(stack1);
|
|
244
|
+
}
|
|
197
245
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
246
|
+
function program22(depth0,data) {
|
|
247
|
+
|
|
248
|
+
var stack1;
|
|
249
|
+
return escapeExpression(((stack1 = (data == null || data === false ? data : data.index)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
|
|
250
|
+
}
|
|
203
251
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
210
|
-
buffer += "\r\n </aside>\r\n ";
|
|
211
|
-
return buffer;
|
|
212
|
-
}
|
|
213
|
-
function program19(depth0,data) {
|
|
214
|
-
|
|
215
|
-
var buffer = "", stack1;
|
|
216
|
-
buffer += "\r\n <button class=\"btn-info small tool-";
|
|
217
|
-
stack1 = helpers['if'].call(depth0, (depth0 && depth0.id), {hash:{},inverse:self.program(22, program22, data),fn:self.program(20, program20, data),data:data});
|
|
218
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
219
|
-
stack1 = helpers['if'].call(depth0, (depth0 && depth0.massAction), {hash:{},inverse:self.noop,fn:self.program(24, program24, data),data:data});
|
|
220
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
221
|
-
buffer += "\"\r\n ";
|
|
222
|
-
stack1 = helpers['if'].call(depth0, (depth0 && depth0.title), {hash:{},inverse:self.noop,fn:self.program(26, program26, data),data:data});
|
|
223
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
224
|
-
buffer += ">\r\n <span class=\"icon-";
|
|
225
|
-
stack1 = helpers['if'].call(depth0, (depth0 && depth0.icon), {hash:{},inverse:self.program(30, program30, data),fn:self.program(28, program28, data),data:data});
|
|
226
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
227
|
-
buffer += "\"></span>\r\n ";
|
|
228
|
-
stack1 = helpers['if'].call(depth0, (depth0 && depth0.label), {hash:{},inverse:self.program(35, program35, data),fn:self.program(33, program33, data),data:data});
|
|
229
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
230
|
-
buffer += "\r\n </button>\r\n ";
|
|
231
|
-
return buffer;
|
|
232
|
-
}
|
|
233
|
-
function program20(depth0,data) {
|
|
234
|
-
|
|
235
|
-
var stack1, helper;
|
|
236
|
-
if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
237
|
-
else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
238
|
-
return escapeExpression(stack1);
|
|
239
|
-
}
|
|
252
|
+
function program24(depth0,data) {
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
return " invisible";
|
|
256
|
+
}
|
|
240
257
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
258
|
+
function program26(depth0,data) {
|
|
259
|
+
|
|
260
|
+
var buffer = "", stack1, helper;
|
|
261
|
+
buffer += " title=\"";
|
|
262
|
+
if (helper = helpers.title) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
263
|
+
else { helper = (depth0 && depth0.title); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
264
|
+
buffer += escapeExpression(stack1)
|
|
265
|
+
+ "\"";
|
|
266
|
+
return buffer;
|
|
267
|
+
}
|
|
246
268
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
269
|
+
function program28(depth0,data) {
|
|
270
|
+
|
|
271
|
+
var stack1, helper;
|
|
272
|
+
if (helper = helpers.icon) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
273
|
+
else { helper = (depth0 && depth0.icon); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
274
|
+
return escapeExpression(stack1);
|
|
275
|
+
}
|
|
252
276
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
277
|
+
function program30(depth0,data) {
|
|
278
|
+
|
|
279
|
+
var stack1;
|
|
280
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.id), {hash:{},inverse:self.program(31, program31, data),fn:self.program(20, program20, data),data:data});
|
|
281
|
+
if(stack1 || stack1 === 0) { return stack1; }
|
|
282
|
+
else { return ''; }
|
|
283
|
+
}
|
|
284
|
+
function program31(depth0,data) {
|
|
285
|
+
|
|
286
|
+
var stack1;
|
|
287
|
+
return escapeExpression(((stack1 = (data == null || data === false ? data : data.key)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
|
|
288
|
+
}
|
|
263
289
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
290
|
+
function program33(depth0,data) {
|
|
291
|
+
|
|
292
|
+
var stack1, helper;
|
|
293
|
+
if (helper = helpers.label) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
294
|
+
else { helper = (depth0 && depth0.label); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
295
|
+
return escapeExpression(stack1);
|
|
296
|
+
}
|
|
271
297
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
function program31(depth0,data) {
|
|
280
|
-
|
|
281
|
-
var stack1;
|
|
282
|
-
return escapeExpression(((stack1 = (data == null || data === false ? data : data.key)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
|
|
283
|
-
}
|
|
298
|
+
function program35(depth0,data) {
|
|
299
|
+
|
|
300
|
+
var stack1;
|
|
301
|
+
stack1 = helpers.unless.call(depth0, (depth0 && depth0.id), {hash:{},inverse:self.noop,fn:self.program(31, program31, data),data:data});
|
|
302
|
+
if(stack1 || stack1 === 0) { return stack1; }
|
|
303
|
+
else { return ''; }
|
|
304
|
+
}
|
|
284
305
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
return escapeExpression(stack1);
|
|
291
|
-
}
|
|
306
|
+
function program37(depth0,data) {
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
return "\n <col/>\n ";
|
|
310
|
+
}
|
|
292
311
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
else { return ''; }
|
|
299
|
-
}
|
|
312
|
+
function program39(depth0,data) {
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
return "\n </col>\n ";
|
|
316
|
+
}
|
|
300
317
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
318
|
+
function program41(depth0,data) {
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
return "\n <th class=\"checkboxes\"><input type=\"checkbox\" name=\"checkall\" value=\"1\" /></th>\n ";
|
|
322
|
+
}
|
|
306
323
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
324
|
+
function program43(depth0,data) {
|
|
325
|
+
|
|
326
|
+
var buffer = "", stack1, helper;
|
|
327
|
+
buffer += "\n <th";
|
|
328
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.type), {hash:{},inverse:self.noop,fn:self.program(44, program44, data),data:data});
|
|
329
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
330
|
+
buffer += ">\n <div\n ";
|
|
331
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.sortable), {hash:{},inverse:self.noop,fn:self.program(46, program46, data),data:data});
|
|
332
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
333
|
+
buffer += ">";
|
|
334
|
+
if (helper = helpers.label) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
335
|
+
else { helper = (depth0 && depth0.label); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
336
|
+
buffer += escapeExpression(stack1);
|
|
337
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.alias), {hash:{},inverse:self.noop,fn:self.program(51, program51, data),data:data});
|
|
338
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
339
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.comment), {hash:{},inverse:self.noop,fn:self.program(53, program53, data),data:data});
|
|
340
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
341
|
+
buffer += "</div>\n ";
|
|
342
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.filterable), {hash:{},inverse:self.noop,fn:self.program(55, program55, data),data:data});
|
|
343
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
344
|
+
buffer += "\n </th>\n ";
|
|
345
|
+
return buffer;
|
|
346
|
+
}
|
|
347
|
+
function program44(depth0,data) {
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
return " class=\"actions\"";
|
|
351
|
+
}
|
|
312
352
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
353
|
+
function program46(depth0,data) {
|
|
354
|
+
|
|
355
|
+
var buffer = "", stack1;
|
|
356
|
+
buffer += "\n class=\"sortable\"\n data-sort-by=\"";
|
|
357
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.sortId), {hash:{},inverse:self.program(20, program20, data),fn:self.program(47, program47, data),data:data});
|
|
358
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
359
|
+
buffer += "\"\n ";
|
|
360
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.sorttype), {hash:{},inverse:self.noop,fn:self.program(49, program49, data),data:data});
|
|
361
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
362
|
+
buffer += "\n tabindex=\"0\"\n ";
|
|
363
|
+
return buffer;
|
|
364
|
+
}
|
|
365
|
+
function program47(depth0,data) {
|
|
366
|
+
|
|
367
|
+
var stack1, helper;
|
|
368
|
+
if (helper = helpers.sortId) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
369
|
+
else { helper = (depth0 && depth0.sortId); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
370
|
+
return escapeExpression(stack1);
|
|
371
|
+
}
|
|
318
372
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
if (helper = helpers.label) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
330
|
-
else { helper = (depth0 && depth0.label); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
331
|
-
buffer += escapeExpression(stack1)
|
|
332
|
-
+ "</div>\r\n ";
|
|
333
|
-
stack1 = helpers['if'].call(depth0, (depth0 && depth0.filterable), {hash:{},inverse:self.noop,fn:self.program(49, program49, data),data:data});
|
|
334
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
335
|
-
buffer += "\r\n </th>\r\n ";
|
|
336
|
-
return buffer;
|
|
337
|
-
}
|
|
338
|
-
function program44(depth0,data) {
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
return " class=\"actions\"";
|
|
342
|
-
}
|
|
373
|
+
function program49(depth0,data) {
|
|
374
|
+
|
|
375
|
+
var buffer = "", stack1, helper;
|
|
376
|
+
buffer += "data-sort-type=\"";
|
|
377
|
+
if (helper = helpers.sorttype) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
378
|
+
else { helper = (depth0 && depth0.sorttype); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
379
|
+
buffer += escapeExpression(stack1)
|
|
380
|
+
+ "\"";
|
|
381
|
+
return buffer;
|
|
382
|
+
}
|
|
343
383
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
buffer += "\r\n tabindex=\"0\"\r\n ";
|
|
355
|
-
return buffer;
|
|
356
|
-
}
|
|
357
|
-
function program47(depth0,data) {
|
|
358
|
-
|
|
359
|
-
var buffer = "", stack1, helper;
|
|
360
|
-
buffer += "data-sort-type=\"";
|
|
361
|
-
if (helper = helpers.sorttype) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
362
|
-
else { helper = (depth0 && depth0.sorttype); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
363
|
-
buffer += escapeExpression(stack1)
|
|
364
|
-
+ "\"";
|
|
365
|
-
return buffer;
|
|
366
|
-
}
|
|
384
|
+
function program51(depth0,data) {
|
|
385
|
+
|
|
386
|
+
var buffer = "", stack1, helper;
|
|
387
|
+
buffer += " <span class=\"alias\">(";
|
|
388
|
+
if (helper = helpers.alias) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
389
|
+
else { helper = (depth0 && depth0.alias); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
390
|
+
buffer += escapeExpression(stack1)
|
|
391
|
+
+ ")</span>";
|
|
392
|
+
return buffer;
|
|
393
|
+
}
|
|
367
394
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
buffer += "\r\n </aside>\r\n ";
|
|
379
|
-
return buffer;
|
|
380
|
-
}
|
|
381
|
-
function program50(depth0,data) {
|
|
382
|
-
|
|
383
|
-
var buffer = "", stack1;
|
|
384
|
-
buffer += " customInput\" >\r\n ";
|
|
385
|
-
stack1 = ((stack1 = ((stack1 = (depth0 && depth0.customFilter)),stack1 == null || stack1 === false ? stack1 : stack1.template)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1);
|
|
386
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
387
|
-
buffer += "\r\n ";
|
|
388
|
-
return buffer;
|
|
389
|
-
}
|
|
395
|
+
function program53(depth0,data) {
|
|
396
|
+
|
|
397
|
+
var buffer = "", stack1, helper;
|
|
398
|
+
buffer += " <span class=\"comment\">/ ";
|
|
399
|
+
if (helper = helpers.comment) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
400
|
+
else { helper = (depth0 && depth0.comment); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
401
|
+
buffer += escapeExpression(stack1)
|
|
402
|
+
+ "</span>";
|
|
403
|
+
return buffer;
|
|
404
|
+
}
|
|
390
405
|
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
406
|
+
function program55(depth0,data) {
|
|
407
|
+
|
|
408
|
+
var buffer = "", stack1, helper;
|
|
409
|
+
buffer += "\n <aside data-column=\"";
|
|
410
|
+
if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
411
|
+
else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
412
|
+
buffer += escapeExpression(stack1)
|
|
413
|
+
+ "\" class=\"filter column\n ";
|
|
414
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.customFilter), {hash:{},inverse:self.program(58, program58, data),fn:self.program(56, program56, data),data:data});
|
|
415
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
416
|
+
buffer += "\n </aside>\n ";
|
|
417
|
+
return buffer;
|
|
418
|
+
}
|
|
419
|
+
function program56(depth0,data) {
|
|
420
|
+
|
|
421
|
+
var buffer = "", stack1;
|
|
422
|
+
buffer += " customInput\" >\n ";
|
|
423
|
+
stack1 = ((stack1 = ((stack1 = (depth0 && depth0.customFilter)),stack1 == null || stack1 === false ? stack1 : stack1.template)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1);
|
|
424
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
425
|
+
buffer += "\n ";
|
|
426
|
+
return buffer;
|
|
427
|
+
}
|
|
403
428
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
429
|
+
function program58(depth0,data) {
|
|
430
|
+
|
|
431
|
+
var buffer = "", stack1, helper;
|
|
432
|
+
buffer += " \">\n <input type=\"text\" value=\"\" name=\"filter[";
|
|
433
|
+
if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
434
|
+
else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
435
|
+
buffer += escapeExpression(stack1)
|
|
436
|
+
+ "]\" placeholder=\""
|
|
437
|
+
+ escapeExpression(((stack1 = ((stack1 = (depth0 && depth0.filterable)),stack1 == null || stack1 === false ? stack1 : stack1.placeholder)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
|
438
|
+
+ "\">\n <button class=\"icon-find\" type=\"button\"></button>\n ";
|
|
439
|
+
return buffer;
|
|
440
|
+
}
|
|
412
441
|
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
stack1 = helpers['if'].call(depth0, ((stack1 = (depth1 && depth1.options)),stack1 == null || stack1 === false ? stack1 : stack1.selectable), {hash:{},inverse:self.noop,fn:self.program(57, program57, data),data:data});
|
|
422
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
423
|
-
buffer += "\r\n\r\n ";
|
|
424
|
-
stack1 = helpers.each.call(depth0, ((stack1 = (depth1 && depth1.options)),stack1 == null || stack1 === false ? stack1 : stack1.model), {hash:{},inverse:self.noop,fn:self.programWithDepth(59, program59, data, depth0),data:data});
|
|
425
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
426
|
-
buffer += "\r\n\r\n ";
|
|
427
|
-
stack1 = helpers['with'].call(depth0, ((stack1 = (depth1 && depth1.options)),stack1 == null || stack1 === false ? stack1 : stack1.actions), {hash:{},inverse:self.noop,fn:self.programWithDepth(76, program76, data, depth0),data:data});
|
|
428
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
429
|
-
buffer += "\r\n </tr>\r\n ";
|
|
430
|
-
return buffer;
|
|
431
|
-
}
|
|
432
|
-
function program57(depth0,data) {
|
|
433
|
-
|
|
434
|
-
var buffer = "", stack1, helper;
|
|
435
|
-
buffer += "\r\n <td class=\"checkboxes\"><input type=\"checkbox\" name=\"cb[";
|
|
436
|
-
if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
437
|
-
else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
438
|
-
buffer += escapeExpression(stack1)
|
|
439
|
-
+ "]\" value=\"1\" /></td>\r\n ";
|
|
440
|
-
return buffer;
|
|
441
|
-
}
|
|
442
|
+
function program60(depth0,data) {
|
|
443
|
+
|
|
444
|
+
var buffer = "", stack1;
|
|
445
|
+
buffer += "\n <th class=\"actions\">"
|
|
446
|
+
+ escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.labels)),stack1 == null || stack1 === false ? stack1 : stack1.actions)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
|
447
|
+
+ "</th>\n ";
|
|
448
|
+
return buffer;
|
|
449
|
+
}
|
|
442
450
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
return buffer;
|
|
473
|
-
}
|
|
474
|
-
function program62(depth0,data,depth4) {
|
|
475
|
-
|
|
476
|
-
var buffer = "", stack1;
|
|
477
|
-
buffer += "\r\n ";
|
|
478
|
-
stack1 = helpers['with'].call(depth0, depth4, {hash:{},inverse:self.noop,fn:self.programWithDepth(63, program63, data, depth0),data:data});
|
|
479
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
480
|
-
buffer += "\r\n ";
|
|
481
|
-
return buffer;
|
|
482
|
-
}
|
|
483
|
-
function program63(depth0,data,depth1) {
|
|
484
|
-
|
|
485
|
-
var buffer = "", stack1;
|
|
486
|
-
buffer += "\r\n ";
|
|
487
|
-
stack1 = helpers.unless.call(depth0, (depth1 && depth1.hidden), {hash:{},inverse:self.noop,fn:self.programWithDepth(64, program64, data, depth1),data:data});
|
|
488
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
489
|
-
buffer += "\r\n ";
|
|
490
|
-
return buffer;
|
|
491
|
-
}
|
|
492
|
-
function program64(depth0,data,depth2) {
|
|
493
|
-
|
|
494
|
-
var buffer = "", stack1;
|
|
495
|
-
buffer += "\r\n <button class=\"btn-info small "
|
|
496
|
-
+ escapeExpression(((stack1 = (depth2 && depth2.id)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
|
497
|
-
+ "\"\r\n ";
|
|
498
|
-
stack1 = helpers['if'].call(depth0, (depth2 && depth2.title), {hash:{},inverse:self.noop,fn:self.programWithDepth(65, program65, data, depth2),data:data});
|
|
499
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
500
|
-
buffer += "\r\n ";
|
|
501
|
-
stack1 = helpers['if'].call(depth0, (depth2 && depth2.disabled), {hash:{},inverse:self.noop,fn:self.program(67, program67, data),data:data});
|
|
502
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
503
|
-
buffer += ">\r\n ";
|
|
504
|
-
stack1 = helpers['if'].call(depth0, (depth2 && depth2.icon), {hash:{},inverse:self.noop,fn:self.programWithDepth(69, program69, data, depth2),data:data});
|
|
505
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
506
|
-
buffer += "\r\n "
|
|
507
|
-
+ escapeExpression(((stack1 = (depth2 && depth2.label)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
|
508
|
-
+ "\r\n </button>\r\n ";
|
|
509
|
-
return buffer;
|
|
510
|
-
}
|
|
511
|
-
function program65(depth0,data,depth3) {
|
|
512
|
-
|
|
513
|
-
var buffer = "", stack1;
|
|
514
|
-
buffer += " title=\""
|
|
515
|
-
+ escapeExpression(((stack1 = (depth3 && depth3.title)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
|
516
|
-
+ "\"";
|
|
517
|
-
return buffer;
|
|
518
|
-
}
|
|
451
|
+
function program62(depth0,data,depth1) {
|
|
452
|
+
|
|
453
|
+
var buffer = "", stack1, helper;
|
|
454
|
+
buffer += "\n <tr data-item-identifier=\"";
|
|
455
|
+
if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
456
|
+
else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
457
|
+
buffer += escapeExpression(stack1)
|
|
458
|
+
+ "\">\n ";
|
|
459
|
+
stack1 = helpers['if'].call(depth0, ((stack1 = (depth1 && depth1.options)),stack1 == null || stack1 === false ? stack1 : stack1.selectable), {hash:{},inverse:self.noop,fn:self.program(63, program63, data),data:data});
|
|
460
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
461
|
+
buffer += "\n\n ";
|
|
462
|
+
stack1 = helpers.each.call(depth0, ((stack1 = (depth1 && depth1.options)),stack1 == null || stack1 === false ? stack1 : stack1.model), {hash:{},inverse:self.noop,fn:self.programWithDepth(65, program65, data, depth0),data:data});
|
|
463
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
464
|
+
buffer += "\n\n ";
|
|
465
|
+
stack1 = helpers['with'].call(depth0, ((stack1 = (depth1 && depth1.options)),stack1 == null || stack1 === false ? stack1 : stack1.actions), {hash:{},inverse:self.noop,fn:self.programWithDepth(82, program82, data, depth0),data:data});
|
|
466
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
467
|
+
buffer += "\n </tr>\n ";
|
|
468
|
+
return buffer;
|
|
469
|
+
}
|
|
470
|
+
function program63(depth0,data) {
|
|
471
|
+
|
|
472
|
+
var buffer = "", stack1, helper;
|
|
473
|
+
buffer += "\n <td class=\"checkboxes\"><input type=\"checkbox\" name=\"cb[";
|
|
474
|
+
if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
475
|
+
else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
476
|
+
buffer += escapeExpression(stack1)
|
|
477
|
+
+ "]\" value=\"1\" /></td>\n ";
|
|
478
|
+
return buffer;
|
|
479
|
+
}
|
|
519
480
|
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
481
|
+
function program65(depth0,data,depth1) {
|
|
482
|
+
|
|
483
|
+
var buffer = "", stack1;
|
|
484
|
+
buffer += "\n ";
|
|
485
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.type), {hash:{},inverse:self.programWithDepth(80, program80, data, depth1),fn:self.programWithDepth(66, program66, data, depth0, depth1),data:data});
|
|
486
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
487
|
+
buffer += "\n\n ";
|
|
488
|
+
return buffer;
|
|
489
|
+
}
|
|
490
|
+
function program66(depth0,data,depth1,depth2) {
|
|
491
|
+
|
|
492
|
+
var buffer = "", stack1, helper;
|
|
493
|
+
buffer += "\n <td class=\"actions ";
|
|
494
|
+
if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
495
|
+
else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
496
|
+
buffer += escapeExpression(stack1)
|
|
497
|
+
+ "\">\n ";
|
|
498
|
+
stack1 = helpers.each.call(depth0, (depth1 && depth1.actions), {hash:{},inverse:self.noop,fn:self.programWithDepth(67, program67, data, depth2),data:data});
|
|
499
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
500
|
+
buffer += "\n </td>\n ";
|
|
501
|
+
return buffer;
|
|
502
|
+
}
|
|
503
|
+
function program67(depth0,data,depth3) {
|
|
504
|
+
|
|
505
|
+
var buffer = "", stack1;
|
|
506
|
+
buffer += "\n ";
|
|
507
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.id), {hash:{},inverse:self.program(77, program77, data),fn:self.programWithDepth(68, program68, data, depth3),data:data});
|
|
508
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
509
|
+
buffer += "\n\n ";
|
|
510
|
+
return buffer;
|
|
511
|
+
}
|
|
512
|
+
function program68(depth0,data,depth4) {
|
|
513
|
+
|
|
514
|
+
var buffer = "", stack1;
|
|
515
|
+
buffer += "\n ";
|
|
516
|
+
stack1 = helpers['with'].call(depth0, depth4, {hash:{},inverse:self.noop,fn:self.programWithDepth(69, program69, data, depth0),data:data});
|
|
517
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
518
|
+
buffer += "\n ";
|
|
519
|
+
return buffer;
|
|
520
|
+
}
|
|
521
|
+
function program69(depth0,data,depth1) {
|
|
522
|
+
|
|
523
|
+
var buffer = "", stack1;
|
|
524
|
+
buffer += "\n ";
|
|
525
|
+
stack1 = helpers.unless.call(depth0, (depth1 && depth1.hidden), {hash:{},inverse:self.noop,fn:self.programWithDepth(70, program70, data, depth1),data:data});
|
|
526
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
527
|
+
buffer += "\n ";
|
|
528
|
+
return buffer;
|
|
529
|
+
}
|
|
530
|
+
function program70(depth0,data,depth2) {
|
|
531
|
+
|
|
532
|
+
var buffer = "", stack1;
|
|
533
|
+
buffer += "\n <button class=\"btn-info small "
|
|
534
|
+
+ escapeExpression(((stack1 = (depth2 && depth2.id)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
|
535
|
+
+ "\"\n ";
|
|
536
|
+
stack1 = helpers['if'].call(depth0, (depth2 && depth2.title), {hash:{},inverse:self.noop,fn:self.programWithDepth(71, program71, data, depth2),data:data});
|
|
537
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
538
|
+
buffer += "\n ";
|
|
539
|
+
stack1 = helpers['if'].call(depth0, (depth2 && depth2.disabled), {hash:{},inverse:self.noop,fn:self.program(73, program73, data),data:data});
|
|
540
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
541
|
+
buffer += ">\n ";
|
|
542
|
+
stack1 = helpers['if'].call(depth0, (depth2 && depth2.icon), {hash:{},inverse:self.noop,fn:self.programWithDepth(75, program75, data, depth2),data:data});
|
|
543
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
544
|
+
buffer += "\n "
|
|
545
|
+
+ escapeExpression(((stack1 = (depth2 && depth2.label)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
|
546
|
+
+ "\n </button>\n ";
|
|
547
|
+
return buffer;
|
|
548
|
+
}
|
|
549
|
+
function program71(depth0,data,depth3) {
|
|
550
|
+
|
|
551
|
+
var buffer = "", stack1;
|
|
552
|
+
buffer += " title=\""
|
|
553
|
+
+ escapeExpression(((stack1 = (depth3 && depth3.title)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
|
554
|
+
+ "\"";
|
|
555
|
+
return buffer;
|
|
556
|
+
}
|
|
525
557
|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
+ "\"></span>";
|
|
532
|
-
return buffer;
|
|
533
|
-
}
|
|
558
|
+
function program73(depth0,data) {
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
return " disabled=\"disabled\"";
|
|
562
|
+
}
|
|
534
563
|
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
buffer += ">\r\n ";
|
|
544
|
-
stack1 = helpers['if'].call(depth0, (depth0 && depth0.icon), {hash:{},inverse:self.noop,fn:self.program(72, program72, data),data:data});
|
|
545
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
546
|
-
buffer += "\r\n ";
|
|
547
|
-
if (helper = helpers.label) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
548
|
-
else { helper = (depth0 && depth0.label); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
549
|
-
buffer += escapeExpression(stack1)
|
|
550
|
-
+ "\r\n </button>\r\n ";
|
|
551
|
-
return buffer;
|
|
552
|
-
}
|
|
553
|
-
function program72(depth0,data) {
|
|
554
|
-
|
|
555
|
-
var buffer = "", stack1, helper;
|
|
556
|
-
buffer += "<span class=\"icon-";
|
|
557
|
-
if (helper = helpers.icon) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
558
|
-
else { helper = (depth0 && depth0.icon); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
559
|
-
buffer += escapeExpression(stack1)
|
|
560
|
-
+ "\"></span> ";
|
|
561
|
-
return buffer;
|
|
562
|
-
}
|
|
564
|
+
function program75(depth0,data,depth3) {
|
|
565
|
+
|
|
566
|
+
var buffer = "", stack1;
|
|
567
|
+
buffer += "<span class=\"icon-"
|
|
568
|
+
+ escapeExpression(((stack1 = (depth3 && depth3.icon)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
|
569
|
+
+ "\"></span>";
|
|
570
|
+
return buffer;
|
|
571
|
+
}
|
|
563
572
|
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
573
|
+
function program77(depth0,data) {
|
|
574
|
+
|
|
575
|
+
var buffer = "", stack1, helper;
|
|
576
|
+
buffer += "\n <button class=\"btn-info small "
|
|
577
|
+
+ escapeExpression(((stack1 = (data == null || data === false ? data : data.key)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
|
578
|
+
+ "\"\n ";
|
|
579
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.title), {hash:{},inverse:self.noop,fn:self.program(26, program26, data),data:data});
|
|
580
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
581
|
+
buffer += ">\n ";
|
|
582
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.icon), {hash:{},inverse:self.noop,fn:self.program(78, program78, data),data:data});
|
|
583
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
584
|
+
buffer += "\n ";
|
|
585
|
+
if (helper = helpers.label) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
586
|
+
else { helper = (depth0 && depth0.label); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
587
|
+
buffer += escapeExpression(stack1)
|
|
588
|
+
+ "\n </button>\n ";
|
|
589
|
+
return buffer;
|
|
590
|
+
}
|
|
591
|
+
function program78(depth0,data) {
|
|
592
|
+
|
|
593
|
+
var buffer = "", stack1, helper;
|
|
594
|
+
buffer += "<span class=\"icon-";
|
|
595
|
+
if (helper = helpers.icon) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
596
|
+
else { helper = (depth0 && depth0.icon); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
597
|
+
buffer += escapeExpression(stack1)
|
|
598
|
+
+ "\"></span> ";
|
|
599
|
+
return buffer;
|
|
600
|
+
}
|
|
578
601
|
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
594
|
-
buffer += "\r\n ";
|
|
595
|
-
return buffer;
|
|
596
|
-
}
|
|
597
|
-
function program78(depth0,data,depth3) {
|
|
598
|
-
|
|
599
|
-
var buffer = "", stack1;
|
|
600
|
-
buffer += "\r\n ";
|
|
601
|
-
stack1 = helpers['with'].call(depth0, depth3, {hash:{},inverse:self.noop,fn:self.programWithDepth(79, program79, data, depth0),data:data});
|
|
602
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
603
|
-
buffer += "\r\n ";
|
|
604
|
-
return buffer;
|
|
605
|
-
}
|
|
606
|
-
function program79(depth0,data,depth1) {
|
|
607
|
-
|
|
608
|
-
var buffer = "", stack1;
|
|
609
|
-
buffer += "\r\n ";
|
|
610
|
-
stack1 = helpers.unless.call(depth0, (depth1 && depth1.hidden), {hash:{},inverse:self.noop,fn:self.programWithDepth(80, program80, data, depth1),data:data});
|
|
611
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
612
|
-
buffer += "\r\n ";
|
|
613
|
-
return buffer;
|
|
614
|
-
}
|
|
615
|
-
function program80(depth0,data,depth2) {
|
|
616
|
-
|
|
617
|
-
var buffer = "", stack1;
|
|
618
|
-
buffer += "\r\n <button class=\"btn-info small "
|
|
619
|
-
+ escapeExpression(((stack1 = (depth2 && depth2.id)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
|
620
|
-
+ "\"\r\n ";
|
|
621
|
-
stack1 = helpers['if'].call(depth0, (depth2 && depth2.title), {hash:{},inverse:self.noop,fn:self.programWithDepth(65, program65, data, depth2),data:data});
|
|
622
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
623
|
-
buffer += "\r\n ";
|
|
624
|
-
stack1 = helpers['if'].call(depth0, (depth2 && depth2.disabled), {hash:{},inverse:self.noop,fn:self.program(67, program67, data),data:data});
|
|
625
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
626
|
-
buffer += ">\r\n ";
|
|
627
|
-
stack1 = helpers['if'].call(depth0, (depth2 && depth2.icon), {hash:{},inverse:self.noop,fn:self.programWithDepth(69, program69, data, depth2),data:data});
|
|
628
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
629
|
-
buffer += "\r\n "
|
|
630
|
-
+ escapeExpression(((stack1 = (depth2 && depth2.label)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
|
631
|
-
+ "\r\n </button>\r\n ";
|
|
632
|
-
return buffer;
|
|
633
|
-
}
|
|
602
|
+
function program80(depth0,data,depth2) {
|
|
603
|
+
|
|
604
|
+
var buffer = "", stack1, helper, options;
|
|
605
|
+
buffer += "\n <td class=\"";
|
|
606
|
+
if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
607
|
+
else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
608
|
+
buffer += escapeExpression(stack1)
|
|
609
|
+
+ "\">";
|
|
610
|
+
stack1 = (helper = helpers.property || (depth0 && depth0.property),options={hash:{},data:data},helper ? helper.call(depth0, (depth0 && depth0.id), depth2, options) : helperMissing.call(depth0, "property", (depth0 && depth0.id), depth2, options));
|
|
611
|
+
stack1 = (helper = helpers.dompurify || (depth0 && depth0.dompurify),options={hash:{},data:data},helper ? helper.call(depth0, stack1, options) : helperMissing.call(depth0, "dompurify", stack1, options));
|
|
612
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
613
|
+
buffer += "</td>\n ";
|
|
614
|
+
return buffer;
|
|
615
|
+
}
|
|
634
616
|
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
617
|
+
function program82(depth0,data,depth1) {
|
|
618
|
+
|
|
619
|
+
var buffer = "", stack1;
|
|
620
|
+
buffer += "\n <td class=\"actions\">\n ";
|
|
621
|
+
stack1 = helpers.each.call(depth0, depth0, {hash:{},inverse:self.noop,fn:self.programWithDepth(83, program83, data, depth1),data:data});
|
|
622
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
623
|
+
buffer += "\n </td>\n ";
|
|
624
|
+
return buffer;
|
|
625
|
+
}
|
|
626
|
+
function program83(depth0,data,depth2) {
|
|
627
|
+
|
|
628
|
+
var buffer = "", stack1;
|
|
629
|
+
buffer += "\n ";
|
|
630
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.id), {hash:{},inverse:self.program(88, program88, data),fn:self.programWithDepth(84, program84, data, depth2),data:data});
|
|
631
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
632
|
+
buffer += "\n ";
|
|
633
|
+
return buffer;
|
|
634
|
+
}
|
|
635
|
+
function program84(depth0,data,depth3) {
|
|
636
|
+
|
|
637
|
+
var buffer = "", stack1;
|
|
638
|
+
buffer += "\n ";
|
|
639
|
+
stack1 = helpers['with'].call(depth0, depth3, {hash:{},inverse:self.noop,fn:self.programWithDepth(85, program85, data, depth0),data:data});
|
|
640
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
641
|
+
buffer += "\n ";
|
|
642
|
+
return buffer;
|
|
643
|
+
}
|
|
644
|
+
function program85(depth0,data,depth1) {
|
|
645
|
+
|
|
646
|
+
var buffer = "", stack1;
|
|
647
|
+
buffer += "\n ";
|
|
648
|
+
stack1 = helpers.unless.call(depth0, (depth1 && depth1.hidden), {hash:{},inverse:self.noop,fn:self.programWithDepth(86, program86, data, depth1),data:data});
|
|
649
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
650
|
+
buffer += "\n ";
|
|
651
|
+
return buffer;
|
|
652
|
+
}
|
|
653
|
+
function program86(depth0,data,depth2) {
|
|
654
|
+
|
|
655
|
+
var buffer = "", stack1;
|
|
656
|
+
buffer += "\n <button class=\"btn-info small "
|
|
657
|
+
+ escapeExpression(((stack1 = (depth2 && depth2.id)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
|
658
|
+
+ "\"\n ";
|
|
659
|
+
stack1 = helpers['if'].call(depth0, (depth2 && depth2.title), {hash:{},inverse:self.noop,fn:self.programWithDepth(71, program71, data, depth2),data:data});
|
|
660
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
661
|
+
buffer += "\n ";
|
|
662
|
+
stack1 = helpers['if'].call(depth0, (depth2 && depth2.disabled), {hash:{},inverse:self.noop,fn:self.program(73, program73, data),data:data});
|
|
663
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
664
|
+
buffer += ">\n ";
|
|
665
|
+
stack1 = helpers['if'].call(depth0, (depth2 && depth2.icon), {hash:{},inverse:self.noop,fn:self.programWithDepth(75, program75, data, depth2),data:data});
|
|
666
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
667
|
+
buffer += "\n "
|
|
668
|
+
+ escapeExpression(((stack1 = (depth2 && depth2.label)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
|
669
|
+
+ "\n </button>\n ";
|
|
670
|
+
return buffer;
|
|
671
|
+
}
|
|
647
672
|
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
buffer += "\r\n <div class=\"empty\">\r\n "
|
|
661
|
-
+ escapeExpression(((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.emptyText)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
|
662
|
-
+ "\r\n </div>\r\n ";
|
|
663
|
-
return buffer;
|
|
664
|
-
}
|
|
673
|
+
function program88(depth0,data) {
|
|
674
|
+
|
|
675
|
+
var buffer = "", stack1;
|
|
676
|
+
buffer += "\n <button class=\"btn-info small "
|
|
677
|
+
+ escapeExpression(((stack1 = (data == null || data === false ? data : data.key)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
|
678
|
+
+ "\"><span class=\"icon-"
|
|
679
|
+
+ escapeExpression(((stack1 = (data == null || data === false ? data : data.key)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
|
680
|
+
+ "\"></span> "
|
|
681
|
+
+ escapeExpression(((stack1 = (data == null || data === false ? data : data.key)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
|
682
|
+
+ "</button>\n ";
|
|
683
|
+
return buffer;
|
|
684
|
+
}
|
|
665
685
|
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
684
|
-
buffer += "\r\n ";
|
|
685
|
-
stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.actions), {hash:{},inverse:self.noop,fn:self.program(39, program39, data),data:data});
|
|
686
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
687
|
-
buffer += "\r\n </colgroup>\r\n <thead>\r\n <tr>\r\n ";
|
|
688
|
-
stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.selectable), {hash:{},inverse:self.noop,fn:self.program(41, program41, data),data:data});
|
|
689
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
690
|
-
buffer += "\r\n ";
|
|
691
|
-
stack1 = helpers.each.call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.model), {hash:{},inverse:self.noop,fn:self.program(43, program43, data),data:data});
|
|
692
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
693
|
-
buffer += "\r\n ";
|
|
694
|
-
stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.actions), {hash:{},inverse:self.noop,fn:self.program(54, program54, data),data:data});
|
|
695
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
696
|
-
buffer += "\r\n </tr>\r\n </thead>\r\n <tbody>\r\n ";
|
|
697
|
-
stack1 = helpers.each.call(depth0, ((stack1 = (depth0 && depth0.dataset)),stack1 == null || stack1 === false ? stack1 : stack1.data), {hash:{},inverse:self.noop,fn:self.programWithDepth(56, program56, data, depth0),data:data});
|
|
698
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
699
|
-
buffer += "\r\n </tbody>\r\n </table>\r\n ";
|
|
700
|
-
stack1 = helpers.unless.call(depth0, ((stack1 = (depth0 && depth0.dataset)),stack1 == null || stack1 === false ? stack1 : stack1.data), {hash:{},inverse:self.noop,fn:self.program(84, program84, data),data:data});
|
|
701
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
702
|
-
buffer += "\r\n </div>\r\n <div class=\"datatable-pagination-bottom\"></div>\r\n</div>\r\n";
|
|
703
|
-
return buffer;
|
|
704
|
-
});
|
|
705
|
-
function layout(data, options, asString) {
|
|
706
|
-
var html = Template(data, options);
|
|
707
|
-
return (asString || true) ? html : $(html);
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
if (!Helpers0.__initialized) {
|
|
711
|
-
Helpers0(Handlebars);
|
|
712
|
-
Helpers0.__initialized = true;
|
|
713
|
-
}
|
|
714
|
-
var Template$1 = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
|
715
|
-
this.compilerInfo = [4,'>= 1.0.0'];
|
|
716
|
-
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
|
717
|
-
var buffer = "", stack1, helper, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
|
718
|
-
|
|
719
|
-
function program1(depth0,data) {
|
|
720
|
-
|
|
721
|
-
var buffer = "", stack1, helper;
|
|
722
|
-
buffer += " title=\"";
|
|
723
|
-
if (helper = helpers.title) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
724
|
-
else { helper = (depth0 && depth0.title); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
725
|
-
buffer += escapeExpression(stack1)
|
|
726
|
-
+ "\"";
|
|
727
|
-
return buffer;
|
|
728
|
-
}
|
|
686
|
+
function program90(depth0,data) {
|
|
687
|
+
|
|
688
|
+
var buffer = "", stack1;
|
|
689
|
+
buffer += "\n ";
|
|
690
|
+
stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.emptyText), {hash:{},inverse:self.noop,fn:self.program(91, program91, data),data:data});
|
|
691
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
692
|
+
buffer += "\n ";
|
|
693
|
+
return buffer;
|
|
694
|
+
}
|
|
695
|
+
function program91(depth0,data) {
|
|
696
|
+
|
|
697
|
+
var buffer = "", stack1;
|
|
698
|
+
buffer += "\n <div class=\"empty\">\n "
|
|
699
|
+
+ escapeExpression(((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.emptyText)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
|
|
700
|
+
+ "\n </div>\n ";
|
|
701
|
+
return buffer;
|
|
702
|
+
}
|
|
729
703
|
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
704
|
+
buffer += "<div class=\"datatable-wrapper\">\n\n ";
|
|
705
|
+
stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.filter), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
|
706
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
707
|
+
buffer += "\n\n <div class=\"datatable-header\">\n ";
|
|
708
|
+
stack1 = helpers['with'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.status), {hash:{},inverse:self.noop,fn:self.programWithDepth(3, program3, data, depth0),data:data});
|
|
709
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
710
|
+
buffer += "\n\n ";
|
|
711
|
+
stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.pageSizeSelector), {hash:{},inverse:self.noop,fn:self.program(16, program16, data),data:data});
|
|
712
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
713
|
+
buffer += "\n </div>\n\n ";
|
|
714
|
+
stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.tools), {hash:{},inverse:self.noop,fn:self.program(18, program18, data),data:data});
|
|
715
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
716
|
+
buffer += "\n\n <div class=\"datatable-pagination-top\"></div>\n\n <div class=\"datatable-container\">\n <table class=\"matrix datatable\">\n <colgroup>\n ";
|
|
717
|
+
stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.selectable), {hash:{},inverse:self.noop,fn:self.program(37, program37, data),data:data});
|
|
718
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
719
|
+
buffer += "\n ";
|
|
720
|
+
stack1 = helpers.each.call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.model), {hash:{},inverse:self.noop,fn:self.program(37, program37, data),data:data});
|
|
721
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
722
|
+
buffer += "\n ";
|
|
723
|
+
stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.actions), {hash:{},inverse:self.noop,fn:self.program(39, program39, data),data:data});
|
|
724
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
725
|
+
buffer += "\n </colgroup>\n <thead>\n <tr>\n ";
|
|
726
|
+
stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.selectable), {hash:{},inverse:self.noop,fn:self.program(41, program41, data),data:data});
|
|
727
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
728
|
+
buffer += "\n ";
|
|
729
|
+
stack1 = helpers.each.call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.model), {hash:{},inverse:self.noop,fn:self.program(43, program43, data),data:data});
|
|
730
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
731
|
+
buffer += "\n ";
|
|
732
|
+
stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.actions), {hash:{},inverse:self.noop,fn:self.program(60, program60, data),data:data});
|
|
733
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
734
|
+
buffer += "\n </tr>\n </thead>\n <tbody>\n ";
|
|
735
|
+
stack1 = helpers.each.call(depth0, ((stack1 = (depth0 && depth0.dataset)),stack1 == null || stack1 === false ? stack1 : stack1.data), {hash:{},inverse:self.noop,fn:self.programWithDepth(62, program62, data, depth0),data:data});
|
|
736
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
737
|
+
buffer += "\n </tbody>\n </table>\n ";
|
|
738
|
+
stack1 = helpers.unless.call(depth0, ((stack1 = (depth0 && depth0.dataset)),stack1 == null || stack1 === false ? stack1 : stack1.data), {hash:{},inverse:self.noop,fn:self.program(90, program90, data),data:data});
|
|
739
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
740
|
+
buffer += "\n </div>\n <div class=\"datatable-pagination-bottom\"></div>\n</div>\n";
|
|
741
|
+
return buffer;
|
|
742
|
+
});
|
|
743
|
+
function layout(data, options, asString) {
|
|
744
|
+
var html = Template(data, options);
|
|
745
|
+
return (asString || true) ? html : $(html);
|
|
734
746
|
}
|
|
735
747
|
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
buffer += "<span class=\"icon-";
|
|
740
|
-
if (helper = helpers.icon) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
741
|
-
else { helper = (depth0 && depth0.icon); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
742
|
-
buffer += escapeExpression(stack1)
|
|
743
|
-
+ "\"></span>";
|
|
744
|
-
return buffer;
|
|
748
|
+
if (!Helpers0.__initialized) {
|
|
749
|
+
Helpers0(Handlebars);
|
|
750
|
+
Helpers0.__initialized = true;
|
|
745
751
|
}
|
|
752
|
+
var Template$1 = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
|
|
753
|
+
this.compilerInfo = [4,'>= 1.0.0'];
|
|
754
|
+
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
|
755
|
+
var buffer = "", stack1, helper, functionType="function", escapeExpression=this.escapeExpression, self=this;
|
|
756
|
+
|
|
757
|
+
function program1(depth0,data) {
|
|
758
|
+
|
|
759
|
+
var buffer = "", stack1, helper;
|
|
760
|
+
buffer += " title=\"";
|
|
761
|
+
if (helper = helpers.title) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
762
|
+
else { helper = (depth0 && depth0.title); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
763
|
+
buffer += escapeExpression(stack1)
|
|
764
|
+
+ "\"";
|
|
765
|
+
return buffer;
|
|
766
|
+
}
|
|
746
767
|
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
return escapeExpression(stack1);
|
|
753
|
-
}
|
|
768
|
+
function program3(depth0,data) {
|
|
769
|
+
|
|
770
|
+
|
|
771
|
+
return " disabled=\"disabled\"";
|
|
772
|
+
}
|
|
754
773
|
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
buffer += ">\r\n ";
|
|
766
|
-
stack1 = helpers['if'].call(depth0, (depth0 && depth0.icon), {hash:{},inverse:self.noop,fn:self.program(5, program5, data),data:data});
|
|
767
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
768
|
-
buffer += "\r\n ";
|
|
769
|
-
stack1 = helpers['if'].call(depth0, (depth0 && depth0.label), {hash:{},inverse:self.noop,fn:self.program(7, program7, data),data:data});
|
|
770
|
-
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
771
|
-
buffer += "\r\n</button>\r\n";
|
|
772
|
-
return buffer;
|
|
773
|
-
});
|
|
774
|
-
function buttonTpl(data, options, asString) {
|
|
775
|
-
var html = Template$1(data, options);
|
|
776
|
-
return (asString || true) ? html : $(html);
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
var ns = 'datatable';
|
|
780
|
-
var dataNs = 'ui.' + ns;
|
|
781
|
-
var defaults = {
|
|
782
|
-
atomicUpdate: false,
|
|
783
|
-
start: 0,
|
|
784
|
-
rows: 25,
|
|
785
|
-
page: 1,
|
|
786
|
-
sortby: 'id',
|
|
787
|
-
sortorder: 'asc',
|
|
788
|
-
sorttype: 'string',
|
|
789
|
-
paginationStrategyTop: 'none',
|
|
790
|
-
paginationStrategyBottom: 'simple',
|
|
791
|
-
labels: {
|
|
792
|
-
filter: __('Filter'),
|
|
793
|
-
empty: __('Nothing to list!'),
|
|
794
|
-
available: __('Available'),
|
|
795
|
-
loading: __('Loading'),
|
|
796
|
-
actions: __('Actions')
|
|
797
|
-
},
|
|
798
|
-
pageSizeSelector: false
|
|
799
|
-
};
|
|
800
|
-
var logger = loggerFactory('ui/datatable');
|
|
801
|
-
/**
|
|
802
|
-
* The CSS class used to hide an element
|
|
803
|
-
* @type {String}
|
|
804
|
-
*/
|
|
805
|
-
|
|
806
|
-
var hiddenCls = 'hidden';
|
|
807
|
-
/**
|
|
808
|
-
* Deactivate pagination's
|
|
809
|
-
* @param {Array} pagination
|
|
810
|
-
*/
|
|
811
|
-
|
|
812
|
-
var disablePagination = function disablePagination(pagination) {
|
|
813
|
-
if (pagination && pagination.length) {
|
|
814
|
-
pagination.forEach(function (step) {
|
|
815
|
-
step.disable();
|
|
816
|
-
});
|
|
817
|
-
}
|
|
818
|
-
};
|
|
819
|
-
/**
|
|
820
|
-
* Activate pagination's
|
|
821
|
-
* @param {Array} pagination
|
|
822
|
-
*/
|
|
774
|
+
function program5(depth0,data) {
|
|
775
|
+
|
|
776
|
+
var buffer = "", stack1, helper;
|
|
777
|
+
buffer += "<span class=\"icon-";
|
|
778
|
+
if (helper = helpers.icon) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
779
|
+
else { helper = (depth0 && depth0.icon); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
780
|
+
buffer += escapeExpression(stack1)
|
|
781
|
+
+ "\"></span>";
|
|
782
|
+
return buffer;
|
|
783
|
+
}
|
|
823
784
|
|
|
785
|
+
function program7(depth0,data) {
|
|
786
|
+
|
|
787
|
+
var stack1, helper;
|
|
788
|
+
if (helper = helpers.label) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
789
|
+
else { helper = (depth0 && depth0.label); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
790
|
+
return escapeExpression(stack1);
|
|
791
|
+
}
|
|
824
792
|
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
793
|
+
buffer += "<button class=\"btn-info small ";
|
|
794
|
+
if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
795
|
+
else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
796
|
+
buffer += escapeExpression(stack1)
|
|
797
|
+
+ "\"\n ";
|
|
798
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.title), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
|
|
799
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
800
|
+
buffer += "\n ";
|
|
801
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.disabled), {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data});
|
|
802
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
803
|
+
buffer += ">\n ";
|
|
804
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.icon), {hash:{},inverse:self.noop,fn:self.program(5, program5, data),data:data});
|
|
805
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
806
|
+
buffer += "\n ";
|
|
807
|
+
stack1 = helpers['if'].call(depth0, (depth0 && depth0.label), {hash:{},inverse:self.noop,fn:self.program(7, program7, data),data:data});
|
|
808
|
+
if(stack1 || stack1 === 0) { buffer += stack1; }
|
|
809
|
+
buffer += "\n</button>\n";
|
|
810
|
+
return buffer;
|
|
829
811
|
});
|
|
812
|
+
function buttonTpl(data, options, asString) {
|
|
813
|
+
var html = Template$1(data, options);
|
|
814
|
+
return (asString || true) ? html : $(html);
|
|
830
815
|
}
|
|
831
|
-
};
|
|
832
|
-
/**
|
|
833
|
-
* Helper for reading actions value in context
|
|
834
|
-
*
|
|
835
|
-
* @param {String} property
|
|
836
|
-
* @param {Object} action
|
|
837
|
-
* @param {Object} context
|
|
838
|
-
*/
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
var getPropertyValue = function getPropertyValue(property, action, context) {
|
|
842
|
-
var value = action[property];
|
|
843
|
-
return _.isFunction(value) ? value.apply(context) : value;
|
|
844
|
-
};
|
|
845
|
-
/**
|
|
846
|
-
* Update the data table status in the header
|
|
847
|
-
*
|
|
848
|
-
* @param {Object} options
|
|
849
|
-
* @param {jQueryElement} $container
|
|
850
|
-
* @param {Object} dataset
|
|
851
|
-
*/
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
var updateHeaderStatus = function updateHeaderStatus(options, $container, dataset) {
|
|
855
|
-
if (!options.status) {
|
|
856
|
-
return;
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
var $statusEmpty = $container.find('.empty-list');
|
|
860
|
-
var $statusAvailable = $container.find('.available-list');
|
|
861
|
-
var $statusCount = $statusAvailable.find('.count');
|
|
862
|
-
$container.find('.loading').addClass(hiddenCls); // when the status is enabled, the response must contain the total amount of records
|
|
863
|
-
|
|
864
|
-
var amount = dataset.amount || dataset.length;
|
|
865
816
|
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
* @param {Number} rows - count of rows, that should be returned from backend, in other words limit.
|
|
883
|
-
* @param {Number} page - number of page, that should be requested.
|
|
884
|
-
*
|
|
885
|
-
* Sorting
|
|
886
|
-
* @param {String} sortby - name of column
|
|
887
|
-
* @param {String} sortorder - order of sorting, can be 'asc' or 'desc' for ascending sorting and descending sorting respectively.
|
|
888
|
-
* @param {String} sorttype - type of sorting, can be 'string' or 'numeric' for proper sorting numeric and string values.
|
|
889
|
-
*
|
|
890
|
-
* Filtering
|
|
891
|
-
* @param {String} filterstrategy - filtering strategy. Default is single (see ui/datatable/filterStrategy/single.js).
|
|
892
|
-
* @param {String} filterquery - query string for filtering of rows.
|
|
893
|
-
* @param {String[]} filtercolumns[] - array of columns, in which will be implemented search during filtering process.
|
|
894
|
-
* For column filter it will be only one item with column name, but component has ability define list of columns for default filter (in top toolbar).
|
|
895
|
-
* Backend should correctly receive this list of columns and do search in accordance with this parameters.
|
|
896
|
-
* By default, columns are not defined, so this parameter not will be sent. If filtercolumns[] not exists, backend should search by all columns.
|
|
897
|
-
*
|
|
898
|
-
* @example of query (GET): rows=25&page=1&sortby=login&sortorder=asc&filterquery=loginame&filtercolumns[]=login
|
|
899
|
-
*
|
|
900
|
-
* @exports ui/datatable
|
|
901
|
-
*/
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
var dataTable = {
|
|
905
|
-
/**
|
|
906
|
-
* Used for generating action button action button
|
|
907
|
-
* @typedef Action
|
|
908
|
-
* @type {Object}
|
|
909
|
-
* @property {String} id ID is added to the button class
|
|
910
|
-
* @property {String} [title] Button title
|
|
911
|
-
* @property {Boolean} [disabled] When present, button should be disabled
|
|
912
|
-
* @property {String} [icon] Generate button icon
|
|
913
|
-
* @property {Boolean} [hidden] When present, button is hidden
|
|
914
|
-
* @property {Function} [action] Handler on button click
|
|
817
|
+
/**
|
|
818
|
+
* This program is free software; you can redistribute it and/or
|
|
819
|
+
* modify it under the terms of the GNU General Public License
|
|
820
|
+
* as published by the Free Software Foundation; under version 2
|
|
821
|
+
* of the License (non-upgradable).
|
|
822
|
+
*
|
|
823
|
+
* This program is distributed in the hope that it will be useful,
|
|
824
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
825
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
826
|
+
* GNU General Public License for more details.
|
|
827
|
+
*
|
|
828
|
+
* You should have received a copy of the GNU General Public License
|
|
829
|
+
* along with this program; if not, write to the Free Software
|
|
830
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
831
|
+
*
|
|
832
|
+
* Copyright (c) 2015-2020 (original work) Open Assessment Technologies SA;
|
|
915
833
|
*/
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
*
|
|
941
|
-
*
|
|
942
|
-
* id: "edit",
|
|
943
|
-
* title: __("Edit"),
|
|
944
|
-
* icon: "edit",
|
|
945
|
-
* action: editUser
|
|
946
|
-
* }
|
|
947
|
-
* ]
|
|
948
|
-
* }
|
|
834
|
+
const ns = 'datatable';
|
|
835
|
+
const dataNs = 'ui.' + ns;
|
|
836
|
+
const defaults = {
|
|
837
|
+
atomicUpdate: false,
|
|
838
|
+
start: 0,
|
|
839
|
+
rows: 25,
|
|
840
|
+
page: 1,
|
|
841
|
+
sortby: 'id',
|
|
842
|
+
sortorder: 'asc',
|
|
843
|
+
sorttype: 'string',
|
|
844
|
+
paginationStrategyTop: 'none',
|
|
845
|
+
paginationStrategyBottom: 'simple',
|
|
846
|
+
labels: {
|
|
847
|
+
filter: __('Filter'),
|
|
848
|
+
empty: __('Nothing to list!'),
|
|
849
|
+
available: __('Available'),
|
|
850
|
+
loading: __('Loading'),
|
|
851
|
+
actions: __('Actions')
|
|
852
|
+
},
|
|
853
|
+
pageSizeSelector: false
|
|
854
|
+
};
|
|
855
|
+
const logger = loggerFactory('ui/datatable');
|
|
856
|
+
|
|
857
|
+
/**
|
|
858
|
+
* The CSS class used to hide an element
|
|
859
|
+
* @type {String}
|
|
949
860
|
*/
|
|
861
|
+
const hiddenCls = 'hidden';
|
|
950
862
|
|
|
951
|
-
/**
|
|
952
|
-
*
|
|
953
|
-
*
|
|
954
|
-
* Called the jQuery way once registered by the Pluginifier.
|
|
955
|
-
* @example $('selector').datatable([], {});
|
|
956
|
-
*
|
|
957
|
-
* @constructor
|
|
958
|
-
* @param {Object} options - the plugin options.
|
|
959
|
-
* @param {String} options.url - the URL of the service used to retrieve the resources.
|
|
960
|
-
* @param {Object[]} options.model - the model definition.
|
|
961
|
-
* @param {ActionsObject | Action[]} options.actions - Generates action buttons
|
|
962
|
-
* @param {Function} options.listeners.xxx - the callback function for event xxx, parameters depends to event trigger call.
|
|
963
|
-
* @param {Boolean} options.selectable - enables the selection of rows using checkboxes.
|
|
964
|
-
* @param {Boolean} options.rowSelection - enables the selection of rows by clicking on them.
|
|
965
|
-
* @param {Object} options.tools - a list of tool buttons to display above the table.
|
|
966
|
-
* @param {Object|Boolean} options.status - allow to display a status bar.
|
|
967
|
-
* @param {Object|Boolean} options.filter - allow to display a filter bar.
|
|
968
|
-
* @param {String} options.filterStrategy - 'multiple' | 'single' -- filtered by all filters together or filtering allowed only by one field at the moment (default 'single'),
|
|
969
|
-
* @param {String} options.filterSelector - css selector for search of filter inputs, by defaul 'select, input'
|
|
970
|
-
* @param {String} options.filterTransform - transform filter value before send to server.
|
|
971
|
-
* @param {String[]} options.filter.columns - a list of columns that will be used for default filter. Can be overridden by column filter.
|
|
972
|
-
* @param {String} options.filterquery - a query string for filtering, using only in runtime.
|
|
973
|
-
* @param {String[]} options.filtercolumns - a list of columns, in that should be done search, using only in runtime.
|
|
974
|
-
* @param {String} options.paginationStrategyTop - 'none' | 'pages' | 'simple' -- 'none' by default (next/prev), 'pages' show pages and extended control for pagination
|
|
975
|
-
* @param {String} options.paginationStrategyBottom - 'none' | 'pages' | 'simple' -- 'simple' by default (next/prev), 'pages' show pages and extended control for pagination
|
|
976
|
-
* @param {Object} options.labels - list of labels in datatable interface, that can be overridden by incoming options
|
|
977
|
-
* @param {String} options.emptyText - text that will be shown when no data found for showing in the grid.
|
|
978
|
-
* @param {Boolean} options.pageSizeSelector - flag that indicates if control for changing page size should be displayed
|
|
979
|
-
* @param {Boolean} options.atomicUpdate - allowed to keep the datatable state to be able on "render" event, compare with new state and atomically update the table cells.
|
|
980
|
-
* @param {Function} options.requestInterceptor - Intercept sending AJAX request. The call of function must returns promise with provided data.
|
|
981
|
-
* @param {Object} [data] - inject predefined data to avoid the first query.
|
|
982
|
-
* @fires dataTable#create.datatable
|
|
983
|
-
* @returns {jQueryElement} for chaining
|
|
863
|
+
/**
|
|
864
|
+
* Deactivate pagination's
|
|
865
|
+
* @param {Array} pagination
|
|
984
866
|
*/
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
$elt.data("".concat(dataNs, "state"), data.data);
|
|
993
|
-
} // implement encapsulated pages for the datatable
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
$elt.paginations = [];
|
|
997
|
-
|
|
998
|
-
if (!currentOptions) {
|
|
999
|
-
//add data to the element
|
|
1000
|
-
$elt.data(dataNs, options);
|
|
1001
|
-
$elt.one('load.' + ns, function () {
|
|
1002
|
-
/**
|
|
1003
|
-
* @event dataTable#create.datatable
|
|
1004
|
-
*/
|
|
1005
|
-
$elt.trigger('create.' + ns);
|
|
1006
|
-
});
|
|
1007
|
-
|
|
1008
|
-
if (data) {
|
|
1009
|
-
dataTable._render($elt, data);
|
|
1010
|
-
} else {
|
|
1011
|
-
dataTable._query($elt);
|
|
1012
|
-
}
|
|
1013
|
-
} else {
|
|
1014
|
-
// update existing options
|
|
1015
|
-
$elt.data(dataNs, _.merge(currentOptions, options));
|
|
867
|
+
const disablePagination = pagination => {
|
|
868
|
+
if (pagination && pagination.length) {
|
|
869
|
+
pagination.forEach(step => {
|
|
870
|
+
step.disable();
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
};
|
|
1016
874
|
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
},
|
|
1021
|
-
|
|
1022
|
-
/**
|
|
1023
|
-
* Refresh the data table using current options
|
|
1024
|
-
*
|
|
1025
|
-
* Called the jQuery way once registered by the Pluginifier.
|
|
1026
|
-
* @example $('selector').datatable('refresh');
|
|
1027
|
-
*
|
|
1028
|
-
* @param {jQueryElement} $elt - plugin's element
|
|
1029
|
-
* @param {Object} [data] - Data to render immediately, prevents the query to be made.
|
|
875
|
+
/**
|
|
876
|
+
* Activate pagination's
|
|
877
|
+
* @param {Array} pagination
|
|
1030
878
|
*/
|
|
1031
|
-
|
|
1032
|
-
if (
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
879
|
+
const enablePagination = pagination => {
|
|
880
|
+
if (pagination && pagination.length) {
|
|
881
|
+
pagination.forEach(step => {
|
|
882
|
+
step.enable();
|
|
883
|
+
});
|
|
1036
884
|
}
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
/**
|
|
1040
|
-
*
|
|
1041
|
-
*
|
|
1042
|
-
* @
|
|
1043
|
-
* @param {
|
|
1044
|
-
* @param
|
|
1045
|
-
* @fires dataTable#query.datatable
|
|
885
|
+
};
|
|
886
|
+
|
|
887
|
+
/**
|
|
888
|
+
* Helper for reading actions value in context
|
|
889
|
+
*
|
|
890
|
+
* @param {String} property
|
|
891
|
+
* @param {Object} action
|
|
892
|
+
* @param {Object} context
|
|
1046
893
|
*/
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
894
|
+
const getPropertyValue = (property, action, context) => {
|
|
895
|
+
const value = action[property];
|
|
896
|
+
return _.isFunction(value) ? value.apply(context) : value;
|
|
897
|
+
};
|
|
898
|
+
|
|
899
|
+
/**
|
|
900
|
+
* Update the data table status in the header
|
|
901
|
+
*
|
|
902
|
+
* @param {Object} options
|
|
903
|
+
* @param {jQueryElement} $container
|
|
904
|
+
* @param {Object} dataset
|
|
905
|
+
*/
|
|
906
|
+
const updateHeaderStatus = (options, $container, dataset) => {
|
|
907
|
+
if (!options.status) {
|
|
908
|
+
return;
|
|
1054
909
|
}
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
* @event dataTable#query.datatable
|
|
1070
|
-
* @param {Object} ajaxConfig - The config object used to setup the AJAX request
|
|
1071
|
-
*/
|
|
1072
|
-
|
|
1073
|
-
$elt.trigger('query.' + ns, [ajaxConfig]); // display the loading state
|
|
1074
|
-
|
|
1075
|
-
if (options.status) {
|
|
1076
|
-
$elt.find('.loading').removeClass(hiddenCls);
|
|
910
|
+
const $statusEmpty = $container.find('.empty-list');
|
|
911
|
+
const $statusAvailable = $container.find('.available-list');
|
|
912
|
+
const $statusCount = $statusAvailable.find('.count');
|
|
913
|
+
$container.find('.loading').addClass(hiddenCls);
|
|
914
|
+
|
|
915
|
+
// when the status is enabled, the response must contain the total amount of records
|
|
916
|
+
const amount = dataset.amount || dataset.length;
|
|
917
|
+
if (amount) {
|
|
918
|
+
$statusCount.text(amount);
|
|
919
|
+
$statusAvailable.removeClass(hiddenCls);
|
|
920
|
+
$statusEmpty.addClass(hiddenCls);
|
|
921
|
+
} else {
|
|
922
|
+
$statusEmpty.removeClass(hiddenCls);
|
|
923
|
+
$statusAvailable.addClass(hiddenCls);
|
|
1077
924
|
}
|
|
925
|
+
};
|
|
926
|
+
|
|
927
|
+
/**
|
|
928
|
+
* The dataTable component makes you able to browse items and bind specific
|
|
929
|
+
* actions to undertake for edition and removal of them.
|
|
930
|
+
*
|
|
931
|
+
* Parameters that will be send to backend by component:
|
|
932
|
+
*
|
|
933
|
+
* Pagination
|
|
934
|
+
* @param {Number} rows - count of rows, that should be returned from backend, in other words limit.
|
|
935
|
+
* @param {Number} page - number of page, that should be requested.
|
|
936
|
+
*
|
|
937
|
+
* Sorting
|
|
938
|
+
* @param {String} sortby - name of column
|
|
939
|
+
* @param {String} sortorder - order of sorting, can be 'asc' or 'desc' for ascending sorting and descending sorting respectively.
|
|
940
|
+
* @param {String} sorttype - type of sorting, can be 'string' or 'numeric' for proper sorting numeric and string values.
|
|
941
|
+
*
|
|
942
|
+
* Filtering
|
|
943
|
+
* @param {String} filterstrategy - filtering strategy. Default is single (see ui/datatable/filterStrategy/single.js).
|
|
944
|
+
* @param {String} filterquery - query string for filtering of rows.
|
|
945
|
+
* @param {String[]} filtercolumns[] - array of columns, in which will be implemented search during filtering process.
|
|
946
|
+
* For column filter it will be only one item with column name, but component has ability define list of columns for default filter (in top toolbar).
|
|
947
|
+
* Backend should correctly receive this list of columns and do search in accordance with this parameters.
|
|
948
|
+
* By default, columns are not defined, so this parameter not will be sent. If filtercolumns[] not exists, backend should search by all columns.
|
|
949
|
+
*
|
|
950
|
+
* @example of query (GET): rows=25&page=1&sortby=login&sortorder=asc&filterquery=loginame&filtercolumns[]=login
|
|
951
|
+
*
|
|
952
|
+
* @exports ui/datatable
|
|
953
|
+
*/
|
|
954
|
+
const dataTable = {
|
|
955
|
+
/**
|
|
956
|
+
* Used for generating action button action button
|
|
957
|
+
* @typedef Action
|
|
958
|
+
* @type {Object}
|
|
959
|
+
* @property {String} id ID is added to the button class
|
|
960
|
+
* @property {String} [title] Button title
|
|
961
|
+
* @property {Boolean} [disabled] When present, button should be disabled
|
|
962
|
+
* @property {String} [icon] Generate button icon
|
|
963
|
+
* @property {Boolean} [hidden] When present, button is hidden
|
|
964
|
+
* @property {Function} [action] Handler on button click
|
|
965
|
+
*/
|
|
1078
966
|
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
967
|
+
/**
|
|
968
|
+
* Used for generating action button from Object
|
|
969
|
+
* @deprecated
|
|
970
|
+
* @typedef {{
|
|
971
|
+
* [key: Action.id & Action.icon & Action.title ]: Action.action,
|
|
972
|
+
* }} ActionsObject
|
|
973
|
+
*
|
|
974
|
+
* @example
|
|
975
|
+
* {
|
|
976
|
+
* actions: {
|
|
977
|
+
* edit: editUser,
|
|
978
|
+
* remove: removeUser,
|
|
979
|
+
* }
|
|
980
|
+
* }
|
|
981
|
+
*
|
|
982
|
+
* ! IMPORTANT USE INSTEAD:
|
|
983
|
+
* {
|
|
984
|
+
* actions: [
|
|
985
|
+
* {
|
|
986
|
+
* id: "edit",
|
|
987
|
+
* title: __("Edit"),
|
|
988
|
+
* icon: "edit",
|
|
989
|
+
* action: editUser
|
|
990
|
+
* },
|
|
991
|
+
* {
|
|
992
|
+
* id: "edit",
|
|
993
|
+
* title: __("Edit"),
|
|
994
|
+
* icon: "edit",
|
|
995
|
+
* action: editUser
|
|
996
|
+
* }
|
|
997
|
+
* ]
|
|
998
|
+
* }
|
|
999
|
+
*/
|
|
1084
1000
|
|
|
1085
|
-
|
|
1001
|
+
/**
|
|
1002
|
+
* Initialize the plugin.
|
|
1003
|
+
*
|
|
1004
|
+
* Called the jQuery way once registered by the Pluginifier.
|
|
1005
|
+
* @example $('selector').datatable([], {});
|
|
1006
|
+
*
|
|
1007
|
+
* @constructor
|
|
1008
|
+
* @param {Object} options - the plugin options.
|
|
1009
|
+
* @param {String} options.url - the URL of the service used to retrieve the resources.
|
|
1010
|
+
* @param {Object[]} options.model - the model definition.
|
|
1011
|
+
* @param {ActionsObject | Action[]} options.actions - Generates action buttons
|
|
1012
|
+
* @param {Function} options.listeners.xxx - the callback function for event xxx, parameters depends to event trigger call.
|
|
1013
|
+
* @param {Boolean} options.selectable - enables the selection of rows using checkboxes.
|
|
1014
|
+
* @param {Boolean} options.rowSelection - enables the selection of rows by clicking on them.
|
|
1015
|
+
* @param {Object} options.tools - a list of tool buttons to display above the table.
|
|
1016
|
+
* @param {Object|Boolean} options.status - allow to display a status bar.
|
|
1017
|
+
* @param {Object|Boolean} options.filter - allow to display a filter bar.
|
|
1018
|
+
* @param {String} options.filterStrategy - 'multiple' | 'single' -- filtered by all filters together or filtering allowed only by one field at the moment (default 'single'),
|
|
1019
|
+
* @param {String} options.filterSelector - css selector for search of filter inputs, by defaul 'select, input'
|
|
1020
|
+
* @param {String} options.filterTransform - transform filter value before send to server.
|
|
1021
|
+
* @param {String[]} options.filter.columns - a list of columns that will be used for default filter. Can be overridden by column filter.
|
|
1022
|
+
* @param {String} options.filterquery - a query string for filtering, using only in runtime.
|
|
1023
|
+
* @param {String[]} options.filtercolumns - a list of columns, in that should be done search, using only in runtime.
|
|
1024
|
+
* @param {String} options.paginationStrategyTop - 'none' | 'pages' | 'simple' -- 'none' by default (next/prev), 'pages' show pages and extended control for pagination
|
|
1025
|
+
* @param {String} options.paginationStrategyBottom - 'none' | 'pages' | 'simple' -- 'simple' by default (next/prev), 'pages' show pages and extended control for pagination
|
|
1026
|
+
* @param {Object} options.labels - list of labels in datatable interface, that can be overridden by incoming options
|
|
1027
|
+
* @param {String} options.emptyText - text that will be shown when no data found for showing in the grid.
|
|
1028
|
+
* @param {Boolean} options.pageSizeSelector - flag that indicates if control for changing page size should be displayed
|
|
1029
|
+
* @param {Boolean} options.atomicUpdate - allowed to keep the datatable state to be able on "render" event, compare with new state and atomically update the table cells.
|
|
1030
|
+
* @param {Function} options.requestInterceptor - Intercept sending AJAX request. The call of function must returns promise with provided data.
|
|
1031
|
+
* @param {Object} [data] - inject predefined data to avoid the first query.
|
|
1032
|
+
* @fires dataTable#create.datatable
|
|
1033
|
+
* @returns {jQueryElement} for chaining
|
|
1034
|
+
*/
|
|
1035
|
+
init(options, data) {
|
|
1036
|
+
options = _.defaults(options, defaults);
|
|
1037
|
+
return this.each(function () {
|
|
1038
|
+
const $elt = $$1(this);
|
|
1039
|
+
const currentOptions = $elt.data(dataNs);
|
|
1040
|
+
if (options.atomicUpdate && data) {
|
|
1041
|
+
$elt.data(`${dataNs}state`, data.data);
|
|
1042
|
+
}
|
|
1043
|
+
// implement encapsulated pages for the datatable
|
|
1044
|
+
$elt.paginations = [];
|
|
1045
|
+
if (!currentOptions) {
|
|
1046
|
+
//add data to the element
|
|
1047
|
+
$elt.data(dataNs, options);
|
|
1048
|
+
$elt.one('load.' + ns, function () {
|
|
1049
|
+
/**
|
|
1050
|
+
* @event dataTable#create.datatable
|
|
1051
|
+
*/
|
|
1052
|
+
$elt.trigger('create.' + ns);
|
|
1053
|
+
});
|
|
1054
|
+
if (data) {
|
|
1055
|
+
dataTable._render($elt, data);
|
|
1056
|
+
} else {
|
|
1057
|
+
dataTable._query($elt);
|
|
1058
|
+
}
|
|
1059
|
+
} else {
|
|
1060
|
+
// update existing options
|
|
1061
|
+
$elt.data(dataNs, _.merge(currentOptions, options));
|
|
1062
|
+
dataTable._refresh($elt, data);
|
|
1063
|
+
}
|
|
1086
1064
|
});
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1065
|
+
},
|
|
1066
|
+
/**
|
|
1067
|
+
* Refresh the data table using current options
|
|
1068
|
+
*
|
|
1069
|
+
* Called the jQuery way once registered by the Pluginifier.
|
|
1070
|
+
* @example $('selector').datatable('refresh');
|
|
1071
|
+
*
|
|
1072
|
+
* @param {jQueryElement} $elt - plugin's element
|
|
1073
|
+
* @param {Object} [data] - Data to render immediately, prevents the query to be made.
|
|
1074
|
+
*/
|
|
1075
|
+
_refresh($elt, data) {
|
|
1076
|
+
if (data) {
|
|
1077
|
+
this._render($elt, data);
|
|
1078
|
+
} else {
|
|
1079
|
+
this._query($elt);
|
|
1093
1080
|
}
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
self._render($elt, {});
|
|
1104
|
-
});
|
|
1105
|
-
},
|
|
1106
|
-
|
|
1107
|
-
/**
|
|
1108
|
-
* Renders the table using the provided data set
|
|
1109
|
-
*
|
|
1110
|
-
* @param {jQueryElement} $elt - plugin's element
|
|
1111
|
-
* @param {Object} dataset - the data set to render
|
|
1112
|
-
* @private
|
|
1113
|
-
* @fires dataTable#beforeload.datatable
|
|
1114
|
-
* @fires dataTable#load.datatable
|
|
1115
|
-
*/
|
|
1116
|
-
_render: function _render($elt) {
|
|
1117
|
-
var dataset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1118
|
-
var self = this;
|
|
1119
|
-
|
|
1120
|
-
var options = _.cloneDeep($elt.data(dataNs));
|
|
1121
|
-
|
|
1122
|
-
if (typeof options === 'undefined') {
|
|
1123
|
-
return $elt.trigger("error.".concat(ns), [new Error("Unable to load data attached to the element")]);
|
|
1124
|
-
}
|
|
1125
|
-
|
|
1126
|
-
var model = [];
|
|
1127
|
-
var $massActionBtns = $$1();
|
|
1128
|
-
/**
|
|
1129
|
-
* @event dataTable#beforeload.datatable
|
|
1130
|
-
* @param {Object} dataset - The data set object used to render the table
|
|
1081
|
+
},
|
|
1082
|
+
/**
|
|
1083
|
+
* Query the server for data and load the table.
|
|
1084
|
+
*
|
|
1085
|
+
* @private
|
|
1086
|
+
* @param {jQueryElement} $elt - plugin's element
|
|
1087
|
+
* @param $filter
|
|
1088
|
+
* @fires dataTable#query.datatable
|
|
1131
1089
|
*/
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
if (
|
|
1137
|
-
|
|
1090
|
+
_query($elt, $filter) {
|
|
1091
|
+
const self = this;
|
|
1092
|
+
let options = $elt.data(dataNs);
|
|
1093
|
+
loadingBar.start();
|
|
1094
|
+
if (!$filter) {
|
|
1095
|
+
$filter = $$1('.filter', $elt);
|
|
1138
1096
|
}
|
|
1097
|
+
options = _.assign({}, options, this._getFilterStrategy($elt).getQueryData($elt, $filter, options));
|
|
1098
|
+
const parameters = _.merge({}, _.pick(options, ['rows', 'page', 'sortby', 'sortorder', 'sorttype', 'filterquery', 'filtercolumns']), options.params || {});
|
|
1099
|
+
const ajaxConfig = {
|
|
1100
|
+
url: options.url,
|
|
1101
|
+
data: parameters,
|
|
1102
|
+
dataType: 'json',
|
|
1103
|
+
type: options.querytype || 'GET'
|
|
1104
|
+
};
|
|
1105
|
+
|
|
1106
|
+
// disable pagination to not press multiple on it
|
|
1107
|
+
disablePagination($elt.paginations);
|
|
1108
|
+
|
|
1109
|
+
/**
|
|
1110
|
+
* @event dataTable#query.datatable
|
|
1111
|
+
* @param {Object} ajaxConfig - The config object used to setup the AJAX request
|
|
1112
|
+
*/
|
|
1113
|
+
$elt.trigger('query.' + ns, [ajaxConfig]);
|
|
1139
1114
|
|
|
1140
|
-
|
|
1141
|
-
|
|
1115
|
+
// display the loading state
|
|
1116
|
+
if (options.status) {
|
|
1117
|
+
$elt.find('.loading').removeClass(hiddenCls);
|
|
1142
1118
|
}
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1119
|
+
if (typeof options.requestInterceptor === 'function') {
|
|
1120
|
+
Promise.resolve(options.requestInterceptor(parameters)).then(data => {
|
|
1121
|
+
self._render($elt, data);
|
|
1122
|
+
}).catch(error => {
|
|
1123
|
+
$elt.trigger('error.' + ns, [error]);
|
|
1124
|
+
self._render($elt, {});
|
|
1125
|
+
});
|
|
1126
|
+
return;
|
|
1148
1127
|
}
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1128
|
+
$$1.ajax(ajaxConfig).done(function (response) {
|
|
1129
|
+
if ($elt && typeof $elt.data(dataNs) !== 'object') {
|
|
1130
|
+
return $elt.trigger(`error.${ns}`, [new Error(`Unable to load data attached to the element`)]);
|
|
1131
|
+
}
|
|
1132
|
+
self._render($elt, response);
|
|
1133
|
+
}).fail(function (response, option, err) {
|
|
1134
|
+
const requestErr = httpErrorParser.parse(response, option, err);
|
|
1135
|
+
logger.error(requestErr.message);
|
|
1136
|
+
requestErr.code = response.status;
|
|
1137
|
+
enablePagination(this.paginations);
|
|
1138
|
+
$elt.trigger('error.' + ns, [requestErr]);
|
|
1139
|
+
self._render($elt, {});
|
|
1140
|
+
});
|
|
1141
|
+
},
|
|
1142
|
+
/**
|
|
1143
|
+
* Renders the table using the provided data set
|
|
1144
|
+
*
|
|
1145
|
+
* @param {jQueryElement} $elt - plugin's element
|
|
1146
|
+
* @param {Object} dataset - the data set to render
|
|
1147
|
+
* @private
|
|
1148
|
+
* @fires dataTable#beforeload.datatable
|
|
1149
|
+
* @fires dataTable#load.datatable
|
|
1150
|
+
*/
|
|
1151
|
+
_render($elt) {
|
|
1152
|
+
let dataset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1153
|
+
const self = this;
|
|
1154
|
+
let options = _.cloneDeep($elt.data(dataNs));
|
|
1155
|
+
if (typeof options === 'undefined') {
|
|
1156
|
+
return $elt.trigger(`error.${ns}`, [new Error(`Unable to load data attached to the element`)]);
|
|
1156
1157
|
}
|
|
1157
|
-
|
|
1158
|
+
const model = [];
|
|
1159
|
+
let $massActionBtns = $$1();
|
|
1158
1160
|
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1161
|
+
/**
|
|
1162
|
+
* @event dataTable#beforeload.datatable
|
|
1163
|
+
* @param {Object} dataset - The data set object used to render the table
|
|
1164
|
+
*/
|
|
1165
|
+
$elt.trigger('beforeload.' + ns, [_.cloneDeep(dataset)]);
|
|
1162
1166
|
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1167
|
+
// overrides column options
|
|
1168
|
+
_.forEach(options.model, function (field, key) {
|
|
1169
|
+
if (!options.filter) {
|
|
1170
|
+
field.filterable = false;
|
|
1171
|
+
}
|
|
1172
|
+
if (_.isUndefined(field.order)) {
|
|
1173
|
+
field.order = key + 1;
|
|
1174
|
+
}
|
|
1175
|
+
if (field.filterable && typeof field.filterable !== 'object') {
|
|
1176
|
+
field.filterable = {
|
|
1177
|
+
placeholder: __('Filter')
|
|
1178
|
+
};
|
|
1179
|
+
}
|
|
1180
|
+
if (typeof field.visible === 'undefined') {
|
|
1181
|
+
model.push(field);
|
|
1182
|
+
} else if (typeof field.visible === 'function' && field.visible()) {
|
|
1183
|
+
model.push(field);
|
|
1184
|
+
} else if (field.visible === true) {
|
|
1185
|
+
model.push(field);
|
|
1186
|
+
}
|
|
1187
|
+
});
|
|
1188
|
+
model.sort(function (a, b) {
|
|
1189
|
+
return a.order - b.order;
|
|
1190
|
+
});
|
|
1191
|
+
if (options.sortby) {
|
|
1192
|
+
options = this._sortOptions($elt, options.sortby, options.sortorder, options.sorttype);
|
|
1193
|
+
}
|
|
1166
1194
|
|
|
1195
|
+
// process data by model rules
|
|
1196
|
+
if (_.some(model, 'transform')) {
|
|
1197
|
+
const transforms = _.where(model, 'transform');
|
|
1198
|
+
_.forEach(dataset.data, (row, index) => {
|
|
1199
|
+
_.forEach(transforms, field => {
|
|
1200
|
+
if (_.isFunction(field.transform)) {
|
|
1201
|
+
row[field.id] = field.transform(row[field.id], row, field, index, dataset.data);
|
|
1202
|
+
}
|
|
1203
|
+
});
|
|
1204
|
+
});
|
|
1205
|
+
}
|
|
1206
|
+
options.model = model;
|
|
1207
|
+
if (options.atomicUpdate) {
|
|
1208
|
+
const skipForceUpdate = this._shallowUpdate($elt, dataset, options);
|
|
1209
|
+
if (skipForceUpdate) {
|
|
1210
|
+
updateHeaderStatus(options, $elt, dataset);
|
|
1211
|
+
loadingBar.stop();
|
|
1212
|
+
$elt.trigger(`load.${ns}`, [dataset]);
|
|
1213
|
+
return;
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1167
1216
|
|
|
1168
|
-
|
|
1169
|
-
|
|
1217
|
+
// Call the rendering
|
|
1218
|
+
const $rendering = $$1(layout({
|
|
1219
|
+
options: options,
|
|
1220
|
+
dataset: dataset
|
|
1221
|
+
}));
|
|
1170
1222
|
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1223
|
+
// the readonly property contains an associative array where keys are the ids of the items (lines)
|
|
1224
|
+
// the value can be a boolean (true for disable buttons, false to enable)
|
|
1225
|
+
// it can also bo an array that let you disable/enable the action you want
|
|
1226
|
+
// readonly = {
|
|
1227
|
+
// id1 : {'view':true, 'delete':false},
|
|
1228
|
+
// id2 : true
|
|
1229
|
+
//}
|
|
1230
|
+
_.forEach(dataset.readonly, function (values, id) {
|
|
1231
|
+
if (values === true) {
|
|
1232
|
+
$$1('[data-item-identifier="' + id + '"] button', $rendering).addClass('disabled');
|
|
1233
|
+
} else if (values && typeof values === 'object') {
|
|
1234
|
+
for (const action in values) {
|
|
1235
|
+
if (values.hasOwnProperty(action) && values[action] === true) {
|
|
1236
|
+
$$1(`[data-item-identifier="${id}"] button.${action}`, $rendering).addClass('disabled');
|
|
1237
|
+
}
|
|
1175
1238
|
}
|
|
1176
|
-
}
|
|
1239
|
+
}
|
|
1177
1240
|
});
|
|
1178
|
-
}
|
|
1179
|
-
|
|
1180
|
-
options.model = model;
|
|
1181
1241
|
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
var $rendering = $$1(layout({
|
|
1195
|
-
options: options,
|
|
1196
|
-
dataset: dataset
|
|
1197
|
-
})); // the readonly property contains an associative array where keys are the ids of the items (lines)
|
|
1198
|
-
// the value can be a boolean (true for disable buttons, false to enable)
|
|
1199
|
-
// it can also bo an array that let you disable/enable the action you want
|
|
1200
|
-
// readonly = {
|
|
1201
|
-
// id1 : {'view':true, 'delete':false},
|
|
1202
|
-
// id2 : true
|
|
1203
|
-
//}
|
|
1204
|
-
|
|
1205
|
-
_.forEach(dataset.readonly, function (values, id) {
|
|
1206
|
-
if (values === true) {
|
|
1207
|
-
$$1('[data-item-identifier="' + id + '"] button', $rendering).addClass('disabled');
|
|
1208
|
-
} else if (values && _typeof(values) === 'object') {
|
|
1209
|
-
for (var action in values) {
|
|
1210
|
-
if (values.hasOwnProperty(action) && values[action] === true) {
|
|
1211
|
-
$$1("[data-item-identifier=\"".concat(id, "\"] button.").concat(action), $rendering).addClass('disabled');
|
|
1242
|
+
/**
|
|
1243
|
+
* Attach handlers on the action buttons
|
|
1244
|
+
* @param {ActionsObject | Action[]} actions
|
|
1245
|
+
*/
|
|
1246
|
+
const attachActionListeners = actions => {
|
|
1247
|
+
// Attach a listener to every action button created
|
|
1248
|
+
_.forEach(actions, (action, name) => {
|
|
1249
|
+
if (!_.isFunction(action)) {
|
|
1250
|
+
name = action.id || name;
|
|
1251
|
+
action = action.action || function () {};
|
|
1212
1252
|
}
|
|
1213
|
-
|
|
1253
|
+
const css = `.${name}`;
|
|
1254
|
+
$rendering.off('click', css).on('click', css, function (e) {
|
|
1255
|
+
e.preventDefault();
|
|
1256
|
+
const $btn = $$1(this);
|
|
1257
|
+
if (!$btn.hasClass('disabled')) {
|
|
1258
|
+
const identifier = $btn.closest('[data-item-identifier]').data('item-identifier');
|
|
1259
|
+
action.apply($btn, [identifier, _.first(_.where(dataset.data, {
|
|
1260
|
+
id: identifier
|
|
1261
|
+
}))]);
|
|
1262
|
+
}
|
|
1263
|
+
});
|
|
1264
|
+
});
|
|
1265
|
+
};
|
|
1266
|
+
if (options.actions) {
|
|
1267
|
+
attachActionListeners(options.actions);
|
|
1214
1268
|
}
|
|
1215
|
-
});
|
|
1216
|
-
/**
|
|
1217
|
-
* Attach handlers on the action buttons
|
|
1218
|
-
* @param {ActionsObject | Action[]} actions
|
|
1219
|
-
*/
|
|
1220
1269
|
|
|
1270
|
+
// Attach listeners to model.type = action
|
|
1271
|
+
if (_.some(options.model, 'type')) {
|
|
1272
|
+
const types = _.where(options.model, 'type');
|
|
1273
|
+
_.forEach(types, field => {
|
|
1274
|
+
if (field.type === 'actions' && field.actions) {
|
|
1275
|
+
attachActionListeners(field.actions);
|
|
1276
|
+
}
|
|
1277
|
+
});
|
|
1278
|
+
}
|
|
1221
1279
|
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1280
|
+
// Attach a listener to every tool button created
|
|
1281
|
+
_.forEach(options.tools, (action, name) => {
|
|
1282
|
+
let isMassAction = true;
|
|
1225
1283
|
if (!_.isFunction(action)) {
|
|
1226
1284
|
name = action.id || name;
|
|
1227
|
-
|
|
1285
|
+
isMassAction = action.massAction;
|
|
1228
1286
|
action = action.action || function () {};
|
|
1229
1287
|
}
|
|
1230
|
-
|
|
1231
|
-
|
|
1288
|
+
const css = `.tool-${name}`;
|
|
1289
|
+
if (isMassAction) {
|
|
1290
|
+
$massActionBtns = $massActionBtns.add($rendering.find(css));
|
|
1291
|
+
}
|
|
1232
1292
|
$rendering.off('click', css).on('click', css, function (e) {
|
|
1233
1293
|
e.preventDefault();
|
|
1234
|
-
|
|
1235
|
-
|
|
1294
|
+
const $btn = $$1(this);
|
|
1236
1295
|
if (!$btn.hasClass('disabled')) {
|
|
1237
|
-
|
|
1238
|
-
action.apply($btn, [identifier, _.first(_.where(dataset.data, {
|
|
1239
|
-
id: identifier
|
|
1240
|
-
}))]);
|
|
1296
|
+
action.apply($btn, [self._selection($elt)]);
|
|
1241
1297
|
}
|
|
1242
1298
|
});
|
|
1243
1299
|
});
|
|
1244
|
-
};
|
|
1245
|
-
|
|
1246
|
-
if (options.actions) {
|
|
1247
|
-
attachActionListeners(options.actions);
|
|
1248
|
-
} // Attach listeners to model.type = action
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
if (_.some(options.model, 'type')) {
|
|
1252
|
-
var types = _.where(options.model, 'type');
|
|
1253
1300
|
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1301
|
+
// bind listeners to events
|
|
1302
|
+
_.forEach(options.listeners, (callback, event) => {
|
|
1303
|
+
const ev = [event, ns].join('.');
|
|
1304
|
+
$elt.off(ev).on(ev, callback);
|
|
1258
1305
|
});
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1306
|
+
function renderPagination($container, mode) {
|
|
1307
|
+
return paginationComponent({
|
|
1308
|
+
mode: mode,
|
|
1309
|
+
activePage: dataset.page,
|
|
1310
|
+
totalPages: dataset.total
|
|
1311
|
+
}).on('change', function () {
|
|
1312
|
+
self._setPage($elt, this.getActivePage());
|
|
1313
|
+
}).on('prev', function () {
|
|
1314
|
+
/**
|
|
1315
|
+
* @event dataTable#backward.dataTable
|
|
1316
|
+
*/
|
|
1317
|
+
$elt.trigger('backward.' + ns);
|
|
1318
|
+
}).on('next', function () {
|
|
1319
|
+
/**
|
|
1320
|
+
* @event dataTable#forward.dataTable
|
|
1321
|
+
*/
|
|
1322
|
+
$elt.trigger('forward.' + ns);
|
|
1323
|
+
}).render($container);
|
|
1270
1324
|
}
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
$massActionBtns = $massActionBtns.add($rendering.find(css));
|
|
1325
|
+
$elt.paginations = [];
|
|
1326
|
+
if (options.paginationStrategyTop !== 'none') {
|
|
1327
|
+
// bind pagination component to the datatable
|
|
1328
|
+
$elt.paginations.push(renderPagination($$1('.datatable-pagination-top', $rendering), options.paginationStrategyTop));
|
|
1276
1329
|
}
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1330
|
+
if (options.paginationStrategyBottom !== 'none') {
|
|
1331
|
+
// bind pagination component to the datatable
|
|
1332
|
+
$elt.paginations.push(renderPagination($$1('.datatable-pagination-bottom', $rendering), options.paginationStrategyBottom));
|
|
1333
|
+
}
|
|
1334
|
+
disablePagination($elt.paginations);
|
|
1335
|
+
|
|
1336
|
+
// Now $rendering takes the place of $elt...
|
|
1337
|
+
const $rows = $rendering.find('tbody tr');
|
|
1338
|
+
const $sortBy = $rendering.find('th [data-sort-by]');
|
|
1339
|
+
const $sortElement = $rendering.find('[data-sort-by="' + options.sortby + '"]');
|
|
1340
|
+
const $checkAll = $rendering.find('th.checkboxes input');
|
|
1341
|
+
const $checkboxes = $rendering.find('td.checkboxes input');
|
|
1342
|
+
if (options.rowSelection) {
|
|
1343
|
+
$$1('table.datatable', $rendering).addClass('hoverable');
|
|
1344
|
+
$rendering.on('click', 'tbody td', function (e) {
|
|
1345
|
+
// exclude from processing columns with actions
|
|
1346
|
+
if ($$1(e.target).hasClass('checkboxes') || $$1(e.target).hasClass('actions')) {
|
|
1347
|
+
return false;
|
|
1348
|
+
}
|
|
1349
|
+
const currentRow = $$1(this).parent();
|
|
1350
|
+
$rows.removeClass('selected');
|
|
1351
|
+
currentRow.toggleClass('selected');
|
|
1352
|
+
$elt.trigger('selected.' + ns, _.where(dataset.data, {
|
|
1353
|
+
id: currentRow.data('item-identifier')
|
|
1354
|
+
}));
|
|
1355
|
+
});
|
|
1356
|
+
}
|
|
1357
|
+
$sortBy.on('click keyup', function (e) {
|
|
1358
|
+
if (e.type === 'keyup' && e.keyCode !== 13) {
|
|
1359
|
+
return;
|
|
1284
1360
|
}
|
|
1361
|
+
e.preventDefault();
|
|
1362
|
+
const column = $$1(this).data('sort-by');
|
|
1363
|
+
const type = $$1(this).data('sort-type');
|
|
1364
|
+
self._sort($elt, column, undefined, type);
|
|
1285
1365
|
});
|
|
1286
|
-
}); // bind listeners to events
|
|
1287
1366
|
|
|
1367
|
+
// Add the filter behavior
|
|
1368
|
+
if (options.filter) {
|
|
1369
|
+
self._getFilterStrategy($elt).render($rendering, options);
|
|
1370
|
+
_.forEach($$1('.filter', $rendering), function (filter) {
|
|
1371
|
+
const $filter = $$1(filter);
|
|
1372
|
+
const $filterBtn = $$1('button', $filter);
|
|
1373
|
+
const $filterInput = $$1('select, input', $filter);
|
|
1374
|
+
if ($filterInput.is('select')) {
|
|
1375
|
+
$filterInput.on('change', function () {
|
|
1376
|
+
self._filter($elt, $filter);
|
|
1377
|
+
});
|
|
1378
|
+
} else {
|
|
1379
|
+
// clicking the button trigger the request
|
|
1380
|
+
$filterBtn.off('click').on('click', function (e) {
|
|
1381
|
+
e.preventDefault();
|
|
1382
|
+
self._filter($elt, $filter);
|
|
1383
|
+
});
|
|
1384
|
+
|
|
1385
|
+
// or press ENTER
|
|
1386
|
+
$filterInput.off('keypress').on('keypress', function (e) {
|
|
1387
|
+
if (e.which === 13) {
|
|
1388
|
+
e.preventDefault();
|
|
1389
|
+
self._filter($elt, $filter);
|
|
1390
|
+
}
|
|
1391
|
+
});
|
|
1392
|
+
}
|
|
1393
|
+
});
|
|
1394
|
+
}
|
|
1288
1395
|
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1396
|
+
// check/uncheck all checkboxes
|
|
1397
|
+
$checkAll.click(function () {
|
|
1398
|
+
if (this.checked) {
|
|
1399
|
+
$checkAll.prop('checked', true);
|
|
1400
|
+
$checkboxes.prop('checked', true);
|
|
1401
|
+
} else {
|
|
1402
|
+
$checkAll.prop('checked', false);
|
|
1403
|
+
$checkboxes.prop('checked', false);
|
|
1404
|
+
}
|
|
1405
|
+
if ($massActionBtns.length) {
|
|
1406
|
+
$massActionBtns.toggleClass('invisible', !$checkboxes.filter(':checked').length);
|
|
1407
|
+
}
|
|
1293
1408
|
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
mode: mode,
|
|
1297
|
-
activePage: dataset.page,
|
|
1298
|
-
totalPages: dataset.total
|
|
1299
|
-
}).on('change', function () {
|
|
1300
|
-
self._setPage($elt, this.getActivePage());
|
|
1301
|
-
}).on('prev', function () {
|
|
1302
|
-
/**
|
|
1303
|
-
* @event dataTable#backward.dataTable
|
|
1304
|
-
*/
|
|
1305
|
-
$elt.trigger('backward.' + ns);
|
|
1306
|
-
}).on('next', function () {
|
|
1307
|
-
/**
|
|
1308
|
-
* @event dataTable#forward.dataTable
|
|
1409
|
+
/**
|
|
1410
|
+
* @event dataTable#select.dataTable
|
|
1309
1411
|
*/
|
|
1310
|
-
$elt.trigger('
|
|
1311
|
-
})
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
$elt.paginations = [];
|
|
1315
|
-
|
|
1316
|
-
if (options.paginationStrategyTop !== 'none') {
|
|
1317
|
-
// bind pagination component to the datatable
|
|
1318
|
-
$elt.paginations.push(renderPagination($$1('.datatable-pagination-top', $rendering), options.paginationStrategyTop));
|
|
1319
|
-
}
|
|
1320
|
-
|
|
1321
|
-
if (options.paginationStrategyBottom !== 'none') {
|
|
1322
|
-
// bind pagination component to the datatable
|
|
1323
|
-
$elt.paginations.push(renderPagination($$1('.datatable-pagination-bottom', $rendering), options.paginationStrategyBottom));
|
|
1324
|
-
}
|
|
1325
|
-
|
|
1326
|
-
disablePagination($elt.paginations); // Now $rendering takes the place of $elt...
|
|
1327
|
-
|
|
1328
|
-
var $rows = $rendering.find('tbody tr');
|
|
1329
|
-
var $sortBy = $rendering.find('th [data-sort-by]');
|
|
1330
|
-
var $sortElement = $rendering.find('[data-sort-by="' + options.sortby + '"]');
|
|
1331
|
-
var $checkAll = $rendering.find('th.checkboxes input');
|
|
1332
|
-
var $checkboxes = $rendering.find('td.checkboxes input');
|
|
1412
|
+
$elt.trigger('select.' + ns);
|
|
1413
|
+
});
|
|
1333
1414
|
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1415
|
+
// when check/uncheck a box, toggle the check/uncheck all
|
|
1416
|
+
$checkboxes.click(function () {
|
|
1417
|
+
const $checked = $checkboxes.filter(':checked');
|
|
1418
|
+
if ($checked.length === $checkboxes.length) {
|
|
1419
|
+
$checkAll.prop('checked', true);
|
|
1420
|
+
} else {
|
|
1421
|
+
$checkAll.prop('checked', false);
|
|
1422
|
+
}
|
|
1423
|
+
if ($massActionBtns.length) {
|
|
1424
|
+
$massActionBtns.toggleClass('invisible', !$checkboxes.filter(':checked').length);
|
|
1340
1425
|
}
|
|
1341
1426
|
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
$elt.trigger('
|
|
1346
|
-
id: currentRow.data('item-identifier')
|
|
1347
|
-
}));
|
|
1427
|
+
/**
|
|
1428
|
+
* @event dataTable#select.dataTable
|
|
1429
|
+
*/
|
|
1430
|
+
$elt.trigger('select.' + ns);
|
|
1348
1431
|
});
|
|
1349
|
-
}
|
|
1350
|
-
|
|
1351
|
-
$sortBy.on('click keyup', function (e) {
|
|
1352
|
-
if (e.type === 'keyup' && e.keyCode !== 13) {
|
|
1353
|
-
return;
|
|
1354
|
-
}
|
|
1355
1432
|
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1433
|
+
// Remove sorted class from all th
|
|
1434
|
+
$$1('th.sorted', $rendering).removeClass('sorted');
|
|
1435
|
+
// Add the sorted class to the sorted element and the order class
|
|
1436
|
+
$sortElement.addClass('sorted').addClass('sorted_' + options.sortorder);
|
|
1359
1437
|
|
|
1360
|
-
|
|
1361
|
-
}); // Add the filter behavior
|
|
1438
|
+
// Update the status
|
|
1362
1439
|
|
|
1363
|
-
|
|
1364
|
-
|
|
1440
|
+
updateHeaderStatus(options, $rendering, dataset);
|
|
1441
|
+
$elt.html($rendering);
|
|
1365
1442
|
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
var $filterInput = $$1('select, input', $filter);
|
|
1370
|
-
|
|
1371
|
-
if ($filterInput.is('select')) {
|
|
1372
|
-
$filterInput.on('change', function () {
|
|
1373
|
-
self._filter($elt, $filter);
|
|
1374
|
-
});
|
|
1375
|
-
} else {
|
|
1376
|
-
// clicking the button trigger the request
|
|
1377
|
-
$filterBtn.off('click').on('click', function (e) {
|
|
1378
|
-
e.preventDefault();
|
|
1379
|
-
|
|
1380
|
-
self._filter($elt, $filter);
|
|
1381
|
-
}); // or press ENTER
|
|
1382
|
-
|
|
1383
|
-
$filterInput.off('keypress').on('keypress', function (e) {
|
|
1384
|
-
if (e.which === 13) {
|
|
1385
|
-
e.preventDefault();
|
|
1386
|
-
|
|
1387
|
-
self._filter($elt, $filter);
|
|
1388
|
-
}
|
|
1389
|
-
});
|
|
1390
|
-
}
|
|
1391
|
-
});
|
|
1392
|
-
} // check/uncheck all checkboxes
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
$checkAll.click(function () {
|
|
1396
|
-
if (this.checked) {
|
|
1397
|
-
$checkAll.prop('checked', true);
|
|
1398
|
-
$checkboxes.prop('checked', true);
|
|
1399
|
-
} else {
|
|
1400
|
-
$checkAll.prop('checked', false);
|
|
1401
|
-
$checkboxes.prop('checked', false);
|
|
1443
|
+
// if the filter is enabled and a value is present, set the focus on the input field
|
|
1444
|
+
if (options.filter && options.filterquery) {
|
|
1445
|
+
$rendering.find('[name=filter].focused').focus();
|
|
1402
1446
|
}
|
|
1403
1447
|
|
|
1404
|
-
|
|
1405
|
-
|
|
1448
|
+
// restore pagination's after data loaded
|
|
1449
|
+
enablePagination($elt.paginations);
|
|
1450
|
+
if (options.pageSizeSelector) {
|
|
1451
|
+
pageSizeSelector({
|
|
1452
|
+
renderTo: $$1('.toolbox-container', $rendering),
|
|
1453
|
+
defaultSize: options.rows
|
|
1454
|
+
}).on('change', function (val) {
|
|
1455
|
+
self._setRows($elt, val);
|
|
1456
|
+
});
|
|
1406
1457
|
}
|
|
1407
|
-
|
|
1408
|
-
* @event dataTable#select.dataTable
|
|
1409
|
-
*/
|
|
1410
|
-
|
|
1458
|
+
loadingBar.stop();
|
|
1411
1459
|
|
|
1412
|
-
|
|
1413
|
-
|
|
1460
|
+
/**
|
|
1461
|
+
* @event dataTable#load.dataTable
|
|
1462
|
+
* @param {Object} dataset - The data set used to render the table
|
|
1463
|
+
*/
|
|
1464
|
+
$elt.trigger('load.' + ns, [dataset]);
|
|
1465
|
+
},
|
|
1466
|
+
/**
|
|
1467
|
+
* Query set new page
|
|
1468
|
+
*
|
|
1469
|
+
* @param $elt
|
|
1470
|
+
* @param page
|
|
1471
|
+
* @fires dataTable#setpage.datatable
|
|
1472
|
+
*/
|
|
1473
|
+
_setPage($elt, page) {
|
|
1474
|
+
const options = $elt.data(dataNs);
|
|
1475
|
+
if (options.page !== page) {
|
|
1476
|
+
// set new page value
|
|
1477
|
+
options.page = page;
|
|
1414
1478
|
|
|
1415
|
-
|
|
1416
|
-
|
|
1479
|
+
//rebind options to the elt
|
|
1480
|
+
$elt.data(dataNs, options);
|
|
1417
1481
|
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
$
|
|
1422
|
-
}
|
|
1482
|
+
/**
|
|
1483
|
+
* @event dataTable#setpage.dataTable
|
|
1484
|
+
*/
|
|
1485
|
+
$elt.trigger('setpage.' + ns);
|
|
1423
1486
|
|
|
1424
|
-
|
|
1425
|
-
|
|
1487
|
+
// Call the query
|
|
1488
|
+
this._query($elt);
|
|
1426
1489
|
}
|
|
1427
|
-
|
|
1428
|
-
|
|
1490
|
+
},
|
|
1491
|
+
/**
|
|
1492
|
+
* Query filtered list of items
|
|
1493
|
+
*
|
|
1494
|
+
* @param {jQueryElement} $elt - plugin's element
|
|
1495
|
+
* @param {jQueryElement} $filter - the filter input
|
|
1496
|
+
* @fires dataTable#filter.datatable
|
|
1497
|
+
* @fires dataTable#sort.datatable
|
|
1498
|
+
* @private
|
|
1499
|
+
*/
|
|
1500
|
+
_filter($elt, $filter) {
|
|
1501
|
+
const options = $elt.data(dataNs);
|
|
1502
|
+
const filtersData = this._getFilterStrategy($elt).getFiltersData($elt, $filter, options);
|
|
1503
|
+
options.page = 1;
|
|
1504
|
+
$elt.data(dataNs, _.assign(options, filtersData));
|
|
1505
|
+
|
|
1506
|
+
/**
|
|
1507
|
+
* @event dataTable#filter.datatable
|
|
1508
|
+
* @param {Object} options - The options list
|
|
1429
1509
|
*/
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
pageSizeSelector({
|
|
1451
|
-
renderTo: $$1('.toolbox-container', $rendering),
|
|
1452
|
-
defaultSize: options.rows
|
|
1453
|
-
}).on('change', function (val) {
|
|
1454
|
-
self._setRows($elt, val);
|
|
1455
|
-
});
|
|
1456
|
-
}
|
|
1457
|
-
|
|
1458
|
-
loadingBar.stop();
|
|
1459
|
-
/**
|
|
1460
|
-
* @event dataTable#load.dataTable
|
|
1461
|
-
* @param {Object} dataset - The data set used to render the table
|
|
1510
|
+
$elt.trigger('filter.' + ns, [options]);
|
|
1511
|
+
|
|
1512
|
+
// Call the query
|
|
1513
|
+
this._query($elt, $filter);
|
|
1514
|
+
},
|
|
1515
|
+
_getFilterStrategy($elt) {
|
|
1516
|
+
const options = $elt.data(dataNs);
|
|
1517
|
+
return filterStrategyFactory(options);
|
|
1518
|
+
},
|
|
1519
|
+
/**
|
|
1520
|
+
* Query the previous page
|
|
1521
|
+
*
|
|
1522
|
+
* Called the jQuery way once registered by the Pluginifier.
|
|
1523
|
+
* @example $('selector').datatable('sort', 'firstname', false);
|
|
1524
|
+
*
|
|
1525
|
+
* @param {jQueryElement} $elt - plugin's element
|
|
1526
|
+
* @param {String} sortBy - the model id of the col to sort
|
|
1527
|
+
* @param {Boolean} [asc] - sort direction true for asc of deduced
|
|
1528
|
+
* @param {String} sortType - type of sorting, numeric or string
|
|
1529
|
+
* @fires dataTable#sort.datatable
|
|
1462
1530
|
*/
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
* @param page
|
|
1472
|
-
* @fires dataTable#setpage.datatable
|
|
1473
|
-
*/
|
|
1474
|
-
_setPage: function _setPage($elt, page) {
|
|
1475
|
-
var options = $elt.data(dataNs);
|
|
1476
|
-
|
|
1477
|
-
if (options.page !== page) {
|
|
1478
|
-
// set new page value
|
|
1479
|
-
options.page = page; //rebind options to the elt
|
|
1480
|
-
|
|
1481
|
-
$elt.data(dataNs, options);
|
|
1482
|
-
/**
|
|
1483
|
-
* @event dataTable#setpage.dataTable
|
|
1531
|
+
_sort($elt, sortBy, asc, sortType) {
|
|
1532
|
+
const options = this._sortOptions($elt, sortBy, asc, sortType);
|
|
1533
|
+
|
|
1534
|
+
/**
|
|
1535
|
+
* @event dataTable#sort.datatable
|
|
1536
|
+
* @param {String} column - The name of the column to sort
|
|
1537
|
+
* @param {String} direction - The sort direction
|
|
1538
|
+
* @param {String} type - The type of sorting field, string or numeric
|
|
1484
1539
|
*/
|
|
1485
|
-
|
|
1486
|
-
$elt.trigger('setpage.' + ns); // Call the query
|
|
1487
|
-
|
|
1540
|
+
$elt.trigger('sort.' + ns, [options.sortby, options.sortorder, options.sorttype]);
|
|
1488
1541
|
this._query($elt);
|
|
1489
|
-
}
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
* @param {jQueryElement} $filter - the filter input
|
|
1497
|
-
* @fires dataTable#filter.datatable
|
|
1498
|
-
* @fires dataTable#sort.datatable
|
|
1499
|
-
* @private
|
|
1500
|
-
*/
|
|
1501
|
-
_filter: function _filter($elt, $filter) {
|
|
1502
|
-
var options = $elt.data(dataNs);
|
|
1503
|
-
|
|
1504
|
-
var filtersData = this._getFilterStrategy($elt).getFiltersData($elt, $filter, options);
|
|
1505
|
-
|
|
1506
|
-
options.page = 1;
|
|
1507
|
-
$elt.data(dataNs, _.assign(options, filtersData));
|
|
1508
|
-
/**
|
|
1509
|
-
* @event dataTable#filter.datatable
|
|
1510
|
-
* @param {Object} options - The options list
|
|
1542
|
+
},
|
|
1543
|
+
/**
|
|
1544
|
+
* Compared current and next number of row and identifiers order of rows.
|
|
1545
|
+
*
|
|
1546
|
+
* @param {dataset} currentState
|
|
1547
|
+
* @param {dataset} nextState
|
|
1548
|
+
* @returns {Boolean}
|
|
1511
1549
|
*/
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
* @param {String} sortType - type of sorting, numeric or string
|
|
1532
|
-
* @fires dataTable#sort.datatable
|
|
1533
|
-
*/
|
|
1534
|
-
_sort: function _sort($elt, sortBy, asc, sortType) {
|
|
1535
|
-
var options = this._sortOptions($elt, sortBy, asc, sortType);
|
|
1536
|
-
/**
|
|
1537
|
-
* @event dataTable#sort.datatable
|
|
1538
|
-
* @param {String} column - The name of the column to sort
|
|
1539
|
-
* @param {String} direction - The sort direction
|
|
1540
|
-
* @param {String} type - The type of sorting field, string or numeric
|
|
1550
|
+
_canApplyShallowUpdate(currentState, nextState) {
|
|
1551
|
+
const isStatesHasData = _.has(currentState, 'data') && _.has(nextState, 'data');
|
|
1552
|
+
if (!isStatesHasData) {
|
|
1553
|
+
return false;
|
|
1554
|
+
}
|
|
1555
|
+
const currentData = currentState.data;
|
|
1556
|
+
const nextData = nextState.data;
|
|
1557
|
+
if (currentData.length !== nextData.length) {
|
|
1558
|
+
return false;
|
|
1559
|
+
}
|
|
1560
|
+
return _.isEqual(currentData.map(data => data.id), nextData.map(data => data.id));
|
|
1561
|
+
},
|
|
1562
|
+
/**
|
|
1563
|
+
* Check possibility of atomic update data in datatable.
|
|
1564
|
+
*
|
|
1565
|
+
* @param {jQueryElement} $container Data table container element
|
|
1566
|
+
* @param {Object} nextState Data to be set to the data table
|
|
1567
|
+
* @param {Object} options Data table options
|
|
1568
|
+
* @returns {Boolean} Return true when data in table can be atomically updated
|
|
1541
1569
|
*/
|
|
1570
|
+
_shallowUpdate($container, nextState, options) {
|
|
1571
|
+
const currentState = $container.data(`${dataNs}state`);
|
|
1542
1572
|
|
|
1573
|
+
// Always update data state
|
|
1574
|
+
$container.data(`${dataNs}state`, nextState);
|
|
1575
|
+
if (!this._canApplyShallowUpdate(currentState, nextState)) {
|
|
1576
|
+
return;
|
|
1577
|
+
}
|
|
1543
1578
|
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
},
|
|
1576
|
-
|
|
1577
|
-
/**
|
|
1578
|
-
* Check possibility of atomic update data in datatable.
|
|
1579
|
-
*
|
|
1580
|
-
* @param {jQueryElement} $container Data table container element
|
|
1581
|
-
* @param {Object} nextState Data to be set to the data table
|
|
1582
|
-
* @param {Object} options Data table options
|
|
1583
|
-
* @returns {Boolean} Return true when data in table can be atomically updated
|
|
1584
|
-
*/
|
|
1585
|
-
_shallowUpdate: function _shallowUpdate($container, nextState, options) {
|
|
1586
|
-
var currentState = $container.data("".concat(dataNs, "state")); // Always update data state
|
|
1587
|
-
|
|
1588
|
-
$container.data("".concat(dataNs, "state"), nextState);
|
|
1589
|
-
|
|
1590
|
-
if (!this._canApplyShallowUpdate(currentState, nextState)) {
|
|
1591
|
-
return;
|
|
1592
|
-
} // NOTE: The code above generate the table cell. With updating handlebars to the version > 2.*, please move it to the dedicated template to reuse it in layout.tpl as well
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
nextState.data.forEach(function (nextData, index) {
|
|
1596
|
-
var $row = $container.find("tr[data-item-identifier=\"".concat(nextData.id, "\"]"));
|
|
1597
|
-
options.model.forEach(function (model) {
|
|
1598
|
-
var cellId = model.id;
|
|
1599
|
-
|
|
1600
|
-
if (model.type) {
|
|
1601
|
-
var $actionCell = $row.find("td.actions.".concat(cellId));
|
|
1602
|
-
$actionCell.html('');
|
|
1603
|
-
model.actions.forEach(function (action) {
|
|
1604
|
-
var id = action.id;
|
|
1605
|
-
var hidden = getPropertyValue('hidden', action, nextData);
|
|
1606
|
-
var title = getPropertyValue('title', action, nextData);
|
|
1607
|
-
var disabled = getPropertyValue('disabled', action, nextData);
|
|
1608
|
-
var icon = getPropertyValue('icon', action, nextData);
|
|
1609
|
-
var label = getPropertyValue('label', action, nextData);
|
|
1610
|
-
var $actionButton = $$1(buttonTpl({
|
|
1611
|
-
id: id,
|
|
1612
|
-
icon: icon,
|
|
1613
|
-
label: label,
|
|
1614
|
-
title: title,
|
|
1615
|
-
disabled: disabled
|
|
1616
|
-
}));
|
|
1617
|
-
|
|
1618
|
-
if (!hidden) {
|
|
1619
|
-
$actionCell.append('\n').append($actionButton);
|
|
1620
|
-
}
|
|
1621
|
-
});
|
|
1622
|
-
} else {
|
|
1623
|
-
var nextContent = nextData[cellId];
|
|
1624
|
-
$row.find("td.".concat(cellId)).html(DOMPurify.sanitize(nextContent));
|
|
1625
|
-
}
|
|
1579
|
+
// NOTE: The code above generate the table cell. With updating handlebars to the version > 2.*, please move it to the dedicated template to reuse it in layout.tpl as well
|
|
1580
|
+
nextState.data.forEach((nextData, index) => {
|
|
1581
|
+
const $row = $container.find(`tr[data-item-identifier="${nextData.id}"]`);
|
|
1582
|
+
options.model.forEach(model => {
|
|
1583
|
+
const cellId = model.id;
|
|
1584
|
+
if (model.type) {
|
|
1585
|
+
const $actionCell = $row.find(`td.actions.${cellId}`);
|
|
1586
|
+
$actionCell.html('');
|
|
1587
|
+
model.actions.forEach(action => {
|
|
1588
|
+
const id = action.id;
|
|
1589
|
+
const hidden = getPropertyValue('hidden', action, nextData);
|
|
1590
|
+
const title = getPropertyValue('title', action, nextData);
|
|
1591
|
+
const disabled = getPropertyValue('disabled', action, nextData);
|
|
1592
|
+
const icon = getPropertyValue('icon', action, nextData);
|
|
1593
|
+
const label = getPropertyValue('label', action, nextData);
|
|
1594
|
+
const $actionButton = $$1(buttonTpl({
|
|
1595
|
+
id,
|
|
1596
|
+
icon,
|
|
1597
|
+
label,
|
|
1598
|
+
title,
|
|
1599
|
+
disabled
|
|
1600
|
+
}));
|
|
1601
|
+
if (!hidden) {
|
|
1602
|
+
$actionCell.append('\n').append($actionButton);
|
|
1603
|
+
}
|
|
1604
|
+
});
|
|
1605
|
+
} else {
|
|
1606
|
+
const nextContent = nextData[cellId];
|
|
1607
|
+
$row.find(`td.${cellId}`).html(DOMPurify.sanitize(nextContent));
|
|
1608
|
+
}
|
|
1609
|
+
});
|
|
1626
1610
|
});
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1611
|
+
return true;
|
|
1612
|
+
},
|
|
1613
|
+
/**
|
|
1614
|
+
* Set the sort options.
|
|
1615
|
+
*
|
|
1616
|
+
* @param {jQueryElement} $elt - plugin's element
|
|
1617
|
+
* @param {String} sortBy - the model id of the col to sort
|
|
1618
|
+
* @param {Boolean|String} [asc] - sort direction true for asc of deduced
|
|
1619
|
+
* @param {String} sortType - sorting type, numeric or string sorting
|
|
1620
|
+
* @returns {Object} - returns the options
|
|
1621
|
+
* @private
|
|
1622
|
+
*/
|
|
1623
|
+
_sortOptions($elt, sortBy, asc, sortType) {
|
|
1624
|
+
const options = $elt.data(dataNs);
|
|
1625
|
+
if (typeof asc !== 'undefined') {
|
|
1626
|
+
if ('asc' !== asc && 'desc' !== asc) {
|
|
1627
|
+
asc = !!asc ? 'asc' : 'desc';
|
|
1628
|
+
}
|
|
1629
|
+
options.sortorder = asc;
|
|
1630
|
+
} else if (options.sortorder === 'asc' && options.sortby === sortBy) {
|
|
1631
|
+
// If I already sort asc this element
|
|
1632
|
+
options.sortorder = 'desc';
|
|
1633
|
+
} else {
|
|
1634
|
+
// If I never sort by this element or
|
|
1635
|
+
// I sort by this element & the order was desc
|
|
1636
|
+
options.sortorder = 'asc';
|
|
1647
1637
|
}
|
|
1648
1638
|
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
// If I already sort asc this element
|
|
1652
|
-
options.sortorder = 'desc';
|
|
1653
|
-
} else {
|
|
1654
|
-
// If I never sort by this element or
|
|
1655
|
-
// I sort by this element & the order was desc
|
|
1656
|
-
options.sortorder = 'asc';
|
|
1657
|
-
} // Change the sorting element anyway.
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
options.sortby = sortBy; // define sorting type
|
|
1661
|
-
|
|
1662
|
-
options.sorttype = sortType; //rebind options to the elt
|
|
1639
|
+
// Change the sorting element anyway.
|
|
1640
|
+
options.sortby = sortBy;
|
|
1663
1641
|
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
},
|
|
1667
|
-
|
|
1668
|
-
/**
|
|
1669
|
-
* Gets the selected items. Returns an array of identifiers.
|
|
1670
|
-
*
|
|
1671
|
-
* @param {jQueryElement} $elt - plugin's element
|
|
1672
|
-
* @returns {Array} - Returns an array of identifiers.
|
|
1673
|
-
*/
|
|
1674
|
-
_selection: function _selection($elt) {
|
|
1675
|
-
var $selected = $elt.find('[data-item-identifier]').has('td.checkboxes input:checked');
|
|
1676
|
-
var selection = [];
|
|
1677
|
-
$selected.each(function () {
|
|
1678
|
-
selection.push($$1(this).data('item-identifier'));
|
|
1679
|
-
});
|
|
1680
|
-
return selection;
|
|
1681
|
-
},
|
|
1682
|
-
_highlightRows: function _highlightRows($elt, rowIds) {
|
|
1683
|
-
var _this = this;
|
|
1684
|
-
|
|
1685
|
-
$elt.find('[data-item-identifier]').removeClass('highlight');
|
|
1686
|
-
rowIds.forEach(function (rowId) {
|
|
1687
|
-
_this._highlightRow($elt, rowId);
|
|
1688
|
-
});
|
|
1689
|
-
},
|
|
1690
|
-
|
|
1691
|
-
/**
|
|
1692
|
-
* Highlight the row with identifier
|
|
1693
|
-
*
|
|
1694
|
-
* @param $elt
|
|
1695
|
-
* @param rowId
|
|
1696
|
-
* @deprecated Use highlightRows instead
|
|
1697
|
-
*/
|
|
1698
|
-
_highlightRow: function _highlightRow($elt, rowId) {
|
|
1699
|
-
this._addRowClass($elt, rowId, 'highlight');
|
|
1700
|
-
},
|
|
1701
|
-
|
|
1702
|
-
/**
|
|
1703
|
-
* Css class add to the row with id
|
|
1704
|
-
*
|
|
1705
|
-
* @param $elt
|
|
1706
|
-
* @param rowId
|
|
1707
|
-
* @param className
|
|
1708
|
-
* @private
|
|
1709
|
-
*/
|
|
1710
|
-
_addRowClass: function _addRowClass($elt, rowId, className) {
|
|
1711
|
-
var $row = $elt.find('[data-item-identifier="' + rowId + '"]');
|
|
1642
|
+
// define sorting type
|
|
1643
|
+
options.sorttype = sortType;
|
|
1712
1644
|
|
|
1713
|
-
|
|
1714
|
-
$
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1645
|
+
//rebind options to the elt
|
|
1646
|
+
$elt.data(dataNs, options);
|
|
1647
|
+
return _.cloneDeep(options);
|
|
1648
|
+
},
|
|
1649
|
+
/**
|
|
1650
|
+
* Gets the selected items. Returns an array of identifiers.
|
|
1651
|
+
*
|
|
1652
|
+
* @param {jQueryElement} $elt - plugin's element
|
|
1653
|
+
* @returns {Array} - Returns an array of identifiers.
|
|
1654
|
+
*/
|
|
1655
|
+
_selection($elt) {
|
|
1656
|
+
const $selected = $elt.find('[data-item-identifier]').has('td.checkboxes input:checked');
|
|
1657
|
+
const selection = [];
|
|
1658
|
+
$selected.each(function () {
|
|
1659
|
+
selection.push($$1(this).data('item-identifier'));
|
|
1660
|
+
});
|
|
1661
|
+
return selection;
|
|
1662
|
+
},
|
|
1663
|
+
_highlightRows($elt, rowIds) {
|
|
1664
|
+
$elt.find('[data-item-identifier]').removeClass('highlight');
|
|
1665
|
+
rowIds.forEach(rowId => {
|
|
1666
|
+
this._highlightRow($elt, rowId);
|
|
1667
|
+
});
|
|
1668
|
+
},
|
|
1669
|
+
/**
|
|
1670
|
+
* Highlight the row with identifier
|
|
1671
|
+
*
|
|
1672
|
+
* @param $elt
|
|
1673
|
+
* @param rowId
|
|
1674
|
+
* @deprecated Use highlightRows instead
|
|
1675
|
+
*/
|
|
1676
|
+
_highlightRow($elt, rowId) {
|
|
1677
|
+
this._addRowClass($elt, rowId, 'highlight');
|
|
1678
|
+
},
|
|
1679
|
+
/**
|
|
1680
|
+
* Css class add to the row with id
|
|
1681
|
+
*
|
|
1682
|
+
* @param $elt
|
|
1683
|
+
* @param rowId
|
|
1684
|
+
* @param className
|
|
1685
|
+
* @private
|
|
1686
|
+
*/
|
|
1687
|
+
_addRowClass($elt, rowId, className) {
|
|
1688
|
+
const $row = $elt.find('[data-item-identifier="' + rowId + '"]');
|
|
1689
|
+
if (!$row.hasClass(className)) {
|
|
1690
|
+
$row.addClass(className);
|
|
1691
|
+
}
|
|
1692
|
+
},
|
|
1693
|
+
/**
|
|
1694
|
+
* Css class remove from the row with id
|
|
1695
|
+
*
|
|
1696
|
+
* @param $elt
|
|
1697
|
+
* @param rowId
|
|
1698
|
+
* @param className
|
|
1699
|
+
* @private
|
|
1700
|
+
*/
|
|
1701
|
+
_removeRowClass($elt, rowId, className) {
|
|
1702
|
+
const $row = $elt.find('[data-item-identifier="' + rowId + '"]');
|
|
1703
|
+
if ($row.hasClass(className)) {
|
|
1704
|
+
$row.removeClass(className);
|
|
1705
|
+
}
|
|
1706
|
+
},
|
|
1707
|
+
/**
|
|
1708
|
+
* Update amount items per page
|
|
1709
|
+
*
|
|
1710
|
+
* @param $elt
|
|
1711
|
+
* @param rows
|
|
1712
|
+
* @fires dataTable#setpage.datatable
|
|
1713
|
+
*/
|
|
1714
|
+
_setRows($elt, rows) {
|
|
1715
|
+
const options = $elt.data(dataNs);
|
|
1716
|
+
if (options.rows !== rows) {
|
|
1717
|
+
// set new amount of items per page
|
|
1718
|
+
options.rows = rows;
|
|
1747
1719
|
|
|
1748
|
-
|
|
1720
|
+
// set page to the first one
|
|
1721
|
+
options.page = 1;
|
|
1749
1722
|
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
* @event dataTable#setpage.dataTable
|
|
1753
|
-
*/
|
|
1723
|
+
//rebind options to the elt
|
|
1724
|
+
$elt.data(dataNs, options);
|
|
1754
1725
|
|
|
1755
|
-
|
|
1726
|
+
/**
|
|
1727
|
+
* @event dataTable#setpage.dataTable
|
|
1728
|
+
*/
|
|
1729
|
+
$elt.trigger('setpage.' + ns);
|
|
1756
1730
|
|
|
1757
|
-
|
|
1731
|
+
// Call the query
|
|
1732
|
+
this._query($elt);
|
|
1733
|
+
}
|
|
1758
1734
|
}
|
|
1759
|
-
}
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
});
|
|
1735
|
+
};
|
|
1736
|
+
Pluginifier.register(ns, dataTable, {
|
|
1737
|
+
expose: ['refresh', 'sort', 'filter', 'selection', 'render', 'highlightRow', 'highlightRows', 'addRowClass', 'removeRowClass']
|
|
1738
|
+
});
|
|
1764
1739
|
|
|
1765
1740
|
});
|