From 407893b872fd4a9a760c869c0ef5f00b068bf557 Mon Sep 17 00:00:00 2001 From: Jonathan Rosenbaum Date: Tue, 10 Oct 2017 03:18:06 +0000 Subject: [PATCH] Adds the nice tabulator library! --- .../bootstrap/tabulator_bootstrap.css | 574 + .../bootstrap/tabulator_bootstrap.min.css | 3 + .../bootstrap/tabulator_bootstrap.min.css.map | 1 + .../semantic-ui/tabulator_semantic-ui.css | 1052 ++ .../semantic-ui/tabulator_semantic-ui.min.css | 3 + .../tabulator_semantic-ui.min.css.map | 1 + css/tabulator/tabulator.css | 535 + css/tabulator/tabulator.min.css | 3 + css/tabulator/tabulator.min.css.map | 1 + css/tabulator/tabulator_midnight.css | 539 + css/tabulator/tabulator_midnight.min.css | 3 + css/tabulator/tabulator_midnight.min.css.map | 1 + css/tabulator/tabulator_modern.css | 562 + css/tabulator/tabulator_modern.min.css | 3 + css/tabulator/tabulator_modern.min.css.map | 1 + css/tabulator/tabulator_simple.css | 534 + css/tabulator/tabulator_simple.min.css | 3 + css/tabulator/tabulator_simple.min.css.map | 1 + css/tabulator/tabulator_site.css | 533 + css/tabulator/tabulator_site.min.css | 3 + css/tabulator/tabulator_site.min.css.map | 1 + js/tabulator/.gitignore | 5 + js/tabulator/LICENSE | 21 + js/tabulator/README.md | 74 + js/tabulator/bower.json | 36 + js/tabulator/dist/js/tabulator.js | 14526 ++++++++++++++++ js/tabulator/dist/js/tabulator.min.js | 6 + js/tabulator/gulpfile.js | 100 + js/tabulator/package.json | 62 + js/tabulator/src/js/cell.js | 479 + js/tabulator/src/js/column.js | 896 + js/tabulator/src/js/column_manager.js | 462 + js/tabulator/src/js/core.js | 1107 ++ js/tabulator/src/js/extensions/accessor.js | 58 + js/tabulator/src/js/extensions/ajax.js | 187 + .../src/js/extensions/calculation_colums.js | 381 + js/tabulator/src/js/extensions/download.js | 256 + js/tabulator/src/js/extensions/edit.js | 580 + js/tabulator/src/js/extensions/filter.js | 453 + js/tabulator/src/js/extensions/format.js | 273 + .../src/js/extensions/frozen_columns.js | 162 + js/tabulator/src/js/extensions/group_rows.js | 641 + js/tabulator/src/js/extensions/history.js | 117 + .../src/js/extensions/html_table_import.js | 197 + js/tabulator/src/js/extensions/keybindings.js | 333 + js/tabulator/src/js/extensions/layout.js | 160 + js/tabulator/src/js/extensions/localize.js | 196 + .../src/js/extensions/moveable_columns.js | 187 + .../src/js/extensions/moveable_rows.js | 172 + js/tabulator/src/js/extensions/mutator.js | 58 + js/tabulator/src/js/extensions/page.js | 412 + .../src/js/extensions/persistent_layout.js | 155 + .../src/js/extensions/resize_columns.js | 119 + .../src/js/extensions/responsive_layout.js | 84 + js/tabulator/src/js/extensions/select_row.js | 242 + js/tabulator/src/js/extensions/sort.js | 341 + js/tabulator/src/js/extensions/validate.js | 178 + js/tabulator/src/js/extensions_enabled.js | 22 + js/tabulator/src/js/footer_manager.js | 65 + js/tabulator/src/js/jquery_wrapper.js | 32 + js/tabulator/src/js/polyfills.js | 92 + js/tabulator/src/js/row.js | 487 + js/tabulator/src/js/row_manager.js | 1128 ++ .../scss/bootstrap/tabulator_bootstrap.scss | 750 + .../src/scss/bootstrap/variables.scss | 870 + .../semantic-ui/tabulator_semantic-ui.scss | 1056 ++ .../src/scss/semantic-ui/variables.scss | 830 + .../src/scss/semantic-ui/variables_table.scss | 248 + js/tabulator/src/scss/tabulator.scss | 686 + js/tabulator/src/scss/tabulator_midnight.scss | 684 + js/tabulator/src/scss/tabulator_modern.scss | 722 + js/tabulator/src/scss/tabulator_simple.scss | 680 + js/tabulator/src/scss/tabulator_site.scss | 689 + 73 files changed, 37114 insertions(+) create mode 100644 css/tabulator/bootstrap/tabulator_bootstrap.css create mode 100644 css/tabulator/bootstrap/tabulator_bootstrap.min.css create mode 100644 css/tabulator/bootstrap/tabulator_bootstrap.min.css.map create mode 100644 css/tabulator/semantic-ui/tabulator_semantic-ui.css create mode 100644 css/tabulator/semantic-ui/tabulator_semantic-ui.min.css create mode 100644 css/tabulator/semantic-ui/tabulator_semantic-ui.min.css.map create mode 100644 css/tabulator/tabulator.css create mode 100644 css/tabulator/tabulator.min.css create mode 100644 css/tabulator/tabulator.min.css.map create mode 100644 css/tabulator/tabulator_midnight.css create mode 100644 css/tabulator/tabulator_midnight.min.css create mode 100644 css/tabulator/tabulator_midnight.min.css.map create mode 100644 css/tabulator/tabulator_modern.css create mode 100644 css/tabulator/tabulator_modern.min.css create mode 100644 css/tabulator/tabulator_modern.min.css.map create mode 100644 css/tabulator/tabulator_simple.css create mode 100644 css/tabulator/tabulator_simple.min.css create mode 100644 css/tabulator/tabulator_simple.min.css.map create mode 100644 css/tabulator/tabulator_site.css create mode 100644 css/tabulator/tabulator_site.min.css create mode 100644 css/tabulator/tabulator_site.min.css.map create mode 100644 js/tabulator/.gitignore create mode 100644 js/tabulator/LICENSE create mode 100644 js/tabulator/README.md create mode 100644 js/tabulator/bower.json create mode 100644 js/tabulator/dist/js/tabulator.js create mode 100644 js/tabulator/dist/js/tabulator.min.js create mode 100644 js/tabulator/gulpfile.js create mode 100644 js/tabulator/package.json create mode 100644 js/tabulator/src/js/cell.js create mode 100644 js/tabulator/src/js/column.js create mode 100644 js/tabulator/src/js/column_manager.js create mode 100644 js/tabulator/src/js/core.js create mode 100644 js/tabulator/src/js/extensions/accessor.js create mode 100644 js/tabulator/src/js/extensions/ajax.js create mode 100644 js/tabulator/src/js/extensions/calculation_colums.js create mode 100644 js/tabulator/src/js/extensions/download.js create mode 100644 js/tabulator/src/js/extensions/edit.js create mode 100644 js/tabulator/src/js/extensions/filter.js create mode 100644 js/tabulator/src/js/extensions/format.js create mode 100644 js/tabulator/src/js/extensions/frozen_columns.js create mode 100644 js/tabulator/src/js/extensions/group_rows.js create mode 100644 js/tabulator/src/js/extensions/history.js create mode 100644 js/tabulator/src/js/extensions/html_table_import.js create mode 100644 js/tabulator/src/js/extensions/keybindings.js create mode 100644 js/tabulator/src/js/extensions/layout.js create mode 100644 js/tabulator/src/js/extensions/localize.js create mode 100644 js/tabulator/src/js/extensions/moveable_columns.js create mode 100644 js/tabulator/src/js/extensions/moveable_rows.js create mode 100644 js/tabulator/src/js/extensions/mutator.js create mode 100644 js/tabulator/src/js/extensions/page.js create mode 100644 js/tabulator/src/js/extensions/persistent_layout.js create mode 100644 js/tabulator/src/js/extensions/resize_columns.js create mode 100644 js/tabulator/src/js/extensions/responsive_layout.js create mode 100644 js/tabulator/src/js/extensions/select_row.js create mode 100644 js/tabulator/src/js/extensions/sort.js create mode 100644 js/tabulator/src/js/extensions/validate.js create mode 100644 js/tabulator/src/js/extensions_enabled.js create mode 100644 js/tabulator/src/js/footer_manager.js create mode 100644 js/tabulator/src/js/jquery_wrapper.js create mode 100644 js/tabulator/src/js/polyfills.js create mode 100644 js/tabulator/src/js/row.js create mode 100644 js/tabulator/src/js/row_manager.js create mode 100644 js/tabulator/src/scss/bootstrap/tabulator_bootstrap.scss create mode 100644 js/tabulator/src/scss/bootstrap/variables.scss create mode 100644 js/tabulator/src/scss/semantic-ui/tabulator_semantic-ui.scss create mode 100644 js/tabulator/src/scss/semantic-ui/variables.scss create mode 100644 js/tabulator/src/scss/semantic-ui/variables_table.scss create mode 100644 js/tabulator/src/scss/tabulator.scss create mode 100644 js/tabulator/src/scss/tabulator_midnight.scss create mode 100644 js/tabulator/src/scss/tabulator_modern.scss create mode 100644 js/tabulator/src/scss/tabulator_simple.scss create mode 100644 js/tabulator/src/scss/tabulator_site.scss diff --git a/css/tabulator/bootstrap/tabulator_bootstrap.css b/css/tabulator/bootstrap/tabulator_bootstrap.css new file mode 100644 index 0000000..e7781a4 --- /dev/null +++ b/css/tabulator/bootstrap/tabulator_bootstrap.css @@ -0,0 +1,574 @@ +/* Tabulator v3.3.1 (c) Oliver Folkerd */ +.tabulator { + position: relative; + background-color: #fff; + overflow: hidden; + font-size: 14px; + text-align: left; + width: 100%; + max-width: 100%; + margin-bottom: 20px; + -ms-transform: translatez(0); + transform: translatez(0); +} + +.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { + min-width: 100%; +} + +.tabulator.tabulator-block-select { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator .tabulator-header { + position: relative; + box-sizing: border-box; + width: 100%; + border-bottom: 2px solid #ddd; + background-color: #fff; + font-weight: bold; + white-space: nowrap; + overflow: hidden; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-header .tabulator-col { + display: inline-block; + position: relative; + box-sizing: border-box; + background-color: #fff; + text-align: left; + vertical-align: bottom; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-moving { + position: absolute; + border: 1px solid #ddd; + background: #e6e6e6; + pointer-events: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content { + position: relative; + padding: 8px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { + box-sizing: border-box; + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + vertical-align: bottom; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { + box-sizing: border-box; + width: 100%; + border: 1px solid #999; + padding: 1px; + background: #fff; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + display: inline-block; + position: absolute; + top: 14px; + right: 8px; + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + position: relative; + display: -ms-flexbox; + display: flex; + border-top: 1px solid #ddd; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { + position: absolute; + background-color: #e6e6e6 !important; + border: 1px solid #ddd; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { + position: relative; + box-sizing: border-box; + margin-top: 2px; + width: 100%; + text-align: center; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { + height: auto !important; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { + margin-top: 3px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 25px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { + cursor: pointer; + background-color: #e6e6e6; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { + border-top: 6px solid #666; + border-bottom: none; +} + +.tabulator .tabulator-header .tabulator-frozen { + display: inline-block; + position: absolute; + z-index: 10; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #ddd; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #ddd; +} + +.tabulator .tabulator-header .tabulator-calcs-holder { + box-sizing: border-box; + width: 100%; + background: white !important; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { + background: white !important; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-tableHolder { + position: relative; + width: 100%; + white-space: nowrap; + overflow: auto; + -webkit-overflow-scrolling: touch; +} + +.tabulator .tabulator-tableHolder:focus { + outline: none; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder { + position: absolute; + box-sizing: border-box; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + top: 0; + left: 0; + height: 100%; + width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder span { + display: inline-block; + margin: 0 auto; + padding: 10px; + color: #000; + font-weight: bold; + font-size: 20px; +} + +.tabulator .tabulator-tableHolder .tabulator-table { + position: relative; + display: inline-block; + background-color: #fff; + white-space: nowrap; + overflow: visible; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { + font-weight: bold; + background: #ececec !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { + border-bottom: 2px solid #ddd; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { + border-top: 2px solid #ddd; +} + +.tabulator .tabulator-row { + position: relative; + box-sizing: border-box; + min-height: 30px; + background-color: #fff; + border-bottom: 1px solid #ddd; +} + +.tabulator .tabulator-row.tabulator-selectable:hover { + background-color: #f5f5f5 !important; + cursor: pointer; +} + +.tabulator .tabulator-row.tabulator-selected { + background-color: #9ABCEA; +} + +.tabulator .tabulator-row.tabulator-selected:hover { + background-color: #769BCC; + cursor: pointer; +} + +.tabulator .tabulator-row.tabulator-moving { + position: absolute; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + pointer-events: none !important; + z-index: 15; +} + +.tabulator .tabulator-row .tabulator-frozen { + display: inline-block; + position: absolute; + background-color: inherit; + z-index: 10; +} + +.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #ddd; +} + +.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #ddd; +} + +.tabulator .tabulator-row .tabulator-cell { + display: inline-block; + position: relative; + box-sizing: border-box; + padding: 8px; + vertical-align: middle; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.tabulator .tabulator-row .tabulator-cell:last-of-type { + border-right: none; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-editing { + border: 1px solid #1D68CD; + padding: 0; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-editing input, .tabulator .tabulator-row .tabulator-cell.tabulator-editing select { + border: 1px; + background: transparent; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail { + border: 1px solid #dd0000; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail select { + border: 1px; + background: transparent; + color: #dd0000; +} + +.tabulator .tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { + width: 80%; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { + width: 100%; + height: 3px; + margin: 2px 10% 0 10%; + background: #666; +} + +.tabulator .tabulator-row.tabulator-group { + box-sizing: border-box; + border-bottom: 1px solid #999; + border-right: 1px solid #ddd; + border-top: 1px solid #999; + padding: 5px; + padding-left: 10px; + background: #fafafa; + font-weight: bold; + min-width: 100%; +} + +.tabulator .tabulator-row.tabulator-group:hover { + cursor: pointer; + background-color: rgba(0, 0, 0, 0.1); +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #666; + border-bottom: 0; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow { + margin-left: 20px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow { + margin-left: 40px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow { + margin-left: 60px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow { + margin-left: 80px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow { + margin-left: 1000px; +} + +.tabulator .tabulator-row.tabulator-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #666; + vertical-align: middle; +} + +.tabulator .tabulator-row.tabulator-group span { + margin-left: 10px; + color: #666; +} + +.tabulator .tabulator-col-resize-handle { + position: absolute; + right: 0; + top: 0; + bottom: 0; + width: 5px; +} + +.tabulator .tabulator-col-resize-handle.prev { + left: 0; + right: auto; +} + +.tabulator .tabulator-col-resize-handle:hover { + cursor: ew-resize; +} + +.tabulator .tabulator-footer { + padding: 5px 10px; + border-top: 2px solid #ddd; + text-align: right; + font-weight: bold; + white-space: nowrap; + -ms-user-select: none; + user-select: none; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder { + box-sizing: border-box; + width: calc("100% + 20px"); + margin: -5px -10px 5px -10px; + text-align: left; + background: white !important; + border-bottom: 1px solid #ddd; + border-top: 1px solid #ddd; + overflow: hidden; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { + background: white !important; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { + margin-bottom: -5px; + border-bottom: none; +} + +.tabulator .tabulator-footer .tabulator-pages { + margin: 0 7px; +} + +.tabulator .tabulator-footer .tabulator-page { + display: inline-block; + margin: 0 2px; + border: 1px solid #ddd; + border-radius: 3px; + padding: 2px 5px; + background: rgba(255, 255, 255, 0.2); + font-family: inherit; + font-weight: inherit; + font-size: inherit; +} + +.tabulator .tabulator-footer .tabulator-page.active { + color: #d00; +} + +.tabulator .tabulator-footer .tabulator-page:disabled { + opacity: .5; +} + +.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); + color: #fff; +} + +.tabulator .tablulator-loader { + position: absolute; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + top: 0; + left: 0; + z-index: 100; + height: 100%; + width: 100%; + background: rgba(0, 0, 0, 0.4); + text-align: center; +} + +.tabulator .tablulator-loader .tabulator-loader-msg { + display: inline-block; + margin: 0 auto; + padding: 10px 20px; + border-radius: 10px; + background: #fff; + font-weight: bold; + font-size: 16px; +} + +.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-loading { + border: 4px solid #333; + color: #000; +} + +.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-error { + border: 4px solid #D00; + color: #590000; +} + +.tabulator.table-striped .tabulator-row:nth-child(even) { + background-color: #f9f9f9; +} + +.tabulator.table-bordered { + border: 1px solid #ddd; +} + +.tabulator.table-bordered .tabulator-header .tabulator-col { + border-right: 1px solid #ddd; +} + +.tabulator.table-bordered .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { + border-right: 1px solid #ddd; +} + +.tabulator.table-condensed .tabulator-header .tabulator-col .tabulator-col-content { + padding: 5px; +} + +.tabulator.table-condensed .tabulator-tableHolder .tabulator-table .tabulator-row { + min-height: 24px; +} + +.tabulator.table-condensed .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { + padding: 5px; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active { + background: #f5f5f5 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.success { + background: #dff0d8 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.info { + background: #d9edf7 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning { + background: #fcf8e3 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.danger { + background: #f2dede !important; +} diff --git a/css/tabulator/bootstrap/tabulator_bootstrap.min.css b/css/tabulator/bootstrap/tabulator_bootstrap.min.css new file mode 100644 index 0000000..8da796a --- /dev/null +++ b/css/tabulator/bootstrap/tabulator_bootstrap.min.css @@ -0,0 +1,3 @@ +/* Tabulator v3.3.1 (c) Oliver Folkerd */ +.tabulator{position:relative;background-color:#fff;overflow:hidden;font-size:14px;text-align:left;width:100%;max-width:100%;margin-bottom:20px;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator.tabulator-block-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{width:100%;border-bottom:2px solid #ddd;font-weight:700;white-space:nowrap;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header,.tabulator .tabulator-header .tabulator-col{position:relative;box-sizing:border-box;background-color:#fff;overflow:hidden}.tabulator .tabulator-header .tabulator-col{display:inline-block;text-align:left;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #ddd;background:#e6e6e6;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{position:relative;padding:8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:14px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #ddd;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#e6e6e6!important;border:1px solid #ddd}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#e6e6e6}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #666;border-bottom:none}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:1}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #ddd}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #ddd}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;width:100%;background:#fff!important;border-top:1px solid #ddd;border-bottom:1px solid #ddd;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#fff!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{position:absolute;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;height:100%;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#000;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#fff;white-space:nowrap;overflow:visible}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#ececec!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #ddd}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #ddd}.tabulator .tabulator-row{position:relative;box-sizing:border-box;min-height:30px;background-color:#fff;border-bottom:1px solid #ddd}.tabulator .tabulator-row.tabulator-selectable:hover{background-color:#f5f5f5!important;cursor:pointer}.tabulator .tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator .tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator .tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #ddd;border-bottom:1px solid #ddd;pointer-events:none!important;z-index:2}.tabulator .tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:1}.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #ddd}.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #ddd}.tabulator .tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:8px;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator .tabulator-row .tabulator-cell:last-of-type{border-right:none}.tabulator .tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;padding:0}.tabulator .tabulator-row .tabulator-cell.tabulator-editing input,.tabulator .tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator .tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin:2px 10% 0;background:#666}.tabulator .tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #ddd;border-top:1px solid #999;padding:5px;padding-left:10px;background:#fafafa;font-weight:700;min-width:100%}.tabulator .tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator .tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow{margin-left:20px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow{margin-left:40px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow{margin-left:60px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow{margin-left:80px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow{margin-left:1000px}.tabulator .tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator .tabulator-row.tabulator-group span{margin-left:10px;color:#666}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-footer{padding:5px 10px;border-top:2px solid #ddd;text-align:right;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc("100% + 20px");margin:-5px -10px 5px;text-align:left;background:#fff!important;border-bottom:1px solid #ddd;border-top:1px solid #ddd;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#fff!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;border:1px solid #ddd;border-radius:3px;padding:2px 5px;background:hsla(0,0%,100%,.2);font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page.active{color:#d00}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tablulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:3;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tablulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator.table-striped .tabulator-row:nth-child(2n){background-color:#f9f9f9}.tabulator.table-bordered{border:1px solid #ddd}.tabulator.table-bordered .tabulator-header .tabulator-col,.tabulator.table-bordered .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{border-right:1px solid #ddd}.tabulator.table-condensed .tabulator-header .tabulator-col .tabulator-col-content{padding:5px}.tabulator.table-condensed .tabulator-tableHolder .tabulator-table .tabulator-row{min-height:24px}.tabulator.table-condensed .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{padding:5px}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active{background:#f5f5f5!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.success{background:#dff0d8!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.info{background:#d9edf7!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning{background:#fcf8e3!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.danger{background:#f2dede!important} +/*# sourceMappingURL=tabulator_bootstrap.min.css.map */ diff --git a/css/tabulator/bootstrap/tabulator_bootstrap.min.css.map b/css/tabulator/bootstrap/tabulator_bootstrap.min.css.map new file mode 100644 index 0000000..e3e668b --- /dev/null +++ b/css/tabulator/bootstrap/tabulator_bootstrap.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["tabulator_bootstrap.min.css"],"names":[],"mappings":"AACA,WACE,kBAAmB,AACnB,sBAAuB,AACvB,gBAAiB,AACjB,eAAgB,AAChB,gBAAiB,AACjB,WAAY,AACZ,eAAgB,AAChB,mBAAoB,AAEpB,uBAAyB,CAC1B,AAED,iFACE,cAAgB,CACjB,AAED,kCACE,yBAA0B,AACvB,sBAAuB,AACtB,qBAAsB,AAClB,gBAAkB,CAC3B,AAED,6BAGE,WAAY,AACZ,6BAA8B,AAE9B,gBAAkB,AAClB,mBAAoB,AAEpB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,yEAdE,kBAAmB,AACnB,sBAAuB,AAGvB,sBAAuB,AAGvB,eAAiB,CAOnB,AAQC,4CAPC,qBAAsB,AAItB,gBAAiB,AACjB,qBAAuB,CAExB,AAED,6DACE,kBAAmB,AACnB,sBAAuB,AACvB,mBAAoB,AACpB,mBAAqB,CACtB,AAED,mEACE,kBAAmB,AACnB,WAAa,CACd,AAED,wFACE,sBAAuB,AACvB,WAAY,AACZ,mBAAoB,AACpB,gBAAiB,AACjB,uBAAwB,AACxB,qBAAuB,CACxB,AAED,gHACE,sBAAuB,AACvB,WAAY,AACZ,sBAAuB,AACvB,YAAa,AACb,eAAiB,CAClB,AAED,oFACE,qBAAsB,AACtB,kBAAmB,AACnB,SAAU,AACV,UAAW,AACX,QAAS,AACT,SAAU,AACV,kCAAmC,AACnC,mCAAoC,AACpC,4BAA8B,CAC/B,AAED,0FACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,0BAA2B,AAC3B,eAAiB,CAClB,AAED,oHACE,iBAAmB,CACpB,AAED,0FACE,YAAc,CACf,AAED,+DACE,kBAAmB,AACnB,mCAAqC,AACrC,qBAAuB,CACxB,AAED,qEACE,kBAAmB,AACnB,sBAAuB,AACvB,eAAgB,AAChB,WAAY,AACZ,iBAAmB,CACpB,AAED,8EACE,qBAAwB,CACzB,AAED,yEACE,cAAgB,CACjB,AAED,oFACE,kBAAoB,CACrB,AAED,qEACE,eAAgB,AAChB,wBAA0B,CAC3B,AAED,uHACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,sHACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,uHACE,0BAA2B,AAC3B,kBAAoB,CACrB,AAED,+CACE,qBAAsB,AACtB,kBAAmB,AACnB,SAAY,CACb,AAED,qEACE,2BAA6B,CAC9B,AAED,sEACE,0BAA4B,CAC7B,AAED,qDACE,sBAAuB,AACvB,WAAY,AACZ,0BAA6B,AAC7B,0BAA2B,AAC3B,6BAA8B,AAC9B,eAAiB,CAClB,AAED,oEACE,yBAA6B,CAC9B,AAED,iGACE,YAAc,CACf,AAED,kCACE,kBAAmB,AACnB,WAAY,AACZ,mBAAoB,AACpB,cAAe,AACf,gCAAkC,CACnC,AAED,wCACE,YAAc,CACf,AAED,yDACE,kBAAmB,AACnB,sBAAuB,AACvB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,MAAO,AACP,OAAQ,AACR,YAAa,AACb,UAAY,CACb,AAED,8DACE,qBAAsB,AACtB,cAAe,AACf,aAAc,AACd,WAAY,AACZ,gBAAkB,AAClB,cAAgB,CACjB,AAED,mDACE,kBAAmB,AACnB,qBAAsB,AACtB,sBAAuB,AACvB,mBAAoB,AACpB,gBAAkB,CACnB,AAED,kFACE,gBAAkB,AAClB,4BAA+B,CAChC,AAED,sGACE,4BAA8B,CAC/B,AAED,yGACE,yBAA2B,CAC5B,AAED,0BACE,kBAAmB,AACnB,sBAAuB,AACvB,gBAAiB,AACjB,sBAAuB,AACvB,4BAA8B,CAC/B,AAED,qDACE,mCAAqC,AACrC,cAAgB,CACjB,AAED,6CACE,wBAA0B,CAC3B,AAED,mDACE,yBAA0B,AAC1B,cAAgB,CACjB,AAED,2CACE,kBAAmB,AACnB,0BAA2B,AAC3B,6BAA8B,AAC9B,8BAAgC,AAChC,SAAY,CACb,AAED,4CACE,qBAAsB,AACtB,kBAAmB,AACnB,yBAA0B,AAC1B,SAAY,CACb,AAED,kEACE,2BAA6B,CAC9B,AAED,mEACE,0BAA4B,CAC7B,AAED,0CACE,qBAAsB,AACtB,kBAAmB,AACnB,sBAAuB,AACvB,YAAa,AACb,sBAAuB,AACvB,mBAAoB,AACpB,gBAAiB,AACjB,sBAAwB,CACzB,AAED,uDACE,iBAAmB,CACpB,AAED,4DACE,yBAA0B,AAC1B,SAAW,CACZ,AAED,qIACE,WAAY,AACZ,sBAAwB,CACzB,AAED,oEACE,qBAA0B,CAC3B,AAED,qJACE,WAAY,AACZ,uBAAwB,AACxB,UAAe,CAChB,AAED,wFACE,YAAc,CACf,AAED,+DACE,2BAA4B,AAC5B,oBAAqB,AACrB,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,yFACE,SAAW,CACZ,AAED,mHACE,WAAY,AACZ,WAAY,AACZ,iBAAsB,AACtB,eAAiB,CAClB,AAED,0CACE,sBAAuB,AACvB,6BAA8B,AAC9B,4BAA6B,AAC7B,0BAA2B,AAC3B,YAAa,AACb,kBAAmB,AACnB,mBAAoB,AACpB,gBAAkB,AAClB,cAAgB,CACjB,AAED,gDACE,eAAgB,AAChB,+BAAqC,CACtC,AAED,mFACE,kBAAmB,AACnB,kCAAmC,AACnC,mCAAoC,AACpC,0BAA2B,AAC3B,eAAiB,CAClB,AAED,mFACE,gBAAkB,CACnB,AAED,mFACE,gBAAkB,CACnB,AAED,mFACE,gBAAkB,CACnB,AAED,mFACE,gBAAkB,CACnB,AAED,mFACE,kBAAoB,CACrB,AAED,2DACE,qBAAsB,AACtB,QAAS,AACT,SAAU,AACV,kBAAmB,AACnB,iCAAkC,AAClC,oCAAqC,AACrC,eAAgB,AAChB,2BAA4B,AAC5B,qBAAuB,CACxB,AAED,+CACE,iBAAkB,AAClB,UAAY,CACb,AAED,wCACE,kBAAmB,AACnB,QAAS,AACT,MAAO,AACP,SAAU,AACV,SAAW,CACZ,AAED,6CACE,OAAQ,AACR,UAAY,CACb,AAED,8CACE,gBAAkB,CACnB,AAED,6BACE,iBAAkB,AAClB,0BAA2B,AAC3B,iBAAkB,AAClB,gBAAkB,AAClB,mBAAoB,AACpB,qBAAsB,AAClB,iBAAkB,AACtB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,qDACE,sBAAuB,AACvB,0BAA2B,AAC3B,sBAA6B,AAC7B,gBAAiB,AACjB,0BAA6B,AAC7B,6BAA8B,AAC9B,0BAA2B,AAC3B,eAAiB,CAClB,AAED,oEACE,yBAA6B,CAC9B,AAED,iGACE,YAAc,CACf,AAED,gEACE,mBAAoB,AACpB,kBAAoB,CACrB,AAED,8CACE,YAAc,CACf,AAED,6CACE,qBAAsB,AACtB,aAAc,AACd,sBAAuB,AACvB,kBAAmB,AACnB,gBAAiB,AACjB,8BAAqC,AACrC,oBAAqB,AACrB,oBAAqB,AACrB,iBAAmB,CACpB,AAED,oDACE,UAAY,CACb,AAED,sDACE,UAAY,CACb,AAED,kEACE,eAAgB,AAChB,0BAA+B,AAC/B,UAAY,CACb,AAED,8BACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,MAAO,AACP,OAAQ,AACR,UAAa,AACb,YAAa,AACb,WAAY,AACZ,0BAA+B,AAC/B,iBAAmB,CACpB,AAED,oDACE,qBAAsB,AACtB,cAAe,AACf,kBAAmB,AACnB,mBAAoB,AACpB,gBAAiB,AACjB,gBAAkB,AAClB,cAAgB,CACjB,AAED,sEACE,sBAAuB,AACvB,UAAY,CACb,AAED,oEACE,sBAAuB,AACvB,aAAe,CAChB,AAED,sDACE,wBAA0B,CAC3B,AAED,0BACE,qBAAuB,CACxB,AAMD,4JACE,2BAA6B,CAC9B,AAED,mFACE,WAAa,CACd,AAED,kFACE,eAAiB,CAClB,AAED,kGACE,WAAa,CACd,AAED,yEACE,4BAA+B,CAChC,AAED,0EACE,4BAA+B,CAChC,AAED,uEACE,4BAA+B,CAChC,AAED,0EACE,4BAA+B,CAChC,AAED,yEACE,4BAA+B,CAChC","file":"tabulator_bootstrap.min.css","sourcesContent":["/* Tabulator v3.3.1 (c) Oliver Folkerd */\n.tabulator {\n position: relative;\n background-color: #fff;\n overflow: hidden;\n font-size: 14px;\n text-align: left;\n width: 100%;\n max-width: 100%;\n margin-bottom: 20px;\n -ms-transform: translatez(0);\n transform: translatez(0);\n}\n\n.tabulator[tabulator-layout=\"fitDataFill\"] .tabulator-tableHolder .tabulator-table {\n min-width: 100%;\n}\n\n.tabulator.tabulator-block-select {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.tabulator .tabulator-header {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n border-bottom: 2px solid #ddd;\n background-color: #fff;\n font-weight: bold;\n white-space: nowrap;\n overflow: hidden;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-header .tabulator-col {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n background-color: #fff;\n text-align: left;\n vertical-align: bottom;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-moving {\n position: absolute;\n border: 1px solid #ddd;\n background: #e6e6e6;\n pointer-events: none;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content {\n position: relative;\n padding: 8px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title {\n box-sizing: border-box;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: bottom;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor {\n box-sizing: border-box;\n width: 100%;\n border: 1px solid #999;\n padding: 1px;\n background: #fff;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n display: inline-block;\n position: absolute;\n top: 14px;\n right: 8px;\n width: 0;\n height: 0;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols {\n position: relative;\n display: -ms-flexbox;\n display: flex;\n border-top: 1px solid #ddd;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child {\n margin-right: -1px;\n}\n\n.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-col.ui-sortable-helper {\n position: absolute;\n background-color: #e6e6e6 !important;\n border: 1px solid #ddd;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter {\n position: relative;\n box-sizing: border-box;\n margin-top: 2px;\n width: 100%;\n text-align: center;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea {\n height: auto !important;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg {\n margin-top: 3px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title {\n padding-right: 25px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover {\n cursor: pointer;\n background-color: #e6e6e6;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"none\"] .tabulator-col-content .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"asc\"] .tabulator-col-content .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #666;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"desc\"] .tabulator-col-content .tabulator-arrow {\n border-top: 6px solid #666;\n border-bottom: none;\n}\n\n.tabulator .tabulator-header .tabulator-frozen {\n display: inline-block;\n position: absolute;\n z-index: 10;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #ddd;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #ddd;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder {\n box-sizing: border-box;\n width: 100%;\n background: white !important;\n border-top: 1px solid #ddd;\n border-bottom: 1px solid #ddd;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row {\n background: white !important;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-tableHolder {\n position: relative;\n width: 100%;\n white-space: nowrap;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.tabulator .tabulator-tableHolder:focus {\n outline: none;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder {\n position: absolute;\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder span {\n display: inline-block;\n margin: 0 auto;\n padding: 10px;\n color: #000;\n font-weight: bold;\n font-size: 20px;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table {\n position: relative;\n display: inline-block;\n background-color: #fff;\n white-space: nowrap;\n overflow: visible;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs {\n font-weight: bold;\n background: #ececec !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top {\n border-bottom: 2px solid #ddd;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom {\n border-top: 2px solid #ddd;\n}\n\n.tabulator .tabulator-row {\n position: relative;\n box-sizing: border-box;\n min-height: 30px;\n background-color: #fff;\n border-bottom: 1px solid #ddd;\n}\n\n.tabulator .tabulator-row.tabulator-selectable:hover {\n background-color: #f5f5f5 !important;\n cursor: pointer;\n}\n\n.tabulator .tabulator-row.tabulator-selected {\n background-color: #9ABCEA;\n}\n\n.tabulator .tabulator-row.tabulator-selected:hover {\n background-color: #769BCC;\n cursor: pointer;\n}\n\n.tabulator .tabulator-row.tabulator-moving {\n position: absolute;\n border-top: 1px solid #ddd;\n border-bottom: 1px solid #ddd;\n pointer-events: none !important;\n z-index: 15;\n}\n\n.tabulator .tabulator-row .tabulator-frozen {\n display: inline-block;\n position: absolute;\n background-color: inherit;\n z-index: 10;\n}\n\n.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #ddd;\n}\n\n.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #ddd;\n}\n\n.tabulator .tabulator-row .tabulator-cell {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n padding: 8px;\n vertical-align: middle;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.tabulator .tabulator-row .tabulator-cell:last-of-type {\n border-right: none;\n}\n\n.tabulator .tabulator-row .tabulator-cell.tabulator-editing {\n border: 1px solid #1D68CD;\n padding: 0;\n}\n\n.tabulator .tabulator-row .tabulator-cell.tabulator-editing input, .tabulator .tabulator-row .tabulator-cell.tabulator-editing select {\n border: 1px;\n background: transparent;\n}\n\n.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail {\n border: 1px solid #dd0000;\n}\n\n.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail select {\n border: 1px;\n background: transparent;\n color: #dd0000;\n}\n\n.tabulator .tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box {\n width: 80%;\n}\n\n.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar {\n width: 100%;\n height: 3px;\n margin: 2px 10% 0 10%;\n background: #666;\n}\n\n.tabulator .tabulator-row.tabulator-group {\n box-sizing: border-box;\n border-bottom: 1px solid #999;\n border-right: 1px solid #ddd;\n border-top: 1px solid #999;\n padding: 5px;\n padding-left: 10px;\n background: #fafafa;\n font-weight: bold;\n min-width: 100%;\n}\n\n.tabulator .tabulator-row.tabulator-group:hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.1);\n}\n\n.tabulator .tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow {\n margin-right: 10px;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-top: 6px solid #666;\n border-bottom: 0;\n}\n\n.tabulator .tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow {\n margin-left: 20px;\n}\n\n.tabulator .tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow {\n margin-left: 40px;\n}\n\n.tabulator .tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow {\n margin-left: 60px;\n}\n\n.tabulator .tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow {\n margin-left: 80px;\n}\n\n.tabulator .tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow {\n margin-left: 1000px;\n}\n\n.tabulator .tabulator-row.tabulator-group .tabulator-arrow {\n display: inline-block;\n width: 0;\n height: 0;\n margin-right: 16px;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 0;\n border-left: 6px solid #666;\n vertical-align: middle;\n}\n\n.tabulator .tabulator-row.tabulator-group span {\n margin-left: 10px;\n color: #666;\n}\n\n.tabulator .tabulator-col-resize-handle {\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n width: 5px;\n}\n\n.tabulator .tabulator-col-resize-handle.prev {\n left: 0;\n right: auto;\n}\n\n.tabulator .tabulator-col-resize-handle:hover {\n cursor: ew-resize;\n}\n\n.tabulator .tabulator-footer {\n padding: 5px 10px;\n border-top: 2px solid #ddd;\n text-align: right;\n font-weight: bold;\n white-space: nowrap;\n -ms-user-select: none;\n user-select: none;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder {\n box-sizing: border-box;\n width: calc(\"100% + 20px\");\n margin: -5px -10px 5px -10px;\n text-align: left;\n background: white !important;\n border-bottom: 1px solid #ddd;\n border-top: 1px solid #ddd;\n overflow: hidden;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row {\n background: white !important;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder:only-child {\n margin-bottom: -5px;\n border-bottom: none;\n}\n\n.tabulator .tabulator-footer .tabulator-pages {\n margin: 0 7px;\n}\n\n.tabulator .tabulator-footer .tabulator-page {\n display: inline-block;\n margin: 0 2px;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 2px 5px;\n background: rgba(255, 255, 255, 0.2);\n font-family: inherit;\n font-weight: inherit;\n font-size: inherit;\n}\n\n.tabulator .tabulator-footer .tabulator-page.active {\n color: #d00;\n}\n\n.tabulator .tabulator-footer .tabulator-page:disabled {\n opacity: .5;\n}\n\n.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n color: #fff;\n}\n\n.tabulator .tablulator-loader {\n position: absolute;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n top: 0;\n left: 0;\n z-index: 100;\n height: 100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.4);\n text-align: center;\n}\n\n.tabulator .tablulator-loader .tabulator-loader-msg {\n display: inline-block;\n margin: 0 auto;\n padding: 10px 20px;\n border-radius: 10px;\n background: #fff;\n font-weight: bold;\n font-size: 16px;\n}\n\n.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-loading {\n border: 4px solid #333;\n color: #000;\n}\n\n.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-error {\n border: 4px solid #D00;\n color: #590000;\n}\n\n.tabulator.table-striped .tabulator-row:nth-child(even) {\n background-color: #f9f9f9;\n}\n\n.tabulator.table-bordered {\n border: 1px solid #ddd;\n}\n\n.tabulator.table-bordered .tabulator-header .tabulator-col {\n border-right: 1px solid #ddd;\n}\n\n.tabulator.table-bordered .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n border-right: 1px solid #ddd;\n}\n\n.tabulator.table-condensed .tabulator-header .tabulator-col .tabulator-col-content {\n padding: 5px;\n}\n\n.tabulator.table-condensed .tabulator-tableHolder .tabulator-table .tabulator-row {\n min-height: 24px;\n}\n\n.tabulator.table-condensed .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n padding: 5px;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active {\n background: #f5f5f5 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.success {\n background: #dff0d8 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.info {\n background: #d9edf7 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning {\n background: #fcf8e3 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.danger {\n background: #f2dede !important;\n}\n"]} \ No newline at end of file diff --git a/css/tabulator/semantic-ui/tabulator_semantic-ui.css b/css/tabulator/semantic-ui/tabulator_semantic-ui.css new file mode 100644 index 0000000..303ca67 --- /dev/null +++ b/css/tabulator/semantic-ui/tabulator_semantic-ui.css @@ -0,0 +1,1052 @@ +/* Tabulator v3.3.1 (c) Oliver Folkerd */ +/******************************* + Site Settings +*******************************/ +/*------------------- + Fonts +--------------------*/ +/*------------------- + Base Sizes +--------------------*/ +/* This is the single variable that controls them all */ +/* The size of page text */ +/*------------------- + Exact Pixel Values +--------------------*/ +/* + These are used to specify exact pixel values in em + for things like borders that remain constantly + sized as emSize adjusts + + Since there are many more sizes than names for sizes, + these are named by their original pixel values. + +*/ +/*------------------- + Border Radius +--------------------*/ +/* See Power-user section below + for explanation of $px variables +*/ +/*------------------- + Site Colors +--------------------*/ +/*--- Colors ---*/ +/*--- Light Colors ---*/ +/*--- Neutrals ---*/ +/*--- Colored Backgrounds ---*/ +/*--- Colored Text ---*/ +/*--- Colored Headers ---*/ +/*--- Colored Border ---*/ +/*------------------- + Alpha Colors +--------------------*/ +/*------------------- + Brand Colors +--------------------*/ +/*-------------- + Page Heading +---------------*/ +/*------------------- + Page +--------------------*/ +/*-------------- + Form Input +---------------*/ +/* This adjusts the default form input across all elements */ +/* Input Text Color */ +/* Line Height Default For Inputs in Browser (Descendors are 17px at 14px base em) */ +/*------------------- + Focused Input +--------------------*/ +/* Used on inputs, textarea etc */ +/* Used on dropdowns, other larger blocks */ +/*------------------- + Sizes +--------------------*/ +/* + Sizes are all expressed in terms of 14px/em (default em) + This ensures these "ratios" remain constant despite changes in EM +*/ +/*------------------- + Paragraph +--------------------*/ +/*------------------- + Links +--------------------*/ +/*------------------- + Highlighted Text +--------------------*/ +/*------------------- + Em Sizes +--------------------*/ +/* + This rounds $size values to the closest pixel then expresses that value in (r)em. + This ensures all size values round to exact pixels +*/ +/* em */ +/* rem */ +/*------------------- + Loader +--------------------*/ +/*------------------- + Grid +--------------------*/ +/*------------------- + Transitions +--------------------*/ +/*------------------- + Breakpoints +--------------------*/ +/* Columns */ +/******************************* + Power-User +*******************************/ +/*------------------- + Emotive Colors +--------------------*/ +/* Positive */ +/* Negative */ +/* Info */ +/* Warning */ +/*------------------- + Paths +--------------------*/ +/* For source only. Modified in gulp for dist */ +/*------------------- + Icons +--------------------*/ +/* Maximum Glyph Width of Icon */ +/*------------------- + Neutral Text +--------------------*/ +/*------------------- + Brand Colors +--------------------*/ +/*------------------- + Borders +--------------------*/ +/*------------------- + Accents +--------------------*/ +/* Differentiating Neutrals */ +/* Differentiating Layers */ +/*------------------- + Derived Values +--------------------*/ +/* Loaders Position Offset */ +/* Rendered Scrollbar Width */ +/* Maximum Single Character Glyph Width, aka Capital "W" */ +/* Used to match floats with text */ +/* Header Spacing */ +/* Minimum Mobile Width */ +/* Positive / Negative Dupes */ +/* Responsive */ +/******************************* + States +*******************************/ +/*------------------- + Disabled +--------------------*/ +/*------------------- + Hover +--------------------*/ +/*--- Shadows ---*/ +/*--- Colors ---*/ +/*--- Emotive ---*/ +/*--- Brand ---*/ +/*--- Dark Tones ---*/ +/*--- Light Tones ---*/ +/*------------------- + Focus +--------------------*/ +/*--- Colors ---*/ +/*--- Emotive ---*/ +/*--- Brand ---*/ +/*--- Dark Tones ---*/ +/*--- Light Tones ---*/ +/*------------------- + Down (:active) +--------------------*/ +/*--- Colors ---*/ +/*--- Emotive ---*/ +/*--- Brand ---*/ +/*--- Dark Tones ---*/ +/*--- Light Tones ---*/ +/*------------------- + Active +--------------------*/ +/*--- Colors ---*/ +/*--- Emotive ---*/ +/*--- Brand ---*/ +/*--- Dark Tones ---*/ +/*--- Light Tones ---*/ +/******************************* + Table +*******************************/ +/*------------------- + Element +--------------------*/ +/*-------------- + Parts +---------------*/ +/* Table Row */ +/* Table Cell */ +/* Table Header */ +/* Table Footer */ +/* Responsive Size */ +/*------------------- + Types +--------------------*/ +/* Definition */ +/*-------------- + Couplings +---------------*/ +/*-------------- + States +---------------*/ +/* Positive */ +/* Negative */ +/* Error */ +/* Warning */ +/* Active */ +/*-------------- + Types +---------------*/ +/* Attached */ +/* Striped */ +/* Selectable */ +/* Sortable */ +/* Colors */ +/* Inverted */ +/* Basic */ +/* Padded */ +/* Compact */ +/* Sizes */ +.tabulator { + position: relative; + background-color: #FFFFFF; + overflow: hidden; + font-size: 14px; + text-align: left; + width: 100%; + margin: 1em 0em; + border: 1px solid rgba(34, 36, 38, 0.15); + box-shadow: none; + border-radius: 0.28571/pxrem; + color: rgba(0, 0, 0, 0.87); + -ms-transform: translatez(0); + transform: translatez(0); + /* Red */ + /* Orange */ + /* Yellow */ + /* Olive */ + /* Green */ + /* Teal */ + /* Blue */ + /* Violet */ + /* Purple */ + /* Pink */ + /* Brown */ + /* Grey */ + /* Black */ +} + +.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { + min-width: 100%; +} + +.tabulator.tabulator-block-select { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator .tabulator-header { + position: relative; + box-sizing: border-box; + width: 100%; + border-bottom: 1px solid rgba(34, 36, 38, 0.1); + background-color: #F9FAFB; + box-shadow: none; + color: rgba(0, 0, 0, 0.87); + font-style: none; + font-weight: bold; + text-transform: none; + white-space: nowrap; + overflow: hidden; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-header .tabulator-col { + display: inline-block; + position: relative; + box-sizing: border-box; + background-color: #F9FAFB; + text-align: left; + vertical-align: bottom; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-moving { + position: absolute; + border: 1px solid #999; + background: #dae1e7; + pointer-events: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content { + position: relative; + padding: 0.92857em 0.78571em; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { + box-sizing: border-box; + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + vertical-align: bottom; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { + box-sizing: border-box; + width: 100%; + border: 1px solid #999; + padding: 1px; + background: #fff; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + display: inline-block; + position: absolute; + top: 18px; + right: 8px; + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + position: relative; + display: -ms-flexbox; + display: flex; + border-top: 1px solid #ddd; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { + position: absolute; + background-color: #dae1e7 !important; + border: 1px solid #ddd; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { + position: relative; + box-sizing: border-box; + margin-top: 2px; + width: 100%; + text-align: center; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { + height: auto !important; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { + margin-top: 3px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 25px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { + cursor: pointer; + background-color: #dae1e7; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { + border-top: 6px solid #666; + border-bottom: none; +} + +.tabulator .tabulator-header .tabulator-frozen { + display: inline-block; + position: absolute; + z-index: 10; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #ddd; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #ddd; +} + +.tabulator .tabulator-header .tabulator-calcs-holder { + box-sizing: border-box; + min-width: 200%; + background: white !important; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { + background: white !important; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-tableHolder { + position: relative; + width: 100%; + white-space: nowrap; + overflow: auto; + -webkit-overflow-scrolling: touch; +} + +.tabulator .tabulator-tableHolder:focus { + outline: none; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder { + position: absolute; + box-sizing: border-box; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + top: 0; + left: 0; + height: 100%; + width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder span { + display: inline-block; + margin: 0 auto; + padding: 10px; + color: #000; + font-weight: bold; + font-size: 20px; +} + +.tabulator .tabulator-tableHolder .tabulator-table { + position: relative; + display: inline-block; + white-space: nowrap; + overflow: visible; + color: #333; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { + font-weight: bold; + background: #f2f2f2 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { + border-bottom: 2px solid #ddd; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { + border-top: 2px solid #ddd; +} + +.tabulator .tabulator-row { + position: relative; + box-sizing: border-box; + min-height: 22px; + border-bottom: 1px solid rgba(34, 36, 38, 0.1); +} + +.tabulator .tabulator-row.tabulator-selectable:hover { + box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.87) inset; + background: #E0E0E0 !important; + color: rgba(0, 0, 0, 0.87) !important; + cursor: pointer; +} + +.tabulator .tabulator-row.tabulator-selected { + background-color: #9ABCEA; +} + +.tabulator .tabulator-row.tabulator-selected:hover { + background-color: #769BCC; + cursor: pointer; +} + +.tabulator .tabulator-row.tabulator-moving { + position: absolute; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + pointer-events: none !important; + z-index: 15; +} + +.tabulator .tabulator-row .tabulator-frozen { + display: inline-block; + position: absolute; + background-color: inherit; + z-index: 10; +} + +.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #ddd; +} + +.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #ddd; +} + +.tabulator .tabulator-row .tabulator-cell { + display: inline-block; + position: relative; + box-sizing: border-box; + padding: 0.78571em 0.78571em; + vertical-align: middle; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.tabulator .tabulator-row .tabulator-cell:last-of-type { + border-right: none; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-editing { + border: 1px solid #1D68CD; + padding: 0; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-editing input, .tabulator .tabulator-row .tabulator-cell.tabulator-editing select { + border: 1px; + background: transparent; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail { + border: 1px solid #dd0000; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail select { + border: 1px; + background: transparent; + color: #dd0000; +} + +.tabulator .tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { + width: 80%; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { + width: 100%; + height: 3px; + margin: 2px 10% 0 10%; + background: #666; +} + +.tabulator .tabulator-row.tabulator-group { + box-sizing: border-box; + border-bottom: 1px solid #999; + border-right: 1px solid #ddd; + border-top: 1px solid #999; + padding: 5px; + padding-left: 10px; + background: #fafafa; + font-weight: bold; + min-width: 100%; +} + +.tabulator .tabulator-row.tabulator-group:hover { + cursor: pointer; + background-color: rgba(0, 0, 0, 0.1); +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #666; + border-bottom: 0; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow { + margin-left: 20px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow { + margin-left: 40px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow { + margin-left: 60px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow { + margin-left: 80px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow { + margin-left: 1000px; +} + +.tabulator .tabulator-row.tabulator-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #666; + vertical-align: middle; +} + +.tabulator .tabulator-row.tabulator-group span { + margin-left: 10px; + color: #666; +} + +.tabulator .tabulator-col-resize-handle { + position: absolute; + right: 0; + top: 0; + bottom: 0; + width: 5px; +} + +.tabulator .tabulator-col-resize-handle.prev { + left: 0; + right: auto; +} + +.tabulator .tabulator-col-resize-handle:hover { + cursor: ew-resize; +} + +.tabulator .tabulator-footer { + padding: 0.78571em 0.78571em; + border-top: 1px solid rgba(34, 36, 38, 0.15); + box-shadow: none; + background: #F9FAFB; + text-align: right; + color: rgba(0, 0, 0, 0.87); + font-style: normal; + font-weight: normal; + text-transform: none; + white-space: nowrap; + -ms-user-select: none; + user-select: none; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder { + box-sizing: border-box; + width: calc("100% + 20px"); + margin: -0.78571em -0.78571em 0.78571em -0.78571em; + text-align: left; + background: white !important; + border-bottom: 1px solid #ddd; + border-top: 1px solid #ddd; + overflow: hidden; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { + font-weight: bold; + background: white !important; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { + margin-bottom: -0.78571em; + border-bottom: none; +} + +.tabulator .tabulator-footer .tabulator-pages { + margin: 0 7px; +} + +.tabulator .tabulator-footer .tabulator-page { + display: inline-block; + margin: 0 2px; + border: 1px solid #aaa; + border-radius: 3px; + padding: 2px 5px; + background: rgba(255, 255, 255, 0.2); + color: #555; + font-family: inherit; + font-weight: inherit; + font-size: inherit; +} + +.tabulator .tabulator-footer .tabulator-page.active { + color: #d00; +} + +.tabulator .tabulator-footer .tabulator-page:disabled { + opacity: .5; +} + +.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); + color: #fff; +} + +.tabulator .tablulator-loader { + position: absolute; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + top: 0; + left: 0; + z-index: 100; + height: 100%; + width: 100%; + background: rgba(0, 0, 0, 0.4); + text-align: center; +} + +.tabulator .tablulator-loader .tabulator-loader-msg { + display: inline-block; + margin: 0 auto; + padding: 10px 20px; + border-radius: 10px; + background: #fff; + font-weight: bold; + font-size: 16px; +} + +.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-loading { + border: 4px solid #333; + color: #000; +} + +.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-error { + border: 4px solid #D00; + color: #590000; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.positive, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.positive { + box-shadow: 0px 0px 0px #A3C293 inset; + background: #FCFFF5 !important; + color: #2C662D !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.positive:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.positive:hover { + background: #f7ffe6 !important; + color: #275b28 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.negative, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.negative { + box-shadow: 0px 0px 0px #E0B4B4 inset; + background: #FFF6F6 !important; + color: #9F3A38 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.negative:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.negative:hover { + background: #ffe7e7 !important; + color: #943634 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.error, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.error { + box-shadow: 0px 0px 0px #E0B4B4 inset; + background: #FFF6F6 !important; + color: #dd0000 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.error:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.error:hover { + background: #ffe7e7 !important; + color: #943634 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.warning { + box-shadow: 0px 0px 0px #C9BA9B inset; + background: #FFFAF3 !important; + color: #573A08 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.warning:hover { + background: #fff4e4 !important; + color: #493107 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active { + box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.87) inset; + background: #E0E0E0 !important; + color: rgba(0, 0, 0, 0.87) !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active:hover { + background: #f7ffe6 !important; + color: #275b28 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.disabled:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active { + pointer-events: none; + color: rgba(40, 40, 40, 0.3); +} + +.tabulator.inverted { + background: #333333; + color: rgba(255, 255, 255, 0.9); + border: none; +} + +.tabulator.inverted .tabulator-header { + background-color: rgba(0, 0, 0, 0.15); + border-color: rgba(255, 255, 255, 0.1) !important; + color: rgba(255, 255, 255, 0.9); +} + +.tabulator.inverted .tabulator-header .tabulator-col { + border-color: rgba(255, 255, 255, 0.1) !important; +} + +.tabulator.inverted .tabulator-tableHolder .tabulator-table .tabulator-row { + color: rgba(255, 255, 255, 0.9); + border: none; +} + +.tabulator.inverted .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { + border-color: rgba(255, 255, 255, 0.1) !important; +} + +.tabulator.inverted .tabulator-footer { + background: #FFFFFF; +} + +.tabulator.striped .tabulator-tableHolder .tabulator-table .tabulator-row:nth-child(even) { + background-color: rgba(0, 0, 0, 0.05) !important; +} + +.tabulator.celled { + border: 1px solid rgba(34, 36, 38, 0.15); +} + +.tabulator.celled .tabulator-header .tabulator-col { + border-right: 1px solid rgba(34, 36, 38, 0.1); +} + +.tabulator.celled .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { + border-right: 1px solid rgba(34, 36, 38, 0.1); +} + +.tabulator[class*="single line"] .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { + border-right: none; +} + +.tabulator.red { + border-top: 0.2em solid #DB2828; +} + +.tabulator.inverted.red { + background-color: #DB2828 !important; + color: #FFFFFF !important; +} + +.tabulator.orange { + border-top: 0.2em solid #F2711C; +} + +.tabulator.inverted.orange { + background-color: #F2711C !important; + color: #FFFFFF !important; +} + +.tabulator.yellow { + border-top: 0.2em solid #FBBD08; +} + +.tabulator.inverted.yellow { + background-color: #FBBD08 !important; + color: #FFFFFF !important; +} + +.tabulator.olive { + border-top: 0.2em solid #B5CC18; +} + +.tabulator.inverted.olive { + background-color: #B5CC18 !important; + color: #FFFFFF !important; +} + +.tabulator.green { + border-top: 0.2em solid #21BA45; +} + +.tabulator.inverted.green { + background-color: #21BA45 !important; + color: #FFFFFF !important; +} + +.tabulator.teal { + border-top: 0.2em solid #00B5AD; +} + +.tabulator.inverted.teal { + background-color: #00B5AD !important; + color: #FFFFFF !important; +} + +.tabulator.blue { + border-top: 0.2em solid #2185D0; +} + +.tabulator.inverted.blue { + background-color: #2185D0 !important; + color: #FFFFFF !important; +} + +.tabulator.violet { + border-top: 0.2em solid #6435C9; +} + +.tabulator.inverted.violet { + background-color: #6435C9 !important; + color: #FFFFFF !important; +} + +.tabulator.purple { + border-top: 0.2em solid #A333C8; +} + +.tabulator.inverted.purple { + background-color: #A333C8 !important; + color: #FFFFFF !important; +} + +.tabulator.pink { + border-top: 0.2em solid #E03997; +} + +.tabulator.inverted.pink { + background-color: #E03997 !important; + color: #FFFFFF !important; +} + +.tabulator.brown { + border-top: 0.2em solid #A5673F; +} + +.tabulator.inverted.brown { + background-color: #A5673F !important; + color: #FFFFFF !important; +} + +.tabulator.grey { + border-top: 0.2em solid #767676; +} + +.tabulator.inverted.grey { + background-color: #767676 !important; + color: #FFFFFF !important; +} + +.tabulator.black { + border-top: 0.2em solid #1B1C1D; +} + +.tabulator.inverted.black { + background-color: #1B1C1D !important; + color: #FFFFFF !important; +} + +.tabulator.padded .tabulator-header .tabulator-col .tabulator-col-content { + padding: 1em 1em; +} + +.tabulator.padded .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + top: 20px; +} + +.tabulator.padded .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { + padding: 1em 1em; +} + +.tabulator.padded.very .tabulator-header .tabulator-col .tabulator-col-content { + padding: 1.5em 1.5em; +} + +.tabulator.padded.very .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + top: 26px; +} + +.tabulator.padded.very .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { + padding: 1.5em 1.5em; +} + +.tabulator.compact .tabulator-header .tabulator-col .tabulator-col-content { + padding: 0.5em 0.7em; +} + +.tabulator.compact .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + top: 12px; +} + +.tabulator.compact .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { + padding: 0.5em 0.7em; +} + +.tabulator.compact.very .tabulator-header .tabulator-col .tabulator-col-content { + padding: 0.4em 0.6em; +} + +.tabulator.compact.very .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + top: 10px; +} + +.tabulator.compact.very .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { + padding: 0.4em 0.6em; +} diff --git a/css/tabulator/semantic-ui/tabulator_semantic-ui.min.css b/css/tabulator/semantic-ui/tabulator_semantic-ui.min.css new file mode 100644 index 0000000..2fbf559 --- /dev/null +++ b/css/tabulator/semantic-ui/tabulator_semantic-ui.min.css @@ -0,0 +1,3 @@ +/* Tabulator v3.3.1 (c) Oliver Folkerd */ +.tabulator{position:relative;background-color:#fff;overflow:hidden;font-size:14px;text-align:left;width:100%;margin:1em 0;border:1px solid rgba(34,36,38,.15);box-shadow:none;border-radius:.28571/pxrem;color:rgba(0,0,0,.87);transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator.tabulator-block-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{width:100%;border-bottom:1px solid rgba(34,36,38,.1);box-shadow:none;color:rgba(0,0,0,.87);font-style:none;font-weight:700;text-transform:none;white-space:nowrap;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header,.tabulator .tabulator-header .tabulator-col{position:relative;box-sizing:border-box;background-color:#f9fafb;overflow:hidden}.tabulator .tabulator-header .tabulator-col{display:inline-block;text-align:left;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #999;background:#dae1e7;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{position:relative;padding:.92857em .78571em}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:18px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #ddd;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#dae1e7!important;border:1px solid #ddd}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#dae1e7}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #666;border-bottom:none}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:1}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #ddd}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #ddd}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:200%;background:#fff!important;border-top:1px solid #ddd;border-bottom:1px solid #ddd;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#fff!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{position:absolute;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;height:100%;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#000;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#f2f2f2!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #ddd}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #ddd}.tabulator .tabulator-row{position:relative;box-sizing:border-box;min-height:22px;border-bottom:1px solid rgba(34,36,38,.1)}.tabulator .tabulator-row.tabulator-selectable:hover{box-shadow:inset 0 0 0 rgba(0,0,0,.87);background:#e0e0e0!important;color:rgba(0,0,0,.87)!important;cursor:pointer}.tabulator .tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator .tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator .tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #ddd;border-bottom:1px solid #ddd;pointer-events:none!important;z-index:2}.tabulator .tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:1}.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #ddd}.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #ddd}.tabulator .tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:.78571em;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator .tabulator-row .tabulator-cell:last-of-type{border-right:none}.tabulator .tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;padding:0}.tabulator .tabulator-row .tabulator-cell.tabulator-editing input,.tabulator .tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator .tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin:2px 10% 0;background:#666}.tabulator .tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #ddd;border-top:1px solid #999;padding:5px;padding-left:10px;background:#fafafa;font-weight:700;min-width:100%}.tabulator .tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator .tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow{margin-left:20px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow{margin-left:40px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow{margin-left:60px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow{margin-left:80px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow{margin-left:1000px}.tabulator .tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator .tabulator-row.tabulator-group span{margin-left:10px;color:#666}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-footer{padding:.78571em;border-top:1px solid rgba(34,36,38,.15);box-shadow:none;background:#f9fafb;text-align:right;color:rgba(0,0,0,.87);font-style:normal;font-weight:400;text-transform:none;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc("100% + 20px");margin:-.78571em -.78571em .78571em;text-align:left;background:#fff!important;border-bottom:1px solid #ddd;border-top:1px solid #ddd;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{font-weight:700;background:#fff!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-.78571em;border-bottom:none}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;border:1px solid #aaa;border-radius:3px;padding:2px 5px;background:hsla(0,0%,100%,.2);color:#555;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page.active{color:#d00}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tablulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:3;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tablulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.positive,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.positive{box-shadow:inset 0 0 0 #a3c293;background:#fcfff5!important;color:#2c662d!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.positive:hover,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.positive:hover{background:#f7ffe6!important;color:#275b28!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.negative,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.negative{box-shadow:inset 0 0 0 #e0b4b4;background:#fff6f6!important;color:#9f3a38!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.negative:hover,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.negative:hover{background:#ffe7e7!important;color:#943634!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.error,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.error{box-shadow:inset 0 0 0 #e0b4b4;background:#fff6f6!important;color:#d00!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.error:hover,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.error:hover{background:#ffe7e7!important;color:#943634!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.warning,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning{box-shadow:inset 0 0 0 #c9ba9b;background:#fffaf3!important;color:#573a08!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.warning:hover,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning:hover{background:#fff4e4!important;color:#493107!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active{box-shadow:inset 0 0 0 rgba(0,0,0,.87);background:#e0e0e0!important;color:rgba(0,0,0,.87)!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active:hover,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active:hover{background:#f7ffe6!important;color:#275b28!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.disabled:hover,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active{pointer-events:none;color:rgba(40,40,40,.3)}.tabulator.inverted{background:#333;color:hsla(0,0%,100%,.9);border:none}.tabulator.inverted .tabulator-header{background-color:rgba(0,0,0,.15);color:hsla(0,0%,100%,.9)}.tabulator.inverted .tabulator-header,.tabulator.inverted .tabulator-header .tabulator-col{border-color:hsla(0,0%,100%,.1)!important}.tabulator.inverted .tabulator-tableHolder .tabulator-table .tabulator-row{color:hsla(0,0%,100%,.9);border:none}.tabulator.inverted .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{border-color:hsla(0,0%,100%,.1)!important}.tabulator.inverted .tabulator-footer{background:#fff}.tabulator.striped .tabulator-tableHolder .tabulator-table .tabulator-row:nth-child(2n){background-color:rgba(0,0,0,.05)!important}.tabulator.celled{border:1px solid rgba(34,36,38,.15)}.tabulator.celled .tabulator-header .tabulator-col,.tabulator.celled .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{border-right:1px solid rgba(34,36,38,.1)}.tabulator[class*="single line"] .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{border-right:none}.tabulator.red{border-top:.2em solid #db2828}.tabulator.inverted.red{background-color:#db2828!important;color:#fff!important}.tabulator.orange{border-top:.2em solid #f2711c}.tabulator.inverted.orange{background-color:#f2711c!important;color:#fff!important}.tabulator.yellow{border-top:.2em solid #fbbd08}.tabulator.inverted.yellow{background-color:#fbbd08!important;color:#fff!important}.tabulator.olive{border-top:.2em solid #b5cc18}.tabulator.inverted.olive{background-color:#b5cc18!important;color:#fff!important}.tabulator.green{border-top:.2em solid #21ba45}.tabulator.inverted.green{background-color:#21ba45!important;color:#fff!important}.tabulator.teal{border-top:.2em solid #00b5ad}.tabulator.inverted.teal{background-color:#00b5ad!important;color:#fff!important}.tabulator.blue{border-top:.2em solid #2185d0}.tabulator.inverted.blue{background-color:#2185d0!important;color:#fff!important}.tabulator.violet{border-top:.2em solid #6435c9}.tabulator.inverted.violet{background-color:#6435c9!important;color:#fff!important}.tabulator.purple{border-top:.2em solid #a333c8}.tabulator.inverted.purple{background-color:#a333c8!important;color:#fff!important}.tabulator.pink{border-top:.2em solid #e03997}.tabulator.inverted.pink{background-color:#e03997!important;color:#fff!important}.tabulator.brown{border-top:.2em solid #a5673f}.tabulator.inverted.brown{background-color:#a5673f!important;color:#fff!important}.tabulator.grey{border-top:.2em solid #767676}.tabulator.inverted.grey{background-color:#767676!important;color:#fff!important}.tabulator.black{border-top:.2em solid #1b1c1d}.tabulator.inverted.black{background-color:#1b1c1d!important;color:#fff!important}.tabulator.padded .tabulator-header .tabulator-col .tabulator-col-content{padding:1em}.tabulator.padded .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{top:20px}.tabulator.padded .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{padding:1em}.tabulator.padded.very .tabulator-header .tabulator-col .tabulator-col-content{padding:1.5em}.tabulator.padded.very .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{top:26px}.tabulator.padded.very .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{padding:1.5em}.tabulator.compact .tabulator-header .tabulator-col .tabulator-col-content{padding:.5em .7em}.tabulator.compact .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{top:12px}.tabulator.compact .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{padding:.5em .7em}.tabulator.compact.very .tabulator-header .tabulator-col .tabulator-col-content{padding:.4em .6em}.tabulator.compact.very .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{top:10px}.tabulator.compact.very .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{padding:.4em .6em} +/*# sourceMappingURL=tabulator_semantic-ui.min.css.map */ diff --git a/css/tabulator/semantic-ui/tabulator_semantic-ui.min.css.map b/css/tabulator/semantic-ui/tabulator_semantic-ui.min.css.map new file mode 100644 index 0000000..5a49010 --- /dev/null +++ b/css/tabulator/semantic-ui/tabulator_semantic-ui.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["tabulator_semantic-ui.min.css"],"names":[],"mappings":"AAiOA,WACE,kBAAmB,AACnB,sBAA0B,AAC1B,gBAAiB,AACjB,eAAgB,AAChB,gBAAiB,AACjB,WAAY,AACZ,aAAgB,AAChB,oCAAyC,AACzC,gBAAiB,AACjB,2BAA6B,AAC7B,sBAA2B,AAE3B,uBAAyB,CAc1B,AAED,iFACE,cAAgB,CACjB,AAED,kCACE,yBAA0B,AACvB,sBAAuB,AACtB,qBAAsB,AAClB,gBAAkB,CAC3B,AAED,6BAGE,WAAY,AACZ,0CAA+C,AAE/C,gBAAiB,AACjB,sBAA2B,AAC3B,gBAAiB,AACjB,gBAAkB,AAClB,oBAAqB,AACrB,mBAAoB,AAEpB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,yEAlBE,kBAAmB,AACnB,sBAAuB,AAGvB,yBAA0B,AAO1B,eAAiB,CAOnB,AAQC,4CAPC,qBAAsB,AAItB,gBAAiB,AACjB,qBAAuB,CAExB,AAED,6DACE,kBAAmB,AACnB,sBAAuB,AACvB,mBAAoB,AACpB,mBAAqB,CACtB,AAED,mEACE,kBAAmB,AACnB,yBAA6B,CAC9B,AAED,wFACE,sBAAuB,AACvB,WAAY,AACZ,mBAAoB,AACpB,gBAAiB,AACjB,uBAAwB,AACxB,qBAAuB,CACxB,AAED,gHACE,sBAAuB,AACvB,WAAY,AACZ,sBAAuB,AACvB,YAAa,AACb,eAAiB,CAClB,AAED,oFACE,qBAAsB,AACtB,kBAAmB,AACnB,SAAU,AACV,UAAW,AACX,QAAS,AACT,SAAU,AACV,kCAAmC,AACnC,mCAAoC,AACpC,4BAA8B,CAC/B,AAED,0FACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,0BAA2B,AAC3B,eAAiB,CAClB,AAED,oHACE,iBAAmB,CACpB,AAED,0FACE,YAAc,CACf,AAED,+DACE,kBAAmB,AACnB,mCAAqC,AACrC,qBAAuB,CACxB,AAED,qEACE,kBAAmB,AACnB,sBAAuB,AACvB,eAAgB,AAChB,WAAY,AACZ,iBAAmB,CACpB,AAED,8EACE,qBAAwB,CACzB,AAED,yEACE,cAAgB,CACjB,AAED,oFACE,kBAAoB,CACrB,AAED,qEACE,eAAgB,AAChB,wBAA0B,CAC3B,AAED,uHACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,sHACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,uHACE,0BAA2B,AAC3B,kBAAoB,CACrB,AAED,+CACE,qBAAsB,AACtB,kBAAmB,AACnB,SAAY,CACb,AAED,qEACE,2BAA6B,CAC9B,AAED,sEACE,0BAA4B,CAC7B,AAED,qDACE,sBAAuB,AACvB,eAAgB,AAChB,0BAA6B,AAC7B,0BAA2B,AAC3B,6BAA8B,AAC9B,eAAiB,CAClB,AAED,oEACE,yBAA6B,CAC9B,AAED,iGACE,YAAc,CACf,AAED,kCACE,kBAAmB,AACnB,WAAY,AACZ,mBAAoB,AACpB,cAAe,AACf,gCAAkC,CACnC,AAED,wCACE,YAAc,CACf,AAED,yDACE,kBAAmB,AACnB,sBAAuB,AACvB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,MAAO,AACP,OAAQ,AACR,YAAa,AACb,UAAY,CACb,AAED,8DACE,qBAAsB,AACtB,cAAe,AACf,aAAc,AACd,WAAY,AACZ,gBAAkB,AAClB,cAAgB,CACjB,AAED,mDACE,kBAAmB,AACnB,qBAAsB,AACtB,mBAAoB,AACpB,iBAAkB,AAClB,UAAY,CACb,AAED,kFACE,gBAAkB,AAClB,4BAA+B,CAChC,AAED,sGACE,4BAA8B,CAC/B,AAED,yGACE,yBAA2B,CAC5B,AAED,0BACE,kBAAmB,AACnB,sBAAuB,AACvB,gBAAiB,AACjB,yCAA+C,CAChD,AAED,qDACE,uCAAkD,AAClD,6BAA+B,AAC/B,gCAAsC,AACtC,cAAgB,CACjB,AAED,6CACE,wBAA0B,CAC3B,AAED,mDACE,yBAA0B,AAC1B,cAAgB,CACjB,AAED,2CACE,kBAAmB,AACnB,0BAA2B,AAC3B,6BAA8B,AAC9B,8BAAgC,AAChC,SAAY,CACb,AAED,4CACE,qBAAsB,AACtB,kBAAmB,AACnB,yBAA0B,AAC1B,SAAY,CACb,AAED,kEACE,2BAA6B,CAC9B,AAED,mEACE,0BAA4B,CAC7B,AAED,0CACE,qBAAsB,AACtB,kBAAmB,AACnB,sBAAuB,AACvB,iBAA6B,AAC7B,sBAAuB,AACvB,mBAAoB,AACpB,gBAAiB,AACjB,sBAAwB,CACzB,AAED,uDACE,iBAAmB,CACpB,AAED,4DACE,yBAA0B,AAC1B,SAAW,CACZ,AAED,qIACE,WAAY,AACZ,sBAAwB,CACzB,AAED,oEACE,qBAA0B,CAC3B,AAED,qJACE,WAAY,AACZ,uBAAwB,AACxB,UAAe,CAChB,AAED,wFACE,YAAc,CACf,AAED,+DACE,2BAA4B,AAC5B,oBAAqB,AACrB,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,yFACE,SAAW,CACZ,AAED,mHACE,WAAY,AACZ,WAAY,AACZ,iBAAsB,AACtB,eAAiB,CAClB,AAED,0CACE,sBAAuB,AACvB,6BAA8B,AAC9B,4BAA6B,AAC7B,0BAA2B,AAC3B,YAAa,AACb,kBAAmB,AACnB,mBAAoB,AACpB,gBAAkB,AAClB,cAAgB,CACjB,AAED,gDACE,eAAgB,AAChB,+BAAqC,CACtC,AAED,mFACE,kBAAmB,AACnB,kCAAmC,AACnC,mCAAoC,AACpC,0BAA2B,AAC3B,eAAiB,CAClB,AAED,mFACE,gBAAkB,CACnB,AAED,mFACE,gBAAkB,CACnB,AAED,mFACE,gBAAkB,CACnB,AAED,mFACE,gBAAkB,CACnB,AAED,mFACE,kBAAoB,CACrB,AAED,2DACE,qBAAsB,AACtB,QAAS,AACT,SAAU,AACV,kBAAmB,AACnB,iCAAkC,AAClC,oCAAqC,AACrC,eAAgB,AAChB,2BAA4B,AAC5B,qBAAuB,CACxB,AAED,+CACE,iBAAkB,AAClB,UAAY,CACb,AAED,wCACE,kBAAmB,AACnB,QAAS,AACT,MAAO,AACP,SAAU,AACV,SAAW,CACZ,AAED,6CACE,OAAQ,AACR,UAAY,CACb,AAED,8CACE,gBAAkB,CACnB,AAED,6BACE,iBAA6B,AAC7B,wCAA6C,AAC7C,gBAAiB,AACjB,mBAAoB,AACpB,iBAAkB,AAClB,sBAA2B,AAC3B,kBAAmB,AACnB,gBAAoB,AACpB,oBAAqB,AACrB,mBAAoB,AACpB,qBAAsB,AAClB,iBAAkB,AACtB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,qDACE,sBAAuB,AACvB,0BAA2B,AAC3B,oCAAmD,AACnD,gBAAiB,AACjB,0BAA6B,AAC7B,6BAA8B,AAC9B,0BAA2B,AAC3B,eAAiB,CAClB,AAED,oEACE,gBAAkB,AAClB,yBAA6B,CAC9B,AAED,iGACE,YAAc,CACf,AAED,gEACE,wBAA0B,AAC1B,kBAAoB,CACrB,AAED,8CACE,YAAc,CACf,AAED,6CACE,qBAAsB,AACtB,aAAc,AACd,sBAAuB,AACvB,kBAAmB,AACnB,gBAAiB,AACjB,8BAAqC,AACrC,WAAY,AACZ,oBAAqB,AACrB,oBAAqB,AACrB,iBAAmB,CACpB,AAED,oDACE,UAAY,CACb,AAED,sDACE,UAAY,CACb,AAED,kEACE,eAAgB,AAChB,0BAA+B,AAC/B,UAAY,CACb,AAED,8BACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,MAAO,AACP,OAAQ,AACR,UAAa,AACb,YAAa,AACb,WAAY,AACZ,0BAA+B,AAC/B,iBAAmB,CACpB,AAED,oDACE,qBAAsB,AACtB,cAAe,AACf,kBAAmB,AACnB,mBAAoB,AACpB,gBAAiB,AACjB,gBAAkB,AAClB,cAAgB,CACjB,AAED,sEACE,sBAAuB,AACvB,UAAY,CACb,AAED,oEACE,sBAAuB,AACvB,aAAe,CAChB,AAED,sKACE,+BAAsC,AACtC,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,kLACE,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,sKACE,+BAAsC,AACtC,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,kLACE,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,gKACE,+BAAsC,AACtC,6BAA+B,AAC/B,oBAA0B,CAC3B,AAED,4KACE,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,oKACE,+BAAsC,AACtC,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,gLACE,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,kKACE,uCAAkD,AAClD,6BAA+B,AAC/B,+BAAsC,CACvC,AAED,8KACE,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,mPACE,oBAAqB,AACrB,uBAA6B,CAC9B,AAED,oBACE,gBAAoB,AACpB,yBAAgC,AAChC,WAAa,CACd,AAED,sCACE,iCAAsC,AAEtC,wBAAgC,CACjC,AAED,2FAJE,yCAAkD,CAMnD,AAED,2EACE,yBAAgC,AAChC,WAAa,CACd,AAED,2FACE,yCAAkD,CACnD,AAED,sCACE,eAAoB,CACrB,AAED,wFACE,0CAAiD,CAClD,AAED,kBACE,mCAAyC,CAC1C,AAMD,4IACE,wCAA8C,CAC/C,AAED,wGACE,iBAAmB,CACpB,AAED,eACE,6BAAgC,CACjC,AAED,wBACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,kBACE,6BAAgC,CACjC,AAED,2BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,kBACE,6BAAgC,CACjC,AAED,2BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,iBACE,6BAAgC,CACjC,AAED,0BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,iBACE,6BAAgC,CACjC,AAED,0BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,gBACE,6BAAgC,CACjC,AAED,yBACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,gBACE,6BAAgC,CACjC,AAED,yBACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,kBACE,6BAAgC,CACjC,AAED,2BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,kBACE,6BAAgC,CACjC,AAED,2BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,gBACE,6BAAgC,CACjC,AAED,yBACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,iBACE,6BAAgC,CACjC,AAED,0BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,gBACE,6BAAgC,CACjC,AAED,yBACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,iBACE,6BAAgC,CACjC,AAED,0BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,0EACE,WAAiB,CAClB,AAED,2FACE,QAAU,CACX,AAED,yFACE,WAAiB,CAClB,AAED,+EACE,aAAqB,CACtB,AAED,gGACE,QAAU,CACX,AAED,8FACE,aAAqB,CACtB,AAED,2EACE,iBAAqB,CACtB,AAED,4FACE,QAAU,CACX,AAED,0FACE,iBAAqB,CACtB,AAED,gFACE,iBAAqB,CACtB,AAED,iGACE,QAAU,CACX,AAED,+FACE,iBAAqB,CACtB","file":"tabulator_semantic-ui.min.css","sourcesContent":["/* Tabulator v3.3.1 (c) Oliver Folkerd */\n/*******************************\r\n Site Settings\r\n*******************************/\n/*-------------------\r\n Fonts\r\n--------------------*/\n/*-------------------\r\n Base Sizes\r\n--------------------*/\n/* This is the single variable that controls them all */\n/* The size of page text */\n/*-------------------\r\n Exact Pixel Values\r\n--------------------*/\n/*\r\n These are used to specify exact pixel values in em\r\n for things like borders that remain constantly\r\n sized as emSize adjusts\r\n\r\n Since there are many more sizes than names for sizes,\r\n these are named by their original pixel values.\r\n\r\n*/\n/*-------------------\r\n Border Radius\r\n--------------------*/\n/* See Power-user section below\r\n for explanation of $px variables\r\n*/\n/*-------------------\r\n Site Colors\r\n--------------------*/\n/*--- Colors ---*/\n/*--- Light Colors ---*/\n/*--- Neutrals ---*/\n/*--- Colored Backgrounds ---*/\n/*--- Colored Text ---*/\n/*--- Colored Headers ---*/\n/*--- Colored Border ---*/\n/*-------------------\r\n Alpha Colors\r\n--------------------*/\n/*-------------------\r\n Brand Colors\r\n--------------------*/\n/*--------------\r\n Page Heading\r\n---------------*/\n/*-------------------\r\n Page\r\n--------------------*/\n/*--------------\r\n Form Input\r\n---------------*/\n/* This adjusts the default form input across all elements */\n/* Input Text Color */\n/* Line Height Default For Inputs in Browser (Descendors are 17px at 14px base em) */\n/*-------------------\r\n Focused Input\r\n--------------------*/\n/* Used on inputs, textarea etc */\n/* Used on dropdowns, other larger blocks */\n/*-------------------\r\n Sizes\r\n--------------------*/\n/*\r\n Sizes are all expressed in terms of 14px/em (default em)\r\n This ensures these \"ratios\" remain constant despite changes in EM\r\n*/\n/*-------------------\r\n Paragraph\r\n--------------------*/\n/*-------------------\r\n Links\r\n--------------------*/\n/*-------------------\r\n Highlighted Text\r\n--------------------*/\n/*-------------------\r\n Em Sizes\r\n--------------------*/\n/*\r\n This rounds $size values to the closest pixel then expresses that value in (r)em.\r\n This ensures all size values round to exact pixels\r\n*/\n/* em */\n/* rem */\n/*-------------------\r\n Loader\r\n--------------------*/\n/*-------------------\r\n Grid\r\n--------------------*/\n/*-------------------\r\n Transitions\r\n--------------------*/\n/*-------------------\r\n Breakpoints\r\n--------------------*/\n/* Columns */\n/*******************************\r\n Power-User\r\n*******************************/\n/*-------------------\r\n Emotive Colors\r\n--------------------*/\n/* Positive */\n/* Negative */\n/* Info */\n/* Warning */\n/*-------------------\r\n Paths\r\n--------------------*/\n/* For source only. Modified in gulp for dist */\n/*-------------------\r\n Icons\r\n--------------------*/\n/* Maximum Glyph Width of Icon */\n/*-------------------\r\n Neutral Text\r\n--------------------*/\n/*-------------------\r\n Brand Colors\r\n--------------------*/\n/*-------------------\r\n Borders\r\n--------------------*/\n/*-------------------\r\n Accents\r\n--------------------*/\n/* Differentiating Neutrals */\n/* Differentiating Layers */\n/*-------------------\r\n Derived Values\r\n--------------------*/\n/* Loaders Position Offset */\n/* Rendered Scrollbar Width */\n/* Maximum Single Character Glyph Width, aka Capital \"W\" */\n/* Used to match floats with text */\n/* Header Spacing */\n/* Minimum Mobile Width */\n/* Positive / Negative Dupes */\n/* Responsive */\n/*******************************\r\n States\r\n*******************************/\n/*-------------------\r\n Disabled\r\n--------------------*/\n/*-------------------\r\n Hover\r\n--------------------*/\n/*--- Shadows ---*/\n/*--- Colors ---*/\n/*--- Emotive ---*/\n/*--- Brand ---*/\n/*--- Dark Tones ---*/\n/*--- Light Tones ---*/\n/*-------------------\r\n Focus\r\n--------------------*/\n/*--- Colors ---*/\n/*--- Emotive ---*/\n/*--- Brand ---*/\n/*--- Dark Tones ---*/\n/*--- Light Tones ---*/\n/*-------------------\r\n Down (:active)\r\n--------------------*/\n/*--- Colors ---*/\n/*--- Emotive ---*/\n/*--- Brand ---*/\n/*--- Dark Tones ---*/\n/*--- Light Tones ---*/\n/*-------------------\r\n Active\r\n--------------------*/\n/*--- Colors ---*/\n/*--- Emotive ---*/\n/*--- Brand ---*/\n/*--- Dark Tones ---*/\n/*--- Light Tones ---*/\n/*******************************\r\n Table\r\n*******************************/\n/*-------------------\r\n Element\r\n--------------------*/\n/*--------------\r\n Parts\r\n---------------*/\n/* Table Row */\n/* Table Cell */\n/* Table Header */\n/* Table Footer */\n/* Responsive Size */\n/*-------------------\r\n Types\r\n--------------------*/\n/* Definition */\n/*--------------\r\n Couplings\r\n---------------*/\n/*--------------\r\n States\r\n---------------*/\n/* Positive */\n/* Negative */\n/* Error */\n/* Warning */\n/* Active */\n/*--------------\r\n Types\r\n---------------*/\n/* Attached */\n/* Striped */\n/* Selectable */\n/* Sortable */\n/* Colors */\n/* Inverted */\n/* Basic */\n/* Padded */\n/* Compact */\n/* Sizes */\n.tabulator {\n position: relative;\n background-color: #FFFFFF;\n overflow: hidden;\n font-size: 14px;\n text-align: left;\n width: 100%;\n margin: 1em 0em;\n border: 1px solid rgba(34, 36, 38, 0.15);\n box-shadow: none;\n border-radius: 0.28571/pxrem;\n color: rgba(0, 0, 0, 0.87);\n -ms-transform: translatez(0);\n transform: translatez(0);\n /* Red */\n /* Orange */\n /* Yellow */\n /* Olive */\n /* Green */\n /* Teal */\n /* Blue */\n /* Violet */\n /* Purple */\n /* Pink */\n /* Brown */\n /* Grey */\n /* Black */\n}\n\n.tabulator[tabulator-layout=\"fitDataFill\"] .tabulator-tableHolder .tabulator-table {\n min-width: 100%;\n}\n\n.tabulator.tabulator-block-select {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.tabulator .tabulator-header {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n border-bottom: 1px solid rgba(34, 36, 38, 0.1);\n background-color: #F9FAFB;\n box-shadow: none;\n color: rgba(0, 0, 0, 0.87);\n font-style: none;\n font-weight: bold;\n text-transform: none;\n white-space: nowrap;\n overflow: hidden;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-header .tabulator-col {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n background-color: #F9FAFB;\n text-align: left;\n vertical-align: bottom;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-moving {\n position: absolute;\n border: 1px solid #999;\n background: #dae1e7;\n pointer-events: none;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content {\n position: relative;\n padding: 0.92857em 0.78571em;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title {\n box-sizing: border-box;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: bottom;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor {\n box-sizing: border-box;\n width: 100%;\n border: 1px solid #999;\n padding: 1px;\n background: #fff;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n display: inline-block;\n position: absolute;\n top: 18px;\n right: 8px;\n width: 0;\n height: 0;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols {\n position: relative;\n display: -ms-flexbox;\n display: flex;\n border-top: 1px solid #ddd;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child {\n margin-right: -1px;\n}\n\n.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-col.ui-sortable-helper {\n position: absolute;\n background-color: #dae1e7 !important;\n border: 1px solid #ddd;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter {\n position: relative;\n box-sizing: border-box;\n margin-top: 2px;\n width: 100%;\n text-align: center;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea {\n height: auto !important;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg {\n margin-top: 3px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title {\n padding-right: 25px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover {\n cursor: pointer;\n background-color: #dae1e7;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"none\"] .tabulator-col-content .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"asc\"] .tabulator-col-content .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #666;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"desc\"] .tabulator-col-content .tabulator-arrow {\n border-top: 6px solid #666;\n border-bottom: none;\n}\n\n.tabulator .tabulator-header .tabulator-frozen {\n display: inline-block;\n position: absolute;\n z-index: 10;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #ddd;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #ddd;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder {\n box-sizing: border-box;\n min-width: 200%;\n background: white !important;\n border-top: 1px solid #ddd;\n border-bottom: 1px solid #ddd;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row {\n background: white !important;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-tableHolder {\n position: relative;\n width: 100%;\n white-space: nowrap;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.tabulator .tabulator-tableHolder:focus {\n outline: none;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder {\n position: absolute;\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder span {\n display: inline-block;\n margin: 0 auto;\n padding: 10px;\n color: #000;\n font-weight: bold;\n font-size: 20px;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table {\n position: relative;\n display: inline-block;\n white-space: nowrap;\n overflow: visible;\n color: #333;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs {\n font-weight: bold;\n background: #f2f2f2 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top {\n border-bottom: 2px solid #ddd;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom {\n border-top: 2px solid #ddd;\n}\n\n.tabulator .tabulator-row {\n position: relative;\n box-sizing: border-box;\n min-height: 22px;\n border-bottom: 1px solid rgba(34, 36, 38, 0.1);\n}\n\n.tabulator .tabulator-row.tabulator-selectable:hover {\n box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.87) inset;\n background: #E0E0E0 !important;\n color: rgba(0, 0, 0, 0.87) !important;\n cursor: pointer;\n}\n\n.tabulator .tabulator-row.tabulator-selected {\n background-color: #9ABCEA;\n}\n\n.tabulator .tabulator-row.tabulator-selected:hover {\n background-color: #769BCC;\n cursor: pointer;\n}\n\n.tabulator .tabulator-row.tabulator-moving {\n position: absolute;\n border-top: 1px solid #ddd;\n border-bottom: 1px solid #ddd;\n pointer-events: none !important;\n z-index: 15;\n}\n\n.tabulator .tabulator-row .tabulator-frozen {\n display: inline-block;\n position: absolute;\n background-color: inherit;\n z-index: 10;\n}\n\n.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #ddd;\n}\n\n.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #ddd;\n}\n\n.tabulator .tabulator-row .tabulator-cell {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n padding: 0.78571em 0.78571em;\n vertical-align: middle;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.tabulator .tabulator-row .tabulator-cell:last-of-type {\n border-right: none;\n}\n\n.tabulator .tabulator-row .tabulator-cell.tabulator-editing {\n border: 1px solid #1D68CD;\n padding: 0;\n}\n\n.tabulator .tabulator-row .tabulator-cell.tabulator-editing input, .tabulator .tabulator-row .tabulator-cell.tabulator-editing select {\n border: 1px;\n background: transparent;\n}\n\n.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail {\n border: 1px solid #dd0000;\n}\n\n.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail select {\n border: 1px;\n background: transparent;\n color: #dd0000;\n}\n\n.tabulator .tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box {\n width: 80%;\n}\n\n.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar {\n width: 100%;\n height: 3px;\n margin: 2px 10% 0 10%;\n background: #666;\n}\n\n.tabulator .tabulator-row.tabulator-group {\n box-sizing: border-box;\n border-bottom: 1px solid #999;\n border-right: 1px solid #ddd;\n border-top: 1px solid #999;\n padding: 5px;\n padding-left: 10px;\n background: #fafafa;\n font-weight: bold;\n min-width: 100%;\n}\n\n.tabulator .tabulator-row.tabulator-group:hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.1);\n}\n\n.tabulator .tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow {\n margin-right: 10px;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-top: 6px solid #666;\n border-bottom: 0;\n}\n\n.tabulator .tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow {\n margin-left: 20px;\n}\n\n.tabulator .tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow {\n margin-left: 40px;\n}\n\n.tabulator .tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow {\n margin-left: 60px;\n}\n\n.tabulator .tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow {\n margin-left: 80px;\n}\n\n.tabulator .tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow {\n margin-left: 1000px;\n}\n\n.tabulator .tabulator-row.tabulator-group .tabulator-arrow {\n display: inline-block;\n width: 0;\n height: 0;\n margin-right: 16px;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 0;\n border-left: 6px solid #666;\n vertical-align: middle;\n}\n\n.tabulator .tabulator-row.tabulator-group span {\n margin-left: 10px;\n color: #666;\n}\n\n.tabulator .tabulator-col-resize-handle {\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n width: 5px;\n}\n\n.tabulator .tabulator-col-resize-handle.prev {\n left: 0;\n right: auto;\n}\n\n.tabulator .tabulator-col-resize-handle:hover {\n cursor: ew-resize;\n}\n\n.tabulator .tabulator-footer {\n padding: 0.78571em 0.78571em;\n border-top: 1px solid rgba(34, 36, 38, 0.15);\n box-shadow: none;\n background: #F9FAFB;\n text-align: right;\n color: rgba(0, 0, 0, 0.87);\n font-style: normal;\n font-weight: normal;\n text-transform: none;\n white-space: nowrap;\n -ms-user-select: none;\n user-select: none;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder {\n box-sizing: border-box;\n width: calc(\"100% + 20px\");\n margin: -0.78571em -0.78571em 0.78571em -0.78571em;\n text-align: left;\n background: white !important;\n border-bottom: 1px solid #ddd;\n border-top: 1px solid #ddd;\n overflow: hidden;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row {\n font-weight: bold;\n background: white !important;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder:only-child {\n margin-bottom: -0.78571em;\n border-bottom: none;\n}\n\n.tabulator .tabulator-footer .tabulator-pages {\n margin: 0 7px;\n}\n\n.tabulator .tabulator-footer .tabulator-page {\n display: inline-block;\n margin: 0 2px;\n border: 1px solid #aaa;\n border-radius: 3px;\n padding: 2px 5px;\n background: rgba(255, 255, 255, 0.2);\n color: #555;\n font-family: inherit;\n font-weight: inherit;\n font-size: inherit;\n}\n\n.tabulator .tabulator-footer .tabulator-page.active {\n color: #d00;\n}\n\n.tabulator .tabulator-footer .tabulator-page:disabled {\n opacity: .5;\n}\n\n.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n color: #fff;\n}\n\n.tabulator .tablulator-loader {\n position: absolute;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n top: 0;\n left: 0;\n z-index: 100;\n height: 100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.4);\n text-align: center;\n}\n\n.tabulator .tablulator-loader .tabulator-loader-msg {\n display: inline-block;\n margin: 0 auto;\n padding: 10px 20px;\n border-radius: 10px;\n background: #fff;\n font-weight: bold;\n font-size: 16px;\n}\n\n.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-loading {\n border: 4px solid #333;\n color: #000;\n}\n\n.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-error {\n border: 4px solid #D00;\n color: #590000;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.positive, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.positive {\n box-shadow: 0px 0px 0px #A3C293 inset;\n background: #FCFFF5 !important;\n color: #2C662D !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.positive:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.positive:hover {\n background: #f7ffe6 !important;\n color: #275b28 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.negative, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.negative {\n box-shadow: 0px 0px 0px #E0B4B4 inset;\n background: #FFF6F6 !important;\n color: #9F3A38 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.negative:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.negative:hover {\n background: #ffe7e7 !important;\n color: #943634 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.error, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.error {\n box-shadow: 0px 0px 0px #E0B4B4 inset;\n background: #FFF6F6 !important;\n color: #dd0000 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.error:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.error:hover {\n background: #ffe7e7 !important;\n color: #943634 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.warning {\n box-shadow: 0px 0px 0px #C9BA9B inset;\n background: #FFFAF3 !important;\n color: #573A08 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.warning:hover {\n background: #fff4e4 !important;\n color: #493107 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active {\n box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.87) inset;\n background: #E0E0E0 !important;\n color: rgba(0, 0, 0, 0.87) !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active:hover {\n background: #f7ffe6 !important;\n color: #275b28 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.disabled:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active {\n pointer-events: none;\n color: rgba(40, 40, 40, 0.3);\n}\n\n.tabulator.inverted {\n background: #333333;\n color: rgba(255, 255, 255, 0.9);\n border: none;\n}\n\n.tabulator.inverted .tabulator-header {\n background-color: rgba(0, 0, 0, 0.15);\n border-color: rgba(255, 255, 255, 0.1) !important;\n color: rgba(255, 255, 255, 0.9);\n}\n\n.tabulator.inverted .tabulator-header .tabulator-col {\n border-color: rgba(255, 255, 255, 0.1) !important;\n}\n\n.tabulator.inverted .tabulator-tableHolder .tabulator-table .tabulator-row {\n color: rgba(255, 255, 255, 0.9);\n border: none;\n}\n\n.tabulator.inverted .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n border-color: rgba(255, 255, 255, 0.1) !important;\n}\n\n.tabulator.inverted .tabulator-footer {\n background: #FFFFFF;\n}\n\n.tabulator.striped .tabulator-tableHolder .tabulator-table .tabulator-row:nth-child(even) {\n background-color: rgba(0, 0, 0, 0.05) !important;\n}\n\n.tabulator.celled {\n border: 1px solid rgba(34, 36, 38, 0.15);\n}\n\n.tabulator.celled .tabulator-header .tabulator-col {\n border-right: 1px solid rgba(34, 36, 38, 0.1);\n}\n\n.tabulator.celled .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n border-right: 1px solid rgba(34, 36, 38, 0.1);\n}\n\n.tabulator[class*=\"single line\"] .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n border-right: none;\n}\n\n.tabulator.red {\n border-top: 0.2em solid #DB2828;\n}\n\n.tabulator.inverted.red {\n background-color: #DB2828 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.orange {\n border-top: 0.2em solid #F2711C;\n}\n\n.tabulator.inverted.orange {\n background-color: #F2711C !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.yellow {\n border-top: 0.2em solid #FBBD08;\n}\n\n.tabulator.inverted.yellow {\n background-color: #FBBD08 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.olive {\n border-top: 0.2em solid #B5CC18;\n}\n\n.tabulator.inverted.olive {\n background-color: #B5CC18 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.green {\n border-top: 0.2em solid #21BA45;\n}\n\n.tabulator.inverted.green {\n background-color: #21BA45 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.teal {\n border-top: 0.2em solid #00B5AD;\n}\n\n.tabulator.inverted.teal {\n background-color: #00B5AD !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.blue {\n border-top: 0.2em solid #2185D0;\n}\n\n.tabulator.inverted.blue {\n background-color: #2185D0 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.violet {\n border-top: 0.2em solid #6435C9;\n}\n\n.tabulator.inverted.violet {\n background-color: #6435C9 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.purple {\n border-top: 0.2em solid #A333C8;\n}\n\n.tabulator.inverted.purple {\n background-color: #A333C8 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.pink {\n border-top: 0.2em solid #E03997;\n}\n\n.tabulator.inverted.pink {\n background-color: #E03997 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.brown {\n border-top: 0.2em solid #A5673F;\n}\n\n.tabulator.inverted.brown {\n background-color: #A5673F !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.grey {\n border-top: 0.2em solid #767676;\n}\n\n.tabulator.inverted.grey {\n background-color: #767676 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.black {\n border-top: 0.2em solid #1B1C1D;\n}\n\n.tabulator.inverted.black {\n background-color: #1B1C1D !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.padded .tabulator-header .tabulator-col .tabulator-col-content {\n padding: 1em 1em;\n}\n\n.tabulator.padded .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n top: 20px;\n}\n\n.tabulator.padded .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n padding: 1em 1em;\n}\n\n.tabulator.padded.very .tabulator-header .tabulator-col .tabulator-col-content {\n padding: 1.5em 1.5em;\n}\n\n.tabulator.padded.very .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n top: 26px;\n}\n\n.tabulator.padded.very .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n padding: 1.5em 1.5em;\n}\n\n.tabulator.compact .tabulator-header .tabulator-col .tabulator-col-content {\n padding: 0.5em 0.7em;\n}\n\n.tabulator.compact .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n top: 12px;\n}\n\n.tabulator.compact .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n padding: 0.5em 0.7em;\n}\n\n.tabulator.compact.very .tabulator-header .tabulator-col .tabulator-col-content {\n padding: 0.4em 0.6em;\n}\n\n.tabulator.compact.very .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n top: 10px;\n}\n\n.tabulator.compact.very .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n padding: 0.4em 0.6em;\n}\n"]} \ No newline at end of file diff --git a/css/tabulator/tabulator.css b/css/tabulator/tabulator.css new file mode 100644 index 0000000..f351379 --- /dev/null +++ b/css/tabulator/tabulator.css @@ -0,0 +1,535 @@ +/* Tabulator v3.3.1 (c) Oliver Folkerd */ +.tabulator { + position: relative; + border: 1px solid #999; + background-color: #888; + font-size: 14px; + text-align: left; + overflow: hidden; + -ms-transform: translatez(0); + transform: translatez(0); +} + +.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { + min-width: 100%; +} + +.tabulator.tabulator-block-select { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator .tabulator-header { + position: relative; + box-sizing: border-box; + width: 100%; + border-bottom: 1px solid #999; + background-color: #e6e6e6; + color: #555; + font-weight: bold; + white-space: nowrap; + overflow: hidden; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-header .tabulator-col { + display: inline-block; + position: relative; + box-sizing: border-box; + border-right: 1px solid #aaa; + background: #e6e6e6; + text-align: left; + vertical-align: bottom; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-moving { + position: absolute; + border: 1px solid #999; + background: #cdcdcd; + pointer-events: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content { + position: relative; + padding: 4px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { + box-sizing: border-box; + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + vertical-align: bottom; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { + box-sizing: border-box; + width: 100%; + border: 1px solid #999; + padding: 1px; + background: #fff; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + display: inline-block; + position: absolute; + top: 9px; + right: 8px; + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + position: relative; + display: -ms-flexbox; + display: flex; + border-top: 1px solid #aaa; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { + position: absolute; + background-color: #e6e6e6 !important; + border: 1px solid #aaa; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { + position: relative; + box-sizing: border-box; + margin-top: 2px; + width: 100%; + text-align: center; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { + height: auto !important; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { + margin-top: 3px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 25px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { + cursor: pointer; + background-color: #cdcdcd; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { + border-top: 6px solid #666; + border-bottom: none; +} + +.tabulator .tabulator-header .tabulator-frozen { + display: inline-block; + position: absolute; + z-index: 10; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #aaa; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #aaa; +} + +.tabulator .tabulator-header .tabulator-calcs-holder { + box-sizing: border-box; + min-width: 200%; + background: #f3f3f3 !important; + border-top: 1px solid #aaa; + border-bottom: 1px solid #aaa; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { + background: #f3f3f3 !important; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-tableHolder { + position: relative; + width: 100%; + white-space: nowrap; + overflow: auto; + -webkit-overflow-scrolling: touch; +} + +.tabulator .tabulator-tableHolder:focus { + outline: none; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder { + position: absolute; + box-sizing: border-box; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + top: 0; + left: 0; + height: 100%; + width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder span { + display: inline-block; + margin: 0 auto; + padding: 10px; + color: #ccc; + font-weight: bold; + font-size: 20px; +} + +.tabulator .tabulator-tableHolder .tabulator-table { + position: relative; + display: inline-block; + background-color: #fff; + white-space: nowrap; + overflow: visible; + color: #333; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { + font-weight: bold; + background: #e2e2e2 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { + border-bottom: 2px solid #aaa; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { + border-top: 2px solid #aaa; +} + +.tabulator .tabulator-row { + position: relative; + box-sizing: border-box; + min-height: 22px; + background-color: #fff; +} + +.tabulator .tabulator-row.tabulator-row-even { + background-color: #EFEFEF; +} + +.tabulator .tabulator-row.tabulator-selectable:hover { + background-color: #bbb; + cursor: pointer; +} + +.tabulator .tabulator-row.tabulator-selected { + background-color: #9ABCEA; +} + +.tabulator .tabulator-row.tabulator-selected:hover { + background-color: #769BCC; + cursor: pointer; +} + +.tabulator .tabulator-row.tabulator-row-moving { + border: 1px solid #000; + background: #fff; +} + +.tabulator .tabulator-row.tabulator-moving { + position: absolute; + border-top: 1px solid #aaa; + border-bottom: 1px solid #aaa; + pointer-events: none; + z-index: 15; +} + +.tabulator .tabulator-row .tabulator-frozen { + display: inline-block; + position: absolute; + background-color: inherit; + z-index: 10; +} + +.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #aaa; +} + +.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #aaa; +} + +.tabulator .tabulator-row .tabulator-cell { + display: inline-block; + position: relative; + box-sizing: border-box; + padding: 4px; + border-right: 1px solid #aaa; + vertical-align: middle; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-editing { + border: 1px solid #1D68CD; + padding: 0; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-editing input, .tabulator .tabulator-row .tabulator-cell.tabulator-editing select { + border: 1px; + background: transparent; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail { + border: 1px solid #dd0000; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail select { + border: 1px; + background: transparent; + color: #dd0000; +} + +.tabulator .tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { + width: 80%; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { + width: 100%; + height: 3px; + margin: 2px 10% 0 10%; + background: #666; +} + +.tabulator .tabulator-row.tabulator-group { + box-sizing: border-box; + border-bottom: 1px solid #999; + border-right: 1px solid #aaa; + border-top: 1px solid #999; + padding: 5px; + padding-left: 10px; + background: #ccc; + font-weight: bold; + min-width: 100%; +} + +.tabulator .tabulator-row.tabulator-group:hover { + cursor: pointer; + background-color: rgba(0, 0, 0, 0.1); +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #666; + border-bottom: 0; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow { + margin-left: 20px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow { + margin-left: 40px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow { + margin-left: 60px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow { + margin-left: 80px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow { + margin-left: 1000px; +} + +.tabulator .tabulator-row.tabulator-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #666; + vertical-align: middle; +} + +.tabulator .tabulator-row.tabulator-group span { + margin-left: 10px; + color: #d00; +} + +.tabulator .tabulator-footer { + padding: 5px 10px; + border-top: 1px solid #999; + background-color: #e6e6e6; + text-align: right; + color: #555; + font-weight: bold; + white-space: nowrap; + -ms-user-select: none; + user-select: none; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder { + box-sizing: border-box; + width: calc("100% + 20px"); + margin: -5px -10px 5px -10px; + text-align: left; + background: #f3f3f3 !important; + border-bottom: 1px solid #aaa; + border-top: 1px solid #aaa; + overflow: hidden; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { + background: #f3f3f3 !important; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { + margin-bottom: -5px; + border-bottom: none; +} + +.tabulator .tabulator-footer .tabulator-pages { + margin: 0 7px; +} + +.tabulator .tabulator-footer .tabulator-page { + display: inline-block; + margin: 0 2px; + padding: 2px 5px; + border: 1px solid #aaa; + border-radius: 3px; + background: rgba(255, 255, 255, 0.2); + color: #555; + font-family: inherit; + font-weight: inherit; + font-size: inherit; +} + +.tabulator .tabulator-footer .tabulator-page.active { + color: #d00; +} + +.tabulator .tabulator-footer .tabulator-page:disabled { + opacity: .5; +} + +.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); + color: #fff; +} + +.tabulator .tabulator-col-resize-handle { + position: absolute; + right: 0; + top: 0; + bottom: 0; + width: 5px; +} + +.tabulator .tabulator-col-resize-handle.prev { + left: 0; + right: auto; +} + +.tabulator .tabulator-col-resize-handle:hover { + cursor: ew-resize; +} + +.tabulator .tablulator-loader { + position: absolute; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + top: 0; + left: 0; + z-index: 100; + height: 100%; + width: 100%; + background: rgba(0, 0, 0, 0.4); + text-align: center; +} + +.tabulator .tablulator-loader .tabulator-loader-msg { + display: inline-block; + margin: 0 auto; + padding: 10px 20px; + border-radius: 10px; + background: #fff; + font-weight: bold; + font-size: 16px; +} + +.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-loading { + border: 4px solid #333; + color: #000; +} + +.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-error { + border: 4px solid #D00; + color: #590000; +} diff --git a/css/tabulator/tabulator.min.css b/css/tabulator/tabulator.min.css new file mode 100644 index 0000000..a530a24 --- /dev/null +++ b/css/tabulator/tabulator.min.css @@ -0,0 +1,3 @@ +/* Tabulator v3.3.1 (c) Oliver Folkerd */ +.tabulator{position:relative;border:1px solid #999;background-color:#888;font-size:14px;text-align:left;overflow:hidden;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator.tabulator-block-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{position:relative;box-sizing:border-box;width:100%;border-bottom:1px solid #999;background-color:#e6e6e6;color:#555;font-weight:700;white-space:nowrap;overflow:hidden;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header .tabulator-col{display:inline-block;position:relative;box-sizing:border-box;border-right:1px solid #aaa;background:#e6e6e6;text-align:left;vertical-align:bottom;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #999;background:#cdcdcd;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{position:relative;padding:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:9px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#e6e6e6!important;border:1px solid #aaa}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#cdcdcd}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #666;border-bottom:none}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:1}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:200%;background:#f3f3f3!important;border-top:1px solid #aaa;border-bottom:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#f3f3f3!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{position:absolute;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;height:100%;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#ccc;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#fff;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#e2e2e2!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #aaa}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #aaa}.tabulator .tabulator-row{position:relative;box-sizing:border-box;min-height:22px;background-color:#fff}.tabulator .tabulator-row.tabulator-row-even{background-color:#efefef}.tabulator .tabulator-row.tabulator-selectable:hover{background-color:#bbb;cursor:pointer}.tabulator .tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator .tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator .tabulator-row.tabulator-row-moving{border:1px solid #000;background:#fff}.tabulator .tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #aaa;border-bottom:1px solid #aaa;pointer-events:none;z-index:2}.tabulator .tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:1}.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator .tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:4px;border-right:1px solid #aaa;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator .tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;padding:0}.tabulator .tabulator-row .tabulator-cell.tabulator-editing input,.tabulator .tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator .tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin:2px 10% 0;background:#666}.tabulator .tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #aaa;border-top:1px solid #999;padding:5px;padding-left:10px;background:#ccc;font-weight:700;min-width:100%}.tabulator .tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator .tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow{margin-left:20px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow{margin-left:40px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow{margin-left:60px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow{margin-left:80px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow{margin-left:1000px}.tabulator .tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator .tabulator-row.tabulator-group span{margin-left:10px;color:#d00}.tabulator .tabulator-footer{padding:5px 10px;border-top:1px solid #999;background-color:#e6e6e6;text-align:right;color:#555;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc("100% + 20px");margin:-5px -10px 5px;text-align:left;background:#f3f3f3!important;border-bottom:1px solid #aaa;border-top:1px solid #aaa;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#f3f3f3!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;padding:2px 5px;border:1px solid #aaa;border-radius:3px;background:hsla(0,0%,100%,.2);color:#555;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page.active{color:#d00}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tablulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:3;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tablulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000} +/*# sourceMappingURL=tabulator.min.css.map */ diff --git a/css/tabulator/tabulator.min.css.map b/css/tabulator/tabulator.min.css.map new file mode 100644 index 0000000..5998f03 --- /dev/null +++ b/css/tabulator/tabulator.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["tabulator.scss"],"names":[],"mappings":"AAyCA,WACC,kBAAkB,AAElB,sBAvCgB,AAyChB,sBA1CqB,AA4CrB,eA1Ca,AA2Cb,gBAAgB,AAChB,gBAAe,AAMf,uBAAwB,CAunBxB,AAtoBD,iFAoBI,cAAc,CACd,AArBJ,kCA0BE,yBAAiB,AAAjB,sBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AA3BF,6BA+BE,kBAAiB,AACjB,sBAAsB,AAEtB,WAAU,AAEV,6BAjEwB,AAkExB,yBArE4B,AAsE5B,WArEmB,AAsEnB,gBAAgB,AAEhB,mBAAmB,AACnB,gBAAe,AAEf,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAwLpB,AAvOF,4CAmDG,qBAAoB,AACpB,kBAAiB,AACjB,sBAAqB,AACrB,4BApFoB,AAqFpB,mBAvF2B,AAwF3B,gBAAe,AACf,sBAAsB,AACtB,eAAgB,CAsIhB,AAhMH,6DA6DI,kBAAkB,AAClB,sBA3FsB,AA4FtB,mBAA8C,AAC9C,mBAAoB,CACpB,AAjEJ,mEAqEI,kBAAkB,AAClB,WAAW,CAsCX,AA5GJ,wFA0EK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAarB,AA7FL,gHAoFM,sBAAsB,AACtB,WAAW,AAEX,sBAAqB,AAErB,YAAW,AAEX,eAAgB,CAChB,AA5FN,oFAiGK,qBAAqB,AACrB,kBAAkB,AAClB,QAAO,AACP,UAAS,AACT,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,4BAjImB,CAkInB,AA1GL,0FAmHK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,0BApJkB,AAqJlB,eAAgB,CAKhB,AA5HL,oHA0HM,iBAAiB,CACjB,AA3HN,0FAkIK,YAAa,CACb,AAnIL,+DAwII,kBAAkB,AAClB,mCAAmD,AACnD,qBAxKmB,CAyKnB,AA3IJ,qEA+II,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAUlB,AA7JJ,8EAuJK,qBAAsB,CACtB,AAxJL,yEA2JK,cAAe,CACf,AA5JL,oFAkKK,kBAAkB,CAClB,AAnKL,qEAsKK,eAAc,AACd,wBAAoD,CACpD,AAxKL,uHA4KM,gBAAgB,AAChB,4BArMkB,CAsMlB,AA9KN,sHAmLM,gBAAgB,AAChB,4BA7MgB,CA8MhB,AArLN,uHA0LM,0BAnNgB,AAoNhB,kBAAmB,CACnB,AA5LN,+CAmMG,qBAAqB,AACrB,kBAAkB,AAIlB,SAAW,CASX,AAjNH,qEA2MI,2BA9NgB,CA+NhB,AA5MJ,sEA+MI,0BAlOgB,CAmOhB,AAhNJ,qDAqNG,sBAAqB,AACrB,eAAc,AAEd,6BAAyD,AAUzD,0BArPiB,AAsPjB,6BAjQoB,AAmQpB,eAAgB,CAChB,AAtOH,oEA2NI,4BAAyD,CAKzD,AAhOJ,iGA8NK,YAAa,CACb,AA/NL,kCA2OE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CAwDjC,AAvSF,wCAkPG,YAAa,CACb,AAnPH,yDAuPG,kBAAkB,AAClB,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,YAAW,AACX,UAAU,CAYV,AA3QH,8DAkQI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,WAAU,AACV,gBAAiB,AACjB,cAAe,CACf,AA1QJ,mDA+QG,kBAAiB,AACjB,qBAAoB,AACpB,sBAtSqB,AAuSrB,mBAAmB,AACnB,iBAAgB,AAChB,UAtSe,CAwTf,AAtSH,kFAyRK,gBAAiB,AACjB,4BAAwD,CASxD,AAnSL,sGA6RM,4BAhTc,CAiTd,AA9RN,yGAiSM,yBApTc,CAqTd,AAlSN,0BA2SE,kBAAkB,AAClB,sBAAsB,AACtB,gBAA0C,AAC1C,qBAnUsB,CAygBtB,AApfF,6CAkTG,wBAtU2B,CAuU3B,AAnTH,qDAsTG,sBAvUqB,AAwUrB,cAAe,CACf,AAxTH,6CA2TG,wBA1U4B,CA2U5B,AA5TH,mDA+TG,yBA7UiC,AA8UjC,cAAe,CACf,AAjUH,+CAoUG,sBAAqB,AACrB,eAAe,CACf,AAtUH,2CAyUG,kBAAkB,AAElB,0BA9ViB,AA+VjB,6BA/ViB,AAiWjB,oBAAoB,AACpB,SAAU,CACV,AAhVH,4CAmVG,qBAAqB,AACrB,kBAAkB,AAElB,yBAAyB,AAEzB,SAAW,CASX,AAjWH,kEA2VI,2BA9WgB,CA+WhB,AA5VJ,mEA+VI,0BAlXgB,CAmXhB,AAhWJ,0CAqWG,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,YAAW,AACX,4BA5XiB,AA6XjB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,sBAAsB,CAsDtB,AAnaH,4DAiXI,yBA7XiB,AA8XjB,SAAU,CAMV,AAxXJ,qIAqXK,WAAU,AACV,sBAAsB,CACtB,AAvXL,oEA2XI,qBAtYe,CA6Yf,AAlYJ,qJA6XK,WAAU,AACV,uBAAsB,AAEtB,UA3Yc,CA4Yd,AAjYL,wFAuYK,YAAa,CACb,AAxYL,+DA8YI,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAElB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AAlaJ,yFAwZK,SAAS,CAST,AAjaL,mHA4ZM,WAAU,AACV,WAAU,AACV,iBAAoB,AACpB,eAAe,CACf,AAhaN,0CAuaG,sBAAqB,AACrB,6BAA4B,AAC5B,4BA5biB,AA6bjB,0BAAyB,AACzB,YAAW,AACX,kBAAiB,AACjB,gBAAe,AACf,gBAAgB,AAEhB,cAAe,CAkEf,AAlfH,gDAmbI,eAAc,AACd,+BAA+B,CAC/B,AArbJ,mFA0bK,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,0BAtdiB,AAudjB,eAAgB,CAChB,AA/bL,mFAqcK,gBAAgB,CAChB,AAtcL,mFA2cK,gBAAgB,CAChB,AA5cL,mFAidK,gBAAgB,CAChB,AAldL,mFAudK,gBAAgB,CAChB,AAxdL,mFA6dK,kBAAkB,CAClB,AA9dL,2DAmeI,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,2BAngBkB,AAogBlB,qBAAqB,CACrB,AA5eJ,+CA+eI,iBAAgB,AAChB,UAAU,CACV,AAjfJ,6BAwfE,iBAAgB,AAChB,0BA9fwB,AA+fxB,yBAlgB4B,AAmgB5B,iBAAiB,AACjB,WAngBmB,AAogBnB,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAoEpB,AAxkBF,qDAugBG,sBAAqB,AACrB,0BAAyB,AACzB,sBAA2B,AAE3B,gBAAgB,AAEhB,6BAAyD,AAUzD,6BA1iBiB,AA2iBjB,0BA3iBiB,AA6iBjB,eAAgB,CAMhB,AAhiBH,oEAghBI,4BAAyD,CAKzD,AArhBJ,iGAmhBK,YAAa,CACb,AAphBL,gEA6hBI,mBAAkB,AAClB,kBAAkB,CAClB,AA/hBJ,8CAoiBG,YAAY,CACZ,AAriBH,6CAyiBG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBApjBoB,AAqjBpB,kBAAiB,AAEjB,8BAA+B,AAE/B,WA1jBkB,AA2jBlB,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CAiBjB,AAvkBH,oDAyjBI,UAAU,CACV,AA1jBJ,sDA6jBI,UAAU,CACV,AA9jBJ,kEAkkBK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AArkBL,wCA4kBE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AA1lBF,6CAmlBG,OAAM,AACN,UAAU,CACV,AArlBH,8CAwlBG,gBAAgB,CAChB,AAzlBH,8BA+lBE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,UAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AAroBF,oDA8mBG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AApoBH,sEA2nBI,sBAAqB,AACrB,UAAU,CACV,AA7nBJ,oEAioBI,sBAAqB,AACrB,aAAa,CACb","file":"tabulator.min.css","sourcesContent":["/* Tabulator v3.3.1 (c) Oliver Folkerd */\n\n\r\n//Main Theme Variables\r\n$backgroundColor: #888; //background color of tabulator\r\n$borderColor:#999; //border to tablulator\r\n$textSize:14px; //table text size\r\n\r\n//header themeing\r\n$headerBackgroundColor:#e6e6e6; //border to tablulator\r\n$headerTextColor:#555; //header text colour\r\n$headerBorderColor:#aaa; //header border color\r\n$headerSeperatorColor:#999; //header bottom seperator color\r\n$headerMargin:4px; //padding round header\r\n\r\n//column header arrows\r\n$sortArrowActive: #666;\r\n$sortArrowInactive: #bbb;\r\n\r\n//row themeing\r\n$rowBackgroundColor:#fff; //table row background color\r\n$rowAltBackgroundColor:#EFEFEF; //table row background color\r\n$rowBorderColor:#aaa; //table border color\r\n$rowTextColor:#333; //table text color\r\n$rowHoverBackground:#bbb; //row background color on hover\r\n\r\n$rowSelectedBackground: #9ABCEA; //row background color when selected\r\n$rowSelectedBackgroundHover: #769BCC;//row background color when selected and hovered\r\n\r\n$editBoxColor:#1D68CD; //border color for edit boxes\r\n$errorColor:#dd0000; //error indication\r\n\r\n//footer themeing\r\n$footerBackgroundColor:#e6e6e6; //border to tablulator\r\n$footerTextColor:#555; //footer text colour\r\n$footerBorderColor:#aaa; //footer border color\r\n$footerSeperatorColor:#999; //footer bottom seperator color\r\n\r\n\r\n\r\n//Tabulator Containing Element\r\n.tabulator{\r\n\tposition: relative;\r\n\r\n\tborder: 1px solid $borderColor;\r\n\r\n\tbackground-color: $backgroundColor;\r\n\r\n\tfont-size:$textSize;\r\n\ttext-align: left;\r\n\toverflow:hidden;\r\n\r\n\t-webkit-transform: translatez(0);\r\n\t-moz-transform: translatez(0);\r\n\t-ms-transform: translatez(0);\r\n\t-o-transform: translatez(0);\r\n\ttransform: translatez(0);\r\n\r\n\t&[tabulator-layout=\"fitDataFill\"]{\r\n\t\t.tabulator-tableHolder{\r\n\t\t\t.tabulator-table{\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&.tabulator-block-select{\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t//column header containing element\r\n\t.tabulator-header{\r\n\t\tposition:relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\twidth:100%;\r\n\r\n\t\tborder-bottom:1px solid $headerSeperatorColor;\r\n\t\tbackground-color: $headerBackgroundColor;\r\n\t\tcolor: $headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:hidden;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t//individual column header element\r\n\t\t.tabulator-col{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition:relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-right:1px solid $headerBorderColor;\r\n\t\t\tbackground:$headerBackgroundColor;\r\n\t\t\ttext-align:left;\r\n\t\t\tvertical-align: bottom;\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&.tabulator-moving{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tborder:1px solid $headerSeperatorColor;\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%);\r\n\t\t\t\tpointer-events: none;\r\n\t\t\t}\r\n\r\n\t\t\t//hold content of column header\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding:4px;\r\n\r\n\t\t\t\t//hold title of column header\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\twhite-space: nowrap;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\t\tvertical-align:bottom;\r\n\r\n\t\t\t\t\t//element to hold title editor\r\n\t\t\t\t\t.tabulator-title-editor{\r\n\t\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\tborder:1px solid #999;\r\n\r\n\t\t\t\t\t\tpadding:1px;\r\n\r\n\t\t\t\t\t\tbackground: #fff;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:9px;\r\n\t\t\t\t\tright:8px;\r\n\t\t\t\t\twidth: 0;\r\n\t\t\t\t\theight: 0;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t//complex header column group\r\n\t\t\t&.tabulator-col-group{\r\n\r\n\t\t\t\t//gelement to hold sub columns in column group\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tposition:relative;\r\n\t\t\t\t\tdisplay: flex;\r\n\r\n\t\t\t\t\tborder-top:1px solid $headerBorderColor;\r\n\t\t\t\t\toverflow: hidden;\r\n\r\n\t\t\t\t\t.tabulator-col:last-child{\r\n\t\t\t\t\t\tmargin-right:-1px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//placeholder element for sortable columns\r\n\t\t\t&.ui-sortable-helper{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tbackground-color: $headerBackgroundColor !important;\r\n\t\t\t\tborder:1px solid $headerBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t//header filter containing element\r\n\t\t\t.tabulator-header-filter{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\tmargin-top:2px;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\ttext-align: center;\r\n\r\n\t\t\t\t//styling adjustment for inbuilt editors\r\n\t\t\t\ttextarea{\r\n\t\t\t\t\theight:auto !important;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsvg{\r\n\t\t\t\t\tmargin-top: 3px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//styling child elements for sortable columns\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:25px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"none\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"desc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\tborder-bottom: none;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\t// background-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tmin-width:200%;\r\n\r\n\t\t\tbackground:lighten($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $headerBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\t}\r\n\r\n\t//scrolling element to hold table\r\n\t.tabulator-tableHolder{\r\n\t\tposition:relative;\r\n\t\twidth:100%;\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:auto;\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\r\n\t\t&:focus{\r\n\t\t\toutline: none;\r\n\t\t}\r\n\r\n\t\t//default placeholder element\r\n\t\t.tabulator-placeholder{\r\n\t\t\tposition: absolute;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\ttop:0;\r\n\t\t\tleft:0;\r\n\t\t\theight:100%;\r\n\t\t\twidth:100%;\r\n\r\n\t\t\tspan{\r\n\t\t\t\tdisplay: inline-block;\r\n\r\n\t\t\t\tmargin:0 auto;\r\n\t\t\t\tpadding:10px;\r\n\r\n\t\t\t\tcolor:#ccc;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tfont-size: 20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//element to hold table rows\r\n\t\t.tabulator-table{\r\n\t\t\tposition:relative;\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tbackground-color:$rowBackgroundColor;\r\n\t\t\twhite-space: nowrap;\r\n\t\t\toverflow:visible;\r\n\t\t\tcolor:$rowTextColor;\r\n\r\n\t\t\t//row element\r\n\t\t\t.tabulator-row{\r\n\t\t\t\t&.tabulator-calcs{\r\n\t\t\t\t\tfont-weight: bold;\r\n\t\t\t\t\tbackground:darken($rowAltBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t\t&.tabulator-calcs-top{\r\n\t\t\t\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-calcs-bottom{\r\n\t\t\t\t\t\tborder-top:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\r\n\t//row element\r\n\t.tabulator-row{\r\n\t\tposition: relative;\r\n\t\tbox-sizing: border-box;\r\n\t\tmin-height:$textSize + ($headerMargin * 2);\r\n\t\tbackground-color: $rowBackgroundColor;\r\n\r\n\r\n\t\t&.tabulator-row-even{\r\n\t\t\tbackground-color: $rowAltBackgroundColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-selectable:hover{\r\n\t\t\tbackground-color:$rowHoverBackground;\r\n\t\t\tcursor: pointer;\r\n\t\t}\r\n\r\n\t\t&.tabulator-selected{\r\n\t\t\tbackground-color:$rowSelectedBackground;\r\n\t\t}\r\n\r\n\t\t&.tabulator-selected:hover{\r\n\t\t\tbackground-color:$rowSelectedBackgroundHover;\r\n\t\t\tcursor: pointer;\r\n\t\t}\r\n\r\n\t\t&.tabulator-row-moving{\r\n\t\t\tborder:1px solid #000;\r\n\t\t\tbackground:#fff;\r\n\t\t}\r\n\r\n\t\t&.tabulator-moving{\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t\tpointer-events: none;\r\n\t\t\tz-index:15;\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\tbackground-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//cell element\r\n\t\t.tabulator-cell{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition: relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tpadding:4px;\r\n\t\t\tborder-right:1px solid $rowBorderColor;\r\n\t\t\tvertical-align:middle;\r\n\t\t\twhite-space:nowrap;\r\n\t\t\toverflow:hidden;\r\n\t\t\ttext-overflow:ellipsis;\r\n\r\n\r\n\t\t\t&.tabulator-editing{\r\n\t\t\t\tborder:1px solid $editBoxColor;\r\n\t\t\t\tpadding: 0;\r\n\r\n\t\t\t\tinput, select{\r\n\t\t\t\t\tborder:1px;\r\n\t\t\t\t\tbackground:transparent;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-validation-fail{\r\n\t\t\t\tborder:1px solid $errorColor;\r\n\t\t\t\tinput, select{\r\n\t\t\t\t\tborder:1px;\r\n\t\t\t\t\tbackground:transparent;\r\n\r\n\t\t\t\t\tcolor: $errorColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//movable row handle\r\n\t\t\t&.tabulator-row-handle{\r\n\r\n\t\t\t\tdisplay: inline-flex;\r\n\t\t\t\talign-items:center;\r\n\r\n\t\t\t\t-moz-user-select: none;\r\n\t\t\t\t-khtml-user-select: none;\r\n\t\t\t\t-webkit-user-select: none;\r\n\t\t\t\t-o-user-select: none;\r\n\r\n\t\t\t\t//handle holder\r\n\t\t\t\t.tabulator-row-handle-box{\r\n\t\t\t\t\twidth:80%;\r\n\r\n\t\t\t\t\t//Hamburger element\r\n\t\t\t\t\t.tabulator-row-handle-bar{\r\n\t\t\t\t\t\twidth:100%;\r\n\t\t\t\t\t\theight:3px;\r\n\t\t\t\t\t\tmargin:2px 10% 0 10%;\r\n\t\t\t\t\t\tbackground:#666;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//row grouping element\r\n\t\t&.tabulator-group{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-bottom:1px solid #999;\r\n\t\t\tborder-right:1px solid $rowBorderColor;\r\n\t\t\tborder-top:1px solid #999;\r\n\t\t\tpadding:5px;\r\n\t\t\tpadding-left:10px;\r\n\t\t\tbackground:#ccc;\r\n\t\t\tfont-weight:bold;\r\n\r\n\t\t\tmin-width: 100%;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tbackground-color:rgba(0,0,0,.1);\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-visible{\r\n\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-right:10px;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\tborder-bottom: 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-level-1{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-left:20px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-level-2{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-left:40px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-level-3{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-left:60px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-level-4{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-left:80px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-level-5{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-left:1000px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//sorting arrow\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tdisplay: inline-block;\r\n\t\t\t\twidth: 0;\r\n\t\t\t\theight: 0;\r\n\t\t\t\tmargin-right:16px;\r\n\t\t\t\tborder-top: 6px solid transparent;\r\n\t\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\t\tborder-right: 0;\r\n\t\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\t\tvertical-align:middle;\r\n\t\t\t}\r\n\r\n\t\t\tspan{\r\n\t\t\t\tmargin-left:10px;\r\n\t\t\t\tcolor:#d00;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t//footer element\r\n\t.tabulator-footer{\r\n\t\tpadding:5px 10px;\r\n\t\tborder-top:1px solid $footerSeperatorColor;\r\n\t\tbackground-color: $footerBackgroundColor;\r\n\t\ttext-align: right;\r\n\t\tcolor: $footerTextColor;\r\n\t\tfont-weight:bold;\r\n\t\twhite-space:nowrap;\r\n\t\tuser-select:none;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\twidth:calc(\"100% + 20px\");\r\n\t\t\tmargin:-5px -10px 5px -10px;\r\n\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\tbackground:lighten($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-bottom:1px solid $rowBorderColor;\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&:only-child{\r\n\t\t\t\tmargin-bottom:-5px;\r\n\t\t\t\tborder-bottom:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-pages{\r\n\t\t\tmargin:0 7px;\r\n\t\t}\r\n\r\n\t\t//pagination button\r\n\t\t.tabulator-page{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 2px;\r\n\t\t\tpadding:2px 5px;\r\n\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\r\n\t\t\tbackground:rgba(255,255,255,.2);\r\n\r\n\t\t\tcolor: $footerTextColor;\r\n\t\t\tfont-family:inherit;\r\n\t\t\tfont-weight:inherit;\r\n\t\t\tfont-size:inherit;\r\n\r\n\t\t\t&.active{\r\n\t\t\t\tcolor:#d00;\r\n\t\t\t}\r\n\r\n\t\t\t&:disabled{\r\n\t\t\t\topacity:.5;\r\n\t\t\t}\r\n\r\n\t\t\t&:not(.disabled){\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground:rgba(0,0,0,.2);\r\n\t\t\t\t\tcolor:#fff;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\ttop:0;\r\n\t\tbottom:0;\r\n\t\twidth:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\tleft:0;\r\n\t\t\tright:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ew-resize;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//holding div that contains loader and covers tabulator element to prevent interaction\r\n\t.tablulator-loader{\r\n\t\tposition:absolute;\r\n\t\tdisplay: flex;\r\n\t\talign-items:center;\r\n\r\n\t\ttop:0;\r\n\t\tleft:0;\r\n\t\tz-index:100;\r\n\r\n\t\theight:100%;\r\n\t\twidth:100%;\r\n\t\tbackground:rgba(0,0,0,.4);\r\n\t\ttext-align:center;\r\n\r\n\t\t//loading message element\r\n\t\t.tabulator-loader-msg{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 auto;\r\n\t\t\tpadding:10px 20px;\r\n\r\n\t\t\tborder-radius:10px;\r\n\r\n\t\t\tbackground:#fff;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:16px;\r\n\r\n\t\t\t//loading message\r\n\t\t\t&.tabulator-loading{\r\n\t\t\t\tborder:4px solid #333;\r\n\t\t\t\tcolor:#000;\r\n\t\t\t}\r\n\r\n\t\t\t//error message\r\n\t\t\t&.tabulator-error{\r\n\t\t\t\tborder:4px solid #D00;\r\n\t\t\t\tcolor:#590000;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}"]} \ No newline at end of file diff --git a/css/tabulator/tabulator_midnight.css b/css/tabulator/tabulator_midnight.css new file mode 100644 index 0000000..0ecb02f --- /dev/null +++ b/css/tabulator/tabulator_midnight.css @@ -0,0 +1,539 @@ +/* Tabulator v3.3.1 (c) Oliver Folkerd */ +.tabulator { + position: relative; + border: 1px solid #333; + background-color: #222; + overflow: hidden; + font-size: 14px; + text-align: left; + -ms-transform: translatez(0); + transform: translatez(0); +} + +.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { + min-width: 100%; +} + +.tabulator.tabulator-block-select { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator .tabulator-header { + position: relative; + box-sizing: border-box; + width: 100%; + border-bottom: 1px solid #999; + background-color: #333; + color: #fff; + font-weight: bold; + white-space: nowrap; + overflow: hidden; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-header .tabulator-col { + display: inline-block; + position: relative; + box-sizing: border-box; + border-right: 1px solid #aaa; + background-color: #333; + text-align: left; + vertical-align: bottom; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-moving { + position: absolute; + border: 1px solid #999; + background: #1a1a1a; + pointer-events: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content { + position: relative; + padding: 4px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { + box-sizing: border-box; + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + vertical-align: bottom; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { + box-sizing: border-box; + width: 100%; + border: 1px solid #999; + padding: 1px; + background: #444; + color: #fff; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + display: inline-block; + position: absolute; + top: 9px; + right: 8px; + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + position: relative; + display: -ms-flexbox; + display: flex; + border-top: 1px solid #aaa; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { + position: absolute; + background-color: #1a1a1a !important; + border: 1px solid #aaa; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { + position: relative; + box-sizing: border-box; + margin-top: 2px; + width: 100%; + text-align: center; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { + height: auto !important; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { + margin-top: 3px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input, .tabulator .tabulator-header .tabulator-col .tabulator-header-filter select { + border: 1px solid #999; + background: #444; + color: #fff; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 25px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { + cursor: pointer; + background-color: #1a1a1a; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { + border-top: 6px solid #666; + border-bottom: none; +} + +.tabulator .tabulator-header .tabulator-frozen { + display: inline-block; + position: absolute; + z-index: 10; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #888; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #888; +} + +.tabulator .tabulator-header .tabulator-calcs-holder { + box-sizing: border-box; + min-width: 200%; + background: #1a1a1a !important; + border-top: 1px solid #888; + border-bottom: 1px solid #aaa; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { + background: #1a1a1a !important; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-tableHolder { + position: relative; + width: 100%; + white-space: nowrap; + overflow: auto; + -webkit-overflow-scrolling: touch; +} + +.tabulator .tabulator-tableHolder:focus { + outline: none; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder { + position: absolute; + box-sizing: border-box; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + top: 0; + left: 0; + height: 100%; + width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder span { + display: inline-block; + margin: 0 auto; + padding: 10px; + color: #eee; + font-weight: bold; + font-size: 20px; +} + +.tabulator .tabulator-tableHolder .tabulator-table { + position: relative; + display: inline-block; + background-color: #666; + white-space: nowrap; + overflow: visible; + color: #fff; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { + font-weight: bold; + background: #373737 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { + border-bottom: 2px solid #888; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { + border-top: 2px solid #888; +} + +.tabulator .tabulator-row { + position: relative; + box-sizing: border-box; + min-height: 22px; + background-color: #666; +} + +.tabulator .tabulator-row:nth-child(even) { + background-color: #444; +} + +.tabulator .tabulator-row.tabulator-selectable:hover { + background-color: #999; + cursor: pointer; +} + +.tabulator .tabulator-row.tabulator-selected { + background-color: #000; +} + +.tabulator .tabulator-row.tabulator-selected:hover { + background-color: #888; + cursor: pointer; +} + +.tabulator .tabulator-row.tabulator-moving { + position: absolute; + border-top: 1px solid #888; + border-bottom: 1px solid #888; + pointer-events: none !important; + z-index: 15; +} + +.tabulator .tabulator-row .tabulator-frozen { + display: inline-block; + position: absolute; + background-color: inherit; + z-index: 10; +} + +.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #888; +} + +.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #888; +} + +.tabulator .tabulator-row .tabulator-cell { + display: inline-block; + position: relative; + box-sizing: border-box; + padding: 4px; + border-right: 1px solid #888; + vertical-align: middle; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-editing { + border: 1px solid #999; + padding: 0; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-editing input, .tabulator .tabulator-row .tabulator-cell.tabulator-editing select { + border: 1px; + background: transparent; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail { + border: 1px solid #dd0000; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail select { + border: 1px; + background: transparent; + color: #dd0000; +} + +.tabulator .tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { + width: 80%; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { + width: 100%; + height: 3px; + margin: 2px 10% 0 10%; + background: #666; +} + +.tabulator .tabulator-row.tabulator-group { + box-sizing: border-box; + border-bottom: 1px solid #999; + border-right: 1px solid #888; + border-top: 1px solid #999; + padding: 5px; + padding-left: 10px; + background: #ccc; + font-weight: bold; + color: #333; + min-width: 100%; +} + +.tabulator .tabulator-row.tabulator-group:hover { + cursor: pointer; + background-color: rgba(0, 0, 0, 0.1); +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #666; + border-bottom: 0; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow { + margin-left: 20px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow { + margin-left: 40px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow { + margin-left: 60px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow { + margin-left: 80px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow { + margin-left: 1000px; +} + +.tabulator .tabulator-row.tabulator-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #666; + vertical-align: middle; +} + +.tabulator .tabulator-row.tabulator-group span { + margin-left: 10px; + color: #666; +} + +.tabulator .tabulator-col-resize-handle { + position: absolute; + right: 0; + top: 0; + bottom: 0; + width: 5px; +} + +.tabulator .tabulator-col-resize-handle.prev { + left: 0; + right: auto; +} + +.tabulator .tabulator-col-resize-handle:hover { + cursor: ew-resize; +} + +.tabulator .tabulator-footer { + padding: 5px 10px; + border-top: 1px solid #999; + background-color: #333; + text-align: right; + color: #333; + font-weight: bold; + white-space: nowrap; + -ms-user-select: none; + user-select: none; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder { + box-sizing: border-box; + width: calc("100% + 20px"); + margin: -5px -10px 5px -10px; + text-align: left; + background: #262626 !important; + border-bottom: 1px solid #888; + border-top: 1px solid #888; + overflow: hidden; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { + background: #262626 !important; + color: #fff; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { + margin-bottom: -5px; + border-bottom: none; +} + +.tabulator .tabulator-footer .tabulator-pages { + margin: 0 7px; +} + +.tabulator .tabulator-footer .tabulator-page { + display: inline-block; + margin: 0 2px; + border: 1px solid #aaa; + border-radius: 3px; + padding: 2px 5px; + background: rgba(255, 255, 255, 0.2); + color: #333; + font-family: inherit; + font-weight: inherit; + font-size: inherit; +} + +.tabulator .tabulator-footer .tabulator-page.active { + color: #fff; +} + +.tabulator .tabulator-footer .tabulator-page:disabled { + opacity: .5; +} + +.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); + color: #fff; +} + +.tabulator .tablulator-loader { + position: absolute; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + top: 0; + left: 0; + z-index: 100; + height: 100%; + width: 100%; + background: rgba(0, 0, 0, 0.4); + text-align: center; +} + +.tabulator .tablulator-loader .tabulator-loader-msg { + display: inline-block; + margin: 0 auto; + padding: 10px 20px; + border-radius: 10px; + background: #fff; + font-weight: bold; + font-size: 16px; +} + +.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-loading { + border: 4px solid #333; + color: #000; +} + +.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-error { + border: 4px solid #D00; + color: #590000; +} diff --git a/css/tabulator/tabulator_midnight.min.css b/css/tabulator/tabulator_midnight.min.css new file mode 100644 index 0000000..0f5290e --- /dev/null +++ b/css/tabulator/tabulator_midnight.min.css @@ -0,0 +1,3 @@ +/* Tabulator v3.3.1 (c) Oliver Folkerd */ +.tabulator{position:relative;border:1px solid #333;background-color:#222;overflow:hidden;font-size:14px;text-align:left;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator.tabulator-block-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{width:100%;border-bottom:1px solid #999;color:#fff;font-weight:700;white-space:nowrap;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header,.tabulator .tabulator-header .tabulator-col{position:relative;box-sizing:border-box;background-color:#333;overflow:hidden}.tabulator .tabulator-header .tabulator-col{display:inline-block;border-right:1px solid #aaa;text-align:left;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #999;background:#1a1a1a;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{position:relative;padding:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#444;color:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:9px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#1a1a1a!important;border:1px solid #aaa}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input,.tabulator .tabulator-header .tabulator-col .tabulator-header-filter select{border:1px solid #999;background:#444;color:#fff}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#1a1a1a}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #666;border-bottom:none}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:1}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #888}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #888}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:200%;background:#1a1a1a!important;border-top:1px solid #888;border-bottom:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#1a1a1a!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{position:absolute;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;height:100%;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#eee;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#666;white-space:nowrap;overflow:visible;color:#fff}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#373737!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #888}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #888}.tabulator .tabulator-row{position:relative;box-sizing:border-box;min-height:22px;background-color:#666}.tabulator .tabulator-row:nth-child(2n){background-color:#444}.tabulator .tabulator-row.tabulator-selectable:hover{background-color:#999;cursor:pointer}.tabulator .tabulator-row.tabulator-selected{background-color:#000}.tabulator .tabulator-row.tabulator-selected:hover{background-color:#888;cursor:pointer}.tabulator .tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #888;border-bottom:1px solid #888;pointer-events:none!important;z-index:2}.tabulator .tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:1}.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #888}.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #888}.tabulator .tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:4px;border-right:1px solid #888;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator .tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #999;padding:0}.tabulator .tabulator-row .tabulator-cell.tabulator-editing input,.tabulator .tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator .tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin:2px 10% 0;background:#666}.tabulator .tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #888;border-top:1px solid #999;padding:5px;padding-left:10px;background:#ccc;font-weight:700;color:#333;min-width:100%}.tabulator .tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator .tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow{margin-left:20px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow{margin-left:40px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow{margin-left:60px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow{margin-left:80px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow{margin-left:1000px}.tabulator .tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator .tabulator-row.tabulator-group span{margin-left:10px;color:#666}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-footer{padding:5px 10px;border-top:1px solid #999;background-color:#333;text-align:right;color:#333;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc("100% + 20px");margin:-5px -10px 5px;text-align:left;background:#262626!important;border-bottom:1px solid #888;border-top:1px solid #888;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#262626!important;color:#fff}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;border:1px solid #aaa;border-radius:3px;padding:2px 5px;background:hsla(0,0%,100%,.2);color:#333;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page.active{color:#fff}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tablulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:3;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tablulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000} +/*# sourceMappingURL=tabulator_midnight.min.css.map */ diff --git a/css/tabulator/tabulator_midnight.min.css.map b/css/tabulator/tabulator_midnight.min.css.map new file mode 100644 index 0000000..09eec6d --- /dev/null +++ b/css/tabulator/tabulator_midnight.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["tabulator_midnight.scss"],"names":[],"mappings":"AAyCA,WACC,kBAAkB,AAClB,sBAtCgB,AAuChB,sBAxCqB,AAyCrB,gBAAe,AACf,eAxCa,AAyCb,gBAAgB,AAMhB,uBAAwB,CAwnBxB,AApoBD,iFAiBI,cAAc,CACd,AAlBJ,kCAuBE,yBAAiB,AAAjB,sBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AAxBF,6BA+BE,WAAU,AAEV,6BA9DwB,AAgExB,WAlEmB,AAmEnB,gBAAgB,AAEhB,mBAAmB,AAGnB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAkMpB,AA9OF,yEA4BE,kBAAiB,AACjB,sBAAsB,AAKtB,sBAlEyB,AAuEzB,eAAe,CAvCjB,AAsMG,4CAtJA,qBAAoB,AAGpB,4BAjFoB,AAmFpB,gBAAe,AACf,qBAAsB,CAgJtB,AAtMH,6DA0DI,kBAAkB,AAClB,sBAxFsB,AAyFtB,mBAA8C,AAC9C,mBAAoB,CACpB,AA9DJ,mEAkEI,kBAAkB,AAClB,WAAW,CAwCX,AA3GJ,wFAuEK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAerB,AA5FL,gHAiFM,sBAAsB,AACtB,WAAW,AAEX,sBAAqB,AAErB,YAAW,AAEX,gBAAgB,AAChB,UAAW,CACX,AA1FN,oFAgGK,qBAAqB,AACrB,kBAAkB,AAClB,QAAO,AACP,UAAS,AACT,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,4BAhImB,CAiInB,AAzGL,0FAkHK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,0BAnJkB,AAoJlB,eAAgB,CAKhB,AA3HL,oHAyHM,iBAAiB,CACjB,AA1HN,0FAiIK,YAAa,CACb,AAlIL,+DAuII,kBAAkB,AAClB,mCAAgE,AAChE,qBAvKmB,CAwKnB,AA1IJ,qEA8II,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAgBlB,AAlKJ,8EAsJK,qBAAsB,CACtB,AAvJL,yEA0JK,cAAe,CACf,AA3JL,uJA8JK,sBAAqB,AACrB,gBAAgB,AAChB,UAAW,CACX,AAjKL,oFAuKK,kBAAkB,CAClB,AAxKL,qEA2KK,eAAc,AACd,wBAAoD,CACpD,AA7KL,uHAkLM,gBAAgB,AAChB,4BA3MkB,CA4MlB,AApLN,sHAyLM,gBAAgB,AAChB,4BAnNgB,CAoNhB,AA3LN,uHAgMM,0BAzNgB,AA0NhB,kBAAmB,CACnB,AAlMN,+CAyMG,qBAAqB,AACrB,kBAAkB,AAIlB,SAAW,CASX,AAvNH,qEAiNI,2BApOgB,CAqOhB,AAlNJ,sEAqNI,0BAxOgB,CAyOhB,AAtNJ,qDA0NG,sBAAqB,AACrB,eAAc,AAEd,6BAAyD,AAUzD,0BA1PiB,AA2PjB,6BAtQoB,AAwQpB,eAAgB,CAChB,AA3OH,oEAgOI,4BAAyD,CAKzD,AArOJ,iGAmOK,YAAa,CACb,AApOL,kCAkPE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CAsDjC,AA5SF,wCAyPG,YAAa,CACb,AA1PH,yDA8PG,kBAAkB,AAClB,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,YAAW,AACX,UAAU,CAYV,AAlRH,8DAyQI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,WAAU,AACV,gBAAiB,AACjB,cAAe,CACf,AAjRJ,mDAsRG,kBAAiB,AACjB,qBAAoB,AACpB,sBA7SqB,AA8SrB,mBAAmB,AACnB,iBAAgB,AAChB,UA7Se,CA6Tf,AA3SH,kFA+RK,gBAAiB,AACjB,4BAAwD,CASxD,AAzSL,sGAmSM,4BAtTc,CAuTd,AApSN,yGAuSM,yBA1Tc,CA2Td,AAxSN,0BAgTE,kBAAkB,AAClB,sBAAsB,AAEtB,gBAA0C,AAC1C,qBAzUsB,CA0gBtB,AArfF,wCAuTG,qBA3UwB,CA4UxB,AAxTH,qDA2TG,sBA5UqB,AA6UrB,cAAe,CACf,AA7TH,6CAgUG,qBA/UyB,CAgVzB,AAjUH,mDAoUG,sBAlV8B,AAmV9B,cAAe,CACf,AAtUH,2CAyUG,kBAAkB,AAElB,0BA9ViB,AA+VjB,6BA/ViB,AAiWjB,8BAA+B,AAC/B,SAAU,CACV,AAhVH,4CAmVG,qBAAqB,AACrB,kBAAkB,AAElB,yBAAyB,AAEzB,SAAW,CASX,AAjWH,kEA2VI,2BA9WgB,CA+WhB,AA5VJ,mEA+VI,0BAlXgB,CAmXhB,AAhWJ,0CAsWG,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,YAAW,AACX,4BA7XiB,AA8XjB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,sBAAsB,CAsDtB,AApaH,4DAkXI,sBA9Xc,AA+Xd,SAAU,CAMV,AAzXJ,qIAsXK,WAAU,AACV,sBAAsB,CACtB,AAxXL,oEA4XI,qBAvYe,CA8Yf,AAnYJ,qJA8XK,WAAU,AACV,uBAAsB,AAEtB,UA5Yc,CA6Yd,AAlYL,wFAwYK,YAAa,CACb,AAzYL,+DA+YI,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAElB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AAnaJ,yFAyZK,SAAS,CAST,AAlaL,mHA6ZM,WAAU,AACV,WAAU,AACV,iBAAoB,AACpB,eAAe,CACf,AAjaN,0CA0aG,sBAAqB,AACrB,6BAA4B,AAC5B,4BA/biB,AAgcjB,0BAAyB,AACzB,YAAW,AACX,kBAAiB,AACjB,gBAAe,AACf,gBAAgB,AAChB,WAAU,AAEV,cAAe,CAgEf,AApfH,gDAubI,eAAc,AACd,+BAA+B,CAC/B,AAzbJ,mFA6bK,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,0BAzdiB,AA0djB,eAAgB,CAChB,AAlcL,mFAucK,gBAAgB,CAChB,AAxcL,mFA6cK,gBAAgB,CAChB,AA9cL,mFAmdK,gBAAgB,CAChB,AApdL,mFAydK,gBAAgB,CAChB,AA1dL,mFA+dK,kBAAkB,CAClB,AAheL,2DAqeI,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,2BArgBkB,AAsgBlB,qBAAqB,CACrB,AA9eJ,+CAifI,iBAAgB,AAChB,UAAU,CACV,AAnfJ,wCAyfE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AAvgBF,6CAggBG,OAAM,AACN,UAAU,CACV,AAlgBH,8CAqgBG,gBAAgB,CAChB,AAtgBH,6BA4gBE,iBAAgB,AAChB,0BAlhBwB,AAmhBxB,sBAthByB,AAuhBzB,iBAAgB,AAChB,WAvhBmB,AAwhBnB,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAiEpB,AAzlBF,qDA2hBG,sBAAqB,AACrB,0BAAyB,AACzB,sBAA2B,AAE3B,gBAAgB,AAEhB,6BAAwD,AAWxD,6BA/jBiB,AAgkBjB,0BAhkBiB,AAkkBjB,eAAgB,CAMhB,AArjBH,oEAoiBI,6BAAwD,AACxD,UApkBiB,CAykBjB,AA1iBJ,iGAwiBK,YAAa,CACb,AAziBL,gEAkjBI,mBAAkB,AAClB,kBAAkB,CAClB,AApjBJ,8CAyjBG,YAAY,CACZ,AA1jBH,6CA8jBG,qBAAoB,AACpB,aAAY,AACZ,sBAtkBoB,AAukBpB,kBAAiB,AACjB,gBAAe,AACf,8BAA+B,AAC/B,WA3kBkB,AA4kBlB,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CAiBjB,AAxlBH,oDA0kBI,UAAU,CACV,AA3kBJ,sDA8kBI,UAAU,CACV,AA/kBJ,kEAmlBK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AAtlBL,8BA6lBE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,UAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AAnoBF,oDA4mBG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AAloBH,sEAynBI,sBAAqB,AACrB,UAAU,CACV,AA3nBJ,oEA+nBI,sBAAqB,AACrB,aAAa,CACb","file":"tabulator_midnight.min.css","sourcesContent":["/* Tabulator v3.3.1 (c) Oliver Folkerd */\n\n\r\n//Main Theme Variables\r\n$backgroundColor: #222; //background color of tabulator\r\n$borderColor:#333; //border to tablulator\r\n$textSize:14px; //table text size\r\n\r\n//header themeing\r\n$headerBackgroundColor:#333; //border to tablulator\r\n$headerTextColor:#fff; //header text colour\r\n$headerBorderColor:#aaa; //header border color\r\n$headerSeperatorColor:#999; //header bottom seperator color\r\n$headerMargin:4px; //padding round header\r\n\r\n//column header arrows\r\n$sortArrowActive: #666;\r\n$sortArrowInactive: #bbb;\r\n\r\n//row themeing\r\n$rowBackgroundColor:#666; //table row background color\r\n$rowAltBackgroundColor:#444; //table row background color\r\n$rowBorderColor:#888; //table border color\r\n$rowTextColor:#fff; //table text color\r\n$rowHoverBackground:#999; //row background color on hover\r\n\r\n$rowSelectedBackground: #000; //row background color when selected\r\n$rowSelectedBackgroundHover: #888;//row background color when selected and hovered\r\n\r\n$editBoxColor:#999; //border color for edit boxes\r\n$errorColor:#dd0000; //error indication\r\n\r\n//footer themeing\r\n$footerBackgroundColor:#333; //border to tablulator\r\n$footerTextColor:#333; //footer text colour\r\n$footerBorderColor:#aaa; //footer border color\r\n$footerSeperatorColor:#999; //footer bottom seperator color\r\n\r\n\r\n\r\n//Tabulator Containing Element\r\n.tabulator{\r\n\tposition: relative;\r\n\tborder: 1px solid $borderColor;\r\n\tbackground-color: $backgroundColor;\r\n\toverflow:hidden;\r\n\tfont-size:$textSize;\r\n\ttext-align: left;\r\n\r\n\t-webkit-transform: translatez(0);\r\n\t-moz-transform: translatez(0);\r\n\t-ms-transform: translatez(0);\r\n\t-o-transform: translatez(0);\r\n\ttransform: translatez(0);\r\n\r\n\t&[tabulator-layout=\"fitDataFill\"]{\r\n\t\t.tabulator-tableHolder{\r\n\t\t\t.tabulator-table{\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&.tabulator-block-select{\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t//column header containing element\r\n\t.tabulator-header{\r\n\t\tposition:relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\twidth:100%;\r\n\r\n\t\tborder-bottom:1px solid $headerSeperatorColor;\r\n\t\tbackground-color: $headerBackgroundColor;\r\n\t\tcolor: $headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:hidden;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t//individual column header element\r\n\t\t.tabulator-col{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition:relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-right:1px solid $headerBorderColor;\r\n\t\t\tbackground-color: $headerBackgroundColor;\r\n\t\t\ttext-align:left;\r\n\t\t\tvertical-align: bottom;\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&.tabulator-moving{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tborder:1px solid $headerSeperatorColor;\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%);\r\n\t\t\t\tpointer-events: none;\r\n\t\t\t}\r\n\r\n\t\t\t//hold content of column header\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding:4px;\r\n\r\n\t\t\t\t//hold title of column header\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\twhite-space: nowrap;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\t\tvertical-align:bottom;\r\n\r\n\t\t\t\t\t//element to hold title editor\r\n\t\t\t\t\t.tabulator-title-editor{\r\n\t\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\tborder:1px solid #999;\r\n\r\n\t\t\t\t\t\tpadding:1px;\r\n\r\n\t\t\t\t\t\tbackground: #444;\r\n\t\t\t\t\t\tcolor: #fff;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:9px;\r\n\t\t\t\t\tright:8px;\r\n\t\t\t\t\twidth: 0;\r\n\t\t\t\t\theight: 0;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t//complex header column group\r\n\t\t\t&.tabulator-col-group{\r\n\r\n\t\t\t\t//gelement to hold sub columns in column group\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tposition:relative;\r\n\t\t\t\t\tdisplay: flex;\r\n\r\n\t\t\t\t\tborder-top:1px solid $headerBorderColor;\r\n\t\t\t\t\toverflow: hidden;\r\n\r\n\t\t\t\t\t.tabulator-col:last-child{\r\n\t\t\t\t\t\tmargin-right:-1px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//placeholder element for sortable columns\r\n\t\t\t&.ui-sortable-helper{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tbackground-color: darken($headerBackgroundColor, 10%) !important;\r\n\t\t\t\tborder:1px solid $headerBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t//header filter containing element\r\n\t\t\t.tabulator-header-filter{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\tmargin-top:2px;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\ttext-align: center;\r\n\r\n\t\t\t\t//styling adjustment for inbuilt editors\r\n\t\t\t\ttextarea{\r\n\t\t\t\t\theight:auto !important;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsvg{\r\n\t\t\t\t\tmargin-top: 3px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinput, select{\r\n\t\t\t\t\tborder:1px solid #999;\r\n\t\t\t\t\tbackground: #444;\r\n\t\t\t\t\tcolor: #fff;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//styling child elements for sortable columns\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:25px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t&[aria-sort=\"none\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"desc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\tborder-bottom: none;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\t// background-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tmin-width:200%;\r\n\r\n\t\t\tbackground:darken($headerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $headerBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\r\n\r\n\t}\r\n\r\n\t//scrolling element to hold table\r\n\t.tabulator-tableHolder{\r\n\t\tposition:relative;\r\n\t\twidth:100%;\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:auto;\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\r\n\t\t&:focus{\r\n\t\t\toutline: none;\r\n\t\t}\r\n\r\n\t\t//default placeholder element\r\n\t\t.tabulator-placeholder{\r\n\t\t\tposition: absolute;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\ttop:0;\r\n\t\t\tleft:0;\r\n\t\t\theight:100%;\r\n\t\t\twidth:100%;\r\n\r\n\t\t\tspan{\r\n\t\t\t\tdisplay: inline-block;\r\n\r\n\t\t\t\tmargin:0 auto;\r\n\t\t\t\tpadding:10px;\r\n\r\n\t\t\t\tcolor:#eee;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tfont-size: 20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//element to hold table rows\r\n\t\t.tabulator-table{\r\n\t\t\tposition:relative;\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tbackground-color:$rowBackgroundColor;\r\n\t\t\twhite-space: nowrap;\r\n\t\t\toverflow:visible;\r\n\t\t\tcolor:$rowTextColor;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\t&.tabulator-calcs{\r\n\t\t\t\t\tfont-weight: bold;\r\n\t\t\t\t\tbackground:darken($rowAltBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t\t&.tabulator-calcs-top{\r\n\t\t\t\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-calcs-bottom{\r\n\t\t\t\t\t\tborder-top:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//row element\r\n\t.tabulator-row{\r\n\t\tposition: relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\tmin-height:$textSize + ($headerMargin * 2);\r\n\t\tbackground-color: $rowBackgroundColor;\r\n\r\n\t\t&:nth-child(even){\r\n\t\t\tbackground-color: $rowAltBackgroundColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-selectable:hover{\r\n\t\t\tbackground-color:$rowHoverBackground;\r\n\t\t\tcursor: pointer;\r\n\t\t}\r\n\r\n\t\t&.tabulator-selected{\r\n\t\t\tbackground-color:$rowSelectedBackground;\r\n\t\t}\r\n\r\n\t\t&.tabulator-selected:hover{\r\n\t\t\tbackground-color:$rowSelectedBackgroundHover;\r\n\t\t\tcursor: pointer;\r\n\t\t}\r\n\r\n\t\t&.tabulator-moving{\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t\tpointer-events: none !important;\r\n\t\t\tz-index:15;\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\tbackground-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t//cell element\r\n\t\t.tabulator-cell{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition: relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tpadding:4px;\r\n\t\t\tborder-right:1px solid $rowBorderColor;\r\n\t\t\tvertical-align:middle;\r\n\t\t\twhite-space:nowrap;\r\n\t\t\toverflow:hidden;\r\n\t\t\ttext-overflow:ellipsis;\r\n\r\n\r\n\t\t\t&.tabulator-editing{\r\n\t\t\t\tborder:1px solid $editBoxColor;\r\n\t\t\t\tpadding: 0;\r\n\r\n\t\t\t\tinput, select{\r\n\t\t\t\t\tborder:1px;\r\n\t\t\t\t\tbackground:transparent;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-validation-fail{\r\n\t\t\t\tborder:1px solid $errorColor;\r\n\t\t\t\tinput, select{\r\n\t\t\t\t\tborder:1px;\r\n\t\t\t\t\tbackground:transparent;\r\n\r\n\t\t\t\t\tcolor: $errorColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//movable row handle\r\n\t\t\t&.tabulator-row-handle{\r\n\r\n\t\t\t\tdisplay: inline-flex;\r\n\t\t\t\talign-items:center;\r\n\r\n\t\t\t\t-moz-user-select: none;\r\n\t\t\t\t-khtml-user-select: none;\r\n\t\t\t\t-webkit-user-select: none;\r\n\t\t\t\t-o-user-select: none;\r\n\r\n\t\t\t\t//handle holder\r\n\t\t\t\t.tabulator-row-handle-box{\r\n\t\t\t\t\twidth:80%;\r\n\r\n\t\t\t\t\t//Hamburger element\r\n\t\t\t\t\t.tabulator-row-handle-bar{\r\n\t\t\t\t\t\twidth:100%;\r\n\t\t\t\t\t\theight:3px;\r\n\t\t\t\t\t\tmargin:2px 10% 0 10%;\r\n\t\t\t\t\t\tbackground:#666;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t//row grouping element\r\n\t\t&.tabulator-group{\r\n\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-bottom:1px solid #999;\r\n\t\t\tborder-right:1px solid $rowBorderColor;\r\n\t\t\tborder-top:1px solid #999;\r\n\t\t\tpadding:5px;\r\n\t\t\tpadding-left:10px;\r\n\t\t\tbackground:#ccc;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tcolor:#333;\r\n\r\n\t\t\tmin-width: 100%;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tbackground-color:rgba(0,0,0,.1);\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-visible{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-right:10px;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\tborder-bottom: 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-level-1{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-left:20px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-level-2{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-left:40px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-level-3{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-left:60px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-level-4{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-left:80px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-level-5{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-left:1000px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//sorting arrow\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tdisplay: inline-block;\r\n\t\t\t\twidth: 0;\r\n\t\t\t\theight: 0;\r\n\t\t\t\tmargin-right:16px;\r\n\t\t\t\tborder-top: 6px solid transparent;\r\n\t\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\t\tborder-right: 0;\r\n\t\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\t\tvertical-align:middle;\r\n\t\t\t}\r\n\r\n\t\t\tspan{\r\n\t\t\t\tmargin-left:10px;\r\n\t\t\t\tcolor:#666;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\ttop:0;\r\n\t\tbottom:0;\r\n\t\twidth:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\tleft:0;\r\n\t\t\tright:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ew-resize;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//footer element\r\n\t.tabulator-footer{\r\n\t\tpadding:5px 10px;\r\n\t\tborder-top:1px solid $footerSeperatorColor;\r\n\t\tbackground-color: $footerBackgroundColor;\r\n\t\ttext-align:right;\r\n\t\tcolor: $footerTextColor;\r\n\t\tfont-weight:bold;\r\n\t\twhite-space:nowrap;\r\n\t\tuser-select:none;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\twidth:calc(\"100% + 20px\");\r\n\t\t\tmargin:-5px -10px 5px -10px;\r\n\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\tbackground:darken($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:darken($footerBackgroundColor, 5%) !important;\r\n\t\t\t\tcolor:$headerTextColor;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-bottom:1px solid $rowBorderColor;\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&:only-child{\r\n\t\t\t\tmargin-bottom:-5px;\r\n\t\t\t\tborder-bottom:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-pages{\r\n\t\t\tmargin:0 7px;\r\n\t\t}\r\n\r\n\t\t//pagination button\r\n\t\t.tabulator-page{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tmargin:0 2px;\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\t\t\tpadding:2px 5px;\r\n\t\t\tbackground:rgba(255,255,255,.2);\r\n\t\t\tcolor: $footerTextColor;\r\n\t\t\tfont-family:inherit;\r\n\t\t\tfont-weight:inherit;\r\n\t\t\tfont-size:inherit;\r\n\r\n\t\t\t&.active{\r\n\t\t\t\tcolor:#fff;\r\n\t\t\t}\r\n\r\n\t\t\t&:disabled{\r\n\t\t\t\topacity:.5;\r\n\t\t\t}\r\n\r\n\t\t\t&:not(.disabled){\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground:rgba(0,0,0,.2);\r\n\t\t\t\t\tcolor:#fff;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//holding div that contains loader and covers tabulator element to prevent interaction\r\n\t.tablulator-loader{\r\n\t\tposition:absolute;\r\n\t\tdisplay: flex;\r\n\t\talign-items:center;\r\n\r\n\t\ttop:0;\r\n\t\tleft:0;\r\n\t\tz-index:100;\r\n\r\n\t\theight:100%;\r\n\t\twidth:100%;\r\n\t\tbackground:rgba(0,0,0,.4);\r\n\t\ttext-align:center;\r\n\r\n\t\t//loading message element\r\n\t\t.tabulator-loader-msg{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 auto;\r\n\t\t\tpadding:10px 20px;\r\n\r\n\t\t\tborder-radius:10px;\r\n\r\n\t\t\tbackground:#fff;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:16px;\r\n\r\n\t\t\t//loading message\r\n\t\t\t&.tabulator-loading{\r\n\t\t\t\tborder:4px solid #333;\r\n\t\t\t\tcolor:#000;\r\n\t\t\t}\r\n\r\n\t\t\t//error message\r\n\t\t\t&.tabulator-error{\r\n\t\t\t\tborder:4px solid #D00;\r\n\t\t\t\tcolor:#590000;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}"]} \ No newline at end of file diff --git a/css/tabulator/tabulator_modern.css b/css/tabulator/tabulator_modern.css new file mode 100644 index 0000000..15e9099 --- /dev/null +++ b/css/tabulator/tabulator_modern.css @@ -0,0 +1,562 @@ +/* Tabulator v3.3.1 (c) Oliver Folkerd */ +.tabulator { + position: relative; + border: 1px solid #fff; + background-color: #fff; + overflow: hidden; + font-size: 16px; + text-align: left; + -ms-transform: translatez(0); + transform: translatez(0); +} + +.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { + min-width: 100%; +} + +.tabulator.tabulator-block-select { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator .tabulator-header { + position: relative; + box-sizing: border-box; + width: 100%; + border-bottom: 3px solid #3759D7; + margin-bottom: 4px; + background-color: #fff; + color: #3759D7; + font-weight: bold; + white-space: nowrap; + overflow: hidden; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + padding-left: 10px; + font-size: 1.1em; +} + +.tabulator .tabulator-header .tabulator-col { + display: inline-block; + position: relative; + box-sizing: border-box; + border-right: 2px solid #fff; + background-color: #fff; + text-align: left; + vertical-align: bottom; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-moving { + position: absolute; + border: 1px solid #3759D7; + background: #e6e6e6; + pointer-events: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content { + position: relative; + padding: 4px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { + box-sizing: border-box; + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + vertical-align: bottom; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { + box-sizing: border-box; + width: 100%; + border: 1px solid #3759D7; + padding: 1px; + background: #fff; + font-size: 1em; + color: #3759D7; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + display: inline-block; + position: absolute; + top: 9px; + right: 8px; + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #b7c3f1; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + position: relative; + display: -ms-flexbox; + display: flex; + border-top: 2px solid #3759D7; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { + position: absolute; + background-color: #e6e6e6 !important; + border: 1px solid #fff; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { + position: relative; + box-sizing: border-box; + margin-top: 2px; + width: 100%; + text-align: center; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { + height: auto !important; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { + margin-top: 3px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 25px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { + cursor: pointer; + background-color: #e6e6e6; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #b7c3f1; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #3759D7; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { + border-top: 6px solid #3759D7; + border-bottom: none; +} + +.tabulator .tabulator-header .tabulator-frozen { + display: inline-block; + position: absolute; + z-index: 10; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { + padding-left: 10px; + border-right: 2px solid #fff; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #fff; +} + +.tabulator .tabulator-header .tabulator-calcs-holder { + box-sizing: border-box; + min-width: 200%; + border-top: 2px solid #3759D7 !important; + background: white !important; + border-top: 1px solid #fff; + border-bottom: 1px solid #fff; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { + padding-left: 0 !important; + background: white !important; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-cell { + background: none; +} + +.tabulator .tabulator-tableHolder { + position: relative; + width: 100%; + white-space: nowrap; + overflow: auto; + -webkit-overflow-scrolling: touch; +} + +.tabulator .tabulator-tableHolder:focus { + outline: none; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder { + position: absolute; + box-sizing: border-box; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + top: 0; + left: 0; + height: 100%; + width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder span { + display: inline-block; + margin: 0 auto; + padding: 10px; + color: #3759D7; + font-weight: bold; + font-size: 20px; +} + +.tabulator .tabulator-tableHolder .tabulator-table { + position: relative; + display: inline-block; + background-color: #f3f3f3; + white-space: nowrap; + overflow: visible; + color: #333; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { + font-weight: bold; + background: #f2f2f2 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { + border-bottom: 2px solid #3759D7; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { + border-top: 2px solid #3759D7; +} + +.tabulator .tabulator-row { + position: relative; + box-sizing: border-box; + box-sizing: border-box; + min-height: 24px; + background-color: #3759D7; + padding-left: 10px !important; + margin-bottom: 2px; +} + +.tabulator .tabulator-row:nth-child(even) { + background-color: #627ce0; +} + +.tabulator .tabulator-row:nth-child(even) .tabulator-cell { + background-color: #fff; +} + +.tabulator .tabulator-row.tabulator-selectable:hover { + cursor: pointer; +} + +.tabulator .tabulator-row.tabulator-selectable:hover .tabulator-cell { + background-color: #bbb; +} + +.tabulator .tabulator-row.tabulator-selected .tabulator-cell { + background-color: #9ABCEA; +} + +.tabulator .tabulator-row.tabulator-selected:hover .tabulator-cell { + background-color: #769BCC; + cursor: pointer; +} + +.tabulator .tabulator-row.tabulator-moving { + position: absolute; + border-top: 1px solid #fff; + border-bottom: 1px solid #fff; + pointer-events: none !important; + z-index: 15; +} + +.tabulator .tabulator-row .tabulator-frozen { + display: inline-block; + position: absolute; + background-color: inherit; + z-index: 10; +} + +.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-left { + padding-left: 10px; + border-right: 2px solid #fff; +} + +.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #fff; +} + +.tabulator .tabulator-row .tabulator-cell { + display: inline-block; + position: relative; + box-sizing: border-box; + padding: 6px 4px; + border-right: 2px solid #fff; + vertical-align: middle; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + background-color: #f3f3f3; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-editing { + border: 1px solid #1D68CD; + padding: 0; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-editing input, .tabulator .tabulator-row .tabulator-cell.tabulator-editing select { + border: 1px; + background: transparent; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail { + border: 1px solid #dd0000; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail select { + border: 1px; + background: transparent; + color: #dd0000; +} + +.tabulator .tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { + width: 80%; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { + width: 100%; + height: 3px; + margin: 2px 10% 0 10%; + background: #666; +} + +.tabulator .tabulator-row.tabulator-group { + box-sizing: border-box; + border-bottom: 2px solid #3759D7; + border-top: 2px solid #3759D7; + padding: 5px; + padding-left: 10px; + background: #8ca0e8; + font-weight: bold; + color: fff; + margin-bottom: 2px; + min-width: 100%; +} + +.tabulator .tabulator-row.tabulator-group:hover { + cursor: pointer; + background-color: rgba(0, 0, 0, 0.1); +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #3759D7; + border-bottom: 0; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow { + margin-left: 20px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow { + margin-left: 40px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow { + margin-left: 60px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow { + margin-left: 80px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow { + margin-left: 1000px; +} + +.tabulator .tabulator-row.tabulator-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #3759D7; + vertical-align: middle; +} + +.tabulator .tabulator-row.tabulator-group span { + margin-left: 10px; + color: #3759D7; +} + +.tabulator .tabulator-col-resize-handle { + position: absolute; + right: 0; + top: 0; + bottom: 0; + width: 5px; +} + +.tabulator .tabulator-col-resize-handle.prev { + left: 0; + right: auto; +} + +.tabulator .tabulator-col-resize-handle:hover { + cursor: ew-resize; +} + +.tabulator .tabulator-footer { + padding: 5px 10px; + border-top: 1px solid #999; + background-color: #fff; + text-align: right; + color: #3759D7; + font-weight: bold; + white-space: nowrap; + -ms-user-select: none; + user-select: none; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder { + box-sizing: border-box; + width: calc("100% + 20px"); + margin: -5px -10px 5px -10px; + text-align: left; + background: white !important; + border-top: 3px solid #3759D7 !important; + border-bottom: 2px solid #3759D7 !important; + border-bottom: 1px solid #fff; + border-top: 1px solid #fff; + overflow: hidden; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { + background: white !important; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-cell { + background: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { + margin-bottom: -5px; + border-bottom: none; + border-bottom: none !important; +} + +.tabulator .tabulator-footer .tabulator-pages { + margin: 0 7px; +} + +.tabulator .tabulator-footer .tabulator-page { + display: inline-block; + margin: 0 2px; + border: 1px solid #aaa; + border-radius: 3px; + padding: 2px 5px; + background: rgba(255, 255, 255, 0.2); + color: #3759D7; + font-family: inherit; + font-weight: inherit; + font-size: inherit; +} + +.tabulator .tabulator-footer .tabulator-page.active { + color: #3759D7; +} + +.tabulator .tabulator-footer .tabulator-page:disabled { + opacity: .5; +} + +.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); + color: #fff; +} + +.tabulator .tablulator-loader { + position: absolute; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + top: 0; + left: 0; + z-index: 100; + height: 100%; + width: 100%; + background: rgba(0, 0, 0, 0.4); + text-align: center; +} + +.tabulator .tablulator-loader .tabulator-loader-msg { + display: inline-block; + margin: 0 auto; + padding: 10px 20px; + border-radius: 10px; + background: #fff; + font-weight: bold; + font-size: 16px; +} + +.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-loading { + border: 4px solid #333; + color: #000; +} + +.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-error { + border: 4px solid #D00; + color: #590000; +} diff --git a/css/tabulator/tabulator_modern.min.css b/css/tabulator/tabulator_modern.min.css new file mode 100644 index 0000000..200bdd0 --- /dev/null +++ b/css/tabulator/tabulator_modern.min.css @@ -0,0 +1,3 @@ +/* Tabulator v3.3.1 (c) Oliver Folkerd */ +.tabulator{position:relative;border:1px solid #fff;background-color:#fff;overflow:hidden;font-size:16px;text-align:left;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator.tabulator-block-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{width:100%;border-bottom:3px solid #3759d7;margin-bottom:4px;color:#3759d7;font-weight:700;white-space:nowrap;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;padding-left:10px;font-size:1.1em}.tabulator .tabulator-header,.tabulator .tabulator-header .tabulator-col{position:relative;box-sizing:border-box;background-color:#fff;overflow:hidden}.tabulator .tabulator-header .tabulator-col{display:inline-block;border-right:2px solid #fff;text-align:left;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #3759d7;background:#e6e6e6;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{position:relative;padding:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #3759d7;padding:1px;background:#fff;font-size:1em;color:#3759d7}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:9px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #b7c3f1}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:2px solid #3759d7;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#e6e6e6!important;border:1px solid #fff}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#e6e6e6}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #b7c3f1}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #3759d7}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #3759d7;border-bottom:none}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:1}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{padding-left:10px;border-right:2px solid #fff}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #fff}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:200%;border-top:2px solid #3759d7!important;background:#fff!important;border-top:1px solid #fff;border-bottom:1px solid #fff;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{padding-left:0!important;background:#fff!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-cell{background:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{position:absolute;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;height:100%;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#3759d7;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#f3f3f3;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#f2f2f2!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #3759d7}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #3759d7}.tabulator .tabulator-row{position:relative;box-sizing:border-box;min-height:24px;background-color:#3759d7;padding-left:10px!important;margin-bottom:2px}.tabulator .tabulator-row:nth-child(2n){background-color:#627ce0}.tabulator .tabulator-row:nth-child(2n) .tabulator-cell{background-color:#fff}.tabulator .tabulator-row.tabulator-selectable:hover{cursor:pointer}.tabulator .tabulator-row.tabulator-selectable:hover .tabulator-cell{background-color:#bbb}.tabulator .tabulator-row.tabulator-selected .tabulator-cell{background-color:#9abcea}.tabulator .tabulator-row.tabulator-selected:hover .tabulator-cell{background-color:#769bcc;cursor:pointer}.tabulator .tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #fff;border-bottom:1px solid #fff;pointer-events:none!important;z-index:2}.tabulator .tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:1}.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-left{padding-left:10px;border-right:2px solid #fff}.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #fff}.tabulator .tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:6px 4px;border-right:2px solid #fff;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background-color:#f3f3f3}.tabulator .tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;padding:0}.tabulator .tabulator-row .tabulator-cell.tabulator-editing input,.tabulator .tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator .tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin:2px 10% 0;background:#666}.tabulator .tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:2px solid #3759d7;border-top:2px solid #3759d7;padding:5px;padding-left:10px;background:#8ca0e8;font-weight:700;color:fff;margin-bottom:2px;min-width:100%}.tabulator .tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator .tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #3759d7;border-bottom:0}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow{margin-left:20px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow{margin-left:40px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow{margin-left:60px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow{margin-left:80px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow{margin-left:1000px}.tabulator .tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #3759d7;vertical-align:middle}.tabulator .tabulator-row.tabulator-group span{margin-left:10px;color:#3759d7}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-footer{padding:5px 10px;border-top:1px solid #999;background-color:#fff;text-align:right;color:#3759d7;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc("100% + 20px");margin:-5px -10px 5px;text-align:left;background:#fff!important;border-top:3px solid #3759d7!important;border-bottom:2px solid #3759d7!important;border-bottom:1px solid #fff;border-top:1px solid #fff;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#fff!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-cell{background:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none;border-bottom:none!important}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;border:1px solid #aaa;border-radius:3px;padding:2px 5px;background:hsla(0,0%,100%,.2);color:#3759d7;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page.active{color:#3759d7}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tablulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:3;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tablulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000} +/*# sourceMappingURL=tabulator_modern.min.css.map */ diff --git a/css/tabulator/tabulator_modern.min.css.map b/css/tabulator/tabulator_modern.min.css.map new file mode 100644 index 0000000..a1d00ff --- /dev/null +++ b/css/tabulator/tabulator_modern.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["tabulator_modern.scss"],"names":[],"mappings":"AA8CA,WACC,kBAAkB,AAClB,sBAzCgB,AA0ChB,sBA3CqB,AA4CrB,gBAAe,AACf,eA3Ca,AA4Cb,gBAAgB,AAMhB,uBAAwB,CAypBxB,AArqBD,iFAiBI,cAAc,CACd,AAlBJ,kCAuBE,yBAAiB,AAAjB,sBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AAxBF,6BA+BE,WAAU,AAEV,gCA5Ee,AA6Ef,kBAAiB,AAEjB,cA/Ee,AAgFf,gBAAgB,AAEhB,mBAAmB,AAGnB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,oBAAoB,AAEpB,kBArDe,AAuDf,eAAgB,CAsMhB,AAvPF,yEA4BE,kBAAiB,AACjB,sBAAsB,AAMtB,sBAtEyB,AA2EzB,eAAe,CAxCjB,AAuMG,4CAlJA,qBAAoB,AAGpB,4BAzFoB,AA2FpB,gBAAe,AACf,qBAAsB,CA4ItB,AAvMH,6DA+DI,kBAAkB,AAClB,yBA3Ga,AA4Gb,mBAA8C,AAC9C,mBAAoB,CACpB,AAnEJ,mEAuEI,kBAAkB,AAClB,WAAW,CAyCX,AAjHJ,wFA4EK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAgBrB,AAlGL,gHAsFM,sBAAsB,AACtB,WAAW,AAEX,yBApIW,AAsIX,YAAW,AAEX,gBAAgB,AAEhB,cAAc,AACd,aA3IW,CA4IX,AAjGN,oFAsGK,qBAAqB,AACrB,kBAAkB,AAClB,QAAO,AACP,UAAS,AACT,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,+BAzIqC,CA0IrC,AA/GL,0FAwHK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,6BAtKY,AAuKZ,eAAgB,CAKhB,AAjIL,oHA+HM,iBAAiB,CACjB,AAhIN,0FAwIK,YAAa,CACb,AAzIL,+DA8II,kBAAkB,AAClB,mCAAgE,AAChE,qBAjLmB,CAkLnB,AAjJJ,qEAqJI,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAUlB,AAnKJ,8EA6JK,qBAAsB,CACtB,AA9JL,yEAiKK,cAAe,CACf,AAlKL,oFAwKK,kBAAkB,CAClB,AAzKL,qEA4KK,eAAc,AACd,wBAAoD,CACpD,AA9KL,uHAmLM,gBAAgB,AAChB,+BA/MoC,CAgNpC,AArLN,sHA0LM,gBAAgB,AAChB,+BAtOW,CAuOX,AA5LN,uHAiMM,6BA5OW,AA6OX,kBAAmB,CACnB,AAnMN,+CA0MG,qBAAqB,AACrB,kBAAkB,AAIlB,SAAW,CAWX,AA1NH,qEAkNI,kBAxNa,AA0Nb,2BA1OgB,CA2OhB,AArNJ,sEAwNI,0BA9OgB,CA+OhB,AAzNJ,qDA6NG,sBAAqB,AACrB,eAAc,AAEd,uCAAqD,AAErD,0BAAyD,AAgBzD,0BAxQiB,AAyQjB,6BApRoB,AAsRpB,eAAgB,CAChB,AAtPH,oEAqOI,yBAA0B,AAE1B,yBAAyD,CASzD,AAhPJ,iGA0OK,YAAa,CACb,AA3OL,oFA8OK,eAAe,CACf,AA/OL,kCA2PE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CAsDjC,AArTF,wCAkQG,YAAa,CACb,AAnQH,yDAuQG,kBAAkB,AAClB,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,YAAW,AACX,UAAU,CAYV,AA3RH,8DAkRI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,cAlUa,AAmUb,gBAAiB,AACjB,cAAe,CACf,AA1RJ,mDA+RG,kBAAiB,AACjB,qBAAoB,AACpB,yBAzTwB,AA0TxB,mBAAmB,AACnB,iBAAgB,AAChB,UAzTe,CAyUf,AApTH,kFAwSK,gBAAiB,AACjB,4BAAwD,CASxD,AAlTL,sGA4SM,+BAvVW,CAwVX,AA7SN,yGAgTM,4BA3VW,CA4VX,AAjTN,0BAyTE,kBAAkB,AAGlB,sBAAsB,AACtB,gBAA0C,AAE1C,yBA1We,AA4Wf,4BAAqC,AAErC,iBAAkB,CA6MlB,AAhhBF,wCAsUG,wBA1UoC,CA+UpC,AA3UH,wDAyUI,qBAhWuB,CAiWvB,AA1UJ,qDA8UG,cAAe,CAKf,AAnVH,qEAiVI,qBArWoB,CAsWpB,AAlVJ,6DAuVI,wBAzW2B,CA0W3B,AAxVJ,mEA6VI,yBA9WgC,AA+WhC,cAAe,CACf,AA/VJ,2CAmWG,kBAAkB,AAElB,0BA3XiB,AA4XjB,6BA5XiB,AA8XjB,8BAA+B,AAC/B,SAAU,CACV,AA1WH,4CA6WG,qBAAqB,AACrB,kBAAkB,AAElB,yBAAyB,AAEzB,SAAW,CAUX,AA5XH,kEAqXI,kBA3Xa,AA4Xb,2BA5YgB,CA6YhB,AAvXJ,mEA0XI,0BAhZgB,CAiZhB,AA3XJ,0CAgYG,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,gBAAe,AACf,4BA1ZiB,AA2ZjB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,uBAAsB,AAEtB,wBAlawB,CAudxB,AA/bH,4DA6YI,yBA5ZiB,AA6ZjB,SAAU,CAMV,AApZJ,qIAiZK,WAAU,AACV,sBAAsB,CACtB,AAnZL,oEAuZI,qBArae,CA4af,AA9ZJ,qJAyZK,WAAU,AACV,uBAAsB,AAEtB,UA1ac,CA2ad,AA7ZL,wFAmaK,YAAa,CACb,AApaL,+DA0aI,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAElB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AA9bJ,yFAobK,SAAS,CAST,AA7bL,mHAwbM,WAAU,AACV,WAAU,AACV,iBAAoB,AACpB,eAAe,CACf,AA5bN,0CAocG,sBAAqB,AACrB,gCAhfc,AAifd,6BAjfc,AAkfd,YAAW,AACX,kBAAiB,AACjB,mBAAiC,AACjC,gBAAgB,AAChB,UAAS,AACT,kBAAkB,AAElB,cAAe,CAiEf,AA/gBH,gDAidI,eAAc,AACd,+BAA+B,CAC/B,AAndJ,mFAwdK,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,6BAtgBY,AAugBZ,eAAgB,CAChB,AA7dL,mFAkeK,gBAAgB,CAChB,AAneL,mFAweK,gBAAgB,CAChB,AAzeL,mFA8eK,gBAAgB,CAChB,AA/eL,mFAofK,gBAAgB,CAChB,AArfL,mFA0fK,kBAAkB,CAClB,AA3fL,2DAggBI,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,8BAljBa,AAmjBb,qBAAqB,CACrB,AAzgBJ,+CA4gBI,iBAAgB,AAChB,aAxjBa,CAyjBb,AA9gBJ,wCAmhBE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AAjiBF,6CA0hBG,OAAM,AACN,UAAU,CACV,AA5hBH,8CA+hBG,gBAAgB,CAChB,AAhiBH,6BAsiBE,iBAAgB,AAChB,0BA/iBwB,AAgjBxB,sBAnjByB,AAojBzB,iBAAgB,AAChB,cArlBe,AAslBf,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAwEpB,AA1nBF,qDAqjBG,sBAAqB,AACrB,0BAAyB,AACzB,sBAA2B,AAE3B,gBAAgB,AAEhB,0BAAyD,AAEzD,uCAAqD,AACrD,0CAAwD,AAcxD,6BAlmBiB,AAmmBjB,0BAnmBiB,AAqmBjB,eAAgB,CAOhB,AAtlBH,oEAikBI,yBAAyD,CASzD,AA1kBJ,iGAokBK,YAAa,CACb,AArkBL,oFAwkBK,eAAe,CACf,AAzkBL,gEAklBI,mBAAkB,AAClB,mBAAkB,AAClB,4BAA6B,CAC7B,AArlBJ,8CA0lBG,YAAY,CACZ,AA3lBH,6CA+lBG,qBAAoB,AACpB,aAAY,AACZ,sBA1mBoB,AA2mBpB,kBAAiB,AACjB,gBAAe,AACf,8BAA+B,AAC/B,cAhpBc,AAipBd,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CAiBjB,AAznBH,oDA2mBI,aAtpBa,CAupBb,AA5mBJ,sDA+mBI,UAAU,CACV,AAhnBJ,kEAonBK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AAvnBL,8BA8nBE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,UAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AApqBF,oDA6oBG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AAnqBH,sEA0pBI,sBAAqB,AACrB,UAAU,CACV,AA5pBJ,oEAgqBI,sBAAqB,AACrB,aAAa,CACb","file":"tabulator_modern.min.css","sourcesContent":["/* Tabulator v3.3.1 (c) Oliver Folkerd */\n\n\r\n$primary: #3759D7; //the base text color from which the rest of the theme derives\r\n\r\n//Main Theme Variables\r\n$backgroundColor: #fff; //background color of tabulator\r\n$borderColor:#fff; //border to tablulator\r\n$textSize:16px; //table text size\r\n\r\n//header themeing\r\n$headerBackgroundColor:#fff; //border to tablulator\r\n$headerTextColor:$primary; //header text colour\r\n$headerBorderColor:#fff; //header border color\r\n$headerSeperatorColor:$primary; //header bottom seperator color\r\n$headerMargin:4px; //padding round header\r\n\r\n//column header arrows\r\n$sortArrowActive: $primary;\r\n$sortArrowInactive: lighten($primary, 30%);\r\n\r\n//row themeing\r\n$rowBackgroundColor:#f3f3f3; //table row background color\r\n$rowAltBackgroundColor:#fff; //table row background color\r\n$rowBorderColor:#fff; //table border color\r\n$rowTextColor:#333; //table text color\r\n$rowHoverBackground:#bbb; //row background color on hover\r\n\r\n$rowSelectedBackground: #9ABCEA; //row background color when selected\r\n$rowSelectedBackgroundHover: #769BCC;//row background color when selected and hovered\r\n\r\n$editBoxColor:#1D68CD; //border color for edit boxes\r\n$errorColor:#dd0000; //error indication\r\n\r\n//footer themeing\r\n$footerBackgroundColor:#fff; //border to tablulator\r\n$footerTextColor:$primary; //footer text colour\r\n$footerBorderColor:#aaa; //footer border color\r\n$footerSeperatorColor:#999; //footer bottom seperator color\r\n\r\n$handleWidth:10px; //width of the row handle\r\n$handleColor: $primary; //color for odd numbered rows\r\n$handleColorAlt: lighten($primary, 10%); //color for even numbered rows\r\n\r\n\r\n//Tabulator Containing Element\r\n.tabulator{\r\n\tposition: relative;\r\n\tborder: 1px solid $borderColor;\r\n\tbackground-color: $backgroundColor;\r\n\toverflow:hidden;\r\n\tfont-size:$textSize;\r\n\ttext-align: left;\r\n\r\n\t-webkit-transform: translatez(0);\r\n\t-moz-transform: translatez(0);\r\n\t-ms-transform: translatez(0);\r\n\t-o-transform: translatez(0);\r\n\ttransform: translatez(0);\r\n\r\n\t&[tabulator-layout=\"fitDataFill\"]{\r\n\t\t.tabulator-tableHolder{\r\n\t\t\t.tabulator-table{\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&.tabulator-block-select{\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t//column header containing element\r\n\t.tabulator-header{\r\n\t\tposition:relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\twidth:100%;\r\n\r\n\t\tborder-bottom:3px solid $headerSeperatorColor;\r\n\t\tmargin-bottom:4px;\r\n\t\tbackground-color: $headerBackgroundColor;\r\n\t\tcolor: $headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:hidden;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\tpadding-left:$handleWidth;\r\n\r\n\t\tfont-size: 1.1em;\r\n\r\n\t\t//individual column header element\r\n\t\t.tabulator-col{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition:relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-right:2px solid $headerBorderColor;\r\n\t\t\tbackground-color: $headerBackgroundColor;\r\n\t\t\ttext-align:left;\r\n\t\t\tvertical-align: bottom;\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&.tabulator-moving{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tborder:1px solid $headerSeperatorColor;\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%);\r\n\t\t\t\tpointer-events: none;\r\n\t\t\t}\r\n\r\n\t\t\t//hold content of column header\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding:4px;\r\n\r\n\t\t\t\t//hold title of column header\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\twhite-space: nowrap;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\t\tvertical-align:bottom;\r\n\r\n\t\t\t\t\t//element to hold title editor\r\n\t\t\t\t\t.tabulator-title-editor{\r\n\t\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\tborder:1px solid $primary;\r\n\r\n\t\t\t\t\t\tpadding:1px;\r\n\r\n\t\t\t\t\t\tbackground: #fff;\r\n\r\n\t\t\t\t\t\tfont-size: 1em;\r\n\t\t\t\t\t\tcolor: $primary;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:9px;\r\n\t\t\t\t\tright:8px;\r\n\t\t\t\t\twidth: 0;\r\n\t\t\t\t\theight: 0;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t//complex header column group\r\n\t\t\t&.tabulator-col-group{\r\n\r\n\t\t\t\t//gelement to hold sub columns in column group\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tposition:relative;\r\n\t\t\t\t\tdisplay: flex;\r\n\r\n\t\t\t\t\tborder-top:2px solid $headerSeperatorColor;\r\n\t\t\t\t\toverflow: hidden;\r\n\r\n\t\t\t\t\t.tabulator-col:last-child{\r\n\t\t\t\t\t\tmargin-right:-1px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//placeholder element for sortable columns\r\n\t\t\t&.ui-sortable-helper{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tbackground-color: darken($headerBackgroundColor, 10%) !important;\r\n\t\t\t\tborder:1px solid $headerBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t//header filter containing element\r\n\t\t\t.tabulator-header-filter{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\tmargin-top:2px;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\ttext-align: center;\r\n\r\n\t\t\t\t//styling adjustment for inbuilt editors\r\n\t\t\t\ttextarea{\r\n\t\t\t\t\theight:auto !important;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsvg{\r\n\t\t\t\t\tmargin-top: 3px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//styling child elements for sortable columns\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:25px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t&[aria-sort=\"none\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"desc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\tborder-bottom: none;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\t// background-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tpadding-left: $handleWidth;\r\n\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tmin-width:200%;\r\n\r\n\t\t\tborder-top:2px solid $headerSeperatorColor !important;\r\n\r\n\t\t\tbackground:lighten($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tpadding-left: 0 !important;\r\n\r\n\t\t\t\tbackground:lighten($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-cell{\r\n\t\t\t\t\tbackground:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $headerBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\t}\r\n\r\n\t//scrolling element to hold table\r\n\t.tabulator-tableHolder{\r\n\t\tposition:relative;\r\n\t\twidth:100%;\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:auto;\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\r\n\t\t&:focus{\r\n\t\t\toutline: none;\r\n\t\t}\r\n\r\n\t\t//default placeholder element\r\n\t\t.tabulator-placeholder{\r\n\t\t\tposition: absolute;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\ttop:0;\r\n\t\t\tleft:0;\r\n\t\t\theight:100%;\r\n\t\t\twidth:100%;\r\n\r\n\t\t\tspan{\r\n\t\t\t\tdisplay: inline-block;\r\n\r\n\t\t\t\tmargin:0 auto;\r\n\t\t\t\tpadding:10px;\r\n\r\n\t\t\t\tcolor:$primary;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tfont-size: 20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//element to hold table rows\r\n\t\t.tabulator-table{\r\n\t\t\tposition:relative;\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tbackground-color:$rowBackgroundColor;\r\n\t\t\twhite-space: nowrap;\r\n\t\t\toverflow:visible;\r\n\t\t\tcolor:$rowTextColor;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\t&.tabulator-calcs{\r\n\t\t\t\t\tfont-weight: bold;\r\n\t\t\t\t\tbackground:darken($rowAltBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t\t&.tabulator-calcs-top{\r\n\t\t\t\t\t\tborder-bottom:2px solid $headerSeperatorColor;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-calcs-bottom{\r\n\t\t\t\t\t\tborder-top:2px solid $headerSeperatorColor;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//row element\r\n\t.tabulator-row{\r\n\t\tposition: relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\tbox-sizing: border-box;\r\n\t\tmin-height:$textSize + ($headerMargin * 2);\r\n\r\n\t\tbackground-color: $handleColor;\r\n\r\n\t\tpadding-left: $handleWidth !important;\r\n\r\n\t\tmargin-bottom: 2px;\r\n\r\n\t\t&:nth-child(even){\r\n\t\t\tbackground-color: $handleColorAlt;\r\n\r\n\t\t\t.tabulator-cell{\r\n\t\t\t\tbackground-color: $rowAltBackgroundColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-selectable:hover{\r\n\t\t\tcursor: pointer;\r\n\r\n\t\t\t.tabulator-cell{\r\n\t\t\t\tbackground-color:$rowHoverBackground;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-selected{\r\n\t\t\t.tabulator-cell{\r\n\t\t\t\tbackground-color:$rowSelectedBackground;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-selected:hover{\r\n\t\t\t.tabulator-cell{\r\n\t\t\t\tbackground-color:$rowSelectedBackgroundHover;\r\n\t\t\t\tcursor: pointer;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-moving{\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t\tpointer-events: none !important;\r\n\t\t\tz-index:15;\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\tbackground-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tpadding-left: $handleWidth;\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//cell element\r\n\t\t.tabulator-cell{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition: relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tpadding:6px 4px;\r\n\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\tvertical-align:middle;\r\n\t\t\twhite-space:nowrap;\r\n\t\t\toverflow:hidden;\r\n\t\t\ttext-overflow:ellipsis;\r\n\r\n\t\t\tbackground-color: $rowBackgroundColor;\r\n\r\n\t\t\t&.tabulator-editing{\r\n\t\t\t\tborder:1px solid $editBoxColor;\r\n\t\t\t\tpadding: 0;\r\n\r\n\t\t\t\tinput, select{\r\n\t\t\t\t\tborder:1px;\r\n\t\t\t\t\tbackground:transparent;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-validation-fail{\r\n\t\t\t\tborder:1px solid $errorColor;\r\n\t\t\t\tinput, select{\r\n\t\t\t\t\tborder:1px;\r\n\t\t\t\t\tbackground:transparent;\r\n\r\n\t\t\t\t\tcolor: $errorColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//movable row handle\r\n\t\t\t&.tabulator-row-handle{\r\n\r\n\t\t\t\tdisplay: inline-flex;\r\n\t\t\t\talign-items:center;\r\n\r\n\t\t\t\t-moz-user-select: none;\r\n\t\t\t\t-khtml-user-select: none;\r\n\t\t\t\t-webkit-user-select: none;\r\n\t\t\t\t-o-user-select: none;\r\n\r\n\t\t\t\t//handle holder\r\n\t\t\t\t.tabulator-row-handle-box{\r\n\t\t\t\t\twidth:80%;\r\n\r\n\t\t\t\t\t//Hamburger element\r\n\t\t\t\t\t.tabulator-row-handle-bar{\r\n\t\t\t\t\t\twidth:100%;\r\n\t\t\t\t\t\theight:3px;\r\n\t\t\t\t\t\tmargin:2px 10% 0 10%;\r\n\t\t\t\t\t\tbackground:#666;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//row grouping element\r\n\t\t&.tabulator-group{\r\n\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-bottom:2px solid $primary;\r\n\t\t\tborder-top:2px solid $primary;\r\n\t\t\tpadding:5px;\r\n\t\t\tpadding-left:10px;\r\n\t\t\tbackground:lighten($primary, 20%);\r\n\t\t\tfont-weight:bold;\r\n\t\t\tcolor:fff;\r\n\t\t\tmargin-bottom: 2px;\r\n\r\n\t\t\tmin-width: 100%;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tbackground-color:rgba(0,0,0,.1);\r\n\t\t\t}\r\n\r\n\r\n\t\t\t&.tabulator-group-visible{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-right:10px;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\tborder-bottom: 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-level-1{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-left:20px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-level-2{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-left:40px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-level-3{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-left:60px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-level-4{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-left:80px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-level-5{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-left:1000px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//sorting arrow\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tdisplay: inline-block;\r\n\t\t\t\twidth: 0;\r\n\t\t\t\theight: 0;\r\n\t\t\t\tmargin-right:16px;\r\n\t\t\t\tborder-top: 6px solid transparent;\r\n\t\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\t\tborder-right: 0;\r\n\t\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\t\tvertical-align:middle;\r\n\t\t\t}\r\n\r\n\t\t\tspan{\r\n\t\t\t\tmargin-left:10px;\r\n\t\t\t\tcolor:$primary;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\ttop:0;\r\n\t\tbottom:0;\r\n\t\twidth:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\tleft:0;\r\n\t\t\tright:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ew-resize;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//footer element\r\n\t.tabulator-footer{\r\n\t\tpadding:5px 10px;\r\n\t\tborder-top:1px solid $footerSeperatorColor;\r\n\t\tbackground-color: $footerBackgroundColor;\r\n\t\ttext-align:right;\r\n\t\tcolor: $footerTextColor;\r\n\t\tfont-weight:bold;\r\n\t\twhite-space:nowrap;\r\n\t\tuser-select:none;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\twidth:calc(\"100% + 20px\");\r\n\t\t\tmargin:-5px -10px 5px -10px;\r\n\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\tbackground:lighten($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\tborder-top:3px solid $headerSeperatorColor !important;\r\n\t\t\tborder-bottom:2px solid $headerSeperatorColor !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-cell{\r\n\t\t\t\t\tbackground:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-bottom:1px solid $rowBorderColor;\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&:only-child{\r\n\t\t\t\tmargin-bottom:-5px;\r\n\t\t\t\tborder-bottom:none;\r\n\t\t\t\tborder-bottom:none !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-pages{\r\n\t\t\tmargin:0 7px;\r\n\t\t}\r\n\r\n\t\t//pagination button\r\n\t\t.tabulator-page{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tmargin:0 2px;\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\t\t\tpadding:2px 5px;\r\n\t\t\tbackground:rgba(255,255,255,.2);\r\n\t\t\tcolor: $footerTextColor;\r\n\t\t\tfont-family:inherit;\r\n\t\t\tfont-weight:inherit;\r\n\t\t\tfont-size:inherit;\r\n\r\n\t\t\t&.active{\r\n\t\t\t\tcolor:$primary;\r\n\t\t\t}\r\n\r\n\t\t\t&:disabled{\r\n\t\t\t\topacity:.5;\r\n\t\t\t}\r\n\r\n\t\t\t&:not(.disabled){\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground:rgba(0,0,0,.2);\r\n\t\t\t\t\tcolor:#fff;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//holding div that contains loader and covers tabulator element to prevent interaction\r\n\t.tablulator-loader{\r\n\t\tposition:absolute;\r\n\t\tdisplay: flex;\r\n\t\talign-items:center;\r\n\r\n\t\ttop:0;\r\n\t\tleft:0;\r\n\t\tz-index:100;\r\n\r\n\t\theight:100%;\r\n\t\twidth:100%;\r\n\t\tbackground:rgba(0,0,0,.4);\r\n\t\ttext-align:center;\r\n\r\n\t\t//loading message element\r\n\t\t.tabulator-loader-msg{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 auto;\r\n\t\t\tpadding:10px 20px;\r\n\r\n\t\t\tborder-radius:10px;\r\n\r\n\t\t\tbackground:#fff;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:16px;\r\n\r\n\t\t\t//loading message\r\n\t\t\t&.tabulator-loading{\r\n\t\t\t\tborder:4px solid #333;\r\n\t\t\t\tcolor:#000;\r\n\t\t\t}\r\n\r\n\t\t\t//error message\r\n\t\t\t&.tabulator-error{\r\n\t\t\t\tborder:4px solid #D00;\r\n\t\t\t\tcolor:#590000;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}"]} \ No newline at end of file diff --git a/css/tabulator/tabulator_simple.css b/css/tabulator/tabulator_simple.css new file mode 100644 index 0000000..3f605ab --- /dev/null +++ b/css/tabulator/tabulator_simple.css @@ -0,0 +1,534 @@ +/* Tabulator v3.3.1 (c) Oliver Folkerd */ +.tabulator { + position: relative; + background-color: #fff; + overflow: hidden; + font-size: 14px; + text-align: left; + -ms-transform: translatez(0); + transform: translatez(0); +} + +.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { + min-width: 100%; +} + +.tabulator.tabulator-block-select { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator .tabulator-header { + position: relative; + box-sizing: border-box; + width: 100%; + border-bottom: 1px solid #999; + background-color: #fff; + color: #555; + font-weight: bold; + white-space: nowrap; + overflow: hidden; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-header .tabulator-col { + display: inline-block; + position: relative; + box-sizing: border-box; + border-right: 1px solid #ddd; + background-color: #fff; + text-align: left; + vertical-align: bottom; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-moving { + position: absolute; + border: 1px solid #999; + background: #e6e6e6; + pointer-events: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content { + position: relative; + padding: 4px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { + box-sizing: border-box; + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + vertical-align: bottom; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { + box-sizing: border-box; + width: 100%; + border: 1px solid #999; + padding: 1px; + background: #fff; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + display: inline-block; + position: absolute; + top: 9px; + right: 8px; + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + position: relative; + display: -ms-flexbox; + display: flex; + border-top: 1px solid #ddd; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { + position: absolute; + background-color: #e6e6e6 !important; + border: 1px solid #ddd; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { + position: relative; + box-sizing: border-box; + margin-top: 2px; + width: 100%; + text-align: center; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { + height: auto !important; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { + margin-top: 3px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 25px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { + cursor: pointer; + background-color: #e6e6e6; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #666; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { + border-top: 6px solid #666; + border-bottom: none; +} + +.tabulator .tabulator-header .tabulator-frozen { + display: inline-block; + position: absolute; + z-index: 10; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #ddd; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #ddd; +} + +.tabulator .tabulator-header .tabulator-calcs-holder { + box-sizing: border-box; + min-width: 200%; + background: #f2f2f2 !important; + border-top: 1px solid #ddd; + border-bottom: 1px solid #999; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { + background: #f2f2f2 !important; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-tableHolder { + position: relative; + width: 100%; + white-space: nowrap; + overflow: auto; + -webkit-overflow-scrolling: touch; +} + +.tabulator .tabulator-tableHolder:focus { + outline: none; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder { + position: absolute; + box-sizing: border-box; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + top: 0; + left: 0; + height: 100%; + width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder span { + display: inline-block; + margin: 0 auto; + padding: 10px; + color: #000; + font-weight: bold; + font-size: 20px; +} + +.tabulator .tabulator-tableHolder .tabulator-table { + position: relative; + display: inline-block; + background-color: #fff; + white-space: nowrap; + overflow: visible; + color: #333; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { + font-weight: bold; + background: #f2f2f2 !important; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { + border-bottom: 2px solid #ddd; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { + border-top: 2px solid #ddd; +} + +.tabulator .tabulator-row { + position: relative; + box-sizing: border-box; + min-height: 22px; + background-color: #fff; + border-bottom: 1px solid #ddd; +} + +.tabulator .tabulator-row:nth-child(even) { + background-color: #fff; +} + +.tabulator .tabulator-row.tabulator-selectable:hover { + background-color: #bbb; + cursor: pointer; +} + +.tabulator .tabulator-row.tabulator-selected { + background-color: #9ABCEA; +} + +.tabulator .tabulator-row.tabulator-selected:hover { + background-color: #769BCC; + cursor: pointer; +} + +.tabulator .tabulator-row.tabulator-moving { + position: absolute; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + pointer-events: none !important; + z-index: 15; +} + +.tabulator .tabulator-row .tabulator-frozen { + display: inline-block; + position: absolute; + background-color: inherit; + z-index: 10; +} + +.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #ddd; +} + +.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #ddd; +} + +.tabulator .tabulator-row .tabulator-cell { + display: inline-block; + position: relative; + box-sizing: border-box; + padding: 4px; + border-right: 1px solid #ddd; + vertical-align: middle; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.tabulator .tabulator-row .tabulator-cell:last-of-type { + border-right: none; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-editing { + border: 1px solid #1D68CD; + padding: 0; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-editing input, .tabulator .tabulator-row .tabulator-cell.tabulator-editing select { + border: 1px; + background: transparent; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail { + border: 1px solid #dd0000; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail select { + border: 1px; + background: transparent; + color: #dd0000; +} + +.tabulator .tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { + width: 80%; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { + width: 100%; + height: 3px; + margin: 2px 10% 0 10%; + background: #666; +} + +.tabulator .tabulator-row.tabulator-group { + box-sizing: border-box; + border-bottom: 1px solid #999; + border-right: 1px solid #ddd; + border-top: 1px solid #999; + padding: 5px; + padding-left: 10px; + background: #fafafa; + font-weight: bold; + min-width: 100%; +} + +.tabulator .tabulator-row.tabulator-group:hover { + cursor: pointer; + background-color: rgba(0, 0, 0, 0.1); +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #666; + border-bottom: 0; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow { + margin-left: 20px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow { + margin-left: 40px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow { + margin-left: 60px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow { + margin-left: 80px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow { + margin-left: 1000px; +} + +.tabulator .tabulator-row.tabulator-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #666; + vertical-align: middle; +} + +.tabulator .tabulator-row.tabulator-group span { + margin-left: 10px; + color: #666; +} + +.tabulator .tabulator-col-resize-handle { + position: absolute; + right: 0; + top: 0; + bottom: 0; + width: 5px; +} + +.tabulator .tabulator-col-resize-handle.prev { + left: 0; + right: auto; +} + +.tabulator .tabulator-col-resize-handle:hover { + cursor: ew-resize; +} + +.tabulator .tabulator-footer { + padding: 5px 10px; + border-top: 1px solid #999; + background-color: #fff; + text-align: right; + color: #555; + font-weight: bold; + white-space: nowrap; + -ms-user-select: none; + user-select: none; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder { + box-sizing: border-box; + width: calc("100% + 20px"); + margin: -5px -10px 5px -10px; + text-align: left; + background: #f2f2f2 !important; + border-bottom: 1px solid #fff; + border-top: 1px solid #ddd; + overflow: hidden; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { + background: #f2f2f2 !important; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { + margin-bottom: -5px; + border-bottom: none; +} + +.tabulator .tabulator-footer .tabulator-pages { + margin: 0 7px; +} + +.tabulator .tabulator-footer .tabulator-page { + display: inline-block; + margin: 0 2px; + border: 1px solid #aaa; + border-radius: 3px; + padding: 2px 5px; + background: rgba(255, 255, 255, 0.2); + color: #555; + font-family: inherit; + font-weight: inherit; + font-size: inherit; +} + +.tabulator .tabulator-footer .tabulator-page.active { + color: #d00; +} + +.tabulator .tabulator-footer .tabulator-page:disabled { + opacity: .5; +} + +.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); + color: #fff; +} + +.tabulator .tablulator-loader { + position: absolute; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + top: 0; + left: 0; + z-index: 100; + height: 100%; + width: 100%; + background: rgba(0, 0, 0, 0.4); + text-align: center; +} + +.tabulator .tablulator-loader .tabulator-loader-msg { + display: inline-block; + margin: 0 auto; + padding: 10px 20px; + border-radius: 10px; + background: #fff; + font-weight: bold; + font-size: 16px; +} + +.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-loading { + border: 4px solid #333; + color: #000; +} + +.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-error { + border: 4px solid #D00; + color: #590000; +} diff --git a/css/tabulator/tabulator_simple.min.css b/css/tabulator/tabulator_simple.min.css new file mode 100644 index 0000000..9126ad1 --- /dev/null +++ b/css/tabulator/tabulator_simple.min.css @@ -0,0 +1,3 @@ +/* Tabulator v3.3.1 (c) Oliver Folkerd */ +.tabulator{position:relative;background-color:#fff;overflow:hidden;font-size:14px;text-align:left;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator.tabulator-block-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{width:100%;border-bottom:1px solid #999;color:#555;font-weight:700;white-space:nowrap;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header,.tabulator .tabulator-header .tabulator-col{position:relative;box-sizing:border-box;background-color:#fff;overflow:hidden}.tabulator .tabulator-header .tabulator-col{display:inline-block;border-right:1px solid #ddd;text-align:left;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #999;background:#e6e6e6;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{position:relative;padding:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:9px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #ddd;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#e6e6e6!important;border:1px solid #ddd}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#e6e6e6}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #666;border-bottom:none}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:1}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #ddd}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #ddd}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:200%;background:#f2f2f2!important;border-top:1px solid #ddd;border-bottom:1px solid #999;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#f2f2f2!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{position:absolute;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;height:100%;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#000;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#fff;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#f2f2f2!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #ddd}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #ddd}.tabulator .tabulator-row{position:relative;box-sizing:border-box;min-height:22px;background-color:#fff;border-bottom:1px solid #ddd}.tabulator .tabulator-row:nth-child(2n){background-color:#fff}.tabulator .tabulator-row.tabulator-selectable:hover{background-color:#bbb;cursor:pointer}.tabulator .tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator .tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator .tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #ddd;border-bottom:1px solid #ddd;pointer-events:none!important;z-index:2}.tabulator .tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:1}.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #ddd}.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #ddd}.tabulator .tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:4px;border-right:1px solid #ddd;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator .tabulator-row .tabulator-cell:last-of-type{border-right:none}.tabulator .tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;padding:0}.tabulator .tabulator-row .tabulator-cell.tabulator-editing input,.tabulator .tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator .tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin:2px 10% 0;background:#666}.tabulator .tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #ddd;border-top:1px solid #999;padding:5px;padding-left:10px;background:#fafafa;font-weight:700;min-width:100%}.tabulator .tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator .tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow{margin-left:20px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow{margin-left:40px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow{margin-left:60px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow{margin-left:80px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow{margin-left:1000px}.tabulator .tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator .tabulator-row.tabulator-group span{margin-left:10px;color:#666}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-footer{padding:5px 10px;border-top:1px solid #999;background-color:#fff;text-align:right;color:#555;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc("100% + 20px");margin:-5px -10px 5px;text-align:left;background:#f2f2f2!important;border-bottom:1px solid #fff;border-top:1px solid #ddd;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#f2f2f2!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;border:1px solid #aaa;border-radius:3px;padding:2px 5px;background:hsla(0,0%,100%,.2);color:#555;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page.active{color:#d00}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tablulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:3;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tablulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000} +/*# sourceMappingURL=tabulator_simple.min.css.map */ diff --git a/css/tabulator/tabulator_simple.min.css.map b/css/tabulator/tabulator_simple.min.css.map new file mode 100644 index 0000000..1f15320 --- /dev/null +++ b/css/tabulator/tabulator_simple.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["tabulator_simple.scss"],"names":[],"mappings":"AA0CA,WACC,kBAAkB,AAClB,sBAxCqB,AAyCrB,gBAAe,AACf,eAxCa,AAyCb,gBAAgB,AAMhB,uBAAwB,CAonBxB,AA/nBD,iFAgBI,cAAc,CACd,AAjBJ,kCAsBE,yBAAiB,AAAjB,sBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AAvBF,6BA8BE,WAAU,AAEV,6BA9DwB,AAgExB,WAlEmB,AAmEnB,gBAAgB,AAEhB,mBAAmB,AAGnB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CA0LpB,AArOF,yEA2BE,kBAAiB,AACjB,sBAAsB,AAKtB,sBAlEyB,AAuEzB,eAAe,CAtCjB,AA+LG,4CAhJA,qBAAoB,AAGpB,4BAjFoB,AAmFpB,gBAAe,AACf,qBAAsB,CA0ItB,AA/LH,6DAyDI,kBAAkB,AAClB,sBAxFsB,AAyFtB,mBAA8C,AAC9C,mBAAoB,CACpB,AA7DJ,mEAiEI,kBAAkB,AAClB,WAAW,CAsCX,AAxGJ,wFAsEK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAarB,AAzFL,gHAgFM,sBAAsB,AACtB,WAAW,AAEX,sBAAqB,AAErB,YAAW,AAEX,eAAgB,CAChB,AAxFN,oFA6FK,qBAAqB,AACrB,kBAAkB,AAClB,QAAO,AACP,UAAS,AACT,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,4BA9HmB,CA+HnB,AAtGL,0FA+GK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,0BAjJkB,AAkJlB,eAAgB,CAKhB,AAxHL,oHAsHM,iBAAiB,CACjB,AAvHN,0FA+HK,YAAa,CACb,AAhIL,+DAqII,kBAAkB,AAClB,mCAA+D,AAC/D,qBAtKmB,CAuKnB,AAxIJ,qEA4II,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAUlB,AA1JJ,8EAoJK,qBAAsB,CACtB,AArJL,yEAwJK,cAAe,CACf,AAzJL,oFAgKK,kBAAkB,CAClB,AAjKL,qEAoKK,eAAc,AACd,wBAAoD,CACpD,AAtKL,uHA2KM,gBAAgB,AAChB,4BArMkB,CAsMlB,AA7KN,sHAkLM,gBAAgB,AAChB,4BA7MgB,CA8MhB,AApLN,uHAyLM,0BAnNgB,AAoNhB,kBAAmB,CACnB,AA3LN,+CAkMG,qBAAqB,AACrB,kBAAkB,AAIlB,SAAW,CASX,AAhNH,qEA0MI,2BA9NgB,CA+NhB,AA3MJ,sEA8MI,0BAlOgB,CAmOhB,AA/MJ,qDAmNG,sBAAqB,AACrB,eAAc,AAEd,6BAAwD,AAUxD,0BApPiB,AAqPjB,6BA/PuB,AAiQvB,eAAgB,CAChB,AApOH,oEAyNI,4BAAwD,CAKxD,AA9NJ,iGA4NK,YAAa,CACb,AA7NL,kCA2OE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CAuDjC,AAtSF,wCAkPG,YAAa,CACb,AAnPH,yDAuPG,kBAAkB,AAClB,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,YAAW,AACX,UAAU,CAYV,AA3QH,8DAkQI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,WAAU,AACV,gBAAiB,AACjB,cAAe,CACf,AA1QJ,mDA+QG,kBAAiB,AACjB,qBAAoB,AACpB,sBAvSqB,AAwSrB,mBAAmB,AACnB,iBAAgB,AAChB,UAvSe,CAwTf,AArSH,kFAwRK,gBAAiB,AACjB,4BAAwD,CASxD,AAlSL,sGA4RM,4BAhTc,CAiTd,AA7RN,yGAgSM,yBApTc,CAqTd,AAjSN,0BA2SE,kBAAkB,AAClB,sBAAsB,AAEtB,gBAA0C,AAC1C,sBArUsB,AAsUtB,4BApUkB,CAqgBlB,AAjfF,wCAmTG,qBAxUwB,CAyUxB,AApTH,qDAuTG,sBAzUqB,AA0UrB,cAAe,CACf,AAzTH,6CA4TG,wBA5U4B,CA6U5B,AA7TH,mDAgUG,yBA/UiC,AAgVjC,cAAe,CACf,AAlUH,2CAqUG,kBAAkB,AAElB,0BA3ViB,AA4VjB,6BA5ViB,AA8VjB,8BAA+B,AAC/B,SAAU,CACV,AA5UH,4CA+UG,qBAAqB,AACrB,kBAAkB,AAElB,yBAAyB,AAEzB,SAAW,CASX,AA7VH,kEAuVI,2BA3WgB,CA4WhB,AAxVJ,mEA2VI,0BA/WgB,CAgXhB,AA5VJ,0CAiWG,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,YAAW,AACX,4BAzXiB,AA0XjB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,sBAAsB,CAyDtB,AAlaH,uDA4WI,iBAAkB,CAClB,AA7WJ,4DAgXI,yBA5XiB,AA6XjB,SAAU,CAMV,AAvXJ,qIAoXK,WAAU,AACV,sBAAsB,CACtB,AAtXL,oEA0XI,qBArYe,CA4Yf,AAjYJ,qJA4XK,WAAU,AACV,uBAAsB,AAEtB,UA1Yc,CA2Yd,AAhYL,wFAsYK,YAAa,CACb,AAvYL,+DA6YI,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAElB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AAjaJ,yFAuZK,SAAS,CAST,AAhaL,mHA2ZM,WAAU,AACV,WAAU,AACV,iBAAoB,AACpB,eAAe,CACf,AA/ZN,0CAuaG,sBAAqB,AACrB,6BAA4B,AAC5B,4BA7biB,AA8bjB,0BAAyB,AACzB,YAAW,AACX,kBAAiB,AACjB,mBAAkB,AAClB,gBAAgB,AAEhB,cAAe,CAgEf,AAhfH,gDAmbI,eAAc,AACd,+BAA+B,CAC/B,AArbJ,mFAybK,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,0BAtdiB,AAudjB,eAAgB,CAChB,AA9bL,mFAmcK,gBAAgB,CAChB,AApcL,mFAycK,gBAAgB,CAChB,AA1cL,mFA+cK,gBAAgB,CAChB,AAhdL,mFAqdK,gBAAgB,CAChB,AAtdL,mFA2dK,kBAAkB,CAClB,AA5dL,2DAieI,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,2BAlgBkB,AAmgBlB,qBAAqB,CACrB,AA1eJ,+CA6eI,iBAAgB,AAChB,UAAU,CACV,AA/eJ,wCAqfE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AAngBF,6CA4fG,OAAM,AACN,UAAU,CACV,AA9fH,8CAigBG,gBAAgB,CAChB,AAlgBH,6BAwgBE,iBAAgB,AAChB,0BA9gBwB,AA+gBxB,sBAlhByB,AAmhBzB,iBAAgB,AAChB,WAnhBmB,AAohBnB,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAgEpB,AAplBF,qDAuhBG,sBAAqB,AACrB,0BAAyB,AACzB,sBAA2B,AAE3B,gBAAgB,AAEhB,6BAAwD,AAUxD,6BA/iBwB,AAgjBxB,0BA5jBiB,AA8jBjB,eAAgB,CAMhB,AAhjBH,oEAgiBI,4BAAwD,CAKxD,AAriBJ,iGAmiBK,YAAa,CACb,AApiBL,gEA6iBI,mBAAkB,AAClB,kBAAkB,CAClB,AA/iBJ,8CAojBG,YAAY,CACZ,AArjBH,6CAyjBG,qBAAoB,AACpB,aAAY,AACZ,sBAjkBoB,AAkkBpB,kBAAiB,AACjB,gBAAe,AACf,8BAA+B,AAC/B,WAtkBkB,AAukBlB,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CAiBjB,AAnlBH,oDAqkBI,UAAU,CACV,AAtkBJ,sDAykBI,UAAU,CACV,AA1kBJ,kEA8kBK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AAjlBL,8BAwlBE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,UAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AA9nBF,oDAumBG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AA7nBH,sEAonBI,sBAAqB,AACrB,UAAU,CACV,AAtnBJ,oEA0nBI,sBAAqB,AACrB,aAAa,CACb","file":"tabulator_simple.min.css","sourcesContent":["/* Tabulator v3.3.1 (c) Oliver Folkerd */\n\n\r\n//Main Theme Variables\r\n$backgroundColor: #fff; //background color of tabulator\r\n$borderColor:#999; //border to tablulator\r\n$textSize:14px; //table text size\r\n\r\n//header themeing\r\n$headerBackgroundColor:#fff; //border to tablulator\r\n$headerTextColor:#555; //header text colour\r\n$headerBorderColor:#ddd; //header border color\r\n$headerSeperatorColor:#999; //header bottom seperator color\r\n$headerMargin:4px; //padding round header\r\n\r\n//column header arrows\r\n$sortArrowActive: #666;\r\n$sortArrowInactive: #bbb;\r\n\r\n//row themeing\r\n$rowBackgroundColor:#fff; //table row background color\r\n$rowAltBackgroundColor:#fff; //table row background color\r\n$rowBorderColor:#ddd; //table border color\r\n$rowTextColor:#333; //table text color\r\n$rowHoverBackground:#bbb; //row background color on hover\r\n\r\n$rowSelectedBackground: #9ABCEA; //row background color when selected\r\n$rowSelectedBackgroundHover: #769BCC;//row background color when selected and hovered\r\n\r\n\r\n$editBoxColor:#1D68CD; //border color for edit boxes\r\n$errorColor:#dd0000; //error indication\r\n\r\n//footer themeing\r\n$footerBackgroundColor:#fff; //border to tablulator\r\n$footerTextColor:#555; //footer text colour\r\n$footerBorderColor:#aaa; //footer border color\r\n$footerSeperatorColor:#999; //footer bottom seperator color\r\n\r\n\r\n\r\n//Tabulator Containing Element\r\n.tabulator{\r\n\tposition: relative;\r\n\tbackground-color: $backgroundColor;\r\n\toverflow:hidden;\r\n\tfont-size:$textSize;\r\n\ttext-align: left;\r\n\r\n\t-webkit-transform: translatez(0);\r\n\t-moz-transform: translatez(0);\r\n\t-ms-transform: translatez(0);\r\n\t-o-transform: translatez(0);\r\n\ttransform: translatez(0);\r\n\r\n\t&[tabulator-layout=\"fitDataFill\"]{\r\n\t\t.tabulator-tableHolder{\r\n\t\t\t.tabulator-table{\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&.tabulator-block-select{\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t//column header containing element\r\n\t.tabulator-header{\r\n\t\tposition:relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\twidth:100%;\r\n\r\n\t\tborder-bottom:1px solid $headerSeperatorColor;\r\n\t\tbackground-color: $headerBackgroundColor;\r\n\t\tcolor: $headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:hidden;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t//individual column header element\r\n\t\t.tabulator-col{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition:relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-right:1px solid $headerBorderColor;\r\n\t\t\tbackground-color: $headerBackgroundColor;\r\n\t\t\ttext-align:left;\r\n\t\t\tvertical-align: bottom;\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&.tabulator-moving{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tborder:1px solid $headerSeperatorColor;\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%);\r\n\t\t\t\tpointer-events: none;\r\n\t\t\t}\r\n\r\n\t\t\t//hold content of column header\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding:4px;\r\n\r\n\t\t\t\t//hold title of column header\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\twhite-space: nowrap;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\t\tvertical-align:bottom;\r\n\r\n\t\t\t\t\t//element to hold title editor\r\n\t\t\t\t\t.tabulator-title-editor{\r\n\t\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\tborder:1px solid #999;\r\n\r\n\t\t\t\t\t\tpadding:1px;\r\n\r\n\t\t\t\t\t\tbackground: #fff;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:9px;\r\n\t\t\t\t\tright:8px;\r\n\t\t\t\t\twidth: 0;\r\n\t\t\t\t\theight: 0;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t//complex header column group\r\n\t\t\t&.tabulator-col-group{\r\n\r\n\t\t\t\t//gelement to hold sub columns in column group\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tposition:relative;\r\n\t\t\t\t\tdisplay: flex;\r\n\r\n\t\t\t\t\tborder-top:1px solid $headerBorderColor;\r\n\t\t\t\t\toverflow: hidden;\r\n\r\n\t\t\t\t\t.tabulator-col:last-child{\r\n\t\t\t\t\t\tmargin-right:-1px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//placeholder element for sortable columns\r\n\t\t\t&.ui-sortable-helper{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%) !important;\r\n\t\t\t\tborder:1px solid $headerBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t//header filter containing element\r\n\t\t\t.tabulator-header-filter{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\tmargin-top:2px;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\ttext-align: center;\r\n\r\n\t\t\t\t//styling adjustment for inbuilt editors\r\n\t\t\t\ttextarea{\r\n\t\t\t\t\theight:auto !important;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsvg{\r\n\t\t\t\t\tmargin-top: 3px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\t//styling child elements for sortable columns\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:25px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t&[aria-sort=\"none\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"desc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\tborder-bottom: none;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\t// background-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tmin-width:200%;\r\n\r\n\t\t\tbackground:darken($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $headerSeperatorColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\r\n\t//scrolling element to hold table\r\n\t.tabulator-tableHolder{\r\n\t\tposition:relative;\r\n\t\twidth:100%;\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:auto;\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\r\n\t\t&:focus{\r\n\t\t\toutline: none;\r\n\t\t}\r\n\r\n\t\t//default placeholder element\r\n\t\t.tabulator-placeholder{\r\n\t\t\tposition: absolute;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\ttop:0;\r\n\t\t\tleft:0;\r\n\t\t\theight:100%;\r\n\t\t\twidth:100%;\r\n\r\n\t\t\tspan{\r\n\t\t\t\tdisplay: inline-block;\r\n\r\n\t\t\t\tmargin:0 auto;\r\n\t\t\t\tpadding:10px;\r\n\r\n\t\t\t\tcolor:#000;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tfont-size: 20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//element to hold table rows\r\n\t\t.tabulator-table{\r\n\t\t\tposition:relative;\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tbackground-color:$rowBackgroundColor;\r\n\t\t\twhite-space: nowrap;\r\n\t\t\toverflow:visible;\r\n\t\t\tcolor:$rowTextColor;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\t&.tabulator-calcs{\r\n\t\t\t\t\tfont-weight: bold;\r\n\t\t\t\t\tbackground:darken($rowAltBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t\t&.tabulator-calcs-top{\r\n\t\t\t\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-calcs-bottom{\r\n\t\t\t\t\t\tborder-top:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//row element\r\n\t.tabulator-row{\r\n\t\tposition: relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\tmin-height:$textSize + ($headerMargin * 2);\r\n\t\tbackground-color: $rowBackgroundColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t&:nth-child(even){\r\n\t\t\tbackground-color: $rowAltBackgroundColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-selectable:hover{\r\n\t\t\tbackground-color:$rowHoverBackground;\r\n\t\t\tcursor: pointer;\r\n\t\t}\r\n\r\n\t\t&.tabulator-selected{\r\n\t\t\tbackground-color:$rowSelectedBackground;\r\n\t\t}\r\n\r\n\t\t&.tabulator-selected:hover{\r\n\t\t\tbackground-color:$rowSelectedBackgroundHover;\r\n\t\t\tcursor: pointer;\r\n\t\t}\r\n\r\n\t\t&.tabulator-moving{\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t\tpointer-events: none !important;\r\n\t\t\tz-index:15;\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\tbackground-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//cell element\r\n\t\t.tabulator-cell{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition: relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tpadding:4px;\r\n\t\t\tborder-right:1px solid $rowBorderColor;\r\n\t\t\tvertical-align:middle;\r\n\t\t\twhite-space:nowrap;\r\n\t\t\toverflow:hidden;\r\n\t\t\ttext-overflow:ellipsis;\r\n\r\n\t\t\t&:last-of-type{\r\n\t\t\t\tborder-right: none;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-editing{\r\n\t\t\t\tborder:1px solid $editBoxColor;\r\n\t\t\t\tpadding: 0;\r\n\r\n\t\t\t\tinput, select{\r\n\t\t\t\t\tborder:1px;\r\n\t\t\t\t\tbackground:transparent;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-validation-fail{\r\n\t\t\t\tborder:1px solid $errorColor;\r\n\t\t\t\tinput, select{\r\n\t\t\t\t\tborder:1px;\r\n\t\t\t\t\tbackground:transparent;\r\n\r\n\t\t\t\t\tcolor: $errorColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//movable row handle\r\n\t\t\t&.tabulator-row-handle{\r\n\r\n\t\t\t\tdisplay: inline-flex;\r\n\t\t\t\talign-items:center;\r\n\r\n\t\t\t\t-moz-user-select: none;\r\n\t\t\t\t-khtml-user-select: none;\r\n\t\t\t\t-webkit-user-select: none;\r\n\t\t\t\t-o-user-select: none;\r\n\r\n\t\t\t\t//handle holder\r\n\t\t\t\t.tabulator-row-handle-box{\r\n\t\t\t\t\twidth:80%;\r\n\r\n\t\t\t\t\t//Hamburger element\r\n\t\t\t\t\t.tabulator-row-handle-bar{\r\n\t\t\t\t\t\twidth:100%;\r\n\t\t\t\t\t\theight:3px;\r\n\t\t\t\t\t\tmargin:2px 10% 0 10%;\r\n\t\t\t\t\t\tbackground:#666;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//row grouping element\r\n\t\t&.tabulator-group{\r\n\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-bottom:1px solid #999;\r\n\t\t\tborder-right:1px solid $rowBorderColor;\r\n\t\t\tborder-top:1px solid #999;\r\n\t\t\tpadding:5px;\r\n\t\t\tpadding-left:10px;\r\n\t\t\tbackground:#fafafa;\r\n\t\t\tfont-weight:bold;\r\n\r\n\t\t\tmin-width: 100%;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tbackground-color:rgba(0,0,0,.1);\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-visible{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-right:10px;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\tborder-bottom: 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-level-1{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-left:20px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-level-2{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-left:40px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-level-3{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-left:60px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-level-4{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-left:80px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-level-5{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-left:1000px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//sorting arrow\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tdisplay: inline-block;\r\n\t\t\t\twidth: 0;\r\n\t\t\t\theight: 0;\r\n\t\t\t\tmargin-right:16px;\r\n\t\t\t\tborder-top: 6px solid transparent;\r\n\t\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\t\tborder-right: 0;\r\n\t\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\t\tvertical-align:middle;\r\n\t\t\t}\r\n\r\n\t\t\tspan{\r\n\t\t\t\tmargin-left:10px;\r\n\t\t\t\tcolor:#666;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\ttop:0;\r\n\t\tbottom:0;\r\n\t\twidth:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\tleft:0;\r\n\t\t\tright:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ew-resize;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//footer element\r\n\t.tabulator-footer{\r\n\t\tpadding:5px 10px;\r\n\t\tborder-top:1px solid $footerSeperatorColor;\r\n\t\tbackground-color: $footerBackgroundColor;\r\n\t\ttext-align:right;\r\n\t\tcolor: $footerTextColor;\r\n\t\tfont-weight:bold;\r\n\t\twhite-space:nowrap;\r\n\t\tuser-select:none;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\twidth:calc(\"100% + 20px\");\r\n\t\t\tmargin:-5px -10px 5px -10px;\r\n\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\tbackground:darken($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:darken($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-bottom:1px solid $footerBackgroundColor;\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&:only-child{\r\n\t\t\t\tmargin-bottom:-5px;\r\n\t\t\t\tborder-bottom:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-pages{\r\n\t\t\tmargin:0 7px;\r\n\t\t}\r\n\r\n\t\t//pagination button\r\n\t\t.tabulator-page{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tmargin:0 2px;\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\t\t\tpadding:2px 5px;\r\n\t\t\tbackground:rgba(255,255,255,.2);\r\n\t\t\tcolor: $footerTextColor;\r\n\t\t\tfont-family:inherit;\r\n\t\t\tfont-weight:inherit;\r\n\t\t\tfont-size:inherit;\r\n\r\n\t\t\t&.active{\r\n\t\t\t\tcolor:#d00;\r\n\t\t\t}\r\n\r\n\t\t\t&:disabled{\r\n\t\t\t\topacity:.5;\r\n\t\t\t}\r\n\r\n\t\t\t&:not(.disabled){\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground:rgba(0,0,0,.2);\r\n\t\t\t\t\tcolor:#fff;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//holding div that contains loader and covers tabulator element to prevent interaction\r\n\t.tablulator-loader{\r\n\t\tposition:absolute;\r\n\t\tdisplay: flex;\r\n\t\talign-items:center;\r\n\r\n\t\ttop:0;\r\n\t\tleft:0;\r\n\t\tz-index:100;\r\n\r\n\t\theight:100%;\r\n\t\twidth:100%;\r\n\t\tbackground:rgba(0,0,0,.4);\r\n\t\ttext-align:center;\r\n\r\n\t\t//loading message element\r\n\t\t.tabulator-loader-msg{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 auto;\r\n\t\t\tpadding:10px 20px;\r\n\r\n\t\t\tborder-radius:10px;\r\n\r\n\t\t\tbackground:#fff;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:16px;\r\n\r\n\t\t\t//loading message\r\n\t\t\t&.tabulator-loading{\r\n\t\t\t\tborder:4px solid #333;\r\n\t\t\t\tcolor:#000;\r\n\t\t\t}\r\n\r\n\t\t\t//error message\r\n\t\t\t&.tabulator-error{\r\n\t\t\t\tborder:4px solid #D00;\r\n\t\t\t\tcolor:#590000;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}"]} \ No newline at end of file diff --git a/css/tabulator/tabulator_site.css b/css/tabulator/tabulator_site.css new file mode 100644 index 0000000..e4b3df0 --- /dev/null +++ b/css/tabulator/tabulator_site.css @@ -0,0 +1,533 @@ +/* Tabulator v3.3.1 (c) Oliver Folkerd */ +.tabulator { + position: relative; + border-bottom: 5px solid #222; + background-color: #fff; + font-size: 14px; + text-align: left; + overflow: hidden; + -ms-transform: translatez(0); + transform: translatez(0); +} + +.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { + min-width: 100%; +} + +.tabulator[tabulator-layout="fitColumns"] .tabulator-row .tabulator-cell:last-of-type { + border-right: none; +} + +.tabulator.tabulator-block-select { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tabulator .tabulator-header { + position: relative; + box-sizing: border-box; + width: 100%; + border-bottom: 3px solid #3FB449; + background-color: #222; + color: #fff; + font-weight: bold; + white-space: nowrap; + overflow: hidden; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-header .tabulator-col { + display: inline-block; + position: relative; + box-sizing: border-box; + border-right: 1px solid #aaa; + background-color: #222; + text-align: left; + vertical-align: bottom; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-moving { + position: absolute; + border: 1px solid #3FB449; + background: #090909; + pointer-events: none; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content { + position: relative; + padding: 8px; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { + box-sizing: border-box; + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + vertical-align: bottom; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { + box-sizing: border-box; + width: 100%; + border: 1px solid #999; + padding: 1px; + background: #fff; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + display: inline-block; + position: absolute; + top: 14px; + right: 8px; + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { + position: relative; + display: -ms-flexbox; + display: flex; + border-top: 1px solid #aaa; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { + margin-right: -1px; +} + +.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { + position: absolute; + background-color: #222 !important; + border: 1px solid #aaa; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { + position: relative; + box-sizing: border-box; + margin-top: 2px; + width: 100%; + text-align: center; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { + height: auto !important; +} + +.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { + margin-top: 3px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { + padding-right: 25px; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { + cursor: pointer; + background-color: #090909; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #bbb; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { + border-top: none; + border-bottom: 6px solid #3FB449; +} + +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { + border-top: 6px solid #3FB449; + border-bottom: none; +} + +.tabulator .tabulator-header .tabulator-frozen { + display: inline-block; + position: absolute; + z-index: 10; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #aaa; +} + +.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #aaa; +} + +.tabulator .tabulator-header .tabulator-calcs-holder { + box-sizing: border-box; + min-width: 200%; + background: #3c3c3c !important; + border-top: 1px solid #aaa; + overflow: hidden; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { + background: #3c3c3c !important; +} + +.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-tableHolder { + position: relative; + width: 100%; + white-space: nowrap; + overflow: auto; + -webkit-overflow-scrolling: touch; +} + +.tabulator .tabulator-tableHolder:focus { + outline: none; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder { + position: absolute; + box-sizing: border-box; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + top: 0; + left: 0; + height: 100%; + width: 100%; +} + +.tabulator .tabulator-tableHolder .tabulator-placeholder span { + display: inline-block; + margin: 0 auto; + padding: 10px; + color: #3FB449; + font-weight: bold; + font-size: 20px; +} + +.tabulator .tabulator-tableHolder .tabulator-table { + position: relative; + display: inline-block; + background-color: #fff; + white-space: nowrap; + overflow: visible; + color: #333; +} + +.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { + font-weight: bold; + background: #484848 !important; + color: #fff; +} + +.tabulator .tabulator-row { + position: relative; + box-sizing: border-box; + min-height: 22px; + background-color: #fff; +} + +.tabulator .tabulator-row.tabulator-row-even { + background-color: #EFEFEF; +} + +.tabulator .tabulator-row.tabulator-selectable:hover { + background-color: #bbb; + cursor: pointer; +} + +.tabulator .tabulator-row.tabulator-selected { + background-color: #9ABCEA; +} + +.tabulator .tabulator-row.tabulator-selected:hover { + background-color: #769BCC; + cursor: pointer; +} + +.tabulator .tabulator-row.tabulator-row-moving { + border: 1px solid #000; + background: #fff; +} + +.tabulator .tabulator-row.tabulator-moving { + position: absolute; + border-top: 1px solid #aaa; + border-bottom: 1px solid #aaa; + pointer-events: none !important; + z-index: 15; +} + +.tabulator .tabulator-row .tabulator-frozen { + display: inline-block; + position: absolute; + background-color: inherit; + z-index: 10; +} + +.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-left { + border-right: 2px solid #aaa; +} + +.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-right { + border-left: 2px solid #aaa; +} + +.tabulator .tabulator-row .tabulator-cell { + display: inline-block; + position: relative; + box-sizing: border-box; + padding: 6px; + border-right: 1px solid #aaa; + vertical-align: middle; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-editing { + border: 1px solid #1D68CD; + padding: 0; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-editing input, .tabulator .tabulator-row .tabulator-cell.tabulator-editing select { + border: 1px; + background: transparent; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail { + border: 1px solid #dd0000; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail select { + border: 1px; + background: transparent; + color: #dd0000; +} + +.tabulator .tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { + display: none; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { + width: 80%; +} + +.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { + width: 100%; + height: 3px; + margin: 2px 10% 0 10%; + background: #666; +} + +.tabulator .tabulator-row.tabulator-group { + box-sizing: border-box; + border-right: 1px solid #aaa; + border-top: 1px solid #000; + border-bottom: 2px solid #3FB449; + padding: 5px; + padding-left: 10px; + background: #222; + color: #fff; + font-weight: bold; + min-width: 100%; +} + +.tabulator .tabulator-row.tabulator-group:hover { + cursor: pointer; + background-color: #090909; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { + margin-right: 10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid #3FB449; + border-bottom: 0; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow { + margin-left: 20px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow { + margin-left: 40px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow { + margin-left: 60px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow { + margin-left: 80px; +} + +.tabulator .tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow { + margin-left: 1000px; +} + +.tabulator .tabulator-row.tabulator-group .tabulator-arrow { + display: inline-block; + width: 0; + height: 0; + margin-right: 16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid #3FB449; + vertical-align: middle; +} + +.tabulator .tabulator-row.tabulator-group span { + margin-left: 10px; + color: #3FB449; +} + +.tabulator .tabulator-footer { + padding: 5px 10px; + padding-top: 8px; + border-top: 3px solid #3FB449; + background-color: #222; + text-align: right; + color: #222; + font-weight: bold; + white-space: nowrap; + -ms-user-select: none; + user-select: none; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder { + box-sizing: border-box; + width: calc("100% + 20px"); + margin: -8px -10px 8px -10px; + text-align: left; + background: #3c3c3c !important; + border-bottom: 1px solid #aaa; + overflow: hidden; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { + background: #3c3c3c !important; + color: #fff !important; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { + display: none; +} + +.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { + margin-bottom: -5px; + border-bottom: none; +} + +.tabulator .tabulator-footer .tabulator-pages { + margin: 0 7px; +} + +.tabulator .tabulator-footer .tabulator-page { + display: inline-block; + margin: 0 2px; + padding: 2px 5px; + border: 1px solid #aaa; + border-radius: 3px; + background: #fff; + color: #222; + font-family: inherit; + font-weight: inherit; + font-size: inherit; +} + +.tabulator .tabulator-footer .tabulator-page.active { + color: #3FB449; +} + +.tabulator .tabulator-footer .tabulator-page:disabled { + opacity: .5; +} + +.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { + cursor: pointer; + background: rgba(0, 0, 0, 0.2); + color: #fff; +} + +.tabulator .tabulator-col-resize-handle { + position: absolute; + right: 0; + top: 0; + bottom: 0; + width: 5px; +} + +.tabulator .tabulator-col-resize-handle.prev { + left: 0; + right: auto; +} + +.tabulator .tabulator-col-resize-handle:hover { + cursor: ew-resize; +} + +.tabulator .tablulator-loader { + position: absolute; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + top: 0; + left: 0; + z-index: 100; + height: 100%; + width: 100%; + background: rgba(0, 0, 0, 0.4); + text-align: center; +} + +.tabulator .tablulator-loader .tabulator-loader-msg { + display: inline-block; + margin: 0 auto; + padding: 10px 20px; + border-radius: 10px; + background: #fff; + font-weight: bold; + font-size: 16px; +} + +.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-loading { + border: 4px solid #333; + color: #000; +} + +.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-error { + border: 4px solid #D00; + color: #590000; +} diff --git a/css/tabulator/tabulator_site.min.css b/css/tabulator/tabulator_site.min.css new file mode 100644 index 0000000..e07270e --- /dev/null +++ b/css/tabulator/tabulator_site.min.css @@ -0,0 +1,3 @@ +/* Tabulator v3.3.1 (c) Oliver Folkerd */ +.tabulator{position:relative;border-bottom:5px solid #222;background-color:#fff;font-size:14px;text-align:left;overflow:hidden;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator[tabulator-layout=fitColumns] .tabulator-row .tabulator-cell:last-of-type{border-right:none}.tabulator.tabulator-block-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{width:100%;border-bottom:3px solid #3fb449;color:#fff;font-weight:700;white-space:nowrap;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header,.tabulator .tabulator-header .tabulator-col{position:relative;box-sizing:border-box;background-color:#222;overflow:hidden}.tabulator .tabulator-header .tabulator-col{display:inline-block;border-right:1px solid #aaa;text-align:left;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #3fb449;background:#090909;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{position:relative;padding:8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:14px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#222!important;border:1px solid #aaa}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#090909}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #3fb449}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #3fb449;border-bottom:none}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:1}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:200%;background:#3c3c3c!important;border-top:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#3c3c3c!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{position:absolute;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;height:100%;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#3fb449;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#fff;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#484848!important;color:#fff}.tabulator .tabulator-row{position:relative;box-sizing:border-box;min-height:22px;background-color:#fff}.tabulator .tabulator-row.tabulator-row-even{background-color:#efefef}.tabulator .tabulator-row.tabulator-selectable:hover{background-color:#bbb;cursor:pointer}.tabulator .tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator .tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator .tabulator-row.tabulator-row-moving{border:1px solid #000;background:#fff}.tabulator .tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #aaa;border-bottom:1px solid #aaa;pointer-events:none!important;z-index:2}.tabulator .tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:1}.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator .tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator .tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:6px;border-right:1px solid #aaa;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator .tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;padding:0}.tabulator .tabulator-row .tabulator-cell.tabulator-editing input,.tabulator .tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator .tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator .tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator .tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin:2px 10% 0;background:#666}.tabulator .tabulator-row.tabulator-group{box-sizing:border-box;border-right:1px solid #aaa;border-top:1px solid #000;border-bottom:2px solid #3fb449;padding:5px;padding-left:10px;background:#222;color:#fff;font-weight:700;min-width:100%}.tabulator .tabulator-row.tabulator-group:hover{cursor:pointer;background-color:#090909}.tabulator .tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #3fb449;border-bottom:0}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow{margin-left:20px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow{margin-left:40px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow{margin-left:60px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow{margin-left:80px}.tabulator .tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow{margin-left:1000px}.tabulator .tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #3fb449;vertical-align:middle}.tabulator .tabulator-row.tabulator-group span{margin-left:10px;color:#3fb449}.tabulator .tabulator-footer{padding:5px 10px;padding-top:8px;border-top:3px solid #3fb449;background-color:#222;text-align:right;color:#222;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc("100% + 20px");margin:-8px -10px 8px;text-align:left;background:#3c3c3c!important;border-bottom:1px solid #aaa;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#3c3c3c!important;color:#fff!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;padding:2px 5px;border:1px solid #aaa;border-radius:3px;background:#fff;color:#222;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page.active{color:#3fb449}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tablulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:3;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tablulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tablulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000} +/*# sourceMappingURL=tabulator_site.min.css.map */ diff --git a/css/tabulator/tabulator_site.min.css.map b/css/tabulator/tabulator_site.min.css.map new file mode 100644 index 0000000..f614cc5 --- /dev/null +++ b/css/tabulator/tabulator_site.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["tabulator_site.scss"],"names":[],"mappings":"AAyCA,WACC,kBAAkB,AAElB,6BAvCgB,AAyChB,sBA1CqB,AA4CrB,eA1Ca,AA2Cb,gBAAgB,AAChB,gBAAe,AAMf,uBAAwB,CA0nBxB,AAzoBD,iFAoBI,cAAc,CACd,AArBJ,oFA6BK,iBAAkB,CAClB,AA9BL,kCAqCE,yBAAiB,AAAjB,sBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AAtCF,6BA6CE,WAAU,AAEV,gCA5E2B,AA8E3B,WAhFmB,AAiFnB,gBAAgB,AAEhB,mBAAmB,AAGnB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAwLpB,AAlPF,yEA0CE,kBAAiB,AACjB,sBAAsB,AAKtB,sBAhFyB,AAqFzB,eAAe,CArDjB,AA4MG,4CA9IA,qBAAoB,AAIpB,4BAhGoB,AAkGpB,gBAAe,AACf,qBAAsB,CAuItB,AA5MH,6DAyEI,kBAAkB,AAClB,yBAvGyB,AAwGzB,mBAA8C,AAC9C,mBAAoB,CACpB,AA7EJ,mEAiFI,kBAAkB,AAClB,WAAW,CAsCX,AAxHJ,wFAsFK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAarB,AAzGL,gHAgGM,sBAAsB,AACtB,WAAW,AAEX,sBAAqB,AAErB,YAAW,AAEX,eAAgB,CAChB,AAxGN,oFA6GK,qBAAqB,AACrB,kBAAkB,AAClB,SAAQ,AACR,UAAS,AACT,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,4BA7ImB,CA8InB,AAtHL,0FA+HK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,0BAhKkB,AAiKlB,eAAgB,CAKhB,AAxIL,oHAsIM,iBAAiB,CACjB,AAvIN,0FA8IK,YAAa,CACb,AA/IL,+DAoJI,kBAAkB,AAClB,gCAAmD,AACnD,qBApLmB,CAqLnB,AAvJJ,qEA2JI,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAUlB,AAzKJ,8EAmKK,qBAAsB,CACtB,AApKL,yEAuKK,cAAe,CACf,AAxKL,oFA8KK,kBAAkB,CAClB,AA/KL,qEAkLK,eAAc,AACd,wBAAoD,CACpD,AApLL,uHAwLM,gBAAgB,AAChB,4BAjNkB,CAkNlB,AA1LN,sHA+LM,gBAAgB,AAChB,+BAzNmB,CA0NnB,AAjMN,uHAsMM,6BA/NmB,AAgOnB,kBAAmB,CACnB,AAxMN,+CA+MG,qBAAqB,AACrB,kBAAkB,AAIlB,SAAW,CASX,AA7NH,qEAuNI,2BA1OgB,CA2OhB,AAxNJ,sEA2NI,0BA9OgB,CA+OhB,AA5NJ,qDAgOG,sBAAqB,AACrB,eAAc,AAEd,6BAA0D,AAU1D,0BAhQiB,AAmQjB,eAAgB,CAChB,AAjPH,oEAsOI,4BAA0D,CAK1D,AA3OJ,iGAyOK,YAAa,CACb,AA1OL,kCAsPE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CA+CjC,AAzSF,wCA6PG,YAAa,CACb,AA9PH,yDAkQG,kBAAkB,AAClB,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,YAAW,AACX,UAAU,CAYV,AAtRH,8DA6QI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,cA/SyB,AAgTzB,gBAAiB,AACjB,cAAe,CACf,AArRJ,mDA0RG,kBAAiB,AACjB,qBAAoB,AACpB,sBAjTqB,AAkTrB,mBAAmB,AACnB,iBAAgB,AAChB,UAjTe,CA0Tf,AAxSH,kFAmSK,gBAAiB,AACjB,6BAA0D,AAC1D,UApUgB,CAqUhB,AAtSL,0BA6SE,kBAAkB,AAClB,sBAAsB,AACtB,gBAA0C,AAC1C,qBArUsB,CA0gBtB,AArfF,6CAoTG,wBAxU2B,CAyU3B,AArTH,qDAwTG,sBAzUqB,AA0UrB,cAAe,CACf,AA1TH,6CA6TG,wBA5U4B,CA6U5B,AA9TH,mDAiUG,yBA/UiC,AAgVjC,cAAe,CACf,AAnUH,+CAsUG,sBAAqB,AACrB,eAAe,CACf,AAxUH,2CA2UG,kBAAkB,AAElB,0BAhWiB,AAiWjB,6BAjWiB,AAmWjB,8BAA+B,AAC/B,SAAU,CACV,AAlVH,4CAqVG,qBAAqB,AACrB,kBAAkB,AAElB,yBAAyB,AAEzB,SAAW,CASX,AAnWH,kEA6VI,2BAhXgB,CAiXhB,AA9VJ,mEAiWI,0BApXgB,CAqXhB,AAlWJ,0CAuWG,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,YAAW,AACX,4BA9XiB,AA+XjB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,sBAAsB,CAsDtB,AAraH,4DAmXI,yBA/XiB,AAgYjB,SAAU,CAMV,AA1XJ,qIAuXK,WAAU,AACV,sBAAsB,CACtB,AAzXL,oEA6XI,qBAxYe,CA+Yf,AApYJ,qJA+XK,WAAU,AACV,uBAAsB,AAEtB,UA7Yc,CA8Yd,AAnYL,wFAyYK,YAAa,CACb,AA1YL,+DAgZI,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAElB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AApaJ,yFA0ZK,SAAS,CAST,AAnaL,mHA8ZM,WAAU,AACV,WAAU,AACV,iBAAoB,AACpB,eAAe,CACf,AAlaN,0CAyaG,sBAAqB,AACrB,4BA7biB,AA8bjB,0BAAyB,AACzB,gCAzc0B,AA0c1B,YAAW,AACX,kBAAiB,AACjB,gBA/cwB,AAgdxB,WA/ckB,AAgdlB,gBAAgB,AAEhB,cAAe,CAgEf,AAnfH,gDAsbI,eAAc,AACd,wBAAoD,CACpD,AAxbJ,mFA4bK,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,6BAxdoB,AAydpB,eAAgB,CAChB,AAjcL,mFAscK,gBAAgB,CAChB,AAvcL,mFA4cK,gBAAgB,CAChB,AA7cL,mFAkdK,gBAAgB,CAChB,AAndL,mFAwdK,gBAAgB,CAChB,AAzdL,mFA8dK,kBAAkB,CAClB,AA/dL,2DAoeI,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,8BApgBqB,AAqgBrB,qBAAqB,CACrB,AA7eJ,+CAgfI,iBAAgB,AAChB,aA9gByB,CA+gBzB,AAlfJ,6BAyfE,iBAAgB,AAChB,gBAAe,AACf,6BAhgB2B,AAigB3B,sBApgByB,AAqgBzB,iBAAgB,AAChB,WArgBmB,AAsgBnB,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAqEpB,AA3kBF,qDAygBG,sBAAqB,AACrB,0BAAyB,AACzB,sBAA2B,AAE3B,gBAAgB,AAEhB,6BAA0D,AAY1D,6BA9iBiB,AAgjBjB,eAAgB,CAMhB,AAniBH,oEAkhBI,6BAA0D,AAC1D,oBAAiC,CAKjC,AAxhBJ,iGAshBK,YAAa,CACb,AAvhBL,gEAgiBI,mBAAkB,AAClB,kBAAkB,CAClB,AAliBJ,8CAuiBG,YAAY,CACZ,AAxiBH,6CA4iBG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBAvjBoB,AAwjBpB,kBAAiB,AAEjB,gBAAe,AAEf,WA7jBkB,AA8jBlB,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CAiBjB,AA1kBH,oDA4jBI,aAjkByB,CAkkBzB,AA7jBJ,sDAgkBI,UAAU,CACV,AAjkBJ,kEAqkBK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AAxkBL,wCA+kBE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AA7lBF,6CAslBG,OAAM,AACN,UAAU,CACV,AAxlBH,8CA2lBG,gBAAgB,CAChB,AA5lBH,8BAkmBE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,UAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AAxoBF,oDAinBG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AAvoBH,sEA8nBI,sBAAqB,AACrB,UAAU,CACV,AAhoBJ,oEAooBI,sBAAqB,AACrB,aAAa,CACb","file":"tabulator_site.min.css","sourcesContent":["/* Tabulator v3.3.1 (c) Oliver Folkerd */\n\n\r\n//Main Theme Variables\r\n$backgroundColor: #fff; //background color of tabulator\r\n$borderColor:#222; //border to tablulator\r\n$textSize:14px; //table text size\r\n\r\n//header themeing\r\n$headerBackgroundColor:#222; //border to tablulator\r\n$headerTextColor:#fff; //header text colour\r\n$headerBorderColor:#aaa; //header border color\r\n$headerSeperatorColor:#3FB449; //header bottom seperator color\r\n$headerMargin:4px; //padding round header\r\n\r\n//column header arrows\r\n$sortArrowActive: #3FB449;\r\n$sortArrowInactive: #bbb;\r\n\r\n//row themeing\r\n$rowBackgroundColor:#fff; //table row background color\r\n$rowAltBackgroundColor:#EFEFEF; //table row background color\r\n$rowBorderColor:#aaa; //table border color\r\n$rowTextColor:#333; //table text color\r\n$rowHoverBackground:#bbb; //row background color on hover\r\n\r\n$rowSelectedBackground: #9ABCEA; //row background color when selected\r\n$rowSelectedBackgroundHover: #769BCC;//row background color when selected and hovered\r\n\r\n$editBoxColor:#1D68CD; //border color for edit boxes\r\n$errorColor:#dd0000; //error indication\r\n\r\n//footer themeing\r\n$footerBackgroundColor:#222; //border to tablulator\r\n$footerTextColor:#222; //footer text colour\r\n$footerBorderColor:#aaa; //footer border color\r\n$footerSeperatorColor:#3FB449; //footer bottom seperator color\r\n\r\n\r\n\r\n//Tabulator Containing Element\r\n.tabulator{\r\n\tposition: relative;\r\n\r\n\tborder-bottom: 5px solid $borderColor;\r\n\r\n\tbackground-color: $backgroundColor;\r\n\r\n\tfont-size:$textSize;\r\n\ttext-align: left;\r\n\toverflow:hidden;\r\n\r\n\t-webkit-transform: translatez(0);\r\n\t-moz-transform: translatez(0);\r\n\t-ms-transform: translatez(0);\r\n\t-o-transform: translatez(0);\r\n\ttransform: translatez(0);\r\n\r\n\t&[tabulator-layout=\"fitDataFill\"]{\r\n\t\t.tabulator-tableHolder{\r\n\t\t\t.tabulator-table{\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&[tabulator-layout=\"fitColumns\"]{\r\n\t\t.tabulator-row{\r\n\t\t\t.tabulator-cell{\r\n\t\t\t\t&:last-of-type{\r\n\t\t\t\t\tborder-right: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t&.tabulator-block-select{\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t//column header containing element\r\n\t.tabulator-header{\r\n\t\tposition:relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\twidth:100%;\r\n\r\n\t\tborder-bottom:3px solid $headerSeperatorColor;\r\n\t\tbackground-color: $headerBackgroundColor;\r\n\t\tcolor: $headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:hidden;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t//individual column header element\r\n\t\t.tabulator-col{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tposition:relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-right:1px solid $headerBorderColor;\r\n\t\t\tbackground-color: $headerBackgroundColor;\r\n\t\t\ttext-align:left;\r\n\t\t\tvertical-align: bottom;\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&.tabulator-moving{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tborder:1px solid $headerSeperatorColor;\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%);\r\n\t\t\t\tpointer-events: none;\r\n\t\t\t}\r\n\r\n\t\t\t//hold content of column header\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding:8px;\r\n\r\n\t\t\t\t//hold title of column header\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\twhite-space: nowrap;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\t\tvertical-align:bottom;\r\n\r\n\t\t\t\t\t//element to hold title editor\r\n\t\t\t\t\t.tabulator-title-editor{\r\n\t\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\tborder:1px solid #999;\r\n\r\n\t\t\t\t\t\tpadding:1px;\r\n\r\n\t\t\t\t\t\tbackground: #fff;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:14px;\r\n\t\t\t\t\tright:8px;\r\n\t\t\t\t\twidth: 0;\r\n\t\t\t\t\theight: 0;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t//complex header column group\r\n\t\t\t&.tabulator-col-group{\r\n\r\n\t\t\t\t//gelement to hold sub columns in column group\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tposition:relative;\r\n\t\t\t\t\tdisplay: flex;\r\n\r\n\t\t\t\t\tborder-top:1px solid $headerBorderColor;\r\n\t\t\t\t\toverflow: hidden;\r\n\r\n\t\t\t\t\t.tabulator-col:last-child{\r\n\t\t\t\t\t\tmargin-right:-1px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//placeholder element for sortable columns\r\n\t\t\t&.ui-sortable-helper{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tbackground-color: $headerBackgroundColor !important;\r\n\t\t\t\tborder:1px solid $headerBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t//header filter containing element\r\n\t\t\t.tabulator-header-filter{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\tmargin-top:2px;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\ttext-align: center;\r\n\r\n\t\t\t\t//styling adjustment for inbuilt editors\r\n\t\t\t\ttextarea{\r\n\t\t\t\t\theight:auto !important;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsvg{\r\n\t\t\t\t\tmargin-top: 3px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//styling child elements for sortable columns\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:25px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"none\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"desc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\tborder-bottom: none;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\t// background-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tmin-width:200%;\r\n\r\n\t\t\tbackground:lighten($headerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($headerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\t// border-bottom:1px solid $headerBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\t}\r\n\r\n\t//scrolling element to hold table\r\n\t.tabulator-tableHolder{\r\n\t\tposition:relative;\r\n\t\twidth:100%;\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:auto;\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\r\n\t\t&:focus{\r\n\t\t\toutline: none;\r\n\t\t}\r\n\r\n\t\t//default placeholder element\r\n\t\t.tabulator-placeholder{\r\n\t\t\tposition: absolute;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\ttop:0;\r\n\t\t\tleft:0;\r\n\t\t\theight:100%;\r\n\t\t\twidth:100%;\r\n\r\n\t\t\tspan{\r\n\t\t\t\tdisplay: inline-block;\r\n\r\n\t\t\t\tmargin:0 auto;\r\n\t\t\t\tpadding:10px;\r\n\r\n\t\t\t\tcolor:$headerSeperatorColor;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tfont-size: 20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//element to hold table rows\r\n\t\t.tabulator-table{\r\n\t\t\tposition:relative;\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tbackground-color:$rowBackgroundColor;\r\n\t\t\twhite-space: nowrap;\r\n\t\t\toverflow:visible;\r\n\t\t\tcolor:$rowTextColor;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\t&.tabulator-calcs{\r\n\t\t\t\t\tfont-weight: bold;\r\n\t\t\t\t\tbackground:lighten($headerBackgroundColor, 15%) !important;\r\n\t\t\t\t\tcolor:$headerTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//row element\r\n\t.tabulator-row{\r\n\t\tposition: relative;\r\n\t\tbox-sizing: border-box;\r\n\t\tmin-height:$textSize + ($headerMargin * 2);\r\n\t\tbackground-color: $rowBackgroundColor;\r\n\r\n\r\n\t\t&.tabulator-row-even{\r\n\t\t\tbackground-color: $rowAltBackgroundColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-selectable:hover{\r\n\t\t\tbackground-color:$rowHoverBackground;\r\n\t\t\tcursor: pointer;\r\n\t\t}\r\n\r\n\t\t&.tabulator-selected{\r\n\t\t\tbackground-color:$rowSelectedBackground;\r\n\t\t}\r\n\r\n\t\t&.tabulator-selected:hover{\r\n\t\t\tbackground-color:$rowSelectedBackgroundHover;\r\n\t\t\tcursor: pointer;\r\n\t\t}\r\n\r\n\t\t&.tabulator-row-moving{\r\n\t\t\tborder:1px solid #000;\r\n\t\t\tbackground:#fff;\r\n\t\t}\r\n\r\n\t\t&.tabulator-moving{\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t\tpointer-events: none !important;\r\n\t\t\tz-index:15;\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\tbackground-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//cell element\r\n\t\t.tabulator-cell{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition: relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tpadding:6px;\r\n\t\t\tborder-right:1px solid $rowBorderColor;\r\n\t\t\tvertical-align:middle;\r\n\t\t\twhite-space:nowrap;\r\n\t\t\toverflow:hidden;\r\n\t\t\ttext-overflow:ellipsis;\r\n\r\n\r\n\t\t\t&.tabulator-editing{\r\n\t\t\t\tborder:1px solid $editBoxColor;\r\n\t\t\t\tpadding: 0;\r\n\r\n\t\t\t\tinput, select{\r\n\t\t\t\t\tborder:1px;\r\n\t\t\t\t\tbackground:transparent;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-validation-fail{\r\n\t\t\t\tborder:1px solid $errorColor;\r\n\t\t\t\tinput, select{\r\n\t\t\t\t\tborder:1px;\r\n\t\t\t\t\tbackground:transparent;\r\n\r\n\t\t\t\t\tcolor: $errorColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//movable row handle\r\n\t\t\t&.tabulator-row-handle{\r\n\r\n\t\t\t\tdisplay: inline-flex;\r\n\t\t\t\talign-items:center;\r\n\r\n\t\t\t\t-moz-user-select: none;\r\n\t\t\t\t-khtml-user-select: none;\r\n\t\t\t\t-webkit-user-select: none;\r\n\t\t\t\t-o-user-select: none;\r\n\r\n\t\t\t\t//handle holder\r\n\t\t\t\t.tabulator-row-handle-box{\r\n\t\t\t\t\twidth:80%;\r\n\r\n\t\t\t\t\t//Hamburger element\r\n\t\t\t\t\t.tabulator-row-handle-bar{\r\n\t\t\t\t\t\twidth:100%;\r\n\t\t\t\t\t\theight:3px;\r\n\t\t\t\t\t\tmargin:2px 10% 0 10%;\r\n\t\t\t\t\t\tbackground:#666;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//row grouping element\r\n\t\t&.tabulator-group{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-right:1px solid $rowBorderColor;\r\n\t\t\tborder-top:1px solid #000;\r\n\t\t\tborder-bottom:2px solid $headerSeperatorColor;\r\n\t\t\tpadding:5px;\r\n\t\t\tpadding-left:10px;\r\n\t\t\tbackground:$headerBackgroundColor;\r\n\t\t\tcolor:$headerTextColor;\r\n\t\t\tfont-weight:bold;\r\n\r\n\t\t\tmin-width: 100%;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-visible{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-right:10px;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\tborder-bottom: 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-level-1{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-left:20px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-level-2{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-left:40px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-level-3{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-left:60px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-level-4{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-left:80px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-group-level-5{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tmargin-left:1000px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//sorting arrow\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tdisplay: inline-block;\r\n\t\t\t\twidth: 0;\r\n\t\t\t\theight: 0;\r\n\t\t\t\tmargin-right:16px;\r\n\t\t\t\tborder-top: 6px solid transparent;\r\n\t\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\t\tborder-right: 0;\r\n\t\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\t\tvertical-align:middle;\r\n\t\t\t}\r\n\r\n\t\t\tspan{\r\n\t\t\t\tmargin-left:10px;\r\n\t\t\t\tcolor:$headerSeperatorColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t//footer element\r\n\t.tabulator-footer{\r\n\t\tpadding:5px 10px;\r\n\t\tpadding-top:8px;\r\n\t\tborder-top:3px solid $footerSeperatorColor;\r\n\t\tbackground-color: $footerBackgroundColor;\r\n\t\ttext-align:right;\r\n\t\tcolor: $footerTextColor;\r\n\t\tfont-weight:bold;\r\n\t\twhite-space:nowrap;\r\n\t\tuser-select:none;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\twidth:calc(\"100% + 20px\");\r\n\t\t\tmargin:-8px -10px 8px -10px;\r\n\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\tbackground:lighten($footerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($footerBackgroundColor, 10%) !important;\r\n\t\t\t\tcolor:$headerTextColor !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// border-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&:only-child{\r\n\t\t\t\tmargin-bottom:-5px;\r\n\t\t\t\tborder-bottom:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-pages{\r\n\t\t\tmargin:0 7px;\r\n\t\t}\r\n\r\n\t\t//pagination button\r\n\t\t.tabulator-page{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 2px;\r\n\t\t\tpadding:2px 5px;\r\n\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\r\n\t\t\tbackground:#fff;\r\n\r\n\t\t\tcolor: $footerTextColor;\r\n\t\t\tfont-family:inherit;\r\n\t\t\tfont-weight:inherit;\r\n\t\t\tfont-size:inherit;\r\n\r\n\t\t\t&.active{\r\n\t\t\t\tcolor:$footerSeperatorColor;\r\n\t\t\t}\r\n\r\n\t\t\t&:disabled{\r\n\t\t\t\topacity:.5;\r\n\t\t\t}\r\n\r\n\t\t\t&:not(.disabled){\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground:rgba(0,0,0,.2);\r\n\t\t\t\t\tcolor:#fff;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\ttop:0;\r\n\t\tbottom:0;\r\n\t\twidth:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\tleft:0;\r\n\t\t\tright:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ew-resize;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//holding div that contains loader and covers tabulator element to prevent interaction\r\n\t.tablulator-loader{\r\n\t\tposition:absolute;\r\n\t\tdisplay: flex;\r\n\t\talign-items:center;\r\n\r\n\t\ttop:0;\r\n\t\tleft:0;\r\n\t\tz-index:100;\r\n\r\n\t\theight:100%;\r\n\t\twidth:100%;\r\n\t\tbackground:rgba(0,0,0,.4);\r\n\t\ttext-align:center;\r\n\r\n\t\t//loading message element\r\n\t\t.tabulator-loader-msg{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 auto;\r\n\t\t\tpadding:10px 20px;\r\n\r\n\t\t\tborder-radius:10px;\r\n\r\n\t\t\tbackground:#fff;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:16px;\r\n\r\n\t\t\t//loading message\r\n\t\t\t&.tabulator-loading{\r\n\t\t\t\tborder:4px solid #333;\r\n\t\t\t\tcolor:#000;\r\n\t\t\t}\r\n\r\n\t\t\t//error message\r\n\t\t\t&.tabulator-error{\r\n\t\t\t\tborder:4px solid #D00;\r\n\t\t\t\tcolor:#590000;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}"]} \ No newline at end of file diff --git a/js/tabulator/.gitignore b/js/tabulator/.gitignore new file mode 100644 index 0000000..9d550b4 --- /dev/null +++ b/js/tabulator/.gitignore @@ -0,0 +1,5 @@ +*.sublime-project +*.sublime-workspace + +node_modules/ +npm-debug.log diff --git a/js/tabulator/LICENSE b/js/tabulator/LICENSE new file mode 100644 index 0000000..b594639 --- /dev/null +++ b/js/tabulator/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017 Oli Folkerd + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/js/tabulator/README.md b/js/tabulator/README.md new file mode 100644 index 0000000..2cf44f6 --- /dev/null +++ b/js/tabulator/README.md @@ -0,0 +1,74 @@ +![Tabluator Table](http://olifolkerd.github.io/tabulator/images/tabulator.png) + +### Version 3.3 Out Now! + +An easy to use interactive table generation plugin for JQuery UI + +Full documentation & demos can be found at: [http://tabulator.info](http://tabulator.info) +*** +![Tabluator Table](http://tabulator.info/images/tabulator_table.jpg) +*** +Features +================================ +Tabulator allows you to create interactive tables in seconds from any HTML Table, Javascript Array or JSON formatted data. + +Simply include the library and the css in your JQuery UI project and you're away! + +Tabulator is packed with useful features including: + +![Tabluator Features](http://olifolkerd.github.io/tabulator/images/featurelist_share.png) + +Setup +================================ +Setting up tabulator could not be simpler. + +Include the library and the css +```html + + +``` + +Create an element to hold the table +```html +
+``` + +Turn the element into a tabulator with some simple javascript +```js +$("#example-table").tabulator(); +``` + + +### Bower Installation +To get Tabulator via the Bower package manager, open a terminal in your project directory and run the following commmand: +``` +bower install tabulator --save +``` + +### NPM Installation +To get Tabulator via the NPM package manager, open a terminal in your project directory and run the following commmand: +``` +npm install jquery.tabulator --save +``` + +### CDNJS +To access Tabulator directly from the CDNJS CDN servers, include the following two lines at the start of your project, instead of the localy hosted versions: +```html + + + +Coming Soon +================================ +Tabulator is actively under development and I plan to have even more useful features implemented soon, including: + +- Data Reactivity +- Custom Row Templates +- Additional Editors and Formatters +- Copy to Clipboard +- Print Styling +- Drag Rows Between Tables +- Multi Cell Editing +- Resizable Rows +- Cell Selection + +Get in touch if there are any features you feel Tabulator needs. \ No newline at end of file diff --git a/js/tabulator/bower.json b/js/tabulator/bower.json new file mode 100644 index 0000000..7f0c9da --- /dev/null +++ b/js/tabulator/bower.json @@ -0,0 +1,36 @@ +{ + "name": "tabulator", + "main": "dist/js/tabulator.js", + "version": "3.3.1", + "description": "Interactive table generation plugin for jQuery UI", + "keywords": [ + "table", + "grid", + "datagrid", + "tabulator", + "editable", + "cookie", + "jquery", + "jqueryui", + "sort", + "format", + "resizable", + "list", + "scrollable", + "ajax", + "json", + "widget" + ], + "authors": [ + "Oli Folkerd" + ], + "license": "MIT", + "homepage": "https://github.com/olifolkerd/tabulator", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ] +} diff --git a/js/tabulator/dist/js/tabulator.js b/js/tabulator/dist/js/tabulator.js new file mode 100644 index 0000000..fe17014 --- /dev/null +++ b/js/tabulator/dist/js/tabulator.js @@ -0,0 +1,14526 @@ +'use strict'; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +/* Tabulator v3.3.1 (c) Oliver Folkerd */ + +/* + * This file is part of the Tabulator package. + * + * (c) Oliver Folkerd + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Full Documentation & Demos can be found at: http://olifolkerd.github.io/tabulator/ + * + */ + +(function (factory) { + "use strict"; + + if (typeof define === 'function' && define.amd) { + define(['jquery'], factory); + } else if (typeof module !== 'undefined' && module.exports) { + module.exports = factory(require('jquery')); + } else { + factory(jQuery); + } +})(function ($, undefined) { + + (function () { + + 'use strict'; + + // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex + + + if (!Array.prototype.findIndex) { + + Object.defineProperty(Array.prototype, 'findIndex', { + + value: function value(predicate) { + + // 1. Let O be ? ToObject(this value). + + + if (this == null) { + + throw new TypeError('"this" is null or not defined'); + } + + var o = Object(this); + + // 2. Let len be ? ToLength(? Get(O, "length")). + + + var len = o.length >>> 0; + + // 3. If IsCallable(predicate) is false, throw a TypeError exception. + + + if (typeof predicate !== 'function') { + + throw new TypeError('predicate must be a function'); + } + + // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. + + + var thisArg = arguments[1]; + + // 5. Let k be 0. + + + var k = 0; + + // 6. Repeat, while k < len + + + while (k < len) { + + // a. Let Pk be ! ToString(k). + + + // b. Let kValue be ? Get(O, Pk). + + + // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). + + + // d. If testResult is true, return k. + + + var kValue = o[k]; + + if (predicate.call(thisArg, kValue, k, o)) { + + return k; + } + + // e. Increase k by 1. + + + k++; + } + + // 7. Return -1. + + + return -1; + } + + }); + } + + // https://tc39.github.io/ecma262/#sec-array.prototype.find + + + if (!Array.prototype.find) { + + Object.defineProperty(Array.prototype, 'find', { + + value: function value(predicate) { + + // 1. Let O be ? ToObject(this value). + + + if (this == null) { + + throw new TypeError('"this" is null or not defined'); + } + + var o = Object(this); + + // 2. Let len be ? ToLength(? Get(O, "length")). + + + var len = o.length >>> 0; + + // 3. If IsCallable(predicate) is false, throw a TypeError exception. + + + if (typeof predicate !== 'function') { + + throw new TypeError('predicate must be a function'); + } + + // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. + + + var thisArg = arguments[1]; + + // 5. Let k be 0. + + + var k = 0; + + // 6. Repeat, while k < len + + + while (k < len) { + + // a. Let Pk be ! ToString(k). + + + // b. Let kValue be ? Get(O, Pk). + + + // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). + + + // d. If testResult is true, return kValue. + + + var kValue = o[k]; + + if (predicate.call(thisArg, kValue, k, o)) { + + return kValue; + } + + // e. Increase k by 1. + + + k++; + } + + // 7. Return undefined. + + + return undefined; + } + + }); + } + + var ColumnManager = function ColumnManager(table) { + + this.table = table; //hold parent table + + + this.headersElement = $("
"); + + this.element = $("
"); //containing element + + + this.rowManager = null; //hold row manager object + + + this.columns = []; // column definition object + + + this.columnsByIndex = []; //columns by index + + + this.columnsByField = []; //columns by field + + + this.scrollLeft = 0; + + this.element.prepend(this.headersElement); + }; + + ////////////// Setup Functions ///////////////// + + + //link to row manager + + + ColumnManager.prototype.setRowManager = function (manager) { + + this.rowManager = manager; + }; + + //return containing element + + + ColumnManager.prototype.getElement = function () { + + return this.element; + }; + + //return header containing element + + + ColumnManager.prototype.getHeadersElement = function () { + + return this.headersElement; + }; + + //scroll horizontally to match table body + + + ColumnManager.prototype.scrollHorizontal = function (left) { + + var hozAdjust = 0, + scrollWidth = this.element[0].scrollWidth - this.table.element.innerWidth(); + + this.element.scrollLeft(left); + + //adjust for vertical scrollbar moving table when present + + + if (left > scrollWidth) { + + hozAdjust = left - scrollWidth; + + this.element.css("margin-left", -hozAdjust); + } else { + + this.element.css("margin-left", 0); + } + + //keep frozen columns fixed in position + + + //this._calcFrozenColumnsPos(hozAdjust + 3); + + + this.scrollLeft = left; + + if (this.table.extExists("frozenColumns")) { + + this.table.extensions.frozenColumns.layout(); + } + }; + + ///////////// Column Setup Functions ///////////// + + + ColumnManager.prototype.setColumns = function (cols, row) { + + var self = this; + + self.headersElement.empty(); + + self.columns = []; + + self.columnsByIndex = []; + + self.columnsByField = []; + + //reset frozen columns + + + if (self.table.extExists("frozenColumns")) { + + self.table.extensions.frozenColumns.reset(); + } + + cols.forEach(function (def, i) { + + self._addColumn(def); + }); + + self._reIndexColumns(); + + if (self.table.options.responsiveLayout && self.table.extExists("responsiveLayout", true)) { + + self.table.extensions.responsiveLayout.initialize(); + } + + self.redraw(true); + }; + + ColumnManager.prototype._addColumn = function (definition, before, nextToColumn) { + + var column = new Column(definition, this); + + var index = nextToColumn ? this.findColumnIndex(nextToColumn) : nextToColumn; + + if (nextToColumn && index > -1) { + + var parentIndex = this.columns.indexOf(nextToColumn.getTopColumn()); + + if (before) { + + this.columns.splice(parentIndex, 0, column); + + nextToColumn.getElement().before(column.getElement()); + } else { + + this.columns.splice(parentIndex + 1, 0, column); + + nextToColumn.getElement().after(column.getElement()); + } + } else { + + if (before) { + + this.columns.unshift(column); + + this.headersElement.prepend(column.getElement()); + } else { + + this.columns.push(column); + + this.headersElement.append(column.getElement()); + } + } + + return column; + }; + + ColumnManager.prototype.registerColumnField = function (col) { + + if (col.definition.field) { + + this.columnsByField[col.definition.field] = col; + } + }; + + ColumnManager.prototype.registerColumnPosition = function (col) { + + this.columnsByIndex.push(col); + }; + + ColumnManager.prototype._reIndexColumns = function () { + + this.columnsByIndex = []; + + this.columns.forEach(function (column) { + + column.reRegisterPosition(); + }); + }; + + //ensure column headers take up the correct amount of space in column groups + + + ColumnManager.prototype._verticalAlignHeaders = function () { + + var self = this; + + self.columns.forEach(function (column) { + + column.clearVerticalAlign(); + }); + + self.columns.forEach(function (column) { + + column.verticalAlign(self.table.options.columnVertAlign); + }); + + self.rowManager.adjustTableSize(); + }; + + //////////////// Column Details ///////////////// + + + ColumnManager.prototype.findColumn = function (subject) { + + var self = this; + + if ((typeof subject === 'undefined' ? 'undefined' : _typeof(subject)) == "object") { + + if (subject instanceof Column) { + + //subject is column element + + + return subject; + } else if (subject instanceof ColumnComponent) { + + //subject is public column component + + + return subject._getSelf() || false; + } else if (subject instanceof jQuery) { + + //subject is a jquery element of the column header + + + var match = self.columns.find(function (column) { + + return column.element === subject; + }); + + return match || false; + } + } else { + + //subject should be treated as the field name of the column + + + return this.columnsByField[subject] || false; + } + + //catch all for any other type of input + + + return false; + }; + + ColumnManager.prototype.getColumnByField = function (field) { + + return this.columnsByField[field]; + }; + + ColumnManager.prototype.getColumnByIndex = function (index) { + + return this.columnsByIndex[index]; + }; + + ColumnManager.prototype.getColumns = function () { + + return this.columns; + }; + + ColumnManager.prototype.findColumnIndex = function (column) { + + return this.columnsByIndex.findIndex(function (col) { + + return column === col; + }); + }; + + //return all columns that are not groups + + + ColumnManager.prototype.getRealColumns = function () { + + return this.columnsByIndex; + }; + + //travers across columns and call action + + + ColumnManager.prototype.traverse = function (callback) { + + var self = this; + + self.columnsByIndex.forEach(function (column, i) { + + callback(column, i); + }); + }; + + //get defintions of actual columns + + + ColumnManager.prototype.getDefinitions = function (active) { + + var self = this, + output = []; + + self.columnsByIndex.forEach(function (column) { + + if (!active || active && column.visible) { + + output.push(column.getDefinition()); + } + }); + + return output; + }; + + //get full nested definition tree + + + ColumnManager.prototype.getDefinitionTree = function () { + + var self = this, + output = []; + + self.columns.forEach(function (column) { + + output.push(column.getDefinition(true)); + }); + + return output; + }; + + ColumnManager.prototype.getComponents = function () { + + var self = this, + output = []; + + self.columnsByIndex.forEach(function (column) { + + output.push(column.getComponent()); + }); + + return output; + }; + + ColumnManager.prototype.getWidth = function () { + + var width = 0; + + this.columnsByIndex.forEach(function (column) { + + if (column.visible) { + + width += column.getWidth(); + } + }); + + return width; + }; + + ColumnManager.prototype.moveColumn = function (from, to, after) { + + this._moveColumnInArray(this.columns, from, to, after); + + this._moveColumnInArray(this.columnsByIndex, from, to, after, true); + + this.table.options.columnMoved(from.getComponent()); + + if (this.table.options.persistentLayout && this.table.extExists("persistentLayout", true)) { + + this.table.extensions.persistentLayout.save(); + } + }; + + ColumnManager.prototype._moveColumnInArray = function (columns, from, to, after, updateRows) { + + var fromIndex = columns.indexOf(from), + toIndex; + + if (fromIndex > -1) { + + columns.splice(fromIndex, 1); + + toIndex = columns.indexOf(to); + + if (toIndex > -1) { + + if (after) { + + toIndex = toIndex + 1; + } + } else { + + toIndex = fromIndex; + } + + columns.splice(toIndex, 0, from); + + if (updateRows) { + + this.table.rowManager.rows.forEach(function (row) { + + if (row.cells.length) { + + var cell = row.cells.splice(fromIndex, 1)[0]; + + row.cells.splice(toIndex, 0, cell); + } + }); + } + } + }; + + //////////////// Cell Management ///////////////// + + + ColumnManager.prototype.generateCells = function (row) { + + var self = this; + + var cells = []; + + self.columnsByIndex.forEach(function (column) { + + cells.push(column.generateCell(row)); + }); + + return cells; + }; + + //////////////// Column Management ///////////////// + + + ColumnManager.prototype.getFlexBaseWidth = function () { + + var self = this, + totalWidth = self.table.element.innerWidth(), + //table element width + + + fixedWidth = 0; + + //adjust for vertical scrollbar if present + + + if (self.rowManager.element[0].scrollHeight > self.rowManager.element.innerHeight()) { + + totalWidth -= self.rowManager.element[0].offsetWidth - self.rowManager.element[0].clientWidth; + } + + this.columnsByIndex.forEach(function (column) { + + var width, minWidth, colWidth; + + if (column.visible) { + + width = column.definition.width || 0; + + minWidth = typeof column.minWidth == "undefined" ? self.table.options.columnMinWidth : parseInt(column.minWidth); + + if (typeof width == "string") { + + if (width.indexOf("%") > -1) { + + colWidth = totalWidth / 100 * parseInt(width); + } else { + + colWidth = parseInt(width); + } + } else { + + colWidth = width; + } + + fixedWidth += colWidth > minWidth ? colWidth : minWidth; + } + }); + + return fixedWidth; + }; + + ColumnManager.prototype.addColumn = function (definition, before, nextToColumn) { + + var column = this._addColumn(definition, before, nextToColumn); + + this._reIndexColumns(); + + if (this.table.options.responsiveLayout && this.table.extExists("responsiveLayout", true)) { + + this.table.extensions.responsiveLayout.initialize(); + } + + if (this.table.extExists("columnCalcs")) { + + this.table.extensions.columnCalcs.recalc(this.table.rowManager.displayRows); + } + + this.redraw(); + + if (this.table.extensions.layout.getMode() != "fitColumns") { + + column.reinitializeWidth(); + } + + this._verticalAlignHeaders(); + + this.table.rowManager.reinitialize(); + }; + + //remove column from system + + + ColumnManager.prototype.deregisterColumn = function (column) { + + var field = column.getField(), + index; + + //remove from field list + + + if (field) { + + delete this.columnsByField[field]; + } + + //remove from index list + + + index = this.columnsByIndex.indexOf(column); + + if (index > -1) { + + this.columnsByIndex.splice(index, 1); + } + + //remove from column list + + + index = this.columns.indexOf(column); + + if (index > -1) { + + this.columns.splice(index, 1); + } + + if (this.table.options.responsiveLayout && this.table.extExists("responsiveLayout", true)) { + + this.table.extensions.responsiveLayout.initialize(); + } + + this.redraw(); + }; + + //redraw columns + + + ColumnManager.prototype.redraw = function (force) { + + if (force) { + + if (this.element.is(":visible")) { + + this._verticalAlignHeaders(); + } + + this.table.rowManager.resetScroll(); + + this.table.rowManager.reinitialize(); + } + + if (this.table.extensions.layout.getMode() == "fitColumns") { + + this.table.extensions.layout.layout(); + } else { + + if (force) { + + this.table.extensions.layout.layout(); + } else { + + if (this.table.options.responsiveLayout && this.table.extExists("responsiveLayout", true)) { + + this.table.extensions.responsiveLayout.update(); + } + } + } + + if (this.table.extExists("frozenColumns")) { + + this.table.extensions.frozenColumns.layout(); + } + + if (this.table.extExists("columnCalcs")) { + + this.table.extensions.columnCalcs.recalc(this.table.rowManager.displayRows); + } + + if (force) { + + if (this.table.options.persistentLayout && this.table.extExists("persistentLayout", true)) { + + this.table.extensions.persistentLayout.save(); + } + + if (this.table.extExists("columnCalcs")) { + + this.table.extensions.columnCalcs.redraw(); + } + } + + this.table.footerManager.redraw(); + }; + + //public column object + + var ColumnComponent = function ColumnComponent(column) { + + this.column = column; + + this.type = "ColumnComponent"; + }; + + ColumnComponent.prototype.getElement = function () { + + return this.column.getElement(); + }; + + ColumnComponent.prototype.getDefinition = function () { + + return this.column.getDefinition(); + }; + + ColumnComponent.prototype.getField = function () { + + return this.column.getField(); + }; + + ColumnComponent.prototype.getCells = function () { + + var cells = []; + + this.column.cells.forEach(function (cell) { + + cells.push(cell.getComponent()); + }); + + return cells; + }; + + ColumnComponent.prototype.getVisibility = function () { + + return this.column.visible; + }; + + ColumnComponent.prototype.show = function () { + + this.column.show(); + }; + + ColumnComponent.prototype.hide = function () { + + this.column.hide(); + }; + + ColumnComponent.prototype.toggle = function () { + + if (this.column.visible) { + + this.column.hide(); + } else { + + this.column.show(); + } + }; + + ColumnComponent.prototype.delete = function () { + + this.column.delete(); + }; + + ColumnComponent.prototype._getSelf = function () { + + return this.column; + }; + + var Column = function Column(def, parent) { + + var self = this; + + this.table = parent.table; + + this.definition = def; //column definition + + this.parent = parent; //hold parent object + + this.type = "column"; //type of element + + this.columns = []; //child columns + + this.cells = []; //cells bound to this column + + this.element = $("
"); //column header element + + this.contentElement = false; + + this.groupElement = $("
"); //column group holder element + + this.isGroup = false; + + this.tooltip = false; //hold column tooltip + + this.hozAlign = ""; //horizontal text alignment + + + //multi dimentional filed handling + + this.field = ""; + + this.fieldStructure = ""; + + this.getFieldValue = ""; + + this.setFieldValue = ""; + + this.setField(this.definition.field); + + this.extensions = {}; //hold extension variables; + + + this.cellEvents = { + + cellClick: false, + + cellDblClick: false, + + cellContext: false, + + cellTap: false, + + cellDblTap: false, + + cellTapHold: false + + }; + + this.width = null; //column width + + this.minWidth = null; //column minimum width + + this.widthFixed = false; //user has specified a width for this column + + + this.visible = true; //default visible state + + + //initialize column + + if (def.columns) { + + this.isGroup = true; + + def.columns.forEach(function (def, i) { + + var newCol = new Column(def, self); + + self.attachColumn(newCol); + }); + + self.checkColumnVisibility(); + } else { + + parent.registerColumnField(this); + } + + if (def.rowHandle && this.table.options.movableRows !== false && this.table.extExists("moveRow")) { + + this.table.extensions.moveRow.setHandle(true); + } + + this._mapDepricatedFunctionality(); + + this._buildHeader(); + }; + + //////////////// Setup Functions ///////////////// + + Column.prototype._mapDepricatedFunctionality = function (field) { + + if (this.definition.tooltipHeader) { + + console.warn("The%c tooltipHeader%c column definition property has been depricated and will be removed in version 4.0, use %c headerTooltio%c instead.", "font-weight:bold;", "font-weight:regular;", "font-weight:bold;", "font-weight:regular;"); + + if (typeof this.definition.headerTooltip == "undefined") { + + this.definition.headerTooltip = this.definition.tooltipHeader; + } + } + }; + + Column.prototype.setField = function (field) { + + this.field = field; + + this.fieldStructure = field ? field.split(".") : []; + + this.getFieldValue = this.fieldStructure.length > 1 ? this._getNestedData : this._getFlatData; + + this.setFieldValue = this.fieldStructure.length > 1 ? this._setNesteData : this._setFlatData; + }; + + //register column position with column manager + + Column.prototype.registerColumnPosition = function (column) { + + this.parent.registerColumnPosition(column); + }; + + //register column position with column manager + + Column.prototype.registerColumnField = function (column) { + + this.parent.registerColumnField(column); + }; + + //trigger position registration + + Column.prototype.reRegisterPosition = function () { + + if (this.isGroup) { + + this.columns.forEach(function (column) { + + column.reRegisterPosition(); + }); + } else { + + this.registerColumnPosition(this); + } + }; + + //build header element + + Column.prototype._buildHeader = function () { + + var self = this, + def = self.definition, + dblTap, + tapHold, + tap; + + self.element.empty(); + + self.contentElement = self._buildColumnHeaderContent(); + + self.element.append(self.contentElement); + + if (self.isGroup) { + + self._buildGroupHeader(); + } else { + + self._buildColumnHeader(); + } + + //set header tooltips + + var tooltip = def.headerTooltip || def.tooltip === false ? def.headerTooltip : self.table.options.tooltipsHeader; + + if (tooltip) { + + if (tooltip === true) { + + if (def.field) { + + self.table.extensions.localize.bind("columns." + def.field, function (value) { + + self.element.attr("title", value || def.title); + }); + } else { + + self.element.attr("title", def.title); + } + } else { + + if (typeof tooltip == "function") { + + tooltip = tooltip(self.getComponent()); + } + + self.element.attr("title", tooltip); + } + } else { + + self.element.attr("title", ""); + } + + //set resizable handles + + if (self.table.options.resizableColumns && self.table.extExists("resizeColumns")) { + + self.table.extensions.resizeColumns.initializeColumn("header", self, self.element); + } + + //set resizable handles + + if (def.headerFilter && self.table.extExists("filter") && self.table.extExists("edit")) { + + if (typeof def.headerFilterPlaceholder !== "undefined" && def.field) { + + self.table.extensions.localize.setHeaderFilterColumnPlaceholder(def.field, def.headerFilterPlaceholder); + } + + self.table.extensions.filter.initializeColumn(self); + } + + //set resizable handles + + if (self.table.extExists("frozenColumns")) { + + self.table.extensions.frozenColumns.initializeColumn(self); + } + + //set movable column + + if (self.table.options.movableColumns && !self.isGroup && self.table.extExists("moveColumn")) { + + self.table.extensions.moveColumn.initializeColumn(self); + } + + //set calcs column + + if ((def.topCalc || def.bottomCalc) && self.table.extExists("columnCalcs")) { + + self.table.extensions.columnCalcs.initializeColumn(self); + } + + //setup header click event bindings + + if (typeof def.headerClick == "function") { + + self.element.on("click", function (e) { + def.headerClick(e, self.getComponent()); + }); + } + + if (typeof def.headerDblClick == "function") { + + self.element.on("dblclick", function (e) { + def.headerDblClick(e, self.getComponent()); + }); + } + + if (typeof def.headerContext == "function") { + + self.element.on("contextmenu", function (e) { + def.headerContext(e, self.getComponent()); + }); + } + + //setup header tap event bindings + + if (typeof def.headerTap == "function") { + + tap = false; + + self.element.on("touchstart", function (e) { + + tap = true; + }); + + self.element.on("touchend", function (e) { + + if (tap) { + + def.headerTap(e, self.getComponent()); + } + + tap = false; + }); + } + + if (typeof def.headerDblTap == "function") { + + dblTap = null; + + self.element.on("touchend", function (e) { + + if (dblTap) { + + clearTimeout(dblTap); + + dblTap = null; + + def.headerDblTap(e, self.getComponent()); + } else { + + dblTap = setTimeout(function () { + + clearTimeout(dblTap); + + dblTap = null; + }, 300); + } + }); + } + + if (typeof def.headerTapHold == "function") { + + tapHold = null; + + self.element.on("touchstart", function (e) { + + clearTimeout(tapHold); + + tapHold = setTimeout(function () { + + clearTimeout(tapHold); + + tapHold = null; + + tap = false; + + def.headerTapHold(e, self.getComponent()); + }, 1000); + }); + + self.element.on("touchend", function (e) { + + clearTimeout(tapHold); + + tapHold = null; + }); + } + + //store column cell click event bindings + + if (typeof def.cellClick == "function") { + + self.cellEvents.cellClick = def.cellClick; + } + + if (typeof def.cellDblClick == "function") { + + self.cellEvents.cellDblClick = def.cellDblClick; + } + + if (typeof def.cellContext == "function") { + + self.cellEvents.cellContext = def.cellContext; + } + + //setup column cell tap event bindings + + if (typeof def.cellTap == "function") { + + self.cellEvents.cellTap = def.cellTap; + } + + if (typeof def.cellDblTap == "function") { + + self.cellEvents.cellDblTap = def.cellDblTap; + } + + if (typeof def.cellTapHold == "function") { + + self.cellEvents.cellTapHold = def.cellTapHold; + } + }; + + //build header element for header + + Column.prototype._buildColumnHeader = function () { + + var self = this, + def = self.definition, + table = self.table, + sortable; + + //set column sorter + + if (table.extExists("sort")) { + + table.extensions.sort.initializeColumn(self, self.contentElement); + } + + //set column formatter + + if (table.extExists("format")) { + + table.extensions.format.initializeColumn(self); + } + + //set column editor + + if (typeof def.editor != "undefined" && table.extExists("edit")) { + + table.extensions.edit.initializeColumn(self); + } + + //set colum validator + + if (typeof def.validator != "undefined" && table.extExists("validate")) { + + table.extensions.validate.initializeColumn(self); + } + + //set column mutator + + if (typeof def.mutator != "undefined" && table.extExists("mutator")) { + + table.extensions.mutator.initializeColumn(self); + } + + //set column accessor + + if (typeof def.accessor != "undefined" && table.extExists("accessor")) { + + table.extensions.accessor.initializeColumn(self); + } + + //set column visibility + + if (typeof def.visible != "undefined") { + + if (def.visible) { + + self.show(); + } else { + + self.hide(); + } + } + + //asign additional css classes to column header + + if (def.cssClass) { + + self.element.addClass(def.cssClass); + } + + //set min width if present + + self.setMinWidth(typeof def.minWidth == "undefined" ? self.table.options.columnMinWidth : def.minWidth); + + self.reinitializeWidth(); + + //set tooltip if present + + self.tooltip = self.definition.tooltip || self.definition.tooltip === false ? self.definition.tooltip : self.table.options.tooltips; + + //set orizontal text alignment + + self.hozAlign = typeof self.definition.align == "undefined" ? "" : self.definition.align; + }; + + Column.prototype._buildColumnHeaderContent = function () { + + var self = this, + def = self.definition, + table = self.table; + + var contentElement = $("
"); + + contentElement.append(self._buildColumnHeaderTitle()); + + return contentElement; + }; + + //build title element of column + + Column.prototype._buildColumnHeaderTitle = function () { + + var self = this, + def = self.definition, + table = self.table, + title; + + var titleHolderElement = $("
"); + + if (def.editableTitle) { + + var titleElement = $(""); + + titleElement.on("click", function (e) { + + e.stopPropagation(); + + $(this).focus(); + }); + + titleElement.on("change", function () { + + var newTitle = $(this).val(); + + def.title = newTitle; + + table.options.columnTitleChanged(self.getComponent()); + }); + + titleHolderElement.append(titleElement); + + if (def.field) { + + table.extensions.localize.bind("columns." + def.field, function (text) { + + titleElement.val(text || def.title || " "); + }); + } else { + + titleElement.val(def.title || " "); + } + } else { + + if (def.field) { + + table.extensions.localize.bind("columns." + def.field, function (text) { + + self._formatColumnHeaderTitle(titleHolderElement, text || def.title || " "); + }); + } else { + + self._formatColumnHeaderTitle(titleHolderElement, def.title || " "); + } + } + + return titleHolderElement; + }; + + Column.prototype._formatColumnHeaderTitle = function (el, title) { + + var formatter, contents; + + if (this.definition.titleFormatter && this.table.extExists("format")) { + + formatter = this.table.extensions.format.getFormatter(this.definition.titleFormatter); + + contents = formatter.call(this.table.extensions.format, { + + getValue: function getValue() { + + return title; + }, + + getElement: function getElement() { + + return el; + } + + }, this.definition.titleFormatterParams || {}); + + el.append(contents); + } else { + + el.html(title); + } + }; + + //build header element for column group + + Column.prototype._buildGroupHeader = function () { + + var self = this, + def = self.definition, + table = self.table; + + self.element.addClass("tabulator-col-group").attr("role", "columngroup").attr("aria-title", def.title); + + self.element.append(self.groupElement); + }; + + //flat field lookup + + Column.prototype._getFlatData = function (data) { + + return data[this.field]; + }; + + //nested field lookup + + Column.prototype._getNestedData = function (data) { + + var dataObj = data, + structure = this.fieldStructure, + length = structure.length, + output; + + for (var i = 0; i < length; i++) { + + dataObj = dataObj[structure[i]]; + + output = dataObj; + + if (!dataObj) { + + break; + } + } + + return output; + }; + + //flat field set + + Column.prototype._setFlatData = function (data, value) { + + data[this.field] = value; + }; + + //nested field set + + Column.prototype._setNesteData = function (data, value) { + + var dataObj = data, + structure = this.fieldStructure, + length = structure.length; + + for (var i = 0; i < length; i++) { + + if (i == length - 1) { + + dataObj[structure[i]] = value; + } else { + + if (!dataObj[structure[i]]) { + + dataObj[structure[i]] = {}; + } + + dataObj = dataObj[structure[i]]; + } + } + }; + + //attach column to this group + + Column.prototype.attachColumn = function (column) { + + var self = this; + + if (self.groupElement) { + + self.columns.push(column); + + self.groupElement.append(column.getElement()); + } else { + + console.warn("Column Warning - Column being attached to another column instead of column group"); + } + }; + + //vertically align header in column + + Column.prototype.verticalAlign = function (alignment) { + + if (this.parent.isGroup) { + + this.element.css("height", this.parent.getGroupElement().innerHeight()); + } else { + + this.element.css("height", this.parent.getHeadersElement().innerHeight()); + } + + //vertically align cell contents + + if (!this.isGroup && alignment !== "top") { + + if (alignment === "bottom") { + + this.element.css({ "padding-top": this.element.innerHeight() - this.contentElement.outerHeight() }); + } else { + + this.element.css({ "padding-top": (this.element.innerHeight() - this.contentElement.outerHeight()) / 2 }); + } + } + + this.columns.forEach(function (column) { + + column.verticalAlign(alignment); + }); + }; + + //clear vertical alignmenet + + Column.prototype.clearVerticalAlign = function () { + + this.element.css("padding-top", ""); + + this.element.css("height", ""); + + this.columns.forEach(function (column) { + + column.clearVerticalAlign(); + }); + }; + + //// Retreive Column Information //// + + + //return column header element + + Column.prototype.getElement = function () { + + return this.element; + }; + + //return colunm group element + + Column.prototype.getGroupElement = function () { + + return this.groupElement; + }; + + //return field name + + Column.prototype.getField = function () { + + return this.field; + }; + + //return the first column in a group + + Column.prototype.getFirstColumn = function () { + + if (!this.isGroup) { + + return this; + } else { + + if (this.columns.length) { + + return this.columns[0].getFirstColumn(); + } else { + + return false; + } + } + }; + + //return the last column in a group + + Column.prototype.getLastColumn = function () { + + if (!this.isGroup) { + + return this; + } else { + + if (this.columns.length) { + + return this.columns[this.columns.length - 1].getLastColumn(); + } else { + + return false; + } + } + }; + + //return all columns in a group + + Column.prototype.getColumns = function () { + + return this.columns; + }; + + //return all columns in a group + + Column.prototype.getCells = function () { + + return this.cells; + }; + + //retreive the top column in a group of columns + + Column.prototype.getTopColumn = function () { + + if (this.parent.isGroup) { + + return this.parent.getTopColumn(); + } else { + + return this; + } + }; + + //return column definition object + + Column.prototype.getDefinition = function (updateBranches) { + + var colDefs = []; + + if (this.isGroup && updateBranches) { + + this.columns.forEach(function (column) { + + colDefs.push(column.getDefinition(true)); + }); + + this.definition.columns = colDefs; + } + + return this.definition; + }; + + //////////////////// Actions //////////////////// + + + Column.prototype.checkColumnVisibility = function () { + + var visible = false; + + this.columns.forEach(function (column) { + + if (column.visible) { + + visible = true; + } + }); + + if (visible) { + + this.show(); + + this.parent.table.options.columnVisibilityChanged(this.getComponent(), false); + } else { + + this.hide(); + } + }; + + //show column + + Column.prototype.show = function () { + + if (!this.visible) { + + this.visible = true; + + this.element.show(); + + this.table.columnManager._verticalAlignHeaders(); + + if (this.parent.isGroup) { + + this.parent.checkColumnVisibility(); + } + + this.cells.forEach(function (cell) { + + cell.show(); + }); + + if (this.table.options.persistentLayout && this.table.extExists("persistentLayout", true)) { + + this.table.extensions.persistentLayout.save(); + } + + this.table.options.groupVisibilityChanged(this.getComponent(), true); + } + }; + + //hide column + + Column.prototype.hide = function () { + + if (this.visible) { + + this.visible = false; + + this.element.hide(); + + this.table.columnManager._verticalAlignHeaders(); + + if (this.parent.isGroup) { + + this.parent.checkColumnVisibility(); + } + + this.cells.forEach(function (cell) { + + cell.hide(); + }); + + if (this.table.options.persistentLayout && this.table.extExists("persistentLayout", true)) { + + this.table.extensions.persistentLayout.save(); + } + + this.table.options.groupVisibilityChanged(this.getComponent(), false); + } + }; + + Column.prototype.setWidth = function (width) { + + this.widthFixed = true; + + this.setWidthActual(width); + }; + + Column.prototype.setWidthActual = function (width) { + + if (isNaN(width)) { + + width = Math.floor(this.table.element.innerWidth() / 100 * parseInt(width)); + } + + width = Math.max(this.minWidth, width); + + this.width = width; + + if (!this.isGroup) { + + this.element.css("width", width || ""); + + this.cells.forEach(function (cell) { + + cell.setWidth(width); + }); + } + + //set resizable handles + + if (this.table.extExists("frozenColumns")) { + + this.table.extensions.frozenColumns.layout(); + } + }; + + Column.prototype.checkCellHeights = function () { + + var rows = []; + + this.cells.forEach(function (cell) { + + if (cell.row.heightInitialized) { + + if (cell.row.element[0].offsetParent !== null) { + + rows.push(cell.row); + + cell.row.clearCellHeight(); + } else { + + cell.row.heightInitialized = false; + } + } + }); + + rows.forEach(function (row) { + + row.calcHeight(); + }); + + rows.forEach(function (row) { + + row.setCellHeight(); + }); + }; + + Column.prototype.getWidth = function () { + + return this.element.outerWidth(); + }; + + Column.prototype.getHeight = function () { + + return this.element.outerHeight(); + }; + + Column.prototype.setMinWidth = function (minWidth) { + + this.minWidth = minWidth; + + this.element.css("min-width", minWidth || ""); + + this.cells.forEach(function (cell) { + + cell.setMinWidth(minWidth); + }); + }; + + Column.prototype.delete = function () { + + if (this.isGroup) { + + this.columns.forEach(function (column) { + + column.delete(); + }); + } + + var cellCount = this.cells.length; + + for (var i = 0; i < cellCount; i++) { + + this.cells[0].delete(); + } + + this.element.detach(); + + this.table.columnManager.deregisterColumn(this); + }; + + //////////////// Cell Management ///////////////// + + + //generate cell for this column + + Column.prototype.generateCell = function (row) { + + var self = this; + + var cell = new Cell(self, row); + + this.cells.push(cell); + + return cell; + }; + + Column.prototype.reinitializeWidth = function () { + + this.widthFixed = false; + + //set width if present + + if (typeof this.definition.width !== "undefined") { + + this.setWidth(this.definition.width); + } + + this.fitToData(); + }; + + //set column width to maximum cell width + + Column.prototype.fitToData = function () { + + var self = this; + + if (!this.widthFixed) { + + this.element.css("width", ""); + + self.cells.forEach(function (cell) { + + cell.setWidth(""); + }); + } + + var maxWidth = this.element.outerWidth(); + + if (!self.width || !this.widthFixed) { + + self.cells.forEach(function (cell) { + + var width = cell.getWidth(); + + if (width > maxWidth) { + + maxWidth = width; + } + }); + + if (maxWidth) { + + self.setWidthActual(maxWidth + 1); + } + } + }; + + Column.prototype.deleteCell = function (cell) { + + var index = this.cells.indexOf(cell); + + if (index > -1) { + + this.cells.splice(index, 1); + } + }; + + //////////////// Event Bindings ///////////////// + + + //////////////// Object Generation ///////////////// + + Column.prototype.getComponent = function () { + + return new ColumnComponent(this); + }; + + var RowManager = function RowManager(table) { + + this.table = table; + + this.element = $("
"); //containing element + + this.tableElement = $("
"); //table element + + this.columnManager = null; //hold column manager object + + this.height = 0; //hold height of table element + + + this.firstRender = false; //handle first render + + this.renderMode = "classic"; //current rendering mode + + + this.rows = []; //hold row data objects + + this.activeRows = []; //rows currently available to on display in the table + + this.activeRowsCount = 0; //count of active rows + + + this.displayRows = []; //rows currently on display in the table + + this.displayRowsCount = 0; //count of display rows + + + this.scrollTop = 0; + + this.scrollLeft = 0; + + this.vDomRowHeight = 20; //approximation of row heights for padding + + + this.vDomTop = 0; //hold position for first rendered row in the virtual DOM + + this.vDomBottom = 0; //hold possition for last rendered row in the virtual DOM + + + this.vDomScrollPosTop = 0; //last scroll position of the vDom top; + + this.vDomScrollPosBottom = 0; //last scroll position of the vDom bottom; + + + this.vDomTopPad = 0; //hold value of padding for top of virtual DOM + + this.vDomBottomPad = 0; //hold value of padding for bottom of virtual DOM + + + this.vDomMaxRenderChain = 90; //the maximum number of dom elements that can be rendered in 1 go + + + this.vDomWindowBuffer = 0; //window row buffer before removing elements, to smooth scrolling + + + this.vDomWindowMinTotalRows = 20; //minimum number of rows to be generated in virtual dom (prevent buffering issues on tables with tall rows) + + this.vDomWindowMinMarginRows = 5; //minimum number of rows to be generated in virtual dom margin + + + this.vDomTopNewRows = []; //rows to normalize after appending to optimize render speed + + this.vDomBottomNewRows = []; //rows to normalize after appending to optimize render speed + + + this._initialize(); + }; + + //////////////// Setup Functions ///////////////// + + + //return containing element + + RowManager.prototype.getElement = function () { + + return this.element; + }; + + //return table element + + RowManager.prototype.getTableElement = function () { + + return this.tableElement; + }; + + //link to column manager + + RowManager.prototype.setColumnManager = function (manager) { + + this.columnManager = manager; + }; + + RowManager.prototype._initialize = function () { + + var self = this; + + //initialize manager + + self.element.append(self.tableElement); + + self.firstRender = true; + + //scroll header along with table body + + self.element.scroll(function () { + + var left = self.element[0].scrollLeft; + + //handle horizontal scrolling + + if (self.scrollLeft != left) { + + self.columnManager.scrollHorizontal(left); + + if (self.table.options.groupBy) { + + self.table.extensions.groupRows.scrollHeaders(left); + } + + if (self.table.extExists("columnCalcs")) { + + self.table.extensions.columnCalcs.scrollHorizontal(left); + } + } + + self.scrollLeft = left; + }); + + //handle virtual dom scrolling + + if (self.table.options.height && self.table.options.virtualDom) { + + self.element.scroll(function () { + + var top = self.element[0].scrollTop; + + var dir = self.scrollTop > top; + + //handle verical scrolling + + if (self.scrollTop != top) { + + self.scrollTop = top; + + self.scrollVertical(dir); + } else { + + self.scrollTop = top; + } + }); + } + }; + + ////////////////// Row Manipulation ////////////////// + + + RowManager.prototype.findRow = function (subject) { + + var self = this; + + if ((typeof subject === 'undefined' ? 'undefined' : _typeof(subject)) == "object") { + + if (subject instanceof Row) { + + //subject is row element + + return subject; + } else if (subject instanceof RowComponent) { + + //subject is public row component + + return subject._getSelf() || false; + } else if (subject instanceof jQuery) { + + //subject is a jquery element of the row + + var match = self.rows.find(function (row) { + + return row.element === subject; + }); + + return match || false; + } + } else { + + //subject should be treated as the index of the row + + var _match = self.rows.find(function (row) { + + return row.data[self.table.options.index] == subject; + }); + + return _match || false; + } + + //catch all for any other type of input + + + return false; + }; + + RowManager.prototype.scrollToRow = function (row) { + + var rowIndex; + + rowIndex = this.displayRows.indexOf(row); + + if (rowIndex > -1) { + + switch (this.renderMode) { + + case "classic": + + this.element.scrollTop(row.element.offset().top - this.element.offset().top + this.element.scrollTop()); + + break; + + case "virtual": + + this._virtualRenderFill(rowIndex, true); + + break; + + } + } else { + + console.warn("Scroll Error - Row not visible"); + } + }; + + ////////////////// Data Handling ////////////////// + + + RowManager.prototype.setData = function (data) { + + var self = this; + + self.table.options.dataLoading(data); + + self.rows = []; + + if (this.table.options.history && this.table.extExists("history")) { + + this.table.extensions.history.clear(); + } + + if (Array.isArray(data)) { + + if (this.table.extExists("selectRow")) { + + this.table.extensions.selectRow.clearSelectionData(); + } + + data.forEach(function (def, i) { + + var row = new Row(def, self); + + self.rows.push(row); + }); + + self.table.options.dataLoaded(data); + + self.refreshActiveData(true); + } else { + + console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ", typeof data === 'undefined' ? 'undefined' : _typeof(data), "\nData: ", data); + } + }; + + RowManager.prototype.deleteRow = function (row) { + + var allIndex = this.rows.indexOf(row), + activeIndex = this.activeRows.indexOf(row), + displayIndex = this.displayRows.indexOf(row); + + if (displayIndex > -1) { + + this.displayRows.splice(displayIndex, 1); + } + + if (activeIndex > -1) { + + this.activeRows.splice(activeIndex, 1); + } + + if (allIndex > -1) { + + this.rows.splice(allIndex, 1); + } + + this.setActiveRows(this.activeRows); + + this.setDisplayRows(this.displayRows); + + this.table.options.rowDeleted(row.getComponent()); + + this.table.options.dataEdited(this.getData()); + + if (this.table.options.pagination && this.table.extExists("page")) { + + this.refreshActiveData(); + } else { + + this.renderTable(); + } + }; + + RowManager.prototype.addRow = function (data, pos, index) { + + var row = this.addRowActual(data, pos, index); + + if (this.table.options.history && this.table.extExists("history")) { + + this.table.extensions.history.action("rowAdd", row, { data: data, pos: pos, index: index }); + }; + + return row; + }; + + //add multiple rows + + RowManager.prototype.addRows = function (data, pos, index) { + + var self = this, + rows = []; + + pos = this.findAddRowPos(pos); + + if (!Array.isArray(data)) { + + data = [data]; + } + + if (typeof index == "undefined" && pos || typeof index !== "undefined" && !pos) { + + data.reverse(); + } + + data.forEach(function (item) { + + var row = self.addRow(item, pos, index); + + rows.push(row.getComponent()); + }); + + return rows; + }; + + RowManager.prototype.findAddRowPos = function (pos) { + + if (typeof pos === "undefined") { + + pos = this.table.options.addRowPos; + } + + if (pos === "pos") { + + pos = true; + } + + if (pos === "bottom") { + + pos = false; + } + + return pos; + }; + + RowManager.prototype.addRowActual = function (data, pos, index) { + + var safeData = data || {}, + row = new Row(safeData, this), + top = this.findAddRowPos(pos); + + if (index) { + + index = this.findRow(index); + } + + if (index) { + + var allIndex = this.rows.indexOf(index), + activeIndex = this.activeRows.indexOf(index), + displayIndex = this.displayRows.indexOf(index); + + if (displayIndex > -1) { + + this.displayRows.splice(top ? displayIndex : displayIndex + 1, 0, row); + } + + if (activeIndex > -1) { + + this.activeRows.splice(top ? activeIndex : activeIndex + 1, 0, row); + } + + if (allIndex > -1) { + + this.rows.splice(top ? allIndex : allIndex + 1, 0, row); + } + } else { + + if (top) { + + this.displayRows.unshift(row); + + this.activeRows.unshift(row); + + this.rows.unshift(row); + } else { + + this.displayRows.push(row); + + this.activeRows.push(row); + + this.rows.push(row); + } + } + + this.setDisplayRows(this.displayRows); + + this.setActiveRows(this.activeRows); + + this.table.options.rowAdded(row.getComponent()); + + this.table.options.dataEdited(this.getData()); + + this.renderTable(); + + return row; + }; + + RowManager.prototype.moveRow = function (from, to, after) { + + this._moveRowInArray(this.rows, from, to, after); + + this._moveRowInArray(this.activeRows, from, to, after); + + this._moveRowInArray(this.displayRows, from, to, after); + + this.table.options.rowMoved(from.getComponent()); + }; + + RowManager.prototype._moveRowInArray = function (rows, from, to, after) { + + var fromIndex = rows.indexOf(from), + toIndex, + start, + end; + + if (fromIndex > -1) { + + rows.splice(fromIndex, 1); + + toIndex = rows.indexOf(to); + + if (toIndex > -1) { + + if (after) { + + rows.splice(toIndex + 1, 0, from); + } else { + + rows.splice(toIndex, 0, from); + } + } else { + + rows.splice(fromIndex, 0, from); + } + } + + //restyle rows + + if (rows === this.displayRows) { + + start = fromIndex < toIndex ? fromIndex : toIndex; + + end = toIndex > fromIndex ? toIndex : fromIndex + 1; + + for (var i = start; i <= end; i++) { + + if (rows[i]) { + + this.styleRow(rows[i], i); + } + } + } + }; + + RowManager.prototype.clearData = function () { + + this.setData([]); + }; + + RowManager.prototype.getRowIndex = function (row) { + + return this.findRowIndex(row, this.rows); + }; + + RowManager.prototype.getDisplayRowIndex = function (row) { + + return this.findRowIndex(row, this.displayRows); + }; + + RowManager.prototype.nextDisplayRow = function (row) { + + var index = this.getDisplayRowIndex(row), + nextRow = false; + + if (index !== false && index < this.displayRowsCount - 1) { + + nextRow = this.displayRows[index + 1]; + } + + return nextRow; + }; + + RowManager.prototype.prevDisplayRow = function (row) { + + var index = this.getDisplayRowIndex(row), + prevRow = false; + + if (index) { + + prevRow = this.displayRows[index - 1]; + } + + return prevRow; + }; + + RowManager.prototype.findRowIndex = function (row, list) { + + var rowIndex; + + row = this.findRow(row); + + if (row) { + + rowIndex = list.indexOf(row); + + if (rowIndex > -1) { + + return rowIndex; + } + } + + return false; + }; + + RowManager.prototype.getData = function (active) { + + var self = this, + output = []; + + var rows = active ? self.activeRows : self.rows; + + rows.forEach(function (row) { + + output.push(row.getData(true)); + }); + + return output; + }; + + RowManager.prototype.getHtml = function (active) { + + var data = this.getData(active), + columns = this.table.columnManager.getComponents(), + header = "", + body = "", + table = ""; + + //build header row + + columns.forEach(function (column) { + + var def = column.getDefinition(); + + if (column.getVisibility()) { + + header += '' + def.title + ''; + } + }); + + //build body rows + + data.forEach(function (rowData) { + + var row = ""; + + columns.forEach(function (column) { + + var value = typeof rowData[column.getField()] === "undefined" ? "" : rowData[column.getField()]; + + if (column.getVisibility()) { + + row += '' + value + ''; + } + }); + + body += '' + row + ''; + }); + + //build table + + table = '\n\n \t\t\t\t\n\n \t\t\t\t' + header + '\n\n \t\t\t\t\n\n \t\t\t\t' + body + '\n\n \t\t\t\t
'; + + return table; + }; + + RowManager.prototype.getComponents = function (active) { + + var self = this, + output = []; + + var rows = active ? self.activeRows : self.rows; + + rows.forEach(function (row) { + + output.push(row.getComponent()); + }); + + return output; + }; + + RowManager.prototype.getDataCount = function (active) { + + return active ? this.rows.length : this.activeRows.length; + }; + + RowManager.prototype._genRemoteRequest = function () { + + var self = this, + table = self.table, + options = table.options, + params = {}; + + if (table.extExists("page")) { + + //set sort data if defined + + if (options.ajaxSorting) { + + var sorters = self.table.extensions.sort.getSort(); + + sorters.forEach(function (item) { + + delete item.column; + }); + + params[self.table.extensions.page.paginationDataSentNames.sorters] = sorters; + } + + //set filter data if defined + + if (options.ajaxFiltering) { + + var filters = self.table.extensions.filter.getFilters(true, true); + + params[self.table.extensions.page.paginationDataSentNames.filters] = filters; + } + + self.table.extensions.ajax.setParams(params, true); + } + + table.extensions.ajax.sendRequest(function (data) { + + self.setData(data); + }); + }; + + //choose the path to refresh data after a filter update + + RowManager.prototype.filterRefresh = function () { + + var table = this.table, + options = table.options; + + if (options.ajaxFiltering) { + + if (options.pagination == "remote" && table.extExists("page")) { + + table.extensions.page.reset(true); + + table.extensions.page.setPage(1); + } else { + + //assume data is url, make ajax call to url to get data + + this._genRemoteRequest(); + } + } else { + + this.refreshActiveData(); + } + }; + + //choose the path to refresh data after a sorter update + + RowManager.prototype.sorterRefresh = function () { + + var table = this.table, + options = this.table.options, + left = this.scrollLeft; + + if (options.ajaxSorting) { + + if (options.pagination == "remote" && table.extExists("page")) { + + table.extensions.page.reset(true); + + table.extensions.page.setPage(1); + } else { + + //assume data is url, make ajax call to url to get data + + this._genRemoteRequest(); + } + } else { + + this.refreshActiveData(); + } + + this.element.scrollLeft(left); + }; + + //set active data set + + RowManager.prototype.refreshActiveData = function (dataChanged) { + + var self = this, + table = this.table; + + if (table.options.selectable && !table.options.selectablePersistence && table.extExists("selectRow")) { + + table.extensions.selectRow.deselectRows(); + } + + //filter data + + if (table.extExists("filter")) { + + if (table.extensions.filter.hasChanged() || dataChanged) { + + self.setActiveRows(table.extensions.filter.filter(self.rows)); + + dataChanged = true; + } + } else { + + self.setActiveRows(self.rows.slice(0)); + } + + //sort data + + if (table.extExists("sort")) { + + if (table.extensions.sort.hasChanged() || dataChanged) { + + table.extensions.sort.sort(); + + dataChanged = true; + } + } + + //group data + + if (table.options.groupBy && table.extExists("groupRows")) { + + self.setDisplayRows(table.extensions.groupRows.getRows(this.activeRows, dataChanged)); + + if (table.options.pagination) { + + console.warn("Invalid Setup Combination - Pagination and Row Grouping cannot be enabled at the same time"); + } + } else { + + //paginate data + + if (table.options.pagination && table.extExists("page")) { + + if (table.extensions.page.getMode() == "local") { + + if (dataChanged) { + + table.extensions.page.reset(); + } + + table.extensions.page.setMaxRows(this.activeRows.length); + } + + self.setDisplayRows(table.extensions.page.getRows(this.activeRows)); + } else { + + self.setDisplayRows(self.activeRows.slice(0)); + } + } + + if (self.element.is(":visible")) { + + self.renderTable(); + } + + if (table.extExists("columnCalcs")) { + + table.extensions.columnCalcs.recalc(this.displayRows); + } + }; + + RowManager.prototype.setActiveRows = function (activeRows) { + + this.activeRows = activeRows; + + this.activeRowsCount = this.activeRows.length; + }; + + RowManager.prototype.setDisplayRows = function (displayRows) { + + this.displayRows = displayRows; + + this.displayRowsCount = this.displayRows.length; + }; + + //return only actual rows (not group headers etc) + + RowManager.prototype.getRows = function () { + + return this.rows; + }; + + ///////////////// Table Rendering ///////////////// + + + RowManager.prototype.renderTable = function () { + + var self = this; + + self.table.options.renderStarted(); + + self.element.scrollTop(0); + + if (!self.height || !self.table.options.virtualDom || self.table.options.pagination) { + + self.renderMode = "classic"; + + self._simpleRender(); + } else { + + self.renderMode = "virtual"; + + self._virtualRenderFill(); + } + + if (self.firstRender) { + + if (self.displayRowsCount) { + + self.firstRender = false; + + self.table.extensions.layout.layout(); + } else { + + self.renderEmptyScroll(); + } + } + + if (self.table.extExists("frozenColumns")) { + + self.table.extensions.frozenColumns.layout(); + } + + if (!self.displayRowsCount) { + + if (self.table.options.placeholder) { + + self.getElement().append(self.table.options.placeholder); + } + } + + self.table.options.renderComplete(); + }; + + RowManager.prototype.getRenderMode = function () { + + return this.renderMode; + }; + + //simple render on heightless table + + RowManager.prototype._simpleRender = function () { + + var self = this, + element = this.tableElement; + + self._clearVirtualDom(); + + if (self.displayRowsCount) { + + self.displayRows.forEach(function (row, index) { + + self.styleRow(row, index); + + element.append(row.getElement()); + + row.initialize(true); + }); + } else { + + self.renderEmptyScroll(); + } + }; + + //show scrollbars on empty table div + + RowManager.prototype.renderEmptyScroll = function () { + + var self = this; + + self.tableElement.css({ + + "min-width": self.table.columnManager.getWidth(), + + "min-height": "1px", + + "visibility": "hidden" + + }); + }; + + RowManager.prototype._clearVirtualDom = function () { + + var element = this.tableElement; + + if (this.table.options.placeholder) { + + this.table.options.placeholder.detach(); + } + + element.children().detach(); + + element.css({ + + "padding-top": "", + + "padding-bottom": "", + + "min-width": "", + + "min-height": "", + + "visibility": "" + + }); + + this.scrollTop = 0; + + this.scrollLeft = 0; + + this.vDomTop = 0; + + this.vDomBottom = 0; + + this.vDomTopPad = 0; + + this.vDomBottomPad = 0; + }; + + RowManager.prototype.styleRow = function (row, index) { + + if (index % 2) { + + row.element.addClass("tabulator-row-even").removeClass("tabulator-row-odd"); + } else { + + row.element.addClass("tabulator-row-odd").removeClass("tabulator-row-even"); + } + }; + + //full virtual render + + RowManager.prototype._virtualRenderFill = function (position, forceMove) { + + var self = this, + element = self.tableElement, + holder = self.element, + topPad = 0, + rowsHeight = 0, + topPadHeight = 0, + i = 0; + + position = position || 0; + + if (!position) { + + self._clearVirtualDom(); + } else { + + element.children().detach(); + + //check if position is too close to bottom of table + + var heightOccpied = (self.displayRowsCount - position) * self.vDomRowHeight; + + if (heightOccpied < self.height) { + + position -= Math.ceil((self.height - heightOccpied) / self.displayRowsCount); + + if (position < 0) { + + position = 0; + } + } + + //calculate initial pad + + topPad = Math.min(Math.max(Math.floor(self.vDomWindowBuffer / self.vDomRowHeight), self.vDomWindowMinMarginRows), position); + + position -= topPad; + } + + if (self.displayRowsCount && self.element.is(":visible")) { + + self.vDomTop = position; + + self.vDomBottom = position - 1; + + while ((rowsHeight <= self.height + self.vDomWindowBuffer || i < self.vDomWindowMinTotalRows) && self.vDomBottom < self.displayRowsCount - 1) { + + var index = self.vDomBottom + 1, + row = self.displayRows[index]; + + self.styleRow(row, index); + + element.append(row.getElement()); + + if (!row.initialized) { + + row.initialize(true); + } else { + + if (!row.heightInitialized) { + + row.normalizeHeight(true); + } + } + + if (i < topPad) { + + topPadHeight += row.getHeight(); + } else { + + rowsHeight += row.getHeight(); + } + + self.vDomBottom++; + + i++; + } + + if (!position) { + + this.vDomTopPad = 0; + + //adjust rowheight to match average of rendered elements + + self.vDomRowHeight = Math.floor((rowsHeight + topPadHeight) / i); + + self.vDomBottomPad = self.vDomRowHeight * (self.displayRowsCount - self.vDomBottom - 1); + + self.vDomScrollHeight = topPadHeight + rowsHeight + self.vDomBottomPad - self.height; + } else { + + self.vDomTopPad = !forceMove ? self.scrollTop - topPadHeight : self.vDomRowHeight * this.vDomTop + topPadHeight; + + self.vDomBottomPad = self.vDomBottom == self.displayRowsCount - 1 ? 0 : Math.max(self.vDomScrollHeight - self.vDomTopPad - rowsHeight - topPadHeight, 0); + } + + element[0].style.paddingTop = self.vDomTopPad + "px"; + + element[0].style.paddingBottom = self.vDomBottomPad + "px"; + + if (forceMove) { + + this.scrollTop = self.vDomTopPad + topPadHeight; + } + + this.scrollTop = Math.min(this.scrollTop, this.element[0].scrollHeight - this.height); + + //adjust for horizontal scrollbar if present + + if (this.element[0].scrollWidth > this.element[0].offsetWidt) { + + this.scrollTop += this.element[0].offsetHeight - this.element[0].clientHeight; + } + + this.vDomScrollPosTop = this.scrollTop; + + this.vDomScrollPosBottom = this.scrollTop; + + holder.scrollTop(this.scrollTop); + + if (self.table.options.groupBy) { + + if (self.table.extensions.layout.getMode() != "fitDataFill" && self.displayRowsCount == self.table.extensions.groupRows.countGroups()) { + + self.tableElement.css({ + + "min-width": self.table.columnManager.getWidth() + + }); + } + } + } else { + + this.renderEmptyScroll(); + } + }; + + //handle vertical scrolling + + RowManager.prototype.scrollVertical = function (dir) { + + var topDiff = this.scrollTop - this.vDomScrollPosTop; + + var bottomDiff = this.scrollTop - this.vDomScrollPosBottom; + + var margin = this.vDomWindowBuffer * 2; + + if (-topDiff > margin || bottomDiff > margin) { + + //if big scroll redraw table; + + this._virtualRenderFill(Math.floor(this.element[0].scrollTop / this.element[0].scrollHeight * this.displayRowsCount)); + } else { + + if (dir) { + + //scrolling up + + if (topDiff < 0) { + + this._addTopRow(-topDiff); + } + + if (topDiff < 0) { + + //hide bottom row if needed + + if (this.vDomScrollHeight - this.scrollTop > this.vDomWindowBuffer) { + + this._removeBottomRow(-bottomDiff); + } + } + } else { + + //scrolling down + + if (topDiff >= 0) { + + //hide top row if needed + + if (this.scrollTop > this.vDomWindowBuffer) { + + this._removeTopRow(topDiff); + } + } + + if (bottomDiff >= 0) { + + this._addBottomRow(bottomDiff); + } + } + } + }; + + RowManager.prototype._addTopRow = function (topDiff) { + var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + + + var table = this.tableElement; + + if (this.vDomTop) { + + var index = this.vDomTop - 1, + topRow = this.displayRows[index], + topRowHeight = topRow.getHeight() || this.vDomRowHeight; + + //hide top row if needed + + if (topDiff >= topRowHeight) { + + this.styleRow(topRow, index); + + table.prepend(topRow.getElement()); + + if (!topRow.initialized || !topRow.heightInitialized) { + + this.vDomTopNewRows.push(topRow); + + if (!topRow.heightInitialized) { + + topRow.clearCellHeight(); + } + } + + topRow.initialize(); + + this.vDomTopPad -= topRowHeight; + + if (this.vDomTopPad < 0) { + + this.vDomTopPad = (this.vDomTop - 1) * this.vDomRowHeight; + } + + table[0].style.paddingTop = this.vDomTopPad + "px"; + + this.vDomScrollPosTop -= topRowHeight; + + this.vDomTop--; + } + + topDiff = -(this.scrollTop - this.vDomScrollPosTop); + + if (i < this.vDomMaxRenderChain && this.vDomTop && topDiff >= (this.displayRows[this.vDomTop - 1].getHeight() || this.vDomRowHeight)) { + + this._addTopRow(topDiff, i + 1); + } else { + + this._quickNormalizeRowHeight(this.vDomTopNewRows); + } + } + }; + + RowManager.prototype._removeTopRow = function (topDiff) { + + var table = this.tableElement, + topRow = this.displayRows[this.vDomTop], + topRowHeight = topRow.getHeight() || this.vDomRowHeight; + + if (topDiff >= topRowHeight) { + + topRow.element.detach(); + + this.vDomTopPad += topRowHeight; + + table[0].style.paddingTop = this.vDomTopPad + "px"; + + this.vDomScrollPosTop += this.vDomTop ? topRowHeight : topRowHeight + this.vDomWindowBuffer; + + this.vDomTop++; + + topDiff = this.scrollTop - this.vDomScrollPosTop; + + this._removeTopRow(topDiff); + } + }; + + RowManager.prototype._addBottomRow = function (bottomDiff) { + var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + + + var table = this.tableElement; + + if (this.vDomBottom < this.displayRowsCount - 1) { + + var index = this.vDomBottom + 1, + bottomRow = this.displayRows[index], + bottomRowHeight = bottomRow.getHeight() || this.vDomRowHeight; + + //hide bottom row if needed + + if (bottomDiff >= bottomRowHeight) { + + this.styleRow(bottomRow, index); + + table.append(bottomRow.getElement()); + + if (!bottomRow.initialized || !bottomRow.heightInitialized) { + + this.vDomBottomNewRows.push(bottomRow); + + if (!bottomRow.heightInitialized) { + + bottomRow.clearCellHeight(); + } + } + + bottomRow.initialize(); + + this.vDomBottomPad -= bottomRowHeight; + + if (this.vDomBottomPad < 0 || index == this.displayRowsCount - 1) { + + this.vDomBottomPad = 0; + } + + table[0].style.paddingBottom = this.vDomBottomPad + "px"; + + this.vDomScrollPosBottom += bottomRowHeight; + + this.vDomBottom++; + } + + bottomDiff = this.scrollTop - this.vDomScrollPosBottom; + + if (i < this.vDomMaxRenderChain && this.vDomBottom < this.displayRowsCount - 1 && bottomDiff >= (this.displayRows[this.vDomBottom + 1].getHeight() || this.vDomRowHeight)) { + + this._addBottomRow(bottomDiff, i + 1); + } else { + + this._quickNormalizeRowHeight(this.vDomBottomNewRows); + } + } + }; + + RowManager.prototype._removeBottomRow = function (bottomDiff) { + + var table = this.tableElement, + bottomRow = this.displayRows[this.vDomBottom], + bottomRowHeight = bottomRow.getHeight() || this.vDomRowHeight; + + if (bottomDiff >= bottomRowHeight) { + + bottomRow.element.detach(); + + this.vDomBottomPad += bottomRowHeight; + + if (this.vDomBottomPad < 0) { + + this.vDomBottomPad == 0; + } + + table[0].style.paddingBottom = this.vDomBottomPad + "px"; + + this.vDomScrollPosBottom -= bottomRowHeight; + + this.vDomBottom--; + + bottomDiff = -(this.scrollTop - this.vDomScrollPosBottom); + + this._removeBottomRow(bottomDiff); + } + }; + + RowManager.prototype._quickNormalizeRowHeight = function (rows) { + + rows.forEach(function (row) { + + row.calcHeight(); + }); + + rows.forEach(function (row) { + + row.setCellHeight(); + }); + + rows.length = 0; + }; + + //normalize height of active rows + + RowManager.prototype.normalizeHeight = function () { + + var self = this; + + self.displayRows.forEach(function (row) { + + row.normalizeHeight(); + }); + }; + + //adjust the height of the table holder to fit in the Tabulator element + + RowManager.prototype.adjustTableSize = function () { + + var self = this; + + if (self.table.options.height) { + + var otherHeigt = self.columnManager.getElement().outerHeight() + (self.table.footerManager ? self.table.footerManager.getElement().outerHeight() : 0); + + self.element.css({ + + "min-height": "calc(100% - " + otherHeigt + "px)", + + "height": "calc(100% - " + otherHeigt + "px)", + + "max-height": "calc(100% - " + otherHeigt + "px)" + + }); + + self.height = self.element.innerHeight(); + + self.vDomWindowBuffer = self.table.options.virtualDomBuffer || self.height; + } + }; + + //renitialize all rows + + RowManager.prototype.reinitialize = function () { + + this.rows.forEach(function (row) { + + row.reinitialize(); + }); + }; + + //redraw table + + RowManager.prototype.redraw = function (force) { + + var pos = 0; + + if (this.renderMode == "virtual") { + + this.adjustTableSize(); + } + + if (!force) { + + if (self.renderMode == "simple") { + + this._simpleRender(); + } else { + + var pos = Math.floor(this.element.scrollTop() / this.element[0].scrollHeight * this.displayRowsCount); + + this._virtualRenderFill(pos); + } + + if (!this.displayRowsCount) { + + if (this.table.options.placeholder) { + + this.getElement().append(this.table.options.placeholder); + } + } + } else { + + this.renderTable(); + } + }; + + RowManager.prototype.resetScroll = function () { + + this.element.scrollLeft(0); + + this.element.scrollTop(0); + + this.element.scroll(); + }; + + //public row object + + var RowComponent = function RowComponent(row) { + + this.row = row; + }; + + RowComponent.prototype.getData = function () { + + return this.row.getData(true); + }; + + RowComponent.prototype.getElement = function () { + + return this.row.getElement(); + }; + + RowComponent.prototype.getCells = function () { + + var cells = []; + + this.row.getCells().forEach(function (cell) { + + cells.push(cell.getComponent()); + }); + + return cells; + }; + + RowComponent.prototype.getCell = function (column) { + + return this.row.getCell(column).getComponent(); + }; + + RowComponent.prototype.getIndex = function () { + + return this.row.getData(true)[this.row.table.options.index]; + }; + + RowComponent.prototype.delete = function () { + + this.row.delete(); + }; + + RowComponent.prototype.scrollTo = function () { + + this.row.table.rowManager.scrollToRow(this.row); + }; + + RowComponent.prototype.update = function (data) { + + this.row.updateData(data); + }; + + RowComponent.prototype.normalizeHeight = function () { + + this.row.normalizeHeight(true); + }; + + RowComponent.prototype.select = function () { + + this.row.selectRows(this.row); + }; + + RowComponent.prototype.deselect = function () { + + this.row.deselectRows(this.row); + }; + + RowComponent.prototype.toggleSelect = function () { + + this.row.toggleRow(this.row); + }; + + RowComponent.prototype._getSelf = function () { + + return this.row; + }; + + var Row = function Row(data, parent) { + + this.table = parent.table; + + this.parent = parent; + + this.data = {}; + + this.type = "row"; //type of element + + this.element = $("
"); + + this.extensions = {}; //hold extension variables; + + this.cells = []; + + this.height = 0; //hold element height + + this.outerHeight = 0; //holde lements outer height + + this.initialized = false; //element has been rendered + + this.heightInitialized = false; //element has resized cells to fit + + + this.setData(data); + + this.generateElement(); + }; + + Row.prototype.getElement = function () { + + return this.element; + }; + + Row.prototype.generateElement = function () { + + var self = this, + dblTap, + tapHold, + tap; + + //set row selection characteristics + + if (self.table.options.selectable !== false && self.table.extExists("selectRow")) { + + self.table.extensions.selectRow.initializeRow(this); + } + + //setup movable rows + + if (self.table.options.movableRows !== false && self.table.extExists("moveRow")) { + + self.table.extensions.moveRow.initializeRow(this); + } + + //handle row click events + + if (self.table.options.rowClick) { + + self.element.on("click", function (e) { + + self.table.options.rowClick(e, self.getComponent()); + }); + } + + if (self.table.options.rowDblClick) { + + self.element.on("dblclick", function (e) { + + self.table.options.rowDblClick(e, self.getComponent()); + }); + } + + if (self.table.options.rowContext) { + + self.element.on("contextmenu", function (e) { + + self.table.options.rowContext(e, self.getComponent()); + }); + } + + if (self.table.options.rowTap) { + + tap = false; + + self.element.on("touchstart", function (e) { + + tap = true; + }); + + self.element.on("touchend", function (e) { + + if (tap) { + + self.table.options.rowTap(e, self.getComponent()); + } + + tap = false; + }); + } + + if (self.table.options.rowDblTap) { + + dblTap = null; + + self.element.on("touchend", function (e) { + + if (dblTap) { + + clearTimeout(dblTap); + + dblTap = null; + + self.table.options.rowDblTap(e, self.getComponent()); + } else { + + dblTap = setTimeout(function () { + + clearTimeout(dblTap); + + dblTap = null; + }, 300); + } + }); + } + + if (self.table.options.rowTapHold) { + + tapHold = null; + + self.element.on("touchstart", function (e) { + + clearTimeout(tapHold); + + tapHold = setTimeout(function () { + + clearTimeout(tapHold); + + tapHold = null; + + tap = false; + + self.table.options.rowTapHold(e, self.getComponent()); + }, 1000); + }); + + self.element.on("touchend", function (e) { + + clearTimeout(tapHold); + + tapHold = null; + }); + } + }; + + Row.prototype.generateCells = function () { + + this.cells = this.table.columnManager.generateCells(this); + }; + + //functions to setup on first render + + Row.prototype.initialize = function (force) { + + var self = this; + + if (!self.initialized || force) { + + self.deleteCells(); + + self.element.empty(); + + //handle frozen cells + + if (this.table.extExists("frozenColumns")) { + + this.table.extensions.frozenColumns.layoutRow(this); + } + + this.generateCells(); + + self.cells.forEach(function (cell) { + + self.element.append(cell.getElement()); + }); + + if (force) { + + self.normalizeHeight(); + } + + if (self.table.options.rowFormatter) { + + self.table.options.rowFormatter(self.getComponent()); + } + + self.initialized = true; + } + }; + + Row.prototype.reinitializeHeight = function () { + + this.heightInitialized = false; + + if (this.element[0].offsetParent !== null) { + + this.normalizeHeight(true); + } + }; + + Row.prototype.reinitialize = function () { + + this.initialized = false; + + this.heightInitialized = false; + + this.height = 0; + + if (this.element[0].offsetParent !== null) { + + this.initialize(true); + } + }; + + //get heights when doing bulk row style calcs in virtual DOM + + Row.prototype.calcHeight = function () { + + this.height = this.element[0].clientHeight; + + this.outerHeight = this.element[0].offsetHeight; + }; + + //set of cells + + Row.prototype.setCellHeight = function () { + + var height = this.height; + + this.cells.forEach(function (cell) { + + cell.setHeight(height); + }); + + this.heightInitialized = true; + }; + + Row.prototype.clearCellHeight = function () { + + this.cells.forEach(function (cell) { + + cell.clearHeight(); + }); + }; + + //normalize the height of elements in the row + + Row.prototype.normalizeHeight = function (force) { + + if (force) { + + this.clearCellHeight(); + } + + this.calcHeight(); + + this.setCellHeight(); + }; + + //set height of rows + + Row.prototype.setHeight = function (height, force) { + + if (this.height != height || force) { + + this.height = height; + + this.setCellHeight(); + + // this.outerHeight = this.element.outerHeight(); + + this.outerHeight = this.element[0].offsetHeight; + } + }; + + //return rows outer height + + Row.prototype.getHeight = function () { + + return this.outerHeight; + }; + + //return rows outer Width + + Row.prototype.getWidth = function () { + + return this.element.outerWidth(); + }; + + //////////////// Cell Management ///////////////// + + + Row.prototype.deleteCell = function (cell) { + + var index = this.cells.indexOf(cell); + + if (index > -1) { + + this.cells.splice(index, 1); + } + }; + + //////////////// Data Management ///////////////// + + + Row.prototype.setData = function (data) { + + var self = this; + + if (self.table.extExists("mutator")) { + + self.data = self.table.extensions.mutator.transformRow(data); + } else { + + self.data = data; + } + }; + + //update the rows data + + Row.prototype.updateData = function (data) { + + var self = this; + + //mutate incomming data if needed + + if (self.table.extExists("mutator")) { + + data = self.table.extensions.mutator.transformRow(data); + } + + //set data + + for (var attrname in data) { + + self.data[attrname] = data[attrname]; + } + + //update affected cells only + + for (var attrname in data) { + + var cell = this.getCell(attrname); + + if (cell) { + + if (cell.getValue() != data[attrname]) { + + cell.setValueProcessData(data[attrname]); + } + } + } + + //Partial reinitialization if visible + + if (this.element.is(":visible")) { + + self.normalizeHeight(); + + if (self.table.options.rowFormatter) { + + self.table.options.rowFormatter(self.getComponent()); + } + } else { + + this.initialized = false; + + this.height = 0; + } + + //self.reinitialize(); + + + self.table.options.rowUpdated(self.getComponent()); + }; + + Row.prototype.getData = function (transform) { + + var self = this; + + if (transform) { + + if (self.table.extExists("accessor")) { + + return self.table.extensions.accessor.transformRow(self.data); + } + } else { + + return this.data; + } + }; + + Row.prototype.getCell = function (column) { + + var match = false, + column = this.table.columnManager.findColumn(column); + + match = this.cells.find(function (cell) { + + return cell.column === column; + }); + + return match; + }, Row.prototype.getCellIndex = function (findCell) { + + return this.cells.findIndex(function (cell) { + + return cell === findCell; + }); + }, Row.prototype.findNextEditableCell = function (index) { + + var nextCell = false; + + if (index < this.cells.length - 1) { + + for (var i = index + 1; i < this.cells.length; i++) { + + var cell = this.cells[i]; + + if (cell.column.extensions.edit && cell.getElement().is(":visible")) { + + var allowEdit = true; + + if (typeof cell.column.extensions.edit.check == "function") { + + allowEdit = cell.column.extensions.edit.check(cell.getComponent()); + } + + if (allowEdit) { + + nextCell = cell; + + break; + } + } + } + } + + return nextCell; + }, Row.prototype.findPrevEditableCell = function (index) { + + var prevCell = false; + + if (index > 0) { + + for (var i = index - 1; i >= 0; i--) { + + var cell = this.cells[i], + allowEdit = true; + + if (cell.column.extensions.edit && cell.getElement().is(":visible")) { + + if (typeof cell.column.extensions.edit.check == "function") { + + allowEdit = cell.column.extensions.edit.check(cell.getComponent()); + } + + if (allowEdit) { + + prevCell = cell; + + break; + } + } + } + } + + return prevCell; + }, Row.prototype.getCells = function () { + + return this.cells; + }, + + ///////////////////// Actions ///////////////////// + + + Row.prototype.delete = function () { + + var index = this.table.rowManager.getRowIndex(this); + + this.deleteActual(); + + if (this.table.options.history && this.table.extExists("history")) { + + if (index) { + + index = this.table.rowManager.rows[index - 1]; + } + + this.table.extensions.history.action("rowDelete", this, { data: this.getData(), pos: !index, index: index }); + }; + }; + + Row.prototype.deleteActual = function () { + + this.table.rowManager.deleteRow(this); + + this.deleteCells(); + }; + + Row.prototype.deleteCells = function () { + + var cellCount = this.cells.length; + + for (var i = 0; i < cellCount; i++) { + + this.cells[0].delete(); + } + }; + + //////////////// Object Generation ///////////////// + + Row.prototype.getComponent = function () { + + return new RowComponent(this); + }; + + //public row object + + var CellComponent = function CellComponent(cell) { + + this.cell = cell; + }; + + CellComponent.prototype.getValue = function () { + + return this.cell.getValue(); + }; + + CellComponent.prototype.getOldValue = function () { + + return this.cell.getOldValue(); + }; + + CellComponent.prototype.getElement = function () { + + return $(this.cell.getElement()); + }; + + CellComponent.prototype.getRow = function () { + + return this.cell.row.getComponent(); + }; + + CellComponent.prototype.getData = function () { + + return this.cell.row.getData(); + }; + + CellComponent.prototype.getField = function () { + + return this.cell.column.getField(); + }; + + CellComponent.prototype.getColumn = function () { + + return this.cell.column.getComponent(); + }; + + CellComponent.prototype.setValue = function (value, mutate) { + + if (typeof mutate == "undefined") { + + mutate = true; + } + + this.cell.setValue(value, mutate); + }; + + CellComponent.prototype.restoreOldValue = function () { + + this.cell.setValueActual(this.cell.getOldValue()); + }; + + CellComponent.prototype.edit = function () { + + this.cell.edit(); + }; + + CellComponent.prototype.nav = function () { + + return this.cell.nav(); + }; + + CellComponent.prototype.checkHeight = function () { + + this.cell.checkHeight(); + }; + + CellComponent.prototype._getSelf = function () { + + return this.cell; + }; + + var Cell = function Cell(column, row) { + + this.table = column.table; + + this.column = column; + + this.row = row; + + // this.element = $("
"); + + this.element = null; + + this.value = null; + + this.oldValue = null; + + this.height = null; + + this.width = null; + + this.minWidth = null; + + this.build(); + }; + + //////////////// Setup Functions ///////////////// + + + //generate element + + Cell.prototype.build = function () { + + this.generateElement(); + + this.setWidth(this.column.width); + + this._configureCell(); + + this.setValueActual(this.column.getFieldValue(this.row.data)); + }; + + Cell.prototype.generateElement = function () { + + this.element = document.createElement('div'); + + this.element.className = "tabulator-cell"; + + this.element.setAttribute("role", "gridcell"); + + this.element = $(this.element); + }; + + Cell.prototype._configureCell = function () { + + var self = this, + cellEvents = self.column.cellEvents, + element = self.element, + field = this.column.getField(), + dblTap, + tapHold, + tap; + + //set text alignment + + element[0].style.textAlign = self.column.hozAlign; + + if (field) { + + element.attr("tabulator-field", field); + } + + if (self.column.definition.cssClass) { + + element.addClass(self.column.definition.cssClass); + } + + //set event bindings + + if (cellEvents.cellClick) { + + self.element.on("click", function (e) { + + cellEvents.cellClick(e, self.getComponent()); + }); + } + + if (cellEvents.cellDblClick) { + + self.element.on("dblclick", function (e) { + + cellEvents.cellDblClick(e, self.getComponent()); + }); + } + + if (cellEvents.cellContext) { + + self.element.on("contextmenu", function (e) { + + cellEvents.cellContext(e, self.getComponent()); + }); + } + + if (cellEvents.cellTap) { + + tap = false; + + self.element.on("touchstart", function (e) { + + tap = true; + }); + + self.element.on("touchend", function (e) { + + if (tap) { + + cellEvents.cellTap(e, self.getComponent()); + } + + tap = false; + }); + } + + if (cellEvents.cellDblTap) { + + dblTap = null; + + self.element.on("touchend", function (e) { + + if (dblTap) { + + clearTimeout(dblTap); + + dblTap = null; + + cellEvents.cellDblTap(e, self.getComponent()); + } else { + + dblTap = setTimeout(function () { + + clearTimeout(dblTap); + + dblTap = null; + }, 300); + } + }); + } + + if (cellEvents.cellTapHold) { + + tapHold = null; + + self.element.on("touchstart", function (e) { + + clearTimeout(tapHold); + + tapHold = setTimeout(function () { + + clearTimeout(tapHold); + + tapHold = null; + + tap = false; + + cellEvents.cellTapHold(e, self.getComponent()); + }, 1000); + }); + + self.element.on("touchend", function (e) { + + clearTimeout(tapHold); + + tapHold = null; + }); + } + + if (self.column.extensions.edit) { + + self.table.extensions.edit.bindEditor(self); + } + + if (self.column.definition.rowHandle && self.table.options.movableRows !== false && self.table.extExists("moveRow")) { + + self.table.extensions.moveRow.initializeCell(self); + } + + //hide cell if not visible + + if (!self.column.visible) { + + self.hide(); + } + }; + + //generate cell contents + + Cell.prototype._generateContents = function () { + + var self = this; + + if (self.table.extExists("format")) { + + self.element.html(self.table.extensions.format.formatValue(self)); + } else { + + self.element.html(self.value); + } + }; + + //generate tooltip text + + Cell.prototype._generateTooltip = function () { + + var self = this; + + var tooltip = self.column.tooltip; + + if (tooltip) { + + if (tooltip === true) { + + tooltip = self.value; + } else if (typeof tooltip == "function") { + + tooltip = tooltip(self.getComponent()); + } + + self.element[0].setAttribute("title", tooltip); + } else { + + self.element[0].setAttribute("title", ""); + } + }; + + //////////////////// Getters //////////////////// + + Cell.prototype.getElement = function () { + + return this.element; + }; + + Cell.prototype.getValue = function () { + + return this.value; + }; + + Cell.prototype.getOldValue = function () { + + return this.oldValue; + }; + + //////////////////// Actions //////////////////// + + + Cell.prototype.setValue = function (value, mutate) { + + var changed = this.setValueProcessData(value, mutate); + + if (changed) { + + if (this.table.options.history && this.table.extExists("history")) { + + this.table.extensions.history.action("cellEdit", this, { oldValue: this.oldValue, newValue: this.value }); + }; + + this.table.options.cellEdited(this.getComponent()); + + this.table.options.dataEdited(this.table.rowManager.getData()); + } + + if (this.table.extExists("columnCalcs")) { + + if (this.column.definition.topCalc || this.column.definition.bottomCalc) { + + if (this.table.options.groupBy && this.table.extExists("groupRows")) { + + this.table.extensions.columnCalcs.recalcRowGroup(this.row); + } else { + + this.table.extensions.columnCalcs.recalc(this.table.rowManager.displayRows); + } + } + } + }; + + Cell.prototype.setValueProcessData = function (value, mutate) { + + var changed = false; + + if (this.value != value) { + + changed = true; + + if (mutate) { + + if (this.column.extensions.mutate && this.column.extensions.mutate.type !== "data") { + + value = this.table.extensions.mutator.transformCell(this, value); + } + } + } + + this.setValueActual(value); + + return changed; + }; + + Cell.prototype.setValueActual = function (value) { + + this.oldValue = this.value; + + this.value = value; + + this.column.setFieldValue(this.row.data, value); + + this._generateContents(); + + this._generateTooltip(); + + //set resizable handles + + if (this.table.options.resizableColumns && this.table.extExists("resizeColumns")) { + + this.table.extensions.resizeColumns.initializeColumn("cell", this.column, this.element); + } + + //handle frozen cells + + if (this.table.extExists("frozenColumns")) { + + this.table.extensions.frozenColumns.layoutElement(this.element, this.column); + } + }; + + Cell.prototype.setWidth = function (width) { + + this.width = width; + + // this.element.css("width", width || ""); + + this.element[0].style.width = width ? width + "px" : ""; + }; + + Cell.prototype.getWidth = function () { + + return this.width || this.element.outerWidth(); + }; + + Cell.prototype.setMinWidth = function (minWidth) { + + this.minWidth = minWidth; + + this.element[0].style.minWidth = minWidth ? minWidth + "px" : ""; + }; + + Cell.prototype.checkHeight = function () { + + var height = this.element.css("height"); + + this.row.reinitializeHeight(); + }; + + Cell.prototype.clearHeight = function () { + + this.element[0].style.height = ""; + }; + + Cell.prototype.setHeight = function (height) { + + this.height = height; + + this.element[0].style.height = height ? height + "px" : ""; + }; + + Cell.prototype.getHeight = function () { + + return this.height || this.element.outerHeight(); + }; + + Cell.prototype.show = function () { + + this.element[0].style.display = ""; + }; + + Cell.prototype.hide = function () { + + this.element[0].style.display = "none"; + }; + + Cell.prototype.edit = function () { + + this.element.focus(); + }; + + Cell.prototype.delete = function () { + + this.element.detach(); + + this.column.deleteCell(this); + + this.row.deleteCell(this); + }; + + //////////////// Navigation ///////////////// + + + Cell.prototype.nav = function () { + + var self = this, + nextCell = false, + index = this.row.getCellIndex(this); + + return { + + next: function next() { + + var nextCell = this.right(), + nextRow; + + if (!nextCell) { + + nextRow = self.table.rowManager.nextDisplayRow(self.row); + + if (nextRow) { + + nextCell = nextRow.findNextEditableCell(-1); + + if (nextCell) { + + nextCell.edit(); + + return true; + } + } + } else { + + return true; + } + + return false; + }, + + prev: function prev() { + + var nextCell = this.left(), + prevRow; + + if (!nextCell) { + + prevRow = self.table.rowManager.prevDisplayRow(self.row); + + if (prevRow) { + + nextCell = prevRow.findPrevEditableCell(prevRow.cells.length); + + if (nextCell) { + + nextCell.edit(); + + return true; + } + } + } else { + + return true; + } + + return false; + }, + + left: function left() { + + nextCell = self.row.findPrevEditableCell(index); + + if (nextCell) { + + nextCell.edit(); + + return true; + } else { + + return false; + } + }, + + right: function right() { + + nextCell = self.row.findNextEditableCell(index); + + if (nextCell) { + + nextCell.edit(); + + return true; + } else { + + return false; + } + }, + + up: function up() { + + var nextRow = self.table.rowManager.prevDisplayRow(self.row); + + if (nextRow) { + + nextRow.cells[index].edit(); + } + }, + + down: function down() { + + var nextRow = self.table.rowManager.nextDisplayRow(self.row); + + if (nextRow) { + + nextRow.cells[index].edit(); + } + } + + }; + }; + + Cell.prototype.getIndex = function () { + + this.row.getCellIndex(this); + }; + + //////////////// Object Generation ///////////////// + + Cell.prototype.getComponent = function () { + + return new CellComponent(this); + }; + + var FooterManager = function FooterManager(table) { + + this.table = table; + + this.active = false; + + this.element = $(""); //containing element + + this.links = []; + + this._initialize(); + }; + + FooterManager.prototype._initialize = function (element) { + + if (this.table.options.footerElement) { + + this.element = this.table.options.footerElement; + } + }; + + FooterManager.prototype.getElement = function () { + + return this.element; + }; + + FooterManager.prototype.append = function (element, parent) { + + this.activate(parent); + + this.element.append(element); + + this.table.rowManager.adjustTableSize(); + }; + + FooterManager.prototype.prepend = function (element, parent) { + + this.activate(parent); + + this.element.prepend(element); + + this.table.rowManager.adjustTableSize(); + }; + + FooterManager.prototype.remove = function (element) { + + element.remove(); + + this.deactivate(); + }; + + FooterManager.prototype.deactivate = function (force) { + + if (this.element.is(":empty") || force) { + + this.element.remove(); + + this.active = false; + } + + // this.table.rowManager.adjustTableSize(); + }; + + FooterManager.prototype.activate = function (parent) { + + if (!this.active) { + + this.active = true; + + this.table.element.append(this.getElement()); + + this.table.element.show(); + } + + if (parent) { + + this.links.push(parent); + } + }; + + FooterManager.prototype.redraw = function () { + + this.links.forEach(function (link) { + + link.footerRedraw(); + }); + }; + + window.Tabulator = { + + columnManager: null, // hold Column Manager + + rowManager: null, //hold Row Manager + + footerManager: null, //holder Footer Manager + + browser: "", //hold current browser type + + browserSlow: false, //handle reduced functionality for slower browsers + + + //setup options + + options: { + + height: false, //height of tabulator + + + layout: "fitData", ///layout type "fitColumns" | "fitData" + + fitColumns: false, //DEPRICATED - fit colums to width of screen; + + + columnMinWidth: 40, //minimum global width for a column + + columnVertAlign: "top", //vertical alignment of column headers + + + resizableColumns: true, //resizable columns + + + columns: [], //store for colum header info + + + data: [], //default starting data + + + tooltips: false, //Tool tip value + + tooltipsHeader: false, //Tool tip for headers + + + initialSort: false, //initial sorting criteria + + + footerElement: false, //hold footer element + + + index: "id", //filed for row index + + + keybindings: [], //array for keybindings + + + downloadDataMutator: false, //function to manipulate table data before it is downloaded + + + addRowPos: "bottom", //position to insert blank rows, top|bottom + + + selectable: "highlight", //highlight rows on hover + + selectableRollingSelection: true, //roll selection once maximum number of selectable rows is reached + + selectablePersistence: true, // maintain selection when table view is updated + + selectableCheck: function selectableCheck(data, row) { + return true; + }, //check wheather row is selectable + + + headerFilterPlaceholder: false, //placeholder text to display in header filters + + + history: false, //enable edit history + + + locale: false, //current system language + + langs: {}, + + virtualDom: true, //enable DOM virtualization + + + persistentLayout: false, //store cookie with column _styles + + persistentLayoutID: "", //id for stored cookie + + + responsiveLayout: false, //responsive layout flags + + + pagination: false, //set pagination type + + paginationSize: false, //set number of rows to a page + + paginationElement: false, //element to hold pagination numbers + + paginationDataSent: {}, //pagination data sent to the server + + paginationDataReceived: {}, //pagination data received from the server + + paginator: false, //pagination url string builder + + + ajaxURL: false, //url for ajax loading + + ajaxParams: {}, //params for ajax loading + + ajaxConfig: "get", //ajax request type + + ajaxLoader: true, //show loader + + ajaxLoaderLoading: false, //loader element + + ajaxLoaderError: false, //loader element + + ajaxFiltering: false, + + ajaxSorting: false, + + groupBy: false, //enable table grouping and set field to group by + + groupStartOpen: true, //starting state of group + + + groupHeader: false, //header generation function + + + movableColumns: false, //enable movable columns + + movableRows: false, //enable movable rows + + + rowFormatter: false, + + placeholder: false, + + //table building callbacks + + tableBuilding: function tableBuilding() {}, + + tableBuilt: function tableBuilt() {}, + + //render callbacks + + renderStarted: function renderStarted() {}, + + renderComplete: function renderComplete() {}, + + //row callbacks + + rowClick: false, + + rowDblClick: false, + + rowContext: false, + + rowTap: false, + + rowDblTap: false, + + rowTapHold: false, + + rowAdded: function rowAdded() {}, + + rowDeleted: function rowDeleted() {}, + + rowMoved: function rowMoved() {}, + + rowUpdated: function rowUpdated() {}, + + rowSelectionChanged: function rowSelectionChanged() {}, + + rowSelected: function rowSelected() {}, + + rowDeselected: function rowDeselected() {}, + + //cell callbacks + + cellEditing: function cellEditing() {}, + + cellEdited: function cellEdited() {}, + + cellEditCancelled: function cellEditCancelled() {}, + + //column callbacks + + columnMoved: function columnMoved() {}, + + columnResized: function columnResized() {}, + + columnTitleChanged: function columnTitleChanged() {}, + + columnVisibilityChanged: function columnVisibilityChanged() {}, + + //HTML iport callbacks + + htmlImporting: function htmlImporting() {}, + + htmlImported: function htmlImported() {}, + + //data callbacks + + dataLoading: function dataLoading() {}, + + dataLoaded: function dataLoaded() {}, + + dataEdited: function dataEdited() {}, + + //ajax callbacks + + ajaxRequesting: function ajaxRequesting() {}, + + ajaxResponse: false, + + ajaxError: function ajaxError() {}, + + //filtering callbacks + + dataFiltering: false, + + dataFiltered: false, + + //sorting callbacks + + dataSorting: function dataSorting() {}, + + dataSorted: function dataSorted() {}, + + //grouping callbacks + + groupToggleElement: "arrow", + + groupClosedShowCalcs: false, + + dataGrouping: function dataGrouping() {}, + + dataGrouped: false, + + groupVisibilityChanged: function groupVisibilityChanged() {}, + + groupClick: false, + + groupDblClick: false, + + groupContext: false, + + groupTap: false, + + groupDblTap: false, + + groupTapHold: false, + + //pagination callbacks + + pageLoaded: function pageLoaded() {}, + + //localization callbacks + + localized: function localized() {}, + + //validation has failed + + validationFailed: function validationFailed() {} + + }, + + //convert depricated functionality to new functions + + _mapDepricatedFunctionality: function _mapDepricatedFunctionality() { + + if (this.options.fitColumns) { + + this.options.layout = "fitColumns"; + + console.warn("The%c fitColumns:true%c option has been depricated and will be removed in version 4.0, use %c layout:'fitColumns'%c instead.", "font-weight:bold;", "font-weight:regular;", "font-weight:bold;", "font-weight:regular;"); + } + }, + + //constructor + + _create: function _create() { + + var self = this, + element = this.element; + + self._mapDepricatedFunctionality(); + + self.bindExtensions(); + + if (element.is("table")) { + + if (this.extExists("htmlTableImport", true)) { + + self.extensions.htmlTableImport.parseTable(); + } + } else { + + self.columnManager = new ColumnManager(self); + + self.rowManager = new RowManager(self); + + self.footerManager = new FooterManager(self); + + self.columnManager.setRowManager(self.rowManager); + + self.rowManager.setColumnManager(self.columnManager); + + self._buildElement(); + + //give the browser a chance to fully render the table then load first data set if present + + // setTimeout(function(){ + + + //load initial data set + + this._loadInitialData(); + + // },20) + } + }, + + //build tabulator element + + _buildElement: function _buildElement() { + + var element = this.element, + ext = this.extensions, + options = this.options; + + options.tableBuilding(); + + element.addClass("tabulator").attr("role", "grid").empty(); + + this._detectBrowser(); + + if (this.extExists("layout", true)) { + + ext.layout.initialize(options.layout); + } + + //set localization + + if (options.headerFilterPlaceholder !== false) { + + ext.localize.setHeaderFilterPlaceholder(options.headerFilterPlaceholder); + } + + for (var locale in options.langs) { + + ext.localize.installLang(locale, options.langs[locale]); + } + + ext.localize.setLocale(options.locale); + + //configure placeholder element + + if (typeof options.placeholder == "string") { + + options.placeholder = $("
" + options.placeholder + "
"); + } + + //set table height + + if (options.height) { + + options.height = isNaN(options.height) ? options.height : options.height + "px"; + + this.element.css({ "height": options.height }); + } + + //build table elements + + element.append(this.columnManager.getElement()); + + element.append(this.rowManager.getElement()); + + if (options.footerElement) { + + this.footerManager.activate(); + } + + if (options.persistentLayout && this.extExists("persistentLayout", true)) { + + ext.persistentLayout.initialize(options.persistentLayout, options.persistentLayoutID); + + options.columns = ext.persistentLayout.load(options.columns); + } + + if (this.extExists("columnCalcs")) { + + ext.columnCalcs.initialize(); + } + + this.columnManager.setColumns(options.columns); + + if (options.initialSort && this.extExists("sort", true)) { + + ext.sort.setSort(options.initialSort); + } + + if (options.pagination && this.extExists("page", true)) { + + ext.page.initialize(); + } + + if (options.groupBy && this.extExists("groupRows", true)) { + + ext.groupRows.initialize(); + } + + if (this.extExists("ajax")) { + + ext.ajax.initialize(); + } + + if (this.extExists("keybindings")) { + + ext.keybindings.initialize(); + } + + if (this.extExists("selectRow")) { + + ext.selectRow.clearSelectionData(); + } + + options.tableBuilt(); + }, + + _loadInitialData: function _loadInitialData() { + + var self = this; + + if (self.options.pagination && self.extExists("page")) { + + self.extensions.page.reset(true); + + self.extensions.page.setPage(1); + + if (self.options.pagination == "local") { + + self.rowManager.setData(self.options.data); + } + } else { + + if (self.options.data.length) { + + self.rowManager.setData(self.options.data); + } else { + + if (self.options.ajaxURL && self.extExists("ajax")) { + + self.extensions.ajax.sendRequest(function (data) { + + self.rowManager.setData(data); + }); + } else { + + self.rowManager.setData(self.options.data); + } + } + } + }, + + //set options + + _setOption: function _setOption(option, value) { + + console.error("Options Error - Tabulator does not allow options to be set after initialization unless there is a function defined for that purpose"); + }, + + //deconstructor + + _destroy: function _destroy() { + + var element = this.element; + + element.empty(); + + element.removeClass("tabulator"); + }, + + _detectBrowser: function _detectBrowser() { + + var ua = navigator.userAgent; + + if (ua.indexOf("Trident") > -1) { + + this.brower = "ie"; + + this.browserSlow = true; + } else if (ua.indexOf("Edge") > -1) { + + this.brower = "edge"; + + this.browserSlow = true; + } else { + + this.brower = "other"; + + this.browserSlow = false; + } + }, + + + ////////////////// Data Handling ////////////////// + + + //load data + + setData: function setData(data, params, config) { + + var self = this; + + var self = this; + + if (typeof data === "string") { + + if (data.indexOf("{") == 0 || data.indexOf("[") == 0) { + + //data is a json encoded string + + self.rowManager.setData(JSON.parse(data)); + } else { + + if (self.extExists("ajax", true)) { + + if (params) { + + self.extensions.ajax.setParams(params); + } + + if (config) { + + self.extensions.ajax.setConfig(config); + } + + self.extensions.ajax.setUrl(data); + + if (self.options.pagination == "remote" && self.extExists("page", true)) { + + self.extensions.page.reset(true); + + self.extensions.page.setPage(1); + } else { + + //assume data is url, make ajax call to url to get data + + self.extensions.ajax.sendRequest(function (data) { + + self.rowManager.setData(data); + }); + } + } + } + } else { + + if (data) { + + //asume data is already an object + + self.rowManager.setData(data); + } else { + + //no data provided, check if ajaxURL is present; + + if (self.extExists("ajax") && self.extensions.ajax.getUrl) { + + if (self.options.pagination == "remote" && self.extExists("page", true)) { + + self.extensions.page.reset(true); + + self.extensions.page.setPage(1); + } else { + + self.extensions.ajax.sendRequest(function (data) { + + self.rowManager.setData(data); + }); + } + } else { + + //empty data + + self.rowManager.setData([]); + } + } + } + }, + + //clear data + + clearData: function clearData() { + + this.rowManager.clearData(); + }, + + //get table data array + + getData: function getData(active) { + + return this.rowManager.getData(active); + }, + + //get table data array count + + getDataCount: function getDataCount(active) { + + return this.rowManager.getDataCount(active); + }, + + //get table html + + getHtml: function getHtml(active) { + + return this.rowManager.getHtml(active); + }, + + //retrieve Ajax URL + + getAjaxUrl: function getAjaxUrl() { + + if (this.extExists("ajax", true)) { + + return this.extensions.ajax.getUrl(); + } + }, + + //update table data + + updateData: function updateData(data) { + + var self = this; + + if (data) { + + data.forEach(function (item) { + + var row = self.rowManager.findRow(item[self.options.index]); + + if (row) { + + row.updateData(item); + } + }); + } else { + + console.warn("Update Error - No data provided"); + } + }, + + addData: function addData(data, pos, index) { + + if (data) { + + this.rowManager.addRows(data, pos, index); + } else { + + console.warn("Update Error - No data provided"); + } + }, + + //update table data + + updateOrAddData: function updateOrAddData(data) { + + var self = this; + + if (data) { + + data.forEach(function (item) { + + var row = self.rowManager.findRow(item[self.options.index]); + + if (row) { + + row.updateData(item); + } else { + + self.rowManager.addRow(item); + } + }); + } else { + + console.warn("Update Error - No data provided"); + } + }, + + //get row object + + getRow: function getRow(index) { + + var row = this.rowManager.findRow(index); + + if (row) { + + return row.getComponent(); + } else { + + console.warn("Find Error - No matching row found:", index); + + return false; + } + }, + + //delete row from table + + deleteRow: function deleteRow(index) { + + var row = this.rowManager.findRow(index); + + if (row) { + + row.delete(); + + return true; + } else { + + console.warn("Delete Error - No matching row found:", index); + + return false; + } + }, + + //add row to table + + addRow: function addRow(data, pos, index) { + + return this.rowManager.addRow(data, pos, index); + }, + + //update a row if it exitsts otherwise create it + + updateOrAddRow: function updateOrAddRow(index, data) { + + var row = this.rowManager.findRow(index); + + if (row) { + + row.updateData(data); + } else { + + row = this.rowManager.addRow(data); + } + + return row.getComponent(); + }, + + //update row data + + updateRow: function updateRow(index, data) { + + var row = this.rowManager.findRow(index); + + if (row) { + + row.updateData(data); + + return row.getComponent(); + } else { + + console.warn("Update Error - No matching row found:", index); + + return false; + } + }, + + //scroll to row in DOM + + scrollToRow: function scrollToRow(index) { + + var row = this.rowManager.findRow(index); + + if (row) { + + return this.rowManager.scrollToRow(row); + } else { + + console.warn("Scroll Error - No matching row found:", index); + + return false; + } + }, + + getRows: function getRows(active) { + + return this.rowManager.getComponents(active); + }, + + /////////////// Column Functions /////////////// + + + setColumns: function setColumns(definition) { + + this.columnManager.setColumns(definition); + }, + + getColumns: function getColumns() { + + return this.columnManager.getComponents(); + }, + + getColumnDefinitions: function getColumnDefinitions() { + + return this.columnManager.getDefinitionTree(); + }, + + getColumnLayout: function getColumnLayout() { + + if (this.extExists("persistentLayout", true)) { + + return this.extensions.persistentLayout.parseColumns(this.columnManager.getColumns()); + } + }, + + setColumnLayout: function setColumnLayout(layout) { + + if (this.extExists("persistentLayout", true)) { + + this.columnManager.setColumns(this.extensions.persistentLayout.mergeDefinition(this.options.columns, layout)); + + return true; + } + + return false; + }, + + showColumn: function showColumn(field) { + + var column = this.columnManager.findColumn(field); + + if (column) { + + column.show(); + } else { + + console.warn("Column Show Error - No matching column found:", field); + + return false; + } + }, + + hideColumn: function hideColumn(field) { + + var column = this.columnManager.findColumn(field); + + if (column) { + + column.hide(); + } else { + + console.warn("Column Hide Error - No matching column found:", field); + + return false; + } + }, + + toggleColumn: function toggleColumn(field) { + + var column = this.columnManager.findColumn(field); + + if (column) { + + if (column.visible) { + + column.hide(); + } else { + + column.show(); + } + } else { + + console.warn("Column Visibility Toggle Error - No matching column found:", field); + + return false; + } + }, + + addColumn: function addColumn(definition, before, field) { + + var column = this.columnManager.findColumn(field); + + this.columnManager.addColumn(definition, before, column); + }, + + deleteColumn: function deleteColumn(field) { + + var column = this.columnManager.findColumn(field); + + if (column) { + + column.delete(); + } else { + + console.warn("Column Delete Error - No matching column found:", field); + + return false; + } + }, + + //////////// Localization Functions //////////// + + setLocale: function setLocale(locale) { + + this.extensions.localize.setLocale(locale); + }, + + getLocale: function getLocale() { + + return this.extensions.localize.getLocale(); + }, + + getLang: function getLang(locale) { + + return this.extensions.localize.getLang(locale); + }, + + //////////// General Public Functions //////////// + + + //redraw list without updating data + + redraw: function redraw(force) { + + this.columnManager.redraw(force); + + this.rowManager.redraw(force); + }, + + setHeight: function setHeight(height) { + + this.options.height = isNaN(height) ? height : height + "px"; + + this.element.css({ "height": this.options.height }); + + this.rowManager.redraw(); + }, + + ///////////////////// Sorting //////////////////// + + + //trigger sort + + setSort: function setSort(sortList, dir) { + + if (this.extExists("sort", true)) { + + this.extensions.sort.setSort(sortList, dir); + + this.rowManager.sorterRefresh(); + } + }, + + getSort: function getSort() { + + if (this.extExists("sort", true)) { + + console.warn("The%c getSort%c function has been depricated and will be removed in version 4.0, use %c getSorters%c instead.", "font-weight:bold;", "font-weight:regular;", "font-weight:bold;", "font-weight:regular;"); + + return this.getSorters(); + } + }, + + getSorters: function getSorters() { + + if (this.extExists("sort", true)) { + + return this.extensions.sort.getSort(); + } + }, + + clearSort: function clearSort() { + + if (this.extExists("sort", true)) { + + this.extensions.sort.clear(); + + this.rowManager.sorterRefresh(); + } + }, + + ///////////////////// Filtering //////////////////// + + + //set standard filters + + setFilter: function setFilter(field, type, value) { + + if (this.extExists("filter", true)) { + + this.extensions.filter.setFilter(field, type, value); + + this.rowManager.filterRefresh(); + } + }, + + //add filter to array + + addFilter: function addFilter(field, type, value) { + + if (this.extExists("filter", true)) { + + this.extensions.filter.addFilter(field, type, value); + + this.rowManager.filterRefresh(); + } + }, + + //get all filters + + getFilter: function getFilter(all) { + + console.warn("The%c getFilter%c function has been depricated and will be removed in version 4.0, use %c getFilters%c instead.", "font-weight:bold;", "font-weight:regular;", "font-weight:bold;", "font-weight:regular;"); + + this.getFilters(all); + }, + + getFilters: function getFilters(all) { + + if (this.extExists("filter", true)) { + + return this.extensions.filter.getFilters(all); + } + }, + + getHeaderFilters: function getHeaderFilters() { + + if (this.extExists("filter", true)) { + + return this.extensions.filter.getHeaderFilters(); + } + }, + + //remove filter from array + + removeFilter: function removeFilter(field, type, value) { + + if (this.extExists("filter", true)) { + + this.extensions.filter.removeFilter(field, type, value); + + this.rowManager.filterRefresh(); + } + }, + + //clear filters + + clearFilter: function clearFilter(all) { + + if (this.extExists("filter", true)) { + + this.extensions.filter.clearFilter(all); + + this.rowManager.filterRefresh(); + } + }, + + //clear header filters + + clearHeaderFilter: function clearHeaderFilter() { + + if (this.extExists("filter", true)) { + + this.extensions.filter.clearHeaderFilter(); + + this.rowManager.filterRefresh(); + } + }, + + ///////////////////// Filtering //////////////////// + + selectRow: function selectRow(rows) { + + if (this.extExists("selectRow", true)) { + + this.extensions.selectRow.selectRows(rows); + } + }, + + deselectRow: function deselectRow(rows) { + + if (this.extExists("selectRow", true)) { + + this.extensions.selectRow.deselectRows(rows); + } + }, + + toggleSelectRow: function toggleSelectRow(row) { + + if (this.extExists("selectRow", true)) { + + this.extensions.selectRow.toggleRow(row); + } + }, + + getSelectedRows: function getSelectedRows() { + + if (this.extExists("selectRow", true)) { + + return this.extensions.selectRow.getSelectedRows(); + } + }, + + getSelectedData: function getSelectedData() { + + if (this.extExists("selectRow", true)) { + + return this.extensions.selectRow.getSelectedData(); + } + }, + + //////////// Pagination Functions //////////// + + + setMaxPage: function setMaxPage(max) { + + if (this.options.pagination && this.extExists("page")) { + + this.extensions.page.setMaxPage(max); + } else { + + return false; + } + }, + + setPage: function setPage(page) { + + if (this.options.pagination && this.extExists("page")) { + + this.extensions.page.setPage(page); + } else { + + return false; + } + }, + + setPageSize: function setPageSize(size) { + + if (this.options.pagination && this.extExists("page")) { + + this.extensions.page.setPageSize(size); + + this.extensions.page.setPage(1); + } else { + + return false; + } + }, + + getPageSize: function getPageSize() { + + if (this.options.pagination && this.extExists("page", true)) { + + return this.extensions.page.getPageSize(); + } + }, + + previousPage: function previousPage() { + + if (this.options.pagination && this.extExists("page")) { + + this.extensions.page.previousPage(); + } else { + + return false; + } + }, + + nextPage: function nextPage() { + + if (this.options.pagination && this.extExists("page")) { + + this.extensions.page.nextPage(); + } else { + + return false; + } + }, + + getPage: function getPage() { + + if (this.options.pagination && this.extExists("page")) { + + return this.extensions.page.getPage(); + } else { + + return false; + } + }, + + getPageMax: function getPageMax() { + + if (this.options.pagination && this.extExists("page")) { + + return this.extensions.page.getPageMax(); + } else { + + return false; + } + }, + + ///////////////// Grouping Functions /////////////// + + + setGroupBy: function setGroupBy(groups) { + + if (this.extExists("groupRows", true)) { + + this.options.groupBy = groups; + + this.extensions.groupRows.initialize(); + + this.rowManager.refreshActiveData(); + } else { + + return false; + } + }, + + setGroupStartOpen: function setGroupStartOpen(values) { + + if (this.extExists("groupRows", true)) { + + this.options.groupStartOpen = values; + + this.extensions.groupRows.initialize(); + + if (this.options.groupBy) { + + this.rowManager.refreshActiveData(); + } else { + + console.warn("Grouping Update - cant refresh view, no groups have been set"); + } + } else { + + return false; + } + }, + + setGroupHeader: function setGroupHeader(values) { + + if (this.extExists("groupRows", true)) { + + this.options.groupHeader = values; + + this.extensions.groupRows.initialize(); + + if (this.options.groupBy) { + + this.rowManager.refreshActiveData(); + } else { + + console.warn("Grouping Update - cant refresh view, no groups have been set"); + } + } else { + + return false; + } + }, + + getGroups: function getGroups(values) { + + if (this.extExists("groupRows", true)) { + + return this.extensions.groupRows.getGroups(); + } else { + + return false; + } + }, + + /////////////// Navigation Management ////////////// + + + navigatePrev: function navigatePrev() { + + var cell = false; + + if (this.table.extExists("edit", true)) { + + cell = this.table.extensions.edit.currentCell; + + if (cell) { + + e.preventDefault(); + + return cell.nav().prev(); + } + } + + return false; + }, + + navigateNext: function navigateNext() { + + var cell = false; + + if (this.table.extExists("edit", true)) { + + cell = this.table.extensions.edit.currentCell; + + if (cell) { + + e.preventDefault(); + + return cell.nav().next(); + } + } + + return false; + }, + + navigateLeft: function navigateLeft() { + + var cell = false; + + if (this.table.extExists("edit", true)) { + + cell = this.table.extensions.edit.currentCell; + + if (cell) { + + e.preventDefault(); + + return cell.nav().left(); + } + } + + return false; + }, + + navigateRight: function navigateRight() { + + var cell = false; + + if (this.table.extExists("edit", true)) { + + cell = this.table.extensions.edit.currentCell; + + if (cell) { + + e.preventDefault(); + + return cell.nav().right(); + } + } + + return false; + }, + + navigateUp: function navigateUp() { + + var cell = false; + + if (this.table.extExists("edit", true)) { + + cell = this.table.extensions.edit.currentCell; + + if (cell) { + + e.preventDefault(); + + return cell.nav().up(); + } + } + + return false; + }, + + navigateDown: function navigateDown() { + + var cell = false; + + if (this.table.extExists("edit", true)) { + + cell = this.table.extensions.edit.currentCell; + + if (cell) { + + e.preventDefault(); + + return cell.nav().dpwn(); + } + } + + return false; + }, + + /////////////// History Management ////////////// + + undo: function undo() { + + if (this.options.history && this.extExists("history", true)) { + + return this.extensions.history.undo(); + } else { + + return false; + } + }, + + redo: function redo() { + + if (this.options.history && this.extExists("history", true)) { + + return this.extensions.history.redo(); + } else { + + return false; + } + }, + + /////////////// Download Management ////////////// + + + download: function download(type, filename, options) { + + if (this.extExists("download", true)) { + + this.extensions.download.download(type, filename, options); + } + }, + + ////////////// Extension Management ////////////// + + + //object to hold extensions + + extensions: {}, + + extensionBindings: {}, + + //extend extension + + extendExtension: function extendExtension(name, property, values) { + + if (this.extensionBindings[name]) { + + var source = this.extensionBindings[name].prototype[property]; + + if (source) { + + if ((typeof values === 'undefined' ? 'undefined' : _typeof(values)) == "object") { + + for (var key in values) { + + source[key] = values[key]; + } + } else { + + console.warn("Extension Error - Invalid value type, it must be an object"); + } + } else { + + console.warn("Extension Error - property does not exist:", property); + } + } else { + + console.warn("Extension Error - extension does not exist:", name); + } + }, + + //add extension to tabulator + + registerExtension: function registerExtension(name, extension) { + + var self = this; + + this.extensionBindings[name] = extension; + }, + + //ensure that extensions are bound to instantiated function + + bindExtensions: function bindExtensions() { + + var self = this; + + this.extensions = {}; + + for (var name in self.extensionBindings) { + + self.extensions[name] = new self.extensionBindings[name](self); + } + }, + + //Check for plugin + + extExists: function extExists(plugin, required) { + + if (this.extensions[plugin]) { + + return true; + } else { + + if (required) { + + console.error("Tabulator Plugin Not Installed: " + plugin); + } + + return false; + } + } + + }; + + var Layout = function Layout(table) { + + this.table = table; + + this.mode = null; + }; + + //initialize layout system + + + Layout.prototype.initialize = function (layout) { + + if (this.modes[layout]) { + + this.mode = layout; + } else { + + console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : " + layout); + + this.mode = 'fitData'; + } + + this.table.element.attr("tabulator-layout", this.mode); + }; + + Layout.prototype.getMode = function () { + + return this.mode; + }; + + //trigger table layout + + + Layout.prototype.layout = function () { + + this.modes[this.mode].call(this, this.table.columnManager.columnsByIndex); + }; + + //layout render functions + + + Layout.prototype.modes = { + + //resize columns to fit data the contain + + + "fitData": function fitData(columns) { + + columns.forEach(function (column) { + + column.reinitializeWidth(); + }); + + if (this.table.options.responsiveLayout && this.table.extExists("responsiveLayout", true)) { + + this.table.extensions.responsiveLayout.update(); + } + }, + + //resize columns to fit data the contain + + + "fitDataFill": function fitDataFill(columns) { + + columns.forEach(function (column) { + + column.reinitializeWidth(); + }); + + if (this.table.options.responsiveLayout && this.table.extExists("responsiveLayout", true)) { + + this.table.extensions.responsiveLayout.update(); + } + }, + + //resize columns to fit + + + "fitColumns": function fitColumns(columns) { + + var self = this; + + var totalWidth = self.table.element.innerWidth(); //table element width + + + var fixedWidth = 0; //total width of columns with a defined width + + + var flexWidth = 0; //total width available to flexible columns + + + var flexColWidth = 0; //desired width of flexible columns + + + var flexColumns = []; //array of flexible width columns + + + var gapFill = 0; //number of pixels to be added to final column to close and half pixel gaps + + + //ensure columns resize to take up the correct amount of space + + + function scaleColumns(columns, freeSpace, colWidth) { + + var oversizeCols = [], + oversizeSpace = 0, + remainingSpace = 0, + nextColWidth = 0, + gap = 0, + undersizeCols = []; + + columns.forEach(function (column, i) { + + if (column.minWidth >= colWidth) { + + oversizeCols.push(column); + } else { + + undersizeCols.push(column); + } + }); + + if (oversizeCols.length) { + + oversizeCols.forEach(function (column) { + + oversizeSpace += column.minWidth; + + column.setWidth(column.minWidth); + }); + + remainingSpace = freeSpace - oversizeSpace; + + nextColWidth = undersizeCols.length ? Math.floor(remainingSpace / undersizeCols.length) : remainingSpace; + + gap = remainingSpace - nextColWidth * undersizeCols.length; + + gap += scaleColumns(undersizeCols, remainingSpace, nextColWidth); + } else { + + gap = undersizeCols.length ? freeSpace - Math.floor(freeSpace / undersizeCols.length) * undersizeCols.length : freeSpace; + + undersizeCols.forEach(function (column) { + + column.setWidth(colWidth); + }); + } + + return gap; + } + + if (this.table.options.responsiveLayout && this.table.extExists("responsiveLayout", true)) { + + this.table.extensions.responsiveLayout.update(); + } + + //adjust for vertical scrollbar if present + + + if (this.table.rowManager.element[0].scrollHeight > this.table.rowManager.element.innerHeight()) { + + totalWidth -= this.table.rowManager.element[0].offsetWidth - this.table.rowManager.element[0].clientWidth; + } + + columns.forEach(function (column) { + + var width, minWidth, colWidth; + + if (column.visible) { + + width = column.definition.width; + + minWidth = parseInt(column.minWidth); + + if (width) { + + if (typeof width == "string") { + + if (width.indexOf("%") > -1) { + + colWidth = totalWidth / 100 * parseInt(width); + } else { + + colWidth = parseInt(width); + } + } else { + + colWidth = width; + } + + fixedWidth += colWidth > minWidth ? colWidth : minWidth; + } else { + + flexColumns.push(column); + } + } + }); + + //calculate available space + + + flexWidth = totalWidth - fixedWidth; + + //calculate correct column size + + + flexColWidth = Math.floor(flexWidth / flexColumns.length); + + //generate column widths + + + var gapFill = scaleColumns(flexColumns, flexWidth, flexColWidth); + + //increase width of last column to account for rounding errors + + + if (flexColumns.length) { + + flexColumns[flexColumns.length - 1].setWidth(flexColumns[flexColumns.length - 1].getWidth() + gapFill); + } + } + + }; + + Tabulator.registerExtension("layout", Layout); + + var Localize = function Localize(table) { + + this.table = table; //hold Tabulator object + + this.locale = "default"; //current locale + + this.lang = false; //current language + + this.bindings = {}; //update events to call when locale is changed + }; + + //set header placehoder + + Localize.prototype.setHeaderFilterPlaceholder = function (placeholder) { + + this.langs.default.headerFilters.default = placeholder; + }; + + //set header filter placeholder by column + + Localize.prototype.setHeaderFilterColumnPlaceholder = function (column, placeholder) { + + this.langs.default.headerFilters.columns[column] = placeholder; + + if (this.lang && !this.lang.headerFilters.columns[column]) { + + this.lang.headerFilters.columns[column] = placeholder; + } + }; + + //setup a lang description object + + Localize.prototype.installLang = function (locale, lang) { + + if (this.langs[locale]) { + + this._setLangProp(this.langs[locale], lang); + } else { + + this.langs[locale] = lang; + } + }; + + Localize.prototype._setLangProp = function (lang, values) { + + for (var key in values) { + + if (lang[key] && _typeof(lang[key]) == "object") { + + this._setLangProp(lang[key], values[key]); + } else { + + lang[key] = values[key]; + } + } + }; + + //set current locale + + Localize.prototype.setLocale = function (desiredLocale) { + + var self = this; + + desiredLocale = desiredLocale || "default"; + + //fill in any matching languge values + + function traverseLang(trans, path) { + + for (var prop in trans) { + + if (_typeof(trans[prop]) == "object") { + + if (!path[prop]) { + + path[prop] = {}; + } + + traverseLang(trans[prop], path[prop]); + } else { + + path[prop] = trans[prop]; + } + } + } + + //determing correct locale to load + + if (desiredLocale === true && navigator.language) { + + //get local from system + + desiredLocale = navigator.language.toLowerCase(); + } + + if (desiredLocale) { + + //if locale is not set, check for matching top level locale else use default + + if (!self.langs[desiredLocale]) { + + var prefix = desiredLocale.split("-")[0]; + + if (self.langs[prefix]) { + + console.warn("Localization Error - Exact matching locale not found, using closest match: ", desiredLocale, prefix); + + desiredLocale = prefix; + } else { + + console.warn("Localization Error - Matching locale not found, using default: ", desiredLocale); + + desiredLocale = "default"; + } + } + } + + self.locale = desiredLocale; + + //load default lang template + + self.lang = $.extend(true, {}, self.langs.default); + + if (desiredLocale != "default") { + + traverseLang(self.langs[desiredLocale], self.lang); + } + + self.table.options.localized(self.locale, self.lang); + + self._executeBindings(); + }; + + //get current locale + + Localize.prototype.getLocale = function (locale) { + + return self.locale; + }; + + //get lang object for given local or current if none provided + + Localize.prototype.getLang = function (locale) { + + return locale ? this.langs[locale] : this.lang; + }; + + //get text for current locale + + Localize.prototype.getText = function (path, value) { + + var path = value ? path + "." + value : path, + pathArray = path.split("."), + text = this._getLangElement(pathArray, this.locale); + + // if(text === false){ + + // console.warn("Localization Error - Matching localized text not found for given path: ", path); + + // } + + + return text || ""; + }; + + //traverse langs object and find localized copy + + Localize.prototype._getLangElement = function (path, locale) { + + var self = this; + + var root = self.lang; + + path.forEach(function (level) { + + var rootPath; + + if (root) { + + rootPath = root[level]; + + if (typeof rootPath != "undefined") { + + root = rootPath; + } else { + + root = false; + } + } + }); + + return root; + }; + + //set update binding + + Localize.prototype.bind = function (path, callback) { + + if (!this.bindings[path]) { + + this.bindings[path] = []; + } + + this.bindings[path].push(callback); + + callback(this.getText(path), this.lang); + }; + + //itterate through bindings and trigger updates + + Localize.prototype._executeBindings = function () { + + var self = this; + + var _loop = function _loop(path) { + + self.bindings[path].forEach(function (binding) { + + binding(self.getText(path), self.lang); + }); + }; + + for (var path in self.bindings) { + _loop(path); + } + }; + + //Localized text listings + + Localize.prototype.langs = { + + "default": { //hold default locale text + + "groups": { + + "item": "item", + + "items": "items" + + }, + + "columns": {}, + + "ajax": { + + "loading": "Loading", + + "error": "Error" + + }, + + "pagination": { + + "first": "First", + + "first_title": "First Page", + + "last": "Last", + + "last_title": "Last Page", + + "prev": "Prev", + + "prev_title": "Prev Page", + + "next": "Next", + + "next_title": "Next Page" + + }, + + "headerFilters": { + + "default": "filter column...", + + "columns": {} + + } + + } + + }; + + Tabulator.registerExtension("localize", Localize); + + var Accessor = function Accessor(table) { + + this.table = table; //hold Tabulator object + + }; + + //initialize column accessor + + + Accessor.prototype.initializeColumn = function (column) { + + var config = { accessor: false, params: column.definition.accessorParams || {} }; + + //set column accessor + + + switch (_typeof(column.definition.accessor)) { + + case "string": + + if (this.accessors[column.definition.accessor]) { + + config.accessor = this.accessors[column.definition.accessor]; + } else { + + console.warn("Accessor Error - No such accessor found, ignoring: ", column.definition.accessor); + } + + break; + + case "function": + + config.accessor = column.definition.accessor; + + break; + + } + + if (config.accessor) { + + column.extensions.accessor = config; + } + }, + + //apply accessor to row + + + Accessor.prototype.transformRow = function (dataIn) { + + var self = this; + + //clone data object with deep copy to isolate internal data from returned result + + + var data = $.extend(true, {}, dataIn || {}); + + self.table.columnManager.traverse(function (column) { + + var field; + + if (column.extensions.accessor) { + + field = column.getField(); + + if (typeof data[field] != "undefined") { + + column.setFieldValue(data, column.extensions.accessor.accessor(column.getFieldValue(data), data, column.extensions.accessor.params)); + } + } + }); + + return data; + }, + + //default accessors + + + Accessor.prototype.accessors = {}; + + Tabulator.registerExtension("accessor", Accessor); + + var Ajax = function Ajax(table) { + + this.table = table; //hold Tabulator object + + + this.config = false; //hold config object for ajax request + + + this.url = ""; //request URL + + + this.params = false; //request parameters + + + this.loaderElement = $("
"); //loader message div + + + this.msgElement = $(""); //message element + + + this.loadingElement = false; + + this.errorElement = false; + }; + + //initialize setup options + + + Ajax.prototype.initialize = function () { + + this.loaderElement.append(this.msgElement); + + if (this.table.options.ajaxLoaderLoading) { + + this.loadingElement = this.table.options.ajaxLoaderLoading; + } + + if (this.table.options.ajaxLoaderError) { + + this.errorElement = this.table.options.ajaxLoaderError; + } + + if (this.table.options.ajaxParams) { + + this.setParams(this.table.options.ajaxParams); + } + + if (this.table.options.ajaxConfig) { + + this.setConfig(this.table.options.ajaxConfig); + } + + if (this.table.options.ajaxURL) { + + this.setUrl(this.table.options.ajaxURL); + } + }; + + //set ajax params + + + Ajax.prototype.setParams = function (params, update) { + + if (update) { + + this.params = this.params || {}; + + for (var key in params) { + + this.params[key] = params[key]; + } + } else { + + this.params = params; + } + }; + + Ajax.prototype.getParams = function () { + + return this.params || {}; + }; + + //load config object + + + Ajax.prototype.setConfig = function (config) { + + this._loadDefaultConfig(); + + if (typeof config == "string") { + + this.config.type = config; + } else { + + for (var key in config) { + + this.config[key] = config[key]; + } + } + }; + + //create config object from default + + + Ajax.prototype._loadDefaultConfig = function (force) { + + var self = this; + + if (!self.config || force) { + + self.config = {}; + + //load base config from defaults + + + for (var key in self.defaultConfig) { + + self.config[key] = self.defaultConfig[key]; + } + } + }; + + //set request url + + + Ajax.prototype.setUrl = function (url) { + + this.url = url; + }; + + //get request url + + + Ajax.prototype.getUrl = function () { + + return this.url; + }; + + //send ajax request + + + Ajax.prototype.sendRequest = function (callback) { + + var self = this; + + if (self.url) { + + self._loadDefaultConfig(); + + self.config.url = self.url; + + if (self.params) { + + self.config.data = self.params; + } + + if (self.table.options.ajaxRequesting(self.url, self.params) !== false) { + + self.showLoader(); + + $.ajax(self.config).done(function (data) { + + if (self.table.options.ajaxResponse) { + + data = self.table.options.ajaxResponse(self.url, self.params, data); + } + + self.table.options.dataLoaded(data); + + callback(data); + + self.hideLoader(); + }).fail(function (xhr, textStatus, errorThrown) { + + console.error("Ajax Load Error - Connection Error: " + xhr.status, errorThrown); + + self.table.options.ajaxError(xhr, textStatus, errorThrown); + + self.showError(); + + setTimeout(function () { + + self.hideLoader(); + }, 3000); + }); + } + } else { + + console.warn("Ajax Load Error - No URL Set"); + + return false; + } + }; + + Ajax.prototype.showLoader = function () { + + this.loaderElement.detach(); + + this.msgElement.empty().removeClass("tabulator-error").addClass("tabulator-loading"); + + if (this.loadingElement) { + + this.msgElement.append(this.loadingElement); + } else { + + this.msgElement.append(this.table.extensions.localize.getText("ajax.loading")); + } + + this.table.element.append(this.loaderElement); + }; + + Ajax.prototype.showError = function () { + + this.loaderElement.detach(); + + this.msgElement.empty().removeClass("tabulator-loading").addClass("tabulator-error"); + + if (this.errorElement) { + + this.msgElement.append(this.errorElement); + } else { + + this.msgElement.append(this.table.extensions.localize.getText("ajax.error")); + } + + this.table.element.append(this.loaderElement); + }; + + Ajax.prototype.hideLoader = function () { + + this.loaderElement.detach(); + }; + + //default ajax config object + + + Ajax.prototype.defaultConfig = { + + url: "", + + type: "GET", + + async: true, + + dataType: "json", + + success: function success(data) {} + + }; + + Tabulator.registerExtension("ajax", Ajax); + + var ColumnCalcs = function ColumnCalcs(table) { + + this.table = table; //hold Tabulator object + + + this.topCalcs = []; + + this.botCalcs = []; + + this.genColumn = false; + + this.topElement = $("
"); + + this.botElement = $("
"); + + this.topRow = false; + + this.botRow = false; + + this.topInitialized = false; + + this.botInitialized = false; + + this.initialize(); + }; + + ColumnCalcs.prototype.initialize = function () { + + this.genColumn = new Column({ field: "value" }, this); + }; + + //dummy functions to handle being mock column manager + + + ColumnCalcs.prototype.registerColumnField = function () {}; + + //initialize column calcs + + + ColumnCalcs.prototype.initializeColumn = function (column) { + + var def = column.definition; + + var config = { + + topCalcParams: def.topCalcParams || {}, + + botCalcParams: def.bottomCalcParams || {} + + }; + + if (def.topCalc) { + + switch (_typeof(def.topCalc)) { + + case "string": + + if (this.calculations[def.topCalc]) { + + config.topCalc = this.calculations[def.topCalc]; + } else { + + console.warn("Column Calc Error - No such calculation found, ignoring: ", def.topCalc); + } + + break; + + case "function": + + config.topCalc = def.topCalc; + + break; + + } + + if (config.topCalc) { + + column.extensions.columnCalcs = config; + + this.topCalcs.push(column); + + if (!this.table.options.groupBy) { + + this.initializeTopRow(); + } + } + } + + if (def.bottomCalc) { + + switch (_typeof(def.bottomCalc)) { + + case "string": + + if (this.calculations[def.bottomCalc]) { + + config.botCalc = this.calculations[def.bottomCalc]; + } else { + + console.warn("Column Calc Error - No such calculation found, ignoring: ", def.bottomCalc); + } + + break; + + case "function": + + config.botCalc = def.bottomCalc; + + break; + + } + + if (config.botCalc) { + + column.extensions.columnCalcs = config; + + this.botCalcs.push(column); + + if (!this.table.options.groupBy) { + + this.initializeBottomRow(); + } + } + } + }; + + ColumnCalcs.prototype.removeCalcs = function () { + + var changed = false; + + if (this.topInitialized) { + + this.topInitialized = false; + + this.topElement.remove(); + + changed = true; + } + + if (this.botInitialized) { + + this.botInitialized = false; + + this.table.footerManager.remove(this.botElement); + + changed = true; + } + + if (changed) { + + this.table.rowManager.adjustTableSize(); + } + }; + + ColumnCalcs.prototype.initializeTopRow = function () { + + if (!this.topInitialized) { + + this.table.columnManager.element.append(this.topElement); + + this.topInitialized = true; + } + }; + + ColumnCalcs.prototype.initializeBottomRow = function () { + + if (!this.botInitialized) { + + this.table.footerManager.prepend(this.botElement); + + this.botInitialized = true; + } + }; + + ColumnCalcs.prototype.scrollHorizontal = function (left) { + + var hozAdjust = 0, + scrollWidth = this.table.columnManager.element[0].scrollWidth - this.table.element.innerWidth(); + + if (this.botInitialized) { + + this.botRow.getElement().css("margin-left", -left); + } + }; + + ColumnCalcs.prototype.recalc = function (rows) { + + var data, row; + + if (this.topInitialized || this.botInitialized) { + + data = this.rowsToData(rows); + + if (this.topInitialized) { + + row = this.generateRow("top", this.rowsToData(rows)); + + this.topRow = row; + + this.topElement.empty(); + + this.topElement.append(row.getElement()); + + row.initialize(true); + } + + if (this.botInitialized) { + + row = this.generateRow("bottom", this.rowsToData(rows)); + + this.botRow = row; + + this.botElement.empty(); + + this.botElement.append(row.getElement()); + + row.initialize(true); + } + + this.table.rowManager.adjustTableSize(); + + //set resizable handles + + + if (this.table.extExists("frozenColumns")) { + + this.table.extensions.frozenColumns.layout(); + } + } + }; + + ColumnCalcs.prototype.recalcRowGroup = function (row) { + + var data, rowData; + + var group = this.table.extensions.groupRows.getRowGroup(row); + + if (group.calcs.bottom) { + + data = this.rowsToData(group.rows); + + rowData = this.generateRowData("bottom", data); + + group.calcs.bottom.updateData(rowData); + } + + if (group.calcs.top) { + + data = this.rowsToData(group.rows); + + rowData = this.generateRowData("top", data); + + group.calcs.top.updateData(rowData); + } + }; + + //generate top stats row + + + ColumnCalcs.prototype.generateTopRow = function (rows) { + + return this.generateRow("top", this.rowsToData(rows)); + }; + + //generate bottom stats row + + + ColumnCalcs.prototype.generateBottomRow = function (rows) { + + return this.generateRow("bottom", this.rowsToData(rows)); + }; + + ColumnCalcs.prototype.rowsToData = function (rows) { + + var data = []; + + rows.forEach(function (row) { + + data.push(row.getData()); + }); + + return data; + }; + + //generate stats row + + + ColumnCalcs.prototype.generateRow = function (pos, data) { + + var self = this, + rowData = this.generateRowData(pos, data), + row = new Row(rowData, this); + + row.getElement().addClass("tabulator-calcs").addClass("tabulator-calcs-" + pos); + + row.type = "calc"; + + row.generateCells = function () { + + var cells = []; + + self.table.columnManager.columnsByIndex.forEach(function (column) { + + if (column.visible) { + + //set field name of mock column + + + self.genColumn.setField(column.getField()); + + self.genColumn.hozAlign = column.hozAlign; + + if (column.definition[pos + "CalcFormatter"] && self.table.extExists("format")) { + + self.genColumn.extensions.format = { + + formatter: self.table.extensions.format.getFormatter(column.definition[pos + "CalcFormatter"]), + + params: column.definition[pos + "CalcFormatterParams"] + + }; + } else { + + self.genColumn.extensions.format = { + + formatter: self.table.extensions.format.getFormatter("plaintext"), + + params: {} + + }; + } + + //generate cell and assign to correct column + + + var cell = new Cell(self.genColumn, row); + + cell.column = column; + + cell.setWidth(column.getWidth()); + + column.cells.push(cell); + + cells.push(cell); + } + }); + + this.cells = cells; + }; + + return row; + }; + + //generate stats row + + + ColumnCalcs.prototype.generateRowData = function (pos, data) { + + var rowData = {}, + calcs = pos == "top" ? this.topCalcs : this.botCalcs, + type = pos == "top" ? "topCalc" : "botCalc"; + + calcs.forEach(function (column) { + + var values = []; + + if (column.extensions.columnCalcs && column.extensions.columnCalcs[type]) { + + data.forEach(function (item) { + + values.push(column.getFieldValue(item)); + }); + + column.setFieldValue(rowData, column.extensions.columnCalcs[type](values, data, column.extensions.columnCalcs[type + "Params"])); + } + }); + + return rowData; + }; + + ColumnCalcs.prototype.hasTopCalcs = function () { + + return !!this.topCalcs.length; + }, ColumnCalcs.prototype.hasBottomCalcs = function () { + + return !!this.botCalcs.length; + }, + + //handle table redraw + + + ColumnCalcs.prototype.redraw = function () { + + if (this.topRow) { + + this.topRow.normalizeHeight(true); + } + + if (this.botRow) { + + this.botRow.normalizeHeight(true); + } + }; + + //default calculations + + + ColumnCalcs.prototype.calculations = { + + "avg": function avg(values, data, calcParams) { + + var output = 0, + precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : 2; + + if (values.length) { + + output = values.reduce(function (sum, value) { + + value = Number(value); + + return sum + value; + }); + + output = output / values.length; + + output = precision !== false ? output.toFixed(precision) : output; + } + + return parseFloat(output).toString(); + }, + + "max": function max(values, data, calcParams) { + + var output = null; + + values.forEach(function (value) { + + value = Number(value); + + if (value > output || output === null) { + + output = value; + } + }); + + return output !== null ? output : ""; + }, + + "min": function min(values, data, calcParams) { + + var output = null; + + values.forEach(function (value) { + + value = Number(value); + + if (value < output || output === null) { + + output = value; + } + }); + + return output !== null ? output : ""; + }, + + "sum": function sum(values, data, calcParams) { + + var output = 0; + + if (values.length) { + + values.forEach(function (value) { + + value = Number(value); + + output += !isNaN(value) ? Number(value) : 0; + }); + } + + return output; + }, + + "concat": function concat(values, data, calcParams) { + + var output = 0; + + if (values.length) { + + output = values.reduce(function (sum, value) { + + return String(sum) + String(value); + }); + } + + return output; + }, + + "count": function count(values, data, calcParams) { + + var output = 0; + + if (values.length) { + + values.forEach(function (value) { + + if (value) { + + output++; + } + }); + } + + return output; + } + + }; + + Tabulator.registerExtension("columnCalcs", ColumnCalcs); + + var Download = function Download(table) { + + this.table = table; //hold Tabulator object + + + this.fields = {}; //hold filed multi dimension arrays + + }; + + //trigger file download + + + Download.prototype.download = function (type, filename, options) { + + var self = this, + downloadFunc = false; + + function buildLink(data, mime) { + + self.triggerDownload(data, mime, type, filename); + } + + if (typeof type == "function") { + + downloadFunc = type; + } else { + + if (self.downloaders[type]) { + + downloadFunc = self.downloaders[type]; + } else { + + console.warn("Download Error - No such download type found: ", type); + } + } + + if (downloadFunc) { + + downloadFunc.call(this, self.processDefinitions(), self.processData(), options, buildLink); + } + }; + + Download.prototype.processDefinitions = function () { + + var self = this, + definitions = self.table.columnManager.getDefinitions(), + processedDefinitions = []; + + self.fields = {}; + + definitions.forEach(function (column) { + + if (column.field) { + + self.fields[column.field] = column.field.split("."); + + if (column.download !== false) { + + //isolate definiton from defintion object + + + var def = {}; + + for (var key in column) { + + def[key] = column[key]; + } + + if (typeof column.downloadTitle != "undefined") { + + def.title = column.downloadTitle; + } + + processedDefinitions.push(def); + } + } + }); + + return processedDefinitions; + }; + + Download.prototype.processData = function () { + + var self = this, + data = self.table.rowManager.getData(true); + + //add user data processing step; + + + if (typeof self.table.options.downloadDataMutator == "function") { + + data = self.table.options.downloadDataMutator(data); + } + + return data; + }; + + Download.prototype.triggerDownload = function (data, mime, type, filename) { + + var element = document.createElement('a'), + blob = new Blob([data], { type: mime }), + filename = filename || "Tabulator." + (typeof type === "function" ? "txt" : type); + + if (navigator.msSaveOrOpenBlob) { + + navigator.msSaveOrOpenBlob(blob, filename); + } else { + + element.setAttribute('href', window.URL.createObjectURL(blob)); + + //set file title + + + element.setAttribute('download', filename); + + //trigger download + + + element.style.display = 'none'; + + document.body.appendChild(element); + + element.click(); + + //remove temporary link element + + + document.body.removeChild(element); + } + }; + + //nested field lookup + + + Download.prototype.getFieldValue = function (field, data) { + + var dataObj = data, + structure = this.fields[field], + length = structure.length, + output; + + for (var i = 0; i < length; i++) { + + dataObj = dataObj[structure[i]]; + + output = dataObj; + + if (!dataObj) { + + break; + } + } + + return output; + }; + + //downloaders + + + Download.prototype.downloaders = { + + csv: function csv(columns, data, options, setFileContents) { + + var self = this, + titles = [], + fields = [], + delimiter = options && options.delimiter ? options.delimiter : ",", + fileContents; + + //get field lists + + + columns.forEach(function (column) { + + if (column.field) { + + titles.push('"' + String(column.title).split('"').join('""') + '"'); + + fields.push(column.field); + } + }); + + //generate header row + + + fileContents = [titles.join(delimiter)]; + + //generate each row of the table + + + data.forEach(function (row) { + + var rowData = []; + + fields.forEach(function (field) { + + var value = self.getFieldValue(field, row); + + switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { + + case "object": + + value = JSON.stringify(value); + + break; + + case "undefined": + + case "null": + + value = ""; + + break; + + default: + + value = value; + + } + + //escape uotation marks + + + rowData.push('"' + String(value).split('"').join('""') + '"'); + }); + + fileContents.push(rowData.join(delimiter)); + }); + + setFileContents(fileContents.join("\n"), "text/csv"); + }, + + json: function json(columns, data, options, setFileContents) { + + var fileContents = JSON.stringify(data, null, '\t'); + + setFileContents(fileContents, "application/json"); + }, + + xlsx: function xlsx(columns, data, options, setFileContents) { + + var self = this, + titles = [], + fields = [], + rows = [], + workbook = { SheetNames: ["Sheet1"], Sheets: {} }, + worksheet, + output; + + //convert rows to worksheet + + + function rowsToSheet() { + + var sheet = {}; + + var range = { s: { c: 0, r: 0 }, e: { c: fields.length, r: rows.length } }; + + rows.forEach(function (row, i) { + + row.forEach(function (value, j) { + + var cell = { v: typeof value == "undefined" || value === null ? "" : value }; + + if (cell != null) { + + switch (_typeof(cell.v)) { + + case "number": + + cell.t = 'n'; + + break; + + case "boolean": + + cell.t = 'b'; + + break; + + default: + + cell.t = 's'; + + break; + + } + + sheet[XLSX.utils.encode_cell({ c: j, r: i })] = cell; + } + }); + }); + + sheet['!ref'] = XLSX.utils.encode_range(range); + + return sheet; + } + + //convert workbook to binary array + + + function s2ab(s) { + + var buf = new ArrayBuffer(s.length); + + var view = new Uint8Array(buf); + + for (var i = 0; i != s.length; ++i) { + view[i] = s.charCodeAt(i) & 0xFF; + }return buf; + } + + //get field lists + + + columns.forEach(function (column) { + + if (column.field) { + + titles.push(column.title); + + fields.push(column.field); + } + }); + + rows.push(titles); + + //generate each row of the table + + + data.forEach(function (row) { + + var rowData = []; + + fields.forEach(function (field) { + + rowData.push(self.getFieldValue(field, row)); + }); + + rows.push(rowData); + }); + + worksheet = rowsToSheet(); + + workbook.Sheets["Sheet1"] = worksheet; + + output = XLSX.write(workbook, { bookType: 'xlsx', bookSST: true, type: 'binary' }); + + setFileContents(s2ab(output), "application/octet-stream"); + } + + }; + + Tabulator.registerExtension("download", Download); + + var Edit = function Edit(table) { + + this.table = table; //hold Tabulator object + + + this.currentCell = false; //hold currently editing cell + + }; + + //initialize column editor + + + Edit.prototype.initializeColumn = function (column) { + + var self = this, + config = { + + editor: false, + + blocked: false, + + check: column.definition.editable, + + params: column.definition.editorParams || {} + + }; + + //set column editor + + + switch (_typeof(column.definition.editor)) { + + case "string": + + if (self.editors[column.definition.editor]) { + + config.editor = self.editors[column.definition.editor]; + } else { + + console.warn("Editor Error - No such editor found: ", column.definition.editor); + } + + break; + + case "function": + + config.editor = column.definition.editor; + + break; + + case "boolean": + + if (column.definition.editor === true) { + + if (typeof column.definition.formatter !== "function") { + + if (self.editors[column.definition.formatter]) { + + config.editor = self.editors[column.definition.formatter]; + } else { + + config.editor = self.editors["input"]; + } + } else { + + console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ", column.definition.formatter); + } + } + + break; + + } + + if (config.editor) { + + column.extensions.edit = config; + } + }; + + Edit.prototype.getCurrentCell = function () { + + return this.currentCell ? this.currentCell.getComponent() : false; + }; + + Edit.prototype.clearEditor = function (cell) { + + this.currentCell = false; + + cell.getElement().removeClass("tabulator-validation-fail"); + + cell.getElement().removeClass("tabulator-editing").empty(); + + cell.row.getElement().removeClass("tabulator-row-editing"); + }; + + //return a formatted value for a cell + + + Edit.prototype.bindEditor = function (cell) { + + var self = this, + rendered = function rendered() {}, + element = cell.getElement(), + mouseClick = false; + + //handle successfull value change + + + function success(value) { + + var valid = true; + + if (cell.column.extensions.validate && self.table.extExists("validate")) { + + valid = self.table.extensions.validate.validate(cell.column.extensions.validate, cell.getComponent(), value); + } + + if (valid === true) { + + self.clearEditor(cell); + + cell.setValue(value, true); + } else { + + cell.getElement().addClass("tabulator-validation-fail"); + + rendered(); + + self.table.options.validationFailed(cell.getComponent(), value, valid); + } + }; + + //handle aborted edit + + + function cancel() { + + self.clearEditor(cell); + + cell.setValueActual(cell.getValue()); + + self.table.options.cellEditCancelled(cell.getComponent()); + }; + + element.attr("tabindex", 0); + + element.on("click", function (e) { + + if (!$(this).hasClass("tabulator-editing")) { + + $(this).focus(); + } + }); + + element.on("mousedown", function (e) { + + mouseClick = true; + }); + + element.on("focus", function (e) { + + var allowEdit = true, + cellEditor; + + self.currentCell = cell; + + if (mouseClick) { + + mouseClick = false; + + if (cell.column.cellEvents.cellClick) { + + cell.column.cellEvents.cellClick(e, cell.getComponent()); + } + } + + function onRendered(callback) { + + rendered = callback; + } + + if (!cell.column.extensions.edit.blocked) { + + e.stopPropagation(); + + if (typeof cell.column.extensions.edit.check == "function") { + + allowEdit = cell.column.extensions.edit.check(cell.getComponent()); + } + + if (allowEdit) { + + self.table.options.cellEditing(cell.getComponent()); + + cellEditor = cell.column.extensions.edit.editor.call(self, cell.getComponent(), onRendered, success, cancel, cell.column.extensions.edit.params); + + //if editor returned, add to DOM, if false, abort edit + + + if (cellEditor !== false) { + + element.addClass("tabulator-editing"); + + cell.row.getElement().addClass("tabulator-row-editing"); + + element.empty(); + + element.append(cellEditor); + + //trigger onRendered Callback + + + rendered(); + + //prevent editing from triggering rowClick event + + + element.children().click(function (e) { + + e.stopPropagation(); + }); + } else { + + element.blur(); + } + } else { + + element.blur(); + } + } else { + + element.blur(); + } + }); + }; + + //default data editors + + + Edit.prototype.editors = { + + //input element + + + input: function input(cell, onRendered, success, cancel, editorParams) { + + //create and style input + + + var input = $(""); + + input.css({ + + "padding": "4px", + + "width": "100%", + + "box-sizing": "border-box" + + }).val(cell.getValue()); + + onRendered(function () { + + input.focus(); + + input.css("height", "100%"); + }); + + //submit new value on blur + + + input.on("change blur", function (e) { + + if (input.val() != cell.getValue()) { + + success(input.val()); + } else { + + cancel(); + } + }); + + //submit new value on enter + + + input.on("keydown", function (e) { + + if (e.keyCode == 13) { + + success(input.val()); + } + + if (e.keyCode == 27) { + + cancel(); + } + }); + + return input; + }, + + //resizable text area element + + + textarea: function textarea(cell, onRendered, success, cancel, editorParams) { + + var self = this, + cellValue = cell.getValue(), + value = String(typeof cellValue == "null" || typeof cellValue == "undefined" ? "" : cellValue), + count = (value.match(/(?:\r\n|\r|\n)/g) || []).length + 1, + input = $(""), + scrollHeight = 0; + + //create and style input + + + input.css({ + + "display": "block", + + "height": "100%", + + "width": "100%", + + "padding": "2px", + + "box-sizing": "border-box", + + "white-space": "pre-wrap", + + "resize": "none" + + }).val(value); + + onRendered(function () { + + input.focus(); + + input.css("height", "100%"); + }); + + //submit new value on blur + + + input.on("change blur", function (e) { + + if (input.val() != cell.getValue()) { + + success(input.val()); + + setTimeout(function () { + + cell.getRow().normalizeHeight(); + }, 300); + } else { + + cancel(); + } + }); + + input.on("keyup", function () { + + input.css({ "height": "" }); + + var heightNow = input[0].scrollHeight; + + input.css({ "height": heightNow }); + + if (heightNow != scrollHeight) { + + scrollHeight = heightNow; + + cell.getRow().normalizeHeight(); + } + }); + + input.on("keydown", function (e) { + + if (e.keyCode == 27) { + + cancel(); + } + }); + + return input; + }, + + //input element with type of number + + + number: function number(cell, onRendered, success, cancel, editorParams) { + + var input = $(""); + + //create and style input + + + input.css({ + + "padding": "4px", + + "width": "100%", + + "box-sizing": "border-box" + + }).val(cell.getValue()); + + onRendered(function () { + + input.focus(); + + input.css("height", "100%"); + }); + + //submit new value on blur + + + input.on("blur", function (e) { + + var value = input.val(); + + if (!isNaN(value)) { + + value = Number(value); + } + + if (value != cell.getValue()) { + + success(value); + } else { + + cancel(); + } + }); + + //submit new value on enter + + + input.on("keydown", function (e) { + + var value; + + if (e.keyCode == 13) { + + value = input.val(); + + if (!isNaN(value)) { + + value = Number(value); + } + + success(value); + } + + if (e.keyCode == 27) { + + cancel(); + } + }); + + return input; + }, + + //start rating + + + star: function star(cell, onRendered, success, cancel, editorParams) { + + var element = cell.getElement(), + value = cell.getValue(), + maxStars = $("svg", element).length || 5, + size = $("svg:first", element).attr("width") || 14, + stars = $("
"), + starActive = $(''), + starInactive = $(''); + + //change number of active stars + + + var starChange = function starChange(element) { + + if ($(".tabulator-star-active", element.closest("div")).length != element.prevAll("svg").length + 1) { + + element.prevAll("svg").replaceWith(starActive.clone()); + + element.nextAll("svg").replaceWith(starInactive.clone()); + + element.replaceWith(starActive.clone()); + } + }; + + value = parseInt(value) < maxStars ? parseInt(value) : maxStars; + + for (var i = 1; i <= maxStars; i++) { + + var nextStar = i <= value ? starActive : starInactive; + + stars.append(nextStar.clone()); + } + + stars.on("mouseover", "svg", function (e) { + + e.stopPropagation(); + + starChange($(this)); + }); + + stars.on("mouseover", function (e) { + + $("svg", $(this)).replaceWith(starInactive.clone()); + }); + + stars.on("click", function (e) { + + success(0); + }); + + stars.on("click", "svg", function (e) { + + e.stopPropagation(); + + success($(this).prevAll("svg").length + 1); + }); + + element.css({ + + "white-space": "nowrap", + + "overflow": "hidden", + + "text-overflow": "ellipsis" + + }); + + element.on("blur", function () { + + cancel(); + }); + + //allow key based navigation + + + element.on("keydown", function (e) { + + switch (e.keyCode) { + + case 39: + //right arrow + + + starChange($(".tabulator-star-inactive:first", stars)); + + break; + + case 37: + //left arrow + + + var prevstar = $(".tabulator-star-active:last", stars).prev("svg"); + + if (prevstar.length) { + + starChange(prevstar); + } else { + + $("svg", stars).replaceWith(starInactive.clone()); + } + + break; + + case 13: + //enter + + + success($(".tabulator-star-active", stars).length); + + break; + + case 27: + //escape + + + cancel(); + + break; + + } + }); + + return stars; + }, + + //draggable progress bar + + + progress: function progress(cell, onRendered, success, cancel, editorParams) { + + var element = cell.getElement(), + max = $("div", element).data("max"), + min = $("div", element).data("min"), + percent = (max - min) / 100, + value = cell.getValue() || 0, + handle = $("
"), + bar; + + var newVal = function newVal() { + + var calcVal = percent * Math.round(bar.outerWidth() / (element.width() / 100)) + min; + + success(calcVal); + + element.attr("aria-valuenow", calcVal).attr("aria-label", value); + }; + + //make sure value is in range + + + value = parseFloat(value) <= max ? parseFloat(value) : max; + + value = parseFloat(value) >= min ? parseFloat(value) : min; + + //workout percentage + + + value = 100 - Math.round((value - min) / percent); + + bar = $("
"), element.css({ + + padding: "0 4px" + + }); + + element.attr("aria-valuemin", min).attr("aria-valuemax", max); + + bar.append(handle); + + handle.on("mousedown", function (e) { + + bar.data("mouseDrag", e.screenX); + + bar.data("mouseDragWidth", bar.outerWidth()); + }); + + handle.on("mouseover", function () { + $(this).css({ cursor: "ew-resize" }); + }); + + element.on("mousemove", function (e) { + + if (bar.data("mouseDrag")) { + + bar.css({ width: bar.data("mouseDragWidth") + (e.screenX - bar.data("mouseDrag")) }); + } + }); + + element.on("mouseup", function (e) { + + if (bar.data("mouseDrag")) { + + e.stopPropagation(); + + e.stopImmediatePropagation(); + + bar.data("mouseDragOut", true); + + bar.data("mouseDrag", false); + + bar.data("mouseDragWidth", false); + + newVal(); + } + }); + + //allow key based navigation + + + element.on("keydown", function (e) { + + switch (e.keyCode) { + + case 39: + //right arrow + + + bar.css({ "width": bar.width() + element.width() / 100 }); + + break; + + case 37: + //left arrow + + + bar.css({ "width": bar.width() - element.width() / 100 }); + + break; + + case 13: + //enter + + + newVal(); + + break; + + case 27: + //escape + + + cancel(); + + break; + + } + }); + + element.on("blur", function () { + + cancel(); + }); + + return bar; + }, + + //checkbox + + + tickCross: function tickCross(cell, onRendered, success, cancel, editorParams) { + + var value = cell.getValue(), + input = $(""); + + //create and style input + + + input.css({ + + "margin-top": "5px", + + "box-sizing": "border-box" + + }).val(value); + + onRendered(function () { + + input.focus(); + }); + + if (value === true || value === "true" || value === "True" || value === 1) { + + input.prop("checked", true); + } else { + + input.prop("checked", false); + } + + //submit new value on blur + + + input.on("change blur", function (e) { + + success(input.is(":checked")); + }); + + //submit new value on enter + + + input.on("keydown", function (e) { + + if (e.keyCode == 13) { + + success(input.is(":checked")); + } + + if (e.keyCode == 27) { + + cancel(); + } + }); + + return input; + }, + + //checkbox + + + tick: function tick(cell, onRendered, success, cancel, editorParams) { + + var value = cell.getValue(), + input = $(""); + + //create and style input + + + input.css({ + + "margin-top": "5px", + + "box-sizing": "border-box" + + }).val(value); + + onRendered(function () { + + input.focus(); + }); + + if (value === true || value === "true" || value === "True" || value === 1) { + + input.prop("checked", true); + } else { + + input.prop("checked", false); + } + + //submit new value on blur + + + input.on("change blur", function (e) { + + success(input.is(":checked")); + }); + + //submit new value on enter + + + input.on("keydown", function (e) { + + if (e.keyCode == 13) { + + success(input.is(":checked")); + } + + if (e.keyCode == 27) { + + cancel(); + } + }); + + return input; + } + + }; + + Tabulator.registerExtension("edit", Edit); + + var Filter = function Filter(table) { + + this.table = table; //hold Tabulator object + + + this.filterList = []; //hold filter list + + + this.headerFilters = {}; //hold column filters + + + this.headerFilterElements = []; //hold header filter elements for manipulation + + + this.changed = false; //has filtering changed since last render + + }; + + //initialize column header filter + + + Filter.prototype.initializeColumn = function (column) { + + var self = this, + field = column.getField(), + filterElement, + editor, + editorElement, + cellWrapper, + typingTimer, + tagType, + attrType; + + //handle successfull value change + + + function success(value) { + + var filterType = tagType == "input" && attrType == "text" ? "partial" : "match", + type = "", + filterFunc; + + if (value) { + + switch (_typeof(column.definition.headerFilterFunc)) { + + case "string": + + if (self.filters[column.definition.headerFilterFunc]) { + + type = column.definition.headerFilterFunc; + + filterFunc = function filterFunc(data) { + + return self.filters[column.definition.headerFilterFunc](value, column.getFieldValue(data)); + }; + } else { + + console.warn("Header Filter Error - Matching filter function not found: ", column.definition.headerFilterFunc); + } + + break; + + case "function": + + filterFunc = function filterFunc(data) { + + return column.definition.headerFilterFunc(value, column.getFieldValue(data), data, column.definition.headerFilterFuncParams || {}); + }; + + type = filterFunc; + + break; + + } + + if (!filterFunc) { + + switch (filterType) { + + case "partial": + + filterFunc = function filterFunc(data) { + + return String(column.getFieldValue(data)).toLowerCase().indexOf(String(value).toLowerCase()) > -1; + }; + + type = "like"; + + break; + + default: + + filterFunc = function filterFunc(data) { + + return column.getFieldValue(data) == value; + }; + + type = "="; + + } + } + + self.headerFilters[field] = { value: value, func: filterFunc, type: type }; + } else { + + delete self.headerFilters[field]; + } + + self.changed = true; + + self.table.rowManager.filterRefresh(); + }; + + //handle aborted edit + + + function cancel() {}; + + if (field) { + + filterElement = $("
"); + + //set column editor + + + switch (_typeof(column.definition.headerFilter)) { + + case "string": + + if (self.table.extensions.edit.editors[column.definition.headerFilter]) { + + editor = self.table.extensions.edit.editors[column.definition.headerFilter]; + } else { + + console.warn("Filter Error - Cannot build header filter, No such editor found: ", column.definition.editor); + } + + break; + + case "function": + + editor = column.definition.headerFilter; + + break; + + case "boolean": + + if (column.extensions.edit && column.extensions.edit.editor) { + + editor = column.extensions.edit.editor; + } else { + + if (column.definition.formatter && self.table.extensions.edit.editors[column.definition.formatter]) { + + editor = self.table.extensions.edit.editors[column.definition.formatter]; + } else { + + editor = self.table.extensions.edit.editors["input"]; + } + } + + break; + + } + + if (editor) { + + cellWrapper = { + + getValue: function getValue() { + + return ""; + }, + + getField: function getField() { + + return column.definition.field; + }, + + getElement: function getElement() { + + return filterElement; + } + + }; + + editorElement = editor.call(self, cellWrapper, function () {}, success, cancel, column.definition.headerFilterParams || {}); + + //set Placeholder Text + + + if (field) { + + self.table.extensions.localize.bind("headerFilters.columns." + column.definition.field, function (value) { + + editorElement.attr("placeholder", typeof value !== "undefined" && value ? value : self.table.extensions.localize.getText("headerFilters.default")); + }); + } else { + + self.table.extensions.localize.bind("headerFilters.default", function (value) { + + editorElement.attr("placeholdder", typeof self.column.definition.headerFilterPlaceholder !== "undefined" && self.column.definition.headerFilterPlaceholder ? self.column.definition.headerFilterPlaceholder : value); + }); + } + + //focus on element on click + + + editorElement.on("click", function (e) { + + e.stopPropagation(); + + $(this).focus(); + }); + + //live update filters as user types + + + typingTimer = false; + + editorElement.on("keyup search", function (e) { + + var element = $(this); + + if (typingTimer) { + + clearTimeout(typingTimer); + } + + typingTimer = setTimeout(function () { + + success(element.val()); + }, 300); + }); + + //update number filtered columns on change + + + attrType = editorElement.attr("type") ? editorElement.attr("type").toLowerCase() : ""; + + if (attrType == "number") { + + editorElement.on("change", function (e) { + + success($(this).val()); + }); + } + + //change text inputs to search inputs to allow for clearing of field + + + if (attrType == "text") { + + editorElement.attr("type", "search"); + + editorElement.off("change blur"); //prevent blur from triggering filter and preventing selection click + + } + + //prevent input and select elements from propegating click to column sorters etc + + + tagType = editorElement.prop("tagName").toLowerCase(); + + if (tagType == "input" || tagType == "select") { + + editorElement.on("mousedown", function (e) { + + e.stopPropagation(); + }); + } + + filterElement.append(editorElement); + + column.contentElement.append(filterElement); + + self.headerFilterElements.push(editorElement); + } + } else { + + console.warn("Filter Error - Cannot add header filter, column has no field set:", column.definition.title); + } + }; + + //check if the filters has changed since last use + + + Filter.prototype.hasChanged = function () { + + var changed = this.changed; + + this.changed = false; + + return changed; + }; + + //set standard filters + + + Filter.prototype.setFilter = function (field, type, value) { + + var self = this; + + self.filterList = []; + + if (!Array.isArray(field)) { + + field = [{ field: field, type: type, value: value }]; + } + + self.addFilter(field); + }; + + //add filter to array + + + Filter.prototype.addFilter = function (field, type, value) { + + var self = this, + column; + + if (!Array.isArray(field)) { + + field = [{ field: field, type: type, value: value }]; + } + + field.forEach(function (filter) { + + var filterFunc = false; + + if (typeof filter.field == "function") { + + filterFunc = function filterFunc(data) { + + return filter.field(data, filter.type || {}); // pass params to custom filter function + + }; + } else { + + if (self.filters[filter.type]) { + + column = self.table.columnManager.getColumnByField(filter.field); + + if (column) { + + filterFunc = function filterFunc(data) { + + return self.filters[filter.type](filter.value, column.getFieldValue(data)); + }; + } else { + + filterFunc = function filterFunc(data) { + + return self.filters[filter.type](filter.value, data[filter.field]); + }; + } + } else { + + console.warn("Filter Error - No such filter type found, ignoring: ", filter.type); + } + } + + if (filterFunc) { + + filter.func = filterFunc; + + self.filterList.push(filter); + + self.changed = true; + } + }); + }; + + //get all filters + + + Filter.prototype.getFilters = function (all, ajax) { + + var self = this, + output = []; + + if (all) { + + output = self.getHeaderFilters(); + } + + self.filterList.forEach(function (filter) { + + output.push({ field: filter.field, type: filter.type, value: filter.value }); + }); + + if (ajax) { + + output.forEach(function (item) { + + if (typeof item.type == "function") { + + item.type = "function"; + } + }); + } + + return output; + }; + + //get all filters + + + Filter.prototype.getHeaderFilters = function () { + + var self = this, + output = []; + + for (var key in this.headerFilters) { + + output.push({ field: key, type: this.headerFilters[key].type, value: this.headerFilters[key].value }); + } + + return output; + }; + + //remove filter from array + + + Filter.prototype.removeFilter = function (field, type, value) { + + var self = this; + + if (!Array.isArray(field)) { + + field = [{ field: field, type: type, value: value }]; + } + + field.forEach(function (filter) { + + var index = -1; + + if (_typeof(filter.field) == "object") { + + index = self.filterList.findIndex(function (element) { + + return filter === element; + }); + } else { + + index = self.filterList.findIndex(function (element) { + + return filter.field === element.field && filter.type === element.type && filter.value === element.value; + }); + } + + if (index > -1) { + + self.filterList.splice(index, 1); + + self.changed = true; + } else { + + console.warn("Filter Error - No matching filter type found, ignoring: ", filter.type); + } + }); + }; + + //clear filters + + + Filter.prototype.clearFilter = function (all) { + + this.filterList = []; + + if (all) { + + this.clearHeaderFilter(); + } + + this.changed = true; + }; + + //clear header filters + + + Filter.prototype.clearHeaderFilter = function () { + + this.headerFilters = {}; + + this.headerFilterElements.forEach(function (element) { + + element.val(""); + }); + + self.changed = true; + }; + + //filter row array + + + Filter.prototype.filter = function (rowList) { + + var self = this, + activeRows = [], + activeRowComponents = []; + + if (self.table.options.dataFiltering) { + + self.table.options.dataFiltering(self.getFilters()); + } + + if (!self.table.options.ajaxFiltering && (self.filterList.length || Object.keys(self.headerFilters).length)) { + + rowList.forEach(function (row) { + + if (self.filterRow(row)) { + + activeRows.push(row); + } + }); + + activeRows; + } else { + + activeRows = rowList.slice(0); + } + + if (self.table.options.dataFiltered) { + + activeRows.forEach(function (row) { + + activeRowComponents.push(row.getComponent()); + }); + + self.table.options.dataFiltered(self.getFilters(), activeRowComponents); + } + + return activeRows; + }; + + //filter individual row + + + Filter.prototype.filterRow = function (row) { + + var self = this, + match = true, + data = row.getData(); + + self.filterList.forEach(function (filter) { + + if (!filter.func(data)) { + + match = false; + } + }); + + for (var field in self.headerFilters) { + + if (!self.headerFilters[field].func(data)) { + + match = false; + } + } + + return match; + }; + + //list of available filters + + + Filter.prototype.filters = { + + //equal to + + + "=": function _(filterVal, rowVal) { + + return rowVal == filterVal ? true : false; + }, + + //less than + + + "<": function _(filterVal, rowVal) { + + return rowVal < filterVal ? true : false; + }, + + //less than or equal to + + + "<=": function _(filterVal, rowVal) { + + return rowVal <= filterVal ? true : false; + }, + + //greater than + + + ">": function _(filterVal, rowVal) { + + return rowVal > filterVal ? true : false; + }, + + //greater than or equal to + + + ">=": function _(filterVal, rowVal) { + + return rowVal >= filterVal ? true : false; + }, + + //not equal to + + + "!=": function _(filterVal, rowVal) { + + return rowVal != filterVal ? true : false; + }, + + //contains the string + + + "like": function like(filterVal, rowVal) { + + if (filterVal === null || typeof filterVal === "undefined") { + + return rowVal === filterVal ? true : false; + } else { + + return rowVal.toLowerCase().indexOf(filterVal.toLowerCase()) > -1 ? true : false; + } + } + + }; + + Tabulator.registerExtension("filter", Filter); + + var Format = function Format(table) { + + this.table = table; //hold Tabulator object + + }; + + //initialize column formatter + + + Format.prototype.initializeColumn = function (column) { + + var self = this, + config = { params: column.definition.formatterParams || {} }; + + //set column formatter + + + switch (_typeof(column.definition.formatter)) { + + case "string": + + if (self.formatters[column.definition.formatter]) { + + config.formatter = self.formatters[column.definition.formatter]; + } else { + + console.warn("Formatter Error - No such formatter found: ", column.definition.formatter); + + config.formatter = self.formatters.plaintext; + } + + break; + + case "function": + + config.formatter = column.definition.formatter; + + break; + + default: + + config.formatter = self.formatters.plaintext; + + break; + + } + + column.extensions.format = config; + }; + + //return a formatted value for a cell + + + Format.prototype.formatValue = function (cell) { + + return cell.column.extensions.format.formatter.call(this, cell.getComponent(), cell.column.extensions.format.params); + }; + + Format.prototype.sanitizeHTML = function (value) { + + if (value) { + + var entityMap = { + + '&': '&', + + '<': '<', + + '>': '>', + + '"': '"', + + "'": ''', + + '/': '/', + + '`': '`', + + '=': '=' + + }; + + return String(value).replace(/[&<>"'`=\/]/g, function (s) { + + return entityMap[s]; + }); + } else { + + return value; + } + }; + + Format.prototype.emptyToSpace = function (value) { + + return value === null ? " " : value; + }; + + //get formatter for cell + + + Format.prototype.getFormatter = function (formatter) { + + var formatter; + + switch (typeof formatter === 'undefined' ? 'undefined' : _typeof(formatter)) { + + case "string": + + if (this.formatters[formatter]) { + + formatter = this.formatters[formatter]; + } else { + + console.warn("Formatter Error - No such formatter found: ", formatter); + + formatter = this.formatters.plaintext; + } + + break; + + case "function": + + formatter = formatter; + + break; + + default: + + formatter = this.formatters.plaintext; + + break; + + } + + return formatter; + }; + + //default data formatters + + + Format.prototype.formatters = { + + //plain text value + + + plaintext: function plaintext(cell, formatterParams) { + + return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); + }, + + //html text value + + + html: function html(cell, formatterParams) { + + return cell.getValue(); + }, + + //multiline text area + + + textarea: function textarea(cell, formatterParams) { + + cell.getElement().css({ "white-space": "pre-wrap" }); + + return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); + }, + + //currency formatting + + + money: function money(cell, formatterParams) { + + var floatVal = parseFloat(cell.getValue()), + number, + integer, + decimal, + rgx; + + var decimalSym = formatterParams.decimal || "."; + + var thousandSym = formatterParams.thousand || ","; + + var symbol = formatterParams.symbol || ""; + + var after = !!formatterParams.symbolAfter; + + var precision = typeof formatterParams.precision !== "undefined" ? formatterParams.precision : 2; + + if (isNaN(floatVal)) { + + return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); + } + + number = precision !== false ? floatVal.toFixed(precision) : floatVal; + + number = number.split("."); + + integer = number[0]; + + decimal = number.length > 1 ? decimalSym + number[1] : ""; + + rgx = /(\d+)(\d{3})/; + + while (rgx.test(integer)) { + + integer = integer.replace(rgx, "$1" + thousandSym + "$2"); + } + + return after ? integer + decimal + symbol : symbol + integer + decimal; + }, + + //clickable mailto link + + + email: function email(cell, formatterParams) { + + var value = this.sanitizeHTML(cell.getValue()); + + return "" + this.emptyToSpace(value) + ""; + }, + + //clickable anchor tag + + + link: function link(cell, formatterParams) { + + var value = this.sanitizeHTML(cell.getValue()); + + return "" + this.emptyToSpace(value) + ""; + }, + + //image element + + + image: function image(cell, formatterParams) { + + var value = this.sanitizeHTML(cell.getValue()); + + return ""; + }, + + //tick or empty cell + + + tick: function tick(cell, formatterParams) { + + var value = cell.getValue(), + element = cell.getElement(); + + var tick = ''; + + if (value === true || value === "true" || value === "True" || value === 1 || value === "1") { + + element.attr("aria-checked", true); + + return tick; + } else { + + element.attr("aria-checked", false); + + return ""; + } + }, + + //tick or cross + + + tickCross: function tickCross(cell, formatterParams) { + + var value = cell.getValue(), + element = cell.getElement(), + tick = '', + cross = ''; + + if (value === true || value === "true" || value === "True" || value === 1 || value === "1") { + + element.attr("aria-checked", true); + + return tick; + } else { + + element.attr("aria-checked", false); + + return cross; + } + }, + + //star rating + + + star: function star(cell, formatterParams) { + + var value = cell.getValue(), + element = cell.getElement(), + maxStars = formatterParams && formatterParams.stars ? formatterParams.stars : 5, + stars = $(""), + starActive = $(''), + starInactive = $(''); + + value = parseInt(value) < maxStars ? parseInt(value) : maxStars; + + for (var i = 1; i <= maxStars; i++) { + + var nextStar = i <= value ? starActive : starInactive; + + stars.append(nextStar.clone()); + } + + element.css({ + + "white-space": "nowrap", + + "overflow": "hidden", + + "text-overflow": "ellipsis" + + }); + + element.attr("aria-label", value); + + return stars.html(); + }, + + //progress bar + + + progress: function progress(cell, formatterParams) { + //progress bar + + + var value = this.sanitizeHTML(cell.getValue()) || 0, + element = cell.getElement(), + max = formatterParams && formatterParams.max ? formatterParams.max : 100, + min = formatterParams && formatterParams.min ? formatterParams.min : 0, + color = formatterParams && formatterParams.color ? formatterParams.color : "#2DC214", + percent; + + //make sure value is in range + + + value = parseFloat(value) <= max ? parseFloat(value) : max; + + value = parseFloat(value) >= min ? parseFloat(value) : min; + + //workout percentage + + + percent = (max - min) / 100; + + value = 100 - Math.round((value - min) / percent); + + element.css({ + + "min-width": "30px", + + "position": "relative" + + }); + + element.attr("aria-label", value); + + return "
"; + }, + + //background color + + + color: function color(cell, formatterParams) { + + cell.getElement().css({ "background-color": this.sanitizeHTML(cell.getValue()) }); + + return ""; + }, + + //tick icon + + + buttonTick: function buttonTick(cell, formatterParams) { + + return ''; + }, + + //cross icon + + + buttonCross: function buttonCross(cell, formatterParams) { + + return ''; + }, + + //current row number + + + rownum: function rownum(cell, formatterParams) { + + return this.table.rowManager.activeRows.indexOf(cell.getRow()._getSelf()) + 1; + }, + + //row handle + + + handle: function handle(cell, formatterParams) { + + cell.getElement().addClass("tabulator-row-handle"); + + return "
"; + } + + }; + + Tabulator.registerExtension("format", Format); + + var FrozenColumns = function FrozenColumns(table) { + + this.table = table; //hold Tabulator object + + + this.leftColumns = []; + + this.rightColumns = []; + + this.leftMargin = 0; + + this.rightMargin = 0; + + this.initializationMode = "left"; + + this.active = false; + }; + + //reset initial state + + + FrozenColumns.prototype.reset = function () { + + this.initializationMode = "left"; + + this.leftColumns = []; + + this.rightColumns = []; + + this.active = false; + }; + + //initialize specific column + + + FrozenColumns.prototype.initializeColumn = function (column) { + + var config = { margin: 0, edge: false }; + + if (column.definition.frozen) { + + if (!column.parent.isGroup) { + + if (!column.isGroup) { + + config.position = this.initializationMode; + + if (this.initializationMode == "left") { + + this.leftColumns.push(column); + } else { + + this.rightColumns.unshift(column); + } + + this.active = true; + + column.extensions.frozen = config; + } else { + + console.warn("Frozen Column Error - Column Groups cannot be frozen"); + } + } else { + + console.warn("Frozen Column Error - Grouped columns cannot be frozen"); + } + } else { + + this.initializationMode = "right"; + } + }; + + //layout columns appropropriatly + + + FrozenColumns.prototype.layout = function () { + + var self = this, + tableHolder = this.table.rowManager.element, + rightMargin = 0; + + if (self.active) { + + //calculate row padding + + + self.leftMargin = self._calcSpace(self.leftColumns, self.leftColumns.length); + + self.table.columnManager.headersElement.css("margin-left", self.leftMargin); + + self.rightMargin = self._calcSpace(self.rightColumns, self.rightColumns.length); + + self.table.columnManager.element.css("padding-right", self.rightMargin); + + self.table.rowManager.activeRows.forEach(function (row) { + + self.layoutRow(row); + }); + + if (self.table.extExists("columnCalcs")) { + + if (self.table.extensions.columnCalcs.topInitialized && self.table.extensions.columnCalcs.topRow) { + + self.layoutRow(self.table.extensions.columnCalcs.topRow); + } + + if (self.table.extensions.columnCalcs.botInitialized && self.table.extensions.columnCalcs.botRow) { + + self.layoutRow(self.table.extensions.columnCalcs.botRow); + } + } + + //calculate left columns + + + self.leftColumns.forEach(function (column, i) { + + column.extensions.frozen.margin = self._calcSpace(self.leftColumns, i) + self.table.columnManager.scrollLeft; + + if (i == self.leftColumns.length - 1) { + + column.extensions.frozen.edge = true; + } else { + + column.extensions.frozen.edge = false; + } + + self.layoutColumn(column); + }); + + //calculate right frozen columns + + + rightMargin = self.table.rowManager.element.innerWidth() + self.table.columnManager.scrollLeft; + + if (tableHolder[0].scrollHeight > tableHolder.innerHeight()) { + + rightMargin -= tableHolder[0].offsetWidth - tableHolder[0].clientWidth; + } + + self.rightColumns.forEach(function (column, i) { + + column.extensions.frozen.margin = rightMargin - self._calcSpace(self.rightColumns, i + 1); + + if (i == self.rightColumns.length - 1) { + + column.extensions.frozen.edge = true; + } else { + + column.extensions.frozen.edge = false; + } + + self.layoutColumn(column); + }); + } + }; + + FrozenColumns.prototype.layoutColumn = function (column) { + + var self = this; + + self.layoutElement(column.element, column); + + column.cells.forEach(function (cell) { + + self.layoutElement(cell.element, column); + }); + }; + + FrozenColumns.prototype.layoutRow = function (row) { + + row.getElement().css({ + + "padding-left": this.leftMargin, + + "padding-right": this.rightMargin + + }); + }; + + FrozenColumns.prototype.layoutElement = function (element, column) { + + if (column.extensions.frozen) { + + var css = { + + position: "absolute", + + left: column.extensions.frozen.margin + + }; + + element.css(css); + + element.addClass("tabulator-frozen"); + + if (column.extensions.frozen.edge) { + + element.addClass("tabulator-frozen-" + column.extensions.frozen.position); + } + } + }; + + FrozenColumns.prototype._calcSpace = function (columns, index) { + + var width = 0; + + for (var i = 0; i < index; i++) { + + if (columns[i].visible) { + + width += columns[i].getWidth(); + } + } + + return width; + }; + + Tabulator.registerExtension("frozenColumns", FrozenColumns); + + //public group object + + + var GroupComponent = function GroupComponent(group) { + + this.group = group; + + this.type = "GroupComponent"; + }; + + GroupComponent.prototype.getKey = function () { + + return this.group.key; + }; + + GroupComponent.prototype.getElement = function () { + + return this.group.element; + }; + + GroupComponent.prototype.getRows = function () { + + var output = []; + + this.group.rows.forEach(function (row) { + + output.push(row.getComponent()); + }); + + return output; + }; + + GroupComponent.prototype.getSubGroups = function () { + + var output = []; + + this.group.groupList.forEach(function (child) { + + output.push(child.getComponent()); + }); + + return output; + }; + + GroupComponent.prototype.getParentGroup = function () { + + return this.group.parent ? this.group.parent.getComponent() : false; + }; + + GroupComponent.prototype.getVisibility = function () { + + return this.group.visible; + }; + + GroupComponent.prototype.show = function () { + + this.group.show(); + }; + + GroupComponent.prototype.hide = function () { + + this.group.hide(); + }; + + GroupComponent.prototype.toggle = function () { + + this.group.toggleVisibility(); + }; + + GroupComponent.prototype._getSelf = function () { + + return this.group; + }; + + ////////////////////////////////////////////////// + + + //////////////// Group Functions ///////////////// + + + ////////////////////////////////////////////////// + + + var Group = function Group(groupManager, parent, level, key, generator, oldGroup) { + + this.groupManager = groupManager; + + this.parent = parent; + + this.key = key; + + this.level = level; + + this.hasSubGroups = level < groupManager.groupIDLookups.length - 1; + + this.addRow = this.hasSubGroups ? this._addRowToGroup : this._addRow; + + this.type = "group"; //type of element + + + this.old = oldGroup; + + this.rows = []; + + this.groups = []; + + this.groupList = []; + + this.generator = generator; + + this.element = $("
"); + + this.arrowElement = $("
"); + + this.height = 0; + + this.outerHeight = 0; + + this.initialized = false; + + this.calcs = {}; + + this.initialized = false; + + this.visible = oldGroup ? oldGroup.visible : typeof groupManager.startOpen[level] !== "undefined" ? groupManager.startOpen[level] : groupManager.startOpen[0]; + + this.addBindings(); + }; + + Group.prototype.addBindings = function () { + + var self = this, + dblTap, + tapHold, + tap, + toggleElement; + + if (self.groupManager.table.options.groupToggleElement) { + + toggleElement = self.groupManager.table.options.groupToggleElement == "arrow" ? self.arrowElement : self.element; + + toggleElement.on("click", function (e) { + + e.stopPropagation(); + + e.stopImmediatePropagation(); + + self.toggleVisibility(); + }); + } + + //handle group click events + + + if (self.groupManager.table.options.groupClick) { + + self.element.on("click", function (e) { + + self.groupManager.table.options.groupClick(e, self.getComponent()); + }); + } + + if (self.groupManager.table.options.groupDblClick) { + + self.element.on("dblclick", function (e) { + + self.groupManager.table.options.groupDblClick(e, self.getComponent()); + }); + } + + if (self.groupManager.table.options.groupContext) { + + self.element.on("contextmenu", function (e) { + + self.groupManager.table.options.groupContext(e, self.getComponent()); + }); + } + + if (self.groupManager.table.options.groupTap) { + + tap = false; + + self.element.on("touchstart", function (e) { + + tap = true; + }); + + self.element.on("touchend", function (e) { + + if (tap) { + + self.groupManager.table.options.groupTap(e, self.getComponent()); + } + + tap = false; + }); + } + + if (self.groupManager.table.options.groupDblTap) { + + dblTap = null; + + self.element.on("touchend", function (e) { + + if (dblTap) { + + clearTimeout(dblTap); + + dblTap = null; + + self.groupManager.table.options.groupDblTap(e, self.getComponent()); + } else { + + dblTap = setTimeout(function () { + + clearTimeout(dblTap); + + dblTap = null; + }, 300); + } + }); + } + + if (self.groupManager.table.options.groupTapHold) { + + tapHold = null; + + self.element.on("touchstart", function (e) { + + clearTimeout(tapHold); + + tapHold = setTimeout(function () { + + clearTimeout(tapHold); + + tapHold = null; + + tap = false; + + self.groupManager.table.options.groupTapHold(e, self.getComponent()); + }, 1000); + }); + + self.element.on("touchend", function (e) { + + clearTimeout(tapHold); + + tapHold = null; + }); + } + }; + + Group.prototype._addRowToGroup = function (row) { + + var level = this.level + 1; + + if (this.hasSubGroups) { + + var groupID = this.groupManager.groupIDLookups[level](row.getData()); + + if (!this.groups[groupID]) { + + var group = new Group(this.groupManager, this, level, groupID, this.groupManager.headerGenerator[level] || this.groupManager.headerGenerator[0], this.old ? this.old.groups[groupID] : false); + + this.groups[groupID] = group; + + this.groupList.push(group); + } + + this.groups[groupID].addRow(row); + } + }; + + Group.prototype._addRow = function (row) { + + this.rows.push(row); + }; + + Group.prototype.getHeadersAndRows = function () { + + var output = []; + + output.push(this); + + this._visSet(); + + if (this.visible) { + + if (this.groupList.length) { + + this.groupList.forEach(function (group) { + + output = output.concat(group.getHeadersAndRows()); + }); + } else { + + if (this.groupManager.table.extExists("columnCalcs") && this.groupManager.table.extensions.columnCalcs.hasTopCalcs()) { + + this.calcs.top = this.groupManager.table.extensions.columnCalcs.generateTopRow(this.rows); + + output.push(this.calcs.top); + } + + output = output.concat(this.rows); + + if (this.groupManager.table.extExists("columnCalcs") && this.groupManager.table.extensions.columnCalcs.hasBottomCalcs()) { + + this.calcs.bottom = this.groupManager.table.extensions.columnCalcs.generateBottomRow(this.rows); + + output.push(this.calcs.bottom); + } + } + } else { + + if (this.groupManager.table.options.groupClosedShowCalcs) { + + if (this.groupManager.table.extExists("columnCalcs")) { + + if (this.groupManager.table.extensions.columnCalcs.hasTopCalcs()) { + + this.calcs.top = this.groupManager.table.extensions.columnCalcs.generateTopRow(this.rows); + + output.push(this.calcs.top); + } + + if (this.groupManager.table.extensions.columnCalcs.hasBottomCalcs()) { + + this.calcs.bottom = this.groupManager.table.extensions.columnCalcs.generateBottomRow(this.rows); + + output.push(this.calcs.bottom); + } + } + } + } + + return output; + }; + + Group.prototype.getRows = function () { + + this._visSet(); + + return this.visible ? this.rows : []; + }; + + Group.prototype.getRowCount = function () { + + var count = 0; + + if (this.groupList.length) { + + this.groupList.forEach(function (group) { + + count += group.getRowCount(); + }); + } else { + + count = this.rows.length; + } + + return count; + }; + + Group.prototype.toggleVisibility = function () { + + if (this.visible) { + + this.hide(); + } else { + + this.show(); + } + }; + + Group.prototype.hide = function () { + + this.visible = false; + + if (this.groupManager.table.rowManager.getRenderMode() == "classic") { + + this.element.removeClass("tabulator-group-visible"); + + this.rows.forEach(function (row) { + + row.getElement().detach(); + }); + } else { + + this.groupManager.updateGroupRows(true); + } + + this.groupManager.table.options.groupVisibilityChanged(this.getComponent(), false); + }; + + Group.prototype.show = function () { + + var self = this; + + self.visible = true; + + if (this.groupManager.table.rowManager.getRenderMode() == "classic") { + + this.element.addClass("tabulator-group-visible"); + + self.rows.forEach(function (row) { + + self.getElement().after(row.getElement()); + + row.initialize(); + }); + } else { + + this.groupManager.updateGroupRows(true); + } + + this.groupManager.table.options.groupVisibilityChanged(this.getComponent(), true); + }; + + Group.prototype._visSet = function () { + + var data = []; + + if (typeof this.visible == "function") { + + this.rows.forEach(function (row) { + + data.push(row.getData()); + }); + + this.visible = this.visible(this.key, this.getRowCount(), data, this.getRowCount()); + } + }; + + Group.prototype.getRowGroup = function (row) { + + var match = false; + + if (this.groupList.length) { + + this.groupList.forEach(function (group) { + + var result = group.getRowGroup(row); + + if (result) { + + match = result; + } + }); + } else { + + if (this.rows.find(function (item) { + + return item === row; + })) { + + match = this; + } + } + + return match; + }; + + ////////////// Standard Row Functions ////////////// + + + Group.prototype.getElement = function () { + + this.addBindingsd = false; + + this._visSet(); + + var data = []; + + this.rows.forEach(function (row) { + + data.push(row.getData()); + }); + + if (this.visible) { + + this.element.addClass("tabulator-group-visible"); + } else { + + this.element.removeClass("tabulator-group-visible"); + } + + this.element.children().detach(); + + this.element.html(this.generator(this.key, this.getRowCount(), data, this.getComponent())).prepend(this.arrowElement); + + // this.addBindings(); + + + return this.element; + }; + + //normalize the height of elements in the row + + + Group.prototype.normalizeHeight = function () { + + this.setHeight(this.element.innerHeight()); + }; + + Group.prototype.initialize = function (force) { + + if (!this.initialized || force) { + + this.normalizeHeight(); + + this.initialized = true; + } + }; + + Group.prototype.reinitialize = function () { + + this.initialized = false; + + this.height = 0; + + if (this.element.is(":visible")) { + + this.initialize(true); + } + }; + + Group.prototype.setHeight = function (height) { + + if (this.height != height) { + + this.height = height; + + this.outerHeight = this.element.outerHeight(); + } + }; + + //return rows outer height + + + Group.prototype.getHeight = function () { + + return this.outerHeight; + }; + + Group.prototype.reinitializeHeight = function () {}; + + Group.prototype.calcHeight = function () {}; + + Group.prototype.setCellHeight = function () {}; + + Group.prototype.clearCellHeight = function () {}; + + //////////////// Object Generation ///////////////// + + + Group.prototype.getComponent = function () { + + return new GroupComponent(this); + }; + + ////////////////////////////////////////////////// + + + ////////////// Group Row Extension /////////////// + + + ////////////////////////////////////////////////// + + + var GroupRows = function GroupRows(table) { + + this.table = table; //hold Tabulator object + + + this.groupIDLookups = false; //enable table grouping and set field to group by + + + this.startOpen = [function () { + return false; + }]; //starting state of group + + + this.headerGenerator = [function () { + return ""; + }]; + + this.groupList = []; //ordered list of groups + + + this.groups = {}; //hold row groups + + }; + + //initialize group configuration + + + GroupRows.prototype.initialize = function () { + + var self = this, + groupBy = self.table.options.groupBy, + startOpen = self.table.options.groupStartOpen, + groupHeader = self.table.options.groupHeader; + + self.headerGenerator = [function () { + return ""; + }]; + + this.startOpen = [function () { + return false; + }]; //starting state of group + + + self.table.extensions.localize.bind("groups.item", function (langValue, lang) { + + self.headerGenerator[0] = function (value, count, data) { + //header layout function + + + return value + "(" + count + " " + (count === 1 ? langValue : lang.groups.items) + ")"; + }; + }); + + this.groupIDLookups = []; + + if (Array.isArray(groupBy) || groupBy) { + + if (this.table.extExists("columnCalcs")) { + + this.table.extensions.columnCalcs.removeCalcs(); + } + } else { + + if (this.table.extExists("columnCalcs")) { + + var cols = this.table.columnManager.getRealColumns(); + + cols.forEach(function (col) { + + if (col.definition.topCalc) { + + self.table.extensions.columnCalcs.initializeTopRow(); + } + + if (col.definition.bottomCalc) { + + self.table.extensions.columnCalcs.initializeBottomRow(); + } + }); + } + } + + if (!Array.isArray(groupBy)) { + + groupBy = [groupBy]; + } + + groupBy.forEach(function (group) { + + var lookupFunc, column; + + if (typeof group == "function") { + + lookupFunc = group; + } else { + + column = self.table.columnManager.getColumnByField(group); + + if (column) { + + lookupFunc = function lookupFunc(data) { + + return column.getFieldValue(data); + }; + } else { + + lookupFunc = function lookupFunc(data) { + + return data[group]; + }; + } + } + + self.groupIDLookups.push(lookupFunc); + }); + + if (startOpen) { + + if (!Array.isArray(startOpen)) { + + startOpen = [startOpen]; + } + + startOpen.forEach(function (level) { + + level = typeof level == "function" ? level : function () { + return true; + }; + }); + + self.startOpen = startOpen; + } + + if (groupHeader) { + + self.headerGenerator = Array.isArray(groupHeader) ? groupHeader : [groupHeader]; + } + + this.initialized = true; + }; + + //return appropriate rows with group headers + + + GroupRows.prototype.getRows = function (rows) { + + if (this.groupIDLookups.length) { + + this.table.options.dataGrouping(); + + this.generateGroups(rows); + + if (this.table.options.dataGrouped) { + + this.table.options.dataGrouped(this.getGroups()); + }; + + return this.updateGroupRows(); + } else { + + return rows.slice(0); + } + }; + + GroupRows.prototype.getGroups = function () { + + var groupComponents = []; + + if (this.table.options.dataGrouped) { + + this.groupList.forEach(function (group) { + + groupComponents.push(group.getComponent()); + }); + } + + return groupComponents; + }; + + GroupRows.prototype.getRowGroup = function (row) { + + var match = false; + + this.groupList.forEach(function (group) { + + var result = group.getRowGroup(row); + + if (result) { + + match = result; + } + }); + + return match; + }; + + GroupRows.prototype.countGroups = function () { + + return this.groupList.length; + }; + + GroupRows.prototype.generateGroups = function (rows) { + + var self = this, + oldGroups = self.groups; + + self.groups = {}; + + self.groupList = []; + + rows.forEach(function (row) { + + var groupID = self.groupIDLookups[0](row.getData()); + + if (!self.groups[groupID]) { + + var group = new Group(self, false, 0, groupID, self.headerGenerator[0], oldGroups[groupID]); + + self.groups[groupID] = group; + + self.groupList.push(group); + } + + self.groups[groupID].addRow(row); + }); + }; + + GroupRows.prototype.updateGroupRows = function (force) { + + var self = this, + output = [], + oldRowCount; + + self.groupList.forEach(function (group) { + + output = output.concat(group.getHeadersAndRows()); + }); + + //force update of table display + + + if (force) { + + oldRowCount = self.table.rowManager.displayRowsCount; + + self.table.rowManager.setDisplayRows(output); + + self.table.rowManager._virtualRenderFill(Math.floor(self.table.rowManager.element.scrollTop() / self.table.rowManager.element[0].scrollHeight * oldRowCount)); + } + + return output; + }; + + GroupRows.prototype.scrollHeaders = function (left) { + + this.groupList.forEach(function (group) { + + group.arrowElement.css("margin-left", left); + }); + }; + + Tabulator.registerExtension("groupRows", GroupRows); + + var History = function History(table) { + + this.table = table; //hold Tabulator object + + + this.history = []; + + this.index = -1; + }; + + History.prototype.clear = function () { + + this.history = []; + + this.index = -1; + }; + + History.prototype.action = function (type, component, data) { + + if (this.index > -1) { + + this.history = this.history.slice(0, this.index + 1); + } + + this.history.push({ + + type: type, + + component: component, + + data: data + + }); + + this.index++; + }; + + History.prototype.undo = function () { + + if (this.index > -1) { + + var action = this.history[this.index]; + + this.undoers[action.type].call(this, action); + + this.index--; + + return true; + } else { + + console.warn("History Undo Error - No more history to undo"); + + return false; + } + }; + + History.prototype.redo = function () { + + if (this.history.length - 1 > this.index) { + + this.index++; + + var action = this.history[this.index]; + + this.redoers[action.type].call(this, action); + + return true; + } else { + + console.warn("History Redo Error - No more history to redo"); + + return false; + } + }; + + History.prototype.undoers = { + + cellEdit: function cellEdit(action) { + + action.component.setValueProcessData(action.data.oldValue); + }, + + rowAdd: function rowAdd(action) { + + action.component.delete(); + }, + + rowDelete: function rowDelete(action) { + + var newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index); + + this._rebindRow(action.component, newRow); + } + + }; + + History.prototype.redoers = { + + cellEdit: function cellEdit(action) { + + action.component.setValueProcessData(action.data.newValue); + }, + + rowAdd: function rowAdd(action) { + + var newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index); + + this._rebindRow(action.component, newRow); + }, + + rowDelete: function rowDelete(action) { + + action.component.delete(); + } + + }; + + //rebind rows to new element after deletion + + + History.prototype._rebindRow = function (oldRow, newRow) { + + this.history.forEach(function (action) { + + if (action.component instanceof Row) { + + if (action.component === oldRow) { + + action.component = newRow; + } + } else if (action.component instanceof Cell) { + + if (action.component.row === oldRow) { + + var field = action.component.column.getField(); + + if (field) { + + action.component = newRow.getCell(field); + } + } + } + }); + }; + + Tabulator.registerExtension("history", History); + + var HtmlTableImport = function HtmlTableImport(table) { + + this.table = table; //hold Tabulator object + + }; + + HtmlTableImport.prototype.parseTable = function () { + + var self = this, + element = self.table.element, + options = self.table.options, + columns = options.columns, + headers = $("th", element), + hasIndex = false, + rows = $("tbody tr", element), + data = []; + + self.table.options.htmlImporting(); + + //check for tablator inline options + + + self._extractOptions(element, options); + + if (headers.length) { + + self._extractHeaders(element); + } else { + + self._generateBlankHeaders(element); + } + + //iterate through table rows and build data set + + + rows.each(function (rowIndex) { + + var item = {}; + + //create index if the dont exist in table + + + if (!hasIndex) { + + item[options.index] = rowIndex; + } + + //add row data to item + + + $("td", $(this)).each(function (colIndex) { + + item[$(this).data("field")] = $(this).html(); + }); + + data.push(item); + }); + + //create new element + + + var newElement = $("
"); + + //transfer attributes to new element + + + var attributes = element.prop("attributes"); + + // loop through attributes and apply them on div + + + $.each(attributes, function () { + + newElement.attr(this.name, this.value); + }); + + // replace table with div element + + + element.replaceWith(newElement); + + options.data = data; + + self.table.options.htmlImported(); + + newElement.tabulator(options); + }; + + //extract tabluator attribute options + + + HtmlTableImport.prototype._extractOptions = function (element, options) { + + var self = this, + attributes = element[0].attributes; + + for (var index in attributes) { + + var attrib = attributes[index]; + + var name; + + if (attrib && attrib.name && attrib.name.indexOf("tabulator-") === 0) { + + name = attrib.name.replace("tabulator-", ""); + + for (var key in options) { + + if (key.toLowerCase() == name) { + + options[key] = self._attribValue(attrib.value); + } + } + } + } + }; + + //get value of attribute + + + HtmlTableImport.prototype._attribValue = function (value) { + + if (value === "true") { + + return true; + } + + if (value === "false") { + + return false; + } + + return value; + }; + + //find column if it has already been defined + + + HtmlTableImport.prototype._findCol = function (title) { + + var self = this; + + var match = self.table.options.columns.find(function (column) { + + return column.title === title; + }); + + return match || false; + }; + + //extract column from headers + + + HtmlTableImport.prototype._extractHeaders = function (element) { + + var self = this, + headers = $("th", element), + rows = $("tbody tr", element); + + headers.each(function (index) { + + var header = $(this), + exists = false, + col = self._findCol(header.text()), + width, + attributes; + + //list of possible attributes + + + var attribList = ["title", "field", "align", "width", "minWidth", "frozen", "sortable", "sorter", "formatter", "cellClick", "cellDblClick", "cellContext", "editable", "editor", "visible", "cssClass", "tooltip", "tooltipHeader", "editableTitle", "headerFilter", "mutator", "mutateType", "accessor"]; + + if (col) { + + exists = true; + } else { + + col = { title: header.text().trim() }; + } + + if (!col.field) { + + col.field = header.text().trim().toLowerCase().replace(" ", "_"); + } + + width = header.attr("width"); + + if (width && !col.width) { + + col.width = width; + } + + //check for tablator inline options + + + attributes = header[0].attributes; + + //check for tablator inline options + + + for (var i in attributes) { + + var attrib = attributes[i], + name; + + if (attrib && attrib.name && attrib.name.indexOf("tabulator-") === 0) { + + name = attrib.name.replace("tabulator-", ""); + + attribList.forEach(function (key) { + + if (key.toLowerCase() == name) { + + col[key] = self._attribValue(attrib.value); + } + }); + } + } + + $("td:eq(" + index + ")", rows).data("field", col.field); + + if (col.field == self.table.options.index) { + + hasIndex = true; + } + + if (!exists) { + + self.table.options.columns.push(col); + } + }); + }; + + //generate blank headers + + + HtmlTableImport.prototype._generateBlankHeaders = function (element) { + + var self = this; + + var headers = $("tr:first td", element); + + headers.each(function (index) { + + var col = { title: "", field: "col" + index }; + + $("td:eq(" + index + ")", rows).data("field", col.field); + + var width = $(this).attr("width"); + + if (width) { + + col.width = width; + } + + self.table.options.columns.push(col); + }); + }; + + Tabulator.registerExtension("htmlTableImport", HtmlTableImport); + + var Keybindings = function Keybindings(table) { + + this.table = table; //hold Tabulator object + + + this.watchKeys = null; + + this.pressedKeys = null; + }; + + Keybindings.prototype.initialize = function () { + + var bindings = this.table.options.keybindings, + mergedBindings = {}; + + this.watchKeys = {}; + + this.pressedKeys = []; + + if (bindings !== false) { + + for (var key in this.bindings) { + + mergedBindings[key] = this.bindings[key]; + } + + if (Object.keys(bindings).length) { + + for (var _key in bindings) { + + mergedBindings[_key] = bindings[_key]; + } + } + + this.mapBindings(mergedBindings); + + this.bindEvents(); + } + }; + + Keybindings.prototype.mapBindings = function (bindings) { + var _this = this; + + var self = this; + + var _loop2 = function _loop2(key) { + + if (_this.actions[key]) { + + if (bindings[key]) { + + if (_typeof(bindings[key]) !== "object") { + + bindings[key] = [bindings[key]]; + } + + bindings[key].forEach(function (binding) { + + self.mapBinding(key, binding); + }); + } + } else { + + console.warn("Key Binding Error - no such action:", key); + } + }; + + for (var key in bindings) { + _loop2(key); + } + }; + + Keybindings.prototype.mapBinding = function (action, symbolsList) { + + var self = this; + + var binding = { + + action: this.actions[action], + + keys: [], + + ctrl: false, + + shift: false + + }; + + var symbols = symbolsList.toString().toLowerCase().split(" ").join("").split("+"); + + symbols.forEach(function (symbol) { + + switch (symbol) { + + case "ctrl": + + binding.ctrl = true; + + break; + + case "shift": + + binding.shift = true; + + break; + + default: + + symbol = parseInt(symbol); + + binding.keys.push(symbol); + + if (!self.watchKeys[symbol]) { + + self.watchKeys[symbol] = []; + } + + self.watchKeys[symbol].push(binding); + + } + }); + }; + + Keybindings.prototype.bindEvents = function () { + + var self = this; + + this.table.element.on("keydown", function (e) { + + var code = e.keyCode; + + var bindings = self.watchKeys[code]; + + if (bindings) { + + self.pressedKeys.push(code); + + bindings.forEach(function (binding) { + + self.checkBinding(e, binding); + }); + } + }); + + this.table.element.on("keyup", function (e) { + + var code = e.keyCode; + + var bindings = self.watchKeys[code]; + + if (bindings) { + + var index = self.pressedKeys.indexOf(code); + + if (index > -1) { + + self.pressedKeys.splice(index, 1); + } + } + }); + }; + + Keybindings.prototype.checkBinding = function (e, binding) { + + var self = this, + match = true; + + if (e.ctrlKey == binding.ctrl && e.shiftKey == binding.shift) { + + binding.keys.forEach(function (key) { + + var index = self.pressedKeys.indexOf(key); + + if (index == -1) { + + match = false; + } + }); + + if (match) { + + binding.action.call(self, e); + } + + return true; + } + + return false; + }; + + //default bindings + + + Keybindings.prototype.bindings = { + + navPrev: "shift + 9", + + navNext: 9, + + navUp: 38, + + navDown: 40, + + scrollPageUp: 33, + + scrollPageDown: 34, + + scrollToStart: 36, + + scrollToEnd: 35, + + undo: "ctrl + 90", + + redo: "ctrl + 89" + + }; + + //default actions + + + Keybindings.prototype.actions = { + + keyBlock: function keyBlock(e) { + + e.stopPropagation(); + + e.preventDefault(); + }, + + scrollPageUp: function scrollPageUp(e) { + + var rowManager = this.table.rowManager, + newPos = rowManager.scrollTop - rowManager.height, + scrollMax = rowManager.element[0].scrollHeight; + + e.preventDefault(); + + if (rowManager.displayRowsCount) { + + if (newPos >= 0) { + + rowManager.element.scrollTop(newPos); + } else { + + rowManager.scrollToRow(rowManager.displayRows[0]); + } + } + + this.table.element.focus(); + }, + + scrollPageDown: function scrollPageDown(e) { + + var rowManager = this.table.rowManager, + newPos = rowManager.scrollTop + rowManager.height, + scrollMax = rowManager.element[0].scrollHeight; + + e.preventDefault(); + + if (rowManager.displayRowsCount) { + + if (newPos <= scrollMax) { + + rowManager.element.scrollTop(newPos); + } else { + + rowManager.scrollToRow(rowManager.displayRows[rowManager.displayRows.length - 1]); + } + } + + this.table.element.focus(); + }, + + scrollToStart: function scrollToStart(e) { + + var rowManager = this.table.rowManager; + + e.preventDefault(); + + if (rowManager.displayRowsCount) { + + rowManager.scrollToRow(rowManager.displayRows[0]); + } + + this.table.element.focus(); + }, + + scrollToEnd: function scrollToEnd(e) { + + var rowManager = this.table.rowManager; + + e.preventDefault(); + + if (rowManager.displayRowsCount) { + + rowManager.scrollToRow(rowManager.displayRows[rowManager.displayRows.length - 1]); + } + + this.table.element.focus(); + }, + + navPrev: function navPrev(e) { + + var cell = false; + + if (this.table.extExists("edit")) { + + cell = this.table.extensions.edit.currentCell; + + if (cell) { + + e.preventDefault(); + + cell.nav().prev(); + } + } + }, + + navNext: function navNext(e) { + + var cell = false; + + if (this.table.extExists("edit")) { + + cell = this.table.extensions.edit.currentCell; + + if (cell) { + + e.preventDefault(); + + cell.nav().next(); + } + } + }, + + navLeft: function navLeft(e) { + + var cell = false; + + if (this.table.extExists("edit")) { + + cell = this.table.extensions.edit.currentCell; + + if (cell) { + + e.preventDefault(); + + cell.nav().left(); + } + } + }, + + navRight: function navRight(e) { + + var cell = false; + + if (this.table.extExists("edit")) { + + cell = this.table.extensions.edit.currentCell; + + if (cell) { + + e.preventDefault(); + + cell.nav().right(); + } + } + }, + + navUp: function navUp(e) { + + var cell = false; + + if (this.table.extExists("edit")) { + + cell = this.table.extensions.edit.currentCell; + + if (cell) { + + e.preventDefault(); + + cell.nav().up(); + } + } + }, + + navDown: function navDown(e) { + + var cell = false; + + if (this.table.extExists("edit")) { + + cell = this.table.extensions.edit.currentCell; + + if (cell) { + + e.preventDefault(); + + cell.nav().down(); + } + } + }, + + undo: function undo(e) { + + var cell = false; + + if (this.table.options.history && this.table.extExists("history") && this.table.extExists("edit")) { + + cell = this.table.extensions.edit.currentCell; + + if (!cell) { + + e.preventDefault(); + + this.table.extensions.history.undo(); + } + } + }, + + redo: function redo(e) { + + var cell = false; + + if (this.table.options.history && this.table.extExists("history") && this.table.extExists("edit")) { + + cell = this.table.extensions.edit.currentCell; + + if (!cell) { + + e.preventDefault(); + + this.table.extensions.history.redo(); + } + } + } + + }; + + Tabulator.registerExtension("keybindings", Keybindings); + + var MoveColumns = function MoveColumns(table) { + + this.table = table; //hold Tabulator object + + + this.placeholderElement = $("
"); + + this.hoverElement = $(); //floating column header element + + + this.checkTimeout = false; //click check timeout holder + + + this.checkPeriod = 250; //period to wait on mousedown to consider this a move and not a click + + + this.moving = false; //currently moving column + + + this.toCol = false; //destination column + + + this.toColAfter = false; //position of moving column relative to the desitnation column + + + this.startX = 0; //starting position within header element + + + this.autoScrollMargin = 40; //auto scroll on edge when within margin + + + this.autoScrollStep = 5; //auto scroll distance in pixels + + + this.autoScrollTimeout = false; //auto scroll timeout + + + this.moveHover = this.moveHover.bind(this); + + this.endMove = this.endMove.bind(this); + }; + + MoveColumns.prototype.initializeColumn = function (column) { + + var self = this, + config = {}; + + if (!column.extensions.frozen) { + + config.mousemove = function (e) { + + if (column.parent === self.moving.parent) { + + if (e.pageX - column.element.offset().left + self.table.columnManager.element.scrollLeft() > column.getWidth() / 2) { + + if (self.toCol !== column || !self.toColAfter) { + + column.element.after(self.placeholderElement); + + self.moveColumn(column, true); + } + } else { + + if (self.toCol !== column || self.toColAfter) { + + column.element.before(self.placeholderElement); + + self.moveColumn(column, false); + } + } + } + }.bind(self); + + column.getElement().on("mousedown", function (e) { + + self.checkTimeout = setTimeout(function () { + + self.startMove(e, column); + }, self.checkPeriod); + }); + + column.getElement().on("mouseup", function (e) { + + if (self.checkTimeout) { + + clearTimeout(self.checkTimeout); + } + }); + } + + column.extensions.moveColumn = config; + }; + + MoveColumns.prototype.startMove = function (e, column) { + + var self = this, + element = column.getElement(); + + self.moving = column; + + self.startX = e.pageX - element.offset().left; + + self.table.element.addClass("tabulator-block-select"); + + //create placeholder + + + self.placeholderElement.css({ + + width: column.getWidth(), + + height: column.getHeight() + + }); + + element.before(self.placeholderElement); + + element.detach(); + + //create hover element + + + self.hoverElement = element.clone(); + + self.hoverElement.addClass("tabulator-moving"); + + self.table.columnManager.getElement().append(self.hoverElement); + + self.hoverElement.css({ + + "left": 0, + + "bottom": 0 + + }); + + self._bindMouseMove(); + + $("body").on("mousemove", self.moveHover); + + $("body").on("mouseup", self.endMove); + + self.moveHover(e); + }; + + MoveColumns.prototype._bindMouseMove = function () { + + var self = this; + + self.table.columnManager.columnsByIndex.forEach(function (column) { + + if (column.extensions.moveColumn.mousemove) { + + column.element.on("mousemove", column.extensions.moveColumn.mousemove); + } + }); + }; + + MoveColumns.prototype._unbindMouseMove = function () { + + var self = this; + + self.table.columnManager.columnsByIndex.forEach(function (column) { + + if (column.extensions.moveColumn.mousemove) { + + column.element.off("mousemove", column.extensions.moveColumn.mousemove); + } + }); + }; + + MoveColumns.prototype.moveColumn = function (column, after) { + + var self = this, + movingCells = this.moving.getCells(); + + self.toCol = column; + + self.toColAfter = after; + + if (after) { + + column.getCells().forEach(function (cell, i) { + + cell.getElement().after(movingCells[i].getElement()); + }); + } else { + + column.getCells().forEach(function (cell, i) { + + cell.getElement().before(movingCells[i].getElement()); + }); + } + }; + + MoveColumns.prototype.endMove = function (column) { + + var self = this; + + self._unbindMouseMove(); + + self.placeholderElement.after(self.moving.getElement()); + + self.placeholderElement.detach(); + + self.hoverElement.detach(); + + self.table.element.removeClass("tabulator-block-select"); + + if (self.toCol) { + + self.table.columnManager.moveColumn(self.moving, self.toCol, self.toColAfter); + } + + self.moving = false; + + self.toCol = false; + + self.toColAfter = false; + + $("body").off("mousemove", self.moveHover); + + $("body").off("mouseup", self.endMove); + }; + + MoveColumns.prototype.moveHover = function (e) { + + var self = this, + columnHolder = self.table.columnManager.getElement(), + scrollLeft = columnHolder.scrollLeft(), + xPos = e.pageX - columnHolder.offset().left + scrollLeft, + scrollPos; + + self.hoverElement.css({ + + "left": xPos - self.startX + + }); + + if (xPos - scrollLeft < self.autoScrollMargin) { + + if (!self.autoScrollTimeout) { + + self.autoScrollTimeout = setTimeout(function () { + + scrollPos = Math.max(0, scrollLeft - 5); + + self.table.rowManager.getElement().scrollLeft(scrollPos); + + self.autoScrollTimeout = false; + }, 1); + } + } + + if (scrollLeft + columnHolder.innerWidth() - xPos < self.autoScrollMargin) { + + if (!self.autoScrollTimeout) { + + self.autoScrollTimeout = setTimeout(function () { + + scrollPos = Math.min(columnHolder.innerWidth(), scrollLeft + 5); + + self.table.rowManager.getElement().scrollLeft(scrollPos); + + self.autoScrollTimeout = false; + }, 1); + } + } + }; + + Tabulator.registerExtension("moveColumn", MoveColumns); + + var MoveRows = function MoveRows(table) { + + this.table = table; //hold Tabulator object + + + this.placeholderElement = $("
"); + + this.hoverElement = $(); //floating row header element + + + this.checkTimeout = false; //click check timeout holder + + + this.checkPeriod = 150; //period to wait on mousedown to consider this a move and not a click + + + this.moving = false; //currently moving row + + + this.toRow = false; //destination row + + + this.toRowAfter = false; //position of moving row relative to the desitnation row + + + this.hasHandle = false; //row has handle instead of fully movable row + + + this.startY = 0; //starting position within header element + + + this.moveHover = this.moveHover.bind(this); + + this.endMove = this.endMove.bind(this); + }; + + MoveRows.prototype.setHandle = function (handle) { + + this.hasHandle = handle; + }; + + MoveRows.prototype.initializeRow = function (row) { + + var self = this, + config = {}; + + config.mousemove = function (e) { + + if (e.pageY - row.element.offset().top + self.table.rowManager.element.scrollTop() > row.getHeight() / 2) { + + if (self.toRow !== row || !self.toRowAfter) { + + row.element.after(self.placeholderElement); + + self.moveRow(row, true); + } + } else { + + if (self.toRow !== row || self.toRowAfter) { + + row.element.before(self.placeholderElement); + + self.moveRow(row, false); + } + } + }.bind(self); + + if (!this.hasHandle) { + + row.getElement().on("mousedown", function (e) { + + self.checkTimeout = setTimeout(function () { + + self.startMove(e, row); + }, self.checkPeriod); + }); + + row.getElement().on("mouseup", function (e) { + + if (self.checkTimeout) { + + clearTimeout(self.checkTimeout); + } + }); + } + + row.extensions.moveRow = config; + }; + + MoveRows.prototype.initializeCell = function (cell) { + + var self = this; + + cell.getElement().on("mousedown", function (e) { + + self.checkTimeout = setTimeout(function () { + + self.startMove(e, cell.row); + }, self.checkPeriod); + }); + + cell.getElement().on("mouseup", function (e) { + + if (self.checkTimeout) { + + clearTimeout(self.checkTimeout); + } + }); + }; + + MoveRows.prototype._bindMouseMove = function () { + + var self = this; + + self.table.rowManager.displayRows.forEach(function (row) { + + if (row.type === "row" && row.extensions.moveRow.mousemove) { + + row.element.on("mousemove", row.extensions.moveRow.mousemove); + } + }); + }; + + MoveRows.prototype._unbindMouseMove = function () { + + var self = this; + + self.table.rowManager.displayRows.forEach(function (row) { + + if (row.type === "row" && row.extensions.moveRow.mousemove) { + + row.element.off("mousemove", row.extensions.moveRow.mousemove); + } + }); + }; + + MoveRows.prototype.startMove = function (e, row) { + + var self = this, + element = row.getElement(); + + self.moving = row; + + self.startY = e.pageY - element.offset().top; + + self.table.element.addClass("tabulator-block-select"); + + //create placeholder + + + self.placeholderElement.css({ + + width: row.getWidth(), + + height: row.getHeight() + + }); + + element.before(self.placeholderElement); + + element.detach(); + + //create hover element + + + self.hoverElement = element.clone(); + + self.hoverElement.addClass("tabulator-moving"); + + self.table.rowManager.getTableElement().append(self.hoverElement); + + self.hoverElement.css({ + + "left": 0, + + "top": 0 + + }); + + self._bindMouseMove(); + + $("body").on("mousemove", self.moveHover); + + $("body").on("mouseup", self.endMove); + + self.moveHover(e); + }; + + MoveRows.prototype.endMove = function (column) { + + var self = this; + + self._unbindMouseMove(); + + self.placeholderElement.after(self.moving.getElement()); + + self.placeholderElement.detach(); + + self.hoverElement.detach(); + + self.table.element.removeClass("tabulator-block-select"); + + if (self.toRow) { + + self.table.rowManager.moveRow(self.moving, self.toRow, self.toRowAfter); + } + + self.moving = false; + + self.toRow = false; + + self.toRowAfter = false; + + $("body").off("mousemove", self.moveHover); + + $("body").off("mouseup", self.endMove); + }; + + MoveRows.prototype.moveRow = function (row, after) { + + var self = this; + + self.toRow = row; + + self.toRowAfter = after; + }; + + MoveRows.prototype.moveHover = function (e) { + + var self = this, + rowHolder = self.table.rowManager.getElement(), + scrollTop = rowHolder.scrollTop(), + yPos = e.pageY - rowHolder.offset().top + scrollTop, + scrollPos; + + self.hoverElement.css({ + + "top": yPos - self.startY + + }); + }; + + Tabulator.registerExtension("moveRow", MoveRows); + + var Mutator = function Mutator(table) { + + this.table = table; //hold Tabulator object + + }; + + //initialize column mutator + + + Mutator.prototype.initializeColumn = function (column) { + + var config = { mutator: false, type: column.definition.mutateType, params: column.definition.mutatorParams || {} }; + + //set column mutator + + + switch (_typeof(column.definition.mutator)) { + + case "string": + + if (this.mutators[column.definition.mutator]) { + + config.mutator = this.mutators[column.definition.mutator]; + } else { + + console.warn("Mutator Error - No such mutator found, ignoring: ", column.definition.mutator); + } + + break; + + case "function": + + config.mutator = column.definition.mutator; + + break; + + } + + if (config.mutator) { + + column.extensions.mutate = config; + } + }; + + //apply mutator to row + + + Mutator.prototype.transformRow = function (data) { + + var self = this; + + self.table.columnManager.traverse(function (column) { + + var field; + + if (column.extensions.mutate) { + + field = column.getField(); + + if (column.extensions.mutate.type != "edit") { + + column.setFieldValue(data, column.extensions.mutate.mutator(column.getFieldValue(data), data, "data", column.extensions.mutate.params)); + } + } + }); + + return data; + }; + + //apply mutator to new cell value + + + Mutator.prototype.transformCell = function (cell, value) { + + return cell.column.extensions.mutate.mutator(value, cell.row.getData(), "edit", cell.column.extensions.mutate.params, cell.getComponent()); + }; + + //default mutators + + + Mutator.prototype.mutators = {}; + + Tabulator.registerExtension("mutator", Mutator); + + var Page = function Page(table) { + + this.table = table; //hold Tabulator object + + + this.element = $(""); + + this.pagesElement = $(""); + + this.firstBut = $(""); + + this.prevBut = $(""); + + this.nextBut = $(""); + + this.lastBut = $(""); + + this.mode = "local"; + + this.size = 0; + + this.page = 1; + + this.max = 1; + + this.paginator = false; + }; + + //setup pageination + + + Page.prototype.initialize = function () { + + var self = this; + + //update param names + + + for (var key in self.table.options.paginationDataSent) { + + self.paginationDataSentNames[key] = self.table.options.paginationDataSent[key]; + } + + for (var _key2 in self.table.options.paginationDataReceived) { + + self.paginationDataReceivedNames[_key2] = self.table.options.paginationDataReceived[_key2]; + } + + if (self.table.options.paginator) { + + self.paginator = self.table.options.paginator; + } + + //build pagination element + + + //bind localizations + + + self.table.extensions.localize.bind("pagination.first", function (value) { + + self.firstBut.html(value); + }); + + self.table.extensions.localize.bind("pagination.first_title", function (value) { + + self.firstBut.attr("aria-label", value).attr("title", value); + }); + + self.table.extensions.localize.bind("pagination.prev", function (value) { + + self.prevBut.html(value); + }); + + self.table.extensions.localize.bind("pagination.prev_title", function (value) { + + self.prevBut.attr("aria-label", value).attr("title", value); + }); + + self.table.extensions.localize.bind("pagination.next", function (value) { + + self.nextBut.html(value); + }); + + self.table.extensions.localize.bind("pagination.next_title", function (value) { + + self.nextBut.attr("aria-label", value).attr("title", value); + }); + + self.table.extensions.localize.bind("pagination.last", function (value) { + + self.lastBut.html(value); + }); + + self.table.extensions.localize.bind("pagination.last_title", function (value) { + + self.lastBut.attr("aria-label", value).attr("title", value); + }); + + //click bindings + + + self.firstBut.on("click", function () { + + self.setPage(1); + }); + + self.prevBut.on("click", function () { + + self.previousPage(); + }); + + self.nextBut.on("click", function () { + + self.nextPage(); + }); + + self.lastBut.on("click", function () { + + self.setPage(self.max); + }); + + if (self.table.options.paginationElement) { + + self.element = self.table.options.paginationElement; + } + + //append to DOM + + + self.element.append(self.firstBut); + + self.element.append(self.prevBut); + + self.element.append(self.pagesElement); + + self.element.append(self.nextBut); + + self.element.append(self.lastBut); + + if (!self.table.options.paginationElement) { + + self.table.footerManager.append(self.element, self); + } + + //set default values + + + self.mode = self.table.options.pagination; + + self.size = self.table.options.paginationSize || Math.floor(self.table.rowManager.getElement().innerHeight() / 26); + }; + + //calculate maximum page from number of rows + + + Page.prototype.setMaxRows = function (rowCount) { + + if (!rowCount) { + + this.max = 1; + } else { + + this.max = Math.ceil(rowCount / this.size); + } + + if (this.page > this.max) { + + this.page = this.max; + } + }; + + //reset to first page without triggering action + + + Page.prototype.reset = function (force) { + + if (this.mode == "local" || force) { + + this.page = 1; + } + + return true; + }; + + //set the maxmum page + + + Page.prototype.setMaxPage = function (max) { + + this.max = max || 1; + + if (this.page > this.max) { + + this.page = this.max; + + this.trigger(); + } + }; + + //set current page number + + + Page.prototype.setPage = function (page) { + + if (page > 0 && page <= this.max) { + + this.page = page; + + this.trigger(); + + return true; + } else { + + console.warn("Pagination Error - Requested page is out of range of 1 - " + this.max + ":", page); + + return false; + } + }; + + Page.prototype.setPageSize = function (size) { + + if (size > 0) { + + this.size = size; + } + }; + + //setup the pagination buttons + + + Page.prototype._setPageButtons = function () { + + var self = this; + + var min = this.page < this.max - 2 ? this.page - 2 : this.page - (4 - (this.max - this.page)); + + var max = this.page > 3 ? this.page + 2 : this.page + (5 - this.page); + + self.pagesElement.empty(); + + if (self.page == 1) { + + self.firstBut.prop("disabled", true); + + self.prevBut.prop("disabled", true); + } else { + + self.firstBut.prop("disabled", false); + + self.prevBut.prop("disabled", false); + } + + if (self.page == self.max) { + + self.lastBut.prop("disabled", true); + + self.nextBut.prop("disabled", true); + } else { + + self.lastBut.prop("disabled", false); + + self.nextBut.prop("disabled", false); + } + + for (var i = min; i <= max; i++) { + + if (i > 0 && i <= self.max) { + + self.pagesElement.append(self._generatePageButton(i)); + } + } + + this.footerRedraw(); + }; + + Page.prototype._generatePageButton = function (page) { + + var self = this; + + var button = $(""); + + button.on("click", function (e) { + + self.setPage(page); + }); + + return button; + }; + + //previous page + + + Page.prototype.previousPage = function () { + + if (this.page > 1) { + + this.page--; + + this.trigger(); + + return true; + } else { + + console.warn("Pagination Error - Previous page would be less than page 1:", 0); + + return false; + } + }; + + //next page + + + Page.prototype.nextPage = function () { + + if (this.page < this.max) { + + this.page++; + + this.trigger(); + + return true; + } else { + + console.warn("Pagination Error - Next page would be greater than maximum page of " + this.max + ":", this.max + 1); + + return false; + } + }; + + //return current page number + + + Page.prototype.getPage = function () { + + return this.page; + }; + + //return max page number + + + Page.prototype.getPageMax = function () { + + return this.max; + }; + + Page.prototype.getPageSize = function (size) { + ; + + return this.size; + }; + + Page.prototype.getMode = function () { + + return this.mode; + }; + + //return appropriate rows for current page + + + Page.prototype.getRows = function (data) { + + var output, start, end; + + if (this.mode == "local") { + + output = []; + + start = this.size * (this.page - 1); + + end = start + parseInt(this.size); + + this._setPageButtons(); + + for (var i = start; i < end; i++) { + + if (data[i]) { + + output.push(data[i]); + } + } + + return output; + } else { + + this._setPageButtons(); + + return data.slice(0); + } + }; + + Page.prototype.trigger = function () { + + switch (this.mode) { + + case "local": + + this.table.rowManager.refreshActiveData(); + + this.table.options.pageLoaded(this.getPage()); + + break; + + case "remote": + + this._getRemotePage(); + + break; + + default: + + console.warn("Pagination Error - no such pagination mode:", this.mode); + + } + }; + + Page.prototype._getRemotePage = function () { + + if (this.table.extExists("ajax", true)) { + + if (this.paginator) { + + this._getRemotePagePaginator(); + } else { + + this._getRemotePageAuto(); + } + } + }; + + Page.prototype._getRemotePagePaginator = function () { + + var self = this, + ajax = self.table.extensions.ajax, + oldUrl = ajax.getUrl(); + + ajax.setUrl(self.paginator(ajax.getUrl(), self.page, self.size, ajax.getParams())); + + ajax.sendRequest(function (data) { + + self._parseRemoteData(data); + }); + + ajax.setUrl(oldUrl); + }; + + Page.prototype._getRemotePageAuto = function () { + + var self = this, + oldParams, + pageParams; + + //record old params and restore after request has been made + + + oldParams = $.extend(true, {}, self.table.extensions.ajax.getParams()); + + pageParams = self.table.extensions.ajax.getParams(); + + //configure request params + + + pageParams[this.paginationDataSentNames.page] = self.page; + + //set page size if defined + + + if (this.size) { + + pageParams[this.paginationDataSentNames.size] = this.size; + } + + //set sort data if defined + + + if (this.table.extExists("sort")) { + + var sorters = self.table.extensions.sort.getSort(); + + sorters.forEach(function (item) { + + delete item.column; + }); + + pageParams[this.paginationDataSentNames.sorters] = sorters; + } + + //set filter data if defined + + + if (this.table.extExists("filter")) { + + var filters = self.table.extensions.filter.getFilters(true, true); + + pageParams[this.paginationDataSentNames.filters] = filters; + } + + self.table.extensions.ajax.setParams(pageParams); + + self.table.extensions.ajax.sendRequest(function (data) { + + self._parseRemoteData(data); + }); + + self.table.extensions.ajax.setParams(oldParams); + }; + + Page.prototype._parseRemoteData = function (data) { + + if (data[this.paginationDataReceivedNames.last_page]) { + + if (data[this.paginationDataReceivedNames.data]) { + + this.max = parseInt(data[this.paginationDataReceivedNames.last_page]); + + this.table.rowManager.setData(data[this.paginationDataReceivedNames.data]); + + this.table.options.pageLoaded(this.getPage()); + } else { + + console.warn("Remote Pagination Error - Server response missing '" + this.paginationDataReceivedNames.data + "' property"); + } + } else { + + console.warn("Remote Pagination Error - Server response missing '" + this.paginationDataReceivedNames.last_page + "' property"); + } + }; + + //handle the footer element being redrawn + + + Page.prototype.footerRedraw = function () { + + var footer = this.table.footerManager.element; + + if (footer.innerWidth() - footer[0].scrollWidth < 0) { + + this.pagesElement.hide(); + } else { + + this.pagesElement.show(); + + if (footer.innerWidth() - footer[0].scrollWidth < 0) { + + this.pagesElement.hide(); + } + } + }; + + //set the paramter names for pagination requests + + + Page.prototype.paginationDataSentNames = { + + "page": "page", + + "size": "size", + + "sorters": "sorters", + + // "sort_dir":"sort_dir", + + + "filters": "filters" + + }; + + //set the property names for pagination responses + + + Page.prototype.paginationDataReceivedNames = { + + "current_page": "current_page", + + "last_page": "last_page", + + "data": "data" + + }; + + Tabulator.registerExtension("page", Page); + + var PersistentLayout = function PersistentLayout(table) { + + this.table = table; //hold Tabulator object + + + this.mode = ""; + + this.id = ""; + + this.persistProps = ["field", "width", "visible"]; + }; + + //setup parameters + + + PersistentLayout.prototype.initialize = function (mode, id) { + + //determine persistent layout storage type + + + this.mode = mode !== true ? mode : typeof window.localStorage !== 'undefined' ? "local" : "cookie"; + + //set storage tag + + + this.id = "tabulator-" + (id || this.table.element.attr("id") || ""); + }; + + //load saved definitions + + + PersistentLayout.prototype.load = function (definition) { + + var newDefinition = ""; + + switch (this.mode) { + + case "local": + + newDefinition = localStorage.getItem(this.id); + + break; + + case "cookie": + + //find cookie + + + var cookie = document.cookie, + cookiePos = cookie.indexOf(this.id + "="), + end = void 0; + + //if cookie exists, decode and load column data into tabulator + + + if (cookiePos > -1) { + + cookie = cookie.substr(cookiePos); + + end = cookie.indexOf(";"); + + if (end > -1) { + + cookie = cookie.substr(0, end); + } + + newDefinition = cookie.replace(this.id + "=", ""); + } + + break; + + default: + + console.warn("Persistance Load Error - invalid mode selected", this.mode); + + } + + if (newDefinition) { + + newDefinition = JSON.parse(newDefinition); + + definition = this.mergeDefinition(definition, newDefinition); + } + + return definition; + }; + + //merge old and new column defintions + + + PersistentLayout.prototype.mergeDefinition = function (oldCols, newCols) { + + var self = this, + output = []; + + newCols.forEach(function (column, to) { + + var from = self._findColumn(oldCols, column); + + if (from) { + + from.width = column.width; + + from.visible = column.visible; + + if (from.columns) { + + from.columns = self.mergeDefinition(from.columns, column.columns); + } + + output.push(from); + } + }); + + return output; + }; + + //find matching columns + + + PersistentLayout.prototype._findColumn = function (columns, subject) { + + var type = subject.columns ? "group" : subject.field ? "field" : "object"; + + return columns.find(function (col) { + + switch (type) { + + case "group": + + return col.title === subject.title && col.columns.length === subject.columns.length; + + break; + + case "field": + + return col.field === subject.field; + + break; + + case "object": + + return col === subject; + + break; + + } + }); + }; + + //save current definitions + + + PersistentLayout.prototype.save = function () { + + var definition = this.parseColumns(this.table.columnManager.getColumns()), + data = JSON.stringify(definition); + + switch (this.mode) { + + case "local": + + localStorage.setItem(this.id, data); + + break; + + case "cookie": + + var expireDate = new Date(); + + expireDate.setDate(expireDate.getDate() + 10000); + + //save cookie + + + document.cookie = this.id + "=" + data + "; expires=" + expireDate.toUTCString(); + + break; + + default: + + console.warn("Persistance Save Error - invalid mode selected", this.mode); + + } + }; + + //build premission list + + + PersistentLayout.prototype.parseColumns = function (columns) { + + var self = this, + definitions = []; + + columns.forEach(function (column) { + + var def = {}; + + if (column.isGroup) { + + def.title = column.getDefinition().title; + + def.columns = self.parseColumns(column.getColumns()); + } else { + + def.title = column.getDefinition().title; + + def.field = column.getField(); + + def.width = column.getWidth(); + + def.visible = column.visible; + } + + definitions.push(def); + }); + + return definitions; + }; + + Tabulator.registerExtension("persistentLayout", PersistentLayout); + + var ResizeColumns = function ResizeColumns(table) { + + this.table = table; //hold Tabulator object + + + this.startColumn = false; + + this.startX = false; + + this.startWidth = false; + + this.handle = null; + + this.prevHandle = null; + }; + + ResizeColumns.prototype.initializeColumn = function (type, column, element) { + + var self = this, + variableHeight = false, + mode = this.table.options.resizableColumns; + + //set column resize mode + + + if (type === "header") { + + variableHeight = column.definition.formatter == "textarea" || column.definition.variableHeight; + + column.extensions.resize = { variableHeight: variableHeight }; + } + + if (mode === true || mode == type) { + + var handle = document.createElement('div'); + + handle.className = "tabulator-col-resize-handle"; + + var prevHandle = document.createElement('div'); + + prevHandle.className = "tabulator-col-resize-handle prev"; + + handle.addEventListener("click", function (e) { + + e.stopPropagation(); + }); + + handle.addEventListener("mousedown", function (e) { + + var nearestColumn = column.getLastColumn(); + + if (nearestColumn) { + + self.startColumn = column; + + self._mouseDown(e, nearestColumn); + } + }); + + prevHandle.addEventListener("click", function (e) { + + e.stopPropagation(); + }); + + prevHandle.addEventListener("mousedown", function (e) { + + var nearestColumn, colIndex, prevColumn; + + nearestColumn = column.getFirstColumn(); + + if (nearestColumn) { + + colIndex = self.table.columnManager.findColumnIndex(nearestColumn); + + prevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false; + + if (prevColumn) { + + self.startColumn = column; + + self._mouseDown(e, prevColumn); + } + } + }); + + element.append(handle).append(prevHandle); + } + }; + + ResizeColumns.prototype._mouseDown = function (e, column) { + + var self = this; + + self.table.element.addClass("tabulator-block-select"); + + function mouseMove(e) { + + column.setWidth(self.startWidth + (e.screenX - self.startX)); + + if (!self.table.browserSlow && column.extensions.resize && column.extensions.resize.variableHeight) { + + column.checkCellHeights(); + } + } + + function mouseUp(e) { + + //block editor from taking action while resizing is taking place + + + if (self.startColumn.extensions.edit) { + + self.startColumn.extensions.edit.blocked = false; + } + + if (self.table.browserSlow && column.extensions.resize && column.extensions.resize.variableHeight) { + + column.checkCellHeights(); + } + + $("body").off("mouseup", mouseMove); + + $("body").off("mousemove", mouseMove); + + self.table.element.removeClass("tabulator-block-select"); + + if (self.table.options.persistentLayout && self.table.extExists("persistentLayout", true)) { + + self.table.extensions.persistentLayout.save(); + } + + self.table.options.columnResized(self.startColumn.getComponent()); + } + + e.stopPropagation(); //prevent resize from interfereing with movable columns + + + //block editor from taking action while resizing is taking place + + + if (self.startColumn.extensions.edit) { + + self.startColumn.extensions.edit.blocked = true; + } + + self.startX = e.screenX; + + self.startWidth = column.getWidth(); + + $("body").on("mousemove", mouseMove); + + $("body").on("mouseup", mouseUp); + }; + + Tabulator.registerExtension("resizeColumns", ResizeColumns); + + var ResponsiveLayout = function ResponsiveLayout(table) { + + this.table = table; //hold Tabulator object + + + this.columns = []; + + this.index = 0; + }; + + //generate resposivle columns list + + + ResponsiveLayout.prototype.initialize = function () { + + var columns = []; + + //detemine level of responsivity for each column + + + this.table.columnManager.columnsByIndex.forEach(function (column) { + + var def = column.getDefinition(); + + column.extensions.responsive = { order: typeof def.responsive === "undefined" ? 1 : def.responsive }; + + if (column.extensions.responsive.order) { + + columns.push(column); + } + }); + + //sort list by responsivity + + + columns = columns.reverse(); + + columns = columns.sort(function (a, b) { + + return b.extensions.responsive.order - a.extensions.responsive.order; + }); + + this.columns = columns; + }; + + ResponsiveLayout.prototype.update = function () { + + var self = this, + working = true; + + while (working) { + + var width = self.table.extensions.layout.getMode() == "fitColumns" ? self.table.columnManager.getFlexBaseWidth() : self.table.columnManager.getWidth(); + + var diff = self.table.columnManager.element.innerWidth() - width; + + if (diff < 0) { + + //table is too wide + + + var column = self.columns[self.index]; + + if (column) { + + column.hide(); + + self.index++; + } else { + + working = false; + } + } else { + + //table has spare space + + + var _column = self.columns[self.index - 1]; + + if (_column) { + + if (diff > 0) { + + if (diff >= _column.getWidth()) { + + _column.show(); + + //set column width to prevent calculation loops on uninitialized columns + + + _column.setWidth(_column.getWidth()); + + self.index--; + } else { + + working = false; + } + } else { + + working = false; + } + } else { + + working = false; + } + } + + if (!self.table.rowManager.activeRowsCount) { + + self.table.rowManager.renderEmptyScroll(); + } + } + }; + + Tabulator.registerExtension("responsiveLayout", ResponsiveLayout); + + var SelectRow = function SelectRow(table) { + + this.table = table; //hold Tabulator object + + + this.selecting = false; //flag selecting in progress + + + this.selectPrev = []; //hold previously selected element for drag drop selection + + + this.selectedRows = []; //hold selected rows + + }; + + SelectRow.prototype.clearSelectionData = function () { + + this.selecting = false; + + this.selectPrev = []; + + this.selectedRows = []; + }; + + SelectRow.prototype.initializeRow = function (row) { + + var self = this, + element = row.getElement(); + + // trigger end of row selection + + + var endSelect = function endSelect() { + + setTimeout(function () { + + self.selecting = false; + }, 50); + + $("body").off("mouseup", endSelect); + }; + + row.extensions.select = { selected: false }; + + //set row selection class + + + if (self.table.options.selectableCheck(row.getComponent())) { + + element.addClass("tabulator-selectable").removeClass("tabulator-unselectable"); + + if (self.table.options.selectable && self.table.options.selectable != "highlight") { + + element.on("click", function (e) { + + if (!self.selecting) { + + self.toggleRow(row); + } + }); + + element.on("mousedown", function (e) { + + if (e.shiftKey) { + + self.selecting = true; + + self.selectPrev = []; + + $("body").on("mouseup", endSelect); + + $("body").on("keyup", endSelect); + + self.toggleRow(row); + + return false; + } + }); + + element.on("mouseenter", function (e) { + + if (self.selecting) { + + self.toggleRow(row); + + if (self.selectPrev[1] == row) { + + self.toggleRow(self.selectPrev[0]); + } + } + }); + + element.on("mouseout", function (e) { + + if (self.selecting) { + + self.selectPrev.unshift(row); + } + }); + } + } else { + + row.getElement().addClass("tabulator-unselectable").removeClass("tabulator-selectable"); + } + }; + + //toggle row selection + + + SelectRow.prototype.toggleRow = function (row) { + + if (this.table.options.selectableCheck(row.getComponent())) { + + if (row.extensions.select.selected) { + + this._deselectRow(row); + } else { + + this._selectRow(row); + } + } + }; + + //select a number of rows + + + SelectRow.prototype.selectRows = function (rows) { + + var self = this; + + switch (typeof rows === 'undefined' ? 'undefined' : _typeof(rows)) { + + case "undefined": + + self.table.rowManager.rows.forEach(function (row) { + + self._selectRow(row, true, true); + }); + + self._rowSelectionChanged(); + + break; + + case "boolean": + + if (rows === true) { + + self.table.rowManager.activeRows.forEach(function (row) { + + self._selectRow(row, true, true); + }); + + self._rowSelectionChanged(); + } + + break; + + default: + + if (Array.isArray(rows)) { + + rows.forEach(function (row) { + + self._selectRow(row, true); + }); + + self._rowSelectionChanged(); + } else { + + self._selectRow(rows); + } + + break; + + } + }; + + //select an individual row + + + SelectRow.prototype._selectRow = function (rowInfo, silent, force) { + + var self = this, + index; + + //handle max row count + + + if (!isNaN(self.table.options.selectable) && self.table.options.selectable !== true && !force) { + + if (self.selectedRows.length >= self.table.options.selectable) { + + if (self.table.options.selectableRollingSelection) { + + self._deselectRow(self.selectedRows[0], true); + } else { + + return false; + } + } + } + + var row = self.table.rowManager.findRow(rowInfo); + + if (row) { + + var self = this; + + row.extensions.select.selected = true; + + row.getElement().addClass("tabulator-selected"); + + self.selectedRows.push(row); + + if (!silent) { + + self.table.options.rowSelected(row.getComponent()); + + self._rowSelectionChanged(); + } + } else { + + console.warn("Selection Error - No such row found, ignoring selection:" + rowInfo); + } + }; + + //deselect a number of rows + + + SelectRow.prototype.deselectRows = function (rows) { + + var self = this; + + if (typeof rows == "undefined") { + + var rowCount = self.selectedRows.length; + + for (var i = 0; i < rowCount; i++) { + + self._deselectRow(self.selectedRows[0], true); + } + + self._rowSelectionChanged(); + } else { + + if (Array.isArray(rows)) { + + rows.forEach(function (row) { + + self._deselectRow(row, true); + }); + + self._rowSelectionChanged(); + } else { + + self._deselectRow(rows); + } + } + }; + + //deselect an individual row + + + SelectRow.prototype._deselectRow = function (rowInfo, silent) { + + var self = this, + row = self.table.rowManager.findRow(rowInfo), + index; + + if (row) { + + index = self.selectedRows.findIndex(function (selectedRow) { + + return selectedRow == row; + }); + + if (index > -1) { + + row.extensions.select.selected = false; + + row.getElement().removeClass("tabulator-selected"); + + self.selectedRows.splice(index, 1); + + if (!silent) { + + self.table.options.rowDeselected(row.getComponent()); + + self._rowSelectionChanged(); + } + } + } else { + + console.warn("Selection Error - No such row found, ignoring selection:" + rowInfo); + } + }; + + SelectRow.prototype.getSelectedData = function () { + + var data = []; + + this.selectedRows.forEach(function (row) { + + data.push(row.getData()); + }); + + return data; + }; + + SelectRow.prototype.getSelectedRows = function () { + + var rows = []; + + this.selectedRows.forEach(function (row) { + + rows.push(row.getComponent()); + }); + + return rows; + }; + + SelectRow.prototype._rowSelectionChanged = function () { + + this.table.options.rowSelectionChanged(this.getSelectedData(), this.getSelectedRows()); + }; + + Tabulator.registerExtension("selectRow", SelectRow); + + var Sort = function Sort(table) { + + this.table = table; //hold Tabulator object + + + this.sortList = []; //holder current sort + + + this.changed = false; //has the sort changed since last render + + }; + + //initialize column header for sorting + + + Sort.prototype.initializeColumn = function (column, content) { + + var self = this, + sorter = false; + + switch (_typeof(column.definition.sorter)) { + + case "string": + + if (self.sorters[column.definition.sorter]) { + + sorter = self.sorters[column.definition.sorter]; + } else { + + console.warn("Sort Error - No such sorter found: ", column.definition.sorter); + } + + break; + + case "function": + + sorter = column.definition.sorter; + + break; + + } + + column.extensions.sort = { sorter: sorter, dir: "none", params: column.definition.sorterParams || {} }; + + if (column.definition.headerSort !== false) { + + column.element.addClass("tabulator-sortable"); + + //create sorter arrow + + + content.append($("
")); + + //sort on click + + + column.element.on("click", function (e) { + + var dir = "", + sorters = [], + match = false; + + if (column.extensions.sort) { + + dir = column.extensions.sort.dir == "asc" ? "desc" : "asc"; + + if (e.shiftKey || e.ctrlKey) { + + sorters = self.getSort(); + + match = sorters.findIndex(function (sorter) { + + return sorter.field === column.getField(); + }); + + if (match > -1) { + + sorters[match].dir = sorters[match].dir == "asc" ? "desc" : "asc"; + + if (match != sorters.length - 1) { + + sorters.push(sorters.splice(match, 1)[0]); + } + } else { + + sorters.push({ column: column, dir: dir }); + } + + //add to existing sort + + + self.setSort(sorters); + } else { + + //sort by column only + + + self.setSort(column, dir); + } + + self.table.rowManager.sorterRefresh(); + } + }); + } + }; + + //check if the sorters have changed since last use + + + Sort.prototype.hasChanged = function () { + + var changed = this.changed; + + this.changed = false; + + return changed; + }; + + //return current sorters + + + Sort.prototype.getSort = function () { + + var self = this, + sorters = []; + + self.sortList.forEach(function (item) { + + if (item.column) { + + sorters.push({ column: item.column.getComponent(), field: item.column.getField(), dir: item.dir }); + } + }); + + return sorters; + }; + + //change sort list and trigger sort + + + Sort.prototype.setSort = function (sortList, dir) { + + var self = this, + newSortList = []; + + if (!Array.isArray(sortList)) { + + sortList = [{ column: sortList, dir: dir }]; + } + + sortList.forEach(function (item) { + + var column; + + column = self.table.columnManager.findColumn(item.column); + + if (column) { + + item.column = column; + + newSortList.push(item); + + self.changed = true; + } else { + + console.warn("Sort Warning - Sort field does not exist and is being ignored: ", item.column); + } + }); + + self.sortList = newSortList; + }; + + //clear sorters + + + Sort.prototype.clear = function () { + + this.setSort([]); + }, + + //find appropriate sorter for column + + + Sort.prototype.findSorter = function (column) { + + var row = this.table.rowManager.activeRows[0], + sorter = "string", + field, + value; + + if (row) { + + row = row.getData(); + + field = column.getField(); + + if (field) { + + value = column.getFieldValue(row); + + switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { + + case "undefined": + + sorter = "string"; + + break; + + case "boolean": + + sorter = "boolean"; + + break; + + default: + + if (!isNaN(value) && value !== "") { + + sorter = "number"; + } else { + + if (value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)) { + + sorter = "alphanum"; + } + } + + break; + + } + } + } + + return this.sorters[sorter]; + }; + + //work through sort list sorting data + + + Sort.prototype.sort = function () { + + var self = this, + lastSort; + + if (self.table.options.dataSorting) { + + self.table.options.dataSorting(self.getSort()); + } + + self.clearColumnHeaders(); + + if (!self.table.options.ajaxSorting) { + + self.sortList.forEach(function (item, i) { + + if (item.column && item.column.extensions.sort) { + + //if no sorter has been defined, take a guess + + + if (!item.column.extensions.sort.sorter) { + + item.column.extensions.sort.sorter = self.findSorter(item.column); + } + + self._sortItem(item.column, item.dir, self.sortList, i); + } + + self.setColumnHeader(item.column, item.dir); + }); + } + + if (self.table.options.dataSorted) { + + self.table.options.dataSorted(self.getSort(), self.table.rowManager.getComponents(true)); + } + }; + + //clear sort arrows on columns + + + Sort.prototype.clearColumnHeaders = function () { + + this.table.columnManager.getRealColumns().forEach(function (column) { + + if (column.extensions.sort) { + + column.extensions.sort.dir = "none"; + + column.element.attr("aria-sort", "none"); + } + }); + }; + + //set the column header sort direction + + + Sort.prototype.setColumnHeader = function (column, dir) { + + column.extensions.sort.dir = dir; + + column.element.attr("aria-sort", dir); + }; + + //sort each item in sort list + + + Sort.prototype._sortItem = function (column, dir, sortList, i) { + + var self = this; + + var activeRows = self.table.rowManager.activeRows; + + activeRows.sort(function (a, b) { + + var result = self._sortRow(a, b, column, dir); + + //if results match recurse through previous searchs to be sure + + + if (result == 0 && i) { + + for (var j = i - 1; j >= 0; j--) { + + result = self._sortRow(a, b, sortList[j].column, sortList[j].dir); + + if (result != 0) { + + break; + } + } + } + + return result; + }); + }; + + //process individual rows for a sort function on active data + + + Sort.prototype._sortRow = function (a, b, column, dir) { + + var self = this; + + //switch elements depending on search direction + + + var el1 = dir == "asc" ? a : b; + + var el2 = dir == "asc" ? b : a; + + a = column.getFieldValue(el1.getData()); + + b = column.getFieldValue(el2.getData()); + + a = typeof a !== "undefined" ? a : ""; + + b = typeof b !== "undefined" ? b : ""; + + return column.extensions.sort.sorter.call(self, a, b, el1.getComponent(), el2.getComponent(), column.getComponent(), dir, column.extensions.sort.params); + }; + + //default data sorters + + + Sort.prototype.sorters = { + + //sort numbers + + + number: function number(a, b, aRow, bRow, column, dir, params) { + + return parseFloat(String(a).replace(",", "")) - parseFloat(String(b).replace(",", "")); + }, + + //sort strings + + + string: function string(a, b, aRow, bRow, column, dir, params) { + + return String(a).toLowerCase().localeCompare(String(b).toLowerCase()); + }, + + //sort date + + + date: function date(a, b, aRow, bRow, column, dir, params) { + + var self = this; + + var format = params.format || "DD/MM/YYYY"; + + if (typeof moment != "undefined") { + + a = moment(a, format); + + b = moment(b, format); + } else { + + console.error("Sort Error - 'date' sorter is dependant on moment.js"); + } + + return a - b; + }, + + //sort booleans + + + boolean: function boolean(a, b, aRow, bRow, column, dir, params) { + + var el1 = a === true || a === "true" || a === "True" || a === 1 ? 1 : 0; + + var el2 = b === true || b === "true" || b === "True" || b === 1 ? 1 : 0; + + return el1 - el2; + }, + + //sort alpha numeric strings + + + alphanum: function alphanum(as, bs, aRow, bRow, column, dir, params) { + + var a, + b, + a1, + b1, + i = 0, + L, + rx = /(\d+)|(\D+)/g, + rd = /\d/; + + if (isFinite(as) && isFinite(bs)) return as - bs; + + a = String(as).toLowerCase(); + + b = String(bs).toLowerCase(); + + if (a === b) return 0; + + if (!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1; + + a = a.match(rx); + + b = b.match(rx); + + L = a.length > b.length ? b.length : a.length; + + while (i < L) { + + a1 = a[i]; + + b1 = b[i++]; + + if (a1 !== b1) { + + if (isFinite(a1) && isFinite(b1)) { + + if (a1.charAt(0) === "0") a1 = "." + a1; + + if (b1.charAt(0) === "0") b1 = "." + b1; + + return a1 - b1; + } else return a1 > b1 ? 1 : -1; + } + } + + return a.length > b.length; + }, + + //sort hh:mm formatted times + + + time: function time(a, b, aRow, bRow, column, dir, params) { + + var self = this; + + var format = params.format || "hh:mm"; + + if (typeof moment != "undefined") { + + a = moment(a, format); + + b = moment(b, format); + } else { + + console.error("Sort Error - 'date' sorter is dependant on moment.js"); + } + + return a - b; + } + + }; + + Tabulator.registerExtension("sort", Sort); + + var Validate = function Validate(table) { + + this.table = table; + }; + + //validate + + + Validate.prototype.initializeColumn = function (column) { + + var self = this, + config = [], + validator; + + if (column.definition.validator) { + + if (Array.isArray(column.definition.validator)) { + + column.definition.validator.forEach(function (item) { + + validator = self._extractValidator(item); + + if (validator) { + + config.push(validator); + } + }); + } else { + + validator = this._extractValidator(column.definition.validator); + + if (validator) { + + config.push(validator); + } + } + + column.extensions.validate = config.length ? config : false; + } + }; + + Validate.prototype._extractValidator = function (value) { + + switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { + + case "string": + + var parts = value.split(":"); + + var type = parts.shift(); + + var params = parts.join(); + + return this._buildValidator(type, params); + + break; + + case "function": + + return this._buildValidator(value); + + break; + + case "object": + + return this._buildValidator(value.type, value.parameters); + + break; + + } + }; + + Validate.prototype._buildValidator = function (type, params) { + + var func = typeof type == "function" ? type : this.validators[type]; + + if (!func) { + + console.warn("Validator Setup Error - No matching validator found:", type); + + return false; + } else { + + return { + + type: typeof type == "function" ? "function" : type, + + func: func, + + params: params + + }; + } + }; + + Validate.prototype.validate = function (validators, cell, value) { + + var self = this, + valid = []; + + if (validators) { + + validators.forEach(function (item) { + + if (!item.func.call(self, cell, value, item.params)) { + + valid.push({ + + type: item.type, + + parameters: item.params + + }); + } + }); + } + + return valid.length ? valid : true; + }; + + Validate.prototype.validators = { + + //is integer + + + integer: function integer(cell, value, parameters) { + + value = Number(value); + + return typeof value === 'number' && isFinite(value) && Math.floor(value) === value; + }, + + //is float + + + float: function float(cell, value, parameters) { + + value = Number(value); + + return typeof value === 'number' && isFinite(value) && value % 1 !== 0;; + }, + + //must be a number + + + numeric: function numeric(cell, value, parameters) { + + return !isNaN(value); + }, + + //must be a string + + + string: function string(cell, value, parameters) { + + return isNaN(value); + }, + + //maximum value + + + max: function max(cell, value, parameters) { + + return parseFloat(value) <= parameters; + }, + + //minimum value + + + min: function min(cell, value, parameters) { + + return parseFloat(value) >= parameters; + }, + + //minimum string length + + + minLength: function minLength(cell, value, parameters) { + + return String(value).length >= parameters; + }, + + //maximum string length + + + maxLength: function maxLength(cell, value, parameters) { + + return String(value).length <= parameters; + }, + + //in provided value list + + + in: function _in(cell, value, parameters) { + + if (typeof parameters == "string") { + + parameters = parameters.split("|"); + } + + return value === "" || parameters.indexOf(value) > -1; + }, + + //must match provided regex + + + regex: function regex(cell, value, parameters) { + + var reg = new RegExp(parameters); + + return reg.test(value); + }, + + //value must be unique in this column + + + unique: function unique(cell, value, parameters) { + + var unique = true; + + var cellData = cell.getData(); + + this.table.rowManager.rows.forEach(function (row) { + + var data = row.getData(); + + if (data !== cellData) { + + if (value == data[cell.getField()]) { + + unique = false; + } + } + }); + + return unique; + }, + + //must have a value + + + required: function required(cell, value, parameters) { + + return value !== "" & value !== null && typeof value != "undefined"; + } + + }; + + Tabulator.registerExtension("validate", Validate); + })(); + + $.widget("ui.tabulator", Tabulator); +}); \ No newline at end of file diff --git a/js/tabulator/dist/js/tabulator.min.js b/js/tabulator/dist/js/tabulator.min.js new file mode 100644 index 0000000..e54d6f6 --- /dev/null +++ b/js/tabulator/dist/js/tabulator.min.js @@ -0,0 +1,6 @@ +/* Tabulator v3.3.1 (c) Oliver Folkerd */ +"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(t,o){!function(){Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),o=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var n=arguments[1],s=0;s"),this.element=t("
"),this.rowManager=null,this.columns=[],this.columnsByIndex=[],this.columnsByField=[],this.scrollLeft=0,this.element.prepend(this.headersElement)};i.prototype.setRowManager=function(t){this.rowManager=t},i.prototype.getElement=function(){return this.element},i.prototype.getHeadersElement=function(){return this.headersElement},i.prototype.scrollHorizontal=function(t){var e=0,o=this.element[0].scrollWidth-this.table.element.innerWidth();this.element.scrollLeft(t),t>o?(e=t-o,this.element.css("margin-left",-e)):this.element.css("margin-left",0),this.scrollLeft=t,this.table.extExists("frozenColumns")&&this.table.extensions.frozenColumns.layout()},i.prototype.setColumns=function(t,e){var o=this;o.headersElement.empty(),o.columns=[],o.columnsByIndex=[],o.columnsByField=[],o.table.extExists("frozenColumns")&&o.table.extensions.frozenColumns.reset(),t.forEach(function(t,e){o._addColumn(t)}),o._reIndexColumns(),o.table.options.responsiveLayout&&o.table.extExists("responsiveLayout",!0)&&o.table.extensions.responsiveLayout.initialize(),o.redraw(!0)},i.prototype._addColumn=function(t,e,o){var i=new s(t,this),n=o?this.findColumnIndex(o):o;if(o&&n>-1){var a=this.columns.indexOf(o.getTopColumn());e?(this.columns.splice(a,0,i),o.getElement().before(i.getElement())):(this.columns.splice(a+1,0,i),o.getElement().after(i.getElement()))}else e?(this.columns.unshift(i),this.headersElement.prepend(i.getElement())):(this.columns.push(i),this.headersElement.append(i.getElement()));return i},i.prototype.registerColumnField=function(t){t.definition.field&&(this.columnsByField[t.definition.field]=t)},i.prototype.registerColumnPosition=function(t){this.columnsByIndex.push(t)},i.prototype._reIndexColumns=function(){this.columnsByIndex=[],this.columns.forEach(function(t){t.reRegisterPosition()})},i.prototype._verticalAlignHeaders=function(){var t=this;t.columns.forEach(function(t){t.clearVerticalAlign()}),t.columns.forEach(function(e){e.verticalAlign(t.table.options.columnVertAlign)}),t.rowManager.adjustTableSize()},i.prototype.findColumn=function(t){var e=this;if("object"!=(void 0===t?"undefined":_typeof(t)))return this.columnsByField[t]||!1;if(t instanceof s)return t;if(t instanceof n)return t._getSelf()||!1;if(t instanceof jQuery){return e.columns.find(function(e){return e.element===t})||!1}return!1},i.prototype.getColumnByField=function(t){return this.columnsByField[t]},i.prototype.getColumnByIndex=function(t){return this.columnsByIndex[t]},i.prototype.getColumns=function(){return this.columns},i.prototype.findColumnIndex=function(t){return this.columnsByIndex.findIndex(function(e){return t===e})},i.prototype.getRealColumns=function(){return this.columnsByIndex},i.prototype.traverse=function(t){this.columnsByIndex.forEach(function(e,o){t(e,o)})},i.prototype.getDefinitions=function(t){var e=this,o=[];return e.columnsByIndex.forEach(function(e){(!t||t&&e.visible)&&o.push(e.getDefinition())}),o},i.prototype.getDefinitionTree=function(){var t=this,e=[];return t.columns.forEach(function(t){e.push(t.getDefinition(!0))}),e},i.prototype.getComponents=function(){var t=this,e=[];return t.columnsByIndex.forEach(function(t){e.push(t.getComponent())}),e},i.prototype.getWidth=function(){var t=0;return this.columnsByIndex.forEach(function(e){e.visible&&(t+=e.getWidth())}),t},i.prototype.moveColumn=function(t,e,o){this._moveColumnInArray(this.columns,t,e,o),this._moveColumnInArray(this.columnsByIndex,t,e,o,!0),this.table.options.columnMoved(t.getComponent()),this.table.options.persistentLayout&&this.table.extExists("persistentLayout",!0)&&this.table.extensions.persistentLayout.save()},i.prototype._moveColumnInArray=function(t,e,o,i,n){var s,a=t.indexOf(e);a>-1&&(t.splice(a,1),s=t.indexOf(o),s>-1?i&&(s+=1):s=a,t.splice(s,0,e),n&&this.table.rowManager.rows.forEach(function(t){if(t.cells.length){var e=t.cells.splice(a,1)[0];t.cells.splice(s,0,e)}}))},i.prototype.generateCells=function(t){var e=this,o=[];return e.columnsByIndex.forEach(function(e){o.push(e.generateCell(t))}),o},i.prototype.getFlexBaseWidth=function(){var t=this,e=t.table.element.innerWidth(),o=0;return t.rowManager.element[0].scrollHeight>t.rowManager.element.innerHeight()&&(e-=t.rowManager.element[0].offsetWidth-t.rowManager.element[0].clientWidth),this.columnsByIndex.forEach(function(i){var n,s,a;i.visible&&(n=i.definition.width||0,s=void 0===i.minWidth?t.table.options.columnMinWidth:parseInt(i.minWidth),a="string"==typeof n?n.indexOf("%")>-1?e/100*parseInt(n):parseInt(n):n,o+=a>s?a:s)}),o},i.prototype.addColumn=function(t,e,o){var i=this._addColumn(t,e,o);this._reIndexColumns(),this.table.options.responsiveLayout&&this.table.extExists("responsiveLayout",!0)&&this.table.extensions.responsiveLayout.initialize(),this.table.extExists("columnCalcs")&&this.table.extensions.columnCalcs.recalc(this.table.rowManager.displayRows),this.redraw(),"fitColumns"!=this.table.extensions.layout.getMode()&&i.reinitializeWidth(),this._verticalAlignHeaders(),this.table.rowManager.reinitialize()},i.prototype.deregisterColumn=function(t){var e,o=t.getField();o&&delete this.columnsByField[o],e=this.columnsByIndex.indexOf(t),e>-1&&this.columnsByIndex.splice(e,1),e=this.columns.indexOf(t),e>-1&&this.columns.splice(e,1),this.table.options.responsiveLayout&&this.table.extExists("responsiveLayout",!0)&&this.table.extensions.responsiveLayout.initialize(),this.redraw()},i.prototype.redraw=function(t){t&&(this.element.is(":visible")&&this._verticalAlignHeaders(),this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),"fitColumns"==this.table.extensions.layout.getMode()?this.table.extensions.layout.layout():t?this.table.extensions.layout.layout():this.table.options.responsiveLayout&&this.table.extExists("responsiveLayout",!0)&&this.table.extensions.responsiveLayout.update(),this.table.extExists("frozenColumns")&&this.table.extensions.frozenColumns.layout(),this.table.extExists("columnCalcs")&&this.table.extensions.columnCalcs.recalc(this.table.rowManager.displayRows),t&&(this.table.options.persistentLayout&&this.table.extExists("persistentLayout",!0)&&this.table.extensions.persistentLayout.save(),this.table.extExists("columnCalcs")&&this.table.extensions.columnCalcs.redraw()),this.table.footerManager.redraw()};var n=function(t){this.column=t,this.type="ColumnComponent"};n.prototype.getElement=function(){return this.column.getElement()},n.prototype.getDefinition=function(){return this.column.getDefinition()},n.prototype.getField=function(){return this.column.getField()},n.prototype.getCells=function(){var t=[];return this.column.cells.forEach(function(e){t.push(e.getComponent())}),t},n.prototype.getVisibility=function(){return this.column.visible},n.prototype.show=function(){this.column.show()},n.prototype.hide=function(){this.column.hide()},n.prototype.toggle=function(){this.column.visible?this.column.hide():this.column.show()},n.prototype.delete=function(){this.column.delete()},n.prototype._getSelf=function(){return this.column};var s=function e(o,i){var n=this;this.table=i.table,this.definition=o,this.parent=i,this.type="column",this.columns=[],this.cells=[],this.element=t("
"),this.contentElement=!1,this.groupElement=t("
"),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.setField(this.definition.field),this.extensions={},this.cellEvents={cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1},this.width=null,this.minWidth=null,this.widthFixed=!1,this.visible=!0,o.columns?(this.isGroup=!0,o.columns.forEach(function(t,o){var i=new e(t,n);n.attachColumn(i)}),n.checkColumnVisibility()):i.registerColumnField(this),o.rowHandle&&!1!==this.table.options.movableRows&&this.table.extExists("moveRow")&&this.table.extensions.moveRow.setHandle(!0),this._mapDepricatedFunctionality(),this._buildHeader()};s.prototype._mapDepricatedFunctionality=function(t){this.definition.tooltipHeader&&(console.warn("The%c tooltipHeader%c column definition property has been depricated and will be removed in version 4.0, use %c headerTooltio%c instead.","font-weight:bold;","font-weight:regular;","font-weight:bold;","font-weight:regular;"),void 0===this.definition.headerTooltip&&(this.definition.headerTooltip=this.definition.tooltipHeader))},s.prototype.setField=function(t){this.field=t,this.fieldStructure=t?t.split("."):[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNesteData:this._setFlatData},s.prototype.registerColumnPosition=function(t){this.parent.registerColumnPosition(t)},s.prototype.registerColumnField=function(t){this.parent.registerColumnField(t)},s.prototype.reRegisterPosition=function(){this.isGroup?this.columns.forEach(function(t){t.reRegisterPosition()}):this.registerColumnPosition(this)},s.prototype._buildHeader=function(){var t,e,o,i=this,n=i.definition;i.element.empty(),i.contentElement=i._buildColumnHeaderContent(),i.element.append(i.contentElement),i.isGroup?i._buildGroupHeader():i._buildColumnHeader();var s=n.headerTooltip||!1===n.tooltip?n.headerTooltip:i.table.options.tooltipsHeader;s?!0===s?n.field?i.table.extensions.localize.bind("columns."+n.field,function(t){i.element.attr("title",t||n.title)}):i.element.attr("title",n.title):("function"==typeof s&&(s=s(i.getComponent())),i.element.attr("title",s)):i.element.attr("title",""),i.table.options.resizableColumns&&i.table.extExists("resizeColumns")&&i.table.extensions.resizeColumns.initializeColumn("header",i,i.element),n.headerFilter&&i.table.extExists("filter")&&i.table.extExists("edit")&&(void 0!==n.headerFilterPlaceholder&&n.field&&i.table.extensions.localize.setHeaderFilterColumnPlaceholder(n.field,n.headerFilterPlaceholder),i.table.extensions.filter.initializeColumn(i)),i.table.extExists("frozenColumns")&&i.table.extensions.frozenColumns.initializeColumn(i),i.table.options.movableColumns&&!i.isGroup&&i.table.extExists("moveColumn")&&i.table.extensions.moveColumn.initializeColumn(i),(n.topCalc||n.bottomCalc)&&i.table.extExists("columnCalcs")&&i.table.extensions.columnCalcs.initializeColumn(i),"function"==typeof n.headerClick&&i.element.on("click",function(t){n.headerClick(t,i.getComponent())}),"function"==typeof n.headerDblClick&&i.element.on("dblclick",function(t){n.headerDblClick(t,i.getComponent())}),"function"==typeof n.headerContext&&i.element.on("contextmenu",function(t){n.headerContext(t,i.getComponent())}),"function"==typeof n.headerTap&&(o=!1,i.element.on("touchstart",function(t){o=!0}),i.element.on("touchend",function(t){o&&n.headerTap(t,i.getComponent()),o=!1})),"function"==typeof n.headerDblTap&&(t=null,i.element.on("touchend",function(e){t?(clearTimeout(t),t=null,n.headerDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),"function"==typeof n.headerTapHold&&(e=null,i.element.on("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,n.headerTapHold(t,i.getComponent())},1e3)}),i.element.on("touchend",function(t){clearTimeout(e),e=null})),"function"==typeof n.cellClick&&(i.cellEvents.cellClick=n.cellClick),"function"==typeof n.cellDblClick&&(i.cellEvents.cellDblClick=n.cellDblClick),"function"==typeof n.cellContext&&(i.cellEvents.cellContext=n.cellContext),"function"==typeof n.cellTap&&(i.cellEvents.cellTap=n.cellTap),"function"==typeof n.cellDblTap&&(i.cellEvents.cellDblTap=n.cellDblTap),"function"==typeof n.cellTapHold&&(i.cellEvents.cellTapHold=n.cellTapHold)},s.prototype._buildColumnHeader=function(){var t=this,e=t.definition,o=t.table;o.extExists("sort")&&o.extensions.sort.initializeColumn(t,t.contentElement),o.extExists("format")&&o.extensions.format.initializeColumn(t),void 0!==e.editor&&o.extExists("edit")&&o.extensions.edit.initializeColumn(t),void 0!==e.validator&&o.extExists("validate")&&o.extensions.validate.initializeColumn(t),void 0!==e.mutator&&o.extExists("mutator")&&o.extensions.mutator.initializeColumn(t),void 0!==e.accessor&&o.extExists("accessor")&&o.extensions.accessor.initializeColumn(t),void 0!==e.visible&&(e.visible?t.show():t.hide()),e.cssClass&&t.element.addClass(e.cssClass),t.setMinWidth(void 0===e.minWidth?t.table.options.columnMinWidth:e.minWidth),t.reinitializeWidth(),t.tooltip=t.definition.tooltip||!1===t.definition.tooltip?t.definition.tooltip:t.table.options.tooltips,t.hozAlign=void 0===t.definition.align?"":t.definition.align},s.prototype._buildColumnHeaderContent=function(){var e=this,o=(e.definition,e.table,t("
"));return o.append(e._buildColumnHeaderTitle()),o},s.prototype._buildColumnHeaderTitle=function(){var e=this,o=e.definition,i=e.table,n=t("
");if(o.editableTitle){var s=t("");s.on("click",function(e){e.stopPropagation(),t(this).focus()}),s.on("change",function(){var n=t(this).val();o.title=n,i.options.columnTitleChanged(e.getComponent())}),n.append(s),o.field?i.extensions.localize.bind("columns."+o.field,function(t){s.val(t||o.title||" ")}):s.val(o.title||" ")}else o.field?i.extensions.localize.bind("columns."+o.field,function(t){e._formatColumnHeaderTitle(n,t||o.title||" ")}):e._formatColumnHeaderTitle(n,o.title||" ");return n},s.prototype._formatColumnHeaderTitle=function(t,e){var o,i;this.definition.titleFormatter&&this.table.extExists("format")?(o=this.table.extensions.format.getFormatter(this.definition.titleFormatter),i=o.call(this.table.extensions.format,{getValue:function(){return e},getElement:function(){return t}},this.definition.titleFormatterParams||{}),t.append(i)):t.html(e)},s.prototype._buildGroupHeader=function(){var t=this,e=t.definition;t.table;t.element.addClass("tabulator-col-group").attr("role","columngroup").attr("aria-title",e.title),t.element.append(t.groupElement)},s.prototype._getFlatData=function(t){return t[this.field]},s.prototype._getNestedData=function(t){for(var e,o=t,i=this.fieldStructure,n=i.length,s=0;se&&(e=o)}),e&&t.setWidthActual(e+1))},s.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},s.prototype.getComponent=function(){return new n(this)};var a=function(e){this.table=e,this.element=t("
"),this.tableElement=t("
"),this.columnManager=null,this.height=0,this.firstRender=!1,this.renderMode="classic",this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[],this._initialize()};a.prototype.getElement=function(){return this.element},a.prototype.getTableElement=function(){return this.tableElement},a.prototype.setColumnManager=function(t){this.columnManager=t},a.prototype._initialize=function(){var t=this;t.element.append(t.tableElement),t.firstRender=!0,t.element.scroll(function(){var e=t.element[0].scrollLeft;t.scrollLeft!=e&&(t.columnManager.scrollHorizontal(e),t.table.options.groupBy&&t.table.extensions.groupRows.scrollHeaders(e),t.table.extExists("columnCalcs")&&t.table.extensions.columnCalcs.scrollHorizontal(e)),t.scrollLeft=e}),t.table.options.height&&t.table.options.virtualDom&&t.element.scroll(function(){var e=t.element[0].scrollTop,o=t.scrollTop>e;t.scrollTop!=e?(t.scrollTop=e,t.scrollVertical(o)):t.scrollTop=e})},a.prototype.findRow=function(t){var e=this;if("object"!=(void 0===t?"undefined":_typeof(t))){return e.rows.find(function(o){return o.data[e.table.options.index]==t})||!1}if(t instanceof l)return t;if(t instanceof r)return t._getSelf()||!1;if(t instanceof jQuery){return e.rows.find(function(e){return e.element===t})||!1}return!1},a.prototype.scrollToRow=function(t){var e;if((e=this.displayRows.indexOf(t))>-1)switch(this.renderMode){case"classic":this.element.scrollTop(t.element.offset().top-this.element.offset().top+this.element.scrollTop());break;case"virtual":this._virtualRenderFill(e,!0)}else console.warn("Scroll Error - Row not visible")},a.prototype.setData=function(t){var e=this;e.table.options.dataLoading(t),e.rows=[],this.table.options.history&&this.table.extExists("history")&&this.table.extensions.history.clear(),Array.isArray(t)?(this.table.extExists("selectRow")&&this.table.extensions.selectRow.clearSelectionData(),t.forEach(function(t,o){var i=new l(t,e);e.rows.push(i)}),e.table.options.dataLoaded(t),e.refreshActiveData(!0)):console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ",void 0===t?"undefined":_typeof(t),"\nData: ",t)},a.prototype.deleteRow=function(t){var e=this.rows.indexOf(t),o=this.activeRows.indexOf(t),i=this.displayRows.indexOf(t);i>-1&&this.displayRows.splice(i,1),o>-1&&this.activeRows.splice(o,1),e>-1&&this.rows.splice(e,1),this.setActiveRows(this.activeRows),this.setDisplayRows(this.displayRows),this.table.options.rowDeleted(t.getComponent()),this.table.options.dataEdited(this.getData()),this.table.options.pagination&&this.table.extExists("page")?this.refreshActiveData():this.renderTable()},a.prototype.addRow=function(t,e,o){var i=this.addRowActual(t,e,o);return this.table.options.history&&this.table.extExists("history")&&this.table.extensions.history.action("rowAdd",i,{data:t,pos:e,index:o}),i},a.prototype.addRows=function(t,e,o){var i=this,n=[];return e=this.findAddRowPos(e),Array.isArray(t)||(t=[t]),(void 0===o&&e||void 0!==o&&!e)&&t.reverse(),t.forEach(function(t){var s=i.addRow(t,e,o);n.push(s.getComponent())}),n},a.prototype.findAddRowPos=function(t){return void 0===t&&(t=this.table.options.addRowPos),"pos"===t&&(t=!0),"bottom"===t&&(t=!1),t},a.prototype.addRowActual=function(t,e,o){var i=t||{},n=new l(i,this),s=this.findAddRowPos(e);if(o&&(o=this.findRow(o)),o){var a=this.rows.indexOf(o),r=this.activeRows.indexOf(o),u=this.displayRows.indexOf(o);u>-1&&this.displayRows.splice(s?u:u+1,0,n),r>-1&&this.activeRows.splice(s?r:r+1,0,n),a>-1&&this.rows.splice(s?a:a+1,0,n)}else s?(this.displayRows.unshift(n),this.activeRows.unshift(n),this.rows.unshift(n)):(this.displayRows.push(n),this.activeRows.push(n),this.rows.push(n));return this.setDisplayRows(this.displayRows),this.setActiveRows(this.activeRows),this.table.options.rowAdded(n.getComponent()),this.table.options.dataEdited(this.getData()),this.renderTable(),n},a.prototype.moveRow=function(t,e,o){this._moveRowInArray(this.rows,t,e,o),this._moveRowInArray(this.activeRows,t,e,o),this._moveRowInArray(this.displayRows,t,e,o),this.table.options.rowMoved(t.getComponent())},a.prototype._moveRowInArray=function(t,e,o,i){var n,s,a,r=t.indexOf(e);if(r>-1&&(t.splice(r,1),n=t.indexOf(o),n>-1?i?t.splice(n+1,0,e):t.splice(n,0,e):t.splice(r,0,e)),t===this.displayRows){s=rr?n:r+1;for(var l=s;l<=a;l++)t[l]&&this.styleRow(t[l],l)}},a.prototype.clearData=function(){this.setData([])},a.prototype.getRowIndex=function(t){return this.findRowIndex(t,this.rows)},a.prototype.getDisplayRowIndex=function(t){return this.findRowIndex(t,this.displayRows)},a.prototype.nextDisplayRow=function(t){var e=this.getDisplayRowIndex(t),o=!1;return!1!==e&&e-1)&&o},a.prototype.getData=function(t){var e=this,o=[];return(t?e.activeRows:e.rows).forEach(function(t){o.push(t.getData(!0))}),o},a.prototype.getHtml=function(t){var e=this.getData(t),o=this.table.columnManager.getComponents(),i="",n="";return o.forEach(function(t){var e=t.getDefinition();t.getVisibility()&&(i+=""+e.title+"")}),e.forEach(function(t){var e="";o.forEach(function(o){var i=void 0===t[o.getField()]?"":t[o.getField()];o.getVisibility()&&(e+=""+i+"")}),n+=""+e+""}),"\n\n \t\t\t\t\n\n \t\t\t\t"+i+"\n\n \t\t\t\t\n\n \t\t\t\t"+n+"\n\n \t\t\t\t
"},a.prototype.getComponents=function(t){var e=this,o=[];return(t?e.activeRows:e.rows).forEach(function(t){o.push(t.getComponent())}),o},a.prototype.getDataCount=function(t){return t?this.rows.length:this.activeRows.length},a.prototype._genRemoteRequest=function(){var t=this,e=t.table,o=e.options,i={};if(e.extExists("page")){if(o.ajaxSorting){var n=t.table.extensions.sort.getSort();n.forEach(function(t){delete t.column}),i[t.table.extensions.page.paginationDataSentNames.sorters]=n}if(o.ajaxFiltering){var s=t.table.extensions.filter.getFilters(!0,!0);i[t.table.extensions.page.paginationDataSentNames.filters]=s}t.table.extensions.ajax.setParams(i,!0)}e.extensions.ajax.sendRequest(function(e){t.setData(e)})},a.prototype.filterRefresh=function(){var t=this.table,e=t.options;e.ajaxFiltering?"remote"==e.pagination&&t.extExists("page")?(t.extensions.page.reset(!0),t.extensions.page.setPage(1)):this._genRemoteRequest():this.refreshActiveData()},a.prototype.sorterRefresh=function(){var t=this.table,e=this.table.options,o=this.scrollLeft;e.ajaxSorting?"remote"==e.pagination&&t.extExists("page")?(t.extensions.page.reset(!0),t.extensions.page.setPage(1)):this._genRemoteRequest():this.refreshActiveData(),this.element.scrollLeft(o)},a.prototype.refreshActiveData=function(t){var e=this,o=this.table;o.options.selectable&&!o.options.selectablePersistence&&o.extExists("selectRow")&&o.extensions.selectRow.deselectRows(),o.extExists("filter")?(o.extensions.filter.hasChanged()||t)&&(e.setActiveRows(o.extensions.filter.filter(e.rows)),t=!0):e.setActiveRows(e.rows.slice(0)),o.extExists("sort")&&(o.extensions.sort.hasChanged()||t)&&(o.extensions.sort.sort(),t=!0),o.options.groupBy&&o.extExists("groupRows")?(e.setDisplayRows(o.extensions.groupRows.getRows(this.activeRows,t)),o.options.pagination&&console.warn("Invalid Setup Combination - Pagination and Row Grouping cannot be enabled at the same time")):o.options.pagination&&o.extExists("page")?("local"==o.extensions.page.getMode()&&(t&&o.extensions.page.reset(),o.extensions.page.setMaxRows(this.activeRows.length)),e.setDisplayRows(o.extensions.page.getRows(this.activeRows))):e.setDisplayRows(e.activeRows.slice(0)),e.element.is(":visible")&&e.renderTable(),o.extExists("columnCalcs")&&o.extensions.columnCalcs.recalc(this.displayRows)},a.prototype.setActiveRows=function(t){this.activeRows=t,this.activeRowsCount=this.activeRows.length},a.prototype.setDisplayRows=function(t){this.displayRows=t,this.displayRowsCount=this.displayRows.length},a.prototype.getRows=function(){return this.rows},a.prototype.renderTable=function(){var t=this;t.table.options.renderStarted(),t.element.scrollTop(0),t.height&&t.table.options.virtualDom&&!t.table.options.pagination?(t.renderMode="virtual",t._virtualRenderFill()):(t.renderMode="classic",t._simpleRender()),t.firstRender&&(t.displayRowsCount?(t.firstRender=!1,t.table.extensions.layout.layout()):t.renderEmptyScroll()),t.table.extExists("frozenColumns")&&t.table.extensions.frozenColumns.layout(),t.displayRowsCount||t.table.options.placeholder&&t.getElement().append(t.table.options.placeholder),t.table.options.renderComplete()},a.prototype.getRenderMode=function(){return this.renderMode},a.prototype._simpleRender=function(){var t=this,e=this.tableElement;t._clearVirtualDom(),t.displayRowsCount?t.displayRows.forEach(function(o,i){t.styleRow(o,i),e.append(o.getElement()),o.initialize(!0)}):t.renderEmptyScroll()},a.prototype.renderEmptyScroll=function(){var t=this;t.tableElement.css({"min-width":t.table.columnManager.getWidth(),"min-height":"1px",visibility:"hidden"})},a.prototype._clearVirtualDom=function(){var t=this.tableElement;this.table.options.placeholder&&this.table.options.placeholder.detach(),t.children().detach(),t.css({"padding-top":"","padding-bottom":"","min-width":"","min-height":"",visibility:""}),this.scrollTop=0,this.scrollLeft=0,this.vDomTop=0,this.vDomBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0},a.prototype.styleRow=function(t,e){e%2?t.element.addClass("tabulator-row-even").removeClass("tabulator-row-odd"):t.element.addClass("tabulator-row-odd").removeClass("tabulator-row-even")},a.prototype._virtualRenderFill=function(t,e){var o=this,i=o.tableElement,n=o.element,s=0,a=0,r=0,l=0;if(t=t||0){i.children().detach();var u=(o.displayRowsCount-t)*o.vDomRowHeight;uthis.element[0].offsetWidt&&(this.scrollTop+=this.element[0].offsetHeight-this.element[0].clientHeight),this.vDomScrollPosTop=this.scrollTop, +this.vDomScrollPosBottom=this.scrollTop,n.scrollTop(this.scrollTop),o.table.options.groupBy&&"fitDataFill"!=o.table.extensions.layout.getMode()&&o.displayRowsCount==o.table.extensions.groupRows.countGroups()&&o.tableElement.css({"min-width":o.table.columnManager.getWidth()})}else this.renderEmptyScroll()},a.prototype.scrollVertical=function(t){var e=this.scrollTop-this.vDomScrollPosTop,o=this.scrollTop-this.vDomScrollPosBottom,i=2*this.vDomWindowBuffer;-e>i||o>i?this._virtualRenderFill(Math.floor(this.element[0].scrollTop/this.element[0].scrollHeight*this.displayRowsCount)):t?(e<0&&this._addTopRow(-e),e<0&&this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer&&this._removeBottomRow(-o)):(e>=0&&this.scrollTop>this.vDomWindowBuffer&&this._removeTopRow(e),o>=0&&this._addBottomRow(o))},a.prototype._addTopRow=function(t){var e=arguments.length>1&&arguments[1]!==o?arguments[1]:0,i=this.tableElement;if(this.vDomTop){var n=this.vDomTop-1,s=this.displayRows[n],a=s.getHeight()||this.vDomRowHeight;t>=a&&(this.styleRow(s,n),i.prepend(s.getElement()),s.initialized&&s.heightInitialized||(this.vDomTopNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomTopPad-=a,this.vDomTopPad<0&&(this.vDomTopPad=(this.vDomTop-1)*this.vDomRowHeight),i[0].style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=a,this.vDomTop--),t=-(this.scrollTop-this.vDomScrollPosTop),e=(this.displayRows[this.vDomTop-1].getHeight()||this.vDomRowHeight)?this._addTopRow(t,e+1):this._quickNormalizeRowHeight(this.vDomTopNewRows)}},a.prototype._removeTopRow=function(t){var e=this.tableElement,o=this.displayRows[this.vDomTop],i=o.getHeight()||this.vDomRowHeight;t>=i&&(o.element.detach(),this.vDomTopPad+=i,e[0].style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?i:i+this.vDomWindowBuffer,this.vDomTop++,t=this.scrollTop-this.vDomScrollPosTop,this._removeTopRow(t))},a.prototype._addBottomRow=function(t){var e=arguments.length>1&&arguments[1]!==o?arguments[1]:0,i=this.tableElement;if(this.vDomBottom=a&&(this.styleRow(s,n),i.append(s.getElement()),s.initialized&&s.heightInitialized||(this.vDomBottomNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomBottomPad-=a,(this.vDomBottomPad<0||n==this.displayRowsCount-1)&&(this.vDomBottomPad=0),i[0].style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=a,this.vDomBottom++),t=this.scrollTop-this.vDomScrollPosBottom,e=(this.displayRows[this.vDomBottom+1].getHeight()||this.vDomRowHeight)?this._addBottomRow(t,e+1):this._quickNormalizeRowHeight(this.vDomBottomNewRows)}},a.prototype._removeBottomRow=function(t){var e=this.tableElement,o=this.displayRows[this.vDomBottom],i=o.getHeight()||this.vDomRowHeight;t>=i&&(o.element.detach(),this.vDomBottomPad+=i,this.vDomBottomPad<0&&this.vDomBottomPad,e[0].style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=i,this.vDomBottom--,t=-(this.scrollTop-this.vDomScrollPosBottom),this._removeBottomRow(t))},a.prototype._quickNormalizeRowHeight=function(t){t.forEach(function(t){t.calcHeight()}),t.forEach(function(t){t.setCellHeight()}),t.length=0},a.prototype.normalizeHeight=function(){this.displayRows.forEach(function(t){t.normalizeHeight()})},a.prototype.adjustTableSize=function(){var t=this;if(t.table.options.height){var e=t.columnManager.getElement().outerHeight()+(t.table.footerManager?t.table.footerManager.getElement().outerHeight():0);t.element.css({"min-height":"calc(100% - "+e+"px)",height:"calc(100% - "+e+"px)","max-height":"calc(100% - "+e+"px)"}),t.height=t.element.innerHeight(),t.vDomWindowBuffer=t.table.options.virtualDomBuffer||t.height}},a.prototype.reinitialize=function(){this.rows.forEach(function(t){t.reinitialize()})},a.prototype.redraw=function(t){("virtual"==this.renderMode&&this.adjustTableSize(),t)?this.renderTable():("simple"==self.renderMode?this._simpleRender():(Math.floor(this.element.scrollTop()/this.element[0].scrollHeight*this.displayRowsCount),this._virtualRenderFill(0)),this.displayRowsCount||this.table.options.placeholder&&this.getElement().append(this.table.options.placeholder))},a.prototype.resetScroll=function(){this.element.scrollLeft(0),this.element.scrollTop(0),this.element.scroll()};var r=function(t){this.row=t};r.prototype.getData=function(){return this.row.getData(!0)},r.prototype.getElement=function(){return this.row.getElement()},r.prototype.getCells=function(){var t=[];return this.row.getCells().forEach(function(e){t.push(e.getComponent())}),t},r.prototype.getCell=function(t){return this.row.getCell(t).getComponent()},r.prototype.getIndex=function(){return this.row.getData(!0)[this.row.table.options.index]},r.prototype.delete=function(){this.row.delete()},r.prototype.scrollTo=function(){this.row.table.rowManager.scrollToRow(this.row)},r.prototype.update=function(t){this.row.updateData(t)},r.prototype.normalizeHeight=function(){this.row.normalizeHeight(!0)},r.prototype.select=function(){this.row.selectRows(this.row)},r.prototype.deselect=function(){this.row.deselectRows(this.row)},r.prototype.toggleSelect=function(){this.row.toggleRow(this.row)},r.prototype._getSelf=function(){return this.row};var l=function(e,o){this.table=o.table,this.parent=o,this.data={},this.type="row",this.element=t("
"),this.extensions={},this.cells=[],this.height=0,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.setData(e),this.generateElement()};l.prototype.getElement=function(){return this.element},l.prototype.generateElement=function(){var t,e,o,i=this;!1!==i.table.options.selectable&&i.table.extExists("selectRow")&&i.table.extensions.selectRow.initializeRow(this),!1!==i.table.options.movableRows&&i.table.extExists("moveRow")&&i.table.extensions.moveRow.initializeRow(this),i.table.options.rowClick&&i.element.on("click",function(t){i.table.options.rowClick(t,i.getComponent())}),i.table.options.rowDblClick&&i.element.on("dblclick",function(t){i.table.options.rowDblClick(t,i.getComponent())}),i.table.options.rowContext&&i.element.on("contextmenu",function(t){i.table.options.rowContext(t,i.getComponent())}),i.table.options.rowTap&&(o=!1,i.element.on("touchstart",function(t){o=!0}),i.element.on("touchend",function(t){o&&i.table.options.rowTap(t,i.getComponent()),o=!1})),i.table.options.rowDblTap&&(t=null,i.element.on("touchend",function(e){t?(clearTimeout(t),t=null,i.table.options.rowDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),i.table.options.rowTapHold&&(e=null,i.element.on("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,i.table.options.rowTapHold(t,i.getComponent())},1e3)}),i.element.on("touchend",function(t){clearTimeout(e),e=null}))},l.prototype.generateCells=function(){this.cells=this.table.columnManager.generateCells(this)},l.prototype.initialize=function(t){var e=this;e.initialized&&!t||(e.deleteCells(),e.element.empty(),this.table.extExists("frozenColumns")&&this.table.extensions.frozenColumns.layoutRow(this),this.generateCells(),e.cells.forEach(function(t){e.element.append(t.getElement())}),t&&e.normalizeHeight(),e.table.options.rowFormatter&&e.table.options.rowFormatter(e.getComponent()),e.initialized=!0)},l.prototype.reinitializeHeight=function(){this.heightInitialized=!1,null!==this.element[0].offsetParent&&this.normalizeHeight(!0)},l.prototype.reinitialize=function(){this.initialized=!1,this.heightInitialized=!1,this.height=0,null!==this.element[0].offsetParent&&this.initialize(!0)},l.prototype.calcHeight=function(){this.height=this.element[0].clientHeight,this.outerHeight=this.element[0].offsetHeight},l.prototype.setCellHeight=function(){var t=this.height;this.cells.forEach(function(e){e.setHeight(t)}),this.heightInitialized=!0},l.prototype.clearCellHeight=function(){this.cells.forEach(function(t){t.clearHeight()})},l.prototype.normalizeHeight=function(t){t&&this.clearCellHeight(),this.calcHeight(),this.setCellHeight()},l.prototype.setHeight=function(t,e){(this.height!=t||e)&&(this.height=t,this.setCellHeight(),this.outerHeight=this.element[0].offsetHeight)},l.prototype.getHeight=function(){return this.outerHeight},l.prototype.getWidth=function(){return this.element.outerWidth()},l.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},l.prototype.setData=function(t){var e=this;e.table.extExists("mutator")?e.data=e.table.extensions.mutator.transformRow(t):e.data=t},l.prototype.updateData=function(t){var e=this;e.table.extExists("mutator")&&(t=e.table.extensions.mutator.transformRow(t));for(var o in t)e.data[o]=t[o];for(var o in t){var i=this.getCell(o);i&&i.getValue()!=t[o]&&i.setValueProcessData(t[o])}this.element.is(":visible")?(e.normalizeHeight(),e.table.options.rowFormatter&&e.table.options.rowFormatter(e.getComponent())):(this.initialized=!1,this.height=0),e.table.options.rowUpdated(e.getComponent())},l.prototype.getData=function(t){var e=this;return t?e.table.extExists("accessor")?e.table.extensions.accessor.transformRow(e.data):void 0:this.data},l.prototype.getCell=function(t){var t=this.table.columnManager.findColumn(t);return this.cells.find(function(e){return e.column===t})},l.prototype.getCellIndex=function(t){return this.cells.findIndex(function(e){return e===t})},l.prototype.findNextEditableCell=function(t){var e=!1;if(t0)for(var o=t-1;o>=0;o--){var i=this.cells[o],n=!0;if(i.column.extensions.edit&&i.getElement().is(":visible")&&("function"==typeof i.column.extensions.edit.check&&(n=i.column.extensions.edit.check(i.getComponent())),n)){e=i;break}}return e},l.prototype.getCells=function(){return this.cells},l.prototype.delete=function(){var t=this.table.rowManager.getRowIndex(this);this.deleteActual(),this.table.options.history&&this.table.extExists("history")&&(t&&(t=this.table.rowManager.rows[t-1]),this.table.extensions.history.action("rowDelete",this,{data:this.getData(),pos:!t,index:t}))},l.prototype.deleteActual=function(){this.table.rowManager.deleteRow(this),this.deleteCells()},l.prototype.deleteCells=function(){for(var t=this.cells.length,e=0;e"),this.links=[],this._initialize()};h.prototype._initialize=function(t){this.table.options.footerElement&&(this.element=this.table.options.footerElement)},h.prototype.getElement=function(){return this.element},h.prototype.append=function(t,e){this.activate(e),this.element.append(t),this.table.rowManager.adjustTableSize()},h.prototype.prepend=function(t,e){this.activate(e),this.element.prepend(t),this.table.rowManager.adjustTableSize()},h.prototype.remove=function(t){t.remove(),this.deactivate()},h.prototype.deactivate=function(t){(this.element.is(":empty")||t)&&(this.element.remove(),this.active=!1)},h.prototype.activate=function(t){this.active||(this.active=!0,this.table.element.append(this.getElement()),this.table.element.show()),t&&this.links.push(t)},h.prototype.redraw=function(){this.links.forEach(function(t){t.footerRedraw()})},window.Tabulator={columnManager:null,rowManager:null,footerManager:null,browser:"",browserSlow:!1,options:{height:!1,layout:"fitData",fitColumns:!1,columnMinWidth:40,columnVertAlign:"top",resizableColumns:!0,columns:[],data:[],tooltips:!1,tooltipsHeader:!1,initialSort:!1,footerElement:!1,index:"id",keybindings:[],downloadDataMutator:!1,addRowPos:"bottom",selectable:"highlight",selectableRollingSelection:!0,selectablePersistence:!0,selectableCheck:function(t,e){return!0},headerFilterPlaceholder:!1,history:!1,locale:!1,langs:{},virtualDom:!0,persistentLayout:!1,persistentLayoutID:"",responsiveLayout:!1,pagination:!1,paginationSize:!1,paginationElement:!1,paginationDataSent:{},paginationDataReceived:{},paginator:!1,ajaxURL:!1,ajaxParams:{},ajaxConfig:"get",ajaxLoader:!0,ajaxLoaderLoading:!1,ajaxLoaderError:!1,ajaxFiltering:!1,ajaxSorting:!1,groupBy:!1,groupStartOpen:!0,groupHeader:!1,movableColumns:!1,movableRows:!1,rowFormatter:!1,placeholder:!1,tableBuilding:function(){},tableBuilt:function(){},renderStarted:function(){},renderComplete:function(){},rowClick:!1,rowDblClick:!1,rowContext:!1,rowTap:!1,rowDblTap:!1,rowTapHold:!1,rowAdded:function(){},rowDeleted:function(){},rowMoved:function(){},rowUpdated:function(){},rowSelectionChanged:function(){},rowSelected:function(){},rowDeselected:function(){},cellEditing:function(){},cellEdited:function(){},cellEditCancelled:function(){},columnMoved:function(){},columnResized:function(){},columnTitleChanged:function(){},columnVisibilityChanged:function(){},htmlImporting:function(){},htmlImported:function(){},dataLoading:function(){},dataLoaded:function(){},dataEdited:function(){},ajaxRequesting:function(){},ajaxResponse:!1,ajaxError:function(){},dataFiltering:!1,dataFiltered:!1,dataSorting:function(){},dataSorted:function(){},groupToggleElement:"arrow",groupClosedShowCalcs:!1,dataGrouping:function(){},dataGrouped:!1,groupVisibilityChanged:function(){},groupClick:!1,groupDblClick:!1,groupContext:!1,groupTap:!1,groupDblTap:!1,groupTapHold:!1,pageLoaded:function(){},localized:function(){},validationFailed:function(){}},_mapDepricatedFunctionality:function(){this.options.fitColumns&&(this.options.layout="fitColumns",console.warn("The%c fitColumns:true%c option has been depricated and will be removed in version 4.0, use %c layout:'fitColumns'%c instead.","font-weight:bold;","font-weight:regular;","font-weight:bold;","font-weight:regular;"))},_create:function(){var t=this,e=this.element;t._mapDepricatedFunctionality(),t.bindExtensions(),e.is("table")?this.extExists("htmlTableImport",!0)&&t.extensions.htmlTableImport.parseTable():(t.columnManager=new i(t),t.rowManager=new a(t),t.footerManager=new h(t),t.columnManager.setRowManager(t.rowManager),t.rowManager.setColumnManager(t.columnManager),t._buildElement(),this._loadInitialData())},_buildElement:function(){var e=this.element,o=this.extensions,i=this.options;i.tableBuilding(),e.addClass("tabulator").attr("role","grid").empty(),this._detectBrowser(),this.extExists("layout",!0)&&o.layout.initialize(i.layout),!1!==i.headerFilterPlaceholder&&o.localize.setHeaderFilterPlaceholder(i.headerFilterPlaceholder);for(var n in i.langs)o.localize.installLang(n,i.langs[n]);o.localize.setLocale(i.locale),"string"==typeof i.placeholder&&(i.placeholder=t("
"+i.placeholder+"
")),i.height&&(i.height=isNaN(i.height)?i.height:i.height+"px",this.element.css({height:i.height})),e.append(this.columnManager.getElement()),e.append(this.rowManager.getElement()),i.footerElement&&this.footerManager.activate(),i.persistentLayout&&this.extExists("persistentLayout",!0)&&(o.persistentLayout.initialize(i.persistentLayout,i.persistentLayoutID),i.columns=o.persistentLayout.load(i.columns)),this.extExists("columnCalcs")&&o.columnCalcs.initialize(),this.columnManager.setColumns(i.columns),i.initialSort&&this.extExists("sort",!0)&&o.sort.setSort(i.initialSort),i.pagination&&this.extExists("page",!0)&&o.page.initialize(),i.groupBy&&this.extExists("groupRows",!0)&&o.groupRows.initialize(),this.extExists("ajax")&&o.ajax.initialize(),this.extExists("keybindings")&&o.keybindings.initialize(),this.extExists("selectRow")&&o.selectRow.clearSelectionData(),i.tableBuilt()},_loadInitialData:function(){var t=this;t.options.pagination&&t.extExists("page")?(t.extensions.page.reset(!0),t.extensions.page.setPage(1),"local"==t.options.pagination&&t.rowManager.setData(t.options.data)):t.options.data.length?t.rowManager.setData(t.options.data):t.options.ajaxURL&&t.extExists("ajax")?t.extensions.ajax.sendRequest(function(e){t.rowManager.setData(e)}):t.rowManager.setData(t.options.data)},_setOption:function(t,e){console.error("Options Error - Tabulator does not allow options to be set after initialization unless there is a function defined for that purpose")},_destroy:function(){var t=this.element;t.empty(),t.removeClass("tabulator")},_detectBrowser:function(){var t=navigator.userAgent;t.indexOf("Trident")>-1?(this.brower="ie",this.browserSlow=!0):t.indexOf("Edge")>-1?(this.brower="edge",this.browserSlow=!0):(this.brower="other",this.browserSlow=!1)},setData:function(t,e,o){var i=this,i=this;"string"==typeof t?0==t.indexOf("{")||0==t.indexOf("[")?i.rowManager.setData(JSON.parse(t)):i.extExists("ajax",!0)&&(e&&i.extensions.ajax.setParams(e),o&&i.extensions.ajax.setConfig(o),i.extensions.ajax.setUrl(t),"remote"==i.options.pagination&&i.extExists("page",!0)?(i.extensions.page.reset(!0),i.extensions.page.setPage(1)):i.extensions.ajax.sendRequest(function(t){i.rowManager.setData(t)})):t?i.rowManager.setData(t):i.extExists("ajax")&&i.extensions.ajax.getUrl?"remote"==i.options.pagination&&i.extExists("page",!0)?(i.extensions.page.reset(!0),i.extensions.page.setPage(1)):i.extensions.ajax.sendRequest(function(t){i.rowManager.setData(t)}):i.rowManager.setData([])},clearData:function(){this.rowManager.clearData()},getData:function(t){return this.rowManager.getData(t)},getDataCount:function(t){return this.rowManager.getDataCount(t)},getHtml:function(t){return this.rowManager.getHtml(t)},getAjaxUrl:function(){if(this.extExists("ajax",!0))return this.extensions.ajax.getUrl()},updateData:function(t){var e=this;t?t.forEach(function(t){var o=e.rowManager.findRow(t[e.options.index]);o&&o.updateData(t)}):console.warn("Update Error - No data provided")},addData:function(t,e,o){t?this.rowManager.addRows(t,e,o):console.warn("Update Error - No data provided")},updateOrAddData:function(t){var e=this;t?t.forEach(function(t){var o=e.rowManager.findRow(t[e.options.index]);o?o.updateData(t):e.rowManager.addRow(t)}):console.warn("Update Error - No data provided")},getRow:function(t){var e=this.rowManager.findRow(t);return e?e.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},deleteRow:function(t){var e=this.rowManager.findRow(t);return e?(e.delete(),!0):(console.warn("Delete Error - No matching row found:",t),!1)},addRow:function(t,e,o){return this.rowManager.addRow(t,e,o)},updateOrAddRow:function(t,e){var o=this.rowManager.findRow(t);return o?o.updateData(e):o=this.rowManager.addRow(e),o.getComponent()},updateRow:function(t,e){var o=this.rowManager.findRow(t);return o?(o.updateData(e),o.getComponent()):(console.warn("Update Error - No matching row found:",t),!1)},scrollToRow:function(t){var e=this.rowManager.findRow(t);return e?this.rowManager.scrollToRow(e):(console.warn("Scroll Error - No matching row found:",t),!1)},getRows:function(t){return this.rowManager.getComponents(t)},setColumns:function(t){this.columnManager.setColumns(t)},getColumns:function(){return this.columnManager.getComponents()},getColumnDefinitions:function(){return this.columnManager.getDefinitionTree()},getColumnLayout:function(){if(this.extExists("persistentLayout",!0))return this.extensions.persistentLayout.parseColumns(this.columnManager.getColumns())},setColumnLayout:function(t){return!!this.extExists("persistentLayout",!0)&&(this.columnManager.setColumns(this.extensions.persistentLayout.mergeDefinition(this.options.columns,t)),!0)},showColumn:function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Show Error - No matching column found:",t),!1;e.show()},hideColumn:function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Hide Error - No matching column found:",t),!1;e.hide()},toggleColumn:function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Visibility Toggle Error - No matching column found:",t),!1;e.visible?e.hide():e.show()},addColumn:function(t,e,o){var i=this.columnManager.findColumn(o);this.columnManager.addColumn(t,e,i)},deleteColumn:function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Delete Error - No matching column found:",t),!1;e.delete()},setLocale:function(t){this.extensions.localize.setLocale(t)},getLocale:function(){return this.extensions.localize.getLocale()},getLang:function(t){return this.extensions.localize.getLang(t)},redraw:function(t){this.columnManager.redraw(t),this.rowManager.redraw(t)},setHeight:function(t){this.options.height=isNaN(t)?t:t+"px",this.element.css({height:this.options.height}),this.rowManager.redraw()},setSort:function(t,e){this.extExists("sort",!0)&&(this.extensions.sort.setSort(t,e),this.rowManager.sorterRefresh())},getSort:function(){if(this.extExists("sort",!0))return console.warn("The%c getSort%c function has been depricated and will be removed in version 4.0, use %c getSorters%c instead.","font-weight:bold;","font-weight:regular;","font-weight:bold;","font-weight:regular;"),this.getSorters()},getSorters:function(){if(this.extExists("sort",!0))return this.extensions.sort.getSort()},clearSort:function(){this.extExists("sort",!0)&&(this.extensions.sort.clear(),this.rowManager.sorterRefresh())},setFilter:function(t,e,o){this.extExists("filter",!0)&&(this.extensions.filter.setFilter(t,e,o),this.rowManager.filterRefresh())},addFilter:function(t,e,o){this.extExists("filter",!0)&&(this.extensions.filter.addFilter(t,e,o),this.rowManager.filterRefresh())},getFilter:function(t){console.warn("The%c getFilter%c function has been depricated and will be removed in version 4.0, use %c getFilters%c instead.","font-weight:bold;","font-weight:regular;","font-weight:bold;","font-weight:regular;"),this.getFilters(t)},getFilters:function(t){if(this.extExists("filter",!0))return this.extensions.filter.getFilters(t)},getHeaderFilters:function(){if(this.extExists("filter",!0))return this.extensions.filter.getHeaderFilters()},removeFilter:function(t,e,o){this.extExists("filter",!0)&&(this.extensions.filter.removeFilter(t,e,o),this.rowManager.filterRefresh())},clearFilter:function(t){this.extExists("filter",!0)&&(this.extensions.filter.clearFilter(t),this.rowManager.filterRefresh())},clearHeaderFilter:function(){this.extExists("filter",!0)&&(this.extensions.filter.clearHeaderFilter(),this.rowManager.filterRefresh())},selectRow:function(t){this.extExists("selectRow",!0)&&this.extensions.selectRow.selectRows(t)},deselectRow:function(t){this.extExists("selectRow",!0)&&this.extensions.selectRow.deselectRows(t)},toggleSelectRow:function(t){this.extExists("selectRow",!0)&&this.extensions.selectRow.toggleRow(t)},getSelectedRows:function(){if(this.extExists("selectRow",!0))return this.extensions.selectRow.getSelectedRows()},getSelectedData:function(){if(this.extExists("selectRow",!0))return this.extensions.selectRow.getSelectedData()},setMaxPage:function(t){if(!this.options.pagination||!this.extExists("page"))return!1;this.extensions.page.setMaxPage(t)},setPage:function(t){if(!this.options.pagination||!this.extExists("page"))return!1;this.extensions.page.setPage(t)},setPageSize:function(t){if(!this.options.pagination||!this.extExists("page"))return!1;this.extensions.page.setPageSize(t),this.extensions.page.setPage(1)},getPageSize:function(){if(this.options.pagination&&this.extExists("page",!0))return this.extensions.page.getPageSize()},previousPage:function(){if(!this.options.pagination||!this.extExists("page"))return!1;this.extensions.page.previousPage()},nextPage:function(){if(!this.options.pagination||!this.extExists("page"))return!1;this.extensions.page.nextPage()},getPage:function(){return!(!this.options.pagination||!this.extExists("page"))&&this.extensions.page.getPage()},getPageMax:function(){return!(!this.options.pagination||!this.extExists("page"))&&this.extensions.page.getPageMax()},setGroupBy:function(t){if(!this.extExists("groupRows",!0))return!1;this.options.groupBy=t,this.extensions.groupRows.initialize(),this.rowManager.refreshActiveData()},setGroupStartOpen:function(t){if(!this.extExists("groupRows",!0))return!1;this.options.groupStartOpen=t,this.extensions.groupRows.initialize(),this.options.groupBy?this.rowManager.refreshActiveData():console.warn("Grouping Update - cant refresh view, no groups have been set")},setGroupHeader:function(t){if(!this.extExists("groupRows",!0))return!1;this.options.groupHeader=t,this.extensions.groupRows.initialize(),this.options.groupBy?this.rowManager.refreshActiveData():console.warn("Grouping Update - cant refresh view, no groups have been set")},getGroups:function(t){return!!this.extExists("groupRows",!0)&&this.extensions.groupRows.getGroups()},navigatePrev:function(){var t=!1;return!(!this.table.extExists("edit",!0)||!(t=this.table.extensions.edit.currentCell))&&(e.preventDefault(),t.nav().prev())},navigateNext:function(){var t=!1;return!(!this.table.extExists("edit",!0)||!(t=this.table.extensions.edit.currentCell))&&(e.preventDefault(),t.nav().next())},navigateLeft:function(){var t=!1;return!(!this.table.extExists("edit",!0)||!(t=this.table.extensions.edit.currentCell))&&(e.preventDefault(),t.nav().left())},navigateRight:function(){var t=!1;return!(!this.table.extExists("edit",!0)||!(t=this.table.extensions.edit.currentCell))&&(e.preventDefault(),t.nav().right())},navigateUp:function(){var t=!1;return!(!this.table.extExists("edit",!0)||!(t=this.table.extensions.edit.currentCell))&&(e.preventDefault(),t.nav().up())}, +navigateDown:function(){var t=!1;return!(!this.table.extExists("edit",!0)||!(t=this.table.extensions.edit.currentCell))&&(e.preventDefault(),t.nav().dpwn())},undo:function(){return!(!this.options.history||!this.extExists("history",!0))&&this.extensions.history.undo()},redo:function(){return!(!this.options.history||!this.extExists("history",!0))&&this.extensions.history.redo()},download:function(t,e,o){this.extExists("download",!0)&&this.extensions.download.download(t,e,o)},extensions:{},extensionBindings:{},extendExtension:function(t,e,o){if(this.extensionBindings[t]){var i=this.extensionBindings[t].prototype[e];if(i)if("object"==(void 0===o?"undefined":_typeof(o)))for(var n in o)i[n]=o[n];else console.warn("Extension Error - Invalid value type, it must be an object");else console.warn("Extension Error - property does not exist:",e)}else console.warn("Extension Error - extension does not exist:",t)},registerExtension:function(t,e){this.extensionBindings[t]=e},bindExtensions:function(){var t=this;this.extensions={};for(var e in t.extensionBindings)t.extensions[e]=new t.extensionBindings[e](t)},extExists:function(t,e){return!!this.extensions[t]||(e&&console.error("Tabulator Plugin Not Installed: "+t),!1)}};var p=function(t){this.table=t,this.mode=null};p.prototype.initialize=function(t){this.modes[t]?this.mode=t:(console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : "+t),this.mode="fitData"),this.table.element.attr("tabulator-layout",this.mode)},p.prototype.getMode=function(){return this.mode},p.prototype.layout=function(){this.modes[this.mode].call(this,this.table.columnManager.columnsByIndex)},p.prototype.modes={fitData:function(t){t.forEach(function(t){t.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.extExists("responsiveLayout",!0)&&this.table.extensions.responsiveLayout.update()},fitDataFill:function(t){t.forEach(function(t){t.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.extExists("responsiveLayout",!0)&&this.table.extensions.responsiveLayout.update()},fitColumns:function(t){function e(t,o,i){var n=[],s=0,a=0,r=0,l=0,u=[];return t.forEach(function(t,e){t.minWidth>=i?n.push(t):u.push(t)}),n.length?(n.forEach(function(t){s+=t.minWidth,t.setWidth(t.minWidth)}),a=o-s,r=u.length?Math.floor(a/u.length):a,l=a-r*u.length,l+=e(u,a,r)):(l=u.length?o-Math.floor(o/u.length)*u.length:o,u.forEach(function(t){t.setWidth(i)})),l}var o=this,i=o.table.element.innerWidth(),n=0,s=0,a=0,r=[],l=0;this.table.options.responsiveLayout&&this.table.extExists("responsiveLayout",!0)&&this.table.extensions.responsiveLayout.update(),this.table.rowManager.element[0].scrollHeight>this.table.rowManager.element.innerHeight()&&(i-=this.table.rowManager.element[0].offsetWidth-this.table.rowManager.element[0].clientWidth),t.forEach(function(t){var e,o,s;t.visible&&(e=t.definition.width,o=parseInt(t.minWidth),e?(s="string"==typeof e?e.indexOf("%")>-1?i/100*parseInt(e):parseInt(e):e,n+=s>o?s:o):r.push(t))}),s=i-n,a=Math.floor(s/r.length);var l=e(r,s,a);r.length&&r[r.length-1].setWidth(r[r.length-1].getWidth()+l)}},Tabulator.registerExtension("layout",p);var d=function(t){this.table=t,this.locale="default",this.lang=!1,this.bindings={}};d.prototype.setHeaderFilterPlaceholder=function(t){this.langs.default.headerFilters.default=t},d.prototype.setHeaderFilterColumnPlaceholder=function(t,e){this.langs.default.headerFilters.columns[t]=e,this.lang&&!this.lang.headerFilters.columns[t]&&(this.lang.headerFilters.columns[t]=e)},d.prototype.installLang=function(t,e){this.langs[t]?this._setLangProp(this.langs[t],e):this.langs[t]=e},d.prototype._setLangProp=function(t,e){for(var o in e)t[o]&&"object"==_typeof(t[o])?this._setLangProp(t[o],e[o]):t[o]=e[o]},d.prototype.setLocale=function(e){function o(t,e){for(var i in t)"object"==_typeof(t[i])?(e[i]||(e[i]={}),o(t[i],e[i])):e[i]=t[i]}var i=this;if(e=e||"default",!0===e&&navigator.language&&(e=navigator.language.toLowerCase()),e&&!i.langs[e]){var n=e.split("-")[0];i.langs[n]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",e,n),e=n):(console.warn("Localization Error - Matching locale not found, using default: ",e),e="default")}i.locale=e,i.lang=t.extend(!0,{},i.langs.default),"default"!=e&&o(i.langs[e],i.lang),i.table.options.localized(i.locale,i.lang),i._executeBindings()},d.prototype.getLocale=function(t){return self.locale},d.prototype.getLang=function(t){return t?this.langs[t]:this.lang},d.prototype.getText=function(t,e){var t=e?t+"."+e:t,o=t.split(".");return this._getLangElement(o,this.locale)||""},d.prototype._getLangElement=function(t,e){var o=this,i=o.lang;return t.forEach(function(t){var e;i&&(e=i[t],i=void 0!==e&&e)}),i},d.prototype.bind=function(t,e){this.bindings[t]||(this.bindings[t]=[]),this.bindings[t].push(e),e(this.getText(t),this.lang)},d.prototype._executeBindings=function(){var t=this;for(var e in t.bindings)!function(e){t.bindings[e].forEach(function(o){o(t.getText(e),t.lang)})}(e)},d.prototype.langs={default:{groups:{item:"item",items:"items"},columns:{},ajax:{loading:"Loading",error:"Error"},pagination:{first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page"},headerFilters:{default:"filter column...",columns:{}}}},Tabulator.registerExtension("localize",d);var f=function(t){this.table=t};f.prototype.initializeColumn=function(t){var e={accessor:!1,params:t.definition.accessorParams||{}};switch(_typeof(t.definition.accessor)){case"string":this.accessors[t.definition.accessor]?e.accessor=this.accessors[t.definition.accessor]:console.warn("Accessor Error - No such accessor found, ignoring: ",t.definition.accessor);break;case"function":e.accessor=t.definition.accessor}e.accessor&&(t.extensions.accessor=e)},f.prototype.transformRow=function(e){var o=this,i=t.extend(!0,{},e||{});return o.table.columnManager.traverse(function(t){var e;t.extensions.accessor&&(e=t.getField(),void 0!==i[e]&&t.setFieldValue(i,t.extensions.accessor.accessor(t.getFieldValue(i),i,t.extensions.accessor.params)))}),i},f.prototype.accessors={},Tabulator.registerExtension("accessor",f);var g=function(e){this.table=e,this.config=!1,this.url="",this.params=!1,this.loaderElement=t("
"),this.msgElement=t(""),this.loadingElement=!1,this.errorElement=!1};g.prototype.initialize=function(){this.loaderElement.append(this.msgElement),this.table.options.ajaxLoaderLoading&&(this.loadingElement=this.table.options.ajaxLoaderLoading),this.table.options.ajaxLoaderError&&(this.errorElement=this.table.options.ajaxLoaderError),this.table.options.ajaxParams&&this.setParams(this.table.options.ajaxParams),this.table.options.ajaxConfig&&this.setConfig(this.table.options.ajaxConfig),this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL)},g.prototype.setParams=function(t,e){if(e){this.params=this.params||{};for(var o in t)this.params[o]=t[o]}else this.params=t},g.prototype.getParams=function(){return this.params||{}},g.prototype.setConfig=function(t){if(this._loadDefaultConfig(),"string"==typeof t)this.config.type=t;else for(var e in t)this.config[e]=t[e]},g.prototype._loadDefaultConfig=function(t){var e=this;if(!e.config||t){e.config={};for(var o in e.defaultConfig)e.config[o]=e.defaultConfig[o]}},g.prototype.setUrl=function(t){this.url=t},g.prototype.getUrl=function(){return this.url},g.prototype.sendRequest=function(e){var o=this;if(!o.url)return console.warn("Ajax Load Error - No URL Set"),!1;o._loadDefaultConfig(),o.config.url=o.url,o.params&&(o.config.data=o.params),!1!==o.table.options.ajaxRequesting(o.url,o.params)&&(o.showLoader(),t.ajax(o.config).done(function(t){o.table.options.ajaxResponse&&(t=o.table.options.ajaxResponse(o.url,o.params,t)),o.table.options.dataLoaded(t),e(t),o.hideLoader()}).fail(function(t,e,i){console.error("Ajax Load Error - Connection Error: "+t.status,i),o.table.options.ajaxError(t,e,i),o.showError(),setTimeout(function(){o.hideLoader()},3e3)}))},g.prototype.showLoader=function(){this.loaderElement.detach(),this.msgElement.empty().removeClass("tabulator-error").addClass("tabulator-loading"),this.loadingElement?this.msgElement.append(this.loadingElement):this.msgElement.append(this.table.extensions.localize.getText("ajax.loading")),this.table.element.append(this.loaderElement)},g.prototype.showError=function(){this.loaderElement.detach(),this.msgElement.empty().removeClass("tabulator-loading").addClass("tabulator-error"),this.errorElement?this.msgElement.append(this.errorElement):this.msgElement.append(this.table.extensions.localize.getText("ajax.error")),this.table.element.append(this.loaderElement)},g.prototype.hideLoader=function(){this.loaderElement.detach()},g.prototype.defaultConfig={url:"",type:"GET",async:!0,dataType:"json",success:function(t){}},Tabulator.registerExtension("ajax",g);var m=function(e){this.table=e,this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=t("
"),this.botElement=t("
"),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.initialize()};m.prototype.initialize=function(){this.genColumn=new s({field:"value"},this)},m.prototype.registerColumnField=function(){},m.prototype.initializeColumn=function(t){var e=t.definition,o={topCalcParams:e.topCalcParams||{},botCalcParams:e.bottomCalcParams||{}};if(e.topCalc){switch(_typeof(e.topCalc)){case"string":this.calculations[e.topCalc]?o.topCalc=this.calculations[e.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",e.topCalc);break;case"function":o.topCalc=e.topCalc}o.topCalc&&(t.extensions.columnCalcs=o,this.topCalcs.push(t),this.table.options.groupBy||this.initializeTopRow())}if(e.bottomCalc){switch(_typeof(e.bottomCalc)){case"string":this.calculations[e.bottomCalc]?o.botCalc=this.calculations[e.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",e.bottomCalc);break;case"function":o.botCalc=e.bottomCalc}o.botCalc&&(t.extensions.columnCalcs=o,this.botCalcs.push(t),this.table.options.groupBy||this.initializeBottomRow())}},m.prototype.removeCalcs=function(){var t=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.remove(),t=!0),this.botInitialized&&(this.botInitialized=!1,this.table.footerManager.remove(this.botElement),t=!0),t&&this.table.rowManager.adjustTableSize()},m.prototype.initializeTopRow=function(){this.topInitialized||(this.table.columnManager.element.append(this.topElement),this.topInitialized=!0)},m.prototype.initializeBottomRow=function(){this.botInitialized||(this.table.footerManager.prepend(this.botElement),this.botInitialized=!0)},m.prototype.scrollHorizontal=function(t){this.table.columnManager.element[0].scrollWidth,this.table.element.innerWidth();this.botInitialized&&this.botRow.getElement().css("margin-left",-t)},m.prototype.recalc=function(t){var e;(this.topInitialized||this.botInitialized)&&(this.rowsToData(t),this.topInitialized&&(e=this.generateRow("top",this.rowsToData(t)),this.topRow=e,this.topElement.empty(),this.topElement.append(e.getElement()),e.initialize(!0)),this.botInitialized&&(e=this.generateRow("bottom",this.rowsToData(t)),this.botRow=e,this.botElement.empty(),this.botElement.append(e.getElement()),e.initialize(!0)),this.table.rowManager.adjustTableSize(),this.table.extExists("frozenColumns")&&this.table.extensions.frozenColumns.layout())},m.prototype.recalcRowGroup=function(t){var e,o,i=this.table.extensions.groupRows.getRowGroup(t);i.calcs.bottom&&(e=this.rowsToData(i.rows),o=this.generateRowData("bottom",e),i.calcs.bottom.updateData(o)),i.calcs.top&&(e=this.rowsToData(i.rows),o=this.generateRowData("top",e),i.calcs.top.updateData(o))},m.prototype.generateTopRow=function(t){return this.generateRow("top",this.rowsToData(t))},m.prototype.generateBottomRow=function(t){return this.generateRow("bottom",this.rowsToData(t))},m.prototype.rowsToData=function(t){var e=[];return t.forEach(function(t){e.push(t.getData())}),e},m.prototype.generateRow=function(t,e){var o=this,i=this.generateRowData(t,e),n=new l(i,this);return n.getElement().addClass("tabulator-calcs").addClass("tabulator-calcs-"+t),n.type="calc",n.generateCells=function(){var e=[];o.table.columnManager.columnsByIndex.forEach(function(i){if(i.visible){o.genColumn.setField(i.getField()),o.genColumn.hozAlign=i.hozAlign,i.definition[t+"CalcFormatter"]&&o.table.extExists("format")?o.genColumn.extensions.format={formatter:o.table.extensions.format.getFormatter(i.definition[t+"CalcFormatter"]),params:i.definition[t+"CalcFormatterParams"]}:o.genColumn.extensions.format={formatter:o.table.extensions.format.getFormatter("plaintext"),params:{}};var s=new c(o.genColumn,n);s.column=i,s.setWidth(i.getWidth()),i.cells.push(s),e.push(s)}}),this.cells=e},n},m.prototype.generateRowData=function(t,e){var o={},i="top"==t?this.topCalcs:this.botCalcs,n="top"==t?"topCalc":"botCalc";return i.forEach(function(t){var i=[];t.extensions.columnCalcs&&t.extensions.columnCalcs[n]&&(e.forEach(function(e){i.push(t.getFieldValue(e))}),t.setFieldValue(o,t.extensions.columnCalcs[n](i,e,t.extensions.columnCalcs[n+"Params"])))}),o},m.prototype.hasTopCalcs=function(){return!!this.topCalcs.length},m.prototype.hasBottomCalcs=function(){return!!this.botCalcs.length},m.prototype.redraw=function(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)},m.prototype.calculations={avg:function(t,e,o){var i=0,n=void 0!==o.precision?o.precision:2;return t.length&&(i=t.reduce(function(t,e){return e=Number(e),t+e}),i/=t.length,i=!1!==n?i.toFixed(n):i),parseFloat(i).toString()},max:function(t,e,o){var i=null;return t.forEach(function(t){((t=Number(t))>i||null===i)&&(i=t)}),null!==i?i:""},min:function(t,e,o){var i=null;return t.forEach(function(t){((t=Number(t))");return a.css({padding:"4px",width:"100%","box-sizing":"border-box"}).val(e.getValue()),o(function(){a.focus(),a.css("height","100%")}),a.on("change blur",function(t){a.val()!=e.getValue()?i(a.val()):n()}),a.on("keydown",function(t){13==t.keyCode&&i(a.val()),27==t.keyCode&&n()}),a},textarea:function(e,o,i,n,s){var a=e.getValue(),r=String("null"==typeof a||void 0===a?"":a),l=(r.match(/(?:\r\n|\r|\n)/g),t("")),u=0;return l.css({display:"block",height:"100%",width:"100%",padding:"2px","box-sizing":"border-box","white-space":"pre-wrap",resize:"none"}).val(r),o(function(){l.focus(),l.css("height","100%")}),l.on("change blur",function(t){l.val()!=e.getValue()?(i(l.val()),setTimeout(function(){e.getRow().normalizeHeight()},300)):n()}),l.on("keyup",function(){l.css({height:""});var t=l[0].scrollHeight;l.css({height:t}),t!=u&&(u=t,e.getRow().normalizeHeight())}),l.on("keydown",function(t){27==t.keyCode&&n()}),l},number:function(e,o,i,n,s){var a=t("");return a.css({padding:"4px",width:"100%","box-sizing":"border-box"}).val(e.getValue()),o(function(){a.focus(),a.css("height","100%")}),a.on("blur",function(t){var o=a.val();isNaN(o)||(o=Number(o)),o!=e.getValue()?i(o):n()}),a.on("keydown",function(t){var e;13==t.keyCode&&(e=a.val(),isNaN(e)||(e=Number(e)),i(e)),27==t.keyCode&&n()}),a},star:function(e,o,i,n,s){var a=e.getElement(),r=e.getValue(),l=t("svg",a).length||5,u=t("svg:first",a).attr("width")||14,c=t("
"),h=t(''),p=t(''),d=function(e){t(".tabulator-star-active",e.closest("div")).length!=e.prevAll("svg").length+1&&(e.prevAll("svg").replaceWith(h.clone()),e.nextAll("svg").replaceWith(p.clone()),e.replaceWith(h.clone()))};r=parseInt(r)"),d=function(){var t=c*Math.round(a.outerWidth()/(r.width()/100))+u;i(t),r.attr("aria-valuenow",t).attr("aria-label",h)};return h=parseFloat(h)<=l?parseFloat(h):l,h=parseFloat(h)>=u?parseFloat(h):u,h=100-Math.round((h-u)/c),a=t("
"),r.css({padding:"0 4px"}),r.attr("aria-valuemin",u).attr("aria-valuemax",l),a.append(p),p.on("mousedown",function(t){a.data("mouseDrag",t.screenX),a.data("mouseDragWidth",a.outerWidth())}),p.on("mouseover",function(){t(this).css({cursor:"ew-resize"})}),r.on("mousemove",function(t){a.data("mouseDrag")&&a.css({width:a.data("mouseDragWidth")+(t.screenX-a.data("mouseDrag"))})}),r.on("mouseup",function(t){a.data("mouseDrag")&&(t.stopPropagation(),t.stopImmediatePropagation(),a.data("mouseDragOut",!0),a.data("mouseDrag",!1),a.data("mouseDragWidth",!1),d())}),r.on("keydown",function(t){switch(t.keyCode){case 39:a.css({width:a.width()+r.width()/100});break;case 37:a.css({width:a.width()-r.width()/100});break;case 13:d();break;case 27:n()}}),r.on("blur",function(){n()}),a},tickCross:function(e,o,i,n,s){var a=e.getValue(),r=t("");return r.css({"margin-top":"5px","box-sizing":"border-box"}).val(a),o(function(){r.focus()}),!0===a||"true"===a||"True"===a||1===a?r.prop("checked",!0):r.prop("checked",!1),r.on("change blur",function(t){i(r.is(":checked"))}),r.on("keydown",function(t){13==t.keyCode&&i(r.is(":checked")),27==t.keyCode&&n()}),r},tick:function(e,o,i,n,s){var a=e.getValue(),r=t("");return r.css({"margin-top":"5px","box-sizing":"border-box"}).val(a),o(function(){r.focus()}),!0===a||"true"===a||"True"===a||1===a?r.prop("checked",!0):r.prop("checked",!1),r.on("change blur",function(t){i(r.is(":checked"))}),r.on("keydown",function(t){13==t.keyCode&&i(r.is(":checked")),27==t.keyCode&&n()}),r}},Tabulator.registerExtension("edit",b);var w=function(t){this.table=t,this.filterList=[],this.headerFilters={},this.headerFilterElements=[],this.changed=!1};w.prototype.initializeColumn=function(e){function o(t){var o,i="input"==u&&"text"==c?"partial":"match",n="";if(t){switch(_typeof(e.definition.headerFilterFunc)){case"string":h.filters[e.definition.headerFilterFunc]?(n=e.definition.headerFilterFunc,o=function(o){return h.filters[e.definition.headerFilterFunc](t,e.getFieldValue(o))}):console.warn("Header Filter Error - Matching filter function not found: ",e.definition.headerFilterFunc);break;case"function":o=function(o){return e.definition.headerFilterFunc(t,e.getFieldValue(o),o,e.definition.headerFilterFuncParams||{})},n=o}if(!o)switch(i){case"partial":o=function(o){return String(e.getFieldValue(o)).toLowerCase().indexOf(String(t).toLowerCase())>-1},n="like";break;default:o=function(o){return e.getFieldValue(o)==t},n="="}h.headerFilters[p]={value:t,func:o,type:n}}else delete h.headerFilters[p];h.changed=!0,h.table.rowManager.filterRefresh()}function i(){}var n,s,a,r,l,u,c,h=this,p=e.getField();if(p){switch(n=t("
"),_typeof(e.definition.headerFilter)){case"string":h.table.extensions.edit.editors[e.definition.headerFilter]?s=h.table.extensions.edit.editors[e.definition.headerFilter]:console.warn("Filter Error - Cannot build header filter, No such editor found: ",e.definition.editor);break;case"function":s=e.definition.headerFilter;break;case"boolean":s=e.extensions.edit&&e.extensions.edit.editor?e.extensions.edit.editor:e.definition.formatter&&h.table.extensions.edit.editors[e.definition.formatter]?h.table.extensions.edit.editors[e.definition.formatter]:h.table.extensions.edit.editors.input}s&&(r={getValue:function(){return""},getField:function(){return e.definition.field},getElement:function(){return n}},a=s.call(h,r,function(){},o,i,e.definition.headerFilterParams||{}),p?h.table.extensions.localize.bind("headerFilters.columns."+e.definition.field,function(t){a.attr("placeholder",void 0!==t&&t?t:h.table.extensions.localize.getText("headerFilters.default"))}):h.table.extensions.localize.bind("headerFilters.default",function(t){a.attr("placeholdder",void 0!==h.column.definition.headerFilterPlaceholder&&h.column.definition.headerFilterPlaceholder?h.column.definition.headerFilterPlaceholder:t)}),a.on("click",function(e){e.stopPropagation(),t(this).focus()}),l=!1,a.on("keyup search",function(e){var i=t(this);l&&clearTimeout(l),l=setTimeout(function(){o(i.val())},300)}),c=a.attr("type")?a.attr("type").toLowerCase():"","number"==c&&a.on("change",function(e){o(t(this).val())}),"text"==c&&(a.attr("type","search"),a.off("change blur")),u=a.prop("tagName").toLowerCase(),"input"!=u&&"select"!=u||a.on("mousedown",function(t){t.stopPropagation()}),n.append(a),e.contentElement.append(n),h.headerFilterElements.push(a))}else console.warn("Filter Error - Cannot add header filter, column has no field set:",e.definition.title)},w.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},w.prototype.setFilter=function(t,e,o){var i=this;i.filterList=[],Array.isArray(t)||(t=[{field:t,type:e,value:o}]),i.addFilter(t)},w.prototype.addFilter=function(t,e,o){var i,n=this;Array.isArray(t)||(t=[{field:t,type:e,value:o}]),t.forEach(function(t){var e=!1;"function"==typeof t.field?e=function(e){return t.field(e,t.type||{})}:n.filters[t.type]?(i=n.table.columnManager.getColumnByField(t.field),e=i?function(e){return n.filters[t.type](t.value,i.getFieldValue(e))}:function(e){return n.filters[t.type](t.value,e[t.field])}):console.warn("Filter Error - No such filter type found, ignoring: ",t.type),e&&(t.func=e,n.filterList.push(t),n.changed=!0)})},w.prototype.getFilters=function(t,e){var o=this,i=[];return t&&(i=o.getHeaderFilters()),o.filterList.forEach(function(t){i.push({field:t.field,type:t.type,value:t.value})}),e&&i.forEach(function(t){"function"==typeof t.type&&(t.type="function")}),i},w.prototype.getHeaderFilters=function(){var t=[];for(var e in this.headerFilters)t.push({field:e,type:this.headerFilters[e].type,value:this.headerFilters[e].value});return t},w.prototype.removeFilter=function(t,e,o){var i=this;Array.isArray(t)||(t=[{field:t,type:e,value:o}]),t.forEach(function(t){var e=-1;e="object"==_typeof(t.field)?i.filterList.findIndex(function(e){return t===e}):i.filterList.findIndex(function(e){return t.field===e.field&&t.type===e.type&&t.value===e.value}),e>-1?(i.filterList.splice(e,1),i.changed=!0):console.warn("Filter Error - No matching filter type found, ignoring: ",t.type)})},w.prototype.clearFilter=function(t){this.filterList=[],t&&this.clearHeaderFilter(),this.changed=!0},w.prototype.clearHeaderFilter=function(){this.headerFilters={},this.headerFilterElements.forEach(function(t){t.val("")}),self.changed=!0},w.prototype.filter=function(t){var e=this,o=[],i=[];return e.table.options.dataFiltering&&e.table.options.dataFiltering(e.getFilters()),e.table.options.ajaxFiltering||!e.filterList.length&&!Object.keys(e.headerFilters).length?o=t.slice(0):t.forEach(function(t){e.filterRow(t)&&o.push(t)}),e.table.options.dataFiltered&&(o.forEach(function(t){i.push(t.getComponent())}),e.table.options.dataFiltered(e.getFilters(),i)),o},w.prototype.filterRow=function(t){var e=this,o=!0,i=t.getData();e.filterList.forEach(function(t){t.func(i)||(o=!1)});for(var n in e.headerFilters)e.headerFilters[n].func(i)||(o=!1);return o},w.prototype.filters={"=":function(t,e){return e==t},"<":function(t,e){return e":function(t,e){return e>t},">=":function(t,e){return e>=t},"!=":function(t,e){return e!=t},like:function(t,e){return null===t||void 0===t?e===t:e.toLowerCase().indexOf(t.toLowerCase())>-1}},Tabulator.registerExtension("filter",w);var y=function(t){this.table=t};y.prototype.initializeColumn=function(t){var e=this,o={params:t.definition.formatterParams||{}};switch(_typeof(t.definition.formatter)){case"string":e.formatters[t.definition.formatter]?o.formatter=e.formatters[t.definition.formatter]:(console.warn("Formatter Error - No such formatter found: ",t.definition.formatter),o.formatter=e.formatters.plaintext);break;case"function":o.formatter=t.definition.formatter;break;default:o.formatter=e.formatters.plaintext}t.extensions.format=o},y.prototype.formatValue=function(t){return t.column.extensions.format.formatter.call(this,t.getComponent(),t.column.extensions.format.params)},y.prototype.sanitizeHTML=function(t){if(t){var e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(t).replace(/[&<>"'`=\/]/g,function(t){return e[t]})}return t}, +y.prototype.emptyToSpace=function(t){return null===t?" ":t},y.prototype.getFormatter=function(t){var t;switch(void 0===t?"undefined":_typeof(t)){case"string":this.formatters[t]?t=this.formatters[t]:(console.warn("Formatter Error - No such formatter found: ",t),t=this.formatters.plaintext);break;case"function":t=t;break;default:t=this.formatters.plaintext}return t},y.prototype.formatters={plaintext:function(t,e){return this.emptyToSpace(this.sanitizeHTML(t.getValue()))},html:function(t,e){return t.getValue()},textarea:function(t,e){return t.getElement().css({"white-space":"pre-wrap"}),this.emptyToSpace(this.sanitizeHTML(t.getValue()))},money:function(t,e){var o,i,n,s,a=parseFloat(t.getValue()),r=e.decimal||".",l=e.thousand||",",u=e.symbol||"",c=!!e.symbolAfter,h=void 0!==e.precision?e.precision:2;if(isNaN(a))return this.emptyToSpace(this.sanitizeHTML(t.getValue()));for(o=!1!==h?a.toFixed(h):a,o=o.split("."),i=o[0],n=o.length>1?r+o[1]:"",s=/(\d+)(\d{3})/;s.test(i);)i=i.replace(s,"$1"+l+"$2");return c?i+n+u:u+i+n},email:function(t,e){var o=this.sanitizeHTML(t.getValue());return""+this.emptyToSpace(o)+""},link:function(t,e){var o=this.sanitizeHTML(t.getValue());return""+this.emptyToSpace(o)+""},image:function(t,e){return""},tick:function(t,e){var o=t.getValue(),i=t.getElement();return!0===o||"true"===o||"True"===o||1===o||"1"===o?(i.attr("aria-checked",!0),''):(i.attr("aria-checked",!1),"")},tickCross:function(t,e){var o=t.getValue(),i=t.getElement();return!0===o||"true"===o||"True"===o||1===o||"1"===o?(i.attr("aria-checked",!0),''):(i.attr("aria-checked",!1),'')},star:function(e,o){var i=e.getValue(),n=e.getElement(),s=o&&o.stars?o.stars:5,a=t(""),r=t(''),l=t('');i=parseInt(i)=a?parseFloat(i):a,o=(s-a)/100,i=100-Math.round((i-a)/o),n.css({"min-width":"30px",position:"relative"}),n.attr("aria-label",i),"
"},color:function(t,e){return t.getElement().css({"background-color":this.sanitizeHTML(t.getValue())}),""},buttonTick:function(t,e){return''},buttonCross:function(t,e){return''},rownum:function(t,e){return this.table.rowManager.activeRows.indexOf(t.getRow()._getSelf())+1},handle:function(t,e){return t.getElement().addClass("tabulator-row-handle"),"
"}},Tabulator.registerExtension("format",y);var x=function(t){this.table=t,this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.initializationMode="left",this.active=!1};x.prototype.reset=function(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.active=!1},x.prototype.initializeColumn=function(t){var e={margin:0,edge:!1};t.definition.frozen?t.parent.isGroup?console.warn("Frozen Column Error - Grouped columns cannot be frozen"):t.isGroup?console.warn("Frozen Column Error - Column Groups cannot be frozen"):(e.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(t):this.rightColumns.unshift(t),this.active=!0,t.extensions.frozen=e):this.initializationMode="right"},x.prototype.layout=function(){var t=this,e=this.table.rowManager.element,o=0;t.active&&(t.leftMargin=t._calcSpace(t.leftColumns,t.leftColumns.length),t.table.columnManager.headersElement.css("margin-left",t.leftMargin),t.rightMargin=t._calcSpace(t.rightColumns,t.rightColumns.length),t.table.columnManager.element.css("padding-right",t.rightMargin),t.table.rowManager.activeRows.forEach(function(e){t.layoutRow(e)}),t.table.extExists("columnCalcs")&&(t.table.extensions.columnCalcs.topInitialized&&t.table.extensions.columnCalcs.topRow&&t.layoutRow(t.table.extensions.columnCalcs.topRow),t.table.extensions.columnCalcs.botInitialized&&t.table.extensions.columnCalcs.botRow&&t.layoutRow(t.table.extensions.columnCalcs.botRow)),t.leftColumns.forEach(function(e,o){e.extensions.frozen.margin=t._calcSpace(t.leftColumns,o)+t.table.columnManager.scrollLeft,o==t.leftColumns.length-1?e.extensions.frozen.edge=!0:e.extensions.frozen.edge=!1,t.layoutColumn(e)}),o=t.table.rowManager.element.innerWidth()+t.table.columnManager.scrollLeft,e[0].scrollHeight>e.innerHeight()&&(o-=e[0].offsetWidth-e[0].clientWidth),t.rightColumns.forEach(function(e,i){e.extensions.frozen.margin=o-t._calcSpace(t.rightColumns,i+1),i==t.rightColumns.length-1?e.extensions.frozen.edge=!0:e.extensions.frozen.edge=!1,t.layoutColumn(e)}))},x.prototype.layoutColumn=function(t){var e=this;e.layoutElement(t.element,t),t.cells.forEach(function(o){e.layoutElement(o.element,t)})},x.prototype.layoutRow=function(t){t.getElement().css({"padding-left":this.leftMargin,"padding-right":this.rightMargin})},x.prototype.layoutElement=function(t,e){if(e.extensions.frozen){var o={position:"absolute",left:e.extensions.frozen.margin};t.css(o),t.addClass("tabulator-frozen"),e.extensions.frozen.edge&&t.addClass("tabulator-frozen-"+e.extensions.frozen.position)}},x.prototype._calcSpace=function(t,e){for(var o=0,i=0;i"),this.arrowElement=t("
"),this.height=0,this.outerHeight=0,this.initialized=!1,this.calcs={},this.initialized=!1,this.visible=a?a.visible:void 0!==e.startOpen[i]?e.startOpen[i]:e.startOpen[0],this.addBindings()};E.prototype.addBindings=function(){var t,e,o,i,n=this;n.groupManager.table.options.groupToggleElement&&(i="arrow"==n.groupManager.table.options.groupToggleElement?n.arrowElement:n.element,i.on("click",function(t){t.stopPropagation(),t.stopImmediatePropagation(),n.toggleVisibility()})),n.groupManager.table.options.groupClick&&n.element.on("click",function(t){n.groupManager.table.options.groupClick(t,n.getComponent())}),n.groupManager.table.options.groupDblClick&&n.element.on("dblclick",function(t){n.groupManager.table.options.groupDblClick(t,n.getComponent())}),n.groupManager.table.options.groupContext&&n.element.on("contextmenu",function(t){n.groupManager.table.options.groupContext(t,n.getComponent())}),n.groupManager.table.options.groupTap&&(o=!1,n.element.on("touchstart",function(t){o=!0}),n.element.on("touchend",function(t){o&&n.groupManager.table.options.groupTap(t,n.getComponent()),o=!1})),n.groupManager.table.options.groupDblTap&&(t=null,n.element.on("touchend",function(e){t?(clearTimeout(t),t=null,n.groupManager.table.options.groupDblTap(e,n.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),n.groupManager.table.options.groupTapHold&&(e=null,n.element.on("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,n.groupManager.table.options.groupTapHold(t,n.getComponent())},1e3)}),n.element.on("touchend",function(t){clearTimeout(e),e=null}))},E.prototype._addRowToGroup=function(t){var e=this.level+1;if(this.hasSubGroups){var o=this.groupManager.groupIDLookups[e](t.getData());if(!this.groups[o]){var i=new E(this.groupManager,this,e,o,this.groupManager.headerGenerator[e]||this.groupManager.headerGenerator[0],!!this.old&&this.old.groups[o]);this.groups[o]=i,this.groupList.push(i)}this.groups[o].addRow(t)}},E.prototype._addRow=function(t){this.rows.push(t)},E.prototype.getHeadersAndRows=function(){var t=[];return t.push(this),this._visSet(),this.visible?this.groupList.length?this.groupList.forEach(function(e){t=t.concat(e.getHeadersAndRows())}):(this.groupManager.table.extExists("columnCalcs")&&this.groupManager.table.extensions.columnCalcs.hasTopCalcs()&&(this.calcs.top=this.groupManager.table.extensions.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top)),t=t.concat(this.rows),this.groupManager.table.extExists("columnCalcs")&&this.groupManager.table.extensions.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom=this.groupManager.table.extensions.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom))):this.groupManager.table.options.groupClosedShowCalcs&&this.groupManager.table.extExists("columnCalcs")&&(this.groupManager.table.extensions.columnCalcs.hasTopCalcs()&&(this.calcs.top=this.groupManager.table.extensions.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top)),this.groupManager.table.extensions.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom=this.groupManager.table.extensions.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom))),t},E.prototype.getRows=function(){return this._visSet(),this.visible?this.rows:[]},E.prototype.getRowCount=function(){var t=0;return this.groupList.length?this.groupList.forEach(function(e){t+=e.getRowCount()}):t=this.rows.length,t},E.prototype.toggleVisibility=function(){this.visible?this.hide():this.show()},E.prototype.hide=function(){this.visible=!1,"classic"==this.groupManager.table.rowManager.getRenderMode()?(this.element.removeClass("tabulator-group-visible"),this.rows.forEach(function(t){t.getElement().detach()})):this.groupManager.updateGroupRows(!0),this.groupManager.table.options.groupVisibilityChanged(this.getComponent(),!1)},E.prototype.show=function(){var t=this;t.visible=!0,"classic"==this.groupManager.table.rowManager.getRenderMode()?(this.element.addClass("tabulator-group-visible"),t.rows.forEach(function(e){t.getElement().after(e.getElement()),e.initialize()})):this.groupManager.updateGroupRows(!0),this.groupManager.table.options.groupVisibilityChanged(this.getComponent(),!0)},E.prototype._visSet=function(){var t=[];"function"==typeof this.visible&&(this.rows.forEach(function(e){t.push(e.getData())}),this.visible=this.visible(this.key,this.getRowCount(),t,this.getRowCount()))},E.prototype.getRowGroup=function(t){var e=!1;return this.groupList.length?this.groupList.forEach(function(o){var i=o.getRowGroup(t);i&&(e=i)}):this.rows.find(function(e){return e===t})&&(e=this),e},E.prototype.getElement=function(){this.addBindingsd=!1,this._visSet();var t=[];return this.rows.forEach(function(e){t.push(e.getData())}),this.visible?this.element.addClass("tabulator-group-visible"):this.element.removeClass("tabulator-group-visible"),this.element.children().detach(),this.element.html(this.generator(this.key,this.getRowCount(),t,this.getComponent())).prepend(this.arrowElement),this.element},E.prototype.normalizeHeight=function(){this.setHeight(this.element.innerHeight())},E.prototype.initialize=function(t){this.initialized&&!t||(this.normalizeHeight(),this.initialized=!0)},E.prototype.reinitialize=function(){this.initialized=!1,this.height=0,this.element.is(":visible")&&this.initialize(!0)},E.prototype.setHeight=function(t){this.height!=t&&(this.height=t,this.outerHeight=this.element.outerHeight())},E.prototype.getHeight=function(){return this.outerHeight},E.prototype.reinitializeHeight=function(){},E.prototype.calcHeight=function(){},E.prototype.setCellHeight=function(){},E.prototype.clearCellHeight=function(){},E.prototype.getComponent=function(){return new C(this)};var R=function(t){this.table=t,this.groupIDLookups=!1,this.startOpen=[function(){return!1}],this.headerGenerator=[function(){return""}],this.groupList=[],this.groups={}};R.prototype.initialize=function(){var t=this,e=t.table.options.groupBy,o=t.table.options.groupStartOpen,i=t.table.options.groupHeader;if(t.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],t.table.extensions.localize.bind("groups.item",function(e,o){t.headerGenerator[0]=function(t,i,n){return t+"("+i+" "+(1===i?e:o.groups.items)+")"}}),this.groupIDLookups=[],Array.isArray(e)||e)this.table.extExists("columnCalcs")&&this.table.extensions.columnCalcs.removeCalcs();else if(this.table.extExists("columnCalcs")){var n=this.table.columnManager.getRealColumns();n.forEach(function(e){e.definition.topCalc&&t.table.extensions.columnCalcs.initializeTopRow(),e.definition.bottomCalc&&t.table.extensions.columnCalcs.initializeBottomRow()})}Array.isArray(e)||(e=[e]),e.forEach(function(e){var o,i;"function"==typeof e?o=e:(i=t.table.columnManager.getColumnByField(e),o=i?function(t){return i.getFieldValue(t)}:function(t){return t[e]}),t.groupIDLookups.push(o)}),o&&(Array.isArray(o)||(o=[o]),o.forEach(function(t){t="function"==typeof t?t:function(){return!0}}),t.startOpen=o),i&&(t.headerGenerator=Array.isArray(i)?i:[i]),this.initialized=!0},R.prototype.getRows=function(t){return this.groupIDLookups.length?(this.table.options.dataGrouping(),this.generateGroups(t),this.table.options.dataGrouped&&this.table.options.dataGrouped(this.getGroups()),this.updateGroupRows()):t.slice(0)},R.prototype.getGroups=function(){var t=[];return this.table.options.dataGrouped&&this.groupList.forEach(function(e){t.push(e.getComponent())}),t},R.prototype.getRowGroup=function(t){var e=!1;return this.groupList.forEach(function(o){var i=o.getRowGroup(t);i&&(e=i)}),e},R.prototype.countGroups=function(){return this.groupList.length},R.prototype.generateGroups=function(t){var e=this,o=e.groups;e.groups={},e.groupList=[],t.forEach(function(t){var i=e.groupIDLookups[0](t.getData());if(!e.groups[i]){var n=new E(e,!1,0,i,e.headerGenerator[0],o[i]);e.groups[i]=n,e.groupList.push(n)}e.groups[i].addRow(t)})},R.prototype.updateGroupRows=function(t){var e,o=this,i=[];return o.groupList.forEach(function(t){i=i.concat(t.getHeadersAndRows())}),t&&(e=o.table.rowManager.displayRowsCount,o.table.rowManager.setDisplayRows(i),o.table.rowManager._virtualRenderFill(Math.floor(o.table.rowManager.element.scrollTop()/o.table.rowManager.element[0].scrollHeight*e))),i},R.prototype.scrollHeaders=function(t){this.groupList.forEach(function(e){e.arrowElement.css("margin-left",t)})},Tabulator.registerExtension("groupRows",R);var D=function(t){this.table=t,this.history=[],this.index=-1};D.prototype.clear=function(){this.history=[],this.index=-1},D.prototype.action=function(t,e,o){this.index>-1&&(this.history=this.history.slice(0,this.index+1)),this.history.push({type:t,component:e,data:o}),this.index++},D.prototype.undo=function(){if(this.index>-1){var t=this.history[this.index];return this.undoers[t.type].call(this,t),this.index--,!0}return console.warn("History Undo Error - No more history to undo"),!1},D.prototype.redo=function(){if(this.history.length-1>this.index){this.index++;var t=this.history[this.index];return this.redoers[t.type].call(this,t),!0}return console.warn("History Redo Error - No more history to redo"),!1},D.prototype.undoers={cellEdit:function(t){t.component.setValueProcessData(t.data.oldValue)},rowAdd:function(t){t.component.delete()},rowDelete:function(t){var e=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this._rebindRow(t.component,e)}},D.prototype.redoers={cellEdit:function(t){t.component.setValueProcessData(t.data.newValue)},rowAdd:function(t){var e=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this._rebindRow(t.component,e)},rowDelete:function(t){t.component.delete()}},D.prototype._rebindRow=function(t,e){this.history.forEach(function(o){if(o.component instanceof l)o.component===t&&(o.component=e);else if(o.component instanceof c&&o.component.row===t){var i=o.component.column.getField();i&&(o.component=e.getCell(i))}})},Tabulator.registerExtension("history",D);var M=function(t){this.table=t};M.prototype.parseTable=function(){var e=this,o=e.table.element,i=e.table.options,n=(i.columns,t("th",o)),s=t("tbody tr",o),a=[];e.table.options.htmlImporting(),e._extractOptions(o,i),n.length?e._extractHeaders(o):e._generateBlankHeaders(o),s.each(function(e){var o={};o[i.index]=e,t("td",t(this)).each(function(e){o[t(this).data("field")]=t(this).html()}),a.push(o)});var r=t("
"),l=o.prop("attributes");t.each(l,function(){r.attr(this.name,this.value)}),o.replaceWith(r),i.data=a,e.table.options.htmlImported(),r.tabulator(i)},M.prototype._extractOptions=function(t,e){var o=this,i=t[0].attributes;for(var n in i){var s,a=i[n];if(a&&a.name&&0===a.name.indexOf("tabulator-")){s=a.name.replace("tabulator-","");for(var r in e)r.toLowerCase()==s&&(e[r]=o._attribValue(a.value))}}},M.prototype._attribValue=function(t){return"true"===t||"false"!==t&&t},M.prototype._findCol=function(t){return this.table.options.columns.find(function(e){return e.title===t})||!1},M.prototype._extractHeaders=function(e){var o=this,i=t("th",e),n=t("tbody tr",e);i.each(function(e){var i,s,a=t(this),r=!1,l=o._findCol(a.text()),u=["title","field","align","width","minWidth","frozen","sortable","sorter","formatter","cellClick","cellDblClick","cellContext","editable","editor","visible","cssClass","tooltip","tooltipHeader","editableTitle","headerFilter","mutator","mutateType","accessor"];l?r=!0:l={title:a.text().trim()},l.field||(l.field=a.text().trim().toLowerCase().replace(" ","_")),i=a.attr("width"),i&&!l.width&&(l.width=i),s=a[0].attributes;for(var c in s){var h,p=s[c];p&&p.name&&0===p.name.indexOf("tabulator-")&&(h=p.name.replace("tabulator-",""),u.forEach(function(t){t.toLowerCase()==h&&(l[t]=o._attribValue(p.value))}))}t("td:eq("+e+")",n).data("field",l.field),l.field==o.table.options.index&&(hasIndex=!0),r||o.table.options.columns.push(l)})},M.prototype._generateBlankHeaders=function(e){var o=this;t("tr:first td",e).each(function(e){var i={title:"",field:"col"+e};t("td:eq("+e+")",rows).data("field",i.field);var n=t(this).attr("width");n&&(i.width=n),o.table.options.columns.push(i)})},Tabulator.registerExtension("htmlTableImport",M);var T=function(t){this.table=t,this.watchKeys=null,this.pressedKeys=null};T.prototype.initialize=function(){var t=this.table.options.keybindings,e={};if(this.watchKeys={},this.pressedKeys=[],!1!==t){for(var o in this.bindings)e[o]=this.bindings[o];if(Object.keys(t).length)for(var i in t)e[i]=t[i];this.mapBindings(e),this.bindEvents()}},T.prototype.mapBindings=function(t){var e=this,o=this;for(var i in t)!function(i){e.actions[i]?t[i]&&("object"!==_typeof(t[i])&&(t[i]=[t[i]]),t[i].forEach(function(t){o.mapBinding(i,t)})):console.warn("Key Binding Error - no such action:",i)}(i)},T.prototype.mapBinding=function(t,e){var o=this,i={action:this.actions[t],keys:[],ctrl:!1,shift:!1};e.toString().toLowerCase().split(" ").join("").split("+").forEach(function(t){switch(t){case"ctrl":i.ctrl=!0;break;case"shift":i.shift=!0;break;default:t=parseInt(t),i.keys.push(t),o.watchKeys[t]||(o.watchKeys[t]=[]),o.watchKeys[t].push(i)}})},T.prototype.bindEvents=function(){var t=this;this.table.element.on("keydown",function(e){var o=e.keyCode,i=t.watchKeys[o];i&&(t.pressedKeys.push(o),i.forEach(function(o){t.checkBinding(e,o)}))}),this.table.element.on("keyup",function(e){var o=e.keyCode;if(t.watchKeys[o]){var i=t.pressedKeys.indexOf(o);i>-1&&t.pressedKeys.splice(i,1)}})},T.prototype.checkBinding=function(t,e){var o=this,i=!0;return t.ctrlKey==e.ctrl&&t.shiftKey==e.shift&&(e.keys.forEach(function(t){-1==o.pressedKeys.indexOf(t)&&(i=!1)}),i&&e.action.call(o,t),!0)},T.prototype.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:"ctrl + 90",redo:"ctrl + 89"},T.prototype.actions={keyBlock:function(t){t.stopPropagation(),t.preventDefault()},scrollPageUp:function(t){var e=this.table.rowManager,o=e.scrollTop-e.height;e.element[0].scrollHeight;t.preventDefault(),e.displayRowsCount&&(o>=0?e.element.scrollTop(o):e.scrollToRow(e.displayRows[0])),this.table.element.focus()},scrollPageDown:function(t){var e=this.table.rowManager,o=e.scrollTop+e.height,i=e.element[0].scrollHeight;t.preventDefault(),e.displayRowsCount&&(o<=i?e.element.scrollTop(o):e.scrollToRow(e.displayRows[e.displayRows.length-1])),this.table.element.focus()},scrollToStart:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.displayRows[0]),this.table.element.focus()},scrollToEnd:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.displayRows[e.displayRows.length-1]),this.table.element.focus()},navPrev:function(t){var e=!1;this.table.extExists("edit")&&(e=this.table.extensions.edit.currentCell)&&(t.preventDefault(),e.nav().prev())},navNext:function(t){var e=!1;this.table.extExists("edit")&&(e=this.table.extensions.edit.currentCell)&&(t.preventDefault(),e.nav().next())},navLeft:function(t){var e=!1;this.table.extExists("edit")&&(e=this.table.extensions.edit.currentCell)&&(t.preventDefault(),e.nav().left())},navRight:function(t){var e=!1;this.table.extExists("edit")&&(e=this.table.extensions.edit.currentCell)&&(t.preventDefault(),e.nav().right())},navUp:function(t){var e=!1;this.table.extExists("edit")&&(e=this.table.extensions.edit.currentCell)&&(t.preventDefault(),e.nav().up())},navDown:function(t){var e=!1;this.table.extExists("edit")&&(e=this.table.extensions.edit.currentCell)&&(t.preventDefault(),e.nav().down())},undo:function(t){this.table.options.history&&this.table.extExists("history")&&this.table.extExists("edit")&&(this.table.extensions.edit.currentCell||(t.preventDefault(),this.table.extensions.history.undo()))},redo:function(t){this.table.options.history&&this.table.extExists("history")&&this.table.extExists("edit")&&(this.table.extensions.edit.currentCell||(t.preventDefault(),this.table.extensions.history.redo()))}},Tabulator.registerExtension("keybindings",T);var z=function(e){this.table=e,this.placeholderElement=t("
"),this.hoverElement=t(),this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this)};z.prototype.initializeColumn=function(t){var e=this,o={};t.extensions.frozen||(o.mousemove=function(o){t.parent===e.moving.parent&&(o.pageX-t.element.offset().left+e.table.columnManager.element.scrollLeft()>t.getWidth()/2?e.toCol===t&&e.toColAfter||(t.element.after(e.placeholderElement),e.moveColumn(t,!0)):(e.toCol!==t||e.toColAfter)&&(t.element.before(e.placeholderElement),e.moveColumn(t,!1)))}.bind(e),t.getElement().on("mousedown",function(o){e.checkTimeout=setTimeout(function(){e.startMove(o,t)},e.checkPeriod)}),t.getElement().on("mouseup",function(t){e.checkTimeout&&clearTimeout(e.checkTimeout)})),t.extensions.moveColumn=o},z.prototype.startMove=function(e,o){var i=this,n=o.getElement();i.moving=o,i.startX=e.pageX-n.offset().left,i.table.element.addClass("tabulator-block-select"),i.placeholderElement.css({width:o.getWidth(),height:o.getHeight()}),n.before(i.placeholderElement),n.detach(),i.hoverElement=n.clone(),i.hoverElement.addClass("tabulator-moving"),i.table.columnManager.getElement().append(i.hoverElement),i.hoverElement.css({left:0,bottom:0}),i._bindMouseMove(),t("body").on("mousemove",i.moveHover),t("body").on("mouseup",i.endMove),i.moveHover(e)},z.prototype._bindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(t){t.extensions.moveColumn.mousemove&&t.element.on("mousemove",t.extensions.moveColumn.mousemove)})},z.prototype._unbindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(t){t.extensions.moveColumn.mousemove&&t.element.off("mousemove",t.extensions.moveColumn.mousemove)})},z.prototype.moveColumn=function(t,e){var o=this,i=this.moving.getCells();o.toCol=t,o.toColAfter=e,e?t.getCells().forEach(function(t,e){t.getElement().after(i[e].getElement())}):t.getCells().forEach(function(t,e){t.getElement().before(i[e].getElement())})},z.prototype.endMove=function(e){var o=this;o._unbindMouseMove(),o.placeholderElement.after(o.moving.getElement()),o.placeholderElement.detach(),o.hoverElement.detach(),o.table.element.removeClass("tabulator-block-select"),o.toCol&&o.table.columnManager.moveColumn(o.moving,o.toCol,o.toColAfter),o.moving=!1,o.toCol=!1,o.toColAfter=!1,t("body").off("mousemove",o.moveHover),t("body").off("mouseup",o.endMove)},z.prototype.moveHover=function(t){var e,o=this,i=o.table.columnManager.getElement(),n=i.scrollLeft(),s=t.pageX-i.offset().left+n;o.hoverElement.css({left:s-o.startX}),s-n"),this.hoverElement=t(),this.checkTimeout=!1,this.checkPeriod=150,this.moving=!1,this.toRow=!1,this.toRowAfter=!1,this.hasHandle=!1,this.startY=0,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this)};k.prototype.setHandle=function(t){this.hasHandle=t},k.prototype.initializeRow=function(t){var e=this,o={};o.mousemove=function(o){o.pageY-t.element.offset().top+e.table.rowManager.element.scrollTop()>t.getHeight()/2?e.toRow===t&&e.toRowAfter||(t.element.after(e.placeholderElement),e.moveRow(t,!0)):(e.toRow!==t||e.toRowAfter)&&(t.element.before(e.placeholderElement),e.moveRow(t,!1))}.bind(e),this.hasHandle||(t.getElement().on("mousedown",function(o){e.checkTimeout=setTimeout(function(){e.startMove(o,t)},e.checkPeriod)}),t.getElement().on("mouseup",function(t){e.checkTimeout&&clearTimeout(e.checkTimeout)})),t.extensions.moveRow=o},k.prototype.initializeCell=function(t){var e=this;t.getElement().on("mousedown",function(o){e.checkTimeout=setTimeout(function(){e.startMove(o,t.row)},e.checkPeriod)}),t.getElement().on("mouseup",function(t){e.checkTimeout&&clearTimeout(e.checkTimeout)})},k.prototype._bindMouseMove=function(){this.table.rowManager.displayRows.forEach(function(t){"row"===t.type&&t.extensions.moveRow.mousemove&&t.element.on("mousemove",t.extensions.moveRow.mousemove)})},k.prototype._unbindMouseMove=function(){this.table.rowManager.displayRows.forEach(function(t){"row"===t.type&&t.extensions.moveRow.mousemove&&t.element.off("mousemove",t.extensions.moveRow.mousemove)})},k.prototype.startMove=function(e,o){var i=this,n=o.getElement();i.moving=o,i.startY=e.pageY-n.offset().top,i.table.element.addClass("tabulator-block-select"),i.placeholderElement.css({width:o.getWidth(), +height:o.getHeight()}),n.before(i.placeholderElement),n.detach(),i.hoverElement=n.clone(),i.hoverElement.addClass("tabulator-moving"),i.table.rowManager.getTableElement().append(i.hoverElement),i.hoverElement.css({left:0,top:0}),i._bindMouseMove(),t("body").on("mousemove",i.moveHover),t("body").on("mouseup",i.endMove),i.moveHover(e)},k.prototype.endMove=function(e){var o=this;o._unbindMouseMove(),o.placeholderElement.after(o.moving.getElement()),o.placeholderElement.detach(),o.hoverElement.detach(),o.table.element.removeClass("tabulator-block-select"),o.toRow&&o.table.rowManager.moveRow(o.moving,o.toRow,o.toRowAfter),o.moving=!1,o.toRow=!1,o.toRowAfter=!1,t("body").off("mousemove",o.moveHover),t("body").off("mouseup",o.endMove)},k.prototype.moveRow=function(t,e){var o=this;o.toRow=t,o.toRowAfter=e},k.prototype.moveHover=function(t){var e=this,o=e.table.rowManager.getElement(),i=o.scrollTop(),n=t.pageY-o.offset().top+i;e.hoverElement.css({top:n-e.startY})},Tabulator.registerExtension("moveRow",k);var F=function(t){this.table=t};F.prototype.initializeColumn=function(t){var e={mutator:!1,type:t.definition.mutateType,params:t.definition.mutatorParams||{}};switch(_typeof(t.definition.mutator)){case"string":this.mutators[t.definition.mutator]?e.mutator=this.mutators[t.definition.mutator]:console.warn("Mutator Error - No such mutator found, ignoring: ",t.definition.mutator);break;case"function":e.mutator=t.definition.mutator}e.mutator&&(t.extensions.mutate=e)},F.prototype.transformRow=function(t){return this.table.columnManager.traverse(function(e){e.extensions.mutate&&(e.getField(),"edit"!=e.extensions.mutate.type&&e.setFieldValue(t,e.extensions.mutate.mutator(e.getFieldValue(t),t,"data",e.extensions.mutate.params)))}),t},F.prototype.transformCell=function(t,e){return t.column.extensions.mutate.mutator(e,t.row.getData(),"edit",t.column.extensions.mutate.params,t.getComponent())},F.prototype.mutators={},Tabulator.registerExtension("mutator",F);var _=function(e){this.table=e,this.element=t(""),this.pagesElement=t(""),this.firstBut=t(""),this.prevBut=t(""),this.nextBut=t(""),this.lastBut=t(""),this.mode="local",this.size=0,this.page=1,this.max=1,this.paginator=!1};_.prototype.initialize=function(){var t=this;for(var e in t.table.options.paginationDataSent)t.paginationDataSentNames[e]=t.table.options.paginationDataSent[e];for(var o in t.table.options.paginationDataReceived)t.paginationDataReceivedNames[o]=t.table.options.paginationDataReceived[o];t.table.options.paginator&&(t.paginator=t.table.options.paginator),t.table.extensions.localize.bind("pagination.first",function(e){t.firstBut.html(e)}),t.table.extensions.localize.bind("pagination.first_title",function(e){t.firstBut.attr("aria-label",e).attr("title",e)}),t.table.extensions.localize.bind("pagination.prev",function(e){t.prevBut.html(e)}),t.table.extensions.localize.bind("pagination.prev_title",function(e){t.prevBut.attr("aria-label",e).attr("title",e)}),t.table.extensions.localize.bind("pagination.next",function(e){t.nextBut.html(e)}),t.table.extensions.localize.bind("pagination.next_title",function(e){t.nextBut.attr("aria-label",e).attr("title",e)}),t.table.extensions.localize.bind("pagination.last",function(e){t.lastBut.html(e)}),t.table.extensions.localize.bind("pagination.last_title",function(e){t.lastBut.attr("aria-label",e).attr("title",e)}),t.firstBut.on("click",function(){t.setPage(1)}),t.prevBut.on("click",function(){t.previousPage()}),t.nextBut.on("click",function(){t.nextPage()}),t.lastBut.on("click",function(){t.setPage(t.max)}),t.table.options.paginationElement&&(t.element=t.table.options.paginationElement),t.element.append(t.firstBut),t.element.append(t.prevBut),t.element.append(t.pagesElement),t.element.append(t.nextBut),t.element.append(t.lastBut),t.table.options.paginationElement||t.table.footerManager.append(t.element,t),t.mode=t.table.options.pagination,t.size=t.table.options.paginationSize||Math.floor(t.table.rowManager.getElement().innerHeight()/26)},_.prototype.setMaxRows=function(t){this.max=t?Math.ceil(t/this.size):1,this.page>this.max&&(this.page=this.max)},_.prototype.reset=function(t){return("local"==this.mode||t)&&(this.page=1),!0},_.prototype.setMaxPage=function(t){this.max=t||1,this.page>this.max&&(this.page=this.max,this.trigger())},_.prototype.setPage=function(t){return t>0&&t<=this.max?(this.page=t,this.trigger(),!0):(console.warn("Pagination Error - Requested page is out of range of 1 - "+this.max+":",t),!1)},_.prototype.setPageSize=function(t){t>0&&(this.size=t)},_.prototype._setPageButtons=function(){var t=this,e=this.page3?this.page+2:this.page+(5-this.page);t.pagesElement.empty(),1==t.page?(t.firstBut.prop("disabled",!0),t.prevBut.prop("disabled",!0)):(t.firstBut.prop("disabled",!1),t.prevBut.prop("disabled",!1)),t.page==t.max?(t.lastBut.prop("disabled",!0),t.nextBut.prop("disabled",!0)):(t.lastBut.prop("disabled",!1),t.nextBut.prop("disabled",!1));for(var i=e;i<=o;i++)i>0&&i<=t.max&&t.pagesElement.append(t._generatePageButton(i));this.footerRedraw()},_.prototype._generatePageButton=function(e){var o=this,i=t("");return i.on("click",function(t){o.setPage(e)}),i},_.prototype.previousPage=function(){return this.page>1?(this.page--,this.trigger(),!0):(console.warn("Pagination Error - Previous page would be less than page 1:",0),!1)},_.prototype.nextPage=function(){return this.page-1&&(o=o.substr(i),n=o.indexOf(";"),n>-1&&(o=o.substr(0,n)),e=o.replace(this.id+"=",""));break;default:console.warn("Persistance Load Error - invalid mode selected",this.mode)}return e&&(e=JSON.parse(e),t=this.mergeDefinition(t,e)),t},H.prototype.mergeDefinition=function(t,e){var o=this,i=[];return e.forEach(function(e,n){var s=o._findColumn(t,e);s&&(s.width=e.width,s.visible=e.visible,s.columns&&(s.columns=o.mergeDefinition(s.columns,e.columns)),i.push(s))}),i},H.prototype._findColumn=function(t,e){var o=e.columns?"group":e.field?"field":"object";return t.find(function(t){switch(o){case"group":return t.title===e.title&&t.columns.length===e.columns.length;case"field":return t.field===e.field;case"object":return t===e}})},H.prototype.save=function(){var t=this.parseColumns(this.table.columnManager.getColumns()),e=JSON.stringify(t);switch(this.mode){case"local":localStorage.setItem(this.id,e);break;case"cookie":var o=new Date;o.setDate(o.getDate()+1e4),document.cookie=this.id+"="+e+"; expires="+o.toUTCString();break;default:console.warn("Persistance Save Error - invalid mode selected",this.mode)}},H.prototype.parseColumns=function(t){var e=this,o=[];return t.forEach(function(t){var i={};t.isGroup?(i.title=t.getDefinition().title,i.columns=e.parseColumns(t.getColumns())):(i.title=t.getDefinition().title,i.field=t.getField(),i.width=t.getWidth(),i.visible=t.visible),o.push(i)}),o},Tabulator.registerExtension("persistentLayout",H);var S=function(t){this.table=t,this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.handle=null,this.prevHandle=null};S.prototype.initializeColumn=function(t,e,o){var i=this,n=!1,s=this.table.options.resizableColumns;if("header"===t&&(n="textarea"==e.definition.formatter||e.definition.variableHeight,e.extensions.resize={variableHeight:n}),!0===s||s==t){var a=document.createElement("div");a.className="tabulator-col-resize-handle";var r=document.createElement("div");r.className="tabulator-col-resize-handle prev",a.addEventListener("click",function(t){t.stopPropagation()}),a.addEventListener("mousedown",function(t){var o=e.getLastColumn();o&&(i.startColumn=e,i._mouseDown(t,o))}),r.addEventListener("click",function(t){t.stopPropagation()}),r.addEventListener("mousedown",function(t){var o,n,s;(o=e.getFirstColumn())&&(n=i.table.columnManager.findColumnIndex(o),(s=n>0&&i.table.columnManager.getColumnByIndex(n-1))&&(i.startColumn=e,i._mouseDown(t,s)))}),o.append(a).append(r)}},S.prototype._mouseDown=function(e,o){function i(t){o.setWidth(s.startWidth+(t.screenX-s.startX)),!s.table.browserSlow&&o.extensions.resize&&o.extensions.resize.variableHeight&&o.checkCellHeights()}function n(e){s.startColumn.extensions.edit&&(s.startColumn.extensions.edit.blocked=!1),s.table.browserSlow&&o.extensions.resize&&o.extensions.resize.variableHeight&&o.checkCellHeights(),t("body").off("mouseup",i),t("body").off("mousemove",i),s.table.element.removeClass("tabulator-block-select"),s.table.options.persistentLayout&&s.table.extExists("persistentLayout",!0)&&s.table.extensions.persistentLayout.save(),s.table.options.columnResized(s.startColumn.getComponent())}var s=this;s.table.element.addClass("tabulator-block-select"),e.stopPropagation(),s.startColumn.extensions.edit&&(s.startColumn.extensions.edit.blocked=!0),s.startX=e.screenX,s.startWidth=o.getWidth(),t("body").on("mousemove",i),t("body").on("mouseup",n)},Tabulator.registerExtension("resizeColumns",S);var L=function(t){this.table=t,this.columns=[],this.index=0};L.prototype.initialize=function(){var t=[];this.table.columnManager.columnsByIndex.forEach(function(e){var o=e.getDefinition();e.extensions.responsive={order:void 0===o.responsive?1:o.responsive},e.extensions.responsive.order&&t.push(e)}),t=t.reverse(),t=t.sort(function(t,e){return e.extensions.responsive.order-t.extensions.responsive.order}),this.columns=t},L.prototype.update=function(){for(var t=this,e=!0;e;){var o="fitColumns"==t.table.extensions.layout.getMode()?t.table.columnManager.getFlexBaseWidth():t.table.columnManager.getWidth(),i=t.table.columnManager.element.innerWidth()-o;if(i<0){var n=t.columns[t.index];n?(n.hide(),t.index++):e=!1}else{var s=t.columns[t.index-1];s&&i>0&&i>=s.getWidth()?(s.show(),s.setWidth(s.getWidth()),t.index--):e=!1}t.table.rowManager.activeRowsCount||t.table.rowManager.renderEmptyScroll()}},Tabulator.registerExtension("responsiveLayout",L);var P=function(t){this.table=t,this.selecting=!1,this.selectPrev=[],this.selectedRows=[]};P.prototype.clearSelectionData=function(){this.selecting=!1,this.selectPrev=[],this.selectedRows=[]},P.prototype.initializeRow=function(e){var o=this,i=e.getElement(),n=function e(){setTimeout(function(){o.selecting=!1},50),t("body").off("mouseup",e)};e.extensions.select={selected:!1},o.table.options.selectableCheck(e.getComponent())?(i.addClass("tabulator-selectable").removeClass("tabulator-unselectable"),o.table.options.selectable&&"highlight"!=o.table.options.selectable&&(i.on("click",function(t){o.selecting||o.toggleRow(e)}),i.on("mousedown",function(i){if(i.shiftKey)return o.selecting=!0,o.selectPrev=[],t("body").on("mouseup",n),t("body").on("keyup",n),o.toggleRow(e),!1}),i.on("mouseenter",function(t){o.selecting&&(o.toggleRow(e),o.selectPrev[1]==e&&o.toggleRow(o.selectPrev[0]))}),i.on("mouseout",function(t){o.selecting&&o.selectPrev.unshift(e)}))):e.getElement().addClass("tabulator-unselectable").removeClass("tabulator-selectable")},P.prototype.toggleRow=function(t){this.table.options.selectableCheck(t.getComponent())&&(t.extensions.select.selected?this._deselectRow(t):this._selectRow(t))},P.prototype.selectRows=function(t){var e=this;switch(void 0===t?"undefined":_typeof(t)){case"undefined":e.table.rowManager.rows.forEach(function(t){e._selectRow(t,!0,!0)}),e._rowSelectionChanged();break;case"boolean":!0===t&&(e.table.rowManager.activeRows.forEach(function(t){e._selectRow(t,!0,!0)}),e._rowSelectionChanged());break;default:Array.isArray(t)?(t.forEach(function(t){e._selectRow(t,!0)}),e._rowSelectionChanged()):e._selectRow(t)}},P.prototype._selectRow=function(t,e,o){var i=this;if(!isNaN(i.table.options.selectable)&&!0!==i.table.options.selectable&&!o&&i.selectedRows.length>=i.table.options.selectable){if(!i.table.options.selectableRollingSelection)return!1;i._deselectRow(i.selectedRows[0],!0)}var n=i.table.rowManager.findRow(t);if(n){var i=this;n.extensions.select.selected=!0,n.getElement().addClass("tabulator-selected"),i.selectedRows.push(n),e||(i.table.options.rowSelected(n.getComponent()),i._rowSelectionChanged())}else console.warn("Selection Error - No such row found, ignoring selection:"+t)},P.prototype.deselectRows=function(t){var e=this;if(void 0===t){for(var o=e.selectedRows.length,i=0;i-1&&(n.extensions.select.selected=!1,n.getElement().removeClass("tabulator-selected"),i.selectedRows.splice(o,1),e||(i.table.options.rowDeselected(n.getComponent()),i._rowSelectionChanged())):console.warn("Selection Error - No such row found, ignoring selection:"+t)},P.prototype.getSelectedData=function(){var t=[];return this.selectedRows.forEach(function(e){t.push(e.getData())}),t},P.prototype.getSelectedRows=function(){var t=[];return this.selectedRows.forEach(function(e){t.push(e.getComponent())}),t},P.prototype._rowSelectionChanged=function(){this.table.options.rowSelectionChanged(this.getSelectedData(),this.getSelectedRows())},Tabulator.registerExtension("selectRow",P);var B=function(t){this.table=t,this.sortList=[],this.changed=!1};B.prototype.initializeColumn=function(e,o){var i=this,n=!1;switch(_typeof(e.definition.sorter)){case"string":i.sorters[e.definition.sorter]?n=i.sorters[e.definition.sorter]:console.warn("Sort Error - No such sorter found: ",e.definition.sorter);break;case"function":n=e.definition.sorter}e.extensions.sort={sorter:n,dir:"none",params:e.definition.sorterParams||{}},!1!==e.definition.headerSort&&(e.element.addClass("tabulator-sortable"),o.append(t("
")),e.element.on("click",function(t){var o="",n=[],s=!1;e.extensions.sort&&(o="asc"==e.extensions.sort.dir?"desc":"asc",t.shiftKey||t.ctrlKey?(n=i.getSort(),s=n.findIndex(function(t){return t.field===e.getField()}),s>-1?(n[s].dir="asc"==n[s].dir?"desc":"asc",s!=n.length-1&&n.push(n.splice(s,1)[0])):n.push({column:e,dir:o}),i.setSort(n)):i.setSort(e,o),i.table.rowManager.sorterRefresh())}))},B.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},B.prototype.getSort=function(){var t=this,e=[];return t.sortList.forEach(function(t){t.column&&e.push({column:t.column.getComponent(),field:t.column.getField(),dir:t.dir})}),e},B.prototype.setSort=function(t,e){var o=this,i=[];Array.isArray(t)||(t=[{column:t,dir:e}]),t.forEach(function(t){var e;e=o.table.columnManager.findColumn(t.column),e?(t.column=e,i.push(t),o.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",t.column)}),o.sortList=i},B.prototype.clear=function(){this.setSort([])},B.prototype.findSorter=function(t){var e,o=this.table.rowManager.activeRows[0],i="string";if(o&&(o=o.getData(),t.getField()))switch(e=t.getFieldValue(o),void 0===e?"undefined":_typeof(e)){case"undefined":i="string";break;case"boolean":i="boolean";break;default:isNaN(e)||""===e?e.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(i="alphanum"):i="number"}return this.sorters[i]},B.prototype.sort=function(){var t=this;t.table.options.dataSorting&&t.table.options.dataSorting(t.getSort()),t.clearColumnHeaders(),t.table.options.ajaxSorting||t.sortList.forEach(function(e,o){e.column&&e.column.extensions.sort&&(e.column.extensions.sort.sorter||(e.column.extensions.sort.sorter=t.findSorter(e.column)),t._sortItem(e.column,e.dir,t.sortList,o)),t.setColumnHeader(e.column,e.dir)}),t.table.options.dataSorted&&t.table.options.dataSorted(t.getSort(),t.table.rowManager.getComponents(!0))},B.prototype.clearColumnHeaders=function(){this.table.columnManager.getRealColumns().forEach(function(t){t.extensions.sort&&(t.extensions.sort.dir="none",t.element.attr("aria-sort","none"))})},B.prototype.setColumnHeader=function(t,e){t.extensions.sort.dir=e,t.element.attr("aria-sort",e)},B.prototype._sortItem=function(t,e,o,i){var n=this;n.table.rowManager.activeRows.sort(function(s,a){var r=n._sortRow(s,a,t,e);if(0==r&&i)for(var l=i-1;l>=0&&0==(r=n._sortRow(s,a,o[l].column,o[l].dir));l--);return r})},B.prototype._sortRow=function(t,e,o,i){var n=this,s="asc"==i?t:e,a="asc"==i?e:t;return t=o.getFieldValue(s.getData()),e=o.getFieldValue(a.getData()),t=void 0!==t?t:"",e=void 0!==e?e:"",o.extensions.sort.sorter.call(n,t,e,s.getComponent(),a.getComponent(),o.getComponent(),i,o.extensions.sort.params)},B.prototype.sorters={number:function(t,e,o,i,n,s,a){return parseFloat(String(t).replace(",",""))-parseFloat(String(e).replace(",",""))},string:function(t,e,o,i,n,s,a){return String(t).toLowerCase().localeCompare(String(e).toLowerCase())},date:function(t,e,o,i,n,s,a){var r=a.format||"DD/MM/YYYY";return"undefined"!=typeof moment?(t=moment(t,r),e=moment(e,r)):console.error("Sort Error - 'date' sorter is dependant on moment.js"),t-e},boolean:function(t,e,o,i,n,s,a){return(!0===t||"true"===t||"True"===t||1===t?1:0)-(!0===e||"true"===e||"True"===e||1===e?1:0)},alphanum:function(t,e,o,i,n,s,a){var r,l,u,c,h,p=0,d=/(\d+)|(\D+)/g,f=/\d/;if(isFinite(t)&&isFinite(e))return t-e;if(r=String(t).toLowerCase(),l=String(e).toLowerCase(),r===l)return 0;if(!f.test(r)||!f.test(l))return r>l?1:-1;for(r=r.match(d),l=l.match(d),h=r.length>l.length?l.length:r.length;pc?1:-1;return r.length>l.length},time:function(t,e,o,i,n,s,a){var r=a.format||"hh:mm";return"undefined"!=typeof moment?(t=moment(t,r),e=moment(e,r)):console.error("Sort Error - 'date' sorter is dependant on moment.js"),t-e}},Tabulator.registerExtension("sort",B);var A=function(t){this.table=t};A.prototype.initializeColumn=function(t){var e,o=this,i=[];t.definition.validator&&(Array.isArray(t.definition.validator)?t.definition.validator.forEach(function(t){(e=o._extractValidator(t))&&i.push(e)}):(e=this._extractValidator(t.definition.validator))&&i.push(e),t.extensions.validate=!!i.length&&i)},A.prototype._extractValidator=function(t){switch(void 0===t?"undefined":_typeof(t)){case"string":var e=t.split(":"),o=e.shift(),i=e.join();return this._buildValidator(o,i);case"function":return this._buildValidator(t);case"object":return this._buildValidator(t.type,t.parameters)}},A.prototype._buildValidator=function(t,e){var o="function"==typeof t?t:this.validators[t];return o?{type:"function"==typeof t?"function":t,func:o,params:e}:(console.warn("Validator Setup Error - No matching validator found:",t),!1)},A.prototype.validate=function(t,e,o){var i=this,n=[];return t&&t.forEach(function(t){t.func.call(i,e,o,t.params)||n.push({type:t.type,parameters:t.params})}),!n.length||n},A.prototype.validators={integer:function(t,e,o){return"number"==typeof(e=Number(e))&&isFinite(e)&&Math.floor(e)===e},float:function(t,e,o){return"number"==typeof(e=Number(e))&&isFinite(e)&&e%1!=0},numeric:function(t,e,o){return!isNaN(e)},string:function(t,e,o){return isNaN(e)},max:function(t,e,o){return parseFloat(e)<=o},min:function(t,e,o){return parseFloat(e)>=o},minLength:function(t,e,o){return String(e).length>=o},maxLength:function(t,e,o){return String(e).length<=o},in:function(t,e,o){return"string"==typeof o&&(o=o.split("|")),""===e||o.indexOf(e)>-1},regex:function(t,e,o){return new RegExp(o).test(e)},unique:function(t,e,o){var i=!0,n=t.getData();return this.table.rowManager.rows.forEach(function(o){var s=o.getData();s!==n&&e==s[t.getField()]&&(i=!1)}),i},required:function(t,e,o){return""!==e&null!==e&&void 0!==e}},Tabulator.registerExtension("validate",A)}(),t.widget("ui.tabulator",Tabulator)}); \ No newline at end of file diff --git a/js/tabulator/gulpfile.js b/js/tabulator/gulpfile.js new file mode 100644 index 0000000..819de95 --- /dev/null +++ b/js/tabulator/gulpfile.js @@ -0,0 +1,100 @@ +var gulp = require('gulp'), + sass = require('gulp-sass'), + autoprefixer = require('gulp-autoprefixer'), + cssnano = require('gulp-cssnano'), + jshint = require('gulp-jshint'), + uglify = require('gulp-uglify'), + imagemin = require('gulp-imagemin'), + rename = require('gulp-rename'), + concat = require('gulp-concat'), + notify = require('gulp-notify'), + cache = require('gulp-cache'), + livereload = require('gulp-livereload'), + del = require('del'); + include = require('gulp-include'), + sourcemaps = require('gulp-sourcemaps'), + babel = require('gulp-babel'), + plumber = require('gulp-plumber'), + gutil = require('gulp-util'), + insert = require('gulp-insert'); + + var version_no = "3.3.1", + version = "/* Tabulator v" + version_no + " (c) Oliver Folkerd */\n"; + + var gulp_src = gulp.src; + gulp.src = function() { + return gulp_src.apply(gulp, arguments) + .pipe(plumber(function(error) { + // Output an error message + gutil.log(gutil.colors.red('Error (' + error.plugin + '): ' + error.message)); + // emit the end event, to properly end the task + this.emit('end'); + }) + ); + }; + + + gulp.task('styles', function() { + return gulp.src('src/scss/**/tabulator*.scss') + .pipe(sourcemaps.init()) + .pipe(insert.prepend(version + "\n")) + .pipe(sass({outputStyle: 'expanded'}).on('error', sass.logError)) + .pipe(autoprefixer('last 4 version')) + .pipe(gulp.dest('dist/css')) + .pipe(rename({suffix: '.min'})) + .pipe(cssnano()) + .pipe(insert.prepend(version)) + .pipe(sourcemaps.write('.')) + .pipe(gulp.dest('dist/css')) + //.pipe(notify({ message: 'Styles task complete' })); + .on('end', function(){ gutil.log('Styles task complete'); }) + }); + + gulp.task('scripts', function() { + //return gulp.src('src/js/**/*.js') + return gulp.src('src/js/jquery_wrapper.js') + .pipe(insert.prepend(version + "\n")) + //.pipe(sourcemaps.init()) + .pipe(include()) + //.pipe(jshint()) + // .pipe(jshint.reporter('default')) + .pipe(babel({ + //presets:['es2015'] + presets: [["env", { + "targets": { + "browsers": ["last 4 versions"] + } + }] + ] + })) + .pipe(concat('tabulator.js')) + .pipe(gulp.dest('dist/js')) + .pipe(rename({suffix: '.min'})) + .pipe(uglify()) + .pipe(insert.prepend(version)) + // .pipe(sourcemaps.write('.')) + .pipe(gulp.dest('dist/js')) + //.pipe(notify({ message: 'Scripts task complete' })); + .on('end', function(){ gutil.log('Scripts task complete'); }) + //.on("error", console.log) + }); + + gulp.task('clean', function() { + return del(['dist/css', 'dist/js']); + }); + + + gulp.task('default', ['clean'], function() { + gulp.start('styles', 'scripts'); + }); + + + gulp.task('watch', function() { + + // Watch .scss files + gulp.watch('src/scss/**/*.scss', ['styles']); + + // Watch .js files + gulp.watch('src/js/**/*.js', ['scripts']); + + }); \ No newline at end of file diff --git a/js/tabulator/package.json b/js/tabulator/package.json new file mode 100644 index 0000000..59828b7 --- /dev/null +++ b/js/tabulator/package.json @@ -0,0 +1,62 @@ +{ + "name": "jquery.tabulator", + "version": "3.3.1", + "description": "Interactive table generation plugin for jQuery UI", + "main": "dist/js/tabulator.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://github.com/olifolkerd/tabulator.git" + }, + "keywords": [ + "table", + "grid", + "datagrid", + "tabulator", + "editable", + "cookie", + "jquery", + "jqueryui", + "sort", + "format", + "resizable", + "list", + "scrollable", + "ajax", + "json", + "widget" + ], + "author": "Oli Folkerd", + "license": "MIT", + "bugs": { + "url": "https://github.com/olifolkerd/tabulator/issues" + }, + "homepage": "http://tabulator.info/", + "devDependencies": { + "babel-preset-env": "^1.4.0", + "babel-preset-es2015": "^6.24.1", + "babel-preset-stage-2": "^6.24.1", + "del": "^2.2.2", + "gulp": "^3.9.1", + "gulp-autoprefixer": "^3.1.1", + "gulp-babel": "^6.1.2", + "gulp-cache": "^0.4.6", + "gulp-concat": "^2.6.1", + "gulp-cssnano": "^2.1.2", + "gulp-imagemin": "^3.2.0", + "gulp-include": "^2.3.1", + "gulp-insert": "^0.5.0", + "gulp-jshint": "^2.0.4", + "gulp-livereload": "^3.8.1", + "gulp-notify": "^3.0.0", + "gulp-plumber": "^1.1.0", + "gulp-rename": "^1.2.2", + "gulp-sass": "^3.1.0", + "gulp-sourcemaps": "^2.6.0", + "gulp-uglify": "^2.1.2", + "gulp-util": "^3.0.8", + "jshint": "^2.9.4" + } +} diff --git a/js/tabulator/src/js/cell.js b/js/tabulator/src/js/cell.js new file mode 100644 index 0000000..9477e24 --- /dev/null +++ b/js/tabulator/src/js/cell.js @@ -0,0 +1,479 @@ + +//public row object +var CellComponent = function (cell){ + this.cell = cell; +}; + +CellComponent.prototype.getValue = function(){ + return this.cell.getValue(); +}; + +CellComponent.prototype.getOldValue = function(){ + return this.cell.getOldValue(); +}; + +CellComponent.prototype.getElement = function(){ + return $(this.cell.getElement()); +}; + +CellComponent.prototype.getRow = function(){ + return this.cell.row.getComponent(); +}; + +CellComponent.prototype.getData = function(){ + return this.cell.row.getData(); +}; + +CellComponent.prototype.getField = function(){ + return this.cell.column.getField(); +}; + +CellComponent.prototype.getColumn = function(){ + return this.cell.column.getComponent(); +}; + +CellComponent.prototype.setValue = function(value, mutate){ + if(typeof mutate == "undefined"){ + mutate = true; + } + + this.cell.setValue(value, mutate); +}; + +CellComponent.prototype.restoreOldValue = function(){ + this.cell.setValueActual(this.cell.getOldValue()); +}; + +CellComponent.prototype.edit = function(){ + this.cell.edit(); +}; + +CellComponent.prototype.nav = function(){ + return this.cell.nav(); +}; + +CellComponent.prototype.checkHeight = function(){ + this.cell.checkHeight(); +}; + +CellComponent.prototype._getSelf = function(){ + return this.cell; +}; + + + +var Cell = function(column, row){ + + this.table = column.table; + this.column = column; + this.row = row; + // this.element = $("
"); + this.element = null; + this.value = null; + this.oldValue = null; + + this.height = null; + this.width = null; + this.minWidth = null; + + this.build(); +}; + +//////////////// Setup Functions ///////////////// + +//generate element +Cell.prototype.build = function(){ + this.generateElement(); + + this.setWidth(this.column.width); + + this._configureCell(); + + this.setValueActual(this.column.getFieldValue(this.row.data)); +}; + +Cell.prototype.generateElement = function(){ + this.element = document.createElement('div'); + this.element.className = "tabulator-cell"; + this.element.setAttribute("role", "gridcell"); + this.element = $(this.element); +}; + + +Cell.prototype._configureCell = function(){ + var self = this, + cellEvents = self.column.cellEvents, + element = self.element, + field = this.column.getField(), + dblTap, tapHold, tap; + + //set text alignment + element[0].style.textAlign = self.column.hozAlign; + + if(field){ + element.attr("tabulator-field", field); + } + + if(self.column.definition.cssClass){ + element.addClass(self.column.definition.cssClass); + } + + //set event bindings + if (cellEvents.cellClick){ + self.element.on("click", function(e){ + cellEvents.cellClick(e, self.getComponent()); + }); + } + + if (cellEvents.cellDblClick){ + self.element.on("dblclick", function(e){ + cellEvents.cellDblClick(e, self.getComponent()); + }); + } + + if (cellEvents.cellContext){ + self.element.on("contextmenu", function(e){ + cellEvents.cellContext(e, self.getComponent()); + }); + } + + if (cellEvents.cellTap){ + tap = false; + + self.element.on("touchstart", function(e){ + tap = true; + }); + + self.element.on("touchend", function(e){ + if(tap){ + cellEvents.cellTap(e, self.getComponent()); + } + + tap = false; + }); + } + + if (cellEvents.cellDblTap){ + dblTap = null; + + self.element.on("touchend", function(e){ + + if(dblTap){ + clearTimeout(dblTap); + dblTap = null; + + cellEvents.cellDblTap(e, self.getComponent()); + }else{ + + dblTap = setTimeout(function(){ + clearTimeout(dblTap); + dblTap = null; + }, 300); + } + + }); + } + + if (cellEvents.cellTapHold){ + tapHold = null; + + self.element.on("touchstart", function(e){ + clearTimeout(tapHold); + + tapHold = setTimeout(function(){ + clearTimeout(tapHold); + tapHold = null; + tap = false; + cellEvents.cellTapHold(e, self.getComponent()); + }, 1000) + + }); + + self.element.on("touchend", function(e){ + clearTimeout(tapHold); + tapHold = null; + }); + } + + if(self.column.extensions.edit){ + self.table.extensions.edit.bindEditor(self); + } + + if(self.column.definition.rowHandle && self.table.options.movableRows !== false && self.table.extExists("moveRow")){ + self.table.extensions.moveRow.initializeCell(self); + } + + //hide cell if not visible + if(!self.column.visible){ + self.hide(); + } +}; + +//generate cell contents +Cell.prototype._generateContents = function(){ + var self = this; + + if(self.table.extExists("format")){ + self.element.html(self.table.extensions.format.formatValue(self)); + }else{ + self.element.html(self.value); + } +}; + +//generate tooltip text +Cell.prototype._generateTooltip = function(){ + var self = this; + + var tooltip = self.column.tooltip; + + if(tooltip){ + if(tooltip === true){ + tooltip = self.value; + }else if(typeof(tooltip) == "function"){ + tooltip = tooltip(self.getComponent()); + } + + self.element[0].setAttribute("title", tooltip); + }else{ + self.element[0].setAttribute("title", ""); + } +}; + + +//////////////////// Getters //////////////////// +Cell.prototype.getElement = function(){ + return this.element; +}; + +Cell.prototype.getValue = function(){ + return this.value; +}; + +Cell.prototype.getOldValue = function(){ + return this.oldValue; +}; + +//////////////////// Actions //////////////////// + +Cell.prototype.setValue = function(value, mutate){ + + var changed = this.setValueProcessData(value, mutate); + + if(changed){ + if(this.table.options.history && this.table.extExists("history")){ + this.table.extensions.history.action("cellEdit", this, {oldValue:this.oldValue, newValue:this.value}); + }; + + this.table.options.cellEdited(this.getComponent()); + this.table.options.dataEdited(this.table.rowManager.getData()); + } + + if(this.table.extExists("columnCalcs")){ + if(this.column.definition.topCalc || this.column.definition.bottomCalc){ + if(this.table.options.groupBy && this.table.extExists("groupRows")){ + this.table.extensions.columnCalcs.recalcRowGroup(this.row); + }else{ + this.table.extensions.columnCalcs.recalc(this.table.rowManager.displayRows); + } + } + } + +}; + +Cell.prototype.setValueProcessData = function(value, mutate){ + var changed = false; + + if(this.value != value){ + + changed = true; + + if(mutate){ + if(this.column.extensions.mutate && this.column.extensions.mutate.type !== "data"){ + value = this.table.extensions.mutator.transformCell(this, value); + } + } + } + + this.setValueActual(value); + + return changed; +} + +Cell.prototype.setValueActual = function(value){ + this.oldValue = this.value; + + this.value = value; + + this.column.setFieldValue(this.row.data, value); + + this._generateContents(); + this._generateTooltip(); + + //set resizable handles + if(this.table.options.resizableColumns && this.table.extExists("resizeColumns")){ + this.table.extensions.resizeColumns.initializeColumn("cell", this.column, this.element); + } + + //handle frozen cells + if(this.table.extExists("frozenColumns")){ + this.table.extensions.frozenColumns.layoutElement(this.element, this.column); + } +}; + +Cell.prototype.setWidth = function(width){ + this.width = width; + // this.element.css("width", width || ""); + this.element[0].style.width = (width ? width + "px" : ""); +}; + +Cell.prototype.getWidth = function(){ + return this.width || this.element.outerWidth(); +}; + +Cell.prototype.setMinWidth = function(minWidth){ + this.minWidth = minWidth; + this.element[0].style.minWidth = (minWidth ? minWidth + "px" : ""); +}; + +Cell.prototype.checkHeight = function(){ + var height = this.element.css("height"); + + this.row.reinitializeHeight(); +}; + +Cell.prototype.clearHeight = function(){ + this.element[0].style.height = ""; +}; + + +Cell.prototype.setHeight = function(height){ + this.height = height; + this.element[0].style.height = (height ? height + "px" : ""); +}; + +Cell.prototype.getHeight = function(){ + return this.height || this.element.outerHeight(); +}; + +Cell.prototype.show = function(){ + this.element[0].style.display = ""; +}; + +Cell.prototype.hide = function(){ + this.element[0].style.display = "none"; +}; + +Cell.prototype.edit = function(){ + this.element.focus(); +}; + +Cell.prototype.delete = function(){ + this.element.detach(); + this.column.deleteCell(this); + this.row.deleteCell(this); +}; + +//////////////// Navigation ///////////////// + +Cell.prototype.nav = function(){ + + var self = this, + nextCell = false, + index = this.row.getCellIndex(this); + + return { + next:function(){ + + var nextCell = this.right(), + nextRow; + + if(!nextCell){ + nextRow = self.table.rowManager.nextDisplayRow(self.row); + + if(nextRow){ + nextCell = nextRow.findNextEditableCell(-1); + + if(nextCell){ + nextCell.edit(); + return true; + } + } + }else{ + return true; + } + + return false; + + }, + prev:function(){ + var nextCell = this.left(), + prevRow; + + if(!nextCell){ + prevRow = self.table.rowManager.prevDisplayRow(self.row); + + if(prevRow){ + nextCell = prevRow.findPrevEditableCell(prevRow.cells.length); + + if(nextCell){ + nextCell.edit(); + return true; + } + } + + }else{ + return true; + } + + return false; + + }, + left:function(){ + + nextCell = self.row.findPrevEditableCell(index); + + if(nextCell){ + nextCell.edit(); + return true; + }else{ + return false; + } + + }, + right:function(){ + nextCell = self.row.findNextEditableCell(index); + + if(nextCell){ + nextCell.edit(); + return true; + }else{ + return false; + } + }, + up:function(){ + var nextRow = self.table.rowManager.prevDisplayRow(self.row); + + if(nextRow){ + nextRow.cells[index].edit(); + } + }, + down:function(){ + var nextRow = self.table.rowManager.nextDisplayRow(self.row); + + if(nextRow){ + nextRow.cells[index].edit(); + } + }, + + } + +}; + +Cell.prototype.getIndex = function(){ + this.row.getCellIndex(this); +}; + +//////////////// Object Generation ///////////////// +Cell.prototype.getComponent = function(){ + return new CellComponent(this); +}; \ No newline at end of file diff --git a/js/tabulator/src/js/column.js b/js/tabulator/src/js/column.js new file mode 100644 index 0000000..2bf6c7b --- /dev/null +++ b/js/tabulator/src/js/column.js @@ -0,0 +1,896 @@ + +//public column object +var ColumnComponent = function (column){ + this.column = column; + this.type = "ColumnComponent"; +}; + +ColumnComponent.prototype.getElement = function(){ + return this.column.getElement(); +}; + +ColumnComponent.prototype.getDefinition = function(){ + return this.column.getDefinition(); +}; + +ColumnComponent.prototype.getField = function(){ + return this.column.getField(); +}; + +ColumnComponent.prototype.getCells = function(){ + var cells = []; + + this.column.cells.forEach(function(cell){ + cells.push(cell.getComponent()); + }); + + return cells; +}; + +ColumnComponent.prototype.getVisibility = function(){ + return this.column.visible; +}; + +ColumnComponent.prototype.show = function(){ + this.column.show(); +}; + +ColumnComponent.prototype.hide = function(){ + this.column.hide(); +}; + +ColumnComponent.prototype.toggle = function(){ + if(this.column.visible){ + this.column.hide(); + }else{ + this.column.show(); + } +}; + +ColumnComponent.prototype.delete = function(){ + this.column.delete(); +}; + +ColumnComponent.prototype._getSelf = function(){ + return this.column; +}; + + +var Column = function(def, parent){ + var self = this; + + this.table = parent.table; + this.definition = def; //column definition + this.parent = parent; //hold parent object + this.type = "column"; //type of element + this.columns = []; //child columns + this.cells = []; //cells bound to this column + this.element = $("
"); //column header element + this.contentElement = false; + this.groupElement = $("
"); //column group holder element + this.isGroup = false; + this.tooltip = false; //hold column tooltip + this.hozAlign = ""; //horizontal text alignment + + //multi dimentional filed handling + this.field =""; + this.fieldStructure = ""; + this.getFieldValue = ""; + this.setFieldValue = ""; + + this.setField(this.definition.field); + + + this.extensions = {}; //hold extension variables; + + this.cellEvents = { + cellClick:false, + cellDblClick:false, + cellContext:false, + cellTap:false, + cellDblTap:false, + cellTapHold:false + }; + + this.width = null; //column width + this.minWidth = null; //column minimum width + this.widthFixed = false; //user has specified a width for this column + + this.visible = true; //default visible state + + //initialize column + if(def.columns){ + + this.isGroup = true; + + def.columns.forEach(function(def, i){ + var newCol = new Column(def, self); + self.attachColumn(newCol); + }); + + self.checkColumnVisibility(); + }else{ + parent.registerColumnField(this); + } + + if(def.rowHandle && this.table.options.movableRows !== false && this.table.extExists("moveRow")){ + this.table.extensions.moveRow.setHandle(true); + } + + this._mapDepricatedFunctionality() + + this._buildHeader(); +}; + + +//////////////// Setup Functions ///////////////// +Column.prototype._mapDepricatedFunctionality = function(field){ + if(this.definition.tooltipHeader){ + console.warn("The%c tooltipHeader%c column definition property has been depricated and will be removed in version 4.0, use %c headerTooltio%c instead.", "font-weight:bold;", "font-weight:regular;", "font-weight:bold;", "font-weight:regular;"); + + if(typeof this.definition.headerTooltip == "undefined"){ + this.definition.headerTooltip = this.definition.tooltipHeader; + } + } +}; + +Column.prototype.setField = function(field){ + this.field = field; + this.fieldStructure = field ? field.split(".") : []; + this.getFieldValue = this.fieldStructure.length > 1 ? this._getNestedData : this._getFlatData; + this.setFieldValue = this.fieldStructure.length > 1 ? this._setNesteData : this._setFlatData; +}; + +//register column position with column manager +Column.prototype.registerColumnPosition = function(column){ + this.parent.registerColumnPosition(column); +}; + +//register column position with column manager +Column.prototype.registerColumnField = function(column){ + this.parent.registerColumnField(column); +}; + +//trigger position registration +Column.prototype.reRegisterPosition = function(){ + if(this.isGroup){ + this.columns.forEach(function(column){ + column.reRegisterPosition(); + }); + }else{ + this.registerColumnPosition(this); + } +}; + +//build header element +Column.prototype._buildHeader = function(){ + var self = this, + def = self.definition, + dblTap, tapHold, tap; + + self.element.empty(); + + self.contentElement = self._buildColumnHeaderContent(); + + self.element.append(self.contentElement); + + if(self.isGroup){ + self._buildGroupHeader(); + }else{ + self._buildColumnHeader(); + } + + //set header tooltips + var tooltip = def.headerTooltip || def.tooltip === false ? def.headerTooltip : self.table.options.tooltipsHeader; + + if(tooltip){ + if(tooltip === true){ + if(def.field){ + self.table.extensions.localize.bind("columns." + def.field, function(value){ + self.element.attr("title", value || def.title); + }); + }else{ + self.element.attr("title", def.title); + } + + }else{ + if(typeof(tooltip) == "function"){ + tooltip = tooltip(self.getComponent()); + } + + self.element.attr("title", tooltip); + } + + }else{ + self.element.attr("title", ""); + } + + + + //set resizable handles + if(self.table.options.resizableColumns && self.table.extExists("resizeColumns")){ + self.table.extensions.resizeColumns.initializeColumn("header", self, self.element); + } + + //set resizable handles + if(def.headerFilter && self.table.extExists("filter") && self.table.extExists("edit")){ + if(typeof def.headerFilterPlaceholder !== "undefined" && def.field){ + self.table.extensions.localize.setHeaderFilterColumnPlaceholder(def.field, def.headerFilterPlaceholder); + } + + self.table.extensions.filter.initializeColumn(self); + } + + + //set resizable handles + if(self.table.extExists("frozenColumns")){ + self.table.extensions.frozenColumns.initializeColumn(self); + } + + //set movable column + if(self.table.options.movableColumns && !self.isGroup && self.table.extExists("moveColumn")){ + self.table.extensions.moveColumn.initializeColumn(self); + } + + //set calcs column + if((def.topCalc || def.bottomCalc) && self.table.extExists("columnCalcs")){ + self.table.extensions.columnCalcs.initializeColumn(self); + } + + + //setup header click event bindings + if(typeof(def.headerClick) == "function"){ + self.element.on("click", function(e){def.headerClick(e, self.getComponent())}) + } + + if(typeof(def.headerDblClick) == "function"){ + self.element.on("dblclick", function(e){def.headerDblClick(e, self.getComponent())}); + } + + if(typeof(def.headerContext) == "function"){ + self.element.on("contextmenu", function(e){def.headerContext(e, self.getComponent())}); + } + + //setup header tap event bindings + if(typeof(def.headerTap) == "function"){ + tap = false; + + self.element.on("touchstart", function(e){ + tap = true; + }); + + self.element.on("touchend", function(e){ + if(tap){ + def.headerTap(e, self.getComponent()); + } + + tap = false; + }); + } + + if(typeof(def.headerDblTap) == "function"){ + dblTap = null; + + self.element.on("touchend", function(e){ + + if(dblTap){ + clearTimeout(dblTap); + dblTap = null; + + def.headerDblTap(e, self.getComponent()); + }else{ + + dblTap = setTimeout(function(){ + clearTimeout(dblTap); + dblTap = null; + }, 300); + } + + }); + } + + if(typeof(def.headerTapHold) == "function"){ + tapHold = null; + + self.element.on("touchstart", function(e){ + clearTimeout(tapHold); + + tapHold = setTimeout(function(){ + clearTimeout(tapHold); + tapHold = null; + tap = false; + def.headerTapHold(e, self.getComponent()); + }, 1000) + + }); + + self.element.on("touchend", function(e){ + clearTimeout(tapHold); + tapHold = null; + }); + } + + //store column cell click event bindings + if(typeof(def.cellClick) == "function"){ + self.cellEvents.cellClick = def.cellClick; + } + + if(typeof(def.cellDblClick) == "function"){ + self.cellEvents.cellDblClick = def.cellDblClick; + } + + if(typeof(def.cellContext) == "function"){ + self.cellEvents.cellContext = def.cellContext; + } + + //setup column cell tap event bindings + if(typeof(def.cellTap) == "function"){ + self.cellEvents.cellTap = def.cellTap; + } + + if(typeof(def.cellDblTap) == "function"){ + self.cellEvents.cellDblTap = def.cellDblTap; + } + + if(typeof(def.cellTapHold) == "function"){ + self.cellEvents.cellTapHold = def.cellTapHold; + } +}; + +//build header element for header +Column.prototype._buildColumnHeader = function(){ + var self = this, + def = self.definition, + table = self.table, + sortable; + + //set column sorter + if(table.extExists("sort")){ + table.extensions.sort.initializeColumn(self, self.contentElement); + } + + //set column formatter + if(table.extExists("format")){ + table.extensions.format.initializeColumn(self); + } + + //set column editor + if(typeof def.editor != "undefined" && table.extExists("edit")){ + table.extensions.edit.initializeColumn(self); + } + + //set colum validator + if(typeof def.validator != "undefined" && table.extExists("validate")){ + table.extensions.validate.initializeColumn(self); + } + + + //set column mutator + if(typeof def.mutator != "undefined" && table.extExists("mutator")){ + table.extensions.mutator.initializeColumn(self); + } + + //set column accessor + if(typeof def.accessor != "undefined" && table.extExists("accessor")){ + table.extensions.accessor.initializeColumn(self); + } + + //set column visibility + if(typeof def.visible != "undefined"){ + if(def.visible){ + self.show(); + }else{ + self.hide(); + } + } + + //asign additional css classes to column header + if(def.cssClass){ + self.element.addClass(def.cssClass); + } + + //set min width if present + self.setMinWidth(typeof def.minWidth == "undefined" ? self.table.options.columnMinWidth : def.minWidth); + + self.reinitializeWidth(); + + //set tooltip if present + self.tooltip = self.definition.tooltip || self.definition.tooltip === false ? self.definition.tooltip : self.table.options.tooltips; + + //set orizontal text alignment + self.hozAlign = typeof(self.definition.align) == "undefined" ? "" : self.definition.align; +}; + +Column.prototype._buildColumnHeaderContent = function(){ + var self = this, + def = self.definition, + table = self.table; + + var contentElement = $("
"); + + contentElement.append(self._buildColumnHeaderTitle()); + + return contentElement; +}; + +//build title element of column +Column.prototype._buildColumnHeaderTitle = function(){ + var self = this, + def = self.definition, + table = self.table, + title; + + var titleHolderElement = $("
"); + + if(def.editableTitle){ + var titleElement = $(""); + + titleElement.on("click", function(e){ + e.stopPropagation(); + $(this).focus(); + }); + + titleElement.on("change", function(){ + var newTitle = $(this).val(); + def.title = newTitle; + table.options.columnTitleChanged(self.getComponent()); + }); + + titleHolderElement.append(titleElement); + + if(def.field){ + table.extensions.localize.bind("columns." + def.field, function(text){ + titleElement.val(text || (def.title || " ")); + }); + }else{ + titleElement.val(def.title || " "); + } + + }else{ + if(def.field){ + table.extensions.localize.bind("columns." + def.field, function(text){ + self._formatColumnHeaderTitle(titleHolderElement, text || (def.title || " ")); + }); + }else{ + self._formatColumnHeaderTitle(titleHolderElement, def.title || " "); + } + } + + return titleHolderElement; +}; + +Column.prototype._formatColumnHeaderTitle = function(el, title){ + var formatter, contents; + + if(this.definition.titleFormatter && this.table.extExists("format")){ + + formatter = this.table.extensions.format.getFormatter(this.definition.titleFormatter); + + contents = formatter.call(this.table.extensions.format, { + getValue:function(){ + return title; + }, + getElement:function(){ + return el; + } + }, this.definition.titleFormatterParams || {}); + + el.append(contents); + }else{ + el.html(title); + } +}; + + +//build header element for column group +Column.prototype._buildGroupHeader = function(){ + var self = this, + def = self.definition, + table = self.table; + + self.element.addClass("tabulator-col-group") + .attr("role", "columngroup") + .attr("aria-title", def.title); + + self.element.append(self.groupElement); +}; + +//flat field lookup +Column.prototype._getFlatData = function(data){ + return data[this.field]; +}; + +//nested field lookup +Column.prototype._getNestedData = function(data){ + var dataObj = data, + structure = this.fieldStructure, + length = structure.length, + output; + + for(let i = 0; i < length; i++){ + + dataObj = dataObj[structure[i]]; + + output = dataObj; + + if(!dataObj){ + break; + } + } + + return output; +}; + +//flat field set +Column.prototype._setFlatData = function(data, value){ + data[this.field] = value; +}; + +//nested field set +Column.prototype._setNesteData = function(data, value){ + var dataObj = data, + structure = this.fieldStructure, + length = structure.length; + + for(let i = 0; i < length; i++){ + + if(i == length -1){ + dataObj[structure[i]] = value; + }else{ + if(!dataObj[structure[i]]){ + dataObj[structure[i]] = {}; + } + + dataObj = dataObj[structure[i]]; + } + } +}; + + +//attach column to this group +Column.prototype.attachColumn = function(column){ + var self = this; + + if(self.groupElement){ + self.columns.push(column); + self.groupElement.append(column.getElement()); + }else{ + console.warn("Column Warning - Column being attached to another column instead of column group"); + } +}; + +//vertically align header in column +Column.prototype.verticalAlign = function(alignment){ + + if(this.parent.isGroup){ + this.element.css("height", this.parent.getGroupElement().innerHeight()) + }else{ + this.element.css("height", this.parent.getHeadersElement().innerHeight()) + } + + //vertically align cell contents + if(!this.isGroup && alignment !== "top"){ + if(alignment === "bottom"){ + this.element.css({"padding-top": this.element.innerHeight() - this.contentElement.outerHeight()}); + }else{ + this.element.css({"padding-top": (this.element.innerHeight() - this.contentElement.outerHeight()) / 2 }); + } + } + + this.columns.forEach(function(column){ + column.verticalAlign(alignment); + }); +}; + +//clear vertical alignmenet +Column.prototype.clearVerticalAlign = function(){ + this.element.css("padding-top",""); + this.element.css("height",""); + + this.columns.forEach(function(column){ + column.clearVerticalAlign(); + }); +}; + +//// Retreive Column Information //// + +//return column header element +Column.prototype.getElement = function(){ + return this.element; +}; + +//return colunm group element +Column.prototype.getGroupElement = function(){ + return this.groupElement; +}; + +//return field name +Column.prototype.getField = function(){ + return this.field; +}; + +//return the first column in a group +Column.prototype.getFirstColumn = function(){ + if(!this.isGroup){ + return this; + }else{ + if(this.columns.length){ + return this.columns[0].getFirstColumn(); + }else{ + return false; + } + } +}; + +//return the last column in a group +Column.prototype.getLastColumn = function(){ + if(!this.isGroup){ + return this; + }else{ + if(this.columns.length){ + return this.columns[this.columns.length -1].getLastColumn(); + }else{ + return false; + } + } +}; + +//return all columns in a group +Column.prototype.getColumns = function(){ + return this.columns; +}; + +//return all columns in a group +Column.prototype.getCells = function(){ + return this.cells; +}; + +//retreive the top column in a group of columns +Column.prototype.getTopColumn = function(){ + if(this.parent.isGroup){ + return this.parent.getTopColumn(); + }else{ + return this; + } +}; + +//return column definition object +Column.prototype.getDefinition = function(updateBranches){ + var colDefs = []; + + if(this.isGroup && updateBranches){ + this.columns.forEach(function(column){ + colDefs.push(column.getDefinition(true)); + }); + + this.definition.columns = colDefs; + } + + return this.definition; +}; + +//////////////////// Actions //////////////////// + +Column.prototype.checkColumnVisibility = function(){ + var visible = false; + + this.columns.forEach(function(column){ + if(column.visible){ + visible = true; + } + }); + + if(visible){ + this.show() + this.parent.table.options.columnVisibilityChanged(this.getComponent(), false); + }else{ + this.hide(); + } + +}; + +//show column +Column.prototype.show = function(){ + if(!this.visible){ + this.visible = true; + + this.element.show(); + this.table.columnManager._verticalAlignHeaders(); + + if(this.parent.isGroup){ + this.parent.checkColumnVisibility(); + } + + this.cells.forEach(function(cell){ + cell.show(); + }); + + if(this.table.options.persistentLayout && this.table.extExists("persistentLayout", true)){ + this.table.extensions.persistentLayout.save(); + } + + this.table.options.groupVisibilityChanged(this.getComponent(), true); + } +}; + +//hide column +Column.prototype.hide = function(){ + if(this.visible){ + this.visible = false; + + this.element.hide(); + this.table.columnManager._verticalAlignHeaders(); + + if(this.parent.isGroup){ + this.parent.checkColumnVisibility(); + } + + this.cells.forEach(function(cell){ + cell.hide(); + }); + + if(this.table.options.persistentLayout && this.table.extExists("persistentLayout", true)){ + this.table.extensions.persistentLayout.save(); + } + + this.table.options.groupVisibilityChanged(this.getComponent(), false); + } +}; + +Column.prototype.setWidth = function(width){ + this.widthFixed = true; + this.setWidthActual(width); +}; + +Column.prototype.setWidthActual = function(width){ + if(isNaN(width)){ + width = Math.floor((this.table.element.innerWidth()/100) * parseInt(width)); + } + + width = Math.max(this.minWidth, width); + + this.width = width; + + if(!this.isGroup){ + this.element.css("width", width || ""); + + this.cells.forEach(function(cell){ + cell.setWidth(width); + }); + } + + //set resizable handles + if(this.table.extExists("frozenColumns")){ + this.table.extensions.frozenColumns.layout(); + } +}; + + +Column.prototype.checkCellHeights = function(){ + var rows = []; + + this.cells.forEach(function(cell){ + if(cell.row.heightInitialized){ + if(cell.row.element[0].offsetParent !== null){ + rows.push(cell.row); + cell.row.clearCellHeight(); + }else{ + cell.row.heightInitialized = false; + } + } + }); + + rows.forEach(function(row){ + row.calcHeight(); + }) + + rows.forEach(function(row){ + row.setCellHeight(); + }) +}; + +Column.prototype.getWidth = function(){ + return this.element.outerWidth(); +}; + +Column.prototype.getHeight = function(){ + return this.element.outerHeight(); +}; + +Column.prototype.setMinWidth = function(minWidth){ + this.minWidth = minWidth; + + this.element.css("min-width", minWidth || ""); + + this.cells.forEach(function(cell){ + cell.setMinWidth(minWidth); + }); +}; + +Column.prototype.delete = function(){ + if(this.isGroup){ + this.columns.forEach(function(column){ + column.delete(); + }); + } + + var cellCount = this.cells.length; + + for(let i = 0; i < cellCount; i++){ + this.cells[0].delete(); + } + + this.element.detach(); + + this.table.columnManager.deregisterColumn(this); +}; + +//////////////// Cell Management ///////////////// + +//generate cell for this column +Column.prototype.generateCell = function(row){ + var self = this; + + var cell = new Cell(self, row); + + this.cells.push(cell); + + return cell; +}; + +Column.prototype.reinitializeWidth = function(){ + + this.widthFixed = false; + + //set width if present + if(typeof this.definition.width !== "undefined"){ + this.setWidth(this.definition.width); + } + + this.fitToData(); +} + +//set column width to maximum cell width +Column.prototype.fitToData = function(){ + var self = this; + + if(!this.widthFixed){ + this.element.css("width", "") + + self.cells.forEach(function(cell){ + cell.setWidth(""); + }); + } + + var maxWidth = this.element.outerWidth(); + + if(!self.width || !this.widthFixed){ + self.cells.forEach(function(cell){ + var width = cell.getWidth(); + + if(width > maxWidth){ + maxWidth = width; + } + }); + + if(maxWidth){ + self.setWidthActual(maxWidth + 1); + } + + } +}; + +Column.prototype.deleteCell = function(cell){ + var index = this.cells.indexOf(cell); + + if(index > -1){ + this.cells.splice(index, 1); + } +}; + +//////////////// Event Bindings ///////////////// + +//////////////// Object Generation ///////////////// +Column.prototype.getComponent = function(){ + return new ColumnComponent(this); +}; \ No newline at end of file diff --git a/js/tabulator/src/js/column_manager.js b/js/tabulator/src/js/column_manager.js new file mode 100644 index 0000000..5a60ab2 --- /dev/null +++ b/js/tabulator/src/js/column_manager.js @@ -0,0 +1,462 @@ +var ColumnManager = function(table){ + this.table = table; //hold parent table + this.headersElement = $("
"); + this.element = $("
"); //containing element + this.rowManager = null; //hold row manager object + this.columns = []; // column definition object + this.columnsByIndex = []; //columns by index + this.columnsByField = []; //columns by field + this.scrollLeft = 0; + + this.element.prepend(this.headersElement); +}; + + +////////////// Setup Functions ///////////////// + +//link to row manager +ColumnManager.prototype.setRowManager = function(manager){ + this.rowManager = manager; +}; + +//return containing element +ColumnManager.prototype.getElement = function(){ + return this.element; +}; + +//return header containing element +ColumnManager.prototype.getHeadersElement = function(){ + return this.headersElement; +}; + +//scroll horizontally to match table body +ColumnManager.prototype.scrollHorizontal = function(left){ + var hozAdjust = 0, + scrollWidth = this.element[0].scrollWidth - this.table.element.innerWidth(); + + this.element.scrollLeft(left); + + //adjust for vertical scrollbar moving table when present + if(left > scrollWidth){ + hozAdjust = left - scrollWidth + this.element.css("margin-left", -(hozAdjust)); + }else{ + this.element.css("margin-left", 0); + } + + //keep frozen columns fixed in position + //this._calcFrozenColumnsPos(hozAdjust + 3); + + this.scrollLeft = left; + + if(this.table.extExists("frozenColumns")){ + this.table.extensions.frozenColumns.layout(); + } +}; + + +///////////// Column Setup Functions ///////////// + +ColumnManager.prototype.setColumns = function(cols, row){ + var self = this; + + self.headersElement.empty(); + + self.columns = []; + self.columnsByIndex = []; + self.columnsByField = []; + + + //reset frozen columns + if(self.table.extExists("frozenColumns")){ + self.table.extensions.frozenColumns.reset(); + } + + cols.forEach(function(def, i){ + self._addColumn(def); + }); + + self._reIndexColumns(); + + if(self.table.options.responsiveLayout && self.table.extExists("responsiveLayout", true)){ + self.table.extensions.responsiveLayout.initialize(); + } + + self.redraw(true); +}; + +ColumnManager.prototype._addColumn = function(definition, before, nextToColumn){ + var column = new Column(definition, this); + var index = nextToColumn ? this.findColumnIndex(nextToColumn) : nextToColumn; + + if(nextToColumn && index > -1){ + + let parentIndex = this.columns.indexOf(nextToColumn.getTopColumn()); + + if(before){ + this.columns.splice(parentIndex, 0, column); + nextToColumn.getElement().before(column.getElement()); + }else{ + this.columns.splice(parentIndex + 1, 0, column); + nextToColumn.getElement().after(column.getElement()); + } + + }else{ + if(before){ + this.columns.unshift(column); + this.headersElement.prepend(column.getElement()); + }else{ + this.columns.push(column); + this.headersElement.append(column.getElement()); + } + } + + return column; +}; + +ColumnManager.prototype.registerColumnField = function(col){ + if(col.definition.field){ + this.columnsByField[col.definition.field] = col; + } +}; + +ColumnManager.prototype.registerColumnPosition = function(col){ + this.columnsByIndex.push(col); +}; + +ColumnManager.prototype._reIndexColumns = function(){ + this.columnsByIndex = []; + + this.columns.forEach(function(column){ + column.reRegisterPosition(); + }); +}; + +//ensure column headers take up the correct amount of space in column groups +ColumnManager.prototype._verticalAlignHeaders = function(){ + var self = this; + + self.columns.forEach(function(column){ + column.clearVerticalAlign(); + }); + + self.columns.forEach(function(column){ + column.verticalAlign(self.table.options.columnVertAlign); + }); + + self.rowManager.adjustTableSize(); +}; + +//////////////// Column Details ///////////////// + +ColumnManager.prototype.findColumn = function(subject){ + var self = this; + + if(typeof subject == "object"){ + + if(subject instanceof Column){ + //subject is column element + return subject; + }else if(subject instanceof ColumnComponent){ + //subject is public column component + return subject._getSelf() || false; + }else if(subject instanceof jQuery){ + //subject is a jquery element of the column header + let match = self.columns.find(function(column){ + return column.element === subject; + }); + + return match || false; + } + + }else{ + //subject should be treated as the field name of the column + return this.columnsByField[subject] || false; + } + + //catch all for any other type of input + + return false; +}; + +ColumnManager.prototype.getColumnByField = function(field){ + return this.columnsByField[field]; +}; + +ColumnManager.prototype.getColumnByIndex = function(index){ + return this.columnsByIndex[index]; +}; + +ColumnManager.prototype.getColumns = function(){ + return this.columns; +}; + +ColumnManager.prototype.findColumnIndex = function(column){ + return this.columnsByIndex.findIndex(function(col){ + return column === col; + }); +}; + +//return all columns that are not groups +ColumnManager.prototype.getRealColumns = function(){ + return this.columnsByIndex; +}; + +//travers across columns and call action +ColumnManager.prototype.traverse = function(callback){ + var self = this; + + self.columnsByIndex.forEach(function(column,i){ + callback(column, i); + }); +}; + +//get defintions of actual columns +ColumnManager.prototype.getDefinitions = function(active){ + var self = this, + output = []; + + self.columnsByIndex.forEach(function(column){ + if(!active || (active && column.visible)){ + output.push(column.getDefinition()); + } + }); + + return output; +}; + +//get full nested definition tree +ColumnManager.prototype.getDefinitionTree = function(){ + var self = this, + output = []; + + self.columns.forEach(function(column){ + output.push(column.getDefinition(true)); + }); + + return output; +}; + +ColumnManager.prototype.getComponents = function(){ + var self = this, + output = []; + + self.columnsByIndex.forEach(function(column){ + output.push(column.getComponent()); + }); + + return output; +}; + +ColumnManager.prototype.getWidth = function(){ + var width = 0; + + this.columnsByIndex.forEach(function(column){ + if(column.visible){ + width += column.getWidth(); + } + }); + + return width; +}; + +ColumnManager.prototype.moveColumn = function(from, to, after){ + + this._moveColumnInArray(this.columns, from, to, after); + this._moveColumnInArray(this.columnsByIndex, from, to, after, true); + + this.table.options.columnMoved(from.getComponent()); + + if(this.table.options.persistentLayout && this.table.extExists("persistentLayout", true)){ + this.table.extensions.persistentLayout.save(); + } +}; + +ColumnManager.prototype._moveColumnInArray = function(columns, from, to, after, updateRows){ + var fromIndex = columns.indexOf(from), + toIndex; + + if (fromIndex > -1) { + + columns.splice(fromIndex, 1); + + toIndex = columns.indexOf(to); + + if (toIndex > -1) { + + if(after){ + toIndex = toIndex+1; + } + + }else{ + toIndex = fromIndex; + } + + columns.splice(toIndex, 0, from); + + if(updateRows){ + + this.table.rowManager.rows.forEach(function(row){ + if(row.cells.length){ + var cell = row.cells.splice(fromIndex, 1)[0]; + row.cells.splice(toIndex, 0, cell); + } + }); + } + } +}; + +//////////////// Cell Management ///////////////// + +ColumnManager.prototype.generateCells = function(row){ + var self = this; + + var cells = []; + + self.columnsByIndex.forEach(function(column){ + cells.push(column.generateCell(row)); + }); + + return cells; +}; + +//////////////// Column Management ///////////////// + + +ColumnManager.prototype.getFlexBaseWidth = function(){ + var self = this, + totalWidth = self.table.element.innerWidth(), //table element width + fixedWidth = 0; + + //adjust for vertical scrollbar if present + if(self.rowManager.element[0].scrollHeight > self.rowManager.element.innerHeight()){ + totalWidth -= self.rowManager.element[0].offsetWidth - self.rowManager.element[0].clientWidth; + } + + this.columnsByIndex.forEach(function(column){ + var width, minWidth, colWidth; + + if(column.visible){ + + width = column.definition.width || 0; + + minWidth = typeof column.minWidth == "undefined" ? self.table.options.columnMinWidth : parseInt(column.minWidth); + + if(typeof(width) == "string"){ + if(width.indexOf("%") > -1){ + colWidth = (totalWidth / 100) * parseInt(width) ; + }else{ + colWidth = parseInt(width); + } + }else{ + colWidth = width; + } + + fixedWidth += colWidth > minWidth ? colWidth : minWidth; + + } + }); + + return fixedWidth; +}; + +ColumnManager.prototype.addColumn = function(definition, before, nextToColumn){ + var column = this._addColumn(definition, before, nextToColumn); + + this._reIndexColumns(); + + if(this.table.options.responsiveLayout && this.table.extExists("responsiveLayout", true)){ + this.table.extensions.responsiveLayout.initialize(); + } + + if(this.table.extExists("columnCalcs")){ + this.table.extensions.columnCalcs.recalc(this.table.rowManager.displayRows); + } + + this.redraw(); + + if(this.table.extensions.layout.getMode() != "fitColumns"){ + column.reinitializeWidth(); + } + + this._verticalAlignHeaders(); + + this.table.rowManager.reinitialize(); +}; + +//remove column from system +ColumnManager.prototype.deregisterColumn = function(column){ + var field = column.getField(), + index; + + //remove from field list + if(field){ + delete this.columnsByField[field]; + } + + //remove from index list + index = this.columnsByIndex.indexOf(column); + + if(index > -1){ + this.columnsByIndex.splice(index, 1); + } + + //remove from column list + index = this.columns.indexOf(column); + + if(index > -1){ + this.columns.splice(index, 1); + } + + if(this.table.options.responsiveLayout && this.table.extExists("responsiveLayout", true)){ + this.table.extensions.responsiveLayout.initialize(); + } + + this.redraw(); +}; + +//redraw columns +ColumnManager.prototype.redraw = function(force){ + if(force){ + if(this.element.is(":visible")){ + this._verticalAlignHeaders(); + } + this.table.rowManager.resetScroll(); + this.table.rowManager.reinitialize(); + } + + if(this.table.extensions.layout.getMode() == "fitColumns"){ + this.table.extensions.layout.layout(); + }else{ + if(force){ + this.table.extensions.layout.layout(); + }else{ + if(this.table.options.responsiveLayout && this.table.extExists("responsiveLayout", true)){ + this.table.extensions.responsiveLayout.update(); + } + } + } + + if(this.table.extExists("frozenColumns")){ + this.table.extensions.frozenColumns.layout(); + } + + if(this.table.extExists("columnCalcs")){ + this.table.extensions.columnCalcs.recalc(this.table.rowManager.displayRows); + } + + if(force){ + if(this.table.options.persistentLayout && this.table.extExists("persistentLayout", true)){ + this.table.extensions.persistentLayout.save(); + } + + if(this.table.extExists("columnCalcs")){ + this.table.extensions.columnCalcs.redraw(); + } + } + + this.table.footerManager.redraw(); + + + +}; \ No newline at end of file diff --git a/js/tabulator/src/js/core.js b/js/tabulator/src/js/core.js new file mode 100644 index 0000000..d934d0e --- /dev/null +++ b/js/tabulator/src/js/core.js @@ -0,0 +1,1107 @@ +(function(){ + + 'use strict'; + + /*=include polyfills.js */ + + /*=include column_manager.js */ + /*=include column.js */ + /*=include row_manager.js */ + /*=include row.js */ + /*=include cell.js */ + /*=include footer_manager.js */ + + window.Tabulator = { + + columnManager:null, // hold Column Manager + rowManager:null, //hold Row Manager + footerManager:null, //holder Footer Manager + browser:"", //hold current browser type + browserSlow:false, //handle reduced functionality for slower browsers + + //setup options + options: { + + height:false, //height of tabulator + + layout:"fitData", ///layout type "fitColumns" | "fitData" + fitColumns:false, //DEPRICATED - fit colums to width of screen; + + columnMinWidth:40, //minimum global width for a column + columnVertAlign:"top", //vertical alignment of column headers + + resizableColumns:true, //resizable columns + + columns:[],//store for colum header info + + data:[], //default starting data + + tooltips: false, //Tool tip value + tooltipsHeader: false, //Tool tip for headers + + initialSort:false, //initial sorting criteria + + footerElement:false, //hold footer element + + index:"id", //filed for row index + + keybindings:[], //array for keybindings + + downloadDataMutator:false, //function to manipulate table data before it is downloaded + + addRowPos:"bottom", //position to insert blank rows, top|bottom + + selectable:"highlight", //highlight rows on hover + selectableRollingSelection:true, //roll selection once maximum number of selectable rows is reached + selectablePersistence:true, // maintain selection when table view is updated + selectableCheck:function(data, row){return true;}, //check wheather row is selectable + + headerFilterPlaceholder: false, //placeholder text to display in header filters + + history:false, //enable edit history + + locale:false, //current system language + langs:{}, + + virtualDom:true, //enable DOM virtualization + + persistentLayout:false, //store cookie with column _styles + persistentLayoutID:"", //id for stored cookie + + responsiveLayout:false, //responsive layout flags + + pagination:false, //set pagination type + paginationSize:false, //set number of rows to a page + paginationElement:false, //element to hold pagination numbers + paginationDataSent:{}, //pagination data sent to the server + paginationDataReceived:{}, //pagination data received from the server + paginator:false, //pagination url string builder + + ajaxURL:false, //url for ajax loading + ajaxParams:{}, //params for ajax loading + ajaxConfig:"get", //ajax request type + ajaxLoader:true, //show loader + ajaxLoaderLoading:false, //loader element + ajaxLoaderError:false, //loader element + ajaxFiltering:false, + ajaxSorting:false, + + groupBy:false, //enable table grouping and set field to group by + groupStartOpen:true, //starting state of group + + groupHeader:false, //header generation function + + movableColumns:false, //enable movable columns + movableRows:false, //enable movable rows + + rowFormatter:false, + + placeholder:false, + + //table building callbacks + tableBuilding:function(){}, + tableBuilt:function(){}, + + //render callbacks + renderStarted:function(){}, + renderComplete:function(){}, + + //row callbacks + rowClick:false, + rowDblClick:false, + rowContext:false, + rowTap:false, + rowDblTap:false, + rowTapHold:false, + rowAdded:function(){}, + rowDeleted:function(){}, + rowMoved:function(){}, + rowUpdated:function(){}, + rowSelectionChanged:function(){}, + rowSelected:function(){}, + rowDeselected:function(){}, + + //cell callbacks + cellEditing:function(){}, + cellEdited:function(){}, + cellEditCancelled:function(){}, + + //column callbacks + columnMoved:function(){}, + columnResized:function(){}, + columnTitleChanged:function(){}, + columnVisibilityChanged:function(){}, + + //HTML iport callbacks + htmlImporting:function(){}, + htmlImported:function(){}, + + //data callbacks + dataLoading:function(){}, + dataLoaded:function(){}, + dataEdited:function(){}, + + //ajax callbacks + ajaxRequesting:function(){}, + ajaxResponse:false, + ajaxError:function(){}, + + //filtering callbacks + dataFiltering:false, + dataFiltered:false, + + //sorting callbacks + dataSorting:function(){}, + dataSorted:function(){}, + + //grouping callbacks + groupToggleElement:"arrow", + groupClosedShowCalcs:false, + dataGrouping:function(){}, + dataGrouped:false, + groupVisibilityChanged:function(){}, + groupClick:false, + groupDblClick:false, + groupContext:false, + groupTap:false, + groupDblTap:false, + groupTapHold:false, + + //pagination callbacks + pageLoaded:function(){}, + + //localization callbacks + localized:function(){}, + + //validation has failed + validationFailed:function(){}, + + }, + + //convert depricated functionality to new functions + _mapDepricatedFunctionality:function(){ + + if(this.options.fitColumns){ + this.options.layout = "fitColumns"; + console.warn("The%c fitColumns:true%c option has been depricated and will be removed in version 4.0, use %c layout:'fitColumns'%c instead.", "font-weight:bold;", "font-weight:regular;", "font-weight:bold;", "font-weight:regular;"); + } + }, + + //constructor + _create: function(){ + var self = this, + element = this.element; + + self._mapDepricatedFunctionality(); + + self.bindExtensions(); + + if(element.is("table")){ + if(this.extExists("htmlTableImport", true)){ + self.extensions.htmlTableImport.parseTable(); + } + }else{ + + self.columnManager = new ColumnManager(self); + self.rowManager = new RowManager(self); + self.footerManager = new FooterManager(self); + + self.columnManager.setRowManager(self.rowManager); + self.rowManager.setColumnManager(self.columnManager); + + self._buildElement(); + + //give the browser a chance to fully render the table then load first data set if present + // setTimeout(function(){ + + //load initial data set + this._loadInitialData(); + + // },20) + } + }, + + + //build tabulator element + _buildElement: function(){ + var element = this.element, + ext = this.extensions, + options = this.options; + + options.tableBuilding(); + + element.addClass("tabulator") + .attr("role", "grid") + .empty(); + + this._detectBrowser(); + + if(this.extExists("layout", true)){ + ext.layout.initialize(options.layout); + } + + //set localization + if(options.headerFilterPlaceholder !== false){ + ext.localize.setHeaderFilterPlaceholder(options.headerFilterPlaceholder); + } + + for(let locale in options.langs){ + ext.localize.installLang(locale, options.langs[locale]); + } + + ext.localize.setLocale(options.locale); + + //configure placeholder element + if(typeof options.placeholder == "string"){ + options.placeholder = $("
" + options.placeholder + "
"); + } + + //set table height + if(options.height){ + options.height = isNaN(options.height) ? options.height : options.height + "px"; + this.element.css({"height": options.height}); + } + + //build table elements + element.append(this.columnManager.getElement()); + element.append(this.rowManager.getElement()); + + + if(options.footerElement){ + this.footerManager.activate(); + } + + + if(options.persistentLayout && this.extExists("persistentLayout", true)){ + ext.persistentLayout.initialize(options.persistentLayout, options.persistentLayoutID); + options.columns = ext.persistentLayout.load(options.columns); + } + + if(this.extExists("columnCalcs")){ + ext.columnCalcs.initialize(); + } + + this.columnManager.setColumns(options.columns); + + if(options.initialSort && this.extExists("sort", true)){ + ext.sort.setSort(options.initialSort); + } + + if(options.pagination && this.extExists("page", true)){ + ext.page.initialize(); + } + + if(options.groupBy && this.extExists("groupRows", true)){ + ext.groupRows.initialize(); + } + + if(this.extExists("ajax")){ + ext.ajax.initialize(); + } + + if(this.extExists("keybindings")){ + ext.keybindings.initialize(); + } + + if(this.extExists("selectRow")){ + ext.selectRow.clearSelectionData(); + } + + options.tableBuilt(); + }, + + _loadInitialData: function(){ + var self = this; + + if(self.options.pagination && self.extExists("page")){ + self.extensions.page.reset(true); + self.extensions.page.setPage(1); + + if(self.options.pagination == "local"){ + self.rowManager.setData(self.options.data); + } + }else{ + if(self.options.data.length){ + self.rowManager.setData(self.options.data); + }else{ + if(self.options.ajaxURL && self.extExists("ajax")){ + self.extensions.ajax.sendRequest(function(data){ + self.rowManager.setData(data); + }); + }else{ + self.rowManager.setData(self.options.data); + } + } + } + }, + + //set options + _setOption: function(option, value){ + console.error("Options Error - Tabulator does not allow options to be set after initialization unless there is a function defined for that purpose"); + }, + + //deconstructor + _destroy: function(){ + var element = this.element; + + element.empty(); + + element.removeClass("tabulator"); + }, + + _detectBrowser(){ + var ua = navigator.userAgent; + + if(ua.indexOf("Trident") > -1){ + this.brower = "ie"; + this.browserSlow = true; + }else if(ua.indexOf("Edge") > -1){ + this.brower = "edge"; + this.browserSlow = true; + }else{ + this.brower = "other"; + this.browserSlow = false; + } + }, + + ////////////////// Data Handling ////////////////// + + + //load data + setData:function(data, params, config){ + var self = this; + var self = this; + + if(typeof(data) === "string"){ + if (data.indexOf("{") == 0 || data.indexOf("[") == 0){ + //data is a json encoded string + self.rowManager.setData(JSON.parse(data)); + }else{ + + if(self.extExists("ajax", true)){ + if(params){ + self.extensions.ajax.setParams(params); + } + + if(config){ + self.extensions.ajax.setConfig(config); + } + + self.extensions.ajax.setUrl(data); + + if(self.options.pagination == "remote" && self.extExists("page", true)){ + self.extensions.page.reset(true); + self.extensions.page.setPage(1); + }else{ + //assume data is url, make ajax call to url to get data + self.extensions.ajax.sendRequest(function(data){ + self.rowManager.setData(data); + }); + } + } + } + }else{ + if(data){ + //asume data is already an object + self.rowManager.setData(data); + }else{ + + //no data provided, check if ajaxURL is present; + if(self.extExists("ajax") && self.extensions.ajax.getUrl){ + + if(self.options.pagination == "remote" && self.extExists("page", true)){ + self.extensions.page.reset(true); + self.extensions.page.setPage(1); + }else{ + self.extensions.ajax.sendRequest(function(data){ + self.rowManager.setData(data); + }); + } + + }else{ + //empty data + self.rowManager.setData([]); + } + } + } + }, + + //clear data + clearData:function(){ + this.rowManager.clearData(); + }, + + //get table data array + getData:function(active){ + return this.rowManager.getData(active); + }, + + //get table data array count + getDataCount:function(active){ + return this.rowManager.getDataCount(active); + }, + + //get table html + getHtml:function(active){ + return this.rowManager.getHtml(active); + }, + + //retrieve Ajax URL + getAjaxUrl:function(){ + if(this.extExists("ajax", true)){ + return this.extensions.ajax.getUrl(); + } + }, + + + //update table data + updateData:function(data){ + var self = this; + + if(data){ + data.forEach(function(item){ + var row = self.rowManager.findRow(item[self.options.index]); + + if(row){ + row.updateData(item); + } + }) + }else{ + console.warn("Update Error - No data provided"); + } + }, + + addData:function(data, pos, index){ + if(data){ + this.rowManager.addRows(data, pos, index); + }else{ + console.warn("Update Error - No data provided"); + } + }, + + //update table data + updateOrAddData:function(data){ + var self = this; + + if(data){ + data.forEach(function(item){ + var row = self.rowManager.findRow(item[self.options.index]); + + if(row){ + row.updateData(item); + }else{ + self.rowManager.addRow(item); + } + }) + }else{ + console.warn("Update Error - No data provided"); + } + }, + + //get row object + getRow:function(index){ + var row = this.rowManager.findRow(index); + + if(row){ + return row.getComponent(); + }else{ + console.warn("Find Error - No matching row found:", index); + return false; + } + }, + + //delete row from table + deleteRow:function(index){ + var row = this.rowManager.findRow(index); + + if(row){ + row.delete(); + return true; + }else{ + console.warn("Delete Error - No matching row found:", index); + return false; + } + }, + + //add row to table + addRow:function(data, pos, index){ + return this.rowManager.addRow(data, pos, index); + }, + + //update a row if it exitsts otherwise create it + updateOrAddRow:function(index, data){ + var row = this.rowManager.findRow(index); + + if(row){ + row.updateData(data); + }else{ + row = this.rowManager.addRow(data); + } + + return row.getComponent(); + }, + + //update row data + updateRow:function(index, data){ + var row = this.rowManager.findRow(index); + + if(row){ + row.updateData(data); + return row.getComponent(); + }else{ + console.warn("Update Error - No matching row found:", index); + return false; + } + }, + + //scroll to row in DOM + scrollToRow:function(index){ + var row = this.rowManager.findRow(index); + + if(row){ + return this.rowManager.scrollToRow(row); + }else{ + console.warn("Scroll Error - No matching row found:", index); + return false; + } + }, + + getRows:function(active){ + return this.rowManager.getComponents(active); + }, + + /////////////// Column Functions /////////////// + + setColumns:function(definition){ + this.columnManager.setColumns(definition); + }, + + getColumns:function(){ + return this.columnManager.getComponents(); + }, + + getColumnDefinitions:function(){ + return this.columnManager.getDefinitionTree(); + }, + + getColumnLayout:function(){ + if(this.extExists("persistentLayout", true)){ + return this.extensions.persistentLayout.parseColumns(this.columnManager.getColumns()); + } + }, + + setColumnLayout:function(layout){ + if(this.extExists("persistentLayout", true)){ + this.columnManager.setColumns(this.extensions.persistentLayout.mergeDefinition(this.options.columns, layout)) + return true; + } + return false; + }, + + showColumn:function(field){ + var column = this.columnManager.findColumn(field); + + if(column){ + column.show(); + }else{ + console.warn("Column Show Error - No matching column found:", field); + return false; + } + }, + + hideColumn:function(field){ + var column = this.columnManager.findColumn(field); + + if(column){ + column.hide(); + }else{ + console.warn("Column Hide Error - No matching column found:", field); + return false; + } + }, + + + toggleColumn:function(field){ + var column = this.columnManager.findColumn(field); + + if(column){ + if(column.visible){ + column.hide(); + }else{ + column.show(); + } + }else{ + console.warn("Column Visibility Toggle Error - No matching column found:", field); + return false; + } + }, + + addColumn:function(definition, before, field){ + var column = this.columnManager.findColumn(field); + + this.columnManager.addColumn(definition, before, column) + }, + + deleteColumn:function(field){ + var column = this.columnManager.findColumn(field); + + if(column){ + column.delete(); + }else{ + console.warn("Column Delete Error - No matching column found:", field); + return false; + } + }, + + + //////////// Localization Functions //////////// + setLocale:function(locale){ + this.extensions.localize.setLocale(locale); + }, + + getLocale:function(){ + return this.extensions.localize.getLocale(); + }, + + getLang:function(locale){ + return this.extensions.localize.getLang(locale); + }, + + //////////// General Public Functions //////////// + + //redraw list without updating data + redraw:function(force){ + this.columnManager.redraw(force); + this.rowManager.redraw(force); + }, + + setHeight:function(height){ + this.options.height = isNaN(height) ? height : height + "px"; + this.element.css({"height": this.options.height}); + this.rowManager.redraw(); + }, + + ///////////////////// Sorting //////////////////// + + //trigger sort + setSort:function(sortList, dir){ + if(this.extExists("sort", true)){ + this.extensions.sort.setSort(sortList, dir); + this.rowManager.sorterRefresh(); + } + }, + + getSort:function(){ + if(this.extExists("sort", true)){ + console.warn("The%c getSort%c function has been depricated and will be removed in version 4.0, use %c getSorters%c instead.", "font-weight:bold;", "font-weight:regular;", "font-weight:bold;", "font-weight:regular;"); + return this.getSorters(); + } + }, + + getSorters:function(){ + if(this.extExists("sort", true)){ + return this.extensions.sort.getSort(); + } + }, + + clearSort:function(){ + if(this.extExists("sort", true)){ + this.extensions.sort.clear(); + this.rowManager.sorterRefresh(); + } + }, + + + ///////////////////// Filtering //////////////////// + + //set standard filters + setFilter:function(field, type, value){ + if(this.extExists("filter", true)){ + this.extensions.filter.setFilter(field, type, value); + this.rowManager.filterRefresh(); + } + }, + + //add filter to array + addFilter:function(field, type, value){ + if(this.extExists("filter", true)){ + this.extensions.filter.addFilter(field, type, value); + this.rowManager.filterRefresh(); + } + }, + + //get all filters + getFilter:function(all){ + console.warn("The%c getFilter%c function has been depricated and will be removed in version 4.0, use %c getFilters%c instead.", "font-weight:bold;", "font-weight:regular;", "font-weight:bold;", "font-weight:regular;"); + this.getFilters(all); + }, + + getFilters:function(all){ + if(this.extExists("filter", true)){ + return this.extensions.filter.getFilters(all); + } + }, + + getHeaderFilters:function(){ + if(this.extExists("filter", true)){ + return this.extensions.filter.getHeaderFilters(); + } + }, + + + + + //remove filter from array + removeFilter:function(field, type, value){ + if(this.extExists("filter", true)){ + this.extensions.filter.removeFilter(field, type, value); + this.rowManager.filterRefresh(); + } + }, + + //clear filters + clearFilter:function(all){ + if(this.extExists("filter", true)){ + this.extensions.filter.clearFilter(all); + this.rowManager.filterRefresh(); + } + }, + + //clear header filters + clearHeaderFilter:function(){ + if(this.extExists("filter", true)){ + this.extensions.filter.clearHeaderFilter(); + this.rowManager.filterRefresh(); + } + }, + + ///////////////////// Filtering //////////////////// + selectRow:function(rows){ + if(this.extExists("selectRow", true)){ + this.extensions.selectRow.selectRows(rows); + } + }, + + deselectRow:function(rows){ + if(this.extExists("selectRow", true)){ + this.extensions.selectRow.deselectRows(rows); + } + }, + + toggleSelectRow:function(row){ + if(this.extExists("selectRow", true)){ + this.extensions.selectRow.toggleRow(row); + } + }, + + getSelectedRows:function(){ + if(this.extExists("selectRow", true)){ + return this.extensions.selectRow.getSelectedRows(); + } + }, + + getSelectedData:function(){ + if(this.extExists("selectRow", true)){ + return this.extensions.selectRow.getSelectedData(); + } + }, + + //////////// Pagination Functions //////////// + + setMaxPage:function(max){ + if(this.options.pagination && this.extExists("page")){ + this.extensions.page.setMaxPage(max); + }else{ + return false; + } + }, + + setPage:function(page){ + if(this.options.pagination && this.extExists("page")){ + this.extensions.page.setPage(page); + }else{ + return false; + } + }, + + setPageSize:function(size){ + if(this.options.pagination && this.extExists("page")){ + this.extensions.page.setPageSize(size); + this.extensions.page.setPage(1); + }else{ + return false; + } + }, + + getPageSize:function(){ + if(this.options.pagination && this.extExists("page", true)){ + return this.extensions.page.getPageSize(); + } + }, + + previousPage:function(){ + if(this.options.pagination && this.extExists("page")){ + this.extensions.page.previousPage(); + }else{ + return false; + } + }, + + nextPage:function(){ + if(this.options.pagination && this.extExists("page")){ + this.extensions.page.nextPage(); + }else{ + return false; + } + }, + + getPage:function(){ + if(this.options.pagination && this.extExists("page")){ + return this.extensions.page.getPage(); + }else{ + return false; + } + }, + + getPageMax:function(){ + if(this.options.pagination && this.extExists("page")){ + return this.extensions.page.getPageMax(); + }else{ + return false; + } + }, + + ///////////////// Grouping Functions /////////////// + + setGroupBy:function(groups){ + if(this.extExists("groupRows", true)){ + this.options.groupBy = groups; + this.extensions.groupRows.initialize(); + this.rowManager.refreshActiveData(); + }else{ + return false; + } + }, + + setGroupStartOpen:function(values){ + if(this.extExists("groupRows", true)){ + this.options.groupStartOpen = values; + this.extensions.groupRows.initialize(); + if(this.options.groupBy){ + + this.rowManager.refreshActiveData(); + }else{ + console.warn("Grouping Update - cant refresh view, no groups have been set"); + } + }else{ + return false; + } + }, + + setGroupHeader:function(values){ + if(this.extExists("groupRows", true)){ + this.options.groupHeader = values; + this.extensions.groupRows.initialize(); + if(this.options.groupBy){ + this.rowManager.refreshActiveData(); + }else{ + console.warn("Grouping Update - cant refresh view, no groups have been set"); + } + }else{ + return false; + } + }, + + getGroups:function(values){ + if(this.extExists("groupRows", true)){ + return this.extensions.groupRows.getGroups(); + }else{ + return false; + } + }, + + + /////////////// Navigation Management ////////////// + + navigatePrev:function(){ + var cell = false; + + if(this.table.extExists("edit", true)){ + cell = this.table.extensions.edit.currentCell; + + if(cell){ + e.preventDefault(); + return cell.nav().prev(); + } + } + + return false; + }, + + navigateNext:function(){ + var cell = false; + + if(this.table.extExists("edit", true)){ + cell = this.table.extensions.edit.currentCell; + + if(cell){ + e.preventDefault(); + return cell.nav().next(); + } + } + + return false; + }, + + navigateLeft:function(){ + var cell = false; + + if(this.table.extExists("edit", true)){ + cell = this.table.extensions.edit.currentCell; + + if(cell){ + e.preventDefault(); + return cell.nav().left(); + } + } + + return false; + }, + + navigateRight:function(){ + var cell = false; + + if(this.table.extExists("edit", true)){ + cell = this.table.extensions.edit.currentCell; + + if(cell){ + e.preventDefault(); + return cell.nav().right(); + } + } + + return false; + }, + + navigateUp:function(){ + var cell = false; + + if(this.table.extExists("edit", true)){ + cell = this.table.extensions.edit.currentCell; + + if(cell){ + e.preventDefault(); + return cell.nav().up(); + } + } + + return false; + }, + + navigateDown:function(){ + var cell = false; + + if(this.table.extExists("edit", true)){ + cell = this.table.extensions.edit.currentCell; + + if(cell){ + e.preventDefault(); + return cell.nav().dpwn(); + } + } + + return false; + }, + + + /////////////// History Management ////////////// + undo:function(){ + if(this.options.history && this.extExists("history", true)){ + return this.extensions.history.undo(); + }else{ + return false; + } + }, + + redo:function(){ + if(this.options.history && this.extExists("history", true)){ + return this.extensions.history.redo(); + }else{ + return false; + } + }, + + /////////////// Download Management ////////////// + + download:function(type, filename, options){ + if(this.extExists("download", true)){ + this.extensions.download.download(type, filename, options); + } + }, + + ////////////// Extension Management ////////////// + + //object to hold extensions + extensions:{}, + extensionBindings:{}, + + //extend extension + extendExtension:function(name, property, values){ + + if(this.extensionBindings[name]){ + var source = this.extensionBindings[name].prototype[property]; + + if(source){ + if(typeof values == "object"){ + for(let key in values){ + source[key] = values[key]; + } + }else{ + console.warn("Extension Error - Invalid value type, it must be an object"); + } + }else{ + console.warn("Extension Error - property does not exist:", property); + } + }else{ + console.warn("Extension Error - extension does not exist:", name); + } + + }, + + //add extension to tabulator + registerExtension:function(name, extension){ + var self = this; + this.extensionBindings[name] = extension; + }, + + //ensure that extensions are bound to instantiated function + bindExtensions:function(){ + var self = this; + + this.extensions = {}; + + for(var name in self.extensionBindings){ + self.extensions[name] = new self.extensionBindings[name](self); + } + }, + + //Check for plugin + extExists:function(plugin, required){ + if(this.extensions[plugin]){ + return true; + }else{ + if(required){ + console.error("Tabulator Plugin Not Installed: " + plugin); + } + return false; + } + }, + + }; + + /*=include extensions/layout.js */ + /*=include extensions/localize.js */ + + /*=include extensions_enabled.js */ + + })(); diff --git a/js/tabulator/src/js/extensions/accessor.js b/js/tabulator/src/js/extensions/accessor.js new file mode 100644 index 0000000..fd98eaf --- /dev/null +++ b/js/tabulator/src/js/extensions/accessor.js @@ -0,0 +1,58 @@ +var Accessor = function(table){ + this.table = table; //hold Tabulator object +}; + + +//initialize column accessor +Accessor.prototype.initializeColumn = function(column){ + + var config = {accessor:false, params:column.definition.accessorParams || {}}; + + //set column accessor + switch(typeof column.definition.accessor){ + case "string": + if(this.accessors[column.definition.accessor]){ + config.accessor = this.accessors[column.definition.accessor] + }else{ + console.warn("Accessor Error - No such accessor found, ignoring: ", column.definition.accessor); + } + break; + + case "function": + config.accessor = column.definition.accessor; + break; + } + + if(config.accessor){ + column.extensions.accessor = config; + } +}, + +//apply accessor to row +Accessor.prototype.transformRow = function(dataIn){ + var self = this; + + //clone data object with deep copy to isolate internal data from returned result + var data = $.extend(true, {}, dataIn || {}); + + self.table.columnManager.traverse(function(column){ + var field; + + if(column.extensions.accessor){ + field = column.getField(); + + if(typeof data[field] != "undefined"){ + column.setFieldValue(data, column.extensions.accessor.accessor(column.getFieldValue(data), data, column.extensions.accessor.params)); + } + } + }); + + return data; +}, + +//default accessors +Accessor.prototype.accessors = {}; + + + +Tabulator.registerExtension("accessor", Accessor); \ No newline at end of file diff --git a/js/tabulator/src/js/extensions/ajax.js b/js/tabulator/src/js/extensions/ajax.js new file mode 100644 index 0000000..f3ef7ba --- /dev/null +++ b/js/tabulator/src/js/extensions/ajax.js @@ -0,0 +1,187 @@ +var Ajax = function(table){ + + this.table = table; //hold Tabulator object + this.config = false; //hold config object for ajax request + this.url = ""; //request URL + this.params = false; //request parameters + + this.loaderElement = $("
"); //loader message div + this.msgElement = $(""); //message element + this.loadingElement = false; + this.errorElement = false; +}; + +//initialize setup options +Ajax.prototype.initialize = function(){ + this.loaderElement.append(this.msgElement); + + if(this.table.options.ajaxLoaderLoading){ + this.loadingElement = this.table.options.ajaxLoaderLoading; + } + + if(this.table.options.ajaxLoaderError){ + this.errorElement = this.table.options.ajaxLoaderError; + } + + if(this.table.options.ajaxParams){ + this.setParams(this.table.options.ajaxParams); + } + + if(this.table.options.ajaxConfig){ + this.setConfig(this.table.options.ajaxConfig); + } + + if(this.table.options.ajaxURL){ + this.setUrl(this.table.options.ajaxURL); + } + +}; + +//set ajax params +Ajax.prototype.setParams = function(params, update){ + if(update){ + this.params = this.params || {}; + + for(let key in params){ + this.params[key] = params[key]; + } + }else{ + this.params = params; + } +}; + +Ajax.prototype.getParams = function(){ + return this.params || {}; +}; + +//load config object +Ajax.prototype.setConfig = function(config){ + this._loadDefaultConfig(); + + if(typeof config == "string"){ + this.config.type = config; + }else{ + for(let key in config){ + this.config[key] = config[key]; + } + } +}; + +//create config object from default +Ajax.prototype._loadDefaultConfig = function(force){ + var self = this; + if(!self.config || force){ + + self.config = {}; + + //load base config from defaults + for(let key in self.defaultConfig){ + self.config[key] = self.defaultConfig[key]; + } + } +}; + +//set request url +Ajax.prototype.setUrl = function(url){ + this.url = url; +}; + +//get request url +Ajax.prototype.getUrl = function(){ + return this.url; +}; + +//send ajax request +Ajax.prototype.sendRequest = function(callback){ + var self = this; + + if(self.url){ + + self._loadDefaultConfig(); + + self.config.url = self.url; + + if(self.params){ + self.config.data = self.params; + } + + if(self.table.options.ajaxRequesting(self.url, self.params) !== false){ + + self.showLoader(); + + $.ajax(self.config) + .done(function(data){ + if(self.table.options.ajaxResponse){ + data = self.table.options.ajaxResponse(self.url, self.params, data); + } + + self.table.options.dataLoaded(data); + + callback(data); + + self.hideLoader(); + }) + .fail(function(xhr, textStatus, errorThrown){ + console.error("Ajax Load Error - Connection Error: " + xhr.status, errorThrown); + + self.table.options.ajaxError(xhr, textStatus, errorThrown); + self.showError(); + + setTimeout(function(){ + self.hideLoader(); + }, 3000); + }); + } + + }else{ + console.warn("Ajax Load Error - No URL Set"); + return false; + } +}; + +Ajax.prototype.showLoader = function(){ + this.loaderElement.detach(); + + this.msgElement.empty() + .removeClass("tabulator-error") + .addClass("tabulator-loading") + + if(this.loadingElement){ + this.msgElement.append(this.loadingElement); + }else{ + this.msgElement.append(this.table.extensions.localize.getText("ajax.loading")); + } + + this.table.element.append(this.loaderElement); +}; + +Ajax.prototype.showError = function(){ + this.loaderElement.detach(); + + this.msgElement.empty() + .removeClass("tabulator-loading") + .addClass("tabulator-error") + + if(this.errorElement){ + this.msgElement.append(this.errorElement); + }else{ + this.msgElement.append(this.table.extensions.localize.getText("ajax.error")); + } + + this.table.element.append(this.loaderElement); +}; + +Ajax.prototype.hideLoader = function(){ + this.loaderElement.detach(); +}; + +//default ajax config object +Ajax.prototype.defaultConfig = { + url: "", + type: "GET", + async: true, + dataType:"json", + success: function (data){} +}; + +Tabulator.registerExtension("ajax", Ajax); \ No newline at end of file diff --git a/js/tabulator/src/js/extensions/calculation_colums.js b/js/tabulator/src/js/extensions/calculation_colums.js new file mode 100644 index 0000000..e3f7593 --- /dev/null +++ b/js/tabulator/src/js/extensions/calculation_colums.js @@ -0,0 +1,381 @@ +var ColumnCalcs = function(table){ + this.table = table; //hold Tabulator object + this.topCalcs = []; + this.botCalcs = []; + this.genColumn = false; + this.topElement = $("
"); + this.botElement = $("
"); + this.topRow = false; + this.botRow = false; + this.topInitialized = false; + this.botInitialized = false; + + this.initialize(); +}; + +ColumnCalcs.prototype.initialize = function(){ + this.genColumn = new Column({field:"value"}, this); +}; + +//dummy functions to handle being mock column manager +ColumnCalcs.prototype.registerColumnField = function(){}; + +//initialize column calcs +ColumnCalcs.prototype.initializeColumn = function(column){ + var def = column.definition + + var config = { + topCalcParams:def.topCalcParams || {}, + botCalcParams:def.bottomCalcParams || {}, + }; + + if(def.topCalc){ + + switch(typeof def.topCalc){ + case "string": + if(this.calculations[def.topCalc]){ + config.topCalc = this.calculations[def.topCalc] + }else{ + console.warn("Column Calc Error - No such calculation found, ignoring: ", def.topCalc); + } + break; + + case "function": + config.topCalc = def.topCalc; + break + + } + + if(config.topCalc){ + column.extensions.columnCalcs = config; + this.topCalcs.push(column); + + if(!this.table.options.groupBy){ + this.initializeTopRow(); + } + } + + } + + if(def.bottomCalc){ + switch(typeof def.bottomCalc){ + case "string": + if(this.calculations[def.bottomCalc]){ + config.botCalc = this.calculations[def.bottomCalc] + }else{ + console.warn("Column Calc Error - No such calculation found, ignoring: ", def.bottomCalc); + } + break; + + case "function": + config.botCalc = def.bottomCalc; + break + + } + + if(config.botCalc){ + column.extensions.columnCalcs = config; + this.botCalcs.push(column); + + if(!this.table.options.groupBy){ + this.initializeBottomRow(); + } + } + } + +}; + +ColumnCalcs.prototype.removeCalcs = function(){ + var changed = false; + + if(this.topInitialized){ + this.topInitialized = false; + this.topElement.remove(); + changed = true; + } + + if(this.botInitialized){ + this.botInitialized = false; + this.table.footerManager.remove(this.botElement); + changed = true; + } + + if(changed){ + this.table.rowManager.adjustTableSize(); + } +}; + +ColumnCalcs.prototype.initializeTopRow = function(){ + if(!this.topInitialized){ + this.table.columnManager.element.append(this.topElement); + this.topInitialized = true; + } +}; + +ColumnCalcs.prototype.initializeBottomRow = function(){ + if(!this.botInitialized){ + this.table.footerManager.prepend(this.botElement); + this.botInitialized = true; + } +}; + + +ColumnCalcs.prototype.scrollHorizontal = function(left){ + var hozAdjust = 0, + scrollWidth = this.table.columnManager.element[0].scrollWidth - this.table.element.innerWidth(); + + if(this.botInitialized){ + this.botRow.getElement().css("margin-left", -left); + } +}; + + +ColumnCalcs.prototype.recalc = function(rows){ + var data, row; + + if(this.topInitialized || this.botInitialized){ + data = this.rowsToData(rows); + + if(this.topInitialized){ + row = this.generateRow("top", this.rowsToData(rows)) + this.topRow = row; + this.topElement.empty(); + this.topElement.append(row.getElement()); + row.initialize(true); + } + + if(this.botInitialized){ + row = this.generateRow("bottom", this.rowsToData(rows)) + this.botRow = row; + this.botElement.empty(); + this.botElement.append(row.getElement()); + row.initialize(true); + } + + this.table.rowManager.adjustTableSize(); + + //set resizable handles + if(this.table.extExists("frozenColumns")){ + this.table.extensions.frozenColumns.layout(); + } + } +}; + +ColumnCalcs.prototype.recalcRowGroup = function(row){ + var data, rowData; + + var group = this.table.extensions.groupRows.getRowGroup(row); + + if(group.calcs.bottom){ + data = this.rowsToData(group.rows); + rowData = this.generateRowData("bottom", data); + + group.calcs.bottom.updateData(rowData); + } + + if(group.calcs.top){ + data = this.rowsToData(group.rows); + rowData = this.generateRowData("top", data); + + group.calcs.top.updateData(rowData); + } +}; + + +//generate top stats row +ColumnCalcs.prototype.generateTopRow = function(rows){ + return this.generateRow("top", this.rowsToData(rows)); +}; +//generate bottom stats row +ColumnCalcs.prototype.generateBottomRow = function(rows){ + return this.generateRow("bottom", this.rowsToData(rows)); +}; + +ColumnCalcs.prototype.rowsToData = function(rows){ + var data = []; + + rows.forEach(function(row){ + data.push(row.getData()); + }); + + return data; +}; + +//generate stats row +ColumnCalcs.prototype.generateRow = function(pos, data){ + var self = this, + rowData = this.generateRowData(pos, data), + row = new Row(rowData, this); + + row.getElement().addClass("tabulator-calcs").addClass("tabulator-calcs-" + pos); + row.type = "calc"; + + row.generateCells = function(){ + + var cells = []; + + self.table.columnManager.columnsByIndex.forEach(function(column){ + + if(column.visible){ + //set field name of mock column + self.genColumn.setField(column.getField()); + self.genColumn.hozAlign = column.hozAlign; + + if(column.definition[pos + "CalcFormatter"] && self.table.extExists("format")){ + + self.genColumn.extensions.format = { + formatter: self.table.extensions.format.getFormatter(column.definition[pos + "CalcFormatter"]), + params: column.definition[pos + "CalcFormatterParams"] + } + }else{ + self.genColumn.extensions.format = { + formatter: self.table.extensions.format.getFormatter("plaintext"), + params:{} + } + } + + //generate cell and assign to correct column + var cell = new Cell(self.genColumn, row); + cell.column = column; + + cell.setWidth(column.getWidth()); + + column.cells.push(cell); + cells.push(cell); + } + }); + + this.cells = cells; + } + + return row; +}; + +//generate stats row +ColumnCalcs.prototype.generateRowData = function(pos, data){ + var rowData = {}, + calcs = pos == "top" ? this.topCalcs : this.botCalcs, + type = pos == "top" ? "topCalc" : "botCalc"; + + calcs.forEach(function(column){ + var values = []; + + if(column.extensions.columnCalcs && column.extensions.columnCalcs[type]){ + data.forEach(function(item){ + values.push(column.getFieldValue(item)); + }); + + column.setFieldValue(rowData, column.extensions.columnCalcs[type](values, data, column.extensions.columnCalcs[type + "Params"])); + } + }); + + return rowData; +}; + +ColumnCalcs.prototype.hasTopCalcs = function(){ + return !!(this.topCalcs.length); +}, + +ColumnCalcs.prototype.hasBottomCalcs = function(){ + return !!(this.botCalcs.length); +}, + +//handle table redraw +ColumnCalcs.prototype.redraw = function(){ + if(this.topRow){ + this.topRow.normalizeHeight(true); + } + if(this.botRow){ + this.botRow.normalizeHeight(true); + } +}; + +//default calculations +ColumnCalcs.prototype.calculations = { + "avg":function(values, data, calcParams){ + var output = 0, + precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : 2 + + if(values.length){ + output = values.reduce(function(sum, value){ + value = Number(value); + return sum + value; + }); + + output = output / values.length; + + output = precision !== false ? output.toFixed(precision) : output; + } + + return parseFloat(output).toString(); + }, + "max":function(values, data, calcParams){ + var output = null; + + values.forEach(function(value){ + + value = Number(value); + + if(value > output || output === null){ + output = value; + } + }); + + return output !== null ? output : ""; + }, + "min":function(values, data, calcParams){ + var output = null; + + values.forEach(function(value){ + + value = Number(value); + + if(value < output || output === null){ + output = value; + } + }); + + return output !== null ? output : ""; + }, + "sum":function(values, data, calcParams){ + var output = 0; + + if(values.length){ + values.forEach(function(value){ + value = Number(value); + + output += !isNaN(value) ? Number(value) : 0; + }); + } + + return output; + }, + "concat":function(values, data, calcParams){ + var output = 0; + + if(values.length){ + output = values.reduce(function(sum, value){ + return String(sum) + String(value); + }); + } + + return output; + }, + "count":function(values, data, calcParams){ + var output = 0; + + if(values.length){ + values.forEach(function(value){ + if(value){ + output ++; + } + }); + } + + return output; + }, +}; + + + +Tabulator.registerExtension("columnCalcs", ColumnCalcs); \ No newline at end of file diff --git a/js/tabulator/src/js/extensions/download.js b/js/tabulator/src/js/extensions/download.js new file mode 100644 index 0000000..e9ded52 --- /dev/null +++ b/js/tabulator/src/js/extensions/download.js @@ -0,0 +1,256 @@ +var Download = function(table){ + this.table = table; //hold Tabulator object + this.fields = {}; //hold filed multi dimension arrays +}; + +//trigger file download +Download.prototype.download = function(type, filename, options){ + var self = this, + downloadFunc = false; + + function buildLink(data, mime){ + self.triggerDownload(data, mime, type, filename); + } + + if(typeof type == "function"){ + downloadFunc = type; + }else{ + if(self.downloaders[type]){ + downloadFunc = self.downloaders[type]; + }else{ + console.warn("Download Error - No such download type found: ", type); + } + } + + if(downloadFunc){ + downloadFunc.call(this, self.processDefinitions(), self.processData() , options, buildLink); + } +}; + + +Download.prototype.processDefinitions = function(){ + var self = this, + definitions = self.table.columnManager.getDefinitions(), + processedDefinitions = []; + + self.fields = {}; + + definitions.forEach(function(column){ + if(column.field){ + self.fields[column.field] = column.field.split("."); + + if(column.download !== false){ + //isolate definiton from defintion object + var def = {}; + + for(var key in column){ + def[key] = column[key]; + } + + if(typeof column.downloadTitle != "undefined"){ + def.title = column.downloadTitle; + } + + processedDefinitions.push(def); + } + } + }); + + + return processedDefinitions; +}; + +Download.prototype.processData = function(){ + var self = this, + data = self.table.rowManager.getData(true); + + //add user data processing step; + if(typeof self.table.options.downloadDataMutator == "function"){ + data = self.table.options.downloadDataMutator(data); + } + + return data; +}; + +Download.prototype.triggerDownload = function(data, mime, type, filename){ + var element = document.createElement('a'), + blob = new Blob([data],{type:mime}), + filename = filename || "Tabulator." + (typeof type === "function" ? "txt" : type); + + if(navigator.msSaveOrOpenBlob){ + navigator.msSaveOrOpenBlob(blob, filename); + }else{ + element.setAttribute('href', window.URL.createObjectURL(blob)); + + //set file title + element.setAttribute('download', filename); + + //trigger download + element.style.display = 'none'; + document.body.appendChild(element); + element.click(); + + //remove temporary link element + document.body.removeChild(element); + } +}; + +//nested field lookup +Download.prototype.getFieldValue = function(field, data){ + var dataObj = data, + structure = this.fields[field], + length = structure.length, + output; + + for(let i = 0; i < length; i++){ + + dataObj = dataObj[structure[i]]; + + output = dataObj; + + if(!dataObj){ + break; + } + } + + return output; +}; + + +//downloaders +Download.prototype.downloaders = { + csv:function(columns, data, options, setFileContents){ + var self = this, + titles = [], + fields = [], + delimiter = options && options.delimiter ? options.delimiter : ",", + fileContents; + + //get field lists + columns.forEach(function(column){ + if(column.field){ + titles.push('"' + String(column.title).split('"').join('""') + '"'); + fields.push(column.field); + } + }) + + //generate header row + fileContents = [titles.join(delimiter)]; + + //generate each row of the table + data.forEach(function(row){ + var rowData = []; + + fields.forEach(function(field){ + var value = self.getFieldValue(field, row); + + switch(typeof value){ + case "object": + value = JSON.stringify(value); + break; + + case "undefined": + case "null": + value = ""; + break; + + default: + value = value; + } + + //escape uotation marks + rowData.push('"' + String(value).split('"').join('""') + '"'); + }) + + fileContents.push(rowData.join(delimiter)); + }); + + setFileContents(fileContents.join("\n"), "text/csv"); + }, + + json:function(columns, data, options, setFileContents){ + var fileContents = JSON.stringify(data, null, '\t'); + + setFileContents(fileContents, "application/json"); + }, + + xlsx:function(columns, data, options, setFileContents){ + var self = this, + titles = [], + fields = [], + rows = [], + workbook = { SheetNames:["Sheet1"], Sheets:{} }, + worksheet, output; + + //convert rows to worksheet + function rowsToSheet(){ + var sheet = {}; + var range = {s: {c:0, r:0}, e: {c:fields.length, r:rows.length }}; + + rows.forEach(function(row, i){ + row.forEach(function(value, j){ + var cell = {v: typeof value == "undefined" || value === null ? "" : value}; + + if(cell != null){ + switch(typeof cell.v){ + case "number": + cell.t = 'n'; + break; + case "boolean": + cell.t = 'b'; + break; + default: + cell.t = 's'; + break; + } + + sheet[XLSX.utils.encode_cell({c:j,r:i})] = cell + } + }); + }); + + sheet['!ref'] = XLSX.utils.encode_range(range); + + return sheet; + } + + //convert workbook to binary array + function s2ab(s) { + var buf = new ArrayBuffer(s.length); + var view = new Uint8Array(buf); + for (var i=0; i!=s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF; + return buf; + } + + //get field lists + columns.forEach(function(column){ + if(column.field){ + titles.push(column.title); + fields.push(column.field); + } + }); + + rows.push(titles); + + //generate each row of the table + data.forEach(function(row){ + var rowData = []; + + fields.forEach(function(field){ + rowData.push(self.getFieldValue(field, row)); + }); + + rows.push(rowData); + }); + + + worksheet = rowsToSheet(); + workbook.Sheets["Sheet1"] = worksheet; + + output = XLSX.write(workbook, {bookType:'xlsx', bookSST:true, type: 'binary'}); + + setFileContents(s2ab(output), "application/octet-stream"); + } +}; + +Tabulator.registerExtension("download", Download); \ No newline at end of file diff --git a/js/tabulator/src/js/extensions/edit.js b/js/tabulator/src/js/extensions/edit.js new file mode 100644 index 0000000..c76405f --- /dev/null +++ b/js/tabulator/src/js/extensions/edit.js @@ -0,0 +1,580 @@ +var Edit = function(table){ + this.table = table; //hold Tabulator object + this.currentCell = false; //hold currently editing cell +}; + + +//initialize column editor +Edit.prototype.initializeColumn = function(column){ + var self = this, + config = { + editor:false, + blocked:false, + check:column.definition.editable, + params:column.definition.editorParams || {} + }; + + //set column editor + switch(typeof column.definition.editor){ + case "string": + if(self.editors[column.definition.editor]){ + config.editor = self.editors[column.definition.editor] + }else{ + console.warn("Editor Error - No such editor found: ", column.definition.editor); + } + break; + + case "function": + config.editor = column.definition.editor; + break; + + case "boolean": + + if(column.definition.editor === true){ + + if(typeof column.definition.formatter !== "function"){ + if(self.editors[column.definition.formatter]){ + config.editor = self.editors[column.definition.formatter]; + }else{ + config.editor = self.editors["input"]; + } + }else{ + console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ", column.definition.formatter); + } + } + break; + } + + if(config.editor){ + column.extensions.edit = config; + } +}; + +Edit.prototype.getCurrentCell = function(){ + return this.currentCell ? this.currentCell.getComponent() : false; +}; + +Edit.prototype.clearEditor = function(cell){ + this.currentCell = false; + cell.getElement().removeClass("tabulator-validation-fail"); + cell.getElement().removeClass("tabulator-editing").empty(); + cell.row.getElement().removeClass("tabulator-row-editing"); +}; + +//return a formatted value for a cell +Edit.prototype.bindEditor = function(cell){ + var self = this, + rendered = function(){}, + element = cell.getElement(), + mouseClick = false; + + //handle successfull value change + function success(value){ + var valid = true; + + if(cell.column.extensions.validate && self.table.extExists("validate")){ + valid = self.table.extensions.validate.validate(cell.column.extensions.validate, cell.getComponent(), value); + } + + if(valid === true){ + self.clearEditor(cell); + cell.setValue(value, true); + }else{ + cell.getElement().addClass("tabulator-validation-fail"); + rendered(); + self.table.options.validationFailed(cell.getComponent(), value, valid); + } + }; + + //handle aborted edit + function cancel(){ + self.clearEditor(cell); + cell.setValueActual(cell.getValue()); + self.table.options.cellEditCancelled(cell.getComponent()) + }; + + element.attr("tabindex", 0); + + element.on("click", function(e){ + if(!$(this).hasClass("tabulator-editing")){ + $(this).focus(); + } + }); + + element.on("mousedown", function(e){ + mouseClick = true; + }); + + element.on("focus", function(e){ + var allowEdit = true, + cellEditor; + + self.currentCell = cell; + + if(mouseClick){ + mouseClick = false; + + if(cell.column.cellEvents.cellClick){ + cell.column.cellEvents.cellClick(e, cell.getComponent()); + } + } + + function onRendered(callback){ + rendered = callback; + } + + if(!cell.column.extensions.edit.blocked){ + e.stopPropagation(); + + if(typeof cell.column.extensions.edit.check == "function"){ + allowEdit = cell.column.extensions.edit.check(cell.getComponent()); + } + + if(allowEdit){ + + self.table.options.cellEditing(cell.getComponent()); + + cellEditor = cell.column.extensions.edit.editor.call(self, cell.getComponent(), onRendered, success, cancel, cell.column.extensions.edit.params); + + //if editor returned, add to DOM, if false, abort edit + if(cellEditor !== false){ + element.addClass("tabulator-editing"); + cell.row.getElement().addClass("tabulator-row-editing"); + element.empty(); + element.append(cellEditor); + + //trigger onRendered Callback + rendered(); + + //prevent editing from triggering rowClick event + element.children().click(function(e){ + e.stopPropagation(); + }) + }else{ + element.blur(); + } + }else{ + element.blur(); + } + }else{ + element.blur(); + } + + }); +}; + +//default data editors +Edit.prototype.editors = { + + //input element + input:function(cell, onRendered, success, cancel, editorParams){ + + //create and style input + var input = $(""); + + input.css({ + "padding":"4px", + "width":"100%", + "box-sizing":"border-box", + }) + .val(cell.getValue()); + + onRendered(function(){ + input.focus(); + input.css("height","100%"); + }); + + //submit new value on blur + input.on("change blur", function(e){ + if(input.val() != cell.getValue()){ + success(input.val()); + }else{ + cancel(); + } + }); + + //submit new value on enter + input.on("keydown", function(e){ + if(e.keyCode == 13){ + success(input.val()); + } + + if(e.keyCode == 27){ + cancel(); + } + }); + + return input; + }, + + //resizable text area element + textarea:function(cell, onRendered, success, cancel, editorParams){ + var self = this, + cellValue = cell.getValue(), + value = String(typeof cellValue == "null" || typeof cellValue == "undefined" ? "" : cellValue), + count = (value.match(/(?:\r\n|\r|\n)/g) || []).length + 1, + input = $(""), + scrollHeight = 0; + + //create and style input + input.css({ + "display":"block", + "height":"100%", + "width":"100%", + "padding":"2px", + "box-sizing":"border-box", + "white-space":"pre-wrap", + "resize": "none", + }) + .val(value); + + onRendered(function(){ + input.focus(); + input.css("height","100%"); + }); + + //submit new value on blur + input.on("change blur", function(e){ + if(input.val() != cell.getValue()){ + success(input.val()); + setTimeout(function(){ + cell.getRow().normalizeHeight(); + },300) + }else{ + cancel(); + } + }); + + input.on("keyup", function(){ + + input.css({"height": ""}); + + var heightNow = input[0].scrollHeight; + input.css({"height": heightNow}); + + if(heightNow != scrollHeight){ + scrollHeight = heightNow; + cell.getRow().normalizeHeight(); + } + }); + + input.on("keydown", function(e){ + if(e.keyCode == 27){ + cancel(); + } + }); + + return input; + }, + + //input element with type of number + number:function(cell, onRendered, success, cancel, editorParams){ + var input = $(""); + + //create and style input + input.css({ + "padding":"4px", + "width":"100%", + "box-sizing":"border-box", + }) + .val(cell.getValue()); + + onRendered(function(){ + input.focus(); + input.css("height","100%"); + }); + + //submit new value on blur + input.on("blur", function(e){ + var value = input.val(); + + if(!isNaN(value)){ + value = Number(value); + } + + if(value != cell.getValue()){ + success(value); + }else{ + cancel(); + } + }); + + //submit new value on enter + input.on("keydown", function(e){ + var value; + + if(e.keyCode == 13){ + value = input.val(); + + if(!isNaN(value)){ + value = Number(value); + } + + success(value); + } + + if(e.keyCode == 27){ + cancel(); + } + }); + + return input; + }, + + //start rating + star:function(cell, onRendered, success, cancel, editorParams){ + var element = cell.getElement(), + value = cell.getValue(), + maxStars = $("svg", element).length || 5, + size = $("svg:first", element).attr("width") || 14, + stars=$("
"), + starActive = $(''), + starInactive = $(''); + + + //change number of active stars + var starChange = function(element){ + if($(".tabulator-star-active", element.closest("div")).length != element.prevAll("svg").length + 1){ + element.prevAll("svg").replaceWith(starActive.clone()); + element.nextAll("svg").replaceWith(starInactive.clone()); + element.replaceWith(starActive.clone()); + } + } + + value = parseInt(value) < maxStars ? parseInt(value) : maxStars; + + for(var i=1;i<= maxStars;i++){ + let nextStar = i <= value ? starActive : starInactive; + stars.append(nextStar.clone()); + } + + stars.on("mouseover", "svg", function(e){ + e.stopPropagation(); + starChange($(this)); + }); + + stars.on("mouseover", function(e){ + $("svg", $(this)).replaceWith(starInactive.clone()); + }); + + stars.on("click", function(e){ + success(0); + }); + + stars.on("click", "svg", function(e){ + e.stopPropagation(); + success($(this).prevAll("svg").length + 1); + }); + + element.css({ + "white-space": "nowrap", + "overflow": "hidden", + "text-overflow": "ellipsis", + }); + + element.on("blur", function(){ + cancel(); + }); + + //allow key based navigation + element.on("keydown", function(e){ + switch(e.keyCode){ + case 39: //right arrow + starChange($(".tabulator-star-inactive:first", stars)); + break; + + case 37: //left arrow + let prevstar = $(".tabulator-star-active:last", stars).prev("svg"); + + if(prevstar.length){ + starChange(prevstar); + }else{ + $("svg", stars).replaceWith(starInactive.clone()); + } + break; + + case 13: //enter + success($(".tabulator-star-active", stars).length); + break; + + case 27: //escape + cancel(); + break; + + } + }); + + return stars; + }, + + //draggable progress bar + progress:function(cell, onRendered, success, cancel, editorParams){ + var element = cell.getElement(), + max = $("div", element).data("max"), + min = $("div", element).data("min"), + percent = (max - min) / 100, + value = cell.getValue() || 0, + handle = $("
"), + bar; + + var newVal = function(){ + var calcVal = (percent * Math.round(bar.outerWidth() / (element.width()/100))) + min; + success(calcVal); + element.attr("aria-valuenow", calcVal).attr("aria-label", value); + } + + //make sure value is in range + value = parseFloat(value) <= max ? parseFloat(value) : max; + value = parseFloat(value) >= min ? parseFloat(value) : min; + + //workout percentage + value = 100 - Math.round((value - min) / percent); + + bar = $("
"), + + element.css({ + padding:"0 4px", + }); + + element.attr("aria-valuemin", min).attr("aria-valuemax", max); + + bar.append(handle); + + handle.on("mousedown", function(e){ + bar.data("mouseDrag", e.screenX); + bar.data("mouseDragWidth", bar.outerWidth()); + }); + + handle.on("mouseover", function(){$(this).css({cursor:"ew-resize"})}); + + element.on("mousemove", function(e){ + if(bar.data("mouseDrag")){ + bar.css({width: bar.data("mouseDragWidth") + (e.screenX - bar.data("mouseDrag"))}) + } + }); + + element.on("mouseup", function(e){ + if(bar.data("mouseDrag")){ + e.stopPropagation(); + e.stopImmediatePropagation(); + + bar.data("mouseDragOut", true); + bar.data("mouseDrag", false); + bar.data("mouseDragWidth", false); + + newVal(); + + } + }); + + //allow key based navigation + element.on("keydown", function(e){ + switch(e.keyCode){ + case 39: //right arrow + bar.css({"width" : bar.width() + element.width()/100}); + break; + + case 37: //left arrow + bar.css({"width" : bar.width() - element.width()/100}); + break; + + case 13: //enter + newVal(); + break; + + case 27: //escape + cancel(); + break; + + } + }); + + element.on("blur", function(){ + cancel(); + }); + + return bar; + }, + + //checkbox + tickCross:function(cell, onRendered, success, cancel, editorParams){ + var value = cell.getValue(), + input = $(""); + + //create and style input + input.css({ + "margin-top":"5px", + "box-sizing":"border-box", + }) + .val(value); + + onRendered(function(){ + input.focus(); + }); + + if(value === true || value === "true" || value === "True" || value === 1){ + input.prop("checked", true); + }else{ + input.prop("checked", false); + } + + //submit new value on blur + input.on("change blur", function(e){ + success(input.is(":checked")); + }); + + //submit new value on enter + input.on("keydown", function(e){ + if(e.keyCode == 13){ + success(input.is(":checked")); + } + if(e.keyCode == 27){ + cancel(); + } + }); + + return input; + }, + + //checkbox + tick:function(cell, onRendered, success, cancel, editorParams){ + var value = cell.getValue(), + input = $(""); + + //create and style input + input.css({ + "margin-top":"5px", + "box-sizing":"border-box", + }) + .val(value); + + onRendered(function(){ + input.focus(); + }); + + if(value === true || value === "true" || value === "True" || value === 1){ + input.prop("checked", true); + }else{ + input.prop("checked", false); + } + + //submit new value on blur + input.on("change blur", function(e){ + success(input.is(":checked")); + }); + + //submit new value on enter + input.on("keydown", function(e){ + if(e.keyCode == 13){ + success(input.is(":checked")); + } + if(e.keyCode == 27){ + cancel(); + } + }); + + return input; + }, +}; + +Tabulator.registerExtension("edit", Edit); \ No newline at end of file diff --git a/js/tabulator/src/js/extensions/filter.js b/js/tabulator/src/js/extensions/filter.js new file mode 100644 index 0000000..bd4a353 --- /dev/null +++ b/js/tabulator/src/js/extensions/filter.js @@ -0,0 +1,453 @@ +var Filter = function(table){ + + this.table = table; //hold Tabulator object + + this.filterList = []; //hold filter list + this.headerFilters = {}; //hold column filters + this.headerFilterElements = []; //hold header filter elements for manipulation + + this.changed = false; //has filtering changed since last render +}; + + +//initialize column header filter +Filter.prototype.initializeColumn = function(column){ + var self = this, + field = column.getField(), + filterElement, editor, editorElement, cellWrapper, typingTimer, tagType, attrType; + + //handle successfull value change + function success(value){ + var filterType = tagType == "input" && attrType == "text" ? "partial" : "match", + type = "", + filterFunc; + + if(value){ + switch(typeof column.definition.headerFilterFunc){ + case "string": + if(self.filters[column.definition.headerFilterFunc]){ + type = column.definition.headerFilterFunc; + filterFunc = function(data){ + return self.filters[column.definition.headerFilterFunc](value, column.getFieldValue(data)); + } + }else{ + console.warn("Header Filter Error - Matching filter function not found: ", column.definition.headerFilterFunc); + } + break; + + case "function": + filterFunc = function(data){ + return column.definition.headerFilterFunc(value, column.getFieldValue(data), data, column.definition.headerFilterFuncParams || {}); + } + + type = filterFunc; + break; + } + + if(!filterFunc){ + + switch(filterType){ + case "partial": + filterFunc = function(data){ + return String(column.getFieldValue(data)).toLowerCase().indexOf(String(value).toLowerCase()) > -1; + } + type = "like"; + break; + + default: + filterFunc = function(data){ + return column.getFieldValue(data) == value; + } + type = "="; + } + } + + self.headerFilters[field] = {value:value, func:filterFunc, type:type}; + + }else{ + delete self.headerFilters[field]; + } + + self.changed = true; + + self.table.rowManager.filterRefresh(); + }; + + //handle aborted edit + function cancel(){}; + + if(field){ + + filterElement = $("
"); + + //set column editor + switch(typeof column.definition.headerFilter){ + case "string": + if(self.table.extensions.edit.editors[column.definition.headerFilter]){ + editor = self.table.extensions.edit.editors[column.definition.headerFilter]; + }else{ + console.warn("Filter Error - Cannot build header filter, No such editor found: ", column.definition.editor); + } + break; + + case "function": + editor = column.definition.headerFilter; + break; + + case "boolean": + if(column.extensions.edit && column.extensions.edit.editor){ + editor = column.extensions.edit.editor; + }else{ + if(column.definition.formatter && self.table.extensions.edit.editors[column.definition.formatter]){ + editor = self.table.extensions.edit.editors[column.definition.formatter]; + }else{ + editor = self.table.extensions.edit.editors["input"]; + } + } + break; + } + + if(editor){ + + cellWrapper = { + getValue:function(){ + return ""; + }, + getField:function(){ + return column.definition.field; + }, + getElement:function(){ + return filterElement; + } + }; + + editorElement = editor.call(self, cellWrapper, function(){}, success, cancel, column.definition.headerFilterParams || {}); + + //set Placeholder Text + if(field){ + self.table.extensions.localize.bind("headerFilters.columns." + column.definition.field, function(value){ + editorElement.attr("placeholder", typeof value !== "undefined" && value ? value : self.table.extensions.localize.getText("headerFilters.default")); + }); + }else{ + self.table.extensions.localize.bind("headerFilters.default", function(value){ + editorElement.attr("placeholdder", typeof self.column.definition.headerFilterPlaceholder !== "undefined" && self.column.definition.headerFilterPlaceholder ? self.column.definition.headerFilterPlaceholder : value); + }); + } + + //focus on element on click + editorElement.on("click", function(e){ + e.stopPropagation(); + $(this).focus(); + }); + + //live update filters as user types + typingTimer = false; + + editorElement.on("keyup search", function(e){ + var element = $(this); + + if(typingTimer){ + clearTimeout(typingTimer); + } + + typingTimer = setTimeout(function(){ + success(element.val()); + },300); + }); + + //update number filtered columns on change + attrType = editorElement.attr("type") ? editorElement.attr("type").toLowerCase() : "" ; + if(attrType == "number"){ + editorElement.on("change", function(e){ + success($(this).val()); + }); + } + + //change text inputs to search inputs to allow for clearing of field + if(attrType == "text"){ + editorElement.attr("type", "search"); + editorElement.off("change blur"); //prevent blur from triggering filter and preventing selection click + } + + //prevent input and select elements from propegating click to column sorters etc + tagType = editorElement.prop("tagName").toLowerCase() + if(tagType == "input" || tagType == "select"){ + editorElement.on("mousedown",function(e){ + e.stopPropagation(); + }); + } + + filterElement.append(editorElement); + + column.contentElement.append(filterElement); + + self.headerFilterElements.push(editorElement); + } + }else{ + console.warn("Filter Error - Cannot add header filter, column has no field set:", column.definition.title); + } + +}; + +//check if the filters has changed since last use +Filter.prototype.hasChanged = function(){ + var changed = this.changed; + this.changed = false; + return changed; +}; + +//set standard filters +Filter.prototype.setFilter = function(field, type, value){ + var self = this; + + self.filterList = []; + + if(!Array.isArray(field)){ + field = [{field:field, type:type, value:value}]; + } + + self.addFilter(field); + +}; + +//add filter to array +Filter.prototype.addFilter = function(field, type, value){ + var self = this, + column; + + if(!Array.isArray(field)){ + field = [{field:field, type:type, value:value}]; + } + + field.forEach(function(filter){ + + var filterFunc = false; + + if(typeof filter.field == "function"){ + filterFunc = function(data){ + return filter.field(data, filter.type || {})// pass params to custom filter function + } + }else{ + if(self.filters[filter.type]){ + + column = self.table.columnManager.getColumnByField(filter.field); + + if(column){ + filterFunc = function(data){ + return self.filters[filter.type](filter.value, column.getFieldValue(data)); + } + }else{ + filterFunc = function(data){ + return self.filters[filter.type](filter.value, data[filter.field]); + } + } + + + }else{ + console.warn("Filter Error - No such filter type found, ignoring: ", filter.type); + } + } + + if(filterFunc){ + filter.func = filterFunc; + self.filterList.push(filter); + + self.changed = true; + } + }); + +}; + +//get all filters +Filter.prototype.getFilters = function(all, ajax){ + var self = this, + output = []; + + if(all){ + output = self.getHeaderFilters(); + } + + self.filterList.forEach(function(filter){ + output.push({field:filter.field, type:filter.type, value:filter.value}); + }); + + if(ajax){ + output.forEach(function(item){ + if(typeof item.type == "function"){ + item.type = "function"; + } + }) + } + + return output; +}; + +//get all filters +Filter.prototype.getHeaderFilters = function(){ + var self = this, + output = []; + + for(var key in this.headerFilters){ + output.push({field:key, type:this.headerFilters[key].type, value:this.headerFilters[key].value}); + } + + return output; +}; + +//remove filter from array +Filter.prototype.removeFilter = function(field, type, value){ + var self = this; + + if(!Array.isArray(field)){ + field = [{field:field, type:type, value:value}]; + } + + field.forEach(function(filter){ + var index = -1; + + if(typeof filter.field == "object"){ + index = self.filterList.findIndex(function(element){ + return filter === element; + }); + }else{ + index = self.filterList.findIndex(function(element){ + return filter.field === element.field && filter.type === element.type && filter.value === element.value + }); + } + + if(index > -1){ + self.filterList.splice(index, 1); + self.changed = true; + }else{ + console.warn("Filter Error - No matching filter type found, ignoring: ", filter.type); + } + + }); + +}; + +//clear filters +Filter.prototype.clearFilter = function(all){ + this.filterList = []; + + if(all){ + this.clearHeaderFilter(); + } + + this.changed = true; +}; + +//clear header filters +Filter.prototype.clearHeaderFilter = function(){ + this.headerFilters = {}; + + this.headerFilterElements.forEach(function(element){ + element.val(""); + }); + + self.changed = true; +}; + +//filter row array +Filter.prototype.filter = function(rowList){ + var self = this, + activeRows = [], + activeRowComponents = []; + + if(self.table.options.dataFiltering){ + self.table.options.dataFiltering(self.getFilters()); + } + + if(!self.table.options.ajaxFiltering && (self.filterList.length || Object.keys(self.headerFilters).length)){ + + rowList.forEach(function(row){ + if(self.filterRow(row)){ + activeRows.push(row); + } + }); + + activeRows; + + }else{ + activeRows = rowList.slice(0); + } + + if(self.table.options.dataFiltered){ + + activeRows.forEach(function(row){ + activeRowComponents.push(row.getComponent()); + }); + + self.table.options.dataFiltered(self.getFilters(), activeRowComponents); + } + + return activeRows; + +}; + +//filter individual row +Filter.prototype.filterRow = function(row){ + var self = this, + match = true, + data = row.getData(); + + self.filterList.forEach(function(filter){ + if(!filter.func(data)){ + match = false; + } + }); + + for(var field in self.headerFilters){ + if(!self.headerFilters[field].func(data)){ + match = false; + } + } + + return match; +}; + + +//list of available filters +Filter.prototype.filters ={ + + //equal to + "=":function(filterVal, rowVal){ + return rowVal == filterVal ? true : false; + }, + + //less than + "<":function(filterVal, rowVal){ + return rowVal < filterVal ? true : false; + }, + + //less than or equal to + "<=":function(filterVal, rowVal){ + return rowVal <= filterVal ? true : false; + }, + + //greater than + ">":function(filterVal, rowVal){ + return rowVal > filterVal ? true : false; + }, + + //greater than or equal to + ">=":function(filterVal, rowVal){ + return rowVal >= filterVal ? true : false; + }, + + //not equal to + "!=":function(filterVal, rowVal){ + return rowVal != filterVal ? true : false; + }, + + //contains the string + "like":function(filterVal, rowVal){ + if(filterVal === null || typeof filterVal === "undefined"){ + return rowVal === filterVal ? true : false; + }else{ + return rowVal.toLowerCase().indexOf(filterVal.toLowerCase()) > -1 ? true : false; + } + }, +}; + +Tabulator.registerExtension("filter", Filter); \ No newline at end of file diff --git a/js/tabulator/src/js/extensions/format.js b/js/tabulator/src/js/extensions/format.js new file mode 100644 index 0000000..4bbe2c8 --- /dev/null +++ b/js/tabulator/src/js/extensions/format.js @@ -0,0 +1,273 @@ +var Format = function(table){ + this.table = table; //hold Tabulator object +}; + +//initialize column formatter +Format.prototype.initializeColumn = function(column){ + var self = this, + config = {params:column.definition.formatterParams || {}}; + + //set column formatter + switch(typeof column.definition.formatter){ + case "string": + if(self.formatters[column.definition.formatter]){ + config.formatter = self.formatters[column.definition.formatter] + }else{ + console.warn("Formatter Error - No such formatter found: ", column.definition.formatter); + config.formatter = self.formatters.plaintext; + } + break; + + case "function": + config.formatter = column.definition.formatter; + break; + + default: + config.formatter = self.formatters.plaintext; + break; + } + + column.extensions.format = config; +}; + +//return a formatted value for a cell +Format.prototype.formatValue = function(cell){ + return cell.column.extensions.format.formatter.call(this, cell.getComponent(), cell.column.extensions.format.params); +}; + + +Format.prototype.sanitizeHTML = function(value){ + if(value){ + var entityMap = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '/': '/', + '`': '`', + '=': '=' + }; + + return String(value).replace(/[&<>"'`=\/]/g, function (s) { + return entityMap[s]; + }); + }else{ + return value; + } +}; + +Format.prototype.emptyToSpace = function(value){ + return value === null ? " " : value; +}; + +//get formatter for cell +Format.prototype.getFormatter = function(formatter){ + var formatter; + + switch(typeof formatter){ + case "string": + if(this.formatters[formatter]){ + formatter = this.formatters[formatter] + }else{ + console.warn("Formatter Error - No such formatter found: ", formatter); + formatter = this.formatters.plaintext; + } + break; + + case "function": + formatter = formatter; + break; + + default: + formatter = this.formatters.plaintext; + break; + } + + return formatter; + +}; + +//default data formatters +Format.prototype.formatters = { + //plain text value + plaintext:function(cell, formatterParams){ + return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); + }, + + //html text value + html:function(cell, formatterParams){ + return cell.getValue(); + }, + + //multiline text area + textarea:function(cell, formatterParams){ + cell.getElement().css({"white-space":"pre-wrap"}); + return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); + }, + + //currency formatting + money:function(cell, formatterParams){ + var floatVal = parseFloat(cell.getValue()), + number, integer, decimal, rgx; + + var decimalSym = formatterParams.decimal || "."; + var thousandSym = formatterParams.thousand || ","; + var symbol = formatterParams.symbol || ""; + var after = !!formatterParams.symbolAfter; + var precision = typeof formatterParams.precision !== "undefined" ? formatterParams.precision : 2; + + if(isNaN(floatVal)){ + return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); + } + + number = precision !== false ? floatVal.toFixed(precision) : floatVal; + number = number.split("."); + + integer = number[0]; + decimal = number.length > 1 ? decimalSym + number[1] : ""; + + rgx = /(\d+)(\d{3})/; + + while (rgx.test(integer)){ + integer = integer.replace(rgx, "$1" + thousandSym + "$2"); + } + + return after ? integer + decimal + symbol : symbol + integer + decimal; + }, + + //clickable mailto link + email:function(cell, formatterParams){ + var value = this.sanitizeHTML(cell.getValue()); + return "" + this.emptyToSpace(value) + ""; + }, + + //clickable anchor tag + link:function(cell, formatterParams){ + var value = this.sanitizeHTML(cell.getValue()); + return "" + this.emptyToSpace(value) + ""; + }, + + //image element + image:function(cell, formatterParams){ + var value = this.sanitizeHTML(cell.getValue()); + return ""; + }, + + //tick or empty cell + tick:function(cell, formatterParams){ + var value = cell.getValue(), + element = cell.getElement(); + + var tick = ''; + + if(value === true || value === "true" || value === "True" || value === 1 || value === "1"){ + element.attr("aria-checked", true); + return tick; + }else{ + element.attr("aria-checked", false); + return ""; + } + }, + + //tick or cross + tickCross:function(cell, formatterParams){ + var value = cell.getValue(), + element = cell.getElement(), + tick = '', + cross = ''; + + if(value === true || value === "true" || value === "True" || value === 1 || value === "1"){ + element.attr("aria-checked", true); + return tick; + }else{ + element.attr("aria-checked", false); + return cross; + } + }, + + //star rating + star:function(cell, formatterParams){ + var value = cell.getValue(), + element = cell.getElement(), + maxStars = formatterParams && formatterParams.stars ? formatterParams.stars : 5, + stars = $(""), + starActive = $(''), + starInactive = $(''); + + value = parseInt(value) < maxStars ? parseInt(value) : maxStars; + + for(var i=1;i<= maxStars;i++){ + + var nextStar = i <= value ? starActive : starInactive; + + stars.append(nextStar.clone()); + } + + element.css({ + "white-space": "nowrap", + "overflow": "hidden", + "text-overflow": "ellipsis", + }); + + element.attr("aria-label", value); + + return stars.html(); + }, + + //progress bar + progress:function(cell, formatterParams){ //progress bar + var value = this.sanitizeHTML(cell.getValue()) || 0, + element = cell.getElement(), + max = formatterParams && formatterParams.max ? formatterParams.max : 100, + min = formatterParams && formatterParams.min ? formatterParams.min : 0, + color = formatterParams && formatterParams.color ? formatterParams.color : "#2DC214", + percent; + + //make sure value is in range + value = parseFloat(value) <= max ? parseFloat(value) : max; + value = parseFloat(value) >= min ? parseFloat(value) : min; + + //workout percentage + percent = (max - min) / 100; + value = 100 - Math.round((value - min) / percent); + + element.css({ + "min-width":"30px", + "position":"relative", + }); + + element.attr("aria-label", value); + + return "
"; + }, + + //background color + color:function(cell, formatterParams){ + cell.getElement().css({"background-color":this.sanitizeHTML(cell.getValue())}); + return ""; + }, + + //tick icon + buttonTick:function(cell, formatterParams){ + return ''; + }, + + //cross icon + buttonCross:function(cell, formatterParams){ + return ''; + }, + + //current row number + rownum:function(cell, formatterParams){ + return this.table.rowManager.activeRows.indexOf(cell.getRow()._getSelf()) + 1; + }, + + //row handle + handle:function(cell, formatterParams){ + cell.getElement().addClass("tabulator-row-handle"); + return "
"; + }, +}; + +Tabulator.registerExtension("format", Format); \ No newline at end of file diff --git a/js/tabulator/src/js/extensions/frozen_columns.js b/js/tabulator/src/js/extensions/frozen_columns.js new file mode 100644 index 0000000..04ebefc --- /dev/null +++ b/js/tabulator/src/js/extensions/frozen_columns.js @@ -0,0 +1,162 @@ +var FrozenColumns = function(table){ + this.table = table; //hold Tabulator object + this.leftColumns = []; + this.rightColumns = []; + this.leftMargin = 0; + this.rightMargin = 0; + this.initializationMode = "left"; + this.active = false; +}; + +//reset initial state +FrozenColumns.prototype.reset = function(){ + this.initializationMode = "left"; + this.leftColumns = []; + this.rightColumns = []; + this.active = false; +}; + +//initialize specific column +FrozenColumns.prototype.initializeColumn = function(column){ + var config = {margin:0, edge:false}; + + if(column.definition.frozen){ + + if(!column.parent.isGroup){ + + + if(!column.isGroup){ + config.position = this.initializationMode; + + if(this.initializationMode == "left"){ + this.leftColumns.push(column); + }else{ + this.rightColumns.unshift(column); + } + + this.active = true; + + column.extensions.frozen = config; + }else{ + console.warn("Frozen Column Error - Column Groups cannot be frozen"); + } + }else{ + console.warn("Frozen Column Error - Grouped columns cannot be frozen"); + } + + }else{ + this.initializationMode = "right"; + } +}; + +//layout columns appropropriatly +FrozenColumns.prototype.layout = function(){ + var self = this, + tableHolder = this.table.rowManager.element, + rightMargin = 0; + + if(self.active){ + + //calculate row padding + + self.leftMargin = self._calcSpace(self.leftColumns, self.leftColumns.length); + self.table.columnManager.headersElement.css("margin-left", self.leftMargin); + + self.rightMargin = self._calcSpace(self.rightColumns, self.rightColumns.length); + self.table.columnManager.element.css("padding-right", self.rightMargin); + + self.table.rowManager.activeRows.forEach(function(row){ + self.layoutRow(row); + }); + + if(self.table.extExists("columnCalcs")){ + if(self.table.extensions.columnCalcs.topInitialized && self.table.extensions.columnCalcs.topRow){ + self.layoutRow(self.table.extensions.columnCalcs.topRow); + } + if(self.table.extensions.columnCalcs.botInitialized && self.table.extensions.columnCalcs.botRow){ + self.layoutRow(self.table.extensions.columnCalcs.botRow); + } + } + + + //calculate left columns + self.leftColumns.forEach(function(column, i){ + column.extensions.frozen.margin = self._calcSpace(self.leftColumns, i) + self.table.columnManager.scrollLeft; + + if(i == self.leftColumns.length - 1){ + column.extensions.frozen.edge = true; + }else{ + column.extensions.frozen.edge = false; + } + + self.layoutColumn(column); + }); + + //calculate right frozen columns + rightMargin = self.table.rowManager.element.innerWidth() + self.table.columnManager.scrollLeft; + + if(tableHolder[0].scrollHeight > tableHolder.innerHeight()){ + rightMargin -= tableHolder[0].offsetWidth - tableHolder[0].clientWidth; + } + + self.rightColumns.forEach(function(column, i){ + column.extensions.frozen.margin = rightMargin - self._calcSpace(self.rightColumns, i + 1); + + if(i == self.rightColumns.length - 1){ + column.extensions.frozen.edge = true; + }else{ + column.extensions.frozen.edge = false; + } + + self.layoutColumn(column); + }); + } +}; + +FrozenColumns.prototype.layoutColumn = function(column){ + var self = this; + + self.layoutElement(column.element, column); + + column.cells.forEach(function(cell){ + self.layoutElement(cell.element, column); + }); +}; + +FrozenColumns.prototype.layoutRow = function(row){ + row.getElement().css({ + "padding-left": this.leftMargin, + "padding-right": this.rightMargin, + }); +}; + +FrozenColumns.prototype.layoutElement = function(element, column){ + + if(column.extensions.frozen){ + var css = { + position:"absolute", + left:column.extensions.frozen.margin + } + + element.css(css); + element.addClass("tabulator-frozen"); + + if(column.extensions.frozen.edge){ + element.addClass("tabulator-frozen-" + column.extensions.frozen.position); + } + } +}; + +FrozenColumns.prototype._calcSpace = function(columns, index){ + var width = 0; + + for (let i = 0; i < index; i++){ + if(columns[i].visible){ + width += columns[i].getWidth(); + } + } + + return width; +}; + +Tabulator.registerExtension("frozenColumns", FrozenColumns); \ No newline at end of file diff --git a/js/tabulator/src/js/extensions/group_rows.js b/js/tabulator/src/js/extensions/group_rows.js new file mode 100644 index 0000000..04eba70 --- /dev/null +++ b/js/tabulator/src/js/extensions/group_rows.js @@ -0,0 +1,641 @@ + + +//public group object +var GroupComponent = function (group){ + this.group = group; + this.type = "GroupComponent"; +} + +GroupComponent.prototype.getKey = function(){ + return this.group.key; +}; + +GroupComponent.prototype.getElement = function(){ + return this.group.element; +}; + +GroupComponent.prototype.getRows = function(){ + var output = [] + + this.group.rows.forEach(function(row){ + output.push(row.getComponent()); + }); + + return output; +}; + +GroupComponent.prototype.getSubGroups = function(){ + var output = []; + + this.group.groupList.forEach(function(child){ + output.push(child.getComponent()); + }); + + return output; +}; + +GroupComponent.prototype.getParentGroup = function(){ + return this.group.parent ? this.group.parent.getComponent() : false; +}; + +GroupComponent.prototype.getVisibility = function(){ + return this.group.visible; +}; + +GroupComponent.prototype.show = function(){ + this.group.show() +}; + +GroupComponent.prototype.hide = function(){ + this.group.hide(); +}; + +GroupComponent.prototype.toggle = function(){ + this.group.toggleVisibility(); +}; + +GroupComponent.prototype._getSelf = function(){ + return this.group; +}; + +////////////////////////////////////////////////// +//////////////// Group Functions ///////////////// +////////////////////////////////////////////////// + +var Group = function(groupManager, parent, level, key, generator, oldGroup){ + + this.groupManager = groupManager; + this.parent = parent; + this.key = key; + this.level = level; + this.hasSubGroups = level < (groupManager.groupIDLookups.length - 1); + this.addRow = this.hasSubGroups ? this._addRowToGroup : this._addRow; + this.type = "group"; //type of element + this.old = oldGroup; + this.rows = []; + this.groups = []; + this.groupList = []; + this.generator = generator; + this.element = $("
"); + this.arrowElement = $("
"); + this.height = 0; + this.outerHeight = 0; + this.initialized = false; + this.calcs = {}; + this.initialized = false; + + this.visible = oldGroup ? oldGroup.visible : (typeof groupManager.startOpen[level] !== "undefined" ? groupManager.startOpen[level] : groupManager.startOpen[0]); + + this.addBindings(); +}; + +Group.prototype.addBindings = function(){ + var self = this, + dblTap, tapHold, tap, toggleElement; + + if(self.groupManager.table.options.groupToggleElement){ + toggleElement = self.groupManager.table.options.groupToggleElement == "arrow" ? self.arrowElement : self.element; + + toggleElement.on("click", function(e){ + e.stopPropagation(); + e.stopImmediatePropagation(); + self.toggleVisibility(); + }); + } + + + //handle group click events + if (self.groupManager.table.options.groupClick){ + self.element.on("click", function(e){ + self.groupManager.table.options.groupClick(e, self.getComponent()); + }) + } + + if (self.groupManager.table.options.groupDblClick){ + self.element.on("dblclick", function(e){ + self.groupManager.table.options.groupDblClick(e, self.getComponent()); + }) + } + + if (self.groupManager.table.options.groupContext){ + self.element.on("contextmenu", function(e){ + self.groupManager.table.options.groupContext(e, self.getComponent()); + }) + } + + if (self.groupManager.table.options.groupTap){ + + tap = false; + + self.element.on("touchstart", function(e){ + tap = true; + }); + + self.element.on("touchend", function(e){ + if(tap){ + self.groupManager.table.options.groupTap(e, self.getComponent()); + } + + tap = false; + }); + } + + if (self.groupManager.table.options.groupDblTap){ + + dblTap = null; + + self.element.on("touchend", function(e){ + + if(dblTap){ + clearTimeout(dblTap); + dblTap = null; + + self.groupManager.table.options.groupDblTap(e, self.getComponent()); + }else{ + + dblTap = setTimeout(function(){ + clearTimeout(dblTap); + dblTap = null; + }, 300); + } + + }); + } + + + if (self.groupManager.table.options.groupTapHold){ + + tapHold = null; + + self.element.on("touchstart", function(e){ + clearTimeout(tapHold); + + tapHold = setTimeout(function(){ + clearTimeout(tapHold); + tapHold = null; + tap = false; + self.groupManager.table.options.groupTapHold(e, self.getComponent()); + }, 1000) + + }); + + self.element.on("touchend", function(e){ + clearTimeout(tapHold); + tapHold = null; + }); + } + +}; + +Group.prototype._addRowToGroup = function(row){ + + var level = this.level + 1; + + if(this.hasSubGroups){ + var groupID = this.groupManager.groupIDLookups[level](row.getData()); + + if(!this.groups[groupID]){ + var group = new Group(this.groupManager, this, level, groupID, this.groupManager.headerGenerator[level] || this.groupManager.headerGenerator[0], this.old ? this.old.groups[groupID] : false); + + this.groups[groupID] = group; + this.groupList.push(group); + } + + this.groups[groupID].addRow(row); + } + +}; + +Group.prototype._addRow = function(row){ + this.rows.push(row); +}; + +Group.prototype.getHeadersAndRows = function(){ + var output = []; + + output.push(this); + + this._visSet(); + + if(this.visible){ + + if(this.groupList.length){ + this.groupList.forEach(function(group){ + output = output.concat(group.getHeadersAndRows()); + }); + + }else{ + if(this.groupManager.table.extExists("columnCalcs") && this.groupManager.table.extensions.columnCalcs.hasTopCalcs()){ + this.calcs.top = this.groupManager.table.extensions.columnCalcs.generateTopRow(this.rows); + output.push(this.calcs.top); + } + + output = output.concat(this.rows); + + if(this.groupManager.table.extExists("columnCalcs") && this.groupManager.table.extensions.columnCalcs.hasBottomCalcs()){ + this.calcs.bottom = this.groupManager.table.extensions.columnCalcs.generateBottomRow(this.rows); + output.push(this.calcs.bottom); + } + } + }else{ + if(this.groupManager.table.options.groupClosedShowCalcs){ + if(this.groupManager.table.extExists("columnCalcs")){ + if(this.groupManager.table.extensions.columnCalcs.hasTopCalcs()){ + this.calcs.top = this.groupManager.table.extensions.columnCalcs.generateTopRow(this.rows) + output.push(this.calcs.top); + } + + if(this.groupManager.table.extensions.columnCalcs.hasBottomCalcs()){ + this.calcs.bottom = this.groupManager.table.extensions.columnCalcs.generateBottomRow(this.rows); + output.push(this.calcs.bottom); + } + } + } + } + + return output; +}; + +Group.prototype.getRows = function(){ + this._visSet(); + + return this.visible ? this.rows : []; +}; + +Group.prototype.getRowCount = function(){ + var count = 0; + + if(this.groupList.length){ + this.groupList.forEach(function(group){ + count += group.getRowCount(); + }); + }else{ + count = this.rows.length; + } + return count; +}; + +Group.prototype.toggleVisibility = function(){ + if(this.visible){ + this.hide(); + }else{ + this.show(); + } +}; + +Group.prototype.hide = function(){ + this.visible = false; + + if(this.groupManager.table.rowManager.getRenderMode() == "classic"){ + + this.element.removeClass("tabulator-group-visible"); + + this.rows.forEach(function(row){ + row.getElement().detach(); + }); + }else{ + this.groupManager.updateGroupRows(true); + } + + this.groupManager.table.options.groupVisibilityChanged(this.getComponent(), false); +}; + +Group.prototype.show = function(){ + var self = this; + + self.visible = true; + + if(this.groupManager.table.rowManager.getRenderMode() == "classic"){ + + this.element.addClass("tabulator-group-visible"); + + self.rows.forEach(function(row){ + self.getElement().after(row.getElement()); + row.initialize(); + }); + }else{ + this.groupManager.updateGroupRows(true); + } + + this.groupManager.table.options.groupVisibilityChanged(this.getComponent(), true); +}; + +Group.prototype._visSet = function(){ + var data = []; + + if(typeof this.visible == "function"){ + + this.rows.forEach(function(row){ + data.push(row.getData()); + }); + + this.visible = this.visible(this.key, this.getRowCount(), data, this.getRowCount()); + } +}; + +Group.prototype.getRowGroup = function(row){ + var match = false; + if(this.groupList.length){ + this.groupList.forEach(function(group){ + var result = group.getRowGroup(row); + + if(result){ + match = result; + } + }); + }else{ + if(this.rows.find(function(item){ + return item === row; + })){ + match = this; + } + } + + return match; +}; + +////////////// Standard Row Functions ////////////// + +Group.prototype.getElement = function(){ + this.addBindingsd = false; + + this._visSet(); + + var data = []; + + this.rows.forEach(function(row){ + data.push(row.getData()); + }); + + if(this.visible){ + this.element.addClass("tabulator-group-visible"); + }else{ + this.element.removeClass("tabulator-group-visible"); + } + + this.element.children().detach(); + + this.element.html(this.generator(this.key, this.getRowCount(), data, this.getComponent())).prepend(this.arrowElement); + + // this.addBindings(); + + return this.element; +}; + +//normalize the height of elements in the row +Group.prototype.normalizeHeight = function(){ + this.setHeight(this.element.innerHeight()) +}; + +Group.prototype.initialize = function(force){ + if(!this.initialized || force){ + this.normalizeHeight(); + this.initialized = true; + } +}; + +Group.prototype.reinitialize = function(){ + this.initialized = false; + this.height = 0; + + if(this.element.is(":visible")){ + this.initialize(true); + } +}; + +Group.prototype.setHeight = function(height){ + if(this.height != height){ + this.height = height; + this.outerHeight = this.element.outerHeight(); + } +}; + +//return rows outer height +Group.prototype.getHeight = function(){ + return this.outerHeight; +}; + +Group.prototype.reinitializeHeight = function(){ +}; +Group.prototype.calcHeight = function(){ +}; +Group.prototype.setCellHeight = function(){ +}; +Group.prototype.clearCellHeight = function(){ +} + + +//////////////// Object Generation ///////////////// +Group.prototype.getComponent = function(){ + return new GroupComponent(this); +}; + +////////////////////////////////////////////////// +////////////// Group Row Extension /////////////// +////////////////////////////////////////////////// + +var GroupRows = function(table){ + + this.table = table; //hold Tabulator object + + this.groupIDLookups = false; //enable table grouping and set field to group by + this.startOpen = [function(){return false;}]; //starting state of group + this.headerGenerator = [function(){return "";}]; + this.groupList = []; //ordered list of groups + this.groups = {}; //hold row groups +}; + + +//initialize group configuration +GroupRows.prototype.initialize = function(){ + var self = this, + groupBy = self.table.options.groupBy, + startOpen = self.table.options.groupStartOpen, + groupHeader = self.table.options.groupHeader; + + self.headerGenerator = [function(){return "";}]; + this.startOpen = [function(){return false;}]; //starting state of group + + self.table.extensions.localize.bind("groups.item", function(langValue, lang){ + self.headerGenerator[0] = function(value, count, data){ //header layout function + return value + "(" + count + " " + ((count === 1) ? langValue : lang.groups.items) + ")"; + }; + }); + + this.groupIDLookups = []; + + + if(Array.isArray(groupBy) || groupBy){ + if(this.table.extExists("columnCalcs")){ + this.table.extensions.columnCalcs.removeCalcs(); + } + }else{ + if(this.table.extExists("columnCalcs")){ + + var cols = this.table.columnManager.getRealColumns(); + + cols.forEach(function(col){ + if(col.definition.topCalc){ + self.table.extensions.columnCalcs.initializeTopRow(); + } + + if(col.definition.bottomCalc){ + self.table.extensions.columnCalcs.initializeBottomRow(); + } + }) + } + } + + + + if(!Array.isArray(groupBy)){ + groupBy = [groupBy]; + } + + groupBy.forEach(function(group){ + var lookupFunc, column; + + if(typeof group == "function"){ + lookupFunc = group; + }else{ + column = self.table.columnManager.getColumnByField(group); + + if(column){ + lookupFunc = function(data){ + return column.getFieldValue(data); + } + }else{ + lookupFunc = function(data){ + return data[group]; + } + } + } + + self.groupIDLookups.push(lookupFunc); + }); + + + + if(startOpen){ + + if(!Array.isArray(startOpen)){ + startOpen = [startOpen]; + } + + startOpen.forEach(function(level){ + level = typeof level == "function" ? level : function(){return true;}; + }); + + self.startOpen = startOpen; + } + + if(groupHeader){ + self.headerGenerator = Array.isArray(groupHeader) ? groupHeader : [groupHeader]; + } + + this.initialized = true; + +}; + +//return appropriate rows with group headers +GroupRows.prototype.getRows = function(rows){ + if(this.groupIDLookups.length){ + + this.table.options.dataGrouping(); + + this.generateGroups(rows); + + if(this.table.options.dataGrouped){ + this.table.options.dataGrouped(this.getGroups()); + }; + + return this.updateGroupRows(); + + }else{ + return rows.slice(0); + } + +}; + +GroupRows.prototype.getGroups = function(){ + var groupComponents = []; + + if(this.table.options.dataGrouped){ + this.groupList.forEach(function(group){ + groupComponents.push(group.getComponent()); + }); + } + + return groupComponents; +}; + +GroupRows.prototype.getRowGroup = function(row){ + var match = false; + + this.groupList.forEach(function(group){ + var result = group.getRowGroup(row); + + if(result){ + match = result; + } + }); + + return match; +}; + +GroupRows.prototype.countGroups = function(){ + return this.groupList.length; +}; + +GroupRows.prototype.generateGroups = function(rows){ + var self = this, + oldGroups = self.groups; + + self.groups = {}; + self.groupList =[]; + + rows.forEach(function(row){ + + var groupID = self.groupIDLookups[0](row.getData()); + + if(!self.groups[groupID]){ + var group = new Group(self, false, 0, groupID, self.headerGenerator[0], oldGroups[groupID]); + + self.groups[groupID] = group; + self.groupList.push(group); + } + + self.groups[groupID].addRow(row); + }); + + +} + + +GroupRows.prototype.updateGroupRows = function(force){ + var self = this, + output = [], + oldRowCount; + + self.groupList.forEach(function(group){ + output = output.concat(group.getHeadersAndRows()); + }); + + //force update of table display + if(force){ + oldRowCount = self.table.rowManager.displayRowsCount; + + self.table.rowManager.setDisplayRows(output); + self.table.rowManager._virtualRenderFill(Math.floor((self.table.rowManager.element.scrollTop() / self.table.rowManager.element[0].scrollHeight) * oldRowCount)); + } + + return output; +}; + +GroupRows.prototype.scrollHeaders = function(left){ + this.groupList.forEach(function(group){ + group.arrowElement.css("margin-left", left); + }); +}; + +Tabulator.registerExtension("groupRows", GroupRows); \ No newline at end of file diff --git a/js/tabulator/src/js/extensions/history.js b/js/tabulator/src/js/extensions/history.js new file mode 100644 index 0000000..a2efe45 --- /dev/null +++ b/js/tabulator/src/js/extensions/history.js @@ -0,0 +1,117 @@ +var History = function(table){ + this.table = table; //hold Tabulator object + + this.history = []; + this.index = -1; +}; + + +History.prototype.clear = function(){ + this.history = []; + this.index = -1; +}; + +History.prototype.action = function(type, component, data){ + + if(this.index > -1){ + this.history = this.history.slice(0, this.index + 1); + } + + this.history.push({ + type:type, + component:component, + data:data, + }); + + this.index ++; +}; + +History.prototype.undo = function(){ + + if(this.index > -1){ + + let action = this.history[this.index]; + + this.undoers[action.type].call(this, action); + + this.index--; + + return true; + }else{ + console.warn("History Undo Error - No more history to undo"); + return false; + } + +}; + +History.prototype.redo = function(){ + if(this.history.length-1 > this.index){ + + this.index++; + + let action = this.history[this.index]; + + this.redoers[action.type].call(this, action); + + return true; + }else{ + console.warn("History Redo Error - No more history to redo"); + return false; + } +}; + + +History.prototype.undoers = { + cellEdit: function(action){ + action.component.setValueProcessData(action.data.oldValue); + }, + + rowAdd: function(action){ + action.component.delete(); + }, + + rowDelete: function(action){ + var newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index); + + this._rebindRow(action.component, newRow); + }, +}; + + +History.prototype.redoers = { + cellEdit: function(action){ + action.component.setValueProcessData(action.data.newValue); + }, + + rowAdd: function(action){ + var newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index); + + this._rebindRow(action.component, newRow); + }, + + rowDelete:function(action){ + action.component.delete(); + }, +}; + +//rebind rows to new element after deletion +History.prototype._rebindRow = function(oldRow, newRow){ + this.history.forEach(function(action){ + if(action.component instanceof Row){ + if(action.component === oldRow){ + action.component = newRow; + } + }else if(action.component instanceof Cell){ + if(action.component.row === oldRow){ + var field = action.component.column.getField(); + + if(field){ + action.component = newRow.getCell(field); + } + + } + } + }); +}; + +Tabulator.registerExtension("history", History); \ No newline at end of file diff --git a/js/tabulator/src/js/extensions/html_table_import.js b/js/tabulator/src/js/extensions/html_table_import.js new file mode 100644 index 0000000..5c03e6a --- /dev/null +++ b/js/tabulator/src/js/extensions/html_table_import.js @@ -0,0 +1,197 @@ +var HtmlTableImport = function(table){ + this.table = table; //hold Tabulator object +}; + +HtmlTableImport.prototype.parseTable = function(){ + var self = this, + element = self.table.element, + options = self.table.options, + columns = options.columns, + headers = $("th", element), + hasIndex = false, + rows = $("tbody tr", element), + data = []; + + self.table.options.htmlImporting(); + + //check for tablator inline options + self._extractOptions(element, options); + + if(headers.length){ + self._extractHeaders(element); + }else{ + self._generateBlankHeaders(element); + } + + + //iterate through table rows and build data set + rows.each(function(rowIndex){ + var item = {}; + + //create index if the dont exist in table + if(!hasIndex){ + item[options.index] = rowIndex; + } + + //add row data to item + $("td", $(this)).each(function(colIndex){ + item[$(this).data("field")] = $(this).html(); + }); + + data.push(item); + }); + + //create new element + var newElement = $("
"); + + //transfer attributes to new element + var attributes = element.prop("attributes"); + + // loop through attributes and apply them on div + $.each(attributes, function(){ + newElement.attr(this.name, this.value); + }); + + // replace table with div element + element.replaceWith(newElement); + + options.data = data; + + self.table.options.htmlImported(); + + newElement.tabulator(options); +}; + +//extract tabluator attribute options +HtmlTableImport.prototype._extractOptions = function(element, options){ + var self = this, + attributes = element[0].attributes + + for(var index in attributes){ + var attrib = attributes[index]; + var name; + + if(attrib && attrib.name && attrib.name.indexOf("tabulator-") === 0){ + + name = attrib.name.replace("tabulator-", ""); + + for(var key in options){ + if(key.toLowerCase() == name){ + options[key] = self._attribValue(attrib.value); + } + } + } + } +}; + +//get value of attribute +HtmlTableImport.prototype._attribValue = function(value){ + if(value === "true"){ + return true; + } + + if(value === "false"){ + return false; + } + + return value; +}; + +//find column if it has already been defined +HtmlTableImport.prototype._findCol = function(title){ + var self = this; + + var match = self.table.options.columns.find(function(column){ + return column.title === title; + }); + + return match || false; +}; + +//extract column from headers +HtmlTableImport.prototype._extractHeaders = function(element){ + var self = this, + headers = $("th", element), + rows = $("tbody tr", element); + + headers.each(function(index){ + var header = $(this), + exists = false, + col = self._findCol(header.text()), + width, attributes; + + //list of possible attributes + var attribList = ["title", "field", "align", "width", "minWidth", "frozen", "sortable", "sorter", "formatter", "cellClick", "cellDblClick", "cellContext", "editable", "editor", "visible", "cssClass", "tooltip", "tooltipHeader", "editableTitle", "headerFilter", "mutator", "mutateType", "accessor"]; + + + if(col){ + exists = true; + }else{ + col = {title:header.text().trim()}; + } + + if(!col.field) { + col.field = header.text().trim().toLowerCase().replace(" ", "_"); + } + + width = header.attr("width"); + + if(width && !col.width) { + col.width = width; + } + + + //check for tablator inline options + attributes = header[0].attributes; + + //check for tablator inline options + for(var i in attributes){ + var attrib = attributes[i], + name; + + if(attrib && attrib.name && attrib.name.indexOf("tabulator-") === 0){ + + name = attrib.name.replace("tabulator-", ""); + + attribList.forEach(function(key){ + if(key.toLowerCase() == name){ + col[key] = self._attribValue(attrib.value); + } + }); + } + } + + $("td:eq(" + index + ")", rows).data("field", col.field); + + if(col.field == self.table.options.index){ + hasIndex = true; + } + + if(!exists){ + self.table.options.columns.push(col) + } + + }); +}; + +//generate blank headers +HtmlTableImport.prototype._generateBlankHeaders = function(element){ + var self = this; + + var headers = $("tr:first td", element); + + headers.each(function(index){ + var col = {title:"", field:"col" + index}; + $("td:eq(" + index + ")", rows).data("field", col.field) + + var width = $(this).attr("width"); + + if(width){ + col.width = width; + } + + self.table.options.columns.push(col); + }); +}; + +Tabulator.registerExtension("htmlTableImport", HtmlTableImport); \ No newline at end of file diff --git a/js/tabulator/src/js/extensions/keybindings.js b/js/tabulator/src/js/extensions/keybindings.js new file mode 100644 index 0000000..d76a2f6 --- /dev/null +++ b/js/tabulator/src/js/extensions/keybindings.js @@ -0,0 +1,333 @@ +var Keybindings = function(table){ + this.table = table; //hold Tabulator object + this.watchKeys = null; + this.pressedKeys = null; +}; + + +Keybindings.prototype.initialize = function(){ + var bindings = this.table.options.keybindings, + mergedBindings = {}; + + this.watchKeys = {}; + this.pressedKeys = []; + + if(bindings !== false){ + + for(let key in this.bindings){ + mergedBindings[key] = this.bindings[key]; + } + + if(Object.keys(bindings).length){ + + for(let key in bindings){ + mergedBindings[key] = bindings[key]; + } + } + + this.mapBindings(mergedBindings); + this.bindEvents(); + } +}; + +Keybindings.prototype.mapBindings = function(bindings){ + var self = this; + + for(let key in bindings){ + + if(this.actions[key]){ + + if(bindings[key]){ + + if(typeof bindings[key] !== "object"){ + bindings[key] = [bindings[key]]; + } + + bindings[key].forEach(function(binding){ + self.mapBinding(key, binding); + }); + } + + }else{ + console.warn("Key Binding Error - no such action:", key); + } + } +}; + +Keybindings.prototype.mapBinding = function(action, symbolsList){ + var self = this; + + var binding = { + action: this.actions[action], + keys: [], + ctrl: false, + shift: false, + } + + var symbols = symbolsList.toString().toLowerCase().split(" ").join("").split("+"); + + symbols.forEach(function(symbol){ + switch(symbol){ + case "ctrl": + binding.ctrl = true; + break; + + case "shift": + binding.shift = true; + break; + + default: + symbol = parseInt(symbol); + binding.keys.push(symbol); + + if(!self.watchKeys[symbol]){ + self.watchKeys[symbol] = []; + } + + self.watchKeys[symbol].push(binding); + } + }); +}; + +Keybindings.prototype.bindEvents = function(){ + var self = this; + + this.table.element.on("keydown", function(e){ + var code = e.keyCode; + var bindings = self.watchKeys[code]; + + if(bindings){ + + self.pressedKeys.push(code); + + bindings.forEach(function(binding){ + self.checkBinding(e, binding); + }); + } + }); + + this.table.element.on("keyup", function(e){ + var code = e.keyCode; + var bindings = self.watchKeys[code]; + + if(bindings){ + + var index = self.pressedKeys.indexOf(code); + + if(index > -1){ + self.pressedKeys.splice(index, 1); + } + } + }); +}; + + +Keybindings.prototype.checkBinding = function(e, binding){ + var self = this, + match = true; + + if(e.ctrlKey == binding.ctrl && e.shiftKey == binding.shift){ + binding.keys.forEach(function(key){ + var index = self.pressedKeys.indexOf(key); + + if(index == -1){ + match = false; + } + }); + + if(match){ + binding.action.call(self, e); + } + + return true; + } + + return false; +}; + +//default bindings +Keybindings.prototype.bindings = { + navPrev:"shift + 9", + navNext:9, + navUp:38, + navDown:40, + scrollPageUp:33, + scrollPageDown:34, + scrollToStart:36, + scrollToEnd:35, + undo:"ctrl + 90", + redo:"ctrl + 89", +}; + + +//default actions +Keybindings.prototype.actions = { + keyBlock:function(e){ + e.stopPropagation(); + e.preventDefault(); + }, + scrollPageUp:function(e){ + var rowManager = this.table.rowManager, + newPos = rowManager.scrollTop - rowManager.height, + scrollMax = rowManager.element[0].scrollHeight; + + e.preventDefault(); + + if(rowManager.displayRowsCount){ + if(newPos >= 0){ + rowManager.element.scrollTop(newPos); + }else{ + rowManager.scrollToRow(rowManager.displayRows[0]); + } + } + + this.table.element.focus(); + }, + scrollPageDown:function(e){ + var rowManager = this.table.rowManager, + newPos = rowManager.scrollTop + rowManager.height, + scrollMax = rowManager.element[0].scrollHeight; + + e.preventDefault(); + + if(rowManager.displayRowsCount){ + if(newPos <= scrollMax){ + rowManager.element.scrollTop(newPos); + }else{ + rowManager.scrollToRow(rowManager.displayRows[rowManager.displayRows.length - 1]); + } + } + + this.table.element.focus(); + + }, + scrollToStart:function(e){ + var rowManager = this.table.rowManager; + + e.preventDefault(); + + if(rowManager.displayRowsCount){ + rowManager.scrollToRow(rowManager.displayRows[0]); + } + + this.table.element.focus(); + }, + scrollToEnd:function(e){ + var rowManager = this.table.rowManager; + + e.preventDefault(); + + if(rowManager.displayRowsCount){ + rowManager.scrollToRow(rowManager.displayRows[rowManager.displayRows.length - 1]); + } + + this.table.element.focus(); + }, + navPrev:function(e){ + var cell = false; + + if(this.table.extExists("edit")){ + cell = this.table.extensions.edit.currentCell; + + if(cell){ + e.preventDefault(); + cell.nav().prev(); + } + } + }, + + navNext:function(e){ + var cell = false; + + if(this.table.extExists("edit")){ + cell = this.table.extensions.edit.currentCell; + + if(cell){ + e.preventDefault(); + cell.nav().next(); + } + } + }, + + navLeft:function(e){ + var cell = false; + + if(this.table.extExists("edit")){ + cell = this.table.extensions.edit.currentCell; + + if(cell){ + e.preventDefault(); + cell.nav().left(); + } + } + }, + + navRight:function(e){ + var cell = false; + + if(this.table.extExists("edit")){ + cell = this.table.extensions.edit.currentCell; + + if(cell){ + e.preventDefault(); + cell.nav().right(); + } + } + }, + + navUp:function(e){ + var cell = false; + + if(this.table.extExists("edit")){ + cell = this.table.extensions.edit.currentCell; + + if(cell){ + e.preventDefault(); + cell.nav().up(); + } + } + }, + + navDown:function(e){ + var cell = false; + + if(this.table.extExists("edit")){ + cell = this.table.extensions.edit.currentCell; + + if(cell){ + e.preventDefault(); + cell.nav().down(); + } + } + }, + + undo:function(e){ + var cell = false; + if(this.table.options.history && this.table.extExists("history") && this.table.extExists("edit")){ + + cell = this.table.extensions.edit.currentCell; + + if(!cell){ + e.preventDefault(); + this.table.extensions.history.undo(); + } + } + }, + + redo:function(e){ + var cell = false; + if(this.table.options.history && this.table.extExists("history") && this.table.extExists("edit")){ + + cell = this.table.extensions.edit.currentCell; + + if(!cell){ + e.preventDefault(); + this.table.extensions.history.redo(); + } + } + }, + +}; + + +Tabulator.registerExtension("keybindings", Keybindings); \ No newline at end of file diff --git a/js/tabulator/src/js/extensions/layout.js b/js/tabulator/src/js/extensions/layout.js new file mode 100644 index 0000000..353ddff --- /dev/null +++ b/js/tabulator/src/js/extensions/layout.js @@ -0,0 +1,160 @@ +var Layout = function(table){ + this.table = table; + this.mode = null; +}; + +//initialize layout system +Layout.prototype.initialize = function(layout){ + + if(this.modes[layout]){ + this.mode = layout; + }else{ + console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : " + layout); + this.mode = 'fitData'; + } + + this.table.element.attr("tabulator-layout", this.mode); +}; + +Layout.prototype.getMode = function(){ + return this.mode; +}; + +//trigger table layout +Layout.prototype.layout = function(){ + this.modes[this.mode].call(this, this.table.columnManager.columnsByIndex); +}; + +//layout render functions +Layout.prototype.modes = { + + //resize columns to fit data the contain + "fitData": function(columns){ + columns.forEach(function(column){ + column.reinitializeWidth(); + }); + + if(this.table.options.responsiveLayout && this.table.extExists("responsiveLayout", true)){ + this.table.extensions.responsiveLayout.update(); + } + }, + + //resize columns to fit data the contain + "fitDataFill": function(columns){ + columns.forEach(function(column){ + column.reinitializeWidth(); + }); + + if(this.table.options.responsiveLayout && this.table.extExists("responsiveLayout", true)){ + this.table.extensions.responsiveLayout.update(); + } + }, + + //resize columns to fit + "fitColumns": function(columns){ + var self = this; + + var totalWidth = self.table.element.innerWidth(); //table element width + var fixedWidth = 0; //total width of columns with a defined width + var flexWidth = 0; //total width available to flexible columns + var flexColWidth = 0; //desired width of flexible columns + var flexColumns = []; //array of flexible width columns + var gapFill=0; //number of pixels to be added to final column to close and half pixel gaps + + //ensure columns resize to take up the correct amount of space + function scaleColumns(columns, freeSpace, colWidth){ + + var oversizeCols = [], + oversizeSpace = 0, + remainingSpace = 0, + nextColWidth = 0, + gap = 0, + undersizeCols = []; + + columns.forEach(function(column, i){ + if(column.minWidth >= colWidth){ + oversizeCols.push(column); + }else{ + undersizeCols.push(column); + } + }); + + if(oversizeCols.length){ + oversizeCols.forEach(function(column){ + oversizeSpace += column.minWidth; + column.setWidth(column.minWidth); + }); + + remainingSpace = freeSpace - oversizeSpace; + + nextColWidth = undersizeCols.length ? Math.floor(remainingSpace/undersizeCols.length) : remainingSpace; + + gap = remainingSpace - (nextColWidth * undersizeCols.length); + + gap += scaleColumns(undersizeCols, remainingSpace, nextColWidth); + }else{ + gap = undersizeCols.length ? freeSpace - (Math.floor(freeSpace/undersizeCols.length) * undersizeCols.length) : freeSpace; + + undersizeCols.forEach(function(column){ + column.setWidth(colWidth); + }); + } + + return gap; + } + + if(this.table.options.responsiveLayout && this.table.extExists("responsiveLayout", true)){ + this.table.extensions.responsiveLayout.update(); + } + + //adjust for vertical scrollbar if present + if(this.table.rowManager.element[0].scrollHeight > this.table.rowManager.element.innerHeight()){ + totalWidth -= this.table.rowManager.element[0].offsetWidth - this.table.rowManager.element[0].clientWidth; + } + + columns.forEach(function(column){ + var width, minWidth, colWidth; + + if(column.visible){ + + width = column.definition.width; + minWidth = parseInt(column.minWidth); + + if(width){ + + if(typeof(width) == "string"){ + if(width.indexOf("%") > -1){ + colWidth = (totalWidth / 100) * parseInt(width); + }else{ + colWidth = parseInt(width); + } + }else{ + colWidth = width; + } + + fixedWidth += colWidth > minWidth ? colWidth : minWidth; + + }else{ + flexColumns.push(column); + } + } + }); + + //calculate available space + flexWidth = totalWidth - fixedWidth; + + //calculate correct column size + flexColWidth = Math.floor(flexWidth / flexColumns.length) + + //generate column widths + var gapFill = scaleColumns(flexColumns, flexWidth, flexColWidth); + + //increase width of last column to account for rounding errors + if(flexColumns.length){ + flexColumns[flexColumns.length-1].setWidth(flexColumns[flexColumns.length-1].getWidth() + gapFill); + } + }, +}; + + +Tabulator.registerExtension("layout", Layout); \ No newline at end of file diff --git a/js/tabulator/src/js/extensions/localize.js b/js/tabulator/src/js/extensions/localize.js new file mode 100644 index 0000000..1e9d5e5 --- /dev/null +++ b/js/tabulator/src/js/extensions/localize.js @@ -0,0 +1,196 @@ +var Localize = function(table){ + this.table = table; //hold Tabulator object + this.locale = "default"; //current locale + this.lang = false; //current language + this.bindings = {}; //update events to call when locale is changed +}; + +//set header placehoder +Localize.prototype.setHeaderFilterPlaceholder = function(placeholder){ + this.langs.default.headerFilters.default = placeholder; +}; + +//set header filter placeholder by column +Localize.prototype.setHeaderFilterColumnPlaceholder = function(column, placeholder){ + this.langs.default.headerFilters.columns[column] = placeholder; + + if(this.lang && !this.lang.headerFilters.columns[column]){ + this.lang.headerFilters.columns[column] = placeholder; + } +}; + +//setup a lang description object +Localize.prototype.installLang = function(locale, lang){ + if(this.langs[locale]){ + this._setLangProp(this.langs[locale], lang); + }else{ + this.langs[locale] = lang; + } +}; + +Localize.prototype._setLangProp = function(lang, values){ + for(let key in values){ + if(lang[key] && typeof lang[key] == "object"){ + this._setLangProp(lang[key], values[key]) + }else{ + lang[key] = values[key]; + } + } +}; + + +//set current locale +Localize.prototype.setLocale = function(desiredLocale){ + var self = this; + + desiredLocale = desiredLocale || "default"; + + //fill in any matching languge values + function traverseLang(trans, path){ + for(var prop in trans){ + + if(typeof trans[prop] == "object"){ + if(!path[prop]){ + path[prop] = {}; + } + traverseLang(trans[prop], path[prop]); + }else{ + path[prop] = trans[prop]; + } + } + } + + //determing correct locale to load + if(desiredLocale === true && navigator.language){ + //get local from system + desiredLocale = navigator.language.toLowerCase(); + } + + if(desiredLocale){ + + //if locale is not set, check for matching top level locale else use default + if(!self.langs[desiredLocale]){ + let prefix = desiredLocale.split("-")[0]; + + if(self.langs[prefix]){ + console.warn("Localization Error - Exact matching locale not found, using closest match: ", desiredLocale, prefix); + desiredLocale = prefix; + }else{ + console.warn("Localization Error - Matching locale not found, using default: ", desiredLocale); + desiredLocale = "default"; + } + } + } + + self.locale = desiredLocale; + + //load default lang template + self.lang = $.extend(true, {}, self.langs.default); + + if(desiredLocale != "default"){ + traverseLang(self.langs[desiredLocale], self.lang); + } + + self.table.options.localized(self.locale, self.lang) + + self._executeBindings(); +}; + +//get current locale +Localize.prototype.getLocale = function(locale){ + return self.locale; +}; + +//get lang object for given local or current if none provided +Localize.prototype.getLang = function(locale){ + return locale ? this.langs[locale] : this.lang; +}; + +//get text for current locale +Localize.prototype.getText = function(path, value){ + var path = value ? path + "." + value : path, + pathArray = path.split("."), + text = this._getLangElement(pathArray, this.locale); + + // if(text === false){ + // console.warn("Localization Error - Matching localized text not found for given path: ", path); + // } + + return text || ""; +}; + +//traverse langs object and find localized copy +Localize.prototype._getLangElement = function(path, locale){ + var self = this; + var root = self.lang; + + path.forEach(function(level){ + var rootPath + + if(root){ + rootPath = root[level]; + + if(typeof rootPath != "undefined"){ + root = rootPath; + }else{ + root = false; + } + } + }); + + return root; +}; + +//set update binding +Localize.prototype.bind = function(path, callback){ + if(!this.bindings[path]){ + this.bindings[path] = []; + } + + this.bindings[path].push(callback); + + callback(this.getText(path), this.lang); +}; + +//itterate through bindings and trigger updates +Localize.prototype._executeBindings = function(){ + var self = this; + + for(let path in self.bindings){ + self.bindings[path].forEach(function(binding){ + binding(self.getText(path), self.lang); + }); + } +}; + +//Localized text listings +Localize.prototype.langs = { + "default":{ //hold default locale text + "groups":{ + "item":"item", + "items":"items", + }, + "columns":{ + }, + "ajax":{ + "loading":"Loading", + "error":"Error", + }, + "pagination":{ + "first":"First", + "first_title":"First Page", + "last":"Last", + "last_title":"Last Page", + "prev":"Prev", + "prev_title":"Prev Page", + "next":"Next", + "next_title":"Next Page", + }, + "headerFilters":{ + "default":"filter column...", + "columns":{} + } + }, +}; + +Tabulator.registerExtension("localize", Localize); \ No newline at end of file diff --git a/js/tabulator/src/js/extensions/moveable_columns.js b/js/tabulator/src/js/extensions/moveable_columns.js new file mode 100644 index 0000000..ca0c4fa --- /dev/null +++ b/js/tabulator/src/js/extensions/moveable_columns.js @@ -0,0 +1,187 @@ +var MoveColumns = function(table){ + this.table = table; //hold Tabulator object + this.placeholderElement = $("
"); + this.hoverElement = $(); //floating column header element + this.checkTimeout = false; //click check timeout holder + this.checkPeriod = 250; //period to wait on mousedown to consider this a move and not a click + this.moving = false; //currently moving column + this.toCol = false; //destination column + this.toColAfter = false; //position of moving column relative to the desitnation column + this.startX = 0; //starting position within header element + this.autoScrollMargin = 40; //auto scroll on edge when within margin + this.autoScrollStep = 5; //auto scroll distance in pixels + this.autoScrollTimeout = false; //auto scroll timeout + + this.moveHover = this.moveHover.bind(this); + this.endMove = this.endMove.bind(this); +}; + +MoveColumns.prototype.initializeColumn = function(column){ + var self = this, + config = {}; + + if(!column.extensions.frozen){ + + config.mousemove = function(e){ + if(column.parent === self.moving.parent){ + if(((e.pageX - column.element.offset().left) + self.table.columnManager.element.scrollLeft()) > (column.getWidth() / 2)){ + if(self.toCol !== column || !self.toColAfter){ + column.element.after(self.placeholderElement); + self.moveColumn(column, true); + } + }else{ + if(self.toCol !== column || self.toColAfter){ + column.element.before(self.placeholderElement); + self.moveColumn(column, false); + } + } + } + }.bind(self) + + column.getElement().on("mousedown", function(e){ + self.checkTimeout = setTimeout(function(){ + self.startMove(e, column); + }, self.checkPeriod) + }); + + column.getElement().on("mouseup", function(e){ + if(self.checkTimeout){ + clearTimeout(self.checkTimeout); + } + }); + } + + column.extensions.moveColumn = config; +}; + +MoveColumns.prototype.startMove = function(e, column){ + var self = this, + element = column.getElement(); + + + self.moving = column; + self.startX = (e.pageX - element.offset().left); + + self.table.element.addClass("tabulator-block-select"); + + //create placeholder + self.placeholderElement.css({ + width:column.getWidth(), + height:column.getHeight(), + }); + element.before(self.placeholderElement) + element.detach(); + + //create hover element + self.hoverElement = element.clone(); + self.hoverElement.addClass("tabulator-moving"); + + self.table.columnManager.getElement().append(self.hoverElement); + self.hoverElement.css({ + "left":0, + "bottom":0, + }); + + self._bindMouseMove(); + + $("body").on("mousemove", self.moveHover) + $("body").on("mouseup", self.endMove) + + self.moveHover(e); +}; + +MoveColumns.prototype._bindMouseMove = function(){ + var self = this; + + self.table.columnManager.columnsByIndex.forEach(function(column){ + if(column.extensions.moveColumn.mousemove){ + column.element.on("mousemove", column.extensions.moveColumn.mousemove); + } + }); +}; + +MoveColumns.prototype._unbindMouseMove = function(){ + var self = this; + + self.table.columnManager.columnsByIndex.forEach(function(column){ + if(column.extensions.moveColumn.mousemove){ + column.element.off("mousemove", column.extensions.moveColumn.mousemove); + } + }); +}; + +MoveColumns.prototype.moveColumn = function(column, after){ + var self = this, + movingCells = this.moving.getCells(); + + self.toCol = column; + self.toColAfter = after; + + if(after){ + column.getCells().forEach(function(cell, i){ + cell.getElement().after(movingCells[i].getElement()) + }); + }else{ + column.getCells().forEach(function(cell, i){ + cell.getElement().before(movingCells[i].getElement()) + }); + } +}; + +MoveColumns.prototype.endMove = function(column){ + var self = this; + + self._unbindMouseMove(); + + self.placeholderElement.after(self.moving.getElement()); + self.placeholderElement.detach(); + self.hoverElement.detach(); + + self.table.element.removeClass("tabulator-block-select"); + + if(self.toCol){ + self.table.columnManager.moveColumn(self.moving, self.toCol, self.toColAfter); + } + + self.moving = false; + self.toCol = false; + self.toColAfter = false; + + $("body").off("mousemove", self.moveHover); + $("body").off("mouseup", self.endMove); +}; + +MoveColumns.prototype.moveHover = function(e){ + var self = this, + columnHolder = self.table.columnManager.getElement(), + scrollLeft = columnHolder.scrollLeft(), + xPos = (e.pageX - columnHolder.offset().left) + scrollLeft, + scrollPos; + + self.hoverElement.css({ + "left":xPos - self.startX, + }); + + + if(xPos - scrollLeft < self.autoScrollMargin){ + if(!self.autoScrollTimeout){ + self.autoScrollTimeout = setTimeout(function(){ + scrollPos = Math.max(0,scrollLeft-5); + self.table.rowManager.getElement().scrollLeft(scrollPos); + self.autoScrollTimeout = false; + }, 1); + } + } + + if(scrollLeft + columnHolder.innerWidth() - xPos < self.autoScrollMargin){ + if(!self.autoScrollTimeout){ + self.autoScrollTimeout = setTimeout(function(){ + scrollPos = Math.min(columnHolder.innerWidth(), scrollLeft+5); + self.table.rowManager.getElement().scrollLeft(scrollPos); + self.autoScrollTimeout = false; + }, 1); + } + } +}; + +Tabulator.registerExtension("moveColumn", MoveColumns); \ No newline at end of file diff --git a/js/tabulator/src/js/extensions/moveable_rows.js b/js/tabulator/src/js/extensions/moveable_rows.js new file mode 100644 index 0000000..ed06c4f --- /dev/null +++ b/js/tabulator/src/js/extensions/moveable_rows.js @@ -0,0 +1,172 @@ +var MoveRows = function(table){ + + this.table = table; //hold Tabulator object + this.placeholderElement = $("
"); + this.hoverElement = $(); //floating row header element + this.checkTimeout = false; //click check timeout holder + this.checkPeriod = 150; //period to wait on mousedown to consider this a move and not a click + this.moving = false; //currently moving row + this.toRow = false; //destination row + this.toRowAfter = false; //position of moving row relative to the desitnation row + this.hasHandle = false; //row has handle instead of fully movable row + this.startY = 0; //starting position within header element + + this.moveHover = this.moveHover.bind(this); + this.endMove = this.endMove.bind(this); +}; + +MoveRows.prototype.setHandle = function(handle){ + this.hasHandle = handle; +}; + +MoveRows.prototype.initializeRow = function(row){ + var self = this, + config = {}; + + config.mousemove = function(e){ + if(((e.pageY - row.element.offset().top) + self.table.rowManager.element.scrollTop()) > (row.getHeight() / 2)){ + if(self.toRow !== row || !self.toRowAfter){ + row.element.after(self.placeholderElement); + self.moveRow(row, true); + } + }else{ + if(self.toRow !== row || self.toRowAfter){ + row.element.before(self.placeholderElement); + self.moveRow(row, false); + } + } + }.bind(self); + + if(!this.hasHandle){ + + row.getElement().on("mousedown", function(e){ + self.checkTimeout = setTimeout(function(){ + self.startMove(e, row); + }, self.checkPeriod); + }); + + row.getElement().on("mouseup", function(e){ + if(self.checkTimeout){ + clearTimeout(self.checkTimeout); + } + }); + } + + row.extensions.moveRow = config; +}; + +MoveRows.prototype.initializeCell = function(cell){ + var self = this; + + cell.getElement().on("mousedown", function(e){ + self.checkTimeout = setTimeout(function(){ + self.startMove(e, cell.row); + }, self.checkPeriod); + }); + + cell.getElement().on("mouseup", function(e){ + if(self.checkTimeout){ + clearTimeout(self.checkTimeout); + } + }); +}; + +MoveRows.prototype._bindMouseMove = function(){ + var self = this; + + self.table.rowManager.displayRows.forEach(function(row){ + if(row.type === "row" && row.extensions.moveRow.mousemove){ + row.element.on("mousemove", row.extensions.moveRow.mousemove); + } + }); +}; + +MoveRows.prototype._unbindMouseMove = function(){ + var self = this; + + self.table.rowManager.displayRows.forEach(function(row){ + if(row.type === "row" && row.extensions.moveRow.mousemove){ + row.element.off("mousemove", row.extensions.moveRow.mousemove); + } + }); +}; + +MoveRows.prototype.startMove = function(e, row){ + var self = this, + element = row.getElement(); + + self.moving = row; + self.startY = (e.pageY - element.offset().top); + + self.table.element.addClass("tabulator-block-select"); + + //create placeholder + self.placeholderElement.css({ + width:row.getWidth(), + height:row.getHeight(), + }); + element.before(self.placeholderElement) + element.detach(); + + //create hover element + self.hoverElement = element.clone(); + self.hoverElement.addClass("tabulator-moving"); + + self.table.rowManager.getTableElement().append(self.hoverElement); + self.hoverElement.css({ + "left":0, + "top":0, + }); + + + self._bindMouseMove(); + + $("body").on("mousemove", self.moveHover); + $("body").on("mouseup", self.endMove); + + self.moveHover(e); +}; + +MoveRows.prototype.endMove = function(column){ + var self = this; + + self._unbindMouseMove(); + + self.placeholderElement.after(self.moving.getElement()); + self.placeholderElement.detach(); + self.hoverElement.detach(); + + self.table.element.removeClass("tabulator-block-select"); + + if(self.toRow){ + self.table.rowManager.moveRow(self.moving, self.toRow, self.toRowAfter); + } + + self.moving = false; + self.toRow = false; + self.toRowAfter = false; + + $("body").off("mousemove", self.moveHover); + $("body").off("mouseup", self.endMove); +}; + +MoveRows.prototype.moveRow = function(row, after){ + var self = this; + + self.toRow = row; + self.toRowAfter = after; +}; + +MoveRows.prototype.moveHover = function(e){ + var self = this, + rowHolder = self.table.rowManager.getElement(), + scrollTop = rowHolder.scrollTop(), + yPos = (e.pageY - rowHolder.offset().top) + scrollTop, + scrollPos; + + self.hoverElement.css({ + "top":yPos - self.startY, + }); +}; + +Tabulator.registerExtension("moveRow", MoveRows); \ No newline at end of file diff --git a/js/tabulator/src/js/extensions/mutator.js b/js/tabulator/src/js/extensions/mutator.js new file mode 100644 index 0000000..493f114 --- /dev/null +++ b/js/tabulator/src/js/extensions/mutator.js @@ -0,0 +1,58 @@ +var Mutator = function(table){ + this.table = table; //hold Tabulator object +}; + +//initialize column mutator +Mutator.prototype.initializeColumn = function(column){ + + var config = {mutator:false, type:column.definition.mutateType, params:column.definition.mutatorParams || {}}; + + //set column mutator + switch(typeof column.definition.mutator){ + case "string": + if(this.mutators[column.definition.mutator]){ + config.mutator = this.mutators[column.definition.mutator] + }else{ + console.warn("Mutator Error - No such mutator found, ignoring: ", column.definition.mutator); + } + break; + + case "function": + config.mutator = column.definition.mutator; + break; + } + + if(config.mutator){ + column.extensions.mutate = config; + } +}; + +//apply mutator to row +Mutator.prototype.transformRow = function(data){ + var self = this; + + self.table.columnManager.traverse(function(column){ + var field; + + if(column.extensions.mutate){ + + field = column.getField(); + + if(column.extensions.mutate.type != "edit"){ + column.setFieldValue(data, column.extensions.mutate.mutator(column.getFieldValue(data), data, "data", column.extensions.mutate.params)); + } + } + }); + + return data; +}; + +//apply mutator to new cell value +Mutator.prototype.transformCell = function(cell, value){ + return cell.column.extensions.mutate.mutator(value, cell.row.getData(), "edit", cell.column.extensions.mutate.params, cell.getComponent()) +}; + +//default mutators +Mutator.prototype.mutators = {}; + +Tabulator.registerExtension("mutator", Mutator); \ No newline at end of file diff --git a/js/tabulator/src/js/extensions/page.js b/js/tabulator/src/js/extensions/page.js new file mode 100644 index 0000000..94adf3f --- /dev/null +++ b/js/tabulator/src/js/extensions/page.js @@ -0,0 +1,412 @@ +var Page = function(table){ + + this.table = table; //hold Tabulator object + + this.element = $(""); + this.pagesElement = $(""); + this.firstBut = $(""); + this.prevBut = $(""); + this.nextBut = $(""); + this.lastBut = $(""); + + this.mode = "local"; + this.size = 0; + this.page = 1; + this.max = 1; + this.paginator = false; +}; + +//setup pageination +Page.prototype.initialize = function(){ + var self = this; + + //update param names + for(let key in self.table.options.paginationDataSent){ + self.paginationDataSentNames[key] = self.table.options.paginationDataSent[key]; + } + + for(let key in self.table.options.paginationDataReceived){ + self.paginationDataReceivedNames[key] = self.table.options.paginationDataReceived[key]; + } + + if(self.table.options.paginator){ + self.paginator = self.table.options.paginator; + } + + + //build pagination element + + //bind localizations + self.table.extensions.localize.bind("pagination.first", function(value){ + self.firstBut.html(value); + }); + + self.table.extensions.localize.bind("pagination.first_title", function(value){ + self.firstBut.attr("aria-label", value) + .attr("title", value); + }); + + self.table.extensions.localize.bind("pagination.prev", function(value){ + self.prevBut.html(value); + }); + + self.table.extensions.localize.bind("pagination.prev_title", function(value){ + self.prevBut.attr("aria-label", value) + .attr("title", value); + }); + + self.table.extensions.localize.bind("pagination.next", function(value){ + self.nextBut.html(value); + }); + + self.table.extensions.localize.bind("pagination.next_title", function(value){ + self.nextBut.attr("aria-label", value) + .attr("title", value); + }); + + self.table.extensions.localize.bind("pagination.last", function(value){ + self.lastBut.html(value); + }); + + self.table.extensions.localize.bind("pagination.last_title", function(value){ + self.lastBut.attr("aria-label", value) + .attr("title", value); + }); + + //click bindings + self.firstBut.on("click", function(){ + self.setPage(1); + }); + + self.prevBut.on("click", function(){ + self.previousPage(); + }); + + self.nextBut.on("click", function(){ + self.nextPage(); + }); + + self.lastBut.on("click", function(){ + self.setPage(self.max); + }); + + if(self.table.options.paginationElement){ + self.element = self.table.options.paginationElement; + } + + //append to DOM + self.element.append(self.firstBut); + self.element.append(self.prevBut); + self.element.append(self.pagesElement); + self.element.append(self.nextBut); + self.element.append(self.lastBut); + + if(!self.table.options.paginationElement){ + self.table.footerManager.append(self.element, self); + } + + + //set default values + self.mode = self.table.options.pagination; + self.size = self.table.options.paginationSize || Math.floor(self.table.rowManager.getElement().innerHeight() / 26); +}; + +//calculate maximum page from number of rows +Page.prototype.setMaxRows = function(rowCount){ + + if(!rowCount){ + this.max = 1; + }else{ + this.max = Math.ceil(rowCount/this.size); + } + + if(this.page > this.max){ + this.page = this.max; + } +}; + +//reset to first page without triggering action +Page.prototype.reset = function(force){ + if(this.mode == "local" || force){ + this.page = 1; + } + return true; +}; + +//set the maxmum page +Page.prototype.setMaxPage = function(max){ + this.max = max || 1; + + if(this.page > this.max){ + this.page = this.max; + this.trigger(); + } +}; + +//set current page number +Page.prototype.setPage = function(page){ + if(page > 0 && page <= this.max){ + this.page = page; + this.trigger(); + return true; + }else{ + console.warn("Pagination Error - Requested page is out of range of 1 - " + this.max + ":", page); + return false; + } +}; + +Page.prototype.setPageSize = function(size){ + if(size > 0){ + this.size = size; + } +}; + + +//setup the pagination buttons +Page.prototype._setPageButtons = function(){ + var self = this; + + var min = this.page < this.max-2 ? (this.page - 2) : (this.page - (4 - (this.max - this.page))); + var max = this.page > 3 ? (this.page + 2) : (this.page + (5 - this.page)); + + self.pagesElement.empty(); + + if(self.page == 1){ + self.firstBut.prop("disabled", true); + self.prevBut.prop("disabled", true); + }else{ + self.firstBut.prop("disabled", false); + self.prevBut.prop("disabled", false); + } + + if(self.page == self.max){ + self.lastBut.prop("disabled", true); + self.nextBut.prop("disabled", true); + }else{ + self.lastBut.prop("disabled", false); + self.nextBut.prop("disabled", false); + } + + for(let i = min; i <= max; i++){ + if(i>0 && i <= self.max){ + self.pagesElement.append(self._generatePageButton(i)); + } + } + + this.footerRedraw(); +}; + +Page.prototype._generatePageButton = function(page){ + var self = this; + var button = $(""); + + button.on("click", function(e){ + self.setPage(page); + }); + + return button; +}; + +//previous page +Page.prototype.previousPage = function(){ + if(this.page > 1){ + this.page--; + this.trigger(); + return true; + }else{ + console.warn("Pagination Error - Previous page would be less than page 1:", 0); + return false; + } +}; + +//next page +Page.prototype.nextPage = function(){ + if(this.page < this.max){ + this.page++; + this.trigger(); + return true; + }else{ + console.warn("Pagination Error - Next page would be greater than maximum page of " + this.max + ":", this.max + 1); + return false; + } +}; + +//return current page number +Page.prototype.getPage = function(){ + return this.page; +}; + +//return max page number +Page.prototype.getPageMax = function(){ + return this.max; +}; + +Page.prototype.getPageSize = function(size){; + return this.size; +}; + +Page.prototype.getMode = function(){ + return this.mode; +}; + +//return appropriate rows for current page +Page.prototype.getRows = function(data){ + var output, start, end; + + if(this.mode == "local"){ + output = []; + start = this.size * (this.page - 1); + end = start + parseInt(this.size); + + this._setPageButtons(); + + for(let i = start; i < end; i++){ + if(data[i]){ + output.push(data[i]); + } + } + + return output; + }else{ + + this._setPageButtons(); + + return data.slice(0); + } +}; + +Page.prototype.trigger = function(){ + switch(this.mode){ + case "local": + this.table.rowManager.refreshActiveData(); + this.table.options.pageLoaded(this.getPage()); + break; + + case "remote": + this._getRemotePage(); + break; + + default: + console.warn("Pagination Error - no such pagination mode:", this.mode); + } +}; + +Page.prototype._getRemotePage = function(){ + if(this.table.extExists("ajax", true)){ + + if(this.paginator){ + this._getRemotePagePaginator(); + }else{ + this._getRemotePageAuto(); + } + } +}; + +Page.prototype._getRemotePagePaginator = function(){ + var self = this, + ajax = self.table.extensions.ajax, + oldUrl = ajax.getUrl(); + + ajax.setUrl(self.paginator(ajax.getUrl(), self.page, self.size, ajax.getParams())) + + ajax.sendRequest(function(data){ + self._parseRemoteData(data); + }); + + ajax.setUrl(oldUrl); +}; + +Page.prototype._getRemotePageAuto = function(){ + var self = this, + oldParams, pageParams; + + //record old params and restore after request has been made + oldParams = $.extend(true, {}, self.table.extensions.ajax.getParams()); + pageParams = self.table.extensions.ajax.getParams(); + + //configure request params + pageParams[this.paginationDataSentNames.page] = self.page; + + //set page size if defined + if(this.size){ + pageParams[this.paginationDataSentNames.size] = this.size; + } + + //set sort data if defined + if(this.table.extExists("sort")){ + let sorters = self.table.extensions.sort.getSort(); + + sorters.forEach(function(item){ + delete item.column; + }); + + pageParams[this.paginationDataSentNames.sorters] = sorters; + } + + //set filter data if defined + if(this.table.extExists("filter")){ + let filters = self.table.extensions.filter.getFilters(true, true); + pageParams[this.paginationDataSentNames.filters] = filters; + } + + self.table.extensions.ajax.setParams(pageParams); + + self.table.extensions.ajax.sendRequest(function(data){ + self._parseRemoteData(data); + }); + + self.table.extensions.ajax.setParams(oldParams); +}; + + + +Page.prototype._parseRemoteData = function(data){ + if(data[this.paginationDataReceivedNames.last_page]){ + if(data[this.paginationDataReceivedNames.data]){ + this.max = parseInt(data[this.paginationDataReceivedNames.last_page]); + + this.table.rowManager.setData(data[this.paginationDataReceivedNames.data]); + + this.table.options.pageLoaded(this.getPage()); + }else{ + console.warn("Remote Pagination Error - Server response missing '" + this.paginationDataReceivedNames.data + "' property"); + } + }else{ + console.warn("Remote Pagination Error - Server response missing '" + this.paginationDataReceivedNames.last_page + "' property"); + } +}; + +//handle the footer element being redrawn +Page.prototype.footerRedraw = function(){ + var footer = this.table.footerManager.element; + + if((footer.innerWidth() - footer[0].scrollWidth) < 0){ + this.pagesElement.hide(); + }else{ + this.pagesElement.show(); + + if((footer.innerWidth() - footer[0].scrollWidth) < 0){ + this.pagesElement.hide(); + } + } +}; + +//set the paramter names for pagination requests +Page.prototype.paginationDataSentNames = { + "page":"page", + "size":"size", + "sorters":"sorters", + // "sort_dir":"sort_dir", + "filters":"filters", + // "filter_value":"filter_value", + // "filter_type":"filter_type", +}; + +//set the property names for pagination responses +Page.prototype.paginationDataReceivedNames = { + "current_page":"current_page", + "last_page":"last_page", + "data":"data", +}; + +Tabulator.registerExtension("page", Page); diff --git a/js/tabulator/src/js/extensions/persistent_layout.js b/js/tabulator/src/js/extensions/persistent_layout.js new file mode 100644 index 0000000..48af4a4 --- /dev/null +++ b/js/tabulator/src/js/extensions/persistent_layout.js @@ -0,0 +1,155 @@ +var PersistentLayout = function(table){ + this.table = table; //hold Tabulator object + this.mode = ""; + this.id = ""; + this.persistProps = ["field", "width", "visible"]; +}; + +//setup parameters +PersistentLayout.prototype.initialize = function(mode, id){ + //determine persistent layout storage type + this.mode = mode !== true ? mode : (typeof window.localStorage !== 'undefined' ? "local" : "cookie"); + + //set storage tag + this.id = "tabulator-" + (id || (this.table.element.attr("id") || "")); +}; + +//load saved definitions +PersistentLayout.prototype.load = function(definition){ + + var newDefinition = ""; + + switch(this.mode){ + case "local": + newDefinition = localStorage.getItem(this.id); + break; + + case "cookie": + + //find cookie + let cookie = document.cookie, + cookiePos = cookie.indexOf(this.id + "="), + end; + + //if cookie exists, decode and load column data into tabulator + if(cookiePos > -1){ + cookie = cookie.substr(cookiePos); + + end = cookie.indexOf(";"); + + if(end > -1){ + cookie = cookie.substr(0, end); + } + + newDefinition = cookie.replace(this.id + "=", ""); + } + break; + + default: + console.warn("Persistance Load Error - invalid mode selected", this.mode); + } + + if(newDefinition){ + newDefinition = JSON.parse(newDefinition); + + definition = this.mergeDefinition(definition, newDefinition); + } + + return definition; +}; + +//merge old and new column defintions +PersistentLayout.prototype.mergeDefinition = function(oldCols, newCols){ + var self = this, + output = []; + + newCols.forEach(function(column, to){ + + var from = self._findColumn(oldCols, column); + + if(from){ + + from.width = column.width; + from.visible = column.visible; + + if(from.columns){ + from.columns = self.mergeDefinition(from.columns, column.columns); + } + + output.push(from); + } + + }); + + return output; +}; + +//find matching columns +PersistentLayout.prototype._findColumn = function(columns, subject){ + var type = subject.columns ? "group" : (subject.field ? "field" : "object"); + + return columns.find(function(col){ + switch(type){ + case "group": + return col.title === subject.title && col.columns.length === subject.columns.length; + break; + + case "field": + return col.field === subject.field; + break; + + case "object": + return col === subject; + break; + } + }) +}; + +//save current definitions +PersistentLayout.prototype.save = function(){ + var definition = this.parseColumns(this.table.columnManager.getColumns()), + data = JSON.stringify(definition); + + switch(this.mode){ + case "local": + localStorage.setItem(this.id, data); + break; + + case "cookie": + let expireDate = new Date(); + expireDate.setDate(expireDate.getDate() + 10000); + + //save cookie + document.cookie = this.id + "=" + data + "; expires=" + expireDate.toUTCString(); + break; + + default: + console.warn("Persistance Save Error - invalid mode selected", this.mode); + } +}; + +//build premission list +PersistentLayout.prototype.parseColumns = function(columns){ + var self = this, + definitions = []; + + columns.forEach(function(column){ + var def = {}; + + if(column.isGroup){ + def.title = column.getDefinition().title; + def.columns = self.parseColumns(column.getColumns()); + }else{ + def.title = column.getDefinition().title; + def.field = column.getField(); + def.width = column.getWidth(); + def.visible = column.visible; + } + + definitions.push(def); + }); + + return definitions; +}; + +Tabulator.registerExtension("persistentLayout", PersistentLayout); \ No newline at end of file diff --git a/js/tabulator/src/js/extensions/resize_columns.js b/js/tabulator/src/js/extensions/resize_columns.js new file mode 100644 index 0000000..8d50b71 --- /dev/null +++ b/js/tabulator/src/js/extensions/resize_columns.js @@ -0,0 +1,119 @@ +var ResizeColumns = function(table){ + this.table = table; //hold Tabulator object + this.startColumn = false; + this.startX = false; + this.startWidth = false; + this.handle = null; + this.prevHandle = null; +}; + +ResizeColumns.prototype.initializeColumn = function(type, column, element){ + var self = this, + variableHeight =false, + mode = this.table.options.resizableColumns; + + //set column resize mode + if(type === "header"){ + variableHeight = column.definition.formatter == "textarea" || column.definition.variableHeight; + column.extensions.resize = {variableHeight:variableHeight}; + } + + if(mode === true || mode == type){ + + var handle = document.createElement('div'); + handle.className = "tabulator-col-resize-handle"; + + + var prevHandle = document.createElement('div'); + prevHandle.className = "tabulator-col-resize-handle prev"; + + handle.addEventListener("click", function(e){ + e.stopPropagation(); + }); + + handle.addEventListener("mousedown", function(e){ + var nearestColumn = column.getLastColumn(); + + if(nearestColumn){ + self.startColumn = column; + self._mouseDown(e, nearestColumn); + } + }); + + prevHandle.addEventListener("click", function(e){ + e.stopPropagation(); + }); + + prevHandle.addEventListener("mousedown", function(e){ + var nearestColumn, colIndex, prevColumn; + + nearestColumn = column.getFirstColumn(); + + if(nearestColumn){ + colIndex = self.table.columnManager.findColumnIndex(nearestColumn); + prevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false; + + if(prevColumn){ + self.startColumn = column; + self._mouseDown(e, prevColumn); + } + } + }); + + element.append(handle) + .append(prevHandle); + } +}; + +ResizeColumns.prototype._mouseDown = function(e, column){ + var self = this; + + self.table.element.addClass("tabulator-block-select"); + + function mouseMove(e){ + column.setWidth(self.startWidth + (e.screenX - self.startX)); + + if(!self.table.browserSlow && column.extensions.resize && column.extensions.resize.variableHeight){ + column.checkCellHeights(); + } + } + + function mouseUp(e){ + + //block editor from taking action while resizing is taking place + if(self.startColumn.extensions.edit){ + self.startColumn.extensions.edit.blocked = false; + } + + if(self.table.browserSlow && column.extensions.resize && column.extensions.resize.variableHeight){ + column.checkCellHeights(); + } + + $("body").off("mouseup", mouseMove); + $("body").off("mousemove", mouseMove); + + self.table.element.removeClass("tabulator-block-select"); + + if(self.table.options.persistentLayout && self.table.extExists("persistentLayout", true)){ + self.table.extensions.persistentLayout.save(); + } + + self.table.options.columnResized(self.startColumn.getComponent()) + } + + e.stopPropagation(); //prevent resize from interfereing with movable columns + + //block editor from taking action while resizing is taking place + if(self.startColumn.extensions.edit){ + self.startColumn.extensions.edit.blocked = true; + } + + self.startX = e.screenX; + self.startWidth = column.getWidth(); + + $("body").on("mousemove", mouseMove); + + $("body").on("mouseup", mouseUp); +}; + +Tabulator.registerExtension("resizeColumns", ResizeColumns); \ No newline at end of file diff --git a/js/tabulator/src/js/extensions/responsive_layout.js b/js/tabulator/src/js/extensions/responsive_layout.js new file mode 100644 index 0000000..a250837 --- /dev/null +++ b/js/tabulator/src/js/extensions/responsive_layout.js @@ -0,0 +1,84 @@ +var ResponsiveLayout = function(table){ + this.table = table; //hold Tabulator object + this.columns = []; + this.index = 0; +}; + +//generate resposivle columns list +ResponsiveLayout.prototype.initialize = function(){ + var columns=[]; + + //detemine level of responsivity for each column + this.table.columnManager.columnsByIndex.forEach(function(column){ + var def = column.getDefinition(); + + column.extensions.responsive = {order: typeof def.responsive === "undefined" ? 1 : def.responsive}; + + if(column.extensions.responsive.order){ + columns.push(column); + } + }); + + + //sort list by responsivity + columns = columns.reverse(); + columns = columns.sort(function(a, b){ + return b.extensions.responsive.order - a.extensions.responsive.order; + }); + + this.columns = columns; +}; + +ResponsiveLayout.prototype.update = function(){ + var self = this, + working = true; + + while(working){ + + let width = self.table.extensions.layout.getMode() == "fitColumns" ? self.table.columnManager.getFlexBaseWidth() : self.table.columnManager.getWidth(); + + let diff = self.table.columnManager.element.innerWidth() - width; + + if(diff < 0){ + //table is too wide + let column = self.columns[self.index]; + + if(column){ + column.hide(); + self.index ++; + }else{ + working = false; + } + + }else{ + + //table has spare space + let column = self.columns[self.index -1]; + + if(column){ + if(diff > 0){ + if(diff >= column.getWidth()){ + column.show(); + + //set column width to prevent calculation loops on uninitialized columns + column.setWidth(column.getWidth()); + + self.index --; + }else{ + working = false; + } + }else{ + working = false; + } + }else{ + working = false; + } + } + + if(!self.table.rowManager.activeRowsCount){ + self.table.rowManager.renderEmptyScroll(); + } + } +}; + +Tabulator.registerExtension("responsiveLayout", ResponsiveLayout); \ No newline at end of file diff --git a/js/tabulator/src/js/extensions/select_row.js b/js/tabulator/src/js/extensions/select_row.js new file mode 100644 index 0000000..08e3979 --- /dev/null +++ b/js/tabulator/src/js/extensions/select_row.js @@ -0,0 +1,242 @@ +var SelectRow = function(table){ + this.table = table; //hold Tabulator object + this.selecting = false; //flag selecting in progress + this.selectPrev = []; //hold previously selected element for drag drop selection + this.selectedRows = []; //hold selected rows +}; + +SelectRow.prototype.clearSelectionData = function(){ + this.selecting = false; + this.selectPrev = []; + this.selectedRows = []; +}; + +SelectRow.prototype.initializeRow = function(row){ + var self = this, + element = row.getElement(); + + // trigger end of row selection + var endSelect = function(){ + + setTimeout(function(){ + self.selecting = false; + }, 50) + + $("body").off("mouseup", endSelect); + } + + + row.extensions.select = {selected:false}; + + //set row selection class + if(self.table.options.selectableCheck(row.getComponent())){ + element.addClass("tabulator-selectable").removeClass("tabulator-unselectable"); + + if(self.table.options.selectable && self.table.options.selectable != "highlight"){ + element.on("click", function(e){ + if(!self.selecting){ + self.toggleRow(row); + } + }); + + element.on("mousedown", function(e){ + if(e.shiftKey){ + self.selecting = true; + + self.selectPrev = []; + + $("body").on("mouseup", endSelect); + $("body").on("keyup", endSelect); + + self.toggleRow(row); + + return false; + } + }); + + element.on("mouseenter", function(e){ + if(self.selecting){ + self.toggleRow(row); + + if(self.selectPrev[1] == row){ + self.toggleRow(self.selectPrev[0]); + } + } + }); + + element.on("mouseout", function(e){ + if(self.selecting){ + self.selectPrev.unshift(row); + } + }); + } + + }else{ + row.getElement().addClass("tabulator-unselectable").removeClass("tabulator-selectable"); + } +}; + +//toggle row selection +SelectRow.prototype.toggleRow = function(row){ + if(this.table.options.selectableCheck(row.getComponent())){ + if(row.extensions.select.selected){ + this._deselectRow(row); + }else{ + this._selectRow(row); + } + } +}; + +//select a number of rows +SelectRow.prototype.selectRows = function(rows){ + var self = this; + + switch(typeof rows){ + case "undefined": + self.table.rowManager.rows.forEach(function(row){ + self._selectRow(row, true, true); + }); + + self._rowSelectionChanged(); + break; + + case "boolean": + if(rows === true){ + self.table.rowManager.activeRows.forEach(function(row){ + self._selectRow(row, true, true); + }); + + self._rowSelectionChanged(); + } + break; + + default: + if(Array.isArray(rows)){ + rows.forEach(function(row){ + self._selectRow(row, true); + }); + + self._rowSelectionChanged(); + }else{ + self._selectRow(rows); + } + break; + } +}; + +//select an individual row +SelectRow.prototype._selectRow = function(rowInfo, silent, force){ + var self = this, + index; + + //handle max row count + if(!isNaN(self.table.options.selectable) && self.table.options.selectable !== true && !force){ + if(self.selectedRows.length >= self.table.options.selectable){ + if(self.table.options.selectableRollingSelection){ + self._deselectRow(self.selectedRows[0], true); + }else{ + return false; + } + } + } + + var row = self.table.rowManager.findRow(rowInfo); + + if(row){ + var self = this; + + row.extensions.select.selected = true; + row.getElement().addClass("tabulator-selected"); + + self.selectedRows.push(row); + + if(!silent){ + self.table.options.rowSelected(row.getComponent()); + self._rowSelectionChanged(); + } + }else{ + console.warn("Selection Error - No such row found, ignoring selection:" + rowInfo) + } +}; + +//deselect a number of rows +SelectRow.prototype.deselectRows = function(rows){ + var self = this; + + if(typeof rows == "undefined"){ + + let rowCount = self.selectedRows.length; + + for(let i = 0; i < rowCount; i++){ + self._deselectRow(self.selectedRows[0], true); + } + + self._rowSelectionChanged(); + }else{ + if(Array.isArray(rows)){ + rows.forEach(function(row){ + self._deselectRow(row, true); + }); + + self._rowSelectionChanged(); + }else{ + self._deselectRow(rows); + } + } +}; + +//deselect an individual row +SelectRow.prototype._deselectRow = function(rowInfo, silent){ + var self = this, + row = self.table.rowManager.findRow(rowInfo), + index; + + + + if(row){ + index = self.selectedRows.findIndex(function(selectedRow){ + return selectedRow == row; + }); + + if(index > -1){ + + row.extensions.select.selected = false; + row.getElement().removeClass("tabulator-selected"); + self.selectedRows.splice(index, 1); + + if(!silent){ + self.table.options.rowDeselected(row.getComponent()); + self._rowSelectionChanged(); + } + } + }else{ + console.warn("Selection Error - No such row found, ignoring selection:" + rowInfo) + } +}; + +SelectRow.prototype.getSelectedData = function(){ + var data = []; + + this.selectedRows.forEach(function(row){ + data.push(row.getData()); + }); + + return data +}; + +SelectRow.prototype.getSelectedRows = function(){ + + var rows = [] + + this.selectedRows.forEach(function(row){ + rows.push(row.getComponent()); + }) + + return rows; +}; + +SelectRow.prototype._rowSelectionChanged = function(){ + this.table.options.rowSelectionChanged(this.getSelectedData(), this.getSelectedRows()); +}; + +Tabulator.registerExtension("selectRow", SelectRow); \ No newline at end of file diff --git a/js/tabulator/src/js/extensions/sort.js b/js/tabulator/src/js/extensions/sort.js new file mode 100644 index 0000000..3ce9e64 --- /dev/null +++ b/js/tabulator/src/js/extensions/sort.js @@ -0,0 +1,341 @@ +var Sort = function(table){ + this.table = table; //hold Tabulator object + this.sortList = []; //holder current sort + this.changed = false; //has the sort changed since last render + }; + +//initialize column header for sorting +Sort.prototype.initializeColumn = function(column, content){ + var self = this, + sorter = false; + + + switch(typeof column.definition.sorter){ + case "string": + if(self.sorters[column.definition.sorter]){ + sorter = self.sorters[column.definition.sorter]; + }else{ + console.warn("Sort Error - No such sorter found: ", column.definition.sorter); + } + break; + + case "function": + sorter = column.definition.sorter; + break; + } + + + column.extensions.sort = {sorter:sorter, dir:"none", params:column.definition.sorterParams || {}}; + + if(column.definition.headerSort !== false){ + + column.element.addClass("tabulator-sortable"); + + //create sorter arrow + content.append($("
")); + + //sort on click + column.element.on("click", function(e){ + var dir = "", + sorters=[], + match = false; + + if(column.extensions.sort){ + dir = column.extensions.sort.dir == "asc" ? "desc" : "asc"; + + if(e.shiftKey || e.ctrlKey){ + sorters = self.getSort(); + + + match = sorters.findIndex(function(sorter){ + return sorter.field === column.getField(); + }); + + if(match > -1){ + sorters[match].dir = sorters[match].dir == "asc" ? "desc" : "asc"; + + if(match != sorters.length -1){ + sorters.push(sorters.splice(match, 1)[0]); + } + }else{ + sorters.push({column:column, dir:dir}); + } + + //add to existing sort + self.setSort(sorters); + }else{ + //sort by column only + self.setSort(column, dir); + } + + self.table.rowManager.sorterRefresh(); + } + }); + } +}; + +//check if the sorters have changed since last use +Sort.prototype.hasChanged = function(){ + var changed = this.changed; + this.changed = false; + return changed; +}; + +//return current sorters +Sort.prototype.getSort = function(){ + var self = this, + sorters = []; + + self.sortList.forEach(function(item){ + if(item.column){ + sorters.push({column:item.column.getComponent(), field:item.column.getField(), dir:item.dir}); + } + }); + + return sorters; +}; + +//change sort list and trigger sort +Sort.prototype.setSort = function(sortList, dir){ + var self = this, + newSortList = []; + + if(!Array.isArray(sortList)){ + sortList = [{column: sortList, dir:dir}]; + } + + sortList.forEach(function(item){ + var column; + + column = self.table.columnManager.findColumn(item.column); + + if(column){ + item.column = column; + newSortList.push(item); + self.changed = true; + }else{ + console.warn("Sort Warning - Sort field does not exist and is being ignored: ", item.column); + } + + }); + + self.sortList = newSortList; +}; + +//clear sorters +Sort.prototype.clear = function(){ + this.setSort([]); +}, + +//find appropriate sorter for column +Sort.prototype.findSorter = function(column){ + var row = this.table.rowManager.activeRows[0], + sorter = "string", + field, value; + + if(row){ + row = row.getData(); + field = column.getField(); + + if(field){ + + value = column.getFieldValue(row); + + switch(typeof value){ + case "undefined": + sorter = "string"; + break; + + case "boolean": + sorter = "boolean"; + break; + + default: + if(!isNaN(value) && value !== ""){ + sorter = "number"; + }else{ + if(value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)){ + sorter = "alphanum"; + } + } + break; + } + } + } + + return this.sorters[sorter]; +}; + +//work through sort list sorting data +Sort.prototype.sort = function(){ + var self = this, lastSort; + + if(self.table.options.dataSorting){ + self.table.options.dataSorting(self.getSort()); + } + + self.clearColumnHeaders(); + + if(!self.table.options.ajaxSorting){ + + self.sortList.forEach(function(item, i){ + + if(item.column && item.column.extensions.sort){ + + //if no sorter has been defined, take a guess + if(!item.column.extensions.sort.sorter){ + item.column.extensions.sort.sorter = self.findSorter(item.column); + } + + self._sortItem(item.column, item.dir, self.sortList, i); + } + + self.setColumnHeader(item.column, item.dir); + }) + } + + if(self.table.options.dataSorted){ + self.table.options.dataSorted(self.getSort(), self.table.rowManager.getComponents(true)); + } + +}; + +//clear sort arrows on columns +Sort.prototype.clearColumnHeaders = function(){ + this.table.columnManager.getRealColumns().forEach(function(column){ + if(column.extensions.sort){ + column.extensions.sort.dir = "none"; + column.element.attr("aria-sort", "none"); + } + }); +}; + +//set the column header sort direction +Sort.prototype.setColumnHeader = function(column, dir){ + column.extensions.sort.dir = dir; + column.element.attr("aria-sort", dir); +}; + +//sort each item in sort list +Sort.prototype._sortItem = function(column, dir, sortList, i){ + var self = this; + + var activeRows = self.table.rowManager.activeRows; + + activeRows.sort(function(a, b){ + + var result = self._sortRow(a, b, column, dir); + + //if results match recurse through previous searchs to be sure + if(result == 0 && i){ + for(var j = i-1; j>= 0; j--){ + result = self._sortRow(a, b, sortList[j].column, sortList[j].dir); + + if(result != 0){ + break; + } + } + } + + return result; + }); +}; + +//process individual rows for a sort function on active data +Sort.prototype._sortRow = function(a, b, column, dir){ + var self = this; + + //switch elements depending on search direction + var el1 = dir == "asc" ? a : b; + var el2 = dir == "asc" ? b : a; + + a = column.getFieldValue(el1.getData()); + b = column.getFieldValue(el2.getData()); + + a = typeof a !== "undefined" ? a : ""; + b = typeof b !== "undefined" ? b : ""; + + return column.extensions.sort.sorter.call(self, a, b, el1.getComponent(), el2.getComponent(), column.getComponent(), dir, column.extensions.sort.params); +}; + + +//default data sorters +Sort.prototype.sorters = { + + //sort numbers + number:function(a, b, aRow, bRow, column, dir, params){ + return parseFloat(String(a).replace(",","")) - parseFloat(String(b).replace(",","")); + }, + + //sort strings + string:function(a, b, aRow, bRow, column, dir, params){ + return String(a).toLowerCase().localeCompare(String(b).toLowerCase()); + }, + + //sort date + date:function(a, b, aRow, bRow, column, dir, params){ + var self = this; + var format = params.format || "DD/MM/YYYY"; + + if(typeof moment != "undefined"){ + a = moment(a, format); + b = moment(b, format); + }else{ + console.error("Sort Error - 'date' sorter is dependant on moment.js"); + } + + return a - b; + }, + + //sort booleans + boolean:function(a, b, aRow, bRow, column, dir, params){ + var el1 = a === true || a === "true" || a === "True" || a === 1 ? 1 : 0; + var el2 = b === true || b === "true" || b === "True" || b === 1 ? 1 : 0; + + return el1 - el2; + }, + + //sort alpha numeric strings + alphanum:function(as, bs, aRow, bRow, column, dir, params){ + var a, b, a1, b1, i= 0, L, rx = /(\d+)|(\D+)/g, rd = /\d/; + + if(isFinite(as) && isFinite(bs)) return as - bs; + a = String(as).toLowerCase(); + b = String(bs).toLowerCase(); + if(a === b) return 0; + if(!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1; + a = a.match(rx); + b = b.match(rx); + L = a.length > b.length ? b.length : a.length; + while(i < L){ + a1= a[i]; + b1= b[i++]; + if(a1 !== b1){ + if(isFinite(a1) && isFinite(b1)){ + if(a1.charAt(0) === "0") a1 = "." + a1; + if(b1.charAt(0) === "0") b1 = "." + b1; + return a1 - b1; + } + else return a1 > b1 ? 1 : -1; + } + } + return a.length > b.length; + }, + + //sort hh:mm formatted times + time:function(a, b, aRow, bRow, column, dir, params){ + var self = this; + var format = params.format || "hh:mm"; + + if(typeof moment != "undefined"){ + a = moment(a, format); + b = moment(b, format); + }else{ + console.error("Sort Error - 'date' sorter is dependant on moment.js"); + } + + return a - b; + }, +}; + +Tabulator.registerExtension("sort", Sort); \ No newline at end of file diff --git a/js/tabulator/src/js/extensions/validate.js b/js/tabulator/src/js/extensions/validate.js new file mode 100644 index 0000000..58156b4 --- /dev/null +++ b/js/tabulator/src/js/extensions/validate.js @@ -0,0 +1,178 @@ +var Validate = function(table){ + this.table = table; +}; + +//validate +Validate.prototype.initializeColumn = function(column){ + var self = this, + config = [], + validator; + + if(column.definition.validator){ + + if(Array.isArray(column.definition.validator)){ + column.definition.validator.forEach(function(item){ + validator = self._extractValidator(item); + + if(validator){ + config.push(validator); + } + }) + + }else{ + validator = this._extractValidator(column.definition.validator); + + if(validator){ + config.push(validator); + } + } + + column.extensions.validate = config.length ? config : false; + } +}; + +Validate.prototype._extractValidator = function(value){ + + switch(typeof value){ + case "string": + let parts = value.split(":"); + let type = parts.shift(); + let params = parts.join(); + + return this._buildValidator(type, params); + break; + + case "function": + return this._buildValidator(value); + break; + + case "object": + return this._buildValidator(value.type, value.parameters); + break; + } +}; + +Validate.prototype._buildValidator = function(type, params){ + + var func = typeof type == "function" ? type : this.validators[type]; + + if(!func){ + console.warn("Validator Setup Error - No matching validator found:", type); + return false; + }else{ + return { + type:typeof type == "function" ? "function" : type, + func:func, + params:params, + }; + } +}; + + +Validate.prototype.validate = function(validators, cell, value){ + var self = this, + valid = []; + + if(validators){ + validators.forEach(function(item){ + if(!item.func.call(self, cell, value, item.params)){ + valid.push({ + type:item.type, + parameters:item.params + }); + } + }); + } + + return valid.length ? valid : true; +}; + + +Validate.prototype.validators = { + + //is integer + integer:function(cell, value, parameters){ + value = Number(value); + return typeof value === 'number' && isFinite(value) && Math.floor(value) === value; + }, + + //is float + float:function(cell, value, parameters){ + value = Number(value); + return typeof value === 'number' && isFinite(value) && value % 1 !== 0;; + }, + + //must be a number + numeric:function(cell, value, parameters){ + return !isNaN(value); + }, + + //must be a string + string:function(cell, value, parameters){ + return isNaN(value); + }, + + + //maximum value + max:function(cell, value, parameters){ + return parseFloat(value) <= parameters; + }, + + //minimum value + min:function(cell, value, parameters){ + return parseFloat(value) >= parameters; + }, + + //minimum string length + minLength:function(cell, value, parameters){ + return String(value).length >= parameters; + }, + + //maximum string length + maxLength:function(cell, value, parameters){ + return String(value).length <= parameters; + }, + + //in provided value list + in:function(cell, value, parameters){ + if(typeof parameters == "string"){ + parameters = parameters.split("|"); + } + + return value === "" || parameters.indexOf(value) > -1; + }, + + //must match provided regex + regex:function(cell, value, parameters){ + var reg = new RegExp(parameters); + + return reg.test(value); + }, + + //value must be unique in this column + unique:function(cell, value, parameters){ + var unique = true; + + var cellData = cell.getData(); + + this.table.rowManager.rows.forEach(function(row){ + var data = row.getData(); + + if(data !== cellData){ + if(value == data[cell.getField()]){ + unique = false; + } + } + }); + + return unique; + }, + + //must have a value + required:function(cell, value, parameters){ + return value !== "" & value !== null && typeof value != "undefined"; + }, +}; + + +Tabulator.registerExtension("validate", Validate); \ No newline at end of file diff --git a/js/tabulator/src/js/extensions_enabled.js b/js/tabulator/src/js/extensions_enabled.js new file mode 100644 index 0000000..fcc16c9 --- /dev/null +++ b/js/tabulator/src/js/extensions_enabled.js @@ -0,0 +1,22 @@ +/*=include extensions/accessor.js */ +/*=include extensions/ajax.js */ +/*=include extensions/calculation_colums.js */ +/*=include extensions/download.js */ +/*=include extensions/edit.js */ +/*=include extensions/filter.js */ +/*=include extensions/format.js */ +/*=include extensions/frozen_columns.js */ +/*=include extensions/group_rows.js */ +/*=include extensions/history.js */ +/*=include extensions/html_table_import.js */ +/*=include extensions/Keybindings.js */ +/*=include extensions/moveable_columns.js */ +/*=include extensions/moveable_rows.js */ +/*=include extensions/mutator.js */ +/*=include extensions/page.js */ +/*=include extensions/persistent_layout.js */ +/*=include extensions/resize_columns.js */ +/*=include extensions/responsive_layout.js */ +/*=include extensions/select_row.js */ +/*=include extensions/sort.js */ +/*=include extensions/validate.js */ \ No newline at end of file diff --git a/js/tabulator/src/js/footer_manager.js b/js/tabulator/src/js/footer_manager.js new file mode 100644 index 0000000..2cff34a --- /dev/null +++ b/js/tabulator/src/js/footer_manager.js @@ -0,0 +1,65 @@ +var FooterManager = function(table){ + this.table = table; + this.active = false; + this.element = $(""); //containing element + this.links = []; + + this._initialize(); +}; + +FooterManager.prototype._initialize = function(element){ + if(this.table.options.footerElement){ + this.element = this.table.options.footerElement; + } +}; + +FooterManager.prototype.getElement = function(){ + return this.element; +}; + + +FooterManager.prototype.append = function(element, parent){ + this.activate(parent); + + this.element.append(element); + this.table.rowManager.adjustTableSize(); +}; + +FooterManager.prototype.prepend = function(element, parent){ + this.activate(parent); + + this.element.prepend(element); + this.table.rowManager.adjustTableSize(); +}; + +FooterManager.prototype.remove = function(element){ + element.remove(); + this.deactivate(); +}; + +FooterManager.prototype.deactivate = function(force){ + if(this.element.is(":empty") || force){ + this.element.remove(); + this.active = false; + } + + // this.table.rowManager.adjustTableSize(); +} + +FooterManager.prototype.activate = function(parent){ + if(!this.active){ + this.active = true; + this.table.element.append(this.getElement()); + this.table.element.show(); + } + + if(parent){ + this.links.push(parent); + } +} + +FooterManager.prototype.redraw = function(){ + this.links.forEach(function(link){ + link.footerRedraw(); + }); +}; \ No newline at end of file diff --git a/js/tabulator/src/js/jquery_wrapper.js b/js/tabulator/src/js/jquery_wrapper.js new file mode 100644 index 0000000..26a8186 --- /dev/null +++ b/js/tabulator/src/js/jquery_wrapper.js @@ -0,0 +1,32 @@ +/* + * This file is part of the Tabulator package. + * + * (c) Oliver Folkerd + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Full Documentation & Demos can be found at: http://olifolkerd.github.io/tabulator/ + * + */ + + (function (factory) { + "use strict"; + if (typeof define === 'function' && define.amd) { + define(['jquery'], factory); + } + else if(typeof module !== 'undefined' && module.exports) { + module.exports = factory(require('jquery')); + } + else { + factory(jQuery); + } + }(function ($, undefined) { + + /*=include core.js */ + + $.widget("ui.tabulator", Tabulator); + + })); + + diff --git a/js/tabulator/src/js/polyfills.js b/js/tabulator/src/js/polyfills.js new file mode 100644 index 0000000..965d6a4 --- /dev/null +++ b/js/tabulator/src/js/polyfills.js @@ -0,0 +1,92 @@ + + + +// https://tc39.github.io/ecma262/#sec-array.prototype.findIndex +if (!Array.prototype.findIndex) { + Object.defineProperty(Array.prototype, 'findIndex', { + value: function(predicate) { + // 1. Let O be ? ToObject(this value). + if (this == null) { + throw new TypeError('"this" is null or not defined'); + } + + var o = Object(this); + + // 2. Let len be ? ToLength(? Get(O, "length")). + var len = o.length >>> 0; + + // 3. If IsCallable(predicate) is false, throw a TypeError exception. + if (typeof predicate !== 'function') { + throw new TypeError('predicate must be a function'); + } + + // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. + var thisArg = arguments[1]; + + // 5. Let k be 0. + var k = 0; + + // 6. Repeat, while k < len + while (k < len) { + // a. Let Pk be ! ToString(k). + // b. Let kValue be ? Get(O, Pk). + // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). + // d. If testResult is true, return k. + var kValue = o[k]; + if (predicate.call(thisArg, kValue, k, o)) { + return k; + } + // e. Increase k by 1. + k++; + } + + // 7. Return -1. + return -1; + } + }); +} + +// https://tc39.github.io/ecma262/#sec-array.prototype.find +if (!Array.prototype.find) { + Object.defineProperty(Array.prototype, 'find', { + value: function(predicate) { + // 1. Let O be ? ToObject(this value). + if (this == null) { + throw new TypeError('"this" is null or not defined'); + } + + var o = Object(this); + + // 2. Let len be ? ToLength(? Get(O, "length")). + var len = o.length >>> 0; + + // 3. If IsCallable(predicate) is false, throw a TypeError exception. + if (typeof predicate !== 'function') { + throw new TypeError('predicate must be a function'); + } + + // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. + var thisArg = arguments[1]; + + // 5. Let k be 0. + var k = 0; + + // 6. Repeat, while k < len + while (k < len) { + // a. Let Pk be ! ToString(k). + // b. Let kValue be ? Get(O, Pk). + // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). + // d. If testResult is true, return kValue. + var kValue = o[k]; + if (predicate.call(thisArg, kValue, k, o)) { + return kValue; + } + // e. Increase k by 1. + k++; + } + + // 7. Return undefined. + return undefined; + } + }); +} \ No newline at end of file diff --git a/js/tabulator/src/js/row.js b/js/tabulator/src/js/row.js new file mode 100644 index 0000000..774da2e --- /dev/null +++ b/js/tabulator/src/js/row.js @@ -0,0 +1,487 @@ + +//public row object +var RowComponent = function (row){ + this.row = row; +}; + +RowComponent.prototype.getData = function(){ + return this.row.getData(true); +}; + +RowComponent.prototype.getElement = function(){ + return this.row.getElement(); +}; + +RowComponent.prototype.getCells = function(){ + var cells = []; + + this.row.getCells().forEach(function(cell){ + cells.push(cell.getComponent()); + }); + + return cells; +}; + +RowComponent.prototype.getCell = function(column){ + return this.row.getCell(column).getComponent(); +}; + +RowComponent.prototype.getIndex = function(){ + return this.row.getData(true)[this.row.table.options.index]; +}; + +RowComponent.prototype.delete = function(){ + this.row.delete(); +}; + +RowComponent.prototype.scrollTo = function(){ + this.row.table.rowManager.scrollToRow(this.row); +}; + +RowComponent.prototype.update = function(data){ + this.row.updateData(data); +}; + +RowComponent.prototype.normalizeHeight = function(){ + this.row.normalizeHeight(true); +}; + +RowComponent.prototype.select = function(){ + this.row.selectRows(this.row); +}; + +RowComponent.prototype.deselect = function(){ + this.row.deselectRows(this.row); +}; + +RowComponent.prototype.toggleSelect = function(){ + this.row.toggleRow(this.row); +}; + +RowComponent.prototype._getSelf = function(){ + return this.row; +}; + + +var Row = function(data, parent){ + this.table = parent.table; + this.parent = parent; + this.data = {}; + this.type = "row"; //type of element + this.element = $("
"); + this.extensions = {}; //hold extension variables; + this.cells = []; + this.height = 0; //hold element height + this.outerHeight = 0; //holde lements outer height + this.initialized = false; //element has been rendered + this.heightInitialized = false; //element has resized cells to fit + + this.setData(data); + this.generateElement(); +}; + +Row.prototype.getElement = function(){ + return this.element; +}; + + +Row.prototype.generateElement = function(){ + var self = this, + dblTap, tapHold, tap; + + //set row selection characteristics + if(self.table.options.selectable !== false && self.table.extExists("selectRow")){ + self.table.extensions.selectRow.initializeRow(this); + } + + //setup movable rows + if(self.table.options.movableRows !== false && self.table.extExists("moveRow")){ + self.table.extensions.moveRow.initializeRow(this); + } + + //handle row click events + if (self.table.options.rowClick){ + self.element.on("click", function(e){ + self.table.options.rowClick(e, self.getComponent()); + }) + } + + if (self.table.options.rowDblClick){ + self.element.on("dblclick", function(e){ + self.table.options.rowDblClick(e, self.getComponent()); + }) + } + + if (self.table.options.rowContext){ + self.element.on("contextmenu", function(e){ + self.table.options.rowContext(e, self.getComponent()); + }) + } + + if (self.table.options.rowTap){ + + tap = false; + + self.element.on("touchstart", function(e){ + tap = true; + }); + + self.element.on("touchend", function(e){ + if(tap){ + self.table.options.rowTap(e, self.getComponent()); + } + + tap = false; + }); + } + + if (self.table.options.rowDblTap){ + + dblTap = null; + + self.element.on("touchend", function(e){ + + if(dblTap){ + clearTimeout(dblTap); + dblTap = null; + + self.table.options.rowDblTap(e, self.getComponent()); + }else{ + + dblTap = setTimeout(function(){ + clearTimeout(dblTap); + dblTap = null; + }, 300); + } + + }); + } + + + if (self.table.options.rowTapHold){ + + tapHold = null; + + self.element.on("touchstart", function(e){ + clearTimeout(tapHold); + + tapHold = setTimeout(function(){ + clearTimeout(tapHold); + tapHold = null; + tap = false; + self.table.options.rowTapHold(e, self.getComponent()); + }, 1000) + + }); + + self.element.on("touchend", function(e){ + clearTimeout(tapHold); + tapHold = null; + }); + } +}; + +Row.prototype.generateCells = function(){ + this.cells = this.table.columnManager.generateCells(this); +} + +//functions to setup on first render +Row.prototype.initialize = function(force){ + var self = this; + + if(!self.initialized || force){ + + self.deleteCells(); + + self.element.empty(); + + //handle frozen cells + if(this.table.extExists("frozenColumns")){ + this.table.extensions.frozenColumns.layoutRow(this); + } + + this.generateCells(); + + self.cells.forEach(function(cell){ + self.element.append(cell.getElement()); + }); + + if(force){ + self.normalizeHeight(); + } + + if(self.table.options.rowFormatter){ + self.table.options.rowFormatter(self.getComponent()); + } + + self.initialized = true; + } +}; + +Row.prototype.reinitializeHeight = function(){ + this.heightInitialized = false; + + if(this.element[0].offsetParent !== null){ + this.normalizeHeight(true); + } +}; + + +Row.prototype.reinitialize = function(){ + this.initialized = false; + this.heightInitialized = false; + this.height = 0; + + if(this.element[0].offsetParent !== null){ + this.initialize(true); + } +}; + +//get heights when doing bulk row style calcs in virtual DOM +Row.prototype.calcHeight = function(){ + this.height = this.element[0].clientHeight; + this.outerHeight = this.element[0].offsetHeight; +}; + +//set of cells +Row.prototype.setCellHeight = function(){ + var height = this.height; + + this.cells.forEach(function(cell){ + cell.setHeight(height); + }); + + this.heightInitialized = true; +}; + +Row.prototype.clearCellHeight = function(){ + this.cells.forEach(function(cell){ + cell.clearHeight(); + }); +} + +//normalize the height of elements in the row +Row.prototype.normalizeHeight = function(force){ + + if(force){ + this.clearCellHeight(); + } + + this.calcHeight(); + + this.setCellHeight(); +}; + +//set height of rows +Row.prototype.setHeight = function(height, force){ + if(this.height != height || force){ + + this.height = height; + + this.setCellHeight(); + + // this.outerHeight = this.element.outerHeight(); + this.outerHeight = this.element[0].offsetHeight; + } +}; + +//return rows outer height +Row.prototype.getHeight = function(){ + return this.outerHeight; +}; + +//return rows outer Width +Row.prototype.getWidth = function(){ + return this.element.outerWidth(); +}; + + +//////////////// Cell Management ///////////////// + +Row.prototype.deleteCell = function(cell){ + var index = this.cells.indexOf(cell); + + if(index > -1){ + this.cells.splice(index, 1); + } +}; + +//////////////// Data Management ///////////////// + +Row.prototype.setData = function(data){ + var self = this; + + if(self.table.extExists("mutator")){ + self.data = self.table.extensions.mutator.transformRow(data); + }else{ + self.data = data; + } +}; + +//update the rows data +Row.prototype.updateData = function(data){ + var self = this; + + //mutate incomming data if needed + if(self.table.extExists("mutator")){ + data = self.table.extensions.mutator.transformRow(data); + } + + //set data + for (var attrname in data) { + self.data[attrname] = data[attrname]; + } + + //update affected cells only + for (var attrname in data) { + let cell = this.getCell(attrname); + + if(cell){ + if(cell.getValue() != data[attrname]){ + cell.setValueProcessData(data[attrname]); + } + } + } + + //Partial reinitialization if visible + if(this.element.is(":visible")){ + self.normalizeHeight(); + + if(self.table.options.rowFormatter){ + self.table.options.rowFormatter(self.getComponent()); + } + }else{ + this.initialized = false; + this.height = 0; + } + + //self.reinitialize(); + + self.table.options.rowUpdated(self.getComponent()); +}; + +Row.prototype.getData = function(transform){ + var self = this; + + if(transform){ + if(self.table.extExists("accessor")){ + return self.table.extensions.accessor.transformRow(self.data); + } + }else{ + return this.data; + } + +}; + +Row.prototype.getCell = function(column){ + var match = false, + column = this.table.columnManager.findColumn(column); + + match = this.cells.find(function(cell){ + return cell.column === column; + }); + + return match; +}, + +Row.prototype.getCellIndex = function(findCell){ + return this.cells.findIndex(function(cell){ + return cell === findCell; + }); +}, + + +Row.prototype.findNextEditableCell = function(index){ + + var nextCell = false; + + if(index < this.cells.length-1){ + for(var i = index+1; i < this.cells.length; i++){ + let cell = this.cells[i]; + + if(cell.column.extensions.edit && cell.getElement().is(":visible")){ + let allowEdit = true; + + if(typeof cell.column.extensions.edit.check == "function"){ + allowEdit = cell.column.extensions.edit.check(cell.getComponent()); + } + + if(allowEdit){ + nextCell = cell; + break; + } + } + } + } + + return nextCell; +}, + +Row.prototype.findPrevEditableCell = function(index){ + var prevCell = false; + + if(index > 0){ + for(var i = index-1; i >= 0; i--){ + let cell = this.cells[i], + allowEdit = true; + + if(cell.column.extensions.edit && cell.getElement().is(":visible")){ + if(typeof cell.column.extensions.edit.check == "function"){ + allowEdit = cell.column.extensions.edit.check(cell.getComponent()); + } + + if(allowEdit){ + prevCell = cell; + break; + } + } + } + } + + return prevCell; +}, + + +Row.prototype.getCells = function(){ + return this.cells; +}, + +///////////////////// Actions ///////////////////// + +Row.prototype.delete = function(){ + + var index = this.table.rowManager.getRowIndex(this); + + this.deleteActual(); + + if(this.table.options.history && this.table.extExists("history")){ + if(index){ + index = this.table.rowManager.rows[index-1]; + } + + this.table.extensions.history.action("rowDelete", this, {data:this.getData(), pos:!index, index:index}); + }; +}; + + +Row.prototype.deleteActual = function(){ + this.table.rowManager.deleteRow(this); + + this.deleteCells(); +}; + + +Row.prototype.deleteCells = function(){ + var cellCount = this.cells.length; + + for(let i = 0; i < cellCount; i++){ + this.cells[0].delete(); + } +}; + + + +//////////////// Object Generation ///////////////// +Row.prototype.getComponent = function(){ + return new RowComponent(this); +}; \ No newline at end of file diff --git a/js/tabulator/src/js/row_manager.js b/js/tabulator/src/js/row_manager.js new file mode 100644 index 0000000..2d010d5 --- /dev/null +++ b/js/tabulator/src/js/row_manager.js @@ -0,0 +1,1128 @@ +var RowManager = function(table){ + + this.table = table; + this.element = $("
"); //containing element + this.tableElement = $("
"); //table element + this.columnManager = null; //hold column manager object + this.height = 0; //hold height of table element + + this.firstRender = false; //handle first render + this.renderMode = "classic"; //current rendering mode + + this.rows = []; //hold row data objects + this.activeRows = []; //rows currently available to on display in the table + this.activeRowsCount = 0; //count of active rows + + this.displayRows = []; //rows currently on display in the table + this.displayRowsCount = 0; //count of display rows + + this.scrollTop = 0; + this.scrollLeft = 0; + + this.vDomRowHeight = 20; //approximation of row heights for padding + + this.vDomTop = 0; //hold position for first rendered row in the virtual DOM + this.vDomBottom = 0; //hold possition for last rendered row in the virtual DOM + + this.vDomScrollPosTop = 0; //last scroll position of the vDom top; + this.vDomScrollPosBottom = 0; //last scroll position of the vDom bottom; + + this.vDomTopPad = 0; //hold value of padding for top of virtual DOM + this.vDomBottomPad = 0; //hold value of padding for bottom of virtual DOM + + this.vDomMaxRenderChain = 90; //the maximum number of dom elements that can be rendered in 1 go + + this.vDomWindowBuffer = 0; //window row buffer before removing elements, to smooth scrolling + + this.vDomWindowMinTotalRows = 20; //minimum number of rows to be generated in virtual dom (prevent buffering issues on tables with tall rows) + this.vDomWindowMinMarginRows = 5; //minimum number of rows to be generated in virtual dom margin + + this.vDomTopNewRows = []; //rows to normalize after appending to optimize render speed + this.vDomBottomNewRows = []; //rows to normalize after appending to optimize render speed + + this._initialize(); +}; + +//////////////// Setup Functions ///////////////// + +//return containing element +RowManager.prototype.getElement = function(){ + return this.element; +}; + +//return table element +RowManager.prototype.getTableElement = function(){ + return this.tableElement; +}; + +//link to column manager +RowManager.prototype.setColumnManager = function(manager){ + this.columnManager = manager; +}; + +RowManager.prototype._initialize = function(){ + var self = this; + + //initialize manager + self.element.append(self.tableElement); + + self.firstRender = true; + + //scroll header along with table body + self.element.scroll(function(){ + var left = self.element[0].scrollLeft; + + //handle horizontal scrolling + if(self.scrollLeft != left){ + self.columnManager.scrollHorizontal(left); + + if(self.table.options.groupBy){ + self.table.extensions.groupRows.scrollHeaders(left); + } + + if(self.table.extExists("columnCalcs")){ + self.table.extensions.columnCalcs.scrollHorizontal(left); + } + } + + self.scrollLeft = left; + }); + + //handle virtual dom scrolling + if(self.table.options.height && self.table.options.virtualDom){ + + self.element.scroll(function(){ + var top = self.element[0].scrollTop; + var dir = self.scrollTop > top; + + //handle verical scrolling + if(self.scrollTop != top){ + self.scrollTop = top; + self.scrollVertical(dir); + }else{ + self.scrollTop = top; + } + + }); + } + +}; + + +////////////////// Row Manipulation ////////////////// + +RowManager.prototype.findRow = function(subject){ + var self = this; + + if(typeof subject == "object"){ + + if(subject instanceof Row){ + //subject is row element + return subject; + }else if(subject instanceof RowComponent){ + //subject is public row component + return subject._getSelf() || false; + }else if(subject instanceof jQuery){ + //subject is a jquery element of the row + let match = self.rows.find(function(row){ + return row.element === subject; + }); + + return match || false; + } + + }else{ + //subject should be treated as the index of the row + let match = self.rows.find(function(row){ + return row.data[self.table.options.index] == subject; + }); + + return match || false; + } + + //catch all for any other type of input + + return false; +}; + +RowManager.prototype.scrollToRow = function(row){ + var rowIndex; + + rowIndex = this.displayRows.indexOf(row); + + if(rowIndex > -1){ + + switch(this.renderMode){ + case"classic": + this.element.scrollTop(row.element.offset().top - this.element.offset().top + this.element.scrollTop()); + break; + case"virtual": + this._virtualRenderFill(rowIndex, true); + break; + } + + }else{ + console.warn("Scroll Error - Row not visible"); + } +}; + + +////////////////// Data Handling ////////////////// + +RowManager.prototype.setData = function(data){ + var self = this; + + self.table.options.dataLoading(data); + + self.rows = []; + + if(this.table.options.history && this.table.extExists("history")){ + this.table.extensions.history.clear(); + } + + if(Array.isArray(data)){ + + if(this.table.extExists("selectRow")){ + this.table.extensions.selectRow.clearSelectionData(); + } + + data.forEach(function(def, i){ + var row = new Row(def, self); + + self.rows.push(row); + }); + + self.table.options.dataLoaded(data); + + self.refreshActiveData(true); + }else{ + console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ", typeof data, "\nData: ", data); + } +}; + +RowManager.prototype.deleteRow = function(row){ + var allIndex = this.rows.indexOf(row), + activeIndex = this.activeRows.indexOf(row), + displayIndex = this.displayRows.indexOf(row); + + if(displayIndex > -1){ + this.displayRows.splice(displayIndex, 1); + } + + if(activeIndex > -1){ + this.activeRows.splice(activeIndex, 1); + } + + if(allIndex > -1){ + this.rows.splice(allIndex, 1); + } + + this.setActiveRows(this.activeRows); + + this.setDisplayRows(this.displayRows); + + this.table.options.rowDeleted(row.getComponent()); + + this.table.options.dataEdited(this.getData()); + + if(this.table.options.pagination && this.table.extExists("page")){ + this.refreshActiveData() + }else{ + this.renderTable(); + } +}; + +RowManager.prototype.addRow = function(data, pos, index){ + + var row = this.addRowActual(data, pos, index); + + if(this.table.options.history && this.table.extExists("history")){ + this.table.extensions.history.action("rowAdd", row, {data:data, pos:pos, index:index}); + }; + + return row; +}; + +//add multiple rows +RowManager.prototype.addRows = function(data, pos, index){ + var self = this, + rows = []; + + pos = this.findAddRowPos(pos); + + + if(!Array.isArray(data)){ + data = [data]; + } + + if((typeof index == "undefined" && pos) || (typeof index !== "undefined" && !pos)){ + data.reverse(); + } + + data.forEach(function(item){ + var row = self.addRow(item, pos, index); + rows.push(row.getComponent()); + }); + + return rows; +}; + +RowManager.prototype.findAddRowPos = function(pos){ + + if(typeof pos === "undefined"){ + pos = this.table.options.addRowPos; + } + + if(pos === "pos"){ + pos = true; + } + + if(pos === "bottom"){ + pos = false; + } + + return pos; +}; + + +RowManager.prototype.addRowActual = function(data, pos, index){ + var safeData = data || {}, + row = new Row(safeData, this), + top = this.findAddRowPos(pos); + + if(index){ + index = this.findRow(index); + } + + if(index){ + let allIndex = this.rows.indexOf(index), + activeIndex = this.activeRows.indexOf(index), + displayIndex = this.displayRows.indexOf(index); + + if(displayIndex > -1){ + this.displayRows.splice((top ? displayIndex : displayIndex + 1), 0, row); + } + + if(activeIndex > -1){ + this.activeRows.splice((top ? activeIndex : activeIndex + 1), 0, row); + } + + if(allIndex > -1){ + this.rows.splice((top ? allIndex : allIndex + 1), 0, row); + } + + }else{ + if(top){ + this.displayRows.unshift(row); + this.activeRows.unshift(row); + this.rows.unshift(row); + }else{ + this.displayRows.push(row); + this.activeRows.push(row); + this.rows.push(row); + } + } + + this.setDisplayRows(this.displayRows) + + this.setActiveRows(this.activeRows); + + this.table.options.rowAdded(row.getComponent()); + + this.table.options.dataEdited(this.getData()); + + this.renderTable(); + + return row; +}; + +RowManager.prototype.moveRow = function(from, to, after){ + this._moveRowInArray(this.rows, from, to, after); + this._moveRowInArray(this.activeRows, from, to, after); + this._moveRowInArray(this.displayRows, from, to, after); + + this.table.options.rowMoved(from.getComponent()); +}; + +RowManager.prototype._moveRowInArray = function(rows, from, to, after){ + var fromIndex = rows.indexOf(from), + toIndex, start, end; + + if (fromIndex > -1) { + + rows.splice(fromIndex, 1); + + toIndex = rows.indexOf(to); + + if (toIndex > -1) { + + if(after){ + rows.splice(toIndex+1, 0, from); + }else{ + rows.splice(toIndex, 0, from); + } + + }else{ + rows.splice(fromIndex, 0, from); + } + } + + //restyle rows + if(rows === this.displayRows){ + + start = fromIndex < toIndex ? fromIndex : toIndex; + end = toIndex > fromIndex ? toIndex : fromIndex +1; + + for(let i = start; i <= end; i++){ + if(rows[i]){ + this.styleRow(rows[i], i); + } + } + } +}; + +RowManager.prototype.clearData = function(){ + this.setData([]); +}; + +RowManager.prototype.getRowIndex = function(row){ + return this.findRowIndex(row, this.rows); +}; + + +RowManager.prototype.getDisplayRowIndex = function(row){ + return this.findRowIndex(row, this.displayRows); +}; + +RowManager.prototype.nextDisplayRow = function(row){ + var index = this.getDisplayRowIndex(row), + nextRow = false; + + if(index !== false && index < this.displayRowsCount -1){ + nextRow = this.displayRows[index+1]; + } + + return nextRow; +}; + +RowManager.prototype.prevDisplayRow = function(row){ + var index = this.getDisplayRowIndex(row), + prevRow = false; + + if(index){ + prevRow = this.displayRows[index-1]; + } + + return prevRow; +}; + +RowManager.prototype.findRowIndex = function(row, list){ + var rowIndex; + + row = this.findRow(row); + + if(row){ + rowIndex = list.indexOf(row); + + if(rowIndex > -1){ + return rowIndex; + } + } + + return false; +}; + + +RowManager.prototype.getData = function(active){ + var self = this, + output = []; + + var rows = active ? self.activeRows : self.rows; + + rows.forEach(function(row){ + output.push(row.getData(true)); + }); + + return output; +}; + +RowManager.prototype.getHtml = function(active){ + var data = this.getData(active), + columns = this.table.columnManager.getComponents(), + header = "", + body = "", + table = ""; + + //build header row + columns.forEach(function(column){ + var def = column.getDefinition(); + + if(column.getVisibility()){ + header += `${def.title}`; + } + }) + + + //build body rows + data.forEach(function(rowData){ + var row = ""; + + columns.forEach(function(column){ + var value = typeof rowData[column.getField()] === "undefined" ? "" : rowData[column.getField()] ; + + if(column.getVisibility()){ + row += `${value}`; + } + }); + + body += `${row}`; + }); + + + //build table + table = ` + + ${header} + + ${body} +
`; + + return table; + }; + + RowManager.prototype.getComponents = function(active){ + var self = this, + output = []; + + var rows = active ? self.activeRows : self.rows; + + rows.forEach(function(row){ + output.push(row.getComponent()); + }); + + return output; + } + + RowManager.prototype.getDataCount = function(active){ + return active ? this.rows.length : this.activeRows.length; + }; + + RowManager.prototype._genRemoteRequest = function(){ + var self = this, + table = self.table, + options = table.options, + params = {}; + + if(table.extExists("page")){ + //set sort data if defined + if(options.ajaxSorting){ + let sorters = self.table.extensions.sort.getSort(); + + sorters.forEach(function(item){ + delete item.column; + }); + + params[self.table.extensions.page.paginationDataSentNames.sorters] = sorters; + } + + //set filter data if defined + if(options.ajaxFiltering){ + let filters = self.table.extensions.filter.getFilters(true, true); + + params[self.table.extensions.page.paginationDataSentNames.filters] = filters; + } + + + self.table.extensions.ajax.setParams(params, true); + } + + table.extensions.ajax.sendRequest(function(data){ + self.setData(data); + }); +}; + +//choose the path to refresh data after a filter update +RowManager.prototype.filterRefresh = function(){ + var table = this.table, + options = table.options; + + if(options.ajaxFiltering){ + if(options.pagination == "remote" && table.extExists("page")){ + table.extensions.page.reset(true); + table.extensions.page.setPage(1); + }else{ + //assume data is url, make ajax call to url to get data + this._genRemoteRequest(); + } + }else{ + this.refreshActiveData(); + } +}; + +//choose the path to refresh data after a sorter update +RowManager.prototype.sorterRefresh = function(){ + var table = this.table, + options = this.table.options, + left = this.scrollLeft; + + if(options.ajaxSorting){ + if(options.pagination == "remote" && table.extExists("page")){ + table.extensions.page.reset(true); + table.extensions.page.setPage(1); + }else{ + //assume data is url, make ajax call to url to get data + this._genRemoteRequest(); + } + }else{ + this.refreshActiveData(); + } + + this.element.scrollLeft(left); +}; + +//set active data set +RowManager.prototype.refreshActiveData = function(dataChanged){ + var self = this, + table = this.table; + + if(table.options.selectable && !table.options.selectablePersistence && table.extExists("selectRow")){ + table.extensions.selectRow.deselectRows(); + } + + //filter data + if(table.extExists("filter")){ + if(table.extensions.filter.hasChanged() || dataChanged){ + self.setActiveRows(table.extensions.filter.filter(self.rows)); + + dataChanged = true; + } + }else{ + self.setActiveRows(self.rows.slice(0)); + } + + //sort data + if(table.extExists("sort")){ + if(table.extensions.sort.hasChanged() || dataChanged){ + table.extensions.sort.sort(); + + dataChanged = true; + } + } + + //group data + if(table.options.groupBy && table.extExists("groupRows")){ + self.setDisplayRows(table.extensions.groupRows.getRows(this.activeRows, dataChanged)); + + if(table.options.pagination){ + console.warn("Invalid Setup Combination - Pagination and Row Grouping cannot be enabled at the same time"); + } + }else{ + + //paginate data + if(table.options.pagination && table.extExists("page")){ + if(table.extensions.page.getMode() == "local"){ + if(dataChanged){ + table.extensions.page.reset(); + } + table.extensions.page.setMaxRows(this.activeRows.length); + } + self.setDisplayRows(table.extensions.page.getRows(this.activeRows)); + }else{ + self.setDisplayRows(self.activeRows.slice(0)); + } + } + + if(self.element.is(":visible")){ + self.renderTable(); + } + + if(table.extExists("columnCalcs")){ + table.extensions.columnCalcs.recalc(this.displayRows); + } +}; + +RowManager.prototype.setActiveRows = function(activeRows){ + this.activeRows = activeRows; + this.activeRowsCount = this.activeRows.length; +}; + +RowManager.prototype.setDisplayRows = function(displayRows){ + this.displayRows = displayRows; + this.displayRowsCount = this.displayRows.length; +}; + +//return only actual rows (not group headers etc) +RowManager.prototype.getRows = function(){ + return this.rows; +}; + +///////////////// Table Rendering ///////////////// + +RowManager.prototype.renderTable = function(){ + var self = this; + + self.table.options.renderStarted(); + + self.element.scrollTop(0); + + if(!self.height || !self.table.options.virtualDom || self.table.options.pagination){ + self.renderMode = "classic"; + self._simpleRender(); + }else{ + self.renderMode = "virtual"; + self._virtualRenderFill(); + } + + if(self.firstRender){ + if(self.displayRowsCount){ + self.firstRender = false; + self.table.extensions.layout.layout(); + }else{ + self.renderEmptyScroll(); + } + } + + if(self.table.extExists("frozenColumns")){ + self.table.extensions.frozenColumns.layout(); + } + + + if(!self.displayRowsCount){ + if(self.table.options.placeholder){ + self.getElement().append(self.table.options.placeholder); + } + } + + self.table.options.renderComplete(); +}; + +RowManager.prototype.getRenderMode = function(){ + return this.renderMode; +}; + +//simple render on heightless table +RowManager.prototype._simpleRender = function(){ + var self = this, + element = this.tableElement; + + self._clearVirtualDom(); + + if(self.displayRowsCount){ + self.displayRows.forEach(function(row, index){ + self.styleRow(row, index); + element.append(row.getElement()); + row.initialize(true); + }); + }else{ + self.renderEmptyScroll(); + } +}; + +//show scrollbars on empty table div +RowManager.prototype.renderEmptyScroll = function(){ + var self = this; + self.tableElement.css({ + "min-width":self.table.columnManager.getWidth(), + "min-height":"1px", + "visibility":"hidden", + }); +}; + +RowManager.prototype._clearVirtualDom = function(){ + var element = this.tableElement; + + if(this.table.options.placeholder){ + this.table.options.placeholder.detach(); + } + + element.children().detach(); + + element.css({ + "padding-top":"", + "padding-bottom":"", + "min-width":"", + "min-height":"", + "visibility":"", + }); + + this.scrollTop = 0; + this.scrollLeft = 0; + this.vDomTop = 0; + this.vDomBottom = 0; + this.vDomTopPad = 0; + this.vDomBottomPad = 0; +}; + +RowManager.prototype.styleRow = function(row, index){ + if(index % 2){ + row.element.addClass("tabulator-row-even").removeClass("tabulator-row-odd"); + }else{ + row.element.addClass("tabulator-row-odd").removeClass("tabulator-row-even"); + } +}; + +//full virtual render +RowManager.prototype._virtualRenderFill = function(position, forceMove){ + var self = this, + element = self.tableElement, + holder = self.element, + topPad = 0, + rowsHeight = 0, + topPadHeight = 0, + i = 0; + + position = position || 0; + + if(!position){ + self._clearVirtualDom(); + }else{ + element.children().detach(); + + //check if position is too close to bottom of table + let heightOccpied = (self.displayRowsCount - position) * self.vDomRowHeight + + if(heightOccpied < self.height){ + position -= Math.ceil((self.height - heightOccpied) / self.displayRowsCount); + + if(position < 0){ + position = 0; + } + } + + //calculate initial pad + topPad = Math.min(Math.max(Math.floor(self.vDomWindowBuffer / self.vDomRowHeight), self.vDomWindowMinMarginRows), position); + position -= topPad; + } + + if(self.displayRowsCount && self.element.is(":visible")){ + + self.vDomTop = position; + + self.vDomBottom = position -1; + + while ((rowsHeight <= self.height + self.vDomWindowBuffer || i < self.vDomWindowMinTotalRows) && self.vDomBottom < self.displayRowsCount -1){ + var index = self.vDomBottom + 1, + row = self.displayRows[index]; + + self.styleRow(row, index); + + element.append(row.getElement()); + if(!row.initialized){ + row.initialize(true); + }else{ + if(!row.heightInitialized){ + row.normalizeHeight(true); + } + } + + if(i < topPad){ + topPadHeight += row.getHeight(); + }else{ + rowsHeight += row.getHeight(); + } + + self.vDomBottom ++; + i++; + } + + if(!position){ + this.vDomTopPad = 0; + //adjust rowheight to match average of rendered elements + self.vDomRowHeight = Math.floor((rowsHeight + topPadHeight) / i); + self.vDomBottomPad = self.vDomRowHeight * (self.displayRowsCount - self.vDomBottom -1); + + self.vDomScrollHeight = topPadHeight + rowsHeight + self.vDomBottomPad - self.height; + }else{ + self.vDomTopPad = !forceMove ? self.scrollTop - topPadHeight : (self.vDomRowHeight * this.vDomTop) + topPadHeight; + self.vDomBottomPad = self.vDomBottom == self.displayRowsCount-1 ? 0 : Math.max(self.vDomScrollHeight - self.vDomTopPad - rowsHeight - topPadHeight, 0); + } + + element[0].style.paddingTop = self.vDomTopPad + "px"; + element[0].style.paddingBottom = self.vDomBottomPad + "px"; + + if(forceMove){ + this.scrollTop = self.vDomTopPad + (topPadHeight); + } + + this.scrollTop = Math.min(this.scrollTop, this.element[0].scrollHeight - this.height); + + //adjust for horizontal scrollbar if present + if(this.element[0].scrollWidth > this.element[0].offsetWidt){ + this.scrollTop += this.element[0].offsetHeight - this.element[0].clientHeight; + } + + this.vDomScrollPosTop = this.scrollTop; + this.vDomScrollPosBottom = this.scrollTop; + + holder.scrollTop(this.scrollTop); + + if(self.table.options.groupBy){ + if(self.table.extensions.layout.getMode() != "fitDataFill" && self.displayRowsCount == self.table.extensions.groupRows.countGroups()){ + + self.tableElement.css({ + "min-width":self.table.columnManager.getWidth(), + }); + } + } + + }else{ + this.renderEmptyScroll(); + } +}; + +//handle vertical scrolling +RowManager.prototype.scrollVertical = function(dir){ + var topDiff = this.scrollTop - this.vDomScrollPosTop; + var bottomDiff = this.scrollTop - this.vDomScrollPosBottom; + var margin = this.vDomWindowBuffer * 2; + + if(-topDiff > margin || bottomDiff > margin){ + //if big scroll redraw table; + this._virtualRenderFill(Math.floor((this.element[0].scrollTop / this.element[0].scrollHeight) * this.displayRowsCount)); + }else{ + + if(dir){ + //scrolling up + if(topDiff < 0){ + this._addTopRow(-topDiff) + } + + if(topDiff < 0){ + + //hide bottom row if needed + if(this.vDomScrollHeight - this.scrollTop > this.vDomWindowBuffer){ + this._removeBottomRow(-bottomDiff); + } + } + }else{ + //scrolling down + if(topDiff >= 0){ + + //hide top row if needed + if(this.scrollTop > this.vDomWindowBuffer){ + this._removeTopRow(topDiff); + } + } + + if(bottomDiff >= 0){ + this._addBottomRow(bottomDiff); + } + } + } +}; + +RowManager.prototype._addTopRow = function(topDiff, i=0){ + var table = this.tableElement; + + if(this.vDomTop){ + let index = this.vDomTop -1, + topRow = this.displayRows[index], + topRowHeight = topRow.getHeight() || this.vDomRowHeight; + + //hide top row if needed + if(topDiff >= topRowHeight){ + this.styleRow(topRow, index); + table.prepend(topRow.getElement()); + if(!topRow.initialized || !topRow.heightInitialized){ + this.vDomTopNewRows.push(topRow); + + if(!topRow.heightInitialized){ + topRow.clearCellHeight(); + } + } + topRow.initialize(); + + this.vDomTopPad -= topRowHeight; + + if(this.vDomTopPad < 0){ + this.vDomTopPad = (this.vDomTop -1) * this.vDomRowHeight; + } + + table[0].style.paddingTop = this.vDomTopPad + "px"; + this.vDomScrollPosTop -= topRowHeight; + this.vDomTop--; + } + + topDiff = -(this.scrollTop - this.vDomScrollPosTop); + + if(i < this.vDomMaxRenderChain && this.vDomTop && topDiff >= (this.displayRows[this.vDomTop -1].getHeight() || this.vDomRowHeight)){ + this._addTopRow(topDiff, i+1); + }else{ + this._quickNormalizeRowHeight(this.vDomTopNewRows); + } + + } + +}; + +RowManager.prototype._removeTopRow = function(topDiff){ + var table = this.tableElement, + topRow = this.displayRows[this.vDomTop], + topRowHeight = topRow.getHeight() || this.vDomRowHeight; + + if(topDiff >= topRowHeight){ + + topRow.element.detach(); + + this.vDomTopPad += topRowHeight; + table[0].style.paddingTop = this.vDomTopPad + "px"; + this.vDomScrollPosTop += this.vDomTop ? topRowHeight : topRowHeight + this.vDomWindowBuffer; + this.vDomTop++; + + topDiff = this.scrollTop - this.vDomScrollPosTop; + + this._removeTopRow(topDiff); + } + +}; + +RowManager.prototype._addBottomRow = function(bottomDiff, i=0){ + var table = this.tableElement; + + if(this.vDomBottom < this.displayRowsCount -1){ + let index = this.vDomBottom + 1, + bottomRow = this.displayRows[index], + bottomRowHeight = bottomRow.getHeight() || this.vDomRowHeight; + + //hide bottom row if needed + if(bottomDiff >= bottomRowHeight){ + this.styleRow(bottomRow, index); + table.append(bottomRow.getElement()); + + if(!bottomRow.initialized || !bottomRow.heightInitialized){ + this.vDomBottomNewRows.push(bottomRow); + + if(!bottomRow.heightInitialized){ + bottomRow.clearCellHeight(); + } + } + + bottomRow.initialize(); + + this.vDomBottomPad -= bottomRowHeight; + + if(this.vDomBottomPad < 0 || index == this.displayRowsCount -1){ + this.vDomBottomPad = 0; + } + + table[0].style.paddingBottom = this.vDomBottomPad + "px"; + this.vDomScrollPosBottom += bottomRowHeight; + this.vDomBottom++; + } + + bottomDiff = this.scrollTop - this.vDomScrollPosBottom; + + if(i < this.vDomMaxRenderChain && this.vDomBottom < this.displayRowsCount -1 && bottomDiff >= (this.displayRows[this.vDomBottom + 1].getHeight() || this.vDomRowHeight)){ + this._addBottomRow(bottomDiff, i+1); + }else{ + this._quickNormalizeRowHeight(this.vDomBottomNewRows); + } + } +}; + +RowManager.prototype._removeBottomRow = function(bottomDiff){ + var table = this.tableElement, + bottomRow = this.displayRows[this.vDomBottom], + bottomRowHeight = bottomRow.getHeight() || this.vDomRowHeight; + + if(bottomDiff >= bottomRowHeight){ + + bottomRow.element.detach(); + + this.vDomBottomPad += bottomRowHeight; + + if(this.vDomBottomPad < 0){ + this.vDomBottomPad == 0; + } + + table[0].style.paddingBottom = this.vDomBottomPad + "px"; + this.vDomScrollPosBottom -= bottomRowHeight; + this.vDomBottom--; + + bottomDiff = -(this.scrollTop - this.vDomScrollPosBottom); + + this._removeBottomRow(bottomDiff); + } +}; + +RowManager.prototype._quickNormalizeRowHeight = function(rows){ + rows.forEach(function(row){ + row.calcHeight(); + }); + + rows.forEach(function(row){ + row.setCellHeight(); + }); + + rows.length = 0; +}; + +//normalize height of active rows +RowManager.prototype.normalizeHeight = function(){ + var self = this; + + self.displayRows.forEach(function(row){ + row.normalizeHeight(); + }); +}; + +//adjust the height of the table holder to fit in the Tabulator element +RowManager.prototype.adjustTableSize = function(){ + var self = this; + + if(self.table.options.height){ + + let otherHeigt = self.columnManager.getElement().outerHeight() + (self.table.footerManager ? self.table.footerManager.getElement().outerHeight() : 0); + + self.element.css({ + "min-height":"calc(100% - " + otherHeigt + "px)", + "height":"calc(100% - " + otherHeigt + "px)", + "max-height":"calc(100% - " + otherHeigt + "px)", + }); + + self.height = self.element.innerHeight(); + self.vDomWindowBuffer = self.table.options.virtualDomBuffer || self.height; + } +}; + +//renitialize all rows +RowManager.prototype.reinitialize = function(){ + this.rows.forEach(function(row){ + row.reinitialize(); + }); +}; + + +//redraw table +RowManager.prototype.redraw = function (force){ + var pos = 0; + + if(this.renderMode == "virtual"){ + this.adjustTableSize(); + } + + if(!force){ + + if(self.renderMode == "simple"){ + this._simpleRender(); + }else{ + var pos = Math.floor((this.element.scrollTop() / this.element[0].scrollHeight) * this.displayRowsCount); + this._virtualRenderFill(pos); + } + + if(!this.displayRowsCount){ + if(this.table.options.placeholder){ + this.getElement().append(this.table.options.placeholder); + } + } + + }else{ + this.renderTable(); + } +}; + +RowManager.prototype.resetScroll = function(){ + this.element.scrollLeft(0); + this.element.scrollTop(0); + this.element.scroll(); +}; \ No newline at end of file diff --git a/js/tabulator/src/scss/bootstrap/tabulator_bootstrap.scss b/js/tabulator/src/scss/bootstrap/tabulator_bootstrap.scss new file mode 100644 index 0000000..af3049c --- /dev/null +++ b/js/tabulator/src/scss/bootstrap/tabulator_bootstrap.scss @@ -0,0 +1,750 @@ +@import "variables.scss"; + +// Style conversion file, bootstrap to tabulator + +//Main Theme Variables +$backgroundColor: $table-bg; //background color of tabulator +$borderColor:$table-border-color; //border to tablulator +$textSize:$font-size-base; //table text size + +//header themeing +$headerBackgroundColor:#fff; //border to tablulator +$headerSeperatorColor:$table-border-color; //header bottom seperator color + +$cellPadding:$table-cell-padding; //padding round header +$cellPaddingCondensed:$table-condensed-cell-padding; //padding round header + +//column header arrows +$sortArrowActive: #666; +$sortArrowInactive: #bbb; + +//row themeing +$rowBackgroundColor:$backgroundColor; //table row background color +$rowAltBackgroundColor:$table-bg-accent; //table row background color +$rowBorderColor:$table-border-color; //table border color +$rowHoverBackground:$table-bg-hover; //row background color on hover + +$rowSelectedBackground: #9ABCEA; //row background color when selected +$rowSelectedBackgroundHover: #769BCC;//row background color when selected and hovered + + +$editBoxColor:#1D68CD; //border color for edit boxes +$errorColor:#dd0000; //error indication + +//footer themeing +$footerBorderColor:$table-border-color; //footer border color +$footerSeperatorColor:$table-border-color; //footer bottom seperator color + + + +//Tabulator Containing Element +.tabulator{ + position: relative; + background-color: $backgroundColor; + overflow:hidden; + font-size:$textSize; + text-align: left; + width: 100%; + max-width: 100%; + margin-bottom: $line-height-computed; + + -webkit-transform: translatez(0); + -moz-transform: translatez(0); + -ms-transform: translatez(0); + -o-transform: translatez(0); + transform: translatez(0); + + &[tabulator-layout="fitDataFill"]{ + .tabulator-tableHolder{ + .tabulator-table{ + min-width:100%; + } + } + } + + &.tabulator-block-select{ + user-select: none; + } + + //column header containing element + .tabulator-header{ + position:relative; + box-sizing: border-box; + + width:100%; + + border-bottom:2px solid $headerSeperatorColor; + background-color: $headerBackgroundColor; + font-weight:bold; + + white-space: nowrap; + overflow:hidden; + + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + + //individual column header element + .tabulator-col{ + display:inline-block; + position:relative; + box-sizing:border-box; + background-color: $headerBackgroundColor; + text-align:left; + vertical-align: bottom; + overflow: hidden; + + &.tabulator-moving{ + position: absolute; + border:1px solid $headerSeperatorColor; + background:darken($headerBackgroundColor, 10%); + pointer-events: none; + } + + //hold content of column header + .tabulator-col-content{ + position: relative; + padding:$cellPadding; + + //hold title of column header + .tabulator-col-title{ + box-sizing:border-box; + width: 100%; + + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + vertical-align:bottom; + + //element to hold title editor + .tabulator-title-editor{ + box-sizing: border-box; + width: 100%; + + border:1px solid #999; + + padding:1px; + + background: #fff; + } + } + + //column sorter arrow + .tabulator-arrow{ + display: inline-block; + position: absolute; + top:14px; + right:8px; + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid $sortArrowInactive; + } + + } + + //complex header column group + &.tabulator-col-group{ + + //gelement to hold sub columns in column group + .tabulator-col-group-cols{ + position:relative; + display: flex; + + border-top:1px solid $borderColor; + overflow: hidden; + + .tabulator-col:last-child{ + margin-right:-1px; + } + } + } + + + //hide left resize handle on first column + &:first-child{ + .tabulator-col-resize-handle.prev{ + display: none; + } + } + + //placeholder element for sortable columns + &.ui-sortable-helper{ + position: absolute; + background-color:darken($headerBackgroundColor, 10%) !important; + border:1px solid $borderColor; + } + + //header filter containing element + .tabulator-header-filter{ + position: relative; + box-sizing: border-box; + margin-top:2px; + width:100%; + text-align: center; + + //styling adjustment for inbuilt editors + textarea{ + height:auto !important; + } + + svg{ + margin-top: 3px; + } + } + + + //styling child elements for sortable columns + &.tabulator-sortable{ + .tabulator-col-title{ + padding-right:25px; + } + + &:hover{ + cursor:pointer; + background-color:darken($headerBackgroundColor, 10%); + } + + &[aria-sort="none"]{ + .tabulator-col-content .tabulator-arrow{ + border-top: none; + border-bottom: 6px solid $sortArrowInactive; + } + } + + &[aria-sort="asc"]{ + .tabulator-col-content .tabulator-arrow{ + border-top: none; + border-bottom: 6px solid $sortArrowActive; + } + } + + &[aria-sort="desc"]{ + .tabulator-col-content .tabulator-arrow{ + border-top: 6px solid $sortArrowActive; + border-bottom: none; + } + } + } + + } + + .tabulator-frozen{ + display: inline-block; + position: absolute; + + // background-color: inherit; + + z-index: 10; + + &.tabulator-frozen-left{ + border-right:2px solid $rowBorderColor; + } + + &.tabulator-frozen-right{ + border-left:2px solid $rowBorderColor; + } + } + + .tabulator-calcs-holder{ + box-sizing:border-box; + width:100%; + + background:lighten($headerBackgroundColor, 5%) !important; + + .tabulator-row{ + background:lighten($headerBackgroundColor, 5%) !important; + + .tabulator-col-resize-handle{ + display: none; + } + } + + border-top:1px solid $rowBorderColor; + border-bottom:1px solid $headerSeperatorColor; + + overflow: hidden; + } + } + + + + //scrolling element to hold table + .tabulator-tableHolder{ + position:relative; + width:100%; + white-space: nowrap; + overflow:auto; + -webkit-overflow-scrolling: touch; + + &:focus{ + outline: none; + } + + //default placeholder element + .tabulator-placeholder{ + position: absolute; + box-sizing:border-box; + display: flex; + align-items:center; + + top:0; + left:0; + height:100%; + width:100%; + + span{ + display: inline-block; + + margin:0 auto; + padding:10px; + + color:#000; + font-weight: bold; + font-size: 20px; + } + } + + //element to hold table rows + .tabulator-table{ + position:relative; + display:inline-block; + background-color:$rowBackgroundColor; + white-space: nowrap; + overflow:visible; + + .tabulator-row{ + &.tabulator-calcs{ + font-weight: bold; + background:darken($rowAltBackgroundColor, 5%) !important; + + &.tabulator-calcs-top{ + border-bottom:2px solid $rowBorderColor; + } + + &.tabulator-calcs-bottom{ + border-top:2px solid $rowBorderColor; + } + } + } + } + } + + //row element + .tabulator-row{ + position: relative; + box-sizing: border-box; + + min-height:$textSize + ($cellPadding * 2); + background-color: $rowBackgroundColor; + border-bottom:1px solid $rowBorderColor; + + &.tabulator-selectable:hover{ + background-color:$rowHoverBackground !important; + cursor: pointer; + } + + &.tabulator-selected{ + background-color:$rowSelectedBackground; + } + + &.tabulator-selected:hover{ + background-color:$rowSelectedBackgroundHover; + cursor: pointer; + } + + &.tabulator-moving{ + position: absolute; + + border-top:1px solid $rowBorderColor; + border-bottom:1px solid $rowBorderColor; + + pointer-events: none !important; + z-index:15; + } + + .tabulator-frozen{ + display: inline-block; + position: absolute; + + background-color: inherit; + + z-index: 10; + + &.tabulator-frozen-left{ + border-right:2px solid $rowBorderColor; + } + + &.tabulator-frozen-right{ + border-left:2px solid $rowBorderColor; + } + } + + //cell element + .tabulator-cell{ + display:inline-block; + position: relative; + box-sizing:border-box; + padding:$cellPadding; + vertical-align:middle; + white-space:nowrap; + overflow:hidden; + text-overflow:ellipsis; + + &:last-of-type{ + border-right: none; + } + + &.tabulator-editing{ + border:1px solid $editBoxColor; + padding: 0; + + input, select{ + border:1px; + background:transparent; + } + } + + &.tabulator-validation-fail{ + border:1px solid $errorColor; + input, select{ + border:1px; + background:transparent; + + color: $errorColor; + } + } + + //hide left resize handle on first column + &:first-child{ + .tabulator-col-resize-handle.prev{ + display: none; + } + } + + //movable row handle + &.tabulator-row-handle{ + + display: inline-flex; + align-items:center; + + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + + //handle holder + .tabulator-row-handle-box{ + width:80%; + + //Hamburger element + .tabulator-row-handle-bar{ + width:100%; + height:3px; + margin:2px 10% 0 10%; + background:#666; + } + } + } + } + //row grouping element + &.tabulator-group{ + + box-sizing:border-box; + border-bottom:1px solid #999; + border-right:1px solid $rowBorderColor; + border-top:1px solid #999; + padding:5px; + padding-left:10px; + background:#fafafa; + font-weight:bold; + + min-width: 100%; + + &:hover{ + cursor:pointer; + background-color:rgba(0,0,0,.1); + } + + &.tabulator-group-visible{ + .tabulator-arrow{ + margin-right:10px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 6px solid $sortArrowActive; + border-bottom: 0; + } + } + + &.tabulator-group-level-1{ + .tabulator-arrow{ + margin-left:20px; + } + } + + &.tabulator-group-level-2{ + .tabulator-arrow{ + margin-left:40px; + } + } + + &.tabulator-group-level-3{ + .tabulator-arrow{ + margin-left:60px; + } + } + + &.tabulator-group-level-4{ + .tabulator-arrow{ + margin-left:80px; + } + } + + &.tabulator-group-level-5{ + .tabulator-arrow{ + margin-left:1000px; + } + } + + //sorting arrow + .tabulator-arrow{ + display: inline-block; + width: 0; + height: 0; + margin-right:16px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 0; + border-left: 6px solid $sortArrowActive; + vertical-align:middle; + } + + span{ + margin-left:10px; + color:#666; + } + } + } + + //column resize handles + .tabulator-col-resize-handle{ + position:absolute; + right:0; + top:0; + bottom:0; + width:5px; + + &.prev{ + left:0; + right:auto; + } + + &:hover{ + cursor:ew-resize; + } + } + + + //footer element + .tabulator-footer{ + padding:5px 10px; + border-top:2px solid $footerSeperatorColor; + text-align:right; + font-weight:bold; + white-space:nowrap; + user-select:none; + + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + + .tabulator-calcs-holder{ + box-sizing:border-box; + width:calc("100% + 20px"); + margin:-5px -10px 5px -10px; + + text-align: left; + + background:lighten($backgroundColor, 5%) !important; + + .tabulator-row{ + background:lighten($backgroundColor, 5%) !important; + + .tabulator-col-resize-handle{ + display: none; + } + } + + border-bottom:1px solid $rowBorderColor; + border-top:1px solid $rowBorderColor; + + overflow: hidden; + + &:only-child{ + margin-bottom:-5px; + border-bottom:none; + } + } + + //pagination container element + .tabulator-pages{ + margin:0 7px; + } + + //pagination button + .tabulator-page{ + display:inline-block; + margin:0 2px; + border:1px solid $footerBorderColor; + border-radius:3px; + padding:2px 5px; + background:rgba(255,255,255,.2); + font-family:inherit; + font-weight:inherit; + font-size:inherit; + + + &.active{ + color:#d00; + } + + &:disabled{ + opacity:.5; + } + + &:not(.disabled){ + &:hover{ + cursor:pointer; + background:rgba(0,0,0,.2); + color:#fff; + } + } + } + } + + //holding div that contains loader and covers tabulator element to prevent interaction + .tablulator-loader{ + position:absolute; + display: flex; + align-items:center; + + top:0; + left:0; + z-index:100; + + height:100%; + width:100%; + background:rgba(0,0,0,.4); + text-align:center; + + //loading message element + .tabulator-loader-msg{ + display:inline-block; + + margin:0 auto; + padding:10px 20px; + + border-radius:10px; + + background:#fff; + font-weight:bold; + font-size:16px; + + //loading message + &.tabulator-loading{ + border:4px solid #333; + color:#000; + } + + //error message + &.tabulator-error{ + border:4px solid #D00; + color:#590000; + } + } + } + + + + //Bootstrap theming classes + + &.table-striped{ + .tabulator-row{ + &:nth-child(even){ + background-color: $rowAltBackgroundColor; + } + } + } + + &.table-bordered{ + border:1px solid $borderColor; + + .tabulator-header{ + .tabulator-col{ + border-right:1px solid $borderColor; + } + } + + .tabulator-tableHolder{ + .tabulator-table{ + .tabulator-row{ + .tabulator-cell{ + border-right:1px solid $borderColor; + } + } + } + } + + } + + &.table-condensed{ + .tabulator-header{ + .tabulator-col{ + .tabulator-col-content{ + padding:$cellPaddingCondensed; + } + } + } + + .tabulator-tableHolder{ + .tabulator-table{ + .tabulator-row{ + min-height:$textSize + ($cellPaddingCondensed * 2); + + .tabulator-cell{ + padding:$cellPaddingCondensed; + } + } + } + } + } + + + //row colors + .tabulator-tableHolder{ + .tabulator-table{ + .tabulator-row{ + &.active{ + background:$table-bg-active!important; + } + &.success{ + background:$state-success-bg!important; + } + &.info{ + background: $state-info-bg!important; + } + &.warning{ + background:$state-warning-bg!important; + } + &.danger{ + background:$state-danger-bg!important; + } + } + } + } + +} + diff --git a/js/tabulator/src/scss/bootstrap/variables.scss b/js/tabulator/src/scss/bootstrap/variables.scss new file mode 100644 index 0000000..fe1b850 --- /dev/null +++ b/js/tabulator/src/scss/bootstrap/variables.scss @@ -0,0 +1,870 @@ +// +// Variables +// -------------------------------------------------- + + +//== Colors +// +//## Gray and brand colors for use across Bootstrap. + +$gray-base: #000; +$gray-darker: lighten($gray-base, 13.5%); // #222 +$gray-dark: lighten($gray-base, 20%); // #333 +$gray: lighten($gray-base, 33.5%); // #555 +$gray-light: lighten($gray-base, 46.7%); // #777 +$gray-lighter: lighten($gray-base, 93.5%); // #eee + +$brand-primary: darken(#428bca, 6.5%); // #337ab7 +$brand-success: #5cb85c; +$brand-info: #5bc0de; +$brand-warning: #f0ad4e; +$brand-danger: #d9534f; + + +//== Scaffolding +// +//## Settings for some of the most global styles. + +//** Background color for ``. +$body-bg: #fff; +//** Global text color on ``. +$text-color: $gray-dark; + +//** Global textual link color. +$link-color: $brand-primary; +//** Link hover color set via `darken()` function. +$link-hover-color: darken($link-color, 15%); +//** Link hover decoration. +$link-hover-decoration: underline; + + +//== Typography +// +//## Font, line-height, and color for body text, headings, and more. + +$font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif; +$font-family-serif: Georgia, "Times New Roman", Times, serif; +//** Default monospace fonts for ``, ``, and `
`.
+$font-family-monospace:   Menlo, Monaco, Consolas, "Courier New", monospace;
+$font-family-base:        $font-family-sans-serif;
+
+$font-size-base:          14px;
+$font-size-large:         ceil(($font-size-base * 1.25)); // ~18px
+$font-size-small:         ceil(($font-size-base * 0.85)); // ~12px
+
+$font-size-h1:            floor(($font-size-base * 2.6)); // ~36px
+$font-size-h2:            floor(($font-size-base * 2.15)); // ~30px
+$font-size-h3:            ceil(($font-size-base * 1.7)); // ~24px
+$font-size-h4:            ceil(($font-size-base * 1.25)); // ~18px
+$font-size-h5:            $font-size-base;
+$font-size-h6:            ceil(($font-size-base * 0.85)); // ~12px
+
+//** Unit-less `line-height` for use in components like buttons.
+$line-height-base:        1.428571429; // 20/14
+//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
+$line-height-computed:    floor(($font-size-base * $line-height-base)); // ~20px
+
+//** By default, this inherits from the ``.
+$headings-font-family:    inherit;
+$headings-font-weight:    500;
+$headings-line-height:    1.1;
+$headings-color:          inherit;
+
+
+//== Iconography
+//
+//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
+
+//** Load fonts from this directory.
+$icon-font-path:          "../fonts/";
+//** File name for all font files.
+$icon-font-name:          "glyphicons-halflings-regular";
+//** Element ID within SVG icon file.
+$icon-font-svg-id:        "glyphicons_halflingsregular";
+
+
+//== Components
+//
+//## Define common padding and border radius sizes and more. Values based on 14px text and 1@mixin 428 line-height (~20px to start).
+
+$padding-base-vertical:     6px;
+$padding-base-horizontal:   12px;
+
+$padding-large-vertical:    10px;
+$padding-large-horizontal:  16px;
+
+$padding-small-vertical:    5px;
+$padding-small-horizontal:  10px;
+
+$padding-xs-vertical:       1px;
+$padding-xs-horizontal:     5px;
+
+$line-height-large:         1.3333333; // extra decimals for Win 8.1 Chrome
+$line-height-small:         1.5;
+
+$border-radius-base:        4px;
+$border-radius-large:       6px;
+$border-radius-small:       3px;
+
+//** Global color for active items (e.g., navs or dropdowns).
+$component-active-color:    #fff;
+//** Global background color for active items (e.g., navs or dropdowns).
+$component-active-bg:       $brand-primary;
+
+//** Width of the `border` for generating carets that indicator dropdowns.
+$caret-width-base:          4px;
+//** Carets increase slightly in size for larger components.
+$caret-width-large:         5px;
+
+
+//== Tables
+//
+//## Customizes the `.table` component with basic values, each used across all table variations.
+
+//** Padding for ``s and ``s.
+$table-cell-padding:            8px;
+//** Padding for cells in `.table-condensed`.
+$table-condensed-cell-padding:  5px;
+
+//** Default background color used for all tables.
+// $table-bg:                      transparent;
+$table-bg:                      #fff;
+//** Background color used for `.table-striped`.
+$table-bg-accent:               #f9f9f9;
+//** Background color used for `.table-hover`.
+$table-bg-hover:                #f5f5f5;
+$table-bg-active:               $table-bg-hover;
+
+//** Border color for table and cell borders.
+$table-border-color:            #ddd;
+
+
+//== Buttons
+//
+//## For each of Bootstrap's buttons, define text, background and border color.
+
+$btn-font-weight:                normal;
+
+$btn-default-color:              #333;
+$btn-default-bg:                 #fff;
+$btn-default-border:             #ccc;
+
+$btn-primary-color:              #fff;
+$btn-primary-bg:                 $brand-primary;
+$btn-primary-border:             darken($btn-primary-bg, 5%);
+
+$btn-success-color:              #fff;
+$btn-success-bg:                 $brand-success;
+$btn-success-border:             darken($btn-success-bg, 5%);
+
+$btn-info-color:                 #fff;
+$btn-info-bg:                    $brand-info;
+$btn-info-border:                darken($btn-info-bg, 5%);
+
+$btn-warning-color:              #fff;
+$btn-warning-bg:                 $brand-warning;
+$btn-warning-border:             darken($btn-warning-bg, 5%);
+
+$btn-danger-color:               #fff;
+$btn-danger-bg:                  $brand-danger;
+$btn-danger-border:              darken($btn-danger-bg, 5%);
+
+$btn-link-disabled-color:        $gray-light;
+
+// Allows for customizing button radius independently from global border radius
+$btn-border-radius-base:         $border-radius-base;
+$btn-border-radius-large:        $border-radius-large;
+$btn-border-radius-small:        $border-radius-small;
+
+
+//== Forms
+//
+//##
+
+//** `` background color
+$input-bg:                       #fff;
+//** `` background color
+$input-bg-disabled:              $gray-lighter;
+
+//** Text color for ``s
+$input-color:                    $gray;
+//** `` border color
+$input-border:                   #ccc;
+
+// TODO: Rename `$input-border-radius` to `$input-border-radius-base` in v4
+//** Default `.form-control` border radius
+// This has no effect on ``s in CSS.
+$input-border-radius:            $border-radius-base;
+//** Large `.form-control` border radius
+$input-border-radius-large:      $border-radius-large;
+//** Small `.form-control` border radius
+$input-border-radius-small:      $border-radius-small;
+
+//** Border color for inputs on focus
+$input-border-focus:             #66afe9;
+
+//** Placeholder text color
+$input-color-placeholder:        #999;
+
+//** Default `.form-control` height
+$input-height-base:              ($line-height-computed + ($padding-base-vertical * 2) + 2);
+//** Large `.form-control` height
+$input-height-large:             (ceil($font-size-large * $line-height-large) + ($padding-large-vertical * 2) + 2);
+//** Small `.form-control` height
+$input-height-small:             (floor($font-size-small * $line-height-small) + ($padding-small-vertical * 2) + 2);
+
+//** `.form-group` margin
+$form-group-margin-bottom:       15px;
+
+$legend-color:                   $gray-dark;
+$legend-border-color:            #e5e5e5;
+
+//** Background color for textual input addons
+$input-group-addon-bg:           $gray-lighter;
+//** Border color for textual input addons
+$input-group-addon-border-color: $input-border;
+
+//** Disabled cursor for form controls and buttons.
+$cursor-disabled:                not-allowed;
+
+
+//== Dropdowns
+//
+//## Dropdown menu container and contents.
+
+//** Background for the dropdown menu.
+$dropdown-bg:                    #fff;
+//** Dropdown menu `border-color`.
+$dropdown-border:                rgba(0,0,0,.15);
+//** Dropdown menu `border-color` **for IE8**.
+$dropdown-fallback-border:       #ccc;
+//** Divider color for between dropdown items.
+$dropdown-divider-bg:            #e5e5e5;
+
+//** Dropdown link text color.
+$dropdown-link-color:            $gray-dark;
+//** Hover color for dropdown links.
+$dropdown-link-hover-color:      darken($gray-dark, 5%);
+//** Hover background for dropdown links.
+$dropdown-link-hover-bg:         #f5f5f5;
+
+//** Active dropdown menu item text color.
+$dropdown-link-active-color:     $component-active-color;
+//** Active dropdown menu item background color.
+$dropdown-link-active-bg:        $component-active-bg;
+
+//** Disabled dropdown menu item background color.
+$dropdown-link-disabled-color:   $gray-light;
+
+//** Text color for headers within dropdown menus.
+$dropdown-header-color:          $gray-light;
+
+//** Deprecated `$dropdown-caret-color` as of v3.1.0
+$dropdown-caret-color:           #000;
+
+
+//-- Z-index master list
+//
+// Warning: Avoid customizing these values. They're used for a bird's eye view
+// of components dependent on the z-axis and are designed to all work together.
+//
+// Note: These variables are not generated into the Customizer.
+
+$zindex-navbar:            1000;
+$zindex-dropdown:          1000;
+$zindex-popover:           1060;
+$zindex-tooltip:           1070;
+$zindex-navbar-fixed:      1030;
+$zindex-modal-background:  1040;
+$zindex-modal:             1050;
+
+
+//== Media queries breakpoints
+//
+//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
+
+// Extra small screen / phone
+//** Deprecated `$screen-xs` as of v3.0.1
+$screen-xs:                  480px;
+//** Deprecated `$screen-xs-min` as of v3.2.0
+$screen-xs-min:              $screen-xs;
+//** Deprecated `$screen-phone` as of v3.0.1
+$screen-phone:               $screen-xs-min;
+
+// Small screen / tablet
+//** Deprecated `$screen-sm` as of v3.0.1
+$screen-sm:                  768px;
+$screen-sm-min:              $screen-sm;
+//** Deprecated `$screen-tablet` as of v3.0.1
+$screen-tablet:              $screen-sm-min;
+
+// Medium screen / desktop
+//** Deprecated `$screen-md` as of v3.0.1
+$screen-md:                  992px;
+$screen-md-min:              $screen-md;
+//** Deprecated `$screen-desktop` as of v3.0.1
+$screen-desktop:             $screen-md-min;
+
+// Large screen / wide desktop
+//** Deprecated `$screen-lg` as of v3.0.1
+$screen-lg:                  1200px;
+$screen-lg-min:              $screen-lg;
+//** Deprecated `$screen-lg-desktop` as of v3.0.1
+$screen-lg-desktop:          $screen-lg-min;
+
+// So media queries don't overlap when required, provide a maximum
+$screen-xs-max:              ($screen-sm-min - 1);
+$screen-sm-max:              ($screen-md-min - 1);
+$screen-md-max:              ($screen-lg-min - 1);
+
+
+//== Grid system
+//
+//## Define your custom responsive grid.
+
+//** Number of columns in the grid.
+$grid-columns:              12;
+//** Padding between columns. Gets divided in half for the left and right.
+$grid-gutter-width:         30px;
+// Navbar collapse
+//** Point at which the navbar becomes uncollapsed.
+$grid-float-breakpoint:     $screen-sm-min;
+//** Point at which the navbar begins collapsing.
+$grid-float-breakpoint-max: ($grid-float-breakpoint - 1);
+
+
+//== Container sizes
+//
+//## Define the maximum width of `.container` for different screen sizes.
+
+// Small screen / tablet
+$container-tablet:             (720px + $grid-gutter-width);
+//** For `$screen-sm-min` and up.
+$container-sm:                 $container-tablet;
+
+// Medium screen / desktop
+$container-desktop:            (940px + $grid-gutter-width);
+//** For `$screen-md-min` and up.
+$container-md:                 $container-desktop;
+
+// Large screen / wide desktop
+$container-large-desktop:      (1140px + $grid-gutter-width);
+//** For `$screen-lg-min` and up.
+$container-lg:                 $container-large-desktop;
+
+
+//== Navbar
+//
+//##
+
+// Basics of a navbar
+$navbar-height:                    50px;
+$navbar-margin-bottom:             $line-height-computed;
+$navbar-border-radius:             $border-radius-base;
+$navbar-padding-horizontal:        floor(($grid-gutter-width / 2));
+$navbar-padding-vertical:          (($navbar-height - $line-height-computed) / 2);
+$navbar-collapse-max-height:       340px;
+
+$navbar-default-color:             #777;
+$navbar-default-bg:                #f8f8f8;
+$navbar-default-border:            darken($navbar-default-bg, 6.5%);
+
+// Navbar links
+$navbar-default-link-color:                #777;
+$navbar-default-link-hover-color:          #333;
+$navbar-default-link-hover-bg:             transparent;
+$navbar-default-link-active-color:         #555;
+$navbar-default-link-active-bg:            darken($navbar-default-bg, 6.5%);
+$navbar-default-link-disabled-color:       #ccc;
+$navbar-default-link-disabled-bg:          transparent;
+
+// Navbar brand label
+$navbar-default-brand-color:               $navbar-default-link-color;
+$navbar-default-brand-hover-color:         darken($navbar-default-brand-color, 10%);
+$navbar-default-brand-hover-bg:            transparent;
+
+// Navbar toggle
+$navbar-default-toggle-hover-bg:           #ddd;
+$navbar-default-toggle-icon-bar-bg:        #888;
+$navbar-default-toggle-border-color:       #ddd;
+
+
+//=== Inverted navbar
+// Reset inverted navbar basics
+$navbar-inverse-color:                      lighten($gray-light, 15%);
+$navbar-inverse-bg:                         #222;
+$navbar-inverse-border:                     darken($navbar-inverse-bg, 10%);
+
+// Inverted navbar links
+$navbar-inverse-link-color:                 lighten($gray-light, 15%);
+$navbar-inverse-link-hover-color:           #fff;
+$navbar-inverse-link-hover-bg:              transparent;
+$navbar-inverse-link-active-color:          $navbar-inverse-link-hover-color;
+$navbar-inverse-link-active-bg:             darken($navbar-inverse-bg, 10%);
+$navbar-inverse-link-disabled-color:        #444;
+$navbar-inverse-link-disabled-bg:           transparent;
+
+// Inverted navbar brand label
+$navbar-inverse-brand-color:                $navbar-inverse-link-color;
+$navbar-inverse-brand-hover-color:          #fff;
+$navbar-inverse-brand-hover-bg:             transparent;
+
+// Inverted navbar toggle
+$navbar-inverse-toggle-hover-bg:            #333;
+$navbar-inverse-toggle-icon-bar-bg:         #fff;
+$navbar-inverse-toggle-border-color:        #333;
+
+
+//== Navs
+//
+//##
+
+//=== Shared nav styles
+$nav-link-padding:                          10px 15px;
+$nav-link-hover-bg:                         $gray-lighter;
+
+$nav-disabled-link-color:                   $gray-light;
+$nav-disabled-link-hover-color:             $gray-light;
+
+//== Tabs
+$nav-tabs-border-color:                     #ddd;
+
+$nav-tabs-link-hover-border-color:          $gray-lighter;
+
+$nav-tabs-active-link-hover-bg:             $body-bg;
+$nav-tabs-active-link-hover-color:          $gray;
+$nav-tabs-active-link-hover-border-color:   #ddd;
+
+$nav-tabs-justified-link-border-color:            #ddd;
+$nav-tabs-justified-active-link-border-color:     $body-bg;
+
+//== Pills
+$nav-pills-border-radius:                   $border-radius-base;
+$nav-pills-active-link-hover-bg:            $component-active-bg;
+$nav-pills-active-link-hover-color:         $component-active-color;
+
+
+//== Pagination
+//
+//##
+
+$pagination-color:                     $link-color;
+$pagination-bg:                        #fff;
+$pagination-border:                    #ddd;
+
+$pagination-hover-color:               $link-hover-color;
+$pagination-hover-bg:                  $gray-lighter;
+$pagination-hover-border:              #ddd;
+
+$pagination-active-color:              #fff;
+$pagination-active-bg:                 $brand-primary;
+$pagination-active-border:             $brand-primary;
+
+$pagination-disabled-color:            $gray-light;
+$pagination-disabled-bg:               #fff;
+$pagination-disabled-border:           #ddd;
+
+
+//== Pager
+//
+//##
+
+$pager-bg:                             $pagination-bg;
+$pager-border:                         $pagination-border;
+$pager-border-radius:                  15px;
+
+$pager-hover-bg:                       $pagination-hover-bg;
+
+$pager-active-bg:                      $pagination-active-bg;
+$pager-active-color:                   $pagination-active-color;
+
+$pager-disabled-color:                 $pagination-disabled-color;
+
+
+//== Jumbotron
+//
+//##
+
+$jumbotron-padding:              30px;
+$jumbotron-color:                inherit;
+$jumbotron-bg:                   $gray-lighter;
+$jumbotron-heading-color:        inherit;
+$jumbotron-font-size:            ceil(($font-size-base * 1.5));
+$jumbotron-heading-font-size:    ceil(($font-size-base * 4.5));
+
+
+//== Form states and alerts
+//
+//## Define colors for form feedback states and, by default, alerts.
+
+$state-success-text:             #3c763d;
+$state-success-bg:               #dff0d8;
+$state-success-border:           darken(adjust-hue($state-success-bg, -10%), 5%);
+
+$state-info-text:                #31708f;
+$state-info-bg:                  #d9edf7;
+$state-info-border:              darken(adjust-hue($state-info-bg, -10%), 7%);
+
+$state-warning-text:             #8a6d3b;
+$state-warning-bg:               #fcf8e3;
+$state-warning-border:           darken(adjust-hue($state-warning-bg, -10%), 5%);
+
+$state-danger-text:              #a94442;
+$state-danger-bg:                #f2dede;
+$state-danger-border:            darken(adjust-hue($state-danger-bg, -10%), 5%);
+
+
+//== Tooltips
+//
+//##
+
+//** Tooltip max width
+$tooltip-max-width:           200px;
+//** Tooltip text color
+$tooltip-color:               #fff;
+//** Tooltip background color
+$tooltip-bg:                  #000;
+$tooltip-opacity:             .9;
+
+//** Tooltip arrow width
+$tooltip-arrow-width:         5px;
+//** Tooltip arrow color
+$tooltip-arrow-color:         $tooltip-bg;
+
+
+//== Popovers
+//
+//##
+
+//** Popover body background color
+$popover-bg:                          #fff;
+//** Popover maximum width
+$popover-max-width:                   276px;
+//** Popover border color
+$popover-border-color:                rgba(0,0,0,.2);
+//** Popover fallback border color
+$popover-fallback-border-color:       #ccc;
+
+//** Popover title background color
+$popover-title-bg:                    darken($popover-bg, 3%);
+
+//** Popover arrow width
+$popover-arrow-width:                 10px;
+//** Popover arrow color
+$popover-arrow-color:                 $popover-bg;
+
+//** Popover outer arrow width
+$popover-arrow-outer-width:           ($popover-arrow-width + 1);
+//** Popover outer arrow color
+$popover-arrow-outer-color:           fadein($popover-border-color, 5%);
+//** Popover outer arrow fallback color
+$popover-arrow-outer-fallback-color:  darken($popover-fallback-border-color, 20%);
+
+
+//== Labels
+//
+//##
+
+//** Default label background color
+$label-default-bg:            $gray-light;
+//** Primary label background color
+$label-primary-bg:            $brand-primary;
+//** Success label background color
+$label-success-bg:            $brand-success;
+//** Info label background color
+$label-info-bg:               $brand-info;
+//** Warning label background color
+$label-warning-bg:            $brand-warning;
+//** Danger label background color
+$label-danger-bg:             $brand-danger;
+
+//** Default label text color
+$label-color:                 #fff;
+//** Default text color of a linked label
+$label-link-hover-color:      #fff;
+
+
+//== Modals
+//
+//##
+
+//** Padding applied to the modal body
+$modal-inner-padding:         15px;
+
+//** Padding applied to the modal title
+$modal-title-padding:         15px;
+//** Modal title line-height
+$modal-title-line-height:     $line-height-base;
+
+//** Background color of modal content area
+$modal-content-bg:                             #fff;
+//** Modal content border color
+$modal-content-border-color:                   rgba(0,0,0,.2);
+//** Modal content border color **for IE8**
+$modal-content-fallback-border-color:          #999;
+
+//** Modal backdrop background color
+$modal-backdrop-bg:           #000;
+//** Modal backdrop opacity
+$modal-backdrop-opacity:      .5;
+//** Modal header border color
+$modal-header-border-color:   #e5e5e5;
+//** Modal footer border color
+$modal-footer-border-color:   $modal-header-border-color;
+
+$modal-lg:                    900px;
+$modal-md:                    600px;
+$modal-sm:                    300px;
+
+
+//== Alerts
+//
+//## Define alert colors, border radius, and padding.
+
+$alert-padding:               15px;
+$alert-border-radius:         $border-radius-base;
+$alert-link-font-weight:      bold;
+
+$alert-success-bg:            $state-success-bg;
+$alert-success-text:          $state-success-text;
+$alert-success-border:        $state-success-border;
+
+$alert-info-bg:               $state-info-bg;
+$alert-info-text:             $state-info-text;
+$alert-info-border:           $state-info-border;
+
+$alert-warning-bg:            $state-warning-bg;
+$alert-warning-text:          $state-warning-text;
+$alert-warning-border:        $state-warning-border;
+
+$alert-danger-bg:             $state-danger-bg;
+$alert-danger-text:           $state-danger-text;
+$alert-danger-border:         $state-danger-border;
+
+
+//== Progress bars
+//
+//##
+
+//** Background color of the whole progress component
+$progress-bg:                 #f5f5f5;
+//** Progress bar text color
+$progress-bar-color:          #fff;
+//** Variable for setting rounded corners on progress bar.
+$progress-border-radius:      $border-radius-base;
+
+//** Default progress bar color
+$progress-bar-bg:             $brand-primary;
+//** Success progress bar color
+$progress-bar-success-bg:     $brand-success;
+//** Warning progress bar color
+$progress-bar-warning-bg:     $brand-warning;
+//** Danger progress bar color
+$progress-bar-danger-bg:      $brand-danger;
+//** Info progress bar color
+$progress-bar-info-bg:        $brand-info;
+
+
+//== List group
+//
+//##
+
+//** Background color on `.list-group-item`
+$list-group-bg:                 #fff;
+//** `.list-group-item` border color
+$list-group-border:             #ddd;
+//** List group border radius
+$list-group-border-radius:      $border-radius-base;
+
+//** Background color of single list items on hover
+$list-group-hover-bg:           #f5f5f5;
+//** Text color of active list items
+$list-group-active-color:       $component-active-color;
+//** Background color of active list items
+$list-group-active-bg:          $component-active-bg;
+//** Border color of active list elements
+$list-group-active-border:      $list-group-active-bg;
+//** Text color for content within active list items
+$list-group-active-text-color:  lighten($list-group-active-bg, 40%);
+
+//** Text color of disabled list items
+$list-group-disabled-color:      $gray-light;
+//** Background color of disabled list items
+$list-group-disabled-bg:         $gray-lighter;
+//** Text color for content within disabled list items
+$list-group-disabled-text-color: $list-group-disabled-color;
+
+$list-group-link-color:         #555;
+$list-group-link-hover-color:   $list-group-link-color;
+$list-group-link-heading-color: #333;
+
+
+//== Panels
+//
+//##
+
+$panel-bg:                    #fff;
+$panel-body-padding:          15px;
+$panel-heading-padding:       10px 15px;
+$panel-footer-padding:        $panel-heading-padding;
+$panel-border-radius:         $border-radius-base;
+
+//** Border color for elements within panels
+$panel-inner-border:          #ddd;
+$panel-footer-bg:             #f5f5f5;
+
+$panel-default-text:          $gray-dark;
+$panel-default-border:        #ddd;
+$panel-default-heading-bg:    #f5f5f5;
+
+$panel-primary-text:          #fff;
+$panel-primary-border:        $brand-primary;
+$panel-primary-heading-bg:    $brand-primary;
+
+$panel-success-text:          $state-success-text;
+$panel-success-border:        $state-success-border;
+$panel-success-heading-bg:    $state-success-bg;
+
+$panel-info-text:             $state-info-text;
+$panel-info-border:           $state-info-border;
+$panel-info-heading-bg:       $state-info-bg;
+
+$panel-warning-text:          $state-warning-text;
+$panel-warning-border:        $state-warning-border;
+$panel-warning-heading-bg:    $state-warning-bg;
+
+$panel-danger-text:           $state-danger-text;
+$panel-danger-border:         $state-danger-border;
+$panel-danger-heading-bg:     $state-danger-bg;
+
+
+//== Thumbnails
+//
+//##
+
+//** Padding around the thumbnail image
+$thumbnail-padding:           4px;
+//** Thumbnail background color
+$thumbnail-bg:                $body-bg;
+//** Thumbnail border color
+$thumbnail-border:            #ddd;
+//** Thumbnail border radius
+$thumbnail-border-radius:     $border-radius-base;
+
+//** Custom text color for thumbnail captions
+$thumbnail-caption-color:     $text-color;
+//** Padding around the thumbnail caption
+$thumbnail-caption-padding:   9px;
+
+
+//== Wells
+//
+//##
+
+$well-bg:                     #f5f5f5;
+$well-border:                 darken($well-bg, 7%);
+
+
+//== Badges
+//
+//##
+
+$badge-color:                 #fff;
+//** Linked badge text color on hover
+$badge-link-hover-color:      #fff;
+$badge-bg:                    $gray-light;
+
+//** Badge text color in active nav link
+$badge-active-color:          $link-color;
+//** Badge background color in active nav link
+$badge-active-bg:             #fff;
+
+$badge-font-weight:           bold;
+$badge-line-height:           1;
+$badge-border-radius:         10px;
+
+
+//== Breadcrumbs
+//
+//##
+
+$breadcrumb-padding-vertical:   8px;
+$breadcrumb-padding-horizontal: 15px;
+//** Breadcrumb background color
+$breadcrumb-bg:                 #f5f5f5;
+//** Breadcrumb text color
+$breadcrumb-color:              #ccc;
+//** Text color of current page in the breadcrumb
+$breadcrumb-active-color:       $gray-light;
+//** Textual separator for between breadcrumb elements
+$breadcrumb-separator:          "/";
+
+
+//== Carousel
+//
+//##
+
+$carousel-text-shadow:                        0 1px 2px rgba(0,0,0,.6);
+
+$carousel-control-color:                      #fff;
+$carousel-control-width:                      15%;
+$carousel-control-opacity:                    .5;
+$carousel-control-font-size:                  20px;
+
+$carousel-indicator-active-bg:                #fff;
+$carousel-indicator-border-color:             #fff;
+
+$carousel-caption-color:                      #fff;
+
+
+//== Close
+//
+//##
+
+$close-font-weight:           bold;
+$close-color:                 #000;
+$close-text-shadow:           0 1px 0 #fff;
+
+
+//== Code
+//
+//##
+
+$code-color:                  #c7254e;
+$code-bg:                     #f9f2f4;
+
+$kbd-color:                   #fff;
+$kbd-bg:                      #333;
+
+$pre-bg:                      #f5f5f5;
+$pre-color:                   $gray-dark;
+$pre-border-color:            #ccc;
+$pre-scrollable-max-height:   340px;
+
+
+//== Type
+//
+//##
+
+//** Horizontal offset for forms and lists.
+$component-offset-horizontal: 180px;
+//** Text muted color
+$text-muted:                  $gray-light;
+//** Abbreviations and acronyms border color
+$abbr-border-color:           $gray-light;
+//** Headings small color
+$headings-small-color:        $gray-light;
+//** Blockquote small color
+$blockquote-small-color:      $gray-light;
+//** Blockquote font size
+$blockquote-font-size:        ($font-size-base * 1.25);
+//** Blockquote border color
+$blockquote-border-color:     $gray-lighter;
+//** Page header border color
+$page-header-border-color:    $gray-lighter;
+//** Width of horizontal description list titles
+$dl-horizontal-offset:        $component-offset-horizontal;
+//** Point at which .dl-horizontal becomes horizontal
+$dl-horizontal-breakpoint:    $grid-float-breakpoint;
+//** Horizontal line color.
+$hr-border:                   $gray-lighter;
diff --git a/js/tabulator/src/scss/semantic-ui/tabulator_semantic-ui.scss b/js/tabulator/src/scss/semantic-ui/tabulator_semantic-ui.scss
new file mode 100644
index 0000000..7b44d75
--- /dev/null
+++ b/js/tabulator/src/scss/semantic-ui/tabulator_semantic-ui.scss
@@ -0,0 +1,1056 @@
+
+@import "variables_table.scss";
+
+
+
+//Main Theme Variables
+$backgroundColor: $background; //background color of tabulator
+$textSize:14px; //table text size
+
+//header themeing
+$headerBackgroundColor:$headerBackground; //border to tablulator
+$headerTextColor:$headerColor; //header text colour
+$headerBorderColor:#ddd;  //header border color
+$headerSeperatorColor:#999; //header bottom seperator color
+$headerMargin:4px; //padding round header
+
+//column header arrows
+$sortArrowActive: #666;
+$sortArrowInactive: #bbb;
+
+//row themeing
+$rowBorderColor:#ddd; //table border color
+$rowTextColor:#333; //table text color
+
+$rowSelectedBackground: #9ABCEA; //row background color when selected
+$rowSelectedBackgroundHover: #769BCC;//row background color when selected and hovered
+
+
+$editBoxColor:#1D68CD; //border color for edit boxes
+$errorColor:#dd0000; //error indication
+
+//footer themeing
+$footerBackgroundColor:#fff; //border to tablulator
+$footerTextColor:#555; //footer text colour
+$footerBorderColor:#aaa; //footer border color
+$footerSeperatorColor:#999; //footer bottom seperator color
+
+
+
+//Tabulator Containing Element
+.tabulator{
+	position: relative;
+	background-color: $backgroundColor;
+	overflow:hidden;
+	font-size:$textSize;
+	text-align: left;
+	width: 100%;
+
+	margin: $margin;
+	border: $border;
+	box-shadow: $boxShadow;
+	border-radius: $borderRadius;
+	color: $color;
+
+	-webkit-transform: translatez(0);
+	-moz-transform: translatez(0);
+	-ms-transform: translatez(0);
+	-o-transform: translatez(0);
+	transform: translatez(0);
+
+	&[tabulator-layout="fitDataFill"]{
+		.tabulator-tableHolder{
+			.tabulator-table{
+				min-width:100%;
+			}
+		}
+	}
+
+	&.tabulator-block-select{
+		user-select: none;
+	}
+
+	//column header containing element
+	.tabulator-header{
+		position:relative;
+		box-sizing: border-box;
+
+		width:100%;
+
+		border-bottom: $headerBorder;
+		background-color: $headerBackgroundColor;
+
+		box-shadow: $headerBoxShadow;
+
+		color: $headerTextColor;
+		font-style: $headerFontStyle;
+		font-weight: $headerFontWeight;
+		text-transform: $headerTextTransform;
+
+		white-space: nowrap;
+		overflow:hidden;
+
+		-moz-user-select: none;
+		-khtml-user-select: none;
+		-webkit-user-select: none;
+		-o-user-select: none;
+
+		//individual column header element
+		.tabulator-col{
+			display:inline-block;
+
+			position:relative;
+			box-sizing:border-box;
+			// border-right: $headerDivider;
+			background-color: $headerBackgroundColor;
+			text-align:left;
+			vertical-align: bottom;
+			overflow: hidden;
+
+			&.tabulator-moving{
+				position: absolute;
+				border:1px solid  $headerSeperatorColor;
+				background:darken($headerBackgroundColor, 10%);
+				pointer-events: none;
+			}
+
+			//hold content of column header
+			.tabulator-col-content{
+				position: relative;
+				padding: $headerVerticalPadding $headerHorizontalPadding;
+
+				//hold title of column header
+				.tabulator-col-title{
+					box-sizing:border-box;
+					width: 100%;
+
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					vertical-align:bottom;
+
+					//element to hold title editor
+					.tabulator-title-editor{
+						box-sizing: border-box;
+						width: 100%;
+
+						border:1px solid #999;
+
+						padding:1px;
+
+						background: #fff;
+					}
+				}
+
+				//column sorter arrow
+				.tabulator-arrow{
+					display: inline-block;
+					position: absolute;
+					top:18px;
+					right:8px;
+					width: 0;
+					height: 0;
+					border-left: 6px solid transparent;
+					border-right: 6px solid transparent;
+					border-bottom: 6px solid $sortArrowInactive;
+				}
+
+			}
+
+			//complex header column group
+			&.tabulator-col-group{
+
+				//gelement to hold sub columns in column group
+				.tabulator-col-group-cols{
+					position:relative;
+					display: flex;
+
+					border-top:1px solid $headerBorderColor;
+					overflow: hidden;
+
+					.tabulator-col:last-child{
+						margin-right:-1px;
+					}
+				}
+			}
+
+
+			//hide left resize handle on first column
+			&:first-child{
+				.tabulator-col-resize-handle.prev{
+					display: none;
+				}
+			}
+
+			//placeholder element for sortable columns
+			&.ui-sortable-helper{
+				position: absolute;
+				background-color:darken($headerBackgroundColor, 10%) !important;
+				border:1px solid $headerBorderColor;
+			}
+
+			//header filter containing element
+			.tabulator-header-filter{
+				position: relative;
+				box-sizing: border-box;
+				margin-top:2px;
+				width:100%;
+				text-align: center;
+
+				//styling adjustment for inbuilt editors
+				textarea{
+					height:auto !important;
+				}
+
+				svg{
+					margin-top: 3px;
+				}
+			}
+
+
+			//styling child elements for sortable columns
+			&.tabulator-sortable{
+				.tabulator-col-title{
+					padding-right:25px;
+				}
+
+				&:hover{
+					cursor:pointer;
+					background-color:darken($headerBackgroundColor, 10%);
+				}
+
+				&[aria-sort="none"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowInactive;
+					}
+				}
+
+				&[aria-sort="asc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowActive;
+					}
+				}
+
+				&[aria-sort="desc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: 6px solid $sortArrowActive;
+						border-bottom: none;
+					}
+				}
+			}
+
+		}
+
+		.tabulator-frozen{
+			display: inline-block;
+			position: absolute;
+
+			// background-color: inherit;
+
+			z-index: 10;
+
+			&.tabulator-frozen-left{
+				border-right:2px solid $rowBorderColor;
+			}
+
+			&.tabulator-frozen-right{
+				border-left:2px solid $rowBorderColor;
+			}
+		}
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			min-width:200%;
+
+			background:lighten($headerBackgroundColor, 5%) !important;
+
+			.tabulator-row{
+				background:lighten($headerBackgroundColor, 5%) !important;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+			}
+
+			border-top:1px solid $rowBorderColor;
+			border-bottom:1px solid $headerBorderColor;
+
+			overflow: hidden;
+		}
+	}
+
+
+
+	//scrolling element to hold table
+	.tabulator-tableHolder{
+		position:relative;
+		width:100%;
+		white-space: nowrap;
+		overflow:auto;
+		-webkit-overflow-scrolling: touch;
+
+		&:focus{
+			outline: none;
+		}
+
+		//default placeholder element
+		.tabulator-placeholder{
+			position: absolute;
+			box-sizing:border-box;
+			display: flex;
+			align-items:center;
+
+			top:0;
+			left:0;
+			height:100%;
+			width:100%;
+
+			span{
+				display: inline-block;
+
+				margin:0 auto;
+				padding:10px;
+
+				color:#000;
+				font-weight: bold;
+				font-size: 20px;
+			}
+		}
+
+		//element to hold table rows
+		.tabulator-table{
+			position:relative;
+			display:inline-block;
+			white-space: nowrap;
+			overflow:visible;
+			color:$rowTextColor;
+
+			.tabulator-row{
+				&.tabulator-calcs{
+					font-weight: bold;
+					background:darken($background, 5%) !important;
+
+					&.tabulator-calcs-top{
+						border-bottom:2px solid $rowBorderColor;
+					}
+
+					&.tabulator-calcs-bottom{
+						border-top:2px solid $rowBorderColor;
+					}
+				}
+			}
+		}
+	}
+
+	//row element
+	.tabulator-row{
+		position: relative;
+		box-sizing: border-box;
+
+		min-height:$textSize + ($headerMargin * 2);
+		border-bottom: $rowBorder;
+
+		&.tabulator-selectable:hover{
+			box-shadow: $activeBoxShadow;
+			background: $activeBackgroundColor !important;
+			color: $activeColor !important;
+			cursor: pointer;
+		}
+
+		&.tabulator-selected{
+			background-color:$rowSelectedBackground;
+		}
+
+		&.tabulator-selected:hover{
+			background-color:$rowSelectedBackgroundHover;
+			cursor: pointer;
+		}
+
+		&.tabulator-moving{
+			position: absolute;
+
+			border-top:1px solid  $rowBorderColor;
+			border-bottom:1px solid  $rowBorderColor;
+
+			pointer-events: none !important;
+			z-index:15;
+		}
+
+		.tabulator-frozen{
+			display: inline-block;
+			position: absolute;
+
+			background-color: inherit;
+
+			z-index: 10;
+
+			&.tabulator-frozen-left{
+				border-right:2px solid $rowBorderColor;
+			}
+
+			&.tabulator-frozen-right{
+				border-left:2px solid $rowBorderColor;
+			}
+		}
+
+		//cell element
+		.tabulator-cell{
+			display:inline-block;
+			position: relative;
+			box-sizing:border-box;
+			padding: $cellVerticalPadding $cellHorizontalPadding;
+			// border-right:1px solid $rowBorderColor;
+			vertical-align:middle;
+			white-space:nowrap;
+			overflow:hidden;
+			text-overflow:ellipsis;
+
+			&:last-of-type{
+				border-right: none;
+			}
+
+			&.tabulator-editing{
+				border:1px solid  $editBoxColor;
+				padding: 0;
+
+				input, select{
+					border:1px;
+					background:transparent;
+				}
+			}
+
+			&.tabulator-validation-fail{
+				border:1px solid $errorColor;
+				input, select{
+					border:1px;
+					background:transparent;
+
+					color: $errorColor;
+				}
+			}
+
+			//hide left resize handle on first column
+			&:first-child{
+				.tabulator-col-resize-handle.prev{
+					display: none;
+				}
+			}
+
+			//movable row handle
+			&.tabulator-row-handle{
+
+				display: inline-flex;
+				align-items:center;
+
+				-moz-user-select: none;
+				-khtml-user-select: none;
+				-webkit-user-select: none;
+				-o-user-select: none;
+
+				//handle holder
+				.tabulator-row-handle-box{
+					width:80%;
+
+					//Hamburger element
+					.tabulator-row-handle-bar{
+						width:100%;
+						height:3px;
+						margin:2px 10% 0 10%;
+						background:#666;
+					}
+				}
+			}
+		}
+
+		//row grouping element
+		&.tabulator-group{
+
+			box-sizing:border-box;
+			border-bottom:1px solid #999;
+			border-right:1px solid $rowBorderColor;
+			border-top:1px solid #999;
+			padding:5px;
+			padding-left:10px;
+			background:#fafafa;
+			font-weight:bold;
+
+			min-width: 100%;
+
+			&:hover{
+				cursor:pointer;
+				background-color:rgba(0,0,0,.1);
+			}
+
+			&.tabulator-group-visible{
+				.tabulator-arrow{
+					margin-right:10px;
+					border-left: 6px solid transparent;
+					border-right: 6px solid transparent;
+					border-top: 6px solid $sortArrowActive;
+					border-bottom: 0;
+				}
+			}
+
+			&.tabulator-group-level-1{
+				.tabulator-arrow{
+					margin-left:20px;
+				}
+			}
+
+			&.tabulator-group-level-2{
+				.tabulator-arrow{
+					margin-left:40px;
+				}
+			}
+
+			&.tabulator-group-level-3{
+				.tabulator-arrow{
+					margin-left:60px;
+				}
+			}
+
+			&.tabulator-group-level-4{
+				.tabulator-arrow{
+					margin-left:80px;
+				}
+			}
+
+			&.tabulator-group-level-5{
+				.tabulator-arrow{
+					margin-left:1000px;
+				}
+			}
+
+			//sorting arrow
+			.tabulator-arrow{
+				display: inline-block;
+				width: 0;
+				height: 0;
+				margin-right:16px;
+				border-top: 6px solid transparent;
+				border-bottom: 6px solid transparent;
+				border-right: 0;
+				border-left: 6px solid $sortArrowActive;
+				vertical-align:middle;
+			}
+
+			span{
+				margin-left:10px;
+				color:#666;
+			}
+		}
+	}
+
+	//column resize handles
+	.tabulator-col-resize-handle{
+		position:absolute;
+		right:0;
+		top:0;
+		bottom:0;
+		width:5px;
+
+		&.prev{
+			left:0;
+			right:auto;
+		}
+
+		&:hover{
+			cursor:ew-resize;
+		}
+	}
+
+
+	//footer element
+	.tabulator-footer{
+		padding: $footerVerticalPadding $footerHorizontalPadding;
+
+		border-top: $footerBorder;
+		box-shadow: $footerBoxShadow;
+
+		background: $footerBackground;
+
+
+		text-align:right;
+		color: $footerColor;
+
+		font-style: $footerFontStyle;
+		font-weight: $footerFontWeight;
+		text-transform: $footerTextTransform;
+
+		white-space:nowrap;
+		user-select:none;
+
+		-moz-user-select: none;
+		-khtml-user-select: none;
+		-webkit-user-select: none;
+		-o-user-select: none;
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			width:calc("100% + 20px");
+			margin:(-$footerVerticalPadding) (-$footerHorizontalPadding) $footerVerticalPadding (-$footerHorizontalPadding);
+
+			text-align: left;
+
+			background:lighten($footerBackground, 5%) !important;
+
+			.tabulator-row{
+				font-weight: bold;
+				background:lighten($footerBackground, 5%) !important;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+			}
+
+			border-bottom:1px solid $rowBorderColor;
+			border-top:1px solid $rowBorderColor;
+
+			overflow: hidden;
+
+			&:only-child{
+				margin-bottom:-$footerVerticalPadding;
+				border-bottom:none;
+			}
+		}
+
+		//pagination container element
+		.tabulator-pages{
+			margin:0 7px;
+		}
+
+		//pagination button
+		.tabulator-page{
+			display:inline-block;
+			margin:0 2px;
+			border:1px solid $footerBorderColor;
+			border-radius:3px;
+			padding:2px 5px;
+			background:rgba(255,255,255,.2);
+			color: $footerTextColor;
+			font-family:inherit;
+			font-weight:inherit;
+			font-size:inherit;
+
+			&.active{
+				color:#d00;
+			}
+
+			&:disabled{
+				opacity:.5;
+			}
+
+			&:not(.disabled){
+				&:hover{
+					cursor:pointer;
+					background:rgba(0,0,0,.2);
+					color:#fff;
+				}
+			}
+		}
+	}
+
+	//holding div that contains loader and covers tabulator element to prevent interaction
+	.tablulator-loader{
+		position:absolute;
+		display: flex;
+		align-items:center;
+
+		top:0;
+		left:0;
+		z-index:100;
+
+		height:100%;
+		width:100%;
+		background:rgba(0,0,0,.4);
+		text-align:center;
+
+		//loading message element
+		.tabulator-loader-msg{
+			display:inline-block;
+
+			margin:0 auto;
+			padding:10px 20px;
+
+			border-radius:10px;
+
+			background:#fff;
+			font-weight:bold;
+			font-size:16px;
+
+			//loading message
+			&.tabulator-loading{
+				border:4px solid #333;
+				color:#000;
+			}
+
+			//error message
+			&.tabulator-error{
+				border:4px solid #D00;
+				color:#590000;
+			}
+		}
+	}
+
+
+	//Semantic-ui theming classes
+
+	.tabulator-tableHolder{
+		.tabulator-table{
+			.tabulator-row{
+				&.positive, .tabulator-cell.positive{
+					box-shadow: $positiveBoxShadow;
+					background: $positiveBackgroundColor !important;
+					color: $positiveColor !important;
+
+					&:hover{
+						background: $positiveBackgroundHover !important;
+						color: $positiveColorHover !important;
+					}
+				}
+
+				&.negative, .tabulator-cell.negative{
+					box-shadow: $negativeBoxShadow;
+					background: $negativeBackgroundColor !important;
+					color: $negativeColor !important;
+
+					&:hover{
+						background: $negativeBackgroundHover !important;
+						color: $negativeColorHover !important;
+					}
+				}
+
+				&.error, .tabulator-cell.error{
+					box-shadow: $errorBoxShadow;
+					background: $errorBackgroundColor !important;
+					color: $errorColor !important;
+
+					&:hover{
+						background: $errorBackgroundHover !important;
+						color: $errorColorHover !important;
+					}
+				}
+
+				&.warning, .tabulator-cell.warning{
+					box-shadow: $warningBoxShadow;
+					background: $warningBackgroundColor !important;
+					color: $warningColor !important;
+
+					&:hover{
+						background: $warningBackgroundHover !important;
+						color: $warningColorHover !important;
+					}
+				}
+
+				&.active, .tabulator-cell.active{
+					box-shadow: $activeBoxShadow;
+					background: $activeBackgroundColor !important;
+					color: $activeColor !important;
+
+					&:hover{
+						background: $positiveBackgroundHover !important;
+						color: $positiveColorHover !important;
+					}
+				}
+
+				&.active, &.disabled:hover, .tabulator-cell.active{
+					pointer-events: none;
+					color: $disabledTextColor;
+				}
+			}
+		}
+	}
+
+
+	&.inverted{
+
+		background: $invertedBackground;
+		color: $invertedCellColor;
+		border: $invertedBorder;
+
+		.tabulator-header{
+			background-color: $invertedHeaderBackground;
+			border-color: $invertedHeaderBorderColor !important;
+			color: $invertedHeaderColor;
+
+			.tabulator-col{
+				border-color: $invertedCellBorderColor !important;
+			}
+		}
+
+		.tabulator-tableHolder{
+			.tabulator-table{
+				.tabulator-row{
+					color: $invertedCellColor;
+					border: $invertedBorder;
+
+					.tabulator-cell{
+						border-color: $invertedCellBorderColor !important;
+					}
+				}
+			}
+		}
+
+		.tabulator-footer{
+			background: $definitionPageBackground;
+		}
+	}
+
+	&.striped{
+		.tabulator-tableHolder{
+			.tabulator-table{
+				.tabulator-row{
+					&:nth-child(even){
+						background-color: $basicTableStripedBackground !important;
+					}
+				}
+			}
+		}
+	}
+
+	&.celled{
+		border:1px solid $borderColor;
+
+		.tabulator-header{
+			.tabulator-col{
+				border-right:$cellBorder;
+			}
+		}
+
+		.tabulator-tableHolder{
+			.tabulator-table{
+				.tabulator-row{
+					.tabulator-cell{
+						border-right:$cellBorder;
+					}
+				}
+			}
+		}
+
+	}
+
+
+	&[class*="single line"]{
+		.tabulator-tableHolder{
+			.tabulator-table{
+				.tabulator-row{
+					.tabulator-cell{
+						border-right:none;
+					}
+				}
+			}
+		}
+	}
+
+	//coloured table varients
+	/* Red */
+	&.red {
+		border-top: $coloredBorderSize solid $red;
+	}
+	&.inverted.red {
+		background-color: $red !important;
+		color: $white !important;
+	}
+
+	/* Orange */
+	&.orange {
+		border-top: $coloredBorderSize solid $orange;
+	}
+	&.inverted.orange {
+		background-color: $orange !important;
+		color: $white !important;
+	}
+
+	/* Yellow */
+	&.yellow {
+		border-top: $coloredBorderSize solid $yellow;
+	}
+	&.inverted.yellow {
+		background-color: $yellow !important;
+		color: $white !important;
+	}
+
+	/* Olive */
+	&.olive {
+		border-top: $coloredBorderSize solid $olive;
+	}
+	&.inverted.olive {
+		background-color: $olive !important;
+		color: $white !important;
+	}
+
+	/* Green */
+	&.green {
+		border-top: $coloredBorderSize solid $green;
+	}
+	&.inverted.green {
+		background-color: $green !important;
+		color: $white !important;
+	}
+
+	/* Teal */
+	&.teal {
+		border-top: $coloredBorderSize solid $teal;
+	}
+	&.inverted.teal {
+		background-color: $teal !important;
+		color: $white !important;
+	}
+
+	/* Blue */
+	&.blue {
+		border-top: $coloredBorderSize solid $blue;
+	}
+	&.inverted.blue {
+		background-color: $blue !important;
+		color: $white !important;
+	}
+
+	/* Violet */
+	&.violet {
+		border-top: $coloredBorderSize solid $violet;
+	}
+	&.inverted.violet {
+		background-color: $violet !important;
+		color: $white !important;
+	}
+
+	/* Purple */
+	&.purple {
+		border-top: $coloredBorderSize solid $purple;
+	}
+	&.inverted.purple {
+		background-color: $purple !important;
+		color: $white !important;
+	}
+
+	/* Pink */
+	&.pink {
+		border-top: $coloredBorderSize solid $pink;
+	}
+	&.inverted.pink {
+		background-color: $pink !important;
+		color: $white !important;
+	}
+
+	/* Brown */
+	&.brown {
+		border-top: $coloredBorderSize solid $brown;
+	}
+	&.inverted.brown {
+		background-color: $brown !important;
+		color: $white !important;
+	}
+
+	/* Grey */
+	&.grey {
+		border-top: $coloredBorderSize solid $grey;
+	}
+	&.inverted.grey {
+		background-color: $grey !important;
+		color: $white !important;
+	}
+
+	/* Black */
+	&.black {
+		border-top: $coloredBorderSize solid $black;
+	}
+	&.inverted.black {
+		background-color: $black !important;
+		color: $white !important;
+	}
+
+	&.padded{
+		.tabulator-header{
+			.tabulator-col{
+				.tabulator-col-content{
+					padding: $paddedVerticalPadding $paddedHorizontalPadding;
+
+					.tabulator-arrow{
+						top:20px;
+					}
+				}
+			}
+		}
+		.tabulator-tableHolder{
+			.tabulator-table{
+				.tabulator-row{
+					.tabulator-cell{
+						padding: $paddedVerticalPadding $paddedHorizontalPadding;
+					}
+				}
+			}
+		}
+
+		&.very{
+			.tabulator-header{
+				.tabulator-col{
+					.tabulator-col-content{
+						padding: $veryPaddedVerticalPadding $veryPaddedHorizontalPadding;
+
+						.tabulator-arrow{
+							top:26px;
+						}
+					}
+				}
+			}
+			.tabulator-tableHolder{
+				.tabulator-table{
+					.tabulator-row{
+						.tabulator-cell{
+							padding: $veryPaddedVerticalPadding $veryPaddedHorizontalPadding;
+						}
+					}
+				}
+			}
+		}
+	}
+
+	&.compact{
+		.tabulator-header{
+			.tabulator-col{
+				.tabulator-col-content{
+					padding: $compactVerticalPadding $compactHorizontalPadding;
+
+					.tabulator-arrow{
+						top:12px;
+					}
+				}
+			}
+		}
+		.tabulator-tableHolder{
+			.tabulator-table{
+				.tabulator-row{
+					.tabulator-cell{
+						padding: $compactVerticalPadding $compactHorizontalPadding;
+					}
+				}
+			}
+		}
+
+		&.very{
+			.tabulator-header{
+				.tabulator-col{
+					.tabulator-col-content{
+						padding: $veryCompactVerticalPadding $veryCompactHorizontalPadding;
+
+						.tabulator-arrow{
+							top:10px;
+						}
+					}
+				}
+			}
+			.tabulator-tableHolder{
+				.tabulator-table{
+					.tabulator-row{
+						.tabulator-cell{
+							padding: $veryCompactVerticalPadding $veryCompactHorizontalPadding;
+						}
+					}
+				}
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/js/tabulator/src/scss/semantic-ui/variables.scss b/js/tabulator/src/scss/semantic-ui/variables.scss
new file mode 100644
index 0000000..b0e4724
--- /dev/null
+++ b/js/tabulator/src/scss/semantic-ui/variables.scss
@@ -0,0 +1,830 @@
+
+
+/*******************************
+         Site Settings
+*******************************/
+
+/*-------------------
+       Fonts
+--------------------*/
+
+$fontName          : 'Lato';
+$fontSmoothing     : antialiased;
+
+$headerFont        : $fontName, 'Helvetica Neue', Arial, Helvetica, sans-serif;
+$pageFont          : $fontName, 'Helvetica Neue', Arial, Helvetica, sans-serif;
+
+$googleFontName    : $fontName;
+$importGoogleFonts : true;
+$googleFontSizes   : '400,700,400italic,700italic';
+$googleSubset      : 'latin';
+
+$googleProtocol    : 'https://';
+$googleFontRequest : '${googleFontName}:${googleFontSizes}&subset=${googleSubset}';
+
+/*-------------------
+      Base Sizes
+--------------------*/
+
+/* This is the single variable that controls them all */
+$emSize   : 14px;
+
+/* The size of page text  */
+$fontSize : 14px;
+
+/*-------------------
+  Exact Pixel Values
+--------------------*/
+/*
+  These are used to specify exact pixel values in em
+  for things like borders that remain constantly
+  sized as emSize adjusts
+
+  Since there are many more sizes than names for sizes,
+  these are named by their original pixel values.
+
+*/
+
+
+$a1px  : (1 / $emSize) + rem;
+$a4px  : (4 / $emSize) + rem;
+$a11px  : (11 / $emSize) + rem;
+$a14px  : (14 / $emSize) + rem;
+
+$relative1px  : (1 / $emSize) + em;
+$relative4px  : (4 / $emSize) + em;
+$relative11px  : (11 / $emSize) + em;
+$relative14px  : (14 / $emSize) + em;
+
+
+
+/*-------------------
+    Border Radius
+--------------------*/
+
+/* See Power-user section below
+   for explanation of $px variables
+*/
+$relativeBorderRadius: $relative4px;
+$absoluteBorderRadius: $a4px;
+
+$defaultBorderRadius: $absoluteBorderRadius;
+
+
+
+/*-------------------
+      Site Colors
+--------------------*/
+
+/*---  Colors  ---*/
+$red              : #DB2828;
+$orange           : #F2711C;
+$yellow           : #FBBD08;
+$olive            : #B5CC18;
+$green            : #21BA45;
+$teal             : #00B5AD;
+$blue             : #2185D0;
+$violet           : #6435C9;
+$purple           : #A333C8;
+$pink             : #E03997;
+$brown            : #A5673F;
+$grey             : #767676;
+$black            : #1B1C1D;
+
+/*---  Light Colors  ---*/
+$lightRed         : #FF695E;
+$lightOrange      : #FF851B;
+$lightYellow      : #FFE21F;
+$lightOlive       : #D9E778;
+$lightGreen       : #2ECC40;
+$lightTeal        : #6DFFFF;
+$lightBlue        : #54C8FF;
+$lightViolet      : #A291FB;
+$lightPurple      : #DC73FF;
+$lightPink        : #FF8EDF;
+$lightBrown       : #D67C1C;
+$lightGrey        : #DCDDDE;
+$lightBlack       : #545454;
+
+/*---   Neutrals  ---*/
+$fullBlack        : #000000;
+$offWhite         : #F9FAFB;
+$darkWhite        : #F3F4F5;
+$midWhite         : #DCDDDE;
+$white            : #FFFFFF;
+
+/*--- Colored Backgrounds ---*/
+$redBackground    : #FFE8E6;
+$orangeBackground : #FFEDDE;
+$yellowBackground : #FFF8DB;
+$oliveBackground  : #FBFDEF;
+$greenBackground  : #E5F9E7;
+$tealBackground   : #E1F7F7;
+$blueBackground   : #DFF0FF;
+$violetBackground : #EAE7FF;
+$purpleBackground : #F6E7FF;
+$pinkBackground   : #FFE3FB;
+$brownBackground  : #F1E2D3;
+
+/*--- Colored Text ---*/
+$redTextColor    : $red;
+$orangeTextColor : $orange;
+$yellowTextColor : #B58105; // Yellow text is difficult to read
+$oliveTextColor  : #8ABC1E; // Olive is difficult to read
+$greenTextColor  : #1EBC30; // Green is difficult to read
+$tealTextColor   : #10A3A3; // Teal text is difficult to read
+$blueTextColor   : $blue;
+$violetTextColor : $violet;
+$purpleTextColor : $purple;
+$pinkTextColor   : $pink;
+$brownTextColor  : $brown;
+
+/*--- Colored Headers ---*/
+$redHeaderColor    : darken($redTextColor, 5);
+$oliveHeaderColor  : darken($oliveTextColor, 5);
+$greenHeaderColor  : darken($greenTextColor, 5);
+$yellowHeaderColor : darken($yellowTextColor, 5);
+$blueHeaderColor   : darken($blueTextColor, 5);
+$tealHeaderColor   : darken($tealTextColor, 5);
+$pinkHeaderColor   : darken($pinkTextColor, 5);
+$violetHeaderColor : darken($violetTextColor, 5);
+$purpleHeaderColor : darken($purpleTextColor, 5);
+$orangeHeaderColor : darken($orangeTextColor, 5);
+$brownHeaderColor  : darken($brownTextColor, 5);
+
+/*--- Colored Border ---*/
+$redBorderColor    : $redTextColor;
+$orangeBorderColor : $orangeTextColor;
+$yellowBorderColor : $yellowTextColor;
+$oliveBorderColor  : $oliveTextColor;
+$greenBorderColor  : $greenTextColor;
+$tealBorderColor   : $tealTextColor;
+$blueBorderColor   : $blueTextColor;
+$violetBorderColor : $violetTextColor;
+$purpleBorderColor : $purpleTextColor;
+$pinkBorderColor   : $pinkTextColor;
+$brownBorderColor  : $brownTextColor;
+
+/*-------------------
+     Alpha Colors
+--------------------*/
+
+$subtleTransparentBlack     : rgba(0, 0, 0, 0.03);
+$transparentBlack           : rgba(0, 0, 0, 0.05);
+$strongTransparentBlack     : rgba(0, 0, 0, 0.10);
+$veryStrongTransparentBlack : rgba(0, 0, 0, 0.15);
+
+$subtleTransparentWhite     : rgba(255, 255, 255, 0.02);
+$transparentWhite           : rgba(255, 255, 255, 0.08);
+$strongTransparentWhite     : rgba(255, 255, 255, 0.15);
+
+
+
+/*-------------------
+    Brand Colors
+--------------------*/
+
+$primaryColor        : $blue;
+$secondaryColor      : $black;
+
+$lightPrimaryColor   : $lightBlue;
+$lightSecondaryColor : $lightBlack;
+
+/*--------------
+  Page Heading
+---------------*/
+
+$headerFontWeight : bold;
+$headerLineHeight : (18 / 14) * 1em;
+
+$h1 : (28 / 14) * 1rem;
+$h2 : (24 / 14) * 1rem;
+$h3 : (18 / 14) * 1rem;
+$h4 : (15 / 14) * 1rem;
+$h5 : (14 / 14) * 1rem;
+
+
+/*-------------------
+        Page
+--------------------*/
+
+$pageBackground      : #FFFFFF;
+$pageOverflowX       : hidden;
+
+$lineHeight          : 1.4285em;
+$textColor           : rgba(0, 0, 0, 0.87);
+
+
+/*--------------
+   Form Input
+---------------*/
+
+/* This adjusts the default form input across all elements */
+$inputBackground        : $white;
+$inputVerticalPadding   : $relative11px;
+$inputHorizontalPadding : $relative14px;
+$inputPadding           : $inputVerticalPadding $inputHorizontalPadding;
+
+/* Input Text Color */
+$inputColor: $textColor;
+$inputPlaceholderColor: lighten($inputColor, 75);
+$inputPlaceholderFocusColor: lighten($inputColor, 45);
+
+/* Line Height Default For Inputs in Browser (Descendors are 17px at 14px base em) */
+$inputLineHeight: (17 / 14) * 1em;
+
+/*-------------------
+    Focused Input
+--------------------*/
+
+/* Used on inputs, textarea etc */
+$focusedFormBorderColor: #85B7D9;
+
+/* Used on dropdowns, other larger blocks */
+$focusedFormMutedBorderColor: #96C8DA;
+
+/*-------------------
+        Sizes
+--------------------*/
+
+/*
+  Sizes are all expressed in terms of 14px/em (default em)
+  This ensures these "ratios" remain constant despite changes in EM
+*/
+
+$miniSize        : (11 / 14);
+$tinySize        : (12 / 14);
+$smallSize       : (13 / 14);
+$mediumSize      : (14 / 14);
+$largeSize       : (16 / 14);
+$bigSize         : (18 / 14);
+$hugeSize        : (20 / 14);
+$massiveSize     : (24 / 14);
+
+
+/*-------------------
+      Paragraph
+--------------------*/
+
+$paragraphMargin     : 0em 0em 1em;
+$paragraphLineHeight : $lineHeight;
+
+/*-------------------
+       Links
+--------------------*/
+
+$linkColor           : #4183C4;
+$linkUnderline       : none;
+$linkHoverColor      : darken(saturate($linkColor, 20), 15);
+$linkHoverUnderline  : $linkUnderline;
+
+/*-------------------
+  Highlighted Text
+--------------------*/
+
+$highlightBackground      : #CCE2FF;
+$highlightColor           : $textColor;
+
+$inputHighlightBackground : rgba(100, 100, 100, 0.4);
+$inputHighlightColor      : $textColor;
+
+/*-------------------
+       Em Sizes
+--------------------*/
+
+/*
+  This rounds $size values to the closest pixel then expresses that value in (r)em.
+  This ensures all size values round to exact pixels
+*/
+$mini            : (round($miniSize * $emSize) / $emSize) * 1rem;
+$tiny            : (round($tinySize * $emSize) / $emSize) * 1rem;
+$small           : (round($smallSize * $emSize) / $emSize) * 1rem;
+$medium          : (round($mediumSize * $emSize) / $emSize) * 1rem;
+$large           : (round($largeSize * $emSize) / $emSize) * 1rem;
+$big             : (round($bigSize * $emSize) / $emSize) * 1rem;
+$huge            : (round($hugeSize * $emSize) / $emSize) * 1rem;
+$massive         : (round($massiveSize * $emSize) / $emSize) * 1rem;
+
+/* em */
+$relativeMini    : (round($miniSize * $emSize) / $emSize) * 1em;
+$relativeTiny    : (round($tinySize * $emSize) / $emSize) * 1em;
+$relativeSmall   : (round($smallSize * $emSize) / $emSize) * 1em;
+$relativeMedium  : (round($mediumSize * $emSize) / $emSize) * 1em;
+$relativeLarge   : (round($largeSize * $emSize) / $emSize) * 1em;
+$relativeBig     : (round($bigSize * $emSize) / $emSize) * 1em;
+$relativeHuge    : (round($hugeSize * $emSize) / $emSize) * 1em;
+$relativeMassive : (round($massiveSize * $emSize) / $emSize) * 1em;
+
+/* rem */
+$absoluteMini    : (round($miniSize * $emSize) / $emSize) * 1rem;
+$absoluteTiny    : (round($tinySize * $emSize) / $emSize) * 1rem;
+$absoluteSmall   : (round($smallSize * $emSize) / $emSize) * 1rem;
+$absoluteMedium  : (round($mediumSize * $emSize) / $emSize) * 1rem;
+$absoluteLarge   : (round($largeSize * $emSize) / $emSize) * 1rem;
+$absoluteBig     : (round($bigSize * $emSize) / $emSize) * 1rem;
+$absoluteHuge    : (round($hugeSize * $emSize) / $emSize) * 1rem;
+$absoluteMassive : (round($massiveSize * $emSize) / $emSize) * 1rem;
+
+
+/*-------------------
+       Loader
+--------------------*/
+
+$loaderSize              : $relativeBig;
+$loaderSpeed             : 0.6s;
+$loaderLineWidth         : 0.2em;
+$loaderFillColor         : rgba(0, 0, 0, 0.1);
+$loaderLineColor         : $grey;
+
+$invertedLoaderFillColor : rgba(255, 255, 255, 0.15);
+$invertedLoaderLineColor : $white;
+
+/*-------------------
+        Grid
+--------------------*/
+
+$columnCount: 16;
+
+/*-------------------
+     Transitions
+--------------------*/
+
+$defaultDuration : 0.1s;
+$defaultEasing   : ease;
+
+/*-------------------
+     Breakpoints
+--------------------*/
+
+$mobileBreakpoint            : 320px;
+$tabletBreakpoint            : 768px;
+$computerBreakpoint          : 992px;
+$largeMonitorBreakpoint      : 1200px;
+$widescreenMonitorBreakpoint : 1920px;
+
+
+
+/* Columns */
+$oneWide        : (1 / $columnCount * 100%);
+$twoWide        : (2 / $columnCount * 100%);
+$threeWide      : (3 / $columnCount * 100%);
+$fourWide       : (4 / $columnCount * 100%);
+$fiveWide       : (5 / $columnCount * 100%);
+$sixWide        : (6 / $columnCount * 100%);
+$sevenWide      : (7 / $columnCount * 100%);
+$eightWide      : (8 / $columnCount * 100%);
+$nineWide       : (9 / $columnCount * 100%);
+$tenWide        : (10 / $columnCount * 100%);
+$elevenWide     : (11 / $columnCount * 100%);
+$twelveWide     : (12 / $columnCount * 100%);
+$thirteenWide   : (13 / $columnCount * 100%);
+$fourteenWide   : (14 / $columnCount * 100%);
+$fifteenWide    : (15 / $columnCount * 100%);
+$sixteenWide    : (16 / $columnCount * 100%);
+
+$oneColumn      : (1 / 1 * 100%);
+$twoColumn      : (1 / 2 * 100%);
+$threeColumn    : (1 / 3 * 100%);
+$fourColumn     : (1 / 4 * 100%);
+$fiveColumn     : (1 / 5 * 100%);
+$sixColumn      : (1 / 6 * 100%);
+$sevenColumn    : (1 / 7 * 100%);
+$eightColumn    : (1 / 8 * 100%);
+$nineColumn     : (1 / 9 * 100%);
+$tenColumn      : (1 / 10 * 100%);
+$elevenColumn   : (1 / 11 * 100%);
+$twelveColumn   : (1 / 12 * 100%);
+$thirteenColumn : (1 / 13 * 100%);
+$fourteenColumn : (1 / 14 * 100%);
+$fifteenColumn  : (1 / 15 * 100%);
+$sixteenColumn  : (1 / 16 * 100%);
+
+
+/*******************************
+           Power-User
+*******************************/
+
+
+/*-------------------
+    Emotive Colors
+--------------------*/
+
+/* Positive */
+$positiveColor           : $green;
+$positiveBackgroundColor : #FCFFF5;
+$positiveBorderColor     : #A3C293;
+$positiveHeaderColor     : #1A531B;
+$positiveTextColor       : #2C662D;
+
+/* Negative */
+$negativeColor           : $red;
+$negativeBackgroundColor : #FFF6F6;
+$negativeBorderColor     : #E0B4B4;
+$negativeHeaderColor     : #912D2B;
+$negativeTextColor       : #9F3A38;
+
+/* Info */
+$infoColor              : #31CCEC;
+$infoBackgroundColor    : #F8FFFF;
+$infoBorderColor        : #A9D5DE;
+$infoHeaderColor        : #0E566C;
+$infoTextColor          : #276F86;
+
+/* Warning */
+$warningColor           : #F2C037;
+$warningBorderColor     : #C9BA9B;
+$warningBackgroundColor : #FFFAF3;
+$warningHeaderColor     : #794B02;
+$warningTextColor       : #573A08;
+
+/*-------------------
+        Paths
+--------------------*/
+
+/* For source only. Modified in gulp for dist */
+$imagePath : '../../themes/default/assets/images';
+$fontPath  : '../../themes/default/assets/fonts';
+
+
+/*-------------------
+       Icons
+--------------------*/
+
+/* Maximum Glyph Width of Icon */
+$iconWidth : 1.18em;
+
+/*-------------------
+     Neutral Text
+--------------------*/
+
+$darkTextColor               : rgba(0, 0, 0, 0.85);
+$mutedTextColor              : rgba(0, 0, 0, 0.6);
+$lightTextColor              : rgba(0, 0, 0, 0.4);
+
+$unselectedTextColor         : rgba(0, 0, 0, 0.4);
+$hoveredTextColor            : rgba(0, 0, 0, 0.8);
+$pressedTextColor            : rgba(0, 0, 0, 0.9);
+$selectedTextColor           : rgba(0, 0, 0, 0.95);
+$disabledTextColor           : rgba(0, 0, 0, 0.2);
+
+$invertedTextColor           : rgba(255, 255, 255, 0.9);
+$invertedMutedTextColor      : rgba(255, 255, 255, 0.8);
+$invertedLightTextColor      : rgba(255, 255, 255, 0.7);
+$invertedUnselectedTextColor : rgba(255, 255, 255, 0.5);
+$invertedHoveredTextColor    : rgba(255, 255, 255, 1);
+$invertedPressedTextColor    : rgba(255, 255, 255, 1);
+$invertedSelectedTextColor   : rgba(255, 255, 255, 1);
+$invertedDisabledTextColor   : rgba(255, 255, 255, 0.2);
+
+/*-------------------
+     Brand Colors
+--------------------*/
+
+$facebookColor   : #3B5998;
+$twitterColor    : #55ACEE;
+$googlePlusColor : #DD4B39;
+$linkedInColor   : #1F88BE;
+$youtubeColor    : #CC181E;
+$pinterestColor  : #BD081C;
+$vkColor         : #4D7198;
+$instagramColor  : #49769C;
+
+/*-------------------
+      Borders
+--------------------*/
+
+$circularRadius                : 500rem;
+
+$borderColor               : rgba(34, 36, 38, 0.15);
+$strongBorderColor         : rgba(34, 36, 38, 0.22);
+$internalBorderColor       : rgba(34, 36, 38, 0.1);
+$selectedBorderColor       : rgba(34, 36, 38, 0.35);
+$strongSelectedBorderColor : rgba(34, 36, 38, 0.5);
+$disabledBorderColor       : rgba(34, 36, 38, 0.5);
+
+$solidInternalBorderColor  : #FAFAFA;
+$solidBorderColor          : #D4D4D5;
+$solidSelectedBorderColor  : #BCBDBD;
+
+$whiteBorderColor              : rgba(255, 255, 255, 0.1);
+$selectedWhiteBorderColor      : rgba(255, 255, 255, 0.8);
+
+$solidWhiteBorderColor         : #555555;
+$selectedSolidWhiteBorderColor : #999999;
+
+/*-------------------
+       Accents
+--------------------*/
+
+/* Differentiating Neutrals */
+$subtleGradient: linear-gradient(transparent, $transparentBlack);
+
+/* Differentiating Layers */
+$subtleShadow:
+  0px 1px 2px 0 $borderColor
+;
+$floatingShadow:
+  0px 2px 4px 0px rgba(34, 36, 38, 0.12),
+  0px 2px 10px 0px rgba(34, 36, 38, 0.15)
+;
+
+
+/*-------------------
+    Derived Values
+--------------------*/
+
+/* Loaders Position Offset */
+$loaderOffset : -($loaderSize / 2);
+$loaderMargin : $loaderOffset 0em 0em $loaderOffset;
+
+/* Rendered Scrollbar Width */
+$scrollbarWidth: 17px;
+
+/* Maximum Single Character Glyph Width, aka Capital "W" */
+$glyphWidth: 1.1em;
+
+/* Used to match floats with text */
+$lineHeightOffset       : (($lineHeight - 1em) / 2);
+$headerLineHeightOffset : ($headerLineHeight - 1em) / 2;
+
+/* Header Spacing */
+$headerTopMargin    : calc(2rem - #{$headerLineHeightOffset});
+$headerBottomMargin : 1rem;
+$headerMargin       : $headerTopMargin 0em $headerBottomMargin;
+
+/* Minimum Mobile Width */
+$pageMinWidth       : 320px;
+
+/* Positive / Negative Dupes */
+$successBackgroundColor : $positiveBackgroundColor;
+$successColor           : $positiveColor;
+$successBorderColor     : $positiveBorderColor;
+$successHeaderColor     : $positiveHeaderColor;
+$successTextColor       : $positiveTextColor;
+
+$errorBackgroundColor   : $negativeBackgroundColor;
+$errorColor             : $negativeColor;
+$errorBorderColor       : $negativeBorderColor;
+$errorHeaderColor       : $negativeHeaderColor;
+$errorTextColor         : $negativeTextColor;
+
+
+/* Responsive */
+$largestMobileScreen : ($tabletBreakpoint - 1px);
+$largestTabletScreen : ($computerBreakpoint - 1px);
+$largestSmallMonitor : ($largeMonitorBreakpoint - 1px);
+$largestLargeMonitor : ($widescreenMonitorBreakpoint - 1px);
+
+
+
+/*******************************
+             States
+*******************************/
+
+/*-------------------
+      Disabled
+--------------------*/
+
+$disabledOpacity: 0.45;
+$disabledTextColor: rgba(40, 40, 40, 0.3);
+$invertedDisabledTextColor: rgba(225, 225, 225, 0.3);
+
+/*-------------------
+        Hover
+--------------------*/
+
+/*---  Shadows  ---*/
+$floatingShadowHover:
+  0px 2px 4px 0px rgba(34, 36, 38, 0.15),
+  0px 2px 10px 0px rgba(34, 36, 38, 0.25)
+;
+
+/*---  Colors  ---*/
+$primaryColorHover    : saturate(darken($primaryColor, 5), 10);
+$secondaryColorHover  : saturate(lighten($secondaryColor, 5), 10);
+
+$redHover             : saturate(darken($red, 5), 10);
+$orangeHover          : saturate(darken($orange, 5), 10);
+$yellowHover          : saturate(darken($yellow, 5), 10);
+$oliveHover           : saturate(darken($olive, 5), 10);
+$greenHover           : saturate(darken($green, 5), 10);
+$tealHover            : saturate(darken($teal, 5), 10);
+$blueHover            : saturate(darken($blue, 5), 10);
+$violetHover          : saturate(darken($violet, 5), 10);
+$purpleHover          : saturate(darken($purple, 5), 10);
+$pinkHover            : saturate(darken($pink, 5), 10);
+$brownHover           : saturate(darken($brown, 5), 10);
+
+$lightRedHover        : saturate(darken($lightRed, 5), 10);
+$lightOrangeHover     : saturate(darken($lightOrange, 5), 10);
+$lightYellowHover     : saturate(darken($lightYellow, 5), 10);
+$lightOliveHover      : saturate(darken($lightOlive, 5), 10);
+$lightGreenHover      : saturate(darken($lightGreen, 5), 10);
+$lightTealHover       : saturate(darken($lightTeal, 5), 10);
+$lightBlueHover       : saturate(darken($lightBlue, 5), 10);
+$lightVioletHover     : saturate(darken($lightViolet, 5), 10);
+$lightPurpleHover     : saturate(darken($lightPurple, 5), 10);
+$lightPinkHover       : saturate(darken($lightPink, 5), 10);
+$lightBrownHover      : saturate(darken($lightBrown, 5), 10);
+$lightGreyHover       : saturate(darken($lightGrey, 5), 10);
+$lightBlackHover      : saturate(darken($fullBlack, 5), 10);
+
+/*---  Emotive  ---*/
+$positiveColorHover   : saturate(darken($positiveColor, 5), 10);
+$negativeColorHover   : saturate(darken($negativeColor, 5), 10);
+
+/*---  Brand   ---*/
+$facebookHoverColor   : saturate(darken($facebookColor, 5), 10);
+$twitterHoverColor    : saturate(darken($twitterColor, 5), 10);
+$googlePlusHoverColor : saturate(darken($googlePlusColor, 5), 10);
+$linkedInHoverColor   : saturate(darken($linkedInColor, 5), 10);
+$youtubeHoverColor    : saturate(darken($youtubeColor, 5), 10);
+$instagramHoverColor  : saturate(darken($instagramColor, 5), 10);
+$pinterestHoverColor  : saturate(darken($pinterestColor, 5), 10);
+$vkHoverColor         : saturate(darken($vkColor, 5), 10);
+
+/*---  Dark Tones  ---*/
+$fullBlackHover       : lighten($fullBlack, 5);
+$blackHover           : lighten($black, 5);
+$greyHover            : lighten($grey, 5);
+
+/*---  Light Tones  ---*/
+$whiteHover           : darken($white, 5);
+$offWhiteHover        : darken($offWhite, 5);
+$darkWhiteHover       : darken($darkWhite, 5);
+
+/*-------------------
+        Focus
+--------------------*/
+
+/*---  Colors  ---*/
+$primaryColorFocus    : saturate(darken($primaryColor, 8), 20);
+$secondaryColorFocus  : saturate(lighten($secondaryColor, 8), 20);
+
+$redFocus             : saturate(darken($red, 8), 20);
+$orangeFocus          : saturate(darken($orange, 8), 20);
+$yellowFocus          : saturate(darken($yellow, 8), 20);
+$oliveFocus           : saturate(darken($olive, 8), 20);
+$greenFocus           : saturate(darken($green, 8), 20);
+$tealFocus            : saturate(darken($teal, 8), 20);
+$blueFocus            : saturate(darken($blue, 8), 20);
+$violetFocus          : saturate(darken($violet, 8), 20);
+$purpleFocus          : saturate(darken($purple, 8), 20);
+$pinkFocus            : saturate(darken($pink, 8), 20);
+$brownFocus           : saturate(darken($brown, 8), 20);
+
+$lightRedFocus        : saturate(darken($lightRed, 8), 20);
+$lightOrangeFocus     : saturate(darken($lightOrange, 8), 20);
+$lightYellowFocus     : saturate(darken($lightYellow, 8), 20);
+$lightOliveFocus      : saturate(darken($lightOlive, 8), 20);
+$lightGreenFocus      : saturate(darken($lightGreen, 8), 20);
+$lightTealFocus       : saturate(darken($lightTeal, 8), 20);
+$lightBlueFocus       : saturate(darken($lightBlue, 8), 20);
+$lightVioletFocus     : saturate(darken($lightViolet, 8), 20);
+$lightPurpleFocus     : saturate(darken($lightPurple, 8), 20);
+$lightPinkFocus       : saturate(darken($lightPink, 8), 20);
+$lightBrownFocus      : saturate(darken($lightBrown, 8), 20);
+$lightGreyFocus       : saturate(darken($lightGrey, 8), 20);
+$lightBlackFocus      : saturate(darken($fullBlack, 8), 20);
+
+/*---  Emotive  ---*/
+$positiveColorFocus   : saturate(darken($positiveColor, 8), 20);
+$negativeColorFocus   : saturate(darken($negativeColor, 8), 20);
+
+/*---  Brand   ---*/
+$facebookFocusColor   : saturate(darken($facebookColor, 8), 20);
+$twitterFocusColor    : saturate(darken($twitterColor, 8), 20);
+$googlePlusFocusColor : saturate(darken($googlePlusColor, 8), 20);
+$linkedInFocusColor   : saturate(darken($linkedInColor, 8), 20);
+$youtubeFocusColor    : saturate(darken($youtubeColor, 8), 20);
+$instagramFocusColor  : saturate(darken($instagramColor, 8), 20);
+$pinterestFocusColor  : saturate(darken($pinterestColor, 8), 20);
+$vkFocusColor         : saturate(darken($vkColor, 8), 20);
+
+/*---  Dark Tones  ---*/
+$fullBlackFocus       : lighten($fullBlack, 8);
+$blackFocus           : lighten($black, 8);
+$greyFocus            : lighten($grey, 8);
+
+/*---  Light Tones  ---*/
+$whiteFocus           : darken($white, 8);
+$offWhiteFocus        : darken($offWhite, 8);
+$darkWhiteFocus       : darken($darkWhite, 8);
+
+
+/*-------------------
+    Down (:active)
+--------------------*/
+
+/*---  Colors  ---*/
+$primaryColorDown    : darken($primaryColor, 10);
+$secondaryColorDown  : lighten($secondaryColor, 10);
+
+$redDown             : darken($red, 10);
+$orangeDown          : darken($orange, 10);
+$yellowDown          : darken($yellow, 10);
+$oliveDown           : darken($olive, 10);
+$greenDown           : darken($green, 10);
+$tealDown            : darken($teal, 10);
+$blueDown            : darken($blue, 10);
+$violetDown          : darken($violet, 10);
+$purpleDown          : darken($purple, 10);
+$pinkDown            : darken($pink, 10);
+$brownDown           : darken($brown, 10);
+
+$lightRedDown        : darken($lightRed, 10);
+$lightOrangeDown     : darken($lightOrange, 10);
+$lightYellowDown     : darken($lightYellow, 10);
+$lightOliveDown      : darken($lightOlive, 10);
+$lightGreenDown      : darken($lightGreen, 10);
+$lightTealDown       : darken($lightTeal, 10);
+$lightBlueDown       : darken($lightBlue, 10);
+$lightVioletDown     : darken($lightViolet, 10);
+$lightPurpleDown     : darken($lightPurple, 10);
+$lightPinkDown       : darken($lightPink, 10);
+$lightBrownDown      : darken($lightBrown, 10);
+$lightGreyDown       : darken($lightGrey, 10);
+$lightBlackDown      : darken($fullBlack, 10);
+
+/*---  Emotive  ---*/
+$positiveColorDown   : darken($positiveColor, 10);
+$negativeColorDown   : darken($negativeColor, 10);
+
+/*---  Brand   ---*/
+$facebookDownColor   : darken($facebookColor, 10);
+$twitterDownColor    : darken($twitterColor, 10);
+$googlePlusDownColor : darken($googlePlusColor, 10);
+$linkedInDownColor   : darken($linkedInColor, 10);
+$youtubeDownColor    : darken($youtubeColor, 10);
+$instagramDownColor  : darken($instagramColor, 10);
+$pinterestDownColor  : darken($pinterestColor, 10);
+$vkDownColor         : darken($vkColor, 10);
+
+/*---  Dark Tones  ---*/
+$fullBlackDown       : lighten($fullBlack, 10);
+$blackDown           : lighten($black, 10);
+$greyDown            : lighten($grey, 10);
+
+/*---  Light Tones  ---*/
+$whiteDown           : darken($white, 10);
+$offWhiteDown        : darken($offWhite, 10);
+$darkWhiteDown       : darken($darkWhite, 10);
+
+
+/*-------------------
+        Active
+--------------------*/
+
+/*---  Colors  ---*/
+$primaryColorActive    : saturate(darken($primaryColor, 5), 15);
+$secondaryColorActive  : saturate(lighten($secondaryColor, 5), 15);
+
+$redActive             : saturate(darken($red, 5), 15);
+$orangeActive          : saturate(darken($orange, 5), 15);
+$yellowActive          : saturate(darken($yellow, 5), 15);
+$oliveActive           : saturate(darken($olive, 5), 15);
+$greenActive           : saturate(darken($green, 5), 15);
+$tealActive            : saturate(darken($teal, 5), 15);
+$blueActive            : saturate(darken($blue, 5), 15);
+$violetActive          : saturate(darken($violet, 5), 15);
+$purpleActive          : saturate(darken($purple, 5), 15);
+$pinkActive            : saturate(darken($pink, 5), 15);
+$brownActive           : saturate(darken($brown, 5), 15);
+
+$lightRedActive        : saturate(darken($lightRed, 5), 15);
+$lightOrangeActive     : saturate(darken($lightOrange, 5), 15);
+$lightYellowActive     : saturate(darken($lightYellow, 5), 15);
+$lightOliveActive      : saturate(darken($lightOlive, 5), 15);
+$lightGreenActive      : saturate(darken($lightGreen, 5), 15);
+$lightTealActive       : saturate(darken($lightTeal, 5), 15);
+$lightBlueActive       : saturate(darken($lightBlue, 5), 15);
+$lightVioletActive     : saturate(darken($lightViolet, 5), 15);
+$lightPurpleActive     : saturate(darken($lightPurple, 5), 15);
+$lightPinkActive       : saturate(darken($lightPink, 5), 15);
+$lightBrownActive      : saturate(darken($lightBrown, 5), 15);
+$lightGreyActive       : saturate(darken($lightGrey, 5), 15);
+$lightBlackActive      : saturate(darken($fullBlack, 5), 15);
+
+/*---  Emotive  ---*/
+$positiveColorActive   : saturate(darken($positiveColor, 5), 15);
+$negativeColorActive   : saturate(darken($negativeColor, 5), 15);
+
+/*---  Brand   ---*/
+$facebookActiveColor   : saturate(darken($facebookColor, 5), 15);
+$twitterActiveColor    : saturate(darken($twitterColor, 5), 15);
+$googlePlusActiveColor : saturate(darken($googlePlusColor, 5), 15);
+$linkedInActiveColor   : saturate(darken($linkedInColor, 5), 15);
+$youtubeActiveColor    : saturate(darken($youtubeColor, 5), 15);
+$instagramActiveColor  : saturate(darken($instagramColor, 5), 15);
+$pinterestActiveColor  : saturate(darken($pinterestColor, 5), 15);
+$vkActiveColor         : saturate(darken($vkColor, 5), 15);
+
+/*---  Dark Tones  ---*/
+$fullBlackActive       : darken($fullBlack, 5);
+$blackActive           : darken($black, 5);
+$greyActive            : darken($grey, 5);
+
+/*---  Light Tones  ---*/
+$whiteActive           : darken($white, 5);
+$offWhiteActive        : darken($offWhite, 5);
+$darkWhiteActive       : darken($darkWhite, 5);
diff --git a/js/tabulator/src/scss/semantic-ui/variables_table.scss b/js/tabulator/src/scss/semantic-ui/variables_table.scss
new file mode 100644
index 0000000..6022dc4
--- /dev/null
+++ b/js/tabulator/src/scss/semantic-ui/variables_table.scss
@@ -0,0 +1,248 @@
+@import "variables.scss";
+
+/*******************************
+             Table
+*******************************/
+
+/*-------------------
+       Element
+--------------------*/
+
+$verticalMargin: 1em;
+$horizontalMargin: 0em;
+$margin: $verticalMargin $horizontalMargin;
+$borderCollapse: separate;
+$borderSpacing: 0px;
+$borderRadius: $defaultBorderRadius;
+$transition:
+  background $defaultDuration $defaultEasing,
+  color $defaultDuration $defaultEasing
+;
+$background: $white;
+$color: $textColor;
+$borderWidth: 1px;
+$border: $borderWidth solid $borderColor;
+$boxShadow: none;
+$textAlign: left;
+
+/*--------------
+     Parts
+---------------*/
+
+/* Table Row */
+$rowBorder: 1px solid $internalBorderColor;
+
+/* Table Cell */
+$cellVerticalPadding: $relativeMini;
+$cellHorizontalPadding: $relativeMini;
+$cellVerticalAlign: inherit;
+$cellTextAlign: inherit;
+$cellBorder: 1px solid $internalBorderColor;
+
+/* Table Header */
+$headerBorder: 1px solid $internalBorderColor;
+$headerDivider: none;
+$headerBackground: $offWhite;
+$headerAlign: inherit;
+$headerVerticalAlign: inherit;
+$headerColor: $textColor;
+$headerVerticalPadding: $relativeSmall;
+$headerHorizontalPadding: $cellHorizontalPadding;
+$headerFontStyle: none;
+$headerFontWeight: bold;
+$headerTextTransform: none;
+$headerBoxShadow: none;
+
+/* Table Footer */
+$footerBoxShadow: none;
+$footerBorder: 1px solid $borderColor;
+$footerDivider: none;
+$footerBackground: $offWhite;
+$footerAlign: inherit;
+$footerVerticalAlign: middle;
+$footerColor: $textColor;
+$footerVerticalPadding: $cellVerticalPadding;
+$footerHorizontalPadding: $cellHorizontalPadding;
+$footerFontStyle: normal;
+$footerFontWeight: normal;
+$footerTextTransform: none;
+
+/* Responsive Size */
+$responsiveHeaderDisplay: block;
+$responsiveFooterDisplay: block;
+$responsiveRowVerticalPadding: 1em;
+$responsiveRowBoxShadow: 0px -1px 0px 0px rgba(0, 0, 0, 0.1) inset !important;
+$responsiveCellVerticalPadding: 0.25em;
+$responsiveCellHorizontalPadding: 0.75em;
+$responsiveCellBoxShadow: none !important;
+
+/*-------------------
+       Types
+--------------------*/
+
+/* Definition */
+$definitionPageBackground: $white;
+
+$definitionHeaderBackground: transparent;
+$definitionHeaderColor: $unselectedTextColor;
+$definitionHeaderFontWeight: normal;
+
+$definitionFooterBackground: $definitionHeaderBackground;
+$definitionFooterColor: $definitionHeaderColor;
+$definitionFooterFontWeight: $definitionHeaderFontWeight;
+
+$definitionColumnBackground: $subtleTransparentBlack;
+$definitionColumnFontWeight: bold;
+$definitionColumnColor: $selectedTextColor;
+$definitionColumnFontSize: $relativeMedium;
+$definitionColumnTextTransform: '';
+$definitionColumnBoxShadow: '';
+$definitionColumnTextAlign: '';
+$definitionColumnHorizontalPadding: '';
+
+
+/*--------------
+    Couplings
+---------------*/
+
+$iconVerticalAlign: baseline;
+
+/*--------------
+     States
+---------------*/
+
+$stateMarkerWidth: 0px;
+
+/* Positive */
+$positiveColor: $positiveTextColor;
+$positiveBoxShadow: $stateMarkerWidth 0px 0px $positiveBorderColor inset;
+$positiveBackgroundHover: darken($positiveBackgroundColor, 3);
+$positiveColorHover: darken($positiveColor, 3);
+
+/* Negative */
+$negativeColor: $negativeTextColor;
+$negativeBoxShadow: $stateMarkerWidth 0px 0px $negativeBorderColor inset;
+$negativeBackgroundHover: darken($negativeBackgroundColor, 3);
+$negativeColorHover: darken($negativeColor, 3);
+
+/* Error */
+$errorColor: $errorTextColor;
+$errorBoxShadow: $stateMarkerWidth 0px 0px $errorBorderColor inset;
+$errorBackgroundHover: darken($errorBackgroundColor, 3);
+$errorColorHover: darken($errorColor, 3);
+
+/* Warning */
+$warningColor: $warningTextColor;
+$warningBoxShadow: $stateMarkerWidth 0px 0px $warningBorderColor inset;
+$warningBackgroundHover: darken($warningBackgroundColor, 3);
+$warningColorHover: darken($warningColor, 3);
+
+/* Active */
+$activeColor: $textColor;
+$activeBackgroundColor: #E0E0E0;
+$activeBoxShadow: $stateMarkerWidth 0px 0px $activeColor inset;
+
+$activeBackgroundHover: #EFEFEF;
+$activeColorHover: $selectedTextColor;
+
+/*--------------
+     Types
+---------------*/
+
+/* Attached */
+$attachedTopOffset: 0px;
+$attachedBottomOffset: 0px;
+$attachedHorizontalOffset: -$borderWidth;
+$attachedWidth: calc(100% + #{$attachedHorizontalOffset * -2});
+$attachedBoxShadow: none;
+$attachedBorder: $borderWidth solid $solidBorderColor;
+$attachedBottomBoxShadow:
+  $boxShadow,
+  $attachedBoxShadow
+;
+
+/* Striped */
+$stripedBackground: rgba(0, 0, 50, 0.02);
+$invertedStripedBackground: rgba(255, 255, 255, 0.05);
+
+/* Selectable */
+$selectableBackground: $transparentBlack;
+$selectableTextColor: $selectedTextColor;
+$selectableInvertedBackground: $transparentWhite;
+$selectableInvertedTextColor: $invertedSelectedTextColor;
+
+/* Sortable */
+$sortableBackground: '';
+$sortableColor: $textColor;
+
+$sortableBorder: 1px solid $borderColor;
+$sortableIconWidth: auto;
+$sortableIconDistance: 0.5em;
+$sortableIconOpacity: 0.8;
+$sortableIconFont: 'Icons';
+$sortableIconAscending: '\f0d8';
+$sortableIconDescending: '\f0d7';
+$sortableDisabledColor: $disabledTextColor;
+
+$sortableHoverBackground: $transparentBlack;
+$sortableHoverColor: $hoveredTextColor;
+
+$sortableActiveBackground: $transparentBlack;
+$sortableActiveColor: $selectedTextColor;
+
+$sortableActiveHoverBackground: $transparentBlack;
+$sortableActiveHoverColor: $selectedTextColor;
+
+$sortableInvertedBorderColor: transparent;
+$sortableInvertedHoverBackground: $transparentWhite $subtleGradient;
+$sortableInvertedHoverColor: $invertedHoveredTextColor;
+$sortableInvertedActiveBackground: $strongTransparentWhite $subtleGradient;
+$sortableInvertedActiveColor: $invertedSelectedTextColor;
+
+/* Colors */
+$coloredBorderSize: 0.2em;
+$coloredBorderRadius: 0em 0em $borderRadius $borderRadius;
+
+/* Inverted */
+$invertedBackground: #333333;
+$invertedBorder: none;
+$invertedCellBorderColor: $whiteBorderColor;
+$invertedCellColor: $invertedTextColor;
+
+$invertedHeaderBackground: $veryStrongTransparentBlack;
+$invertedHeaderColor: $invertedTextColor;
+$invertedHeaderBorderColor: $invertedCellBorderColor;
+
+$invertedDefinitionColumnBackground: $subtleTransparentWhite;
+$invertedDefinitionColumnColor: $invertedSelectedTextColor;
+$invertedDefinitionColumnFontWeight: bold;
+
+/* Basic */
+$basicTableBackground: transparent;
+$basicTableBorder: $borderWidth solid $borderColor;
+$basicBoxShadow: none;
+
+$basicTableHeaderBackground: transparent;
+$basicTableCellBackground: transparent;
+$basicTableHeaderDivider: none;
+$basicTableCellBorder: 1px solid rgba(0, 0, 0, 0.1);
+$basicTableCellPadding: '';
+$basicTableStripedBackground: $transparentBlack;
+
+/* Padded */
+$paddedVerticalPadding: 1em;
+$paddedHorizontalPadding: 1em;
+$veryPaddedVerticalPadding: 1.5em;
+$veryPaddedHorizontalPadding: 1.5em;
+
+/* Compact */
+$compactVerticalPadding: 0.5em;
+$compactHorizontalPadding: 0.7em;
+$veryCompactVerticalPadding: 0.4em;
+$veryCompactHorizontalPadding: 0.6em;
+
+
+/* Sizes */
+$small: 0.9em;
+$medium: 1em;
+$large: 1.1em;
diff --git a/js/tabulator/src/scss/tabulator.scss b/js/tabulator/src/scss/tabulator.scss
new file mode 100644
index 0000000..2c87121
--- /dev/null
+++ b/js/tabulator/src/scss/tabulator.scss
@@ -0,0 +1,686 @@
+
+//Main Theme Variables
+$backgroundColor: #888; //background color of tabulator
+$borderColor:#999; //border to tablulator
+$textSize:14px; //table text size
+
+//header themeing
+$headerBackgroundColor:#e6e6e6; //border to tablulator
+$headerTextColor:#555; //header text colour
+$headerBorderColor:#aaa;  //header border color
+$headerSeperatorColor:#999; //header bottom seperator color
+$headerMargin:4px; //padding round header
+
+//column header arrows
+$sortArrowActive: #666;
+$sortArrowInactive: #bbb;
+
+//row themeing
+$rowBackgroundColor:#fff; //table row background color
+$rowAltBackgroundColor:#EFEFEF; //table row background color
+$rowBorderColor:#aaa; //table border color
+$rowTextColor:#333; //table text color
+$rowHoverBackground:#bbb; //row background color on hover
+
+$rowSelectedBackground: #9ABCEA; //row background color when selected
+$rowSelectedBackgroundHover: #769BCC;//row background color when selected and hovered
+
+$editBoxColor:#1D68CD; //border color for edit boxes
+$errorColor:#dd0000; //error indication
+
+//footer themeing
+$footerBackgroundColor:#e6e6e6; //border to tablulator
+$footerTextColor:#555; //footer text colour
+$footerBorderColor:#aaa; //footer border color
+$footerSeperatorColor:#999; //footer bottom seperator color
+
+
+
+//Tabulator Containing Element
+.tabulator{
+	position: relative;
+
+	border: 1px solid $borderColor;
+
+	background-color: $backgroundColor;
+
+	font-size:$textSize;
+	text-align: left;
+	overflow:hidden;
+
+	-webkit-transform: translatez(0);
+	-moz-transform: translatez(0);
+	-ms-transform: translatez(0);
+	-o-transform: translatez(0);
+	transform: translatez(0);
+
+	&[tabulator-layout="fitDataFill"]{
+		.tabulator-tableHolder{
+			.tabulator-table{
+				min-width:100%;
+			}
+		}
+	}
+
+	&.tabulator-block-select{
+		user-select: none;
+	}
+
+	//column header containing element
+	.tabulator-header{
+		position:relative;
+		box-sizing: border-box;
+
+		width:100%;
+
+		border-bottom:1px solid $headerSeperatorColor;
+		background-color: $headerBackgroundColor;
+		color: $headerTextColor;
+		font-weight:bold;
+
+		white-space: nowrap;
+		overflow:hidden;
+
+		-moz-user-select: none;
+		-khtml-user-select: none;
+		-webkit-user-select: none;
+		-o-user-select: none;
+
+		//individual column header element
+		.tabulator-col{
+			display:inline-block;
+			position:relative;
+			box-sizing:border-box;
+			border-right:1px solid $headerBorderColor;
+			background:$headerBackgroundColor;
+			text-align:left;
+			vertical-align: bottom;
+			overflow: hidden;
+
+			&.tabulator-moving{
+				position: absolute;
+				border:1px solid  $headerSeperatorColor;
+				background:darken($headerBackgroundColor, 10%);
+				pointer-events: none;
+			}
+
+			//hold content of column header
+			.tabulator-col-content{
+				position: relative;
+				padding:4px;
+
+				//hold title of column header
+				.tabulator-col-title{
+					box-sizing:border-box;
+					width: 100%;
+
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					vertical-align:bottom;
+
+					//element to hold title editor
+					.tabulator-title-editor{
+						box-sizing: border-box;
+						width: 100%;
+
+						border:1px solid #999;
+
+						padding:1px;
+
+						background: #fff;
+					}
+				}
+
+				//column sorter arrow
+				.tabulator-arrow{
+					display: inline-block;
+					position: absolute;
+					top:9px;
+					right:8px;
+					width: 0;
+					height: 0;
+					border-left: 6px solid transparent;
+					border-right: 6px solid transparent;
+					border-bottom: 6px solid $sortArrowInactive;
+				}
+
+			}
+
+			//complex header column group
+			&.tabulator-col-group{
+
+				//gelement to hold sub columns in column group
+				.tabulator-col-group-cols{
+					position:relative;
+					display: flex;
+
+					border-top:1px solid $headerBorderColor;
+					overflow: hidden;
+
+					.tabulator-col:last-child{
+						margin-right:-1px;
+					}
+				}
+			}
+
+			//hide left resize handle on first column
+			&:first-child{
+				.tabulator-col-resize-handle.prev{
+					display: none;
+				}
+			}
+
+			//placeholder element for sortable columns
+			&.ui-sortable-helper{
+				position: absolute;
+				background-color: $headerBackgroundColor !important;
+				border:1px solid $headerBorderColor;
+			}
+
+			//header filter containing element
+			.tabulator-header-filter{
+				position: relative;
+				box-sizing: border-box;
+				margin-top:2px;
+				width:100%;
+				text-align: center;
+
+				//styling adjustment for inbuilt editors
+				textarea{
+					height:auto !important;
+				}
+
+				svg{
+					margin-top: 3px;
+				}
+			}
+
+			//styling child elements for sortable columns
+			&.tabulator-sortable{
+				.tabulator-col-title{
+					padding-right:25px;
+				}
+
+				&:hover{
+					cursor:pointer;
+					background-color:darken($headerBackgroundColor, 10%);
+				}
+
+				&[aria-sort="none"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowInactive;
+					}
+				}
+
+				&[aria-sort="asc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowActive;
+					}
+				}
+
+				&[aria-sort="desc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: 6px solid $sortArrowActive;
+						border-bottom: none;
+					}
+				}
+			}
+
+		}
+
+		.tabulator-frozen{
+			display: inline-block;
+			position: absolute;
+
+			// background-color: inherit;
+
+			z-index: 10;
+
+			&.tabulator-frozen-left{
+				border-right:2px solid $rowBorderColor;
+			}
+
+			&.tabulator-frozen-right{
+				border-left:2px solid $rowBorderColor;
+			}
+		}
+
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			min-width:200%;
+
+			background:lighten($headerBackgroundColor, 5%) !important;
+
+			.tabulator-row{
+				background:lighten($headerBackgroundColor, 5%) !important;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+			}
+
+			border-top:1px solid $rowBorderColor;
+			border-bottom:1px solid $headerBorderColor;
+
+			overflow: hidden;
+		}
+	}
+
+	//scrolling element to hold table
+	.tabulator-tableHolder{
+		position:relative;
+		width:100%;
+		white-space: nowrap;
+		overflow:auto;
+		-webkit-overflow-scrolling: touch;
+
+		&:focus{
+			outline: none;
+		}
+
+		//default placeholder element
+		.tabulator-placeholder{
+			position: absolute;
+			box-sizing:border-box;
+			display: flex;
+			align-items:center;
+
+			top:0;
+			left:0;
+			height:100%;
+			width:100%;
+
+			span{
+				display: inline-block;
+
+				margin:0 auto;
+				padding:10px;
+
+				color:#ccc;
+				font-weight: bold;
+				font-size: 20px;
+			}
+		}
+
+		//element to hold table rows
+		.tabulator-table{
+			position:relative;
+			display:inline-block;
+			background-color:$rowBackgroundColor;
+			white-space: nowrap;
+			overflow:visible;
+			color:$rowTextColor;
+
+			//row element
+			.tabulator-row{
+				&.tabulator-calcs{
+					font-weight: bold;
+					background:darken($rowAltBackgroundColor, 5%) !important;
+
+					&.tabulator-calcs-top{
+						border-bottom:2px solid $rowBorderColor;
+					}
+
+					&.tabulator-calcs-bottom{
+						border-top:2px solid $rowBorderColor;
+					}
+				}
+			}
+
+		}
+	}
+
+	//row element
+	.tabulator-row{
+		position: relative;
+		box-sizing: border-box;
+		min-height:$textSize + ($headerMargin * 2);
+		background-color: $rowBackgroundColor;
+
+
+		&.tabulator-row-even{
+			background-color: $rowAltBackgroundColor;
+		}
+
+		&.tabulator-selectable:hover{
+			background-color:$rowHoverBackground;
+			cursor: pointer;
+		}
+
+		&.tabulator-selected{
+			background-color:$rowSelectedBackground;
+		}
+
+		&.tabulator-selected:hover{
+			background-color:$rowSelectedBackgroundHover;
+			cursor: pointer;
+		}
+
+		&.tabulator-row-moving{
+			border:1px solid #000;
+			background:#fff;
+		}
+
+		&.tabulator-moving{
+			position: absolute;
+
+			border-top:1px solid  $rowBorderColor;
+			border-bottom:1px solid  $rowBorderColor;
+
+			pointer-events: none;
+			z-index:15;
+		}
+
+		.tabulator-frozen{
+			display: inline-block;
+			position: absolute;
+
+			background-color: inherit;
+
+			z-index: 10;
+
+			&.tabulator-frozen-left{
+				border-right:2px solid $rowBorderColor;
+			}
+
+			&.tabulator-frozen-right{
+				border-left:2px solid $rowBorderColor;
+			}
+		}
+
+		//cell element
+		.tabulator-cell{
+			display:inline-block;
+			position: relative;
+			box-sizing:border-box;
+			padding:4px;
+			border-right:1px solid $rowBorderColor;
+			vertical-align:middle;
+			white-space:nowrap;
+			overflow:hidden;
+			text-overflow:ellipsis;
+
+
+			&.tabulator-editing{
+				border:1px solid  $editBoxColor;
+				padding: 0;
+
+				input, select{
+					border:1px;
+					background:transparent;
+				}
+			}
+
+			&.tabulator-validation-fail{
+				border:1px solid $errorColor;
+				input, select{
+					border:1px;
+					background:transparent;
+
+					color: $errorColor;
+				}
+			}
+
+			//hide left resize handle on first column
+			&:first-child{
+				.tabulator-col-resize-handle.prev{
+					display: none;
+				}
+			}
+
+			//movable row handle
+			&.tabulator-row-handle{
+
+				display: inline-flex;
+				align-items:center;
+
+				-moz-user-select: none;
+				-khtml-user-select: none;
+				-webkit-user-select: none;
+				-o-user-select: none;
+
+				//handle holder
+				.tabulator-row-handle-box{
+					width:80%;
+
+					//Hamburger element
+					.tabulator-row-handle-bar{
+						width:100%;
+						height:3px;
+						margin:2px 10% 0 10%;
+						background:#666;
+					}
+				}
+			}
+		}
+
+		//row grouping element
+		&.tabulator-group{
+			box-sizing:border-box;
+			border-bottom:1px solid #999;
+			border-right:1px solid $rowBorderColor;
+			border-top:1px solid #999;
+			padding:5px;
+			padding-left:10px;
+			background:#ccc;
+			font-weight:bold;
+
+			min-width: 100%;
+
+			&:hover{
+				cursor:pointer;
+				background-color:rgba(0,0,0,.1);
+			}
+
+			&.tabulator-group-visible{
+
+				.tabulator-arrow{
+					margin-right:10px;
+					border-left: 6px solid transparent;
+					border-right: 6px solid transparent;
+					border-top: 6px solid $sortArrowActive;
+					border-bottom: 0;
+				}
+
+			}
+
+			&.tabulator-group-level-1{
+				.tabulator-arrow{
+					margin-left:20px;
+				}
+			}
+
+			&.tabulator-group-level-2{
+				.tabulator-arrow{
+					margin-left:40px;
+				}
+			}
+
+			&.tabulator-group-level-3{
+				.tabulator-arrow{
+					margin-left:60px;
+				}
+			}
+
+			&.tabulator-group-level-4{
+				.tabulator-arrow{
+					margin-left:80px;
+				}
+			}
+
+			&.tabulator-group-level-5{
+				.tabulator-arrow{
+					margin-left:1000px;
+				}
+			}
+
+			//sorting arrow
+			.tabulator-arrow{
+				display: inline-block;
+				width: 0;
+				height: 0;
+				margin-right:16px;
+				border-top: 6px solid transparent;
+				border-bottom: 6px solid transparent;
+				border-right: 0;
+				border-left: 6px solid $sortArrowActive;
+				vertical-align:middle;
+			}
+
+			span{
+				margin-left:10px;
+				color:#d00;
+			}
+		}
+
+	}
+
+	//footer element
+	.tabulator-footer{
+		padding:5px 10px;
+		border-top:1px solid $footerSeperatorColor;
+		background-color: $footerBackgroundColor;
+		text-align: right;
+		color: $footerTextColor;
+		font-weight:bold;
+		white-space:nowrap;
+		user-select:none;
+
+		-moz-user-select: none;
+		-khtml-user-select: none;
+		-webkit-user-select: none;
+		-o-user-select: none;
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			width:calc("100% + 20px");
+			margin:-5px -10px 5px -10px;
+
+			text-align: left;
+
+			background:lighten($footerBackgroundColor, 5%) !important;
+
+			.tabulator-row{
+				background:lighten($footerBackgroundColor, 5%) !important;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+			}
+
+			border-bottom:1px solid $rowBorderColor;
+			border-top:1px solid $rowBorderColor;
+
+			overflow: hidden;
+
+			&:only-child{
+				margin-bottom:-5px;
+				border-bottom:none;
+			}
+		}
+
+		//pagination container element
+		.tabulator-pages{
+			margin:0 7px;
+		}
+
+		//pagination button
+		.tabulator-page{
+			display:inline-block;
+
+			margin:0 2px;
+			padding:2px 5px;
+
+			border:1px solid $footerBorderColor;
+			border-radius:3px;
+
+			background:rgba(255,255,255,.2);
+
+			color: $footerTextColor;
+			font-family:inherit;
+			font-weight:inherit;
+			font-size:inherit;
+
+			&.active{
+				color:#d00;
+			}
+
+			&:disabled{
+				opacity:.5;
+			}
+
+			&:not(.disabled){
+				&:hover{
+					cursor:pointer;
+					background:rgba(0,0,0,.2);
+					color:#fff;
+				}
+			}
+		}
+	}
+
+	//column resize handles
+	.tabulator-col-resize-handle{
+		position:absolute;
+		right:0;
+		top:0;
+		bottom:0;
+		width:5px;
+
+		&.prev{
+			left:0;
+			right:auto;
+		}
+
+		&:hover{
+			cursor:ew-resize;
+		}
+	}
+
+
+	//holding div that contains loader and covers tabulator element to prevent interaction
+	.tablulator-loader{
+		position:absolute;
+		display: flex;
+		align-items:center;
+
+		top:0;
+		left:0;
+		z-index:100;
+
+		height:100%;
+		width:100%;
+		background:rgba(0,0,0,.4);
+		text-align:center;
+
+		//loading message element
+		.tabulator-loader-msg{
+			display:inline-block;
+
+			margin:0 auto;
+			padding:10px 20px;
+
+			border-radius:10px;
+
+			background:#fff;
+			font-weight:bold;
+			font-size:16px;
+
+			//loading message
+			&.tabulator-loading{
+				border:4px solid #333;
+				color:#000;
+			}
+
+			//error message
+			&.tabulator-error{
+				border:4px solid #D00;
+				color:#590000;
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/js/tabulator/src/scss/tabulator_midnight.scss b/js/tabulator/src/scss/tabulator_midnight.scss
new file mode 100644
index 0000000..536fa07
--- /dev/null
+++ b/js/tabulator/src/scss/tabulator_midnight.scss
@@ -0,0 +1,684 @@
+
+//Main Theme Variables
+$backgroundColor: #222; //background color of tabulator
+$borderColor:#333; //border to tablulator
+$textSize:14px; //table text size
+
+//header themeing
+$headerBackgroundColor:#333; //border to tablulator
+$headerTextColor:#fff; //header text colour
+$headerBorderColor:#aaa;  //header border color
+$headerSeperatorColor:#999; //header bottom seperator color
+$headerMargin:4px; //padding round header
+
+//column header arrows
+$sortArrowActive: #666;
+$sortArrowInactive: #bbb;
+
+//row themeing
+$rowBackgroundColor:#666; //table row background color
+$rowAltBackgroundColor:#444; //table row background color
+$rowBorderColor:#888; //table border color
+$rowTextColor:#fff; //table text color
+$rowHoverBackground:#999; //row background color on hover
+
+$rowSelectedBackground: #000; //row background color when selected
+$rowSelectedBackgroundHover: #888;//row background color when selected and hovered
+
+$editBoxColor:#999; //border color for edit boxes
+$errorColor:#dd0000; //error indication
+
+//footer themeing
+$footerBackgroundColor:#333; //border to tablulator
+$footerTextColor:#333; //footer text colour
+$footerBorderColor:#aaa; //footer border color
+$footerSeperatorColor:#999; //footer bottom seperator color
+
+
+
+//Tabulator Containing Element
+.tabulator{
+	position: relative;
+	border: 1px solid $borderColor;
+	background-color: $backgroundColor;
+	overflow:hidden;
+	font-size:$textSize;
+	text-align: left;
+
+	-webkit-transform: translatez(0);
+	-moz-transform: translatez(0);
+	-ms-transform: translatez(0);
+	-o-transform: translatez(0);
+	transform: translatez(0);
+
+	&[tabulator-layout="fitDataFill"]{
+		.tabulator-tableHolder{
+			.tabulator-table{
+				min-width:100%;
+			}
+		}
+	}
+
+	&.tabulator-block-select{
+		user-select: none;
+	}
+
+	//column header containing element
+	.tabulator-header{
+		position:relative;
+		box-sizing: border-box;
+
+		width:100%;
+
+		border-bottom:1px solid $headerSeperatorColor;
+		background-color: $headerBackgroundColor;
+		color: $headerTextColor;
+		font-weight:bold;
+
+		white-space: nowrap;
+		overflow:hidden;
+
+		-moz-user-select: none;
+		-khtml-user-select: none;
+		-webkit-user-select: none;
+		-o-user-select: none;
+
+		//individual column header element
+		.tabulator-col{
+			display:inline-block;
+			position:relative;
+			box-sizing:border-box;
+			border-right:1px solid $headerBorderColor;
+			background-color: $headerBackgroundColor;
+			text-align:left;
+			vertical-align: bottom;
+			overflow: hidden;
+
+			&.tabulator-moving{
+				position: absolute;
+				border:1px solid  $headerSeperatorColor;
+				background:darken($headerBackgroundColor, 10%);
+				pointer-events: none;
+			}
+
+			//hold content of column header
+			.tabulator-col-content{
+				position: relative;
+				padding:4px;
+
+				//hold title of column header
+				.tabulator-col-title{
+					box-sizing:border-box;
+					width: 100%;
+
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					vertical-align:bottom;
+
+					//element to hold title editor
+					.tabulator-title-editor{
+						box-sizing: border-box;
+						width: 100%;
+
+						border:1px solid #999;
+
+						padding:1px;
+
+						background: #444;
+						color: #fff;
+					}
+
+				}
+
+				//column sorter arrow
+				.tabulator-arrow{
+					display: inline-block;
+					position: absolute;
+					top:9px;
+					right:8px;
+					width: 0;
+					height: 0;
+					border-left: 6px solid transparent;
+					border-right: 6px solid transparent;
+					border-bottom: 6px solid $sortArrowInactive;
+				}
+
+			}
+
+			//complex header column group
+			&.tabulator-col-group{
+
+				//gelement to hold sub columns in column group
+				.tabulator-col-group-cols{
+					position:relative;
+					display: flex;
+
+					border-top:1px solid $headerBorderColor;
+					overflow: hidden;
+
+					.tabulator-col:last-child{
+						margin-right:-1px;
+					}
+				}
+			}
+
+			//hide left resize handle on first column
+			&:first-child{
+				.tabulator-col-resize-handle.prev{
+					display: none;
+				}
+			}
+
+			//placeholder element for sortable columns
+			&.ui-sortable-helper{
+				position: absolute;
+				background-color: darken($headerBackgroundColor, 10%) !important;
+				border:1px solid $headerBorderColor;
+			}
+
+			//header filter containing element
+			.tabulator-header-filter{
+				position: relative;
+				box-sizing: border-box;
+				margin-top:2px;
+				width:100%;
+				text-align: center;
+
+				//styling adjustment for inbuilt editors
+				textarea{
+					height:auto !important;
+				}
+
+				svg{
+					margin-top: 3px;
+				}
+
+				input, select{
+					border:1px solid #999;
+					background: #444;
+					color: #fff;
+				}
+			}
+
+			//styling child elements for sortable columns
+			&.tabulator-sortable{
+				.tabulator-col-title{
+					padding-right:25px;
+				}
+
+				&:hover{
+					cursor:pointer;
+					background-color:darken($headerBackgroundColor, 10%);
+				}
+
+
+				&[aria-sort="none"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowInactive;
+					}
+				}
+
+				&[aria-sort="asc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowActive;
+					}
+				}
+
+				&[aria-sort="desc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: 6px solid $sortArrowActive;
+						border-bottom: none;
+					}
+				}
+			}
+
+		}
+
+		.tabulator-frozen{
+			display: inline-block;
+			position: absolute;
+
+			// background-color: inherit;
+
+			z-index: 10;
+
+			&.tabulator-frozen-left{
+				border-right:2px solid $rowBorderColor;
+			}
+
+			&.tabulator-frozen-right{
+				border-left:2px solid $rowBorderColor;
+			}
+		}
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			min-width:200%;
+
+			background:darken($headerBackgroundColor, 10%) !important;
+
+			.tabulator-row{
+				background:darken($headerBackgroundColor, 10%) !important;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+			}
+
+			border-top:1px solid $rowBorderColor;
+			border-bottom:1px solid $headerBorderColor;
+
+			overflow: hidden;
+		}
+
+
+	}
+
+	//scrolling element to hold table
+	.tabulator-tableHolder{
+		position:relative;
+		width:100%;
+		white-space: nowrap;
+		overflow:auto;
+		-webkit-overflow-scrolling: touch;
+
+		&:focus{
+			outline: none;
+		}
+
+		//default placeholder element
+		.tabulator-placeholder{
+			position: absolute;
+			box-sizing:border-box;
+			display: flex;
+			align-items:center;
+
+			top:0;
+			left:0;
+			height:100%;
+			width:100%;
+
+			span{
+				display: inline-block;
+
+				margin:0 auto;
+				padding:10px;
+
+				color:#eee;
+				font-weight: bold;
+				font-size: 20px;
+			}
+		}
+
+		//element to hold table rows
+		.tabulator-table{
+			position:relative;
+			display:inline-block;
+			background-color:$rowBackgroundColor;
+			white-space: nowrap;
+			overflow:visible;
+			color:$rowTextColor;
+
+			.tabulator-row{
+				&.tabulator-calcs{
+					font-weight: bold;
+					background:darken($rowAltBackgroundColor, 5%) !important;
+
+					&.tabulator-calcs-top{
+						border-bottom:2px solid $rowBorderColor;
+					}
+
+					&.tabulator-calcs-bottom{
+						border-top:2px solid $rowBorderColor;
+					}
+				}
+			}
+		}
+	}
+
+	//row element
+	.tabulator-row{
+		position: relative;
+		box-sizing: border-box;
+
+		min-height:$textSize + ($headerMargin * 2);
+		background-color: $rowBackgroundColor;
+
+		&:nth-child(even){
+			background-color: $rowAltBackgroundColor;
+		}
+
+		&.tabulator-selectable:hover{
+			background-color:$rowHoverBackground;
+			cursor: pointer;
+		}
+
+		&.tabulator-selected{
+			background-color:$rowSelectedBackground;
+		}
+
+		&.tabulator-selected:hover{
+			background-color:$rowSelectedBackgroundHover;
+			cursor: pointer;
+		}
+
+		&.tabulator-moving{
+			position: absolute;
+
+			border-top:1px solid  $rowBorderColor;
+			border-bottom:1px solid  $rowBorderColor;
+
+			pointer-events: none !important;
+			z-index:15;
+		}
+
+		.tabulator-frozen{
+			display: inline-block;
+			position: absolute;
+
+			background-color: inherit;
+
+			z-index: 10;
+
+			&.tabulator-frozen-left{
+				border-right:2px solid $rowBorderColor;
+			}
+
+			&.tabulator-frozen-right{
+				border-left:2px solid $rowBorderColor;
+			}
+		}
+
+
+		//cell element
+		.tabulator-cell{
+			display:inline-block;
+			position: relative;
+			box-sizing:border-box;
+			padding:4px;
+			border-right:1px solid $rowBorderColor;
+			vertical-align:middle;
+			white-space:nowrap;
+			overflow:hidden;
+			text-overflow:ellipsis;
+
+
+			&.tabulator-editing{
+				border:1px solid  $editBoxColor;
+				padding: 0;
+
+				input, select{
+					border:1px;
+					background:transparent;
+				}
+			}
+
+			&.tabulator-validation-fail{
+				border:1px solid $errorColor;
+				input, select{
+					border:1px;
+					background:transparent;
+
+					color: $errorColor;
+				}
+			}
+
+			//hide left resize handle on first column
+			&:first-child{
+				.tabulator-col-resize-handle.prev{
+					display: none;
+				}
+			}
+
+			//movable row handle
+			&.tabulator-row-handle{
+
+				display: inline-flex;
+				align-items:center;
+
+				-moz-user-select: none;
+				-khtml-user-select: none;
+				-webkit-user-select: none;
+				-o-user-select: none;
+
+				//handle holder
+				.tabulator-row-handle-box{
+					width:80%;
+
+					//Hamburger element
+					.tabulator-row-handle-bar{
+						width:100%;
+						height:3px;
+						margin:2px 10% 0 10%;
+						background:#666;
+					}
+				}
+			}
+		}
+
+
+		//row grouping element
+		&.tabulator-group{
+
+			box-sizing:border-box;
+			border-bottom:1px solid #999;
+			border-right:1px solid $rowBorderColor;
+			border-top:1px solid #999;
+			padding:5px;
+			padding-left:10px;
+			background:#ccc;
+			font-weight:bold;
+			color:#333;
+
+			min-width: 100%;
+
+			&:hover{
+				cursor:pointer;
+				background-color:rgba(0,0,0,.1);
+			}
+
+			&.tabulator-group-visible{
+				.tabulator-arrow{
+					margin-right:10px;
+					border-left: 6px solid transparent;
+					border-right: 6px solid transparent;
+					border-top: 6px solid $sortArrowActive;
+					border-bottom: 0;
+				}
+			}
+
+			&.tabulator-group-level-1{
+				.tabulator-arrow{
+					margin-left:20px;
+				}
+			}
+
+			&.tabulator-group-level-2{
+				.tabulator-arrow{
+					margin-left:40px;
+				}
+			}
+
+			&.tabulator-group-level-3{
+				.tabulator-arrow{
+					margin-left:60px;
+				}
+			}
+
+			&.tabulator-group-level-4{
+				.tabulator-arrow{
+					margin-left:80px;
+				}
+			}
+
+			&.tabulator-group-level-5{
+				.tabulator-arrow{
+					margin-left:1000px;
+				}
+			}
+
+			//sorting arrow
+			.tabulator-arrow{
+				display: inline-block;
+				width: 0;
+				height: 0;
+				margin-right:16px;
+				border-top: 6px solid transparent;
+				border-bottom: 6px solid transparent;
+				border-right: 0;
+				border-left: 6px solid $sortArrowActive;
+				vertical-align:middle;
+			}
+
+			span{
+				margin-left:10px;
+				color:#666;
+			}
+		}
+	}
+
+	//column resize handles
+	.tabulator-col-resize-handle{
+		position:absolute;
+		right:0;
+		top:0;
+		bottom:0;
+		width:5px;
+
+		&.prev{
+			left:0;
+			right:auto;
+		}
+
+		&:hover{
+			cursor:ew-resize;
+		}
+	}
+
+
+	//footer element
+	.tabulator-footer{
+		padding:5px 10px;
+		border-top:1px solid $footerSeperatorColor;
+		background-color: $footerBackgroundColor;
+		text-align:right;
+		color: $footerTextColor;
+		font-weight:bold;
+		white-space:nowrap;
+		user-select:none;
+
+		-moz-user-select: none;
+		-khtml-user-select: none;
+		-webkit-user-select: none;
+		-o-user-select: none;
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			width:calc("100% + 20px");
+			margin:-5px -10px 5px -10px;
+
+			text-align: left;
+
+			background:darken($footerBackgroundColor, 5%) !important;
+
+			.tabulator-row{
+				background:darken($footerBackgroundColor, 5%) !important;
+				color:$headerTextColor;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+			}
+
+			border-bottom:1px solid $rowBorderColor;
+			border-top:1px solid $rowBorderColor;
+
+			overflow: hidden;
+
+			&:only-child{
+				margin-bottom:-5px;
+				border-bottom:none;
+			}
+		}
+
+		//pagination container element
+		.tabulator-pages{
+			margin:0 7px;
+		}
+
+		//pagination button
+		.tabulator-page{
+			display:inline-block;
+			margin:0 2px;
+			border:1px solid $footerBorderColor;
+			border-radius:3px;
+			padding:2px 5px;
+			background:rgba(255,255,255,.2);
+			color: $footerTextColor;
+			font-family:inherit;
+			font-weight:inherit;
+			font-size:inherit;
+
+			&.active{
+				color:#fff;
+			}
+
+			&:disabled{
+				opacity:.5;
+			}
+
+			&:not(.disabled){
+				&:hover{
+					cursor:pointer;
+					background:rgba(0,0,0,.2);
+					color:#fff;
+				}
+			}
+		}
+	}
+
+	//holding div that contains loader and covers tabulator element to prevent interaction
+	.tablulator-loader{
+		position:absolute;
+		display: flex;
+		align-items:center;
+
+		top:0;
+		left:0;
+		z-index:100;
+
+		height:100%;
+		width:100%;
+		background:rgba(0,0,0,.4);
+		text-align:center;
+
+		//loading message element
+		.tabulator-loader-msg{
+			display:inline-block;
+
+			margin:0 auto;
+			padding:10px 20px;
+
+			border-radius:10px;
+
+			background:#fff;
+			font-weight:bold;
+			font-size:16px;
+
+			//loading message
+			&.tabulator-loading{
+				border:4px solid #333;
+				color:#000;
+			}
+
+			//error message
+			&.tabulator-error{
+				border:4px solid #D00;
+				color:#590000;
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/js/tabulator/src/scss/tabulator_modern.scss b/js/tabulator/src/scss/tabulator_modern.scss
new file mode 100644
index 0000000..52ec364
--- /dev/null
+++ b/js/tabulator/src/scss/tabulator_modern.scss
@@ -0,0 +1,722 @@
+
+$primary: #3759D7; //the base text color from which the rest of the theme derives
+
+//Main Theme Variables
+$backgroundColor: #fff; //background color of tabulator
+$borderColor:#fff; //border to tablulator
+$textSize:16px; //table text size
+
+//header themeing
+$headerBackgroundColor:#fff; //border to tablulator
+$headerTextColor:$primary; //header text colour
+$headerBorderColor:#fff;  //header border color
+$headerSeperatorColor:$primary; //header bottom seperator color
+$headerMargin:4px; //padding round header
+
+//column header arrows
+$sortArrowActive: $primary;
+$sortArrowInactive: lighten($primary, 30%);
+
+//row themeing
+$rowBackgroundColor:#f3f3f3; //table row background color
+$rowAltBackgroundColor:#fff; //table row background color
+$rowBorderColor:#fff; //table border color
+$rowTextColor:#333; //table text color
+$rowHoverBackground:#bbb; //row background color on hover
+
+$rowSelectedBackground: #9ABCEA; //row background color when selected
+$rowSelectedBackgroundHover: #769BCC;//row background color when selected and hovered
+
+$editBoxColor:#1D68CD; //border color for edit boxes
+$errorColor:#dd0000; //error indication
+
+//footer themeing
+$footerBackgroundColor:#fff; //border to tablulator
+$footerTextColor:$primary; //footer text colour
+$footerBorderColor:#aaa; //footer border color
+$footerSeperatorColor:#999; //footer bottom seperator color
+
+$handleWidth:10px; //width of the row handle
+$handleColor: $primary; //color for odd numbered rows
+$handleColorAlt: lighten($primary, 10%); //color for even numbered rows
+
+
+//Tabulator Containing Element
+.tabulator{
+	position: relative;
+	border: 1px solid $borderColor;
+	background-color: $backgroundColor;
+	overflow:hidden;
+	font-size:$textSize;
+	text-align: left;
+
+	-webkit-transform: translatez(0);
+	-moz-transform: translatez(0);
+	-ms-transform: translatez(0);
+	-o-transform: translatez(0);
+	transform: translatez(0);
+
+	&[tabulator-layout="fitDataFill"]{
+		.tabulator-tableHolder{
+			.tabulator-table{
+				min-width:100%;
+			}
+		}
+	}
+
+	&.tabulator-block-select{
+		user-select: none;
+	}
+
+	//column header containing element
+	.tabulator-header{
+		position:relative;
+		box-sizing: border-box;
+
+		width:100%;
+
+		border-bottom:3px solid $headerSeperatorColor;
+		margin-bottom:4px;
+		background-color: $headerBackgroundColor;
+		color: $headerTextColor;
+		font-weight:bold;
+
+		white-space: nowrap;
+		overflow:hidden;
+
+		-moz-user-select: none;
+		-khtml-user-select: none;
+		-webkit-user-select: none;
+		-o-user-select: none;
+
+		padding-left:$handleWidth;
+
+		font-size: 1.1em;
+
+		//individual column header element
+		.tabulator-col{
+			display:inline-block;
+			position:relative;
+			box-sizing:border-box;
+			border-right:2px solid $headerBorderColor;
+			background-color: $headerBackgroundColor;
+			text-align:left;
+			vertical-align: bottom;
+			overflow: hidden;
+
+			&.tabulator-moving{
+				position: absolute;
+				border:1px solid  $headerSeperatorColor;
+				background:darken($headerBackgroundColor, 10%);
+				pointer-events: none;
+			}
+
+			//hold content of column header
+			.tabulator-col-content{
+				position: relative;
+				padding:4px;
+
+				//hold title of column header
+				.tabulator-col-title{
+					box-sizing:border-box;
+					width: 100%;
+
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					vertical-align:bottom;
+
+					//element to hold title editor
+					.tabulator-title-editor{
+						box-sizing: border-box;
+						width: 100%;
+
+						border:1px solid $primary;
+
+						padding:1px;
+
+						background: #fff;
+
+						font-size: 1em;
+						color: $primary;
+					}
+				}
+
+				//column sorter arrow
+				.tabulator-arrow{
+					display: inline-block;
+					position: absolute;
+					top:9px;
+					right:8px;
+					width: 0;
+					height: 0;
+					border-left: 6px solid transparent;
+					border-right: 6px solid transparent;
+					border-bottom: 6px solid $sortArrowInactive;
+				}
+
+			}
+
+			//complex header column group
+			&.tabulator-col-group{
+
+				//gelement to hold sub columns in column group
+				.tabulator-col-group-cols{
+					position:relative;
+					display: flex;
+
+					border-top:2px solid $headerSeperatorColor;
+					overflow: hidden;
+
+					.tabulator-col:last-child{
+						margin-right:-1px;
+					}
+				}
+			}
+
+
+			//hide left resize handle on first column
+			&:first-child{
+				.tabulator-col-resize-handle.prev{
+					display: none;
+				}
+			}
+
+			//placeholder element for sortable columns
+			&.ui-sortable-helper{
+				position: absolute;
+				background-color: darken($headerBackgroundColor, 10%) !important;
+				border:1px solid $headerBorderColor;
+			}
+
+			//header filter containing element
+			.tabulator-header-filter{
+				position: relative;
+				box-sizing: border-box;
+				margin-top:2px;
+				width:100%;
+				text-align: center;
+
+				//styling adjustment for inbuilt editors
+				textarea{
+					height:auto !important;
+				}
+
+				svg{
+					margin-top: 3px;
+				}
+			}
+
+			//styling child elements for sortable columns
+			&.tabulator-sortable{
+				.tabulator-col-title{
+					padding-right:25px;
+				}
+
+				&:hover{
+					cursor:pointer;
+					background-color:darken($headerBackgroundColor, 10%);
+				}
+
+
+				&[aria-sort="none"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowInactive;
+					}
+				}
+
+				&[aria-sort="asc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowActive;
+					}
+				}
+
+				&[aria-sort="desc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: 6px solid $sortArrowActive;
+						border-bottom: none;
+					}
+				}
+			}
+
+		}
+
+		.tabulator-frozen{
+			display: inline-block;
+			position: absolute;
+
+			// background-color: inherit;
+
+			z-index: 10;
+
+			&.tabulator-frozen-left{
+				padding-left: $handleWidth;
+
+				border-right:2px solid $rowBorderColor;
+			}
+
+			&.tabulator-frozen-right{
+				border-left:2px solid $rowBorderColor;
+			}
+		}
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			min-width:200%;
+
+			border-top:2px solid $headerSeperatorColor !important;
+
+			background:lighten($headerBackgroundColor, 5%) !important;
+
+			.tabulator-row{
+				padding-left: 0 !important;
+
+				background:lighten($headerBackgroundColor, 5%) !important;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+
+				.tabulator-cell{
+					background:none;
+				}
+			}
+
+			border-top:1px solid $rowBorderColor;
+			border-bottom:1px solid $headerBorderColor;
+
+			overflow: hidden;
+		}
+	}
+
+	//scrolling element to hold table
+	.tabulator-tableHolder{
+		position:relative;
+		width:100%;
+		white-space: nowrap;
+		overflow:auto;
+		-webkit-overflow-scrolling: touch;
+
+		&:focus{
+			outline: none;
+		}
+
+		//default placeholder element
+		.tabulator-placeholder{
+			position: absolute;
+			box-sizing:border-box;
+			display: flex;
+			align-items:center;
+
+			top:0;
+			left:0;
+			height:100%;
+			width:100%;
+
+			span{
+				display: inline-block;
+
+				margin:0 auto;
+				padding:10px;
+
+				color:$primary;
+				font-weight: bold;
+				font-size: 20px;
+			}
+		}
+
+		//element to hold table rows
+		.tabulator-table{
+			position:relative;
+			display:inline-block;
+			background-color:$rowBackgroundColor;
+			white-space: nowrap;
+			overflow:visible;
+			color:$rowTextColor;
+
+			.tabulator-row{
+				&.tabulator-calcs{
+					font-weight: bold;
+					background:darken($rowAltBackgroundColor, 5%) !important;
+
+					&.tabulator-calcs-top{
+						border-bottom:2px solid $headerSeperatorColor;
+					}
+
+					&.tabulator-calcs-bottom{
+						border-top:2px solid $headerSeperatorColor;
+					}
+				}
+			}
+		}
+	}
+
+	//row element
+	.tabulator-row{
+		position: relative;
+		box-sizing: border-box;
+
+		box-sizing: border-box;
+		min-height:$textSize + ($headerMargin * 2);
+
+		background-color: $handleColor;
+
+		padding-left: $handleWidth !important;
+
+		margin-bottom: 2px;
+
+		&:nth-child(even){
+			background-color: $handleColorAlt;
+
+			.tabulator-cell{
+				background-color: $rowAltBackgroundColor;
+			}
+		}
+
+		&.tabulator-selectable:hover{
+			cursor: pointer;
+
+			.tabulator-cell{
+				background-color:$rowHoverBackground;
+			}
+		}
+
+		&.tabulator-selected{
+			.tabulator-cell{
+				background-color:$rowSelectedBackground;
+			}
+		}
+
+		&.tabulator-selected:hover{
+			.tabulator-cell{
+				background-color:$rowSelectedBackgroundHover;
+				cursor: pointer;
+			}
+		}
+
+		&.tabulator-moving{
+			position: absolute;
+
+			border-top:1px solid  $rowBorderColor;
+			border-bottom:1px solid  $rowBorderColor;
+
+			pointer-events: none !important;
+			z-index:15;
+		}
+
+		.tabulator-frozen{
+			display: inline-block;
+			position: absolute;
+
+			background-color: inherit;
+
+			z-index: 10;
+
+			&.tabulator-frozen-left{
+				padding-left: $handleWidth;
+				border-right:2px solid $rowBorderColor;
+			}
+
+			&.tabulator-frozen-right{
+				border-left:2px solid $rowBorderColor;
+			}
+		}
+
+		//cell element
+		.tabulator-cell{
+			display:inline-block;
+			position: relative;
+			box-sizing:border-box;
+			padding:6px 4px;
+			border-right:2px solid $rowBorderColor;
+			vertical-align:middle;
+			white-space:nowrap;
+			overflow:hidden;
+			text-overflow:ellipsis;
+
+			background-color: $rowBackgroundColor;
+
+			&.tabulator-editing{
+				border:1px solid  $editBoxColor;
+				padding: 0;
+
+				input, select{
+					border:1px;
+					background:transparent;
+				}
+			}
+
+			&.tabulator-validation-fail{
+				border:1px solid $errorColor;
+				input, select{
+					border:1px;
+					background:transparent;
+
+					color: $errorColor;
+				}
+			}
+
+			//hide left resize handle on first column
+			&:first-child{
+				.tabulator-col-resize-handle.prev{
+					display: none;
+				}
+			}
+
+			//movable row handle
+			&.tabulator-row-handle{
+
+				display: inline-flex;
+				align-items:center;
+
+				-moz-user-select: none;
+				-khtml-user-select: none;
+				-webkit-user-select: none;
+				-o-user-select: none;
+
+				//handle holder
+				.tabulator-row-handle-box{
+					width:80%;
+
+					//Hamburger element
+					.tabulator-row-handle-bar{
+						width:100%;
+						height:3px;
+						margin:2px 10% 0 10%;
+						background:#666;
+					}
+				}
+			}
+		}
+
+		//row grouping element
+		&.tabulator-group{
+
+			box-sizing:border-box;
+			border-bottom:2px solid $primary;
+			border-top:2px solid $primary;
+			padding:5px;
+			padding-left:10px;
+			background:lighten($primary, 20%);
+			font-weight:bold;
+			color:fff;
+			margin-bottom: 2px;
+
+			min-width: 100%;
+
+			&:hover{
+				cursor:pointer;
+				background-color:rgba(0,0,0,.1);
+			}
+
+
+			&.tabulator-group-visible{
+				.tabulator-arrow{
+					margin-right:10px;
+					border-left: 6px solid transparent;
+					border-right: 6px solid transparent;
+					border-top: 6px solid $sortArrowActive;
+					border-bottom: 0;
+				}
+			}
+
+			&.tabulator-group-level-1{
+				.tabulator-arrow{
+					margin-left:20px;
+				}
+			}
+
+			&.tabulator-group-level-2{
+				.tabulator-arrow{
+					margin-left:40px;
+				}
+			}
+
+			&.tabulator-group-level-3{
+				.tabulator-arrow{
+					margin-left:60px;
+				}
+			}
+
+			&.tabulator-group-level-4{
+				.tabulator-arrow{
+					margin-left:80px;
+				}
+			}
+
+			&.tabulator-group-level-5{
+				.tabulator-arrow{
+					margin-left:1000px;
+				}
+			}
+
+			//sorting arrow
+			.tabulator-arrow{
+				display: inline-block;
+				width: 0;
+				height: 0;
+				margin-right:16px;
+				border-top: 6px solid transparent;
+				border-bottom: 6px solid transparent;
+				border-right: 0;
+				border-left: 6px solid $sortArrowActive;
+				vertical-align:middle;
+			}
+
+			span{
+				margin-left:10px;
+				color:$primary;
+			}
+		}
+	}
+	//column resize handles
+	.tabulator-col-resize-handle{
+		position:absolute;
+		right:0;
+		top:0;
+		bottom:0;
+		width:5px;
+
+		&.prev{
+			left:0;
+			right:auto;
+		}
+
+		&:hover{
+			cursor:ew-resize;
+		}
+	}
+
+
+	//footer element
+	.tabulator-footer{
+		padding:5px 10px;
+		border-top:1px solid $footerSeperatorColor;
+		background-color: $footerBackgroundColor;
+		text-align:right;
+		color: $footerTextColor;
+		font-weight:bold;
+		white-space:nowrap;
+		user-select:none;
+
+		-moz-user-select: none;
+		-khtml-user-select: none;
+		-webkit-user-select: none;
+		-o-user-select: none;
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			width:calc("100% + 20px");
+			margin:-5px -10px 5px -10px;
+
+			text-align: left;
+
+			background:lighten($footerBackgroundColor, 5%) !important;
+
+			border-top:3px solid $headerSeperatorColor !important;
+			border-bottom:2px solid $headerSeperatorColor !important;
+
+			.tabulator-row{
+				background:lighten($footerBackgroundColor, 5%) !important;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+
+				.tabulator-cell{
+					background:none;
+				}
+			}
+
+			border-bottom:1px solid $rowBorderColor;
+			border-top:1px solid $rowBorderColor;
+
+			overflow: hidden;
+
+			&:only-child{
+				margin-bottom:-5px;
+				border-bottom:none;
+				border-bottom:none !important;
+			}
+		}
+
+		//pagination container element
+		.tabulator-pages{
+			margin:0 7px;
+		}
+
+		//pagination button
+		.tabulator-page{
+			display:inline-block;
+			margin:0 2px;
+			border:1px solid $footerBorderColor;
+			border-radius:3px;
+			padding:2px 5px;
+			background:rgba(255,255,255,.2);
+			color: $footerTextColor;
+			font-family:inherit;
+			font-weight:inherit;
+			font-size:inherit;
+
+			&.active{
+				color:$primary;
+			}
+
+			&:disabled{
+				opacity:.5;
+			}
+
+			&:not(.disabled){
+				&:hover{
+					cursor:pointer;
+					background:rgba(0,0,0,.2);
+					color:#fff;
+				}
+			}
+		}
+	}
+
+	//holding div that contains loader and covers tabulator element to prevent interaction
+	.tablulator-loader{
+		position:absolute;
+		display: flex;
+		align-items:center;
+
+		top:0;
+		left:0;
+		z-index:100;
+
+		height:100%;
+		width:100%;
+		background:rgba(0,0,0,.4);
+		text-align:center;
+
+		//loading message element
+		.tabulator-loader-msg{
+			display:inline-block;
+
+			margin:0 auto;
+			padding:10px 20px;
+
+			border-radius:10px;
+
+			background:#fff;
+			font-weight:bold;
+			font-size:16px;
+
+			//loading message
+			&.tabulator-loading{
+				border:4px solid #333;
+				color:#000;
+			}
+
+			//error message
+			&.tabulator-error{
+				border:4px solid #D00;
+				color:#590000;
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/js/tabulator/src/scss/tabulator_simple.scss b/js/tabulator/src/scss/tabulator_simple.scss
new file mode 100644
index 0000000..f474d8f
--- /dev/null
+++ b/js/tabulator/src/scss/tabulator_simple.scss
@@ -0,0 +1,680 @@
+
+//Main Theme Variables
+$backgroundColor: #fff; //background color of tabulator
+$borderColor:#999; //border to tablulator
+$textSize:14px; //table text size
+
+//header themeing
+$headerBackgroundColor:#fff; //border to tablulator
+$headerTextColor:#555; //header text colour
+$headerBorderColor:#ddd;  //header border color
+$headerSeperatorColor:#999; //header bottom seperator color
+$headerMargin:4px; //padding round header
+
+//column header arrows
+$sortArrowActive: #666;
+$sortArrowInactive: #bbb;
+
+//row themeing
+$rowBackgroundColor:#fff; //table row background color
+$rowAltBackgroundColor:#fff; //table row background color
+$rowBorderColor:#ddd; //table border color
+$rowTextColor:#333; //table text color
+$rowHoverBackground:#bbb; //row background color on hover
+
+$rowSelectedBackground: #9ABCEA; //row background color when selected
+$rowSelectedBackgroundHover: #769BCC;//row background color when selected and hovered
+
+
+$editBoxColor:#1D68CD; //border color for edit boxes
+$errorColor:#dd0000; //error indication
+
+//footer themeing
+$footerBackgroundColor:#fff; //border to tablulator
+$footerTextColor:#555; //footer text colour
+$footerBorderColor:#aaa; //footer border color
+$footerSeperatorColor:#999; //footer bottom seperator color
+
+
+
+//Tabulator Containing Element
+.tabulator{
+	position: relative;
+	background-color: $backgroundColor;
+	overflow:hidden;
+	font-size:$textSize;
+	text-align: left;
+
+	-webkit-transform: translatez(0);
+	-moz-transform: translatez(0);
+	-ms-transform: translatez(0);
+	-o-transform: translatez(0);
+	transform: translatez(0);
+
+	&[tabulator-layout="fitDataFill"]{
+		.tabulator-tableHolder{
+			.tabulator-table{
+				min-width:100%;
+			}
+		}
+	}
+
+	&.tabulator-block-select{
+		user-select: none;
+	}
+
+	//column header containing element
+	.tabulator-header{
+		position:relative;
+		box-sizing: border-box;
+
+		width:100%;
+
+		border-bottom:1px solid $headerSeperatorColor;
+		background-color: $headerBackgroundColor;
+		color: $headerTextColor;
+		font-weight:bold;
+
+		white-space: nowrap;
+		overflow:hidden;
+
+		-moz-user-select: none;
+		-khtml-user-select: none;
+		-webkit-user-select: none;
+		-o-user-select: none;
+
+		//individual column header element
+		.tabulator-col{
+			display:inline-block;
+			position:relative;
+			box-sizing:border-box;
+			border-right:1px solid $headerBorderColor;
+			background-color: $headerBackgroundColor;
+			text-align:left;
+			vertical-align: bottom;
+			overflow: hidden;
+
+			&.tabulator-moving{
+				position: absolute;
+				border:1px solid  $headerSeperatorColor;
+				background:darken($headerBackgroundColor, 10%);
+				pointer-events: none;
+			}
+
+			//hold content of column header
+			.tabulator-col-content{
+				position: relative;
+				padding:4px;
+
+				//hold title of column header
+				.tabulator-col-title{
+					box-sizing:border-box;
+					width: 100%;
+
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					vertical-align:bottom;
+
+					//element to hold title editor
+					.tabulator-title-editor{
+						box-sizing: border-box;
+						width: 100%;
+
+						border:1px solid #999;
+
+						padding:1px;
+
+						background: #fff;
+					}
+				}
+
+				//column sorter arrow
+				.tabulator-arrow{
+					display: inline-block;
+					position: absolute;
+					top:9px;
+					right:8px;
+					width: 0;
+					height: 0;
+					border-left: 6px solid transparent;
+					border-right: 6px solid transparent;
+					border-bottom: 6px solid $sortArrowInactive;
+				}
+
+			}
+
+			//complex header column group
+			&.tabulator-col-group{
+
+				//gelement to hold sub columns in column group
+				.tabulator-col-group-cols{
+					position:relative;
+					display: flex;
+
+					border-top:1px solid $headerBorderColor;
+					overflow: hidden;
+
+					.tabulator-col:last-child{
+						margin-right:-1px;
+					}
+				}
+			}
+
+
+			//hide left resize handle on first column
+			&:first-child{
+				.tabulator-col-resize-handle.prev{
+					display: none;
+				}
+			}
+
+			//placeholder element for sortable columns
+			&.ui-sortable-helper{
+				position: absolute;
+				background-color:darken($headerBackgroundColor, 10%) !important;
+				border:1px solid $headerBorderColor;
+			}
+
+			//header filter containing element
+			.tabulator-header-filter{
+				position: relative;
+				box-sizing: border-box;
+				margin-top:2px;
+				width:100%;
+				text-align: center;
+
+				//styling adjustment for inbuilt editors
+				textarea{
+					height:auto !important;
+				}
+
+				svg{
+					margin-top: 3px;
+				}
+			}
+
+
+			//styling child elements for sortable columns
+			&.tabulator-sortable{
+				.tabulator-col-title{
+					padding-right:25px;
+				}
+
+				&:hover{
+					cursor:pointer;
+					background-color:darken($headerBackgroundColor, 10%);
+				}
+
+
+				&[aria-sort="none"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowInactive;
+					}
+				}
+
+				&[aria-sort="asc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowActive;
+					}
+				}
+
+				&[aria-sort="desc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: 6px solid $sortArrowActive;
+						border-bottom: none;
+					}
+				}
+			}
+
+		}
+
+		.tabulator-frozen{
+			display: inline-block;
+			position: absolute;
+
+			// background-color: inherit;
+
+			z-index: 10;
+
+			&.tabulator-frozen-left{
+				border-right:2px solid $rowBorderColor;
+			}
+
+			&.tabulator-frozen-right{
+				border-left:2px solid $rowBorderColor;
+			}
+		}
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			min-width:200%;
+
+			background:darken($headerBackgroundColor, 5%) !important;
+
+			.tabulator-row{
+				background:darken($headerBackgroundColor, 5%) !important;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+			}
+
+			border-top:1px solid $rowBorderColor;
+			border-bottom:1px solid $headerSeperatorColor;
+
+			overflow: hidden;
+		}
+	}
+
+
+
+	//scrolling element to hold table
+	.tabulator-tableHolder{
+		position:relative;
+		width:100%;
+		white-space: nowrap;
+		overflow:auto;
+		-webkit-overflow-scrolling: touch;
+
+		&:focus{
+			outline: none;
+		}
+
+		//default placeholder element
+		.tabulator-placeholder{
+			position: absolute;
+			box-sizing:border-box;
+			display: flex;
+			align-items:center;
+
+			top:0;
+			left:0;
+			height:100%;
+			width:100%;
+
+			span{
+				display: inline-block;
+
+				margin:0 auto;
+				padding:10px;
+
+				color:#000;
+				font-weight: bold;
+				font-size: 20px;
+			}
+		}
+
+		//element to hold table rows
+		.tabulator-table{
+			position:relative;
+			display:inline-block;
+			background-color:$rowBackgroundColor;
+			white-space: nowrap;
+			overflow:visible;
+			color:$rowTextColor;
+
+			.tabulator-row{
+				&.tabulator-calcs{
+					font-weight: bold;
+					background:darken($rowAltBackgroundColor, 5%) !important;
+
+					&.tabulator-calcs-top{
+						border-bottom:2px solid $rowBorderColor;
+					}
+
+					&.tabulator-calcs-bottom{
+						border-top:2px solid $rowBorderColor;
+					}
+				}
+			}
+
+		}
+	}
+
+
+	//row element
+	.tabulator-row{
+		position: relative;
+		box-sizing: border-box;
+
+		min-height:$textSize + ($headerMargin * 2);
+		background-color: $rowBackgroundColor;
+		border-bottom:1px solid $rowBorderColor;
+
+		&:nth-child(even){
+			background-color: $rowAltBackgroundColor;
+		}
+
+		&.tabulator-selectable:hover{
+			background-color:$rowHoverBackground;
+			cursor: pointer;
+		}
+
+		&.tabulator-selected{
+			background-color:$rowSelectedBackground;
+		}
+
+		&.tabulator-selected:hover{
+			background-color:$rowSelectedBackgroundHover;
+			cursor: pointer;
+		}
+
+		&.tabulator-moving{
+			position: absolute;
+
+			border-top:1px solid  $rowBorderColor;
+			border-bottom:1px solid  $rowBorderColor;
+
+			pointer-events: none !important;
+			z-index:15;
+		}
+
+		.tabulator-frozen{
+			display: inline-block;
+			position: absolute;
+
+			background-color: inherit;
+
+			z-index: 10;
+
+			&.tabulator-frozen-left{
+				border-right:2px solid $rowBorderColor;
+			}
+
+			&.tabulator-frozen-right{
+				border-left:2px solid $rowBorderColor;
+			}
+		}
+
+		//cell element
+		.tabulator-cell{
+			display:inline-block;
+			position: relative;
+			box-sizing:border-box;
+			padding:4px;
+			border-right:1px solid $rowBorderColor;
+			vertical-align:middle;
+			white-space:nowrap;
+			overflow:hidden;
+			text-overflow:ellipsis;
+
+			&:last-of-type{
+				border-right: none;
+			}
+
+			&.tabulator-editing{
+				border:1px solid  $editBoxColor;
+				padding: 0;
+
+				input, select{
+					border:1px;
+					background:transparent;
+				}
+			}
+
+			&.tabulator-validation-fail{
+				border:1px solid $errorColor;
+				input, select{
+					border:1px;
+					background:transparent;
+
+					color: $errorColor;
+				}
+			}
+
+			//hide left resize handle on first column
+			&:first-child{
+				.tabulator-col-resize-handle.prev{
+					display: none;
+				}
+			}
+
+			//movable row handle
+			&.tabulator-row-handle{
+
+				display: inline-flex;
+				align-items:center;
+
+				-moz-user-select: none;
+				-khtml-user-select: none;
+				-webkit-user-select: none;
+				-o-user-select: none;
+
+				//handle holder
+				.tabulator-row-handle-box{
+					width:80%;
+
+					//Hamburger element
+					.tabulator-row-handle-bar{
+						width:100%;
+						height:3px;
+						margin:2px 10% 0 10%;
+						background:#666;
+					}
+				}
+			}
+		}
+
+		//row grouping element
+		&.tabulator-group{
+
+			box-sizing:border-box;
+			border-bottom:1px solid #999;
+			border-right:1px solid $rowBorderColor;
+			border-top:1px solid #999;
+			padding:5px;
+			padding-left:10px;
+			background:#fafafa;
+			font-weight:bold;
+
+			min-width: 100%;
+
+			&:hover{
+				cursor:pointer;
+				background-color:rgba(0,0,0,.1);
+			}
+
+			&.tabulator-group-visible{
+				.tabulator-arrow{
+					margin-right:10px;
+					border-left: 6px solid transparent;
+					border-right: 6px solid transparent;
+					border-top: 6px solid $sortArrowActive;
+					border-bottom: 0;
+				}
+			}
+
+			&.tabulator-group-level-1{
+				.tabulator-arrow{
+					margin-left:20px;
+				}
+			}
+
+			&.tabulator-group-level-2{
+				.tabulator-arrow{
+					margin-left:40px;
+				}
+			}
+
+			&.tabulator-group-level-3{
+				.tabulator-arrow{
+					margin-left:60px;
+				}
+			}
+
+			&.tabulator-group-level-4{
+				.tabulator-arrow{
+					margin-left:80px;
+				}
+			}
+
+			&.tabulator-group-level-5{
+				.tabulator-arrow{
+					margin-left:1000px;
+				}
+			}
+
+			//sorting arrow
+			.tabulator-arrow{
+				display: inline-block;
+				width: 0;
+				height: 0;
+				margin-right:16px;
+				border-top: 6px solid transparent;
+				border-bottom: 6px solid transparent;
+				border-right: 0;
+				border-left: 6px solid $sortArrowActive;
+				vertical-align:middle;
+			}
+
+			span{
+				margin-left:10px;
+				color:#666;
+			}
+		}
+	}
+
+	//column resize handles
+	.tabulator-col-resize-handle{
+		position:absolute;
+		right:0;
+		top:0;
+		bottom:0;
+		width:5px;
+
+		&.prev{
+			left:0;
+			right:auto;
+		}
+
+		&:hover{
+			cursor:ew-resize;
+		}
+	}
+
+
+	//footer element
+	.tabulator-footer{
+		padding:5px 10px;
+		border-top:1px solid $footerSeperatorColor;
+		background-color: $footerBackgroundColor;
+		text-align:right;
+		color: $footerTextColor;
+		font-weight:bold;
+		white-space:nowrap;
+		user-select:none;
+
+		-moz-user-select: none;
+		-khtml-user-select: none;
+		-webkit-user-select: none;
+		-o-user-select: none;
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			width:calc("100% + 20px");
+			margin:-5px -10px 5px -10px;
+
+			text-align: left;
+
+			background:darken($footerBackgroundColor, 5%) !important;
+
+			.tabulator-row{
+				background:darken($footerBackgroundColor, 5%) !important;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+			}
+
+			border-bottom:1px solid $footerBackgroundColor;
+			border-top:1px solid $rowBorderColor;
+
+			overflow: hidden;
+
+			&:only-child{
+				margin-bottom:-5px;
+				border-bottom:none;
+			}
+		}
+
+		//pagination container element
+		.tabulator-pages{
+			margin:0 7px;
+		}
+
+		//pagination button
+		.tabulator-page{
+			display:inline-block;
+			margin:0 2px;
+			border:1px solid $footerBorderColor;
+			border-radius:3px;
+			padding:2px 5px;
+			background:rgba(255,255,255,.2);
+			color: $footerTextColor;
+			font-family:inherit;
+			font-weight:inherit;
+			font-size:inherit;
+
+			&.active{
+				color:#d00;
+			}
+
+			&:disabled{
+				opacity:.5;
+			}
+
+			&:not(.disabled){
+				&:hover{
+					cursor:pointer;
+					background:rgba(0,0,0,.2);
+					color:#fff;
+				}
+			}
+		}
+	}
+
+	//holding div that contains loader and covers tabulator element to prevent interaction
+	.tablulator-loader{
+		position:absolute;
+		display: flex;
+		align-items:center;
+
+		top:0;
+		left:0;
+		z-index:100;
+
+		height:100%;
+		width:100%;
+		background:rgba(0,0,0,.4);
+		text-align:center;
+
+		//loading message element
+		.tabulator-loader-msg{
+			display:inline-block;
+
+			margin:0 auto;
+			padding:10px 20px;
+
+			border-radius:10px;
+
+			background:#fff;
+			font-weight:bold;
+			font-size:16px;
+
+			//loading message
+			&.tabulator-loading{
+				border:4px solid #333;
+				color:#000;
+			}
+
+			//error message
+			&.tabulator-error{
+				border:4px solid #D00;
+				color:#590000;
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/js/tabulator/src/scss/tabulator_site.scss b/js/tabulator/src/scss/tabulator_site.scss
new file mode 100644
index 0000000..fa28fb0
--- /dev/null
+++ b/js/tabulator/src/scss/tabulator_site.scss
@@ -0,0 +1,689 @@
+
+//Main Theme Variables
+$backgroundColor: #fff; //background color of tabulator
+$borderColor:#222; //border to tablulator
+$textSize:14px; //table text size
+
+//header themeing
+$headerBackgroundColor:#222; //border to tablulator
+$headerTextColor:#fff; //header text colour
+$headerBorderColor:#aaa;  //header border color
+$headerSeperatorColor:#3FB449; //header bottom seperator color
+$headerMargin:4px; //padding round header
+
+//column header arrows
+$sortArrowActive: #3FB449;
+$sortArrowInactive: #bbb;
+
+//row themeing
+$rowBackgroundColor:#fff; //table row background color
+$rowAltBackgroundColor:#EFEFEF; //table row background color
+$rowBorderColor:#aaa; //table border color
+$rowTextColor:#333; //table text color
+$rowHoverBackground:#bbb; //row background color on hover
+
+$rowSelectedBackground: #9ABCEA; //row background color when selected
+$rowSelectedBackgroundHover: #769BCC;//row background color when selected and hovered
+
+$editBoxColor:#1D68CD; //border color for edit boxes
+$errorColor:#dd0000; //error indication
+
+//footer themeing
+$footerBackgroundColor:#222; //border to tablulator
+$footerTextColor:#222; //footer text colour
+$footerBorderColor:#aaa; //footer border color
+$footerSeperatorColor:#3FB449; //footer bottom seperator color
+
+
+
+//Tabulator Containing Element
+.tabulator{
+	position: relative;
+
+	border-bottom: 5px solid $borderColor;
+
+	background-color: $backgroundColor;
+
+	font-size:$textSize;
+	text-align: left;
+	overflow:hidden;
+
+	-webkit-transform: translatez(0);
+	-moz-transform: translatez(0);
+	-ms-transform: translatez(0);
+	-o-transform: translatez(0);
+	transform: translatez(0);
+
+	&[tabulator-layout="fitDataFill"]{
+		.tabulator-tableHolder{
+			.tabulator-table{
+				min-width:100%;
+			}
+		}
+	}
+
+	&[tabulator-layout="fitColumns"]{
+		.tabulator-row{
+			.tabulator-cell{
+				&:last-of-type{
+					border-right: none;
+				}
+			}
+		}
+	}
+
+
+	&.tabulator-block-select{
+		user-select: none;
+	}
+
+	//column header containing element
+	.tabulator-header{
+		position:relative;
+		box-sizing: border-box;
+
+		width:100%;
+
+		border-bottom:3px solid $headerSeperatorColor;
+		background-color: $headerBackgroundColor;
+		color: $headerTextColor;
+		font-weight:bold;
+
+		white-space: nowrap;
+		overflow:hidden;
+
+		-moz-user-select: none;
+		-khtml-user-select: none;
+		-webkit-user-select: none;
+		-o-user-select: none;
+
+		//individual column header element
+		.tabulator-col{
+			display:inline-block;
+
+			position:relative;
+			box-sizing:border-box;
+			border-right:1px solid $headerBorderColor;
+			background-color: $headerBackgroundColor;
+			text-align:left;
+			vertical-align: bottom;
+			overflow: hidden;
+
+			&.tabulator-moving{
+				position: absolute;
+				border:1px solid  $headerSeperatorColor;
+				background:darken($headerBackgroundColor, 10%);
+				pointer-events: none;
+			}
+
+			//hold content of column header
+			.tabulator-col-content{
+				position: relative;
+				padding:8px;
+
+				//hold title of column header
+				.tabulator-col-title{
+					box-sizing:border-box;
+					width: 100%;
+
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					vertical-align:bottom;
+
+					//element to hold title editor
+					.tabulator-title-editor{
+						box-sizing: border-box;
+						width: 100%;
+
+						border:1px solid #999;
+
+						padding:1px;
+
+						background: #fff;
+					}
+				}
+
+				//column sorter arrow
+				.tabulator-arrow{
+					display: inline-block;
+					position: absolute;
+					top:14px;
+					right:8px;
+					width: 0;
+					height: 0;
+					border-left: 6px solid transparent;
+					border-right: 6px solid transparent;
+					border-bottom: 6px solid $sortArrowInactive;
+				}
+
+			}
+
+			//complex header column group
+			&.tabulator-col-group{
+
+				//gelement to hold sub columns in column group
+				.tabulator-col-group-cols{
+					position:relative;
+					display: flex;
+
+					border-top:1px solid $headerBorderColor;
+					overflow: hidden;
+
+					.tabulator-col:last-child{
+						margin-right:-1px;
+					}
+				}
+			}
+
+			//hide left resize handle on first column
+			&:first-child{
+				.tabulator-col-resize-handle.prev{
+					display: none;
+				}
+			}
+
+			//placeholder element for sortable columns
+			&.ui-sortable-helper{
+				position: absolute;
+				background-color: $headerBackgroundColor !important;
+				border:1px solid $headerBorderColor;
+			}
+
+			//header filter containing element
+			.tabulator-header-filter{
+				position: relative;
+				box-sizing: border-box;
+				margin-top:2px;
+				width:100%;
+				text-align: center;
+
+				//styling adjustment for inbuilt editors
+				textarea{
+					height:auto !important;
+				}
+
+				svg{
+					margin-top: 3px;
+				}
+			}
+
+			//styling child elements for sortable columns
+			&.tabulator-sortable{
+				.tabulator-col-title{
+					padding-right:25px;
+				}
+
+				&:hover{
+					cursor:pointer;
+					background-color:darken($headerBackgroundColor, 10%);
+				}
+
+				&[aria-sort="none"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowInactive;
+					}
+				}
+
+				&[aria-sort="asc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: none;
+						border-bottom: 6px solid $sortArrowActive;
+					}
+				}
+
+				&[aria-sort="desc"]{
+					.tabulator-col-content .tabulator-arrow{
+						border-top: 6px solid $sortArrowActive;
+						border-bottom: none;
+					}
+				}
+			}
+
+		}
+
+		.tabulator-frozen{
+			display: inline-block;
+			position: absolute;
+
+			// background-color: inherit;
+
+			z-index: 10;
+
+			&.tabulator-frozen-left{
+				border-right:2px solid $rowBorderColor;
+			}
+
+			&.tabulator-frozen-right{
+				border-left:2px solid $rowBorderColor;
+			}
+		}
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			min-width:200%;
+
+			background:lighten($headerBackgroundColor, 10%) !important;
+
+			.tabulator-row{
+				background:lighten($headerBackgroundColor, 10%) !important;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+			}
+
+			border-top:1px solid $rowBorderColor;
+			// border-bottom:1px solid $headerBorderColor;
+
+			overflow: hidden;
+		}
+	}
+
+	//scrolling element to hold table
+	.tabulator-tableHolder{
+		position:relative;
+		width:100%;
+		white-space: nowrap;
+		overflow:auto;
+		-webkit-overflow-scrolling: touch;
+
+		&:focus{
+			outline: none;
+		}
+
+		//default placeholder element
+		.tabulator-placeholder{
+			position: absolute;
+			box-sizing:border-box;
+			display: flex;
+			align-items:center;
+
+			top:0;
+			left:0;
+			height:100%;
+			width:100%;
+
+			span{
+				display: inline-block;
+
+				margin:0 auto;
+				padding:10px;
+
+				color:$headerSeperatorColor;
+				font-weight: bold;
+				font-size: 20px;
+			}
+		}
+
+		//element to hold table rows
+		.tabulator-table{
+			position:relative;
+			display:inline-block;
+			background-color:$rowBackgroundColor;
+			white-space: nowrap;
+			overflow:visible;
+			color:$rowTextColor;
+
+			.tabulator-row{
+				&.tabulator-calcs{
+					font-weight: bold;
+					background:lighten($headerBackgroundColor, 15%) !important;
+					color:$headerTextColor;
+				}
+			}
+		}
+	}
+
+	//row element
+	.tabulator-row{
+		position: relative;
+		box-sizing: border-box;
+		min-height:$textSize + ($headerMargin * 2);
+		background-color: $rowBackgroundColor;
+
+
+		&.tabulator-row-even{
+			background-color: $rowAltBackgroundColor;
+		}
+
+		&.tabulator-selectable:hover{
+			background-color:$rowHoverBackground;
+			cursor: pointer;
+		}
+
+		&.tabulator-selected{
+			background-color:$rowSelectedBackground;
+		}
+
+		&.tabulator-selected:hover{
+			background-color:$rowSelectedBackgroundHover;
+			cursor: pointer;
+		}
+
+		&.tabulator-row-moving{
+			border:1px solid #000;
+			background:#fff;
+		}
+
+		&.tabulator-moving{
+			position: absolute;
+
+			border-top:1px solid  $rowBorderColor;
+			border-bottom:1px solid  $rowBorderColor;
+
+			pointer-events: none !important;
+			z-index:15;
+		}
+
+		.tabulator-frozen{
+			display: inline-block;
+			position: absolute;
+
+			background-color: inherit;
+
+			z-index: 10;
+
+			&.tabulator-frozen-left{
+				border-right:2px solid $rowBorderColor;
+			}
+
+			&.tabulator-frozen-right{
+				border-left:2px solid $rowBorderColor;
+			}
+		}
+
+		//cell element
+		.tabulator-cell{
+			display:inline-block;
+			position: relative;
+			box-sizing:border-box;
+			padding:6px;
+			border-right:1px solid $rowBorderColor;
+			vertical-align:middle;
+			white-space:nowrap;
+			overflow:hidden;
+			text-overflow:ellipsis;
+
+
+			&.tabulator-editing{
+				border:1px solid  $editBoxColor;
+				padding: 0;
+
+				input, select{
+					border:1px;
+					background:transparent;
+				}
+			}
+
+			&.tabulator-validation-fail{
+				border:1px solid $errorColor;
+				input, select{
+					border:1px;
+					background:transparent;
+
+					color: $errorColor;
+				}
+			}
+
+			//hide left resize handle on first column
+			&:first-child{
+				.tabulator-col-resize-handle.prev{
+					display: none;
+				}
+			}
+
+			//movable row handle
+			&.tabulator-row-handle{
+
+				display: inline-flex;
+				align-items:center;
+
+				-moz-user-select: none;
+				-khtml-user-select: none;
+				-webkit-user-select: none;
+				-o-user-select: none;
+
+				//handle holder
+				.tabulator-row-handle-box{
+					width:80%;
+
+					//Hamburger element
+					.tabulator-row-handle-bar{
+						width:100%;
+						height:3px;
+						margin:2px 10% 0 10%;
+						background:#666;
+					}
+				}
+			}
+		}
+
+		//row grouping element
+		&.tabulator-group{
+			box-sizing:border-box;
+			border-right:1px solid $rowBorderColor;
+			border-top:1px solid #000;
+			border-bottom:2px solid $headerSeperatorColor;
+			padding:5px;
+			padding-left:10px;
+			background:$headerBackgroundColor;
+			color:$headerTextColor;
+			font-weight:bold;
+
+			min-width: 100%;
+
+			&:hover{
+				cursor:pointer;
+				background-color:darken($headerBackgroundColor, 10%);
+			}
+
+			&.tabulator-group-visible{
+				.tabulator-arrow{
+					margin-right:10px;
+					border-left: 6px solid transparent;
+					border-right: 6px solid transparent;
+					border-top: 6px solid $sortArrowActive;
+					border-bottom: 0;
+				}
+			}
+
+			&.tabulator-group-level-1{
+				.tabulator-arrow{
+					margin-left:20px;
+				}
+			}
+
+			&.tabulator-group-level-2{
+				.tabulator-arrow{
+					margin-left:40px;
+				}
+			}
+
+			&.tabulator-group-level-3{
+				.tabulator-arrow{
+					margin-left:60px;
+				}
+			}
+
+			&.tabulator-group-level-4{
+				.tabulator-arrow{
+					margin-left:80px;
+				}
+			}
+
+			&.tabulator-group-level-5{
+				.tabulator-arrow{
+					margin-left:1000px;
+				}
+			}
+
+			//sorting arrow
+			.tabulator-arrow{
+				display: inline-block;
+				width: 0;
+				height: 0;
+				margin-right:16px;
+				border-top: 6px solid transparent;
+				border-bottom: 6px solid transparent;
+				border-right: 0;
+				border-left: 6px solid $sortArrowActive;
+				vertical-align:middle;
+			}
+
+			span{
+				margin-left:10px;
+				color:$headerSeperatorColor;
+			}
+		}
+
+	}
+
+	//footer element
+	.tabulator-footer{
+		padding:5px 10px;
+		padding-top:8px;
+		border-top:3px solid $footerSeperatorColor;
+		background-color: $footerBackgroundColor;
+		text-align:right;
+		color: $footerTextColor;
+		font-weight:bold;
+		white-space:nowrap;
+		user-select:none;
+
+		-moz-user-select: none;
+		-khtml-user-select: none;
+		-webkit-user-select: none;
+		-o-user-select: none;
+
+		.tabulator-calcs-holder{
+			box-sizing:border-box;
+			width:calc("100% + 20px");
+			margin:-8px -10px 8px -10px;
+
+			text-align: left;
+
+			background:lighten($footerBackgroundColor, 10%) !important;
+
+			.tabulator-row{
+				background:lighten($footerBackgroundColor, 10%) !important;
+				color:$headerTextColor !important;
+
+				.tabulator-col-resize-handle{
+					display: none;
+				}
+			}
+
+			// border-top:1px solid $rowBorderColor;
+			border-bottom:1px solid $rowBorderColor;
+
+			overflow: hidden;
+
+			&:only-child{
+				margin-bottom:-5px;
+				border-bottom:none;
+			}
+		}
+
+		//pagination container element
+		.tabulator-pages{
+			margin:0 7px;
+		}
+
+		//pagination button
+		.tabulator-page{
+			display:inline-block;
+
+			margin:0 2px;
+			padding:2px 5px;
+
+			border:1px solid $footerBorderColor;
+			border-radius:3px;
+
+			background:#fff;
+
+			color: $footerTextColor;
+			font-family:inherit;
+			font-weight:inherit;
+			font-size:inherit;
+
+			&.active{
+				color:$footerSeperatorColor;
+			}
+
+			&:disabled{
+				opacity:.5;
+			}
+
+			&:not(.disabled){
+				&:hover{
+					cursor:pointer;
+					background:rgba(0,0,0,.2);
+					color:#fff;
+				}
+			}
+		}
+	}
+
+	//column resize handles
+	.tabulator-col-resize-handle{
+		position:absolute;
+		right:0;
+		top:0;
+		bottom:0;
+		width:5px;
+
+		&.prev{
+			left:0;
+			right:auto;
+		}
+
+		&:hover{
+			cursor:ew-resize;
+		}
+	}
+
+
+	//holding div that contains loader and covers tabulator element to prevent interaction
+	.tablulator-loader{
+		position:absolute;
+		display: flex;
+		align-items:center;
+
+		top:0;
+		left:0;
+		z-index:100;
+
+		height:100%;
+		width:100%;
+		background:rgba(0,0,0,.4);
+		text-align:center;
+
+		//loading message element
+		.tabulator-loader-msg{
+			display:inline-block;
+
+			margin:0 auto;
+			padding:10px 20px;
+
+			border-radius:10px;
+
+			background:#fff;
+			font-weight:bold;
+			font-size:16px;
+
+			//loading message
+			&.tabulator-loading{
+				border:4px solid #333;
+				color:#000;
+			}
+
+			//error message
+			&.tabulator-error{
+				border:4px solid #D00;
+				color:#590000;
+			}
+		}
+	}
+}
\ No newline at end of file