From d3b85cbdb0ef2bd5256a4452de86ff11181b5320 Mon Sep 17 00:00:00 2001 From: Max Guglielmi Date: Fri, 7 Aug 2015 20:11:27 +1000 Subject: [PATCH 1/8] Initial commit --- Gruntfile.js | 4 +- dist/starter.html | 15 +- dist/tablefilter/style/colsVisibility.css | 33 +- dist/tablefilter/style/filtersVisibility.css | 2 +- dist/tablefilter/style/tablefilter.css | 223 +- .../style/themes/default/default.css | 2 +- .../style/themes/mytheme/mytheme.css | 2 +- .../style/themes/skyblue/skyblue.css | 2 +- dist/tablefilter/tablefilter.js | 7029 ++++++++++++++++- dist/tablefilter/tf-1.js | 2228 +++++- static/style/alternating-rows.styl | 4 +- static/style/config.styl | 34 +- static/style/extensions/colsVisibility.styl | 8 +- static/style/filter-checklist.styl | 6 +- static/style/filters.styl | 122 +- static/style/help.styl | 23 +- static/style/mixins/arrow.styl | 63 + static/style/mixins/box-shadow.styl | 8 + static/style/reset-button.styl | 17 +- static/style/table.styl | 28 +- static/style/toolbar.styl | 55 +- static/templates/starter.html | 15 +- 22 files changed, 9700 insertions(+), 223 deletions(-) create mode 100644 static/style/mixins/arrow.styl create mode 100644 static/style/mixins/box-shadow.styl diff --git a/Gruntfile.js b/Gruntfile.js index e878619f..c50bb156 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -47,9 +47,9 @@ module.exports = function (grunt) { dist: { src: [ '**', - '!*.styl', + '!**/*.styl', '!**/extensions/**', - '!**/*.styl' + '!**/mixins/**' ], cwd: 'static/style', dest: 'dist/tablefilter/style', diff --git a/dist/starter.html b/dist/starter.html index cbb6ccac..f4b52ec1 100644 --- a/dist/starter.html +++ b/dist/starter.html @@ -450,14 +450,21 @@ - - - diff --git a/static/templates/columns-visibility.html b/static/templates/columns-visibility.html index 0b842691..cc4128c4 100644 --- a/static/templates/columns-visibility.html +++ b/static/templates/columns-visibility.html @@ -32,10 +32,10 @@ var tfConfig = { alternate_rows: true, rows_counter: true, btn_reset: true, - btn_reset_text: "Clear", + btn_reset_text: 'Clear', status_bar: true, - col_1: "select", - col_2: "select", + col_1: 'select', + col_2: 'select', /* columns visibility and sort extension */ extensions:[ diff --git a/static/templates/starter.html b/static/templates/starter.html index 45d28bb2..3dde11fa 100644 --- a/static/templates/starter.html +++ b/static/templates/starter.html @@ -23,6 +23,7 @@ loader: true, status_bar: true, mark_active_columns: true, + highlight_keywords: true, col_number_format: [ null, null, 'US', 'US', 'US', 'US', From 443f31c579866a3f1aa9c55595ad27b0d6db0aa8 Mon Sep 17 00:00:00 2001 From: Max Guglielmi Date: Sun, 9 Aug 2015 22:36:28 +1000 Subject: [PATCH 6/8] Restyled themes --- demos/advanced-grid-editable.html | 7 +- demos/advanced-grid.html | 13089 ---------------- demos/data-types.html | 12 +- demos/theme-roller.html | 4 +- dist/tablefilter/style/colsVisibility.css | 2 +- dist/tablefilter/style/filtersVisibility.css | 4 +- dist/tablefilter/style/tablefilter.css | 2 +- .../style/themes/default/default.css | 39 +- .../style/themes/mytheme/mytheme.css | 58 +- .../style/themes/skyblue/skyblue.css | 67 +- dist/tablefilter/tablefilter.js | 7029 +-------- dist/tablefilter/tf-1.js | 2228 +-- .../style/extensions/filtersVisibility.styl | 2 +- static/style/themes/default/default.styl | 47 +- static/style/themes/mytheme/mytheme.styl | 62 +- static/style/themes/skyblue/skyblue.styl | 71 +- static/templates/advanced-grid-editable.html | 7 +- static/templates/data-types.html | 12 +- static/templates/theme-roller.html | 4 +- 19 files changed, 144 insertions(+), 22602 deletions(-) delete mode 100644 demos/advanced-grid.html diff --git a/demos/advanced-grid-editable.html b/demos/advanced-grid-editable.html index 35730d4c..90e583e3 100644 --- a/demos/advanced-grid-editable.html +++ b/demos/advanced-grid-editable.html @@ -13027,6 +13027,7 @@ var filtersConfig = { base_path: '../dist/tablefilter/', grid_layout: true, + grid_width: '900px', alternate_rows: true, btn_reset: true, rows_counter: true, @@ -13035,9 +13036,9 @@ col_1: 'select', col_2: 'select', col_widths: [ - "150px", "70px", "70px", - "120px", "120px", "100px", - "100px", "100px", "100px" + '150px', '90px', '70px', + '120px', '120px', '100px', + '100px', '100px', '100px' ], extensions:[ { diff --git a/demos/advanced-grid.html b/demos/advanced-grid.html deleted file mode 100644 index a7967e7a..00000000 --- a/demos/advanced-grid.html +++ /dev/null @@ -1,13089 +0,0 @@ - - - - TableFilter v0.0.0 - Selection Grid Demo - - - - -

TableFilter v0.0.0

-

Selection grid demo

- -

- To make the grid rows selectable, you need to import the - ezEditTable plugin, enable the selection property - and configure the advancedGrid with the ezEditTable - options. -

- -

- Instructions: Double-click on a row on or press enter key to - perform action. Enable multiple rows selection by checking the Multiple - selection checkbox. Keep Ctrl/Cmd or Shift key - pressed to select multiple rows. -

-

-
-
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
countryisocodeyearPOPXRATPPPcgdpccci
AngolaAGO199410627.1859.5149993953.321095.9434.669.09
AngolaAGO199510972.002750.229981007.531244.7341.869.43
AngolaAGO199611316.94128029.203154873.281362.3237.178.57
AngolaAGO1997nananananana
AngolaAGO1998nananananana
AngolaAGO1999nananananana
AngolaAGO2000nananananana
AlbaniaALB19943185.0094.6233291623.452514.7987.7814.42
AlbaniaALB19953225.0092.6975021425.052775.9883.3413.10
AlbaniaALB19963266.00104.498901428.053070.8493.0610.65
AlbaniaALB19973339.00148.932907136.632789.1392.8911.02
AlbaniaALB19983364.00150.633300844.673067.5291.2111.00
AlbaniaALB19993383.00137.690597543.843413.6589.9411.23
AlbaniaALB20003411.00143.709396443.163657.9985.4512.70
ArgentinaARG199434304.270.9990082980.7410193.4968.8917.41
ArgentinaARG199534768.000.9997500180.7410024.1267.4415.45
ArgentinaARG199635220.000.9996625190.7310671.5368.2115.75
ArgentinaARG199735672.000.9994999770.7111545.1969.1817.09
ArgentinaARG199836125.000.9994999770.6911919.9569.3917.28
ArgentinaARG199936580.000.9994999770.6711554.3769.7215.27
ArgentinaARG200037032.000.9994999770.6611729.0869.0614.08
ArmeniaARM19943748.00288.650787422.812181.6886.3512.97
ArmeniaARM19953760.00405.908294762.542222.2592.2310.88
ArmeniaARM19963774.00414.041503973.212393.2789.9010.91
ArmeniaARM19973786.00490.846801883.992415.8597.2011.46
ArmeniaARM19983795.00504.915008592.652616.6895.8111.00
ArmeniaARM19993801.00535.061828690.482791.5492.509.81
ArmeniaARM20003803.00539.525817987.503068.2190.6710.04
AntiguaATG199465.732.7000000481.3914807.5141.829.89
AntiguaATG199566.292.7000000481.5712790.7450.4517.76
AntiguaATG199666.862.7000000481.7012923.0044.1116.27
AntiguaATG199766.292.7000000481.6714182.0438.2714.72
AntiguaATG199866.862.7000000481.6814912.1239.6414.17
AntiguaATG199967.432.7000000481.6316035.2438.5613.69
AntiguaATG200068.002.7000000481.5218006.9034.8211.85
AustraliaAUS199417838.001.36781.2820637.1670.5424.28
AustraliaAUS199518072.001.3491.2821771.3169.8423.20
AustraliaAUS199618311.001.27791.2722834.6869.1223.65
AustraliaAUS199718524.001.34741.2624010.9269.3824.65
AustraliaAUS199818730.001.59181.2625002.1170.2725.24
AustraliaAUS199918937.001.54991.2626342.6970.2925.27
AustraliaAUS200019157.001.72481.2927193.4869.5523.06
AustriaAUT19948029.7011.421814.2119950.3868.7625.42
AustriaAUT19958046.5010.081514.2120733.7568.6325.73
AustriaAUT19968059.4010.586614.2121398.9769.7525.01
AustriaAUT19978072.2012.204214.1521988.9669.8425.52
AustriaAUT19988078.4012.379114.0623016.3869.6324.80
AustriaAUT19998092.3012.915814.0223849.1470.0424.61
AustriaAUT20008110.2014.935413.9924835.7169.1925.34
AzerbaijanAZE19947597.001570.224976110.312246.8665.7015.20
AzerbaijanAZE19957685.004413.542969696.691992.8777.3812.11
AzerbaijanAZE19967763.004301.26416860.942046.8582.3116.97
AzerbaijanAZE19977838.003985.375877.092291.0372.3221.39
AzerbaijanAZE19987913.003868.998047876.142480.9376.3117.56
AzerbaijanAZE19997983.004120.166992859.952732.7070.9213.22
AzerbaijanAZE20008049.004474.153809823.803554.6259.1310.77
BurundiBDI19946024.75252.662506150.63766.5788.583.15
BurundiBDI19956156.00249.757507357.11709.9286.363.01
BurundiBDI19966287.08302.746704168.20634.7883.643.62
BurundiBDI19976417.85352.350799681.38645.3280.452.37
BurundiBDI19986548.19447.765808194.95632.0885.663.43
BurundiBDI19996677.95563.562581.58739.5784.033.17
BurundiBDI20006807.00720.6732788125.81618.7187.564.18
BelgiumBEL199410116.0033.456538.8619887.3855.1022.32
BelgiumBEL199510137.0029.4838.8920702.1354.2423.13
BelgiumBEL199610155.0030.961539.0021101.1954.9322.53
BelgiumBEL199710180.0035.773938.9722107.8454.3923.33
BelgiumBEL199810203.0036.298638.9022958.8454.7123.57
BelgiumBEL199910222.0037.864139.1223760.3854.8022.94
BelgiumBEL200010254.0043.784939.0725008.4954.2923.62
BeninBEN19945325.00555.2047119156.33998.3489.455.35
BeninBEN19955475.00499.148407171.131071.6089.337.70
BeninBEN19965628.82511.5523987181.371106.8689.907.07
BeninBEN19975794.36583.6693726187.631101.0292.938.06
BeninBEN19985950.33589.9517822190.951178.4690.987.55
BeninBEN19996109.53615.6990967200.191174.9092.617.86
BeninBEN20006272.00711.9763184200.611224.7492.278.25
Burkina FasoBFA19949755.03555.2047119125.76838.7679.816.57
Burkina FasoBFA19959988.00499.148407136.65860.8980.419.29
Burkina FasoBFA199610225.00511.5523987144.18881.1180.4012.12
Burkina FasoBFA199710473.53583.6693726141.78899.0176.9414.94
Burkina FasoBFA199810730.33589.9517822139.66979.5880.6612.24
Burkina FasoBFA199910995.70615.6990967137.641001.7079.8113.14
Burkina FasoBFA200011274.00711.9763184140.56985.6776.5314.87
BangladeshBGD1994117897.5440.211738598.461345.3784.379.56
BangladeshBGD1995119768.0040.278320318.761439.1985.139.79
BangladeshBGD1996121679.3441.794170389.001506.2586.9510.16
BangladeshBGD1997124381.4143.892120369.281561.9784.8510.73
BangladeshBGD1998126564.7046.905651099.691629.8682.4511.25
BangladeshBGD1999128787.3249.0853996310.151681.4482.6711.71
BangladeshBGD2000131050.0052.1416702310.201772.4681.8812.14
BulgariaBGR19948435.0054.133668549.466587.5364.403.03
BulgariaBGR19958400.0067.1708285815.756651.3067.053.27
BulgariaBGR19968356.00177.888706335.425893.2668.563.34
BulgariaBGR19978312.071.6818790440.385470.7962.694.42
BulgariaBGR19988257.001.7603579760.485593.6567.916.72
BulgariaBGR19998208.001.8363829850.495760.2070.967.72
BulgariaBGR20008166.962.1232750420.496355.7067.346.95
BahrainBHR1994nananananana
BahrainBHR1995nananananana
BahrainBHR1996599.000.3759999870.2713261.1742.286.39
BahrainBHR1997nananananana
BahrainBHR1998nananananana
BahrainBHR1999nananananana
BahrainBHR2000nananananana
BahamasBHS1994nananananana
BahamasBHS1995nananananana
BahamasBHS1996284.0010.7416527.4874.029.91
BahamasBHS1997nananananana
BahamasBHS1998nananananana
BahamasBHS1999nananananana
BahamasBHS2000nananananana
BelarusBLR199410356.0010600316.935405.0055.9923.98
BelarusBLR199510329.00115002164.165363.7953.1517.58
BelarusBLR199610298.00155003161.365667.2253.5218.06
BelarusBLR199710117.0026.019920355.616365.6754.8319.16
BelarusBLR199810069.0046.127250679.677181.9356.2518.10
BelarusBLR199910035.00248.794906638.447769.3657.8714.02
BelarusBLR200010005.00876.75102.038738.2356.0213.77
BelizeBLZ1994210.8920.885938.9458.0114.22
BelizeBLZ1995216.7020.896125.6860.8411.55
BelizeBLZ1996222.4020.926198.9060.2511.07
BelizeBLZ1997217.0620.916540.3659.6414.48
BelizeBLZ1998224.4520.906595.5161.2814.83
BelizeBLZ1999232.1020.936773.4566.1114.87
BelizeBLZ2000240.0020.957169.9071.8318.77
BermudaBMU1994nananananana
BermudaBMU1995nananananana
BermudaBMU199662.1011.4218793.4188.7414.57
BermudaBMU1997nananananana
BermudaBMU1998nananananana
BermudaBMU1999nananananana
BermudaBMU2000nananananana
BoliviaBOL19947237.004.6205167771.572426.4079.168.06
BoliviaBOL19957414.004.8003420831.712545.5277.288.56
BoliviaBOL19967588.005.0746130941.872641.7776.819.67
BoliviaBOL19977767.005.2542581561.972727.2578.1312.04
BoliviaBOL19987950.005.510132792.122760.1180.0814.68
BoliviaBOL19998138.005.812407972.092831.6180.4711.10
BoliviaBOL20008328.706.1835417752.102933.8977.9410.75
BrazilBRA1994157188.100.6392999890.356322.6257.5416.52
BrazilBRA1995159346.000.9176666740.616674.2863.9517.20
BrazilBRA1996161513.171.0051000120.706881.4463.6016.62
BrazilBRA1997163859.681.0779919620.747166.2562.9417.06
BrazilBRA1998166045.571.1605169770.787020.0862.2616.94
BrazilBRA1999168227.981.8147330280.797216.5864.5215.61
BrazilBRA2000170406.001.8301420210.837744.7165.7515.63
BarbadosBRB1994264.3021.0113076.4279.393.38
BarbadosBRB1995264.2021.0513409.7181.553.56
BarbadosBRB1996264.4021.0314607.6582.723.11
BarbadosBRB1997264.7421.0715570.5589.863.66
BarbadosBRB1998265.3021.1216058.5489.294.06
BarbadosBRB1999266.0821.1416463.8891.804.17
BarbadosBRB2000267.0021.1217526.3591.603.93
BhutanBTN1994nananananana
BhutanBTN1995nananananana
BhutanBTN1996715.8735.433170328.311968.5150.5723.23
BhutanBTN1997nananananana
BhutanBTN1998nananananana
BhutanBTN1999nananananana
BhutanBTN2000nananananana
BotswanaBWA19941425.422.6846458911.495564.9343.2516.83
BotswanaBWA19951460.002.7722070221.605803.2441.9916.84
BotswanaBWA19961496.003.3241970541.806070.5139.7117.15
BotswanaBWA19971533.003.6507630351.986087.7349.9915.44
BotswanaBWA19981561.724.2258801462.046533.7659.6812.91
BotswanaBWA19991588.124.6243948942.097027.9067.6711.61
BotswanaBWA2000nananananana
Central African RepublicCAF19943220.09555.2047119152.27965.2879.225.21
Central African RepublicCAF19953288.00499.148407156.441088.1971.406.48
Central African RepublicCAF19963354.09511.5523987182.37894.9593.682.36
Central African RepublicCAF19973528.62583.6693726183.32902.7684.874.61
Central African RepublicCAF19983603.40589.9517822174.96979.1575.096.34
Central African RepublicCAF1999nananananana
Central African RepublicCAF2000nananananana
CanadaCAN199429036.001.36561.2321350.3959.2324.00
CanadaCAN199529353.901.37241.2122450.8657.9423.78
CanadaCAN199629671.901.36351.2123090.8658.4123.18
CanadaCAN199729987.001.38461.1924412.3258.3626.16
CanadaCAN199830248.001.48351.1924944.1959.3425.38
CanadaCAN199930493.001.48571.1926479.8658.3225.06
CanadaCAN200030750.001.48511.1828730.6955.6725.86
SwitzerlandCHE19946994.001.36772.1823466.1958.9625.97
SwitzerlandCHE19957041.001.18252.1424110.1258.4626.98
SwitzerlandCHE19967072.001.2362.1124460.4559.1026.22
SwitzerlandCHE19977089.001.45132.0825147.6659.3225.93
SwitzerlandCHE19987110.001.44982.0326290.7058.8927.07
SwitzerlandCHE19997144.001.50222.0027156.2458.9525.80
SwitzerlandCHE20007185.001.68882.0028208.7657.9826.89
ChileCHL199413994.40420.1766968202.067557.3760.5420.03
ChileCHL199514210.40396.7732849209.908676.4658.0223.45
ChileCHL199614418.80412.2666931220.378972.3561.4924.12
ChileCHL199714622.40419.2950134222.289706.6961.9724.59
ChileCHL199814821.70460.2875061227.679939.5163.6724.24
ChileCHL199915017.80508.7767029234.819774.9362.8918.04
ChileCHL200015211.30535.4655762238.8810388.9061.3419.70
ChinaCHN19941190918.028.6187429431.662551.9750.0622.34
ChinaCHN19951203324.038.3514165881.912759.9251.6822.47
ChinaCHN19961215414.278.3141746522.022972.6151.8822.04
ChinaCHN19971227176.708.2898168562.033141.0749.9721.82
ChinaCHN19981238599.428.2789583211.983317.7949.4421.60
ChinaCHN19991249981.568.2782497411.953483.3950.5521.00
ChinaCHN20001258821.038.2785043721.923843.6748.6621.09
Cote d`IvoireCIV199413132.24555.2047119177.721824.8374.254.88
Cote d`IvoireCIV199513528.00499.148407189.401947.1477.075.49
Cote d`IvoireCIV199613888.77511.5523987200.961958.7574.255.55
Cote d`IvoireCIV199714731.84583.6693726215.121969.6476.364.85
Cote d`IvoireCIV199815159.11589.9517822216.902055.6777.115.65
Cote d`IvoireCIV199915586.39615.6990967213.222057.5775.246.31
Cote d`IvoireCIV200016013.00711.9763184205.652027.5776.765.75
CameroonCMR199412822.14555.2047119148.621790.5083.495.30
CameroonCMR199513182.00499.148407169.281851.7381.814.73
CameroonCMR199613548.75511.5523987178.061894.6983.464.93
CameroonCMR199713917.84583.6693726177.172005.0284.395.02
CameroonCMR199814238.86589.9517822182.472018.3884.455.46
CameroonCMR199914558.39615.6990967188.101976.3484.655.79
CameroonCMR200014876.00711.9763184170.402300.7581.145.41
Congo, Republic ofCOG19942489.45555.2047119310.221324.2665.3711.94
Congo, Republic ofCOG19952561.00499.148407295.661394.8862.368.44
Congo, Republic ofCOG19962633.72511.5523987285.411728.9358.657.39
Congo, Republic ofCOG19972707.60583.6693726271.761842.4357.404.65
Congo, Republic ofCOG19982782.62589.9517822273.511511.0485.725.49
Congo, Republic ofCOG19992933.76615.6990967273.991698.5157.274.42
Congo, Republic ofCOG20003018.00711.9763184287.162532.8044.712.61
ColombiaCOL199437806.85844.8358765353.635046.5371.1915.83
ColombiaCOL199538558.00912.826416411.675323.4471.1115.77
ColombiaCOL199639285.001036.686035474.225528.8069.8114.73
ColombiaCOL199740042.001140.963013531.485718.5769.2214.03
ColombiaCOL199840804.001426.036987611.565642.3769.4512.81
ColombiaCOL199941539.001756.230957644.455565.9967.117.84
ColombiaCOL200042299.302087.904053691.015795.5567.938.79
ComorosCOM1994479.57416.398803792.721739.4890.866.47
ComorosCOM1995492.00374.357086299.761636.9188.226.79
ComorosCOM1996504.68383.6600037102.871576.5189.356.95
ComorosCOM1997517.62437.7471008104.401732.1192.656.09
ComorosCOM1998530.82442.4588013104.771714.7584.206.50
ComorosCOM1999544.28461.7745972104.581803.5785.714.78
ComorosCOM2000558.00533.9824829105.981822.8379.764.30
Cape VerdeCPV1994371.9781.8908309931.382882.4483.4521.97
Cape VerdeCPV1995382.0076.8533325231.713125.8181.0221.03
Cape VerdeCPV1996392.6482.5914688132.403194.1080.0319.19
Cape VerdeCPV1997403.5693.1766662635.123327.2581.6617.42
Cape VerdeCPV1998415.3298.1575012236.713473.7190.3915.55
Cape VerdeCPV1999427.79102.699996936.803835.6985.8615.58
Cape VerdeCPV2000441.00115.876602234.124299.1876.3313.79
Costa RicaCRI19943266.00157.066696276.785208.0465.1018.10
Costa RicaCRI19953333.00179.729202390.105398.0163.8616.01
Costa RicaCRI19963398.00207.6891937108.505150.7765.3413.86
Costa RicaCRI19973576.91232.5975037159.715233.9765.4616.36
Costa RicaCRI19983653.06257.229187175.865653.6563.5618.50
Costa RicaCRI19993731.07285.6846924197.926072.2660.2014.81
Costa RicaCRI20003811.00308.1867065218.495872.7962.1614.11
CubaCUB199410960.4910.364895.9671.250.97
CubaCUB199510998.5310.404980.8272.191.31
CubaCUB199611038.6010.395259.4072.361.54
CubaCUB1997nananananana
CubaCUB1998nananananana
CubaCUB1999nananananana
CubaCUB2000nananananana
CyprusCYP1994726.000.4921909870.3713616.5861.2818.47
CyprusCYP1995733.000.4524202050.3415920.3962.6420.32
CyprusCYP1996740.000.4663113060.3515813.2166.2717.88
CyprusCYP1997nananananana
CyprusCYP1998nananananana
CyprusCYP1999nananananana
CyprusCYP2000nananananana
Czech RepublicCZE199410333.6028.78519.7411756.6268.2021.63
Czech RepublicCZE199510327.3026.540710.6512551.7567.5525.24
Czech RepublicCZE199610315.3027.144911.2913457.7369.2925.85
Czech RepublicCZE199710303.0031.698411.8713734.3269.2424.80
Czech RepublicCZE199810293.6032.281212.5614213.2366.5423.27
Czech RepublicCZE199910285.0034.569212.7514393.1767.9721.81
Czech RepublicCZE200010272.1038.598412.8514844.0067.4224.21
DjiboutiDJI1994nananananana
DjiboutiDJI1995nananananana
DjiboutiDJI1996612.36177.72099366.932103.4476.894.15
DjiboutiDJI1997nananananana
DjiboutiDJI1998nananananana
DjiboutiDJI1999nananananana
DjiboutiDJI2000nananananana
DominicaDMA199472.442.7000000481.256400.1154.8911.40
DominicaDMA199573.002.7000000481.276507.3252.3713.93
DominicaDMA199673.002.7000000481.276903.5550.2712.41
DominicaDMA1997nananananana
DominicaDMA1998nananananana
DominicaDMA1999nananananana
DominicaDMA200073.002.7000000481.218284.0448.2112.21
DenmarkDNK19945201.006.36058.4222064.3767.1219.85
DenmarkDNK19955222.005.60248.3623119.2066.1022.21
DenmarkDNK19965256.005.79878.3824086.6266.2821.37
DenmarkDNK19975280.006.60458.3725273.9865.6423.66
DenmarkDNK19985303.006.70088.4226193.0166.6324.48
DenmarkDNK19995321.006.97628.5626988.9066.0222.25
DenmarkDNK20005338.008.08318.6428538.8262.9024.14
Dominican RepublicDOM19947685.4813.160140045.263414.8872.8413.91
Dominican RepublicDOM19957823.0013.597350125.673656.8671.3812.40
Dominican RepublicDOM19967963.5813.774585.863927.5173.3611.97
Dominican RepublicDOM19977967.9314.265480045.974515.2667.8311.89
Dominican RepublicDOM19988103.2115.266590126.244798.2568.6113.87
Dominican RepublicDOM19998238.2716.033079156.535167.1766.6014.03
Dominican RepublicDOM20008373.0016.415019996.835653.7867.1613.78
AlgeriaDZA199427454.3235.0584983813.014126.1763.9312.98
AlgeriaDZA199528058.0047.6627311716.534245.0362.4412.93
AlgeriaDZA199628675.2854.7489318818.954726.7356.0911.88
AlgeriaDZA199729045.0057.7073516819.704828.1454.7211.15
AlgeriaDZA199829507.0058.7389602720.804540.7459.6714.00
AlgeriaDZA199929950.0066.5738830621.594894.4357.0512.46
AlgeriaDZA200030399.2575.2597885121.616106.9146.219.78
EcuadorECU199411215.972196.728027899.523612.8759.2715.80
EcuadorECU199511460.002564.4938961097.523656.5259.6816.88
EcuadorECU199611698.003189.4741211344.363862.9457.7614.56
EcuadorECU199711937.003998.267091765.593755.4960.6317.35
EcuadorECU199812175.005446.5732422480.463556.3565.1819.55
EcuadorECU199912412.0011786.79983760.423464.4360.389.22
EcuadorECU200012646.0024988.390637214.853719.9056.8712.93
EgyptEGY199457063.533.3851330280.883468.1291.014.40
EgyptEGY199558180.003.3922080990.983565.0890.084.74
EgyptEGY199659272.003.3914830681.053699.5491.134.96
EgyptEGY199760416.243.3887500761.093910.3791.315.13
EgyptEGY199861580.003.3880000111.143993.4194.195.99
EgyptEGY199962770.003.3952500821.154203.8992.605.94
EgyptEGY200063976.003.4720499521.204406.3690.515.87
EritreaERI1994nananananana
EritreaERI1995nananananana
EritreaERI19963670.006.3516750341.50774.8197.459.09
EritreaERI1997nananananana
EritreaERI1998nananananana
EritreaERI1999nananananana
EritreaERI2000nananananana
SpainESP199439149.70133.958121.6614204.7170.0322.62
SpainESP199539223.00124.689116.1315992.1575.1621.96
SpainESP199639278.80126.662126.5915535.3369.0123.21
SpainESP199739348.10146.414127.3216411.8468.5923.23
SpainESP199839453.40149.395128.4817329.4368.8724.02
SpainESP199939626.20156.174130.3818210.7869.4924.65
SpainESP200039927.40180.595133.2719036.7069.1325.47
EstoniaEST19941499.0012.991250043.016578.5760.8815.06
EstoniaEST19951484.0011.464750293.877084.2057.5113.58
EstoniaEST19961469.0012.033749584.757509.5859.6014.71
EstoniaEST19971427.1613.881750115.288526.3860.0016.90
EstoniaEST19981406.0314.074669845.649222.7060.8015.63
EstoniaEST19991386.6714.677579885.559834.7457.4112.36
EstoniaEST20001369.0016.968639375.4210872.8356.7013.15
EthiopiaETH199454890.005.4650001531.02505.2883.964.35
EthiopiaETH199556530.006.1583328251.13530.8783.204.70
EthiopiaETH199658234.006.3516750341.18550.9587.475.73
EthiopiaETH199759750.006.7093420031.16600.3981.745.48
EthiopiaETH199861266.007.1159081461.19615.2077.515.16
EthiopiaETH199962782.007.9422497751.17660.6475.784.63
EthiopiaETH200064298.008.2172584531.12720.0867.964.00
FinlandFIN19945089.005.22355.9317293.9065.0521.05
FinlandFIN19955108.004.36675.9718517.5864.3420.17
FinlandFIN19965125.004.59355.8719488.6064.7120.40
FinlandFIN19975140.005.19145.9320850.6763.4620.95
FinlandFIN19985153.005.34416.0222215.2463.0620.97
FinlandFIN19995165.005.58086.0522931.3864.1320.20
FinlandFIN20005176.006.45356.1924416.3662.2421.04
FijiFJI1994765.441.4641250370.704953.4562.519.66
FijiFJI1995770.001.406332970.695143.4662.1710.23
FijiFJI1996775.671.4033000470.735282.3767.087.91
FijiFJI1997782.831.4436750410.745213.9667.788.91
FijiFJI1998791.171.9868170020.755303.1161.348.28
FijiFJI1999801.001.9696249960.725918.4159.697.58
FijiFJI2000nananananana
FranceFRA199459115.605.5526.6419113.2767.6222.39
FranceFRA199559326.404.99156.6019791.4867.0723.05
FranceFRA199659533.105.11556.6020228.2367.7621.99
FranceFRA199759735.605.83676.5820887.8866.9821.38
FranceFRA199859942.105.89956.5321889.9266.8822.49
FranceFRA199960156.406.1576.4822723.1867.0122.53
FranceFRA200060431.207.11986.4623613.7666.3723.82
GabonGAB19941071.00555.2047119288.157556.4861.207.51
GabonGAB19951098.00499.148407275.498192.1862.736.83
GabonGAB19961125.00511.5523987296.758860.4760.406.94
GabonGAB19971136.90583.6693726304.569155.0260.688.95
GabonGAB19981167.29589.9517822307.827600.6975.8511.17
GabonGAB19991198.32615.6990967286.037804.3575.647.81
GabonGAB20001230.00711.9763184366.817779.7678.968.66
United KingdomGBR199458401.000.65340.6318473.8374.5918.24
United KingdomGBR199558612.000.63370.6419187.6474.4818.24
United KingdomGBR199658807.000.6410.6520066.2575.1917.95
United KingdomGBR199759014.000.61080.6521281.7874.6118.51
United KingdomGBR199859237.000.60380.6522326.8674.6019.81
United KingdomGBR199959501.000.61810.6523125.9075.8219.17
United KingdomGBR200059756.000.66090.6524252.4475.2019.43
GeorgiaGEO1994nananananana
GeorgiaGEO1995nananananana
GeorgiaGEO19965420.001.2627999780.244478.8374.121.91
GeorgiaGEO19975431.001.2975000140.184813.6280.784.21
GeorgiaGEO19985442.001.3898169990.194848.1477.006.35
GeorgiaGEO19995024.002.0245170590.205593.1281.663.60
GeorgiaGEO20005024.001.9761669640.225315.4374.174.07
GermanyGER199481422.001.62282.0919930.8968.4324.49
GermanyGER199581661.001.43312.0920676.8168.5224.15
GermanyGER199681896.001.50482.0721118.5769.2523.13
GermanyGER199782052.001.73412.0621638.7769.3422.90
GermanyGER199882029.001.75972.0522435.1969.2323.06
GermanyGER199982087.001.83582.0323142.7070.1522.68
GermanyGER200082168.002.12292.0223917.4469.4223.62
GhanaGHA199416639.55956.7108154256.951217.1777.446.39
GhanaGHA199517075.001200.428955354.681280.6775.485.50
GhanaGHA199617523.211637.232056504.181283.5578.286.19
GhanaGHA199718048.342050.166992624.521251.8386.147.36
GhanaGHA199818449.372314.146973677.541384.7880.446.57
GhanaGHA199918868.322669.299072788.041384.0986.466.18
GhanaGHA200019306.005455.0561521024.041375.8183.805.10
GuineaGIN19946425.74976.6364136206.192530.7189.2310.79
GuineaGIN19956591.00991.411499214.212581.7392.918.17
GuineaGIN19966755.781004.015991217.562707.9192.837.24
GuineaGIN19976921.561095.32605210.262848.2090.347.30
GuineaGIN19987086.121236.832031215.832897.8492.527.13
GuineaGIN19997250.521387.401001222.752949.7893.307.12
GuineaGIN20007415.001746.869995239.892961.0293.347.59
Gambia, TheGMB19941076.299.5755500793.061054.1588.708.37
Gambia, TheGMB19951111.009.5462503433.151042.7890.6810.01
Gambia, TheGMB19961145.889.788950923.201044.5690.7910.54
Gambia, TheGMB19971186.2610.200160033.101137.6088.527.74
Gambia, TheGMB19981223.8110.643099783.241119.0191.658.56
Gambia, TheGMB19991262.7111.39509013.161234.9491.877.42
Gambia, TheGMB20001303.0012.787630083.111329.3988.837.33
Guinea-BissauGNB19941059.38198.340606758.14758.7779.3413.86
Guinea-BissauGNB19951086.00278.03909384.26771.6782.6213.87
Guinea-BissauGNB19961111.92405.7449951122.84806.3781.9714.22
Guinea-BissauGNB19971125.99583.6691895156.62886.1178.3814.23
Guinea-BissauGNB19981149.33589.9515991162.29648.2084.3612.43
Guinea-BissauGNB19991173.38615.6990967167.26705.0379.677.60
Guinea-BissauGNB20001199.00711.9763184174.06737.6778.995.55
Equatorial GuineaGNQ1994388.88555.2047119194.20924.4573.0835.44
Equatorial GuineaGNQ1995399.00499.148407204.001005.5868.6637.99
Equatorial GuineaGNQ1996409.44511.5523987231.151394.9170.2858.13
Equatorial GuineaGNQ1997421.26583.6693726277.022493.9961.7431.64
Equatorial GuineaGNQ1998433.06589.9517822199.603105.0477.1741.79
Equatorial GuineaGNQ1999445.03615.6990967214.445638.6235.3226.65
Equatorial GuineaGNQ2000457.00711.9763184203.0310302.2826.8317.70
GreeceGRC199410426.00242.603200.0711647.5473.9719.13
GreeceGRC199510454.00231.663213.2312217.8879.4019.51
GreeceGRC199610475.90240.712224.1012750.9579.5520.44
GreeceGRC199710498.80273.058234.2513472.1778.6620.79
GreeceGRC199810516.40295.529243.1514095.3478.4621.77
GreeceGRC199910533.70305.647246.9814755.8278.1421.31
GreeceGRC200010557.90365.399252.0815557.8376.6022.84
GrenadaGRD199494.102.7000000481.654552.0467.3422.21
GrenadaGRD199594.502.7000000481.644814.8067.5119.21
GrenadaGRD199695.002.7000000481.685016.4270.4821.86
GrenadaGRD199795.502.7000000481.745124.0676.6223.37
GrenadaGRD199896.202.7000000481.765442.2176.2323.57
GrenadaGRD199997.002.7000000481.765962.3262.1722.30
GrenadaGRD200098.002.7000000481.766409.8266.0724.51
GuatemalaGTM19949715.295.7512011532.133600.2685.038.04
GuatemalaGTM19959976.005.8103427892.273768.1484.887.52
GuatemalaGTM199610243.436.0495128632.433838.6885.276.17
GuatemalaGTM199710517.006.0652689932.573983.4084.716.93
GuatemalaGTM199810799.006.3946528432.784119.2485.019.00
GuatemalaGTM199911088.407.3856101042.914192.4286.158.36
GuatemalaGTM200011385.307.7631587983.004334.5584.158.23
GuyanaGUY1994823.35138.290206936.082517.9473.8412.72
GuyanaGUY1995830.00141.989196840.602614.4668.5515.16
GuyanaGUY1996836.57140.37540.832868.7465.3014.17
GuyanaGUY1997749.05142.400802640.033537.1266.1513.93
GuyanaGUY1998752.43150.519195640.153571.7468.2312.71
GuyanaGUY1999756.34177.994995141.603833.3865.8310.25
GuyanaGUY2000nananananana
Hong KongHKG19945998.007.728416926.7824816.2366.9026.70
Hong KongHKG19956156.007.7358331687.0524736.9767.6331.41
Hong KongHKG19966311.007.7342538837.2425993.8267.2528.99
Hong KongHKG19976502.007.7420830737.4927076.4167.8230.70
Hong KongHKG19986645.607.7453331957.4425591.2466.1426.74
Hong KongHKG19996720.707.7575001727.1425668.8866.7221.79
Hong KongHKG20006797.007.7911667826.6827892.5064.4524.99
HondurasHND19945492.468.4087581632.681958.5075.6718.86
HondurasHND19955654.009.470987323.192082.6071.6518.05
HondurasHND19965818.0611.705300333.882116.8273.8516.40
HondurasHND19975939.4713.003470424.782165.3575.4516.86
HondurasHND19986098.9313.385020265.122249.3374.4016.12
HondurasHND19996258.4614.213170055.732133.9878.2917.23
HondurasHND20006417.0014.839200026.332164.4372.4320.37
CroatiaHRV1994nananananana
CroatiaHRV19954669.005.2299671173.126748.3562.0112.21
CroatiaHRV19964494.005.433800223.237427.9059.8815.33
CroatiaHRV19974446.616.1007170683.428134.9963.6119.18
CroatiaHRV19984396.576.3622918133.608702.4560.8016.66
CroatiaHRV19994374.517.1124448783.698846.6659.4615.94
CroatiaHRV20004380.008.2765645983.779547.1657.7015.27
HaitiHTI19947009.0415.039999963.691079.2388.652.31
HaitiHTI19957168.0015.109729773.621470.2693.863.19
HaitiHTI19967336.0015.701149943.681756.8195.192.59
HaitiHTI19977492.0016.654499053.592081.3490.212.13
HaitiHTI19987647.0016.765670783.602365.4394.751.96
HaitiHTI1999nananananana
HaitiHTI2000nananananana
HungaryHUN199410261.00105.1651.928297.3672.6317.51
HungaryHUN199510229.00125.68164.298536.6366.8019.24
HungaryHUN199610193.00152.64777.678707.7964.9021.78
HungaryHUN199710155.00186.78990.199325.1863.0722.42
HungaryHUN199810144.00214.402100.819864.1763.6924.66
HungaryHUN199910067.00237.146108.6310418.9464.6224.13
HungaryHUN200010024.00282.179117.9111062.9064.1325.47
IndonesiaIDN1994190847.972160.753906598.283355.2157.9319.86
IndonesiaIDN1995193976.002248.60791671.713489.0157.3024.37
IndonesiaIDN1996197156.482342.295898693.843891.2161.4921.19
IndonesiaIDN1997200390.292909.379883756.404136.5762.5420.99
IndonesiaIDN1998203678.3710013.620121199.673910.0262.1613.22
IndonesiaIDN1999207021.627855.1499021398.853831.6066.3710.13
IndonesiaIDN2000210420.998421.7753911521.374035.2764.7810.67
IndiaIND1994913600.0031.373739246.261815.4862.6311.92
IndiaIND1995929358.0232.427078256.731950.4259.4113.25
IndiaIND1996945611.7835.433170327.042117.8760.7411.93
IndiaIND1997962377.6636.313289647.112221.1360.0212.53
IndiaIND1998979672.9041.25936897.582348.0056.5912.88
IndiaIND1999997515.2043.055431377.702510.5654.3313.60
IndiaIND20001015923.0144.941608437.672683.6152.3813.18
IrelandIRL19943586.000.66860.6615388.7167.3017.26
IrelandIRL19953601.300.62370.6816978.9664.4418.75
IrelandIRL19963626.100.6250.6818494.3863.5819.71
IrelandIRL19973660.600.65960.7020658.6161.6220.97
IrelandIRL19983704.900.70230.7322433.9861.0822.95
IrelandIRL19993744.700.73920.7624653.4260.5421.15
IrelandIRL20003786.900.85480.7927197.0659.7821.55
IranIRN199458013.681748.750977417.124958.9265.289.50
IranIRN199558954.001747.927979586.755203.5959.4519.53
IranIRN199659925.111750.762939720.615333.1665.0913.45
IranIRN199760875.001752.921997827.175473.2365.4415.89
IranIRN199861850.001751.863037942.075447.3467.0918.23
IranIRN199962764.001752.931031075.705983.8463.6215.06
IranIRN200063664.001764.4300541167.047202.0456.0113.12
IcelandISL1994266.0069.944482.8019925.0066.7518.75
IcelandISL1995267.4064.691782.9620347.5667.7319.11
IcelandISL1996268.9066.583.8021476.4868.5822.01
IcelandISL1997270.9070.904384.5022896.9768.1022.78
IcelandISL1998273.8070.958385.6024715.0269.6027.09
IcelandISL1999277.2072.335387.4025732.6271.7424.78
IcelandISL2000281.3078.615988.9326928.5570.8527.57
IsraelISR19945399.003.0110549932.8114790.7258.2930.43
IsraelISR19955545.003.0112919813.0215650.5558.6430.91
IsraelISR19965692.003.1916499143.2616464.2458.6530.81
IsraelISR19975836.003.4493501193.4717241.0758.3327.69
IsraelISR19985963.003.8000750543.6517520.8359.0924.50
IsraelISR19996105.004.1397171023.7818091.9259.0025.51
IsraelISR20006233.214.0773329733.7719148.4458.2023.33
ItalyITA199457203.501612.441527.6118920.9570.3819.93
ItalyITA199557300.801628.931576.6319783.3969.2320.71
ItalyITA199657397.001542.951618.6920474.8869.1520.10
ItalyITA199757512.201703.11632.3021167.6670.0620.28
ItalyITA199857588.001736.211645.9821915.8270.6420.52
ItalyITA199957646.301817.441652.0222523.3471.2621.09
ItalyITA200057728.302101.631709.1122876.2862.0521.73
JamaicaJAM19942496.0033.0859298715.143503.1666.6621.96
JamaicaJAM19952522.1035.1421203618.003747.1665.9821.15
JamaicaJAM19962538.0037.1195602421.093804.1465.5020.48
JamaicaJAM19972554.0035.4044685429.863327.3054.9523.35
JamaicaJAM19982576.0036.5499992430.303441.7857.9220.38
JamaicaJAM19992590.0039.0435218832.503413.8357.4920.35
JamaicaJAM20002633.0042.7011413635.103464.2657.6620.53
JordanJOR19944060.840.6987642050.283780.0358.3219.36
JordanJOR19954195.000.7003775240.283929.7554.8318.85
JordanJOR19964314.230.7089999910.293747.7759.0317.44
JordanJOR19974459.120.7089999910.293974.3457.5914.17
JordanJOR19984597.350.7089999910.304063.3959.5811.84
JordanJOR19994739.870.7089999910.294203.9259.439.98
JordanJOR20004886.810.7089999910.284282.2263.1810.74
JapanJPN1994124960.00102.208176.4822302.1160.8531.36
JapanJPN1995125570.0094.0596172.5922967.1260.9831.58
JapanJPN1996125864.00108.779168.7724046.5160.8732.71
JapanJPN1997126166.00120.991167.2124737.4460.6632.31
JapanJPN1998126486.00130.905165.3724661.4361.8330.15
JapanJPN1999126686.00113.907161.7424979.2462.8728.94
JapanJPN2000126919.00107.765156.0825924.3961.6229.75
KazakhstanKAZ199416297.0035.538330084.455853.5670.8517.12
KazakhstanKAZ199516066.0060.9500007611.155662.0764.0010.68
KazakhstanKAZ199615921.0067.3033294715.155882.1869.887.31
KazakhstanKAZ199715334.4075.437516.866212.4672.017.77
KazakhstanKAZ199815073.0078.3033294717.986003.1176.827.38
KazakhstanKAZ199914927.00119.523300219.027094.6470.687.50
KazakhstanKAZ200014869.00142.133300821.098331.2960.887.14
KenyaKEN199426506.7956.0505790712.811180.0572.507.09
KenyaKEN199527216.0051.4298286413.961225.4879.517.74
KenyaKEN199627918.1057.1148681614.861268.6178.647.74
KenyaKEN199728043.0058.7318382316.041342.5182.147.57
KenyaKEN199828726.0060.3666992217.701327.7181.717.89
KenyaKEN199929416.0070.3262176519.181286.8678.157.75
KenyaKEN200030092.0076.1755371120.051316.2680.127.54
KyrgyzstanKGZ19944473.0010.841679570.823296.8062.553.27
KyrgyzstanKGZ19954514.0010.821880341.292771.8362.987.21
KyrgyzstanKGZ19964576.0012.809559821.972595.9666.2311.17
KyrgyzstanKGZ19974681.0017.36248972.332817.5955.3810.24
KyrgyzstanKGZ19984797.0020.837570192.682663.5568.527.19
KyrgyzstanKGZ19994864.6039.007728583.432922.3962.817.92
KyrgyzstanKGZ20004915.0047.703830723.993205.1160.336.97
CambodiaKHM199410367.142545.25550.011087.3486.183.98
CambodiaKHM199510695.322450.833008596.211183.7091.894.65
CambodiaKHM199610968.052624.083008623.521217.9090.505.54
CambodiaKHM199711236.772946.25622.341300.7284.465.14
CambodiaKHM199811498.003744.416992727.291284.9286.295.76
CambodiaKHM199911756.713807.833008752.211296.9986.416.45
CambodiaKHM2000nananananana
St. Kitts & NevisKNA199441.192.7000000481.549481.7640.8219.36
St. Kitts & NevisKNA199541.002.7000000481.4310692.0348.4118.19
St. Kitts & NevisKNA199640.882.7000000481.3911661.9850.7917.94
St. Kitts & NevisKNA199740.822.7000000481.4412643.5843.9517.17
St. Kitts & NevisKNA199840.822.7000000481.4712949.7243.9116.42
St. Kitts & NevisKNA199940.882.7000000481.3914272.9548.2013.23
St. Kitts & NevisKNA200041.002.7000000481.4114627.3047.4716.49
Korea, Republic ofKOR199444642.00803.446584.4112396.2954.9040.23
Korea, Republic ofKOR199545093.00771.273617.7013547.4555.3140.50
Korea, Republic ofKOR199645545.00804.453641.6414319.8956.5441.64
Korea, Republic ofKOR199745991.00951.289670.2814704.0357.4837.65
Korea, Republic ofKOR199846430.001401.44702.5913622.0155.7424.66
Korea, Republic ofKOR199946858.001188.82709.1014528.7358.1529.05
Korea, Republic ofKOR200047275.001130.96732.2914936.6957.1230.78
KuwaitKWT1994nananananana
KuwaitKWT1995nananananana
KuwaitKWT19961697.000.2994086150.2323385.9352.029.92
KuwaitKWT1997nananananana
KuwaitKWT1998nananananana
KuwaitKWT1999nananananana
KuwaitKWT2000nananananana
LaosLAO1994nananananana
LaosLAO1995nananananana
LaosLAO19964725.58921.0217285267.901367.3162.2321.23
LaosLAO1997nananananana
LaosLAO1998nananananana
LaosLAO1999nananananana
LaosLAO2000nananananana
LebanonLBN19943929.731680.072998952.264075.21116.1617.47
LebanonLBN19954005.001621.4129641011.424448.56112.0617.75
LebanonLBN19964077.011571.443971016.534927.15106.1915.82
LebanonLBN19974145.531539.4499511070.965158.00102.2713.80
LebanonLBN19984210.341516.1319581104.625306.5790.8214.94
LebanonLBN19994271.231507.8439941033.705660.0484.8210.30
LebanonLBN20004328.001507.5942.166089.2676.508.18
St. LuciaLCA1994142.702.7000000481.675858.9372.3314.08
St. LuciaLCA1995145.402.7000000481.686214.0271.0210.71
St. LuciaLCA1996147.002.7000000481.676267.6873.6112.28
St. LuciaLCA1997149.672.7000000481.686238.9774.3614.19
St. LuciaLCA1998151.952.7000000481.746397.5673.6613.44
St. LuciaLCA1999153.702.7000000481.786578.3476.5514.36
St. LuciaLCA2000156.002.7000000481.796822.9874.8113.69
Sri LankaLKA199417865.0049.4151382411.542813.2977.4212.51
Sri LankaLKA199518112.0051.2515907312.342991.1877.7911.87
Sri LankaLKA199618300.0055.271438613.133201.4374.7111.39
Sri LankaLKA199718552.0058.9946098315.253145.9470.2811.99
Sri LankaLKA199818774.0064.4501190215.823429.3269.2812.46
Sri LankaLKA199919043.0070.6354522716.293564.6570.3912.49
Sri LankaLKA200019359.0077.0051193216.893840.7767.6112.51
LesothoLSO19941885.183.5507979391.131266.47104.3432.80
LesothoLSO19951926.003.627084971.261270.7497.1441.61
LesothoLSO19961968.334.2993488311.421319.9693.7547.20
LesothoLSO19971944.714.6079621321.671449.8890.2544.58
LesothoLSO19981978.095.5282840731.741430.2083.3638.40
LesothoLSO19992008.246.1094841961.961413.2175.5137.52
LesothoLSO20002035.006.9398279192.051492.2764.6336.22
LithuaniaLTU19943721.003.9777500630.706514.5571.038.23
LithuaniaLTU19953715.0041.086031.8364.5913.76
LithuaniaLTU19963709.0041.316495.2566.3413.42
LithuaniaLTU19973705.5941.437211.7566.5616.09
LithuaniaLTU19983703.0041.467925.1964.1616.26
LithuaniaLTU19993699.0041.497759.5768.0614.95
LithuaniaLTU20003695.0041.468396.6666.3512.98
LuxembourgLUX1994403.8033.456539.7931897.3050.3024.06
LuxembourgLUX1995412.8029.4838.2733757.3059.2123.86
LuxembourgLUX1996418.3030.961538.2635144.2459.8923.68
LuxembourgLUX1997423.7035.773938.2438908.9256.3524.85
LuxembourgLUX1998429.2036.298638.2441716.9954.6523.34
LuxembourgLUX1999435.7037.864138.5444322.4453.3525.10
LuxembourgLUX2000441.4043.784938.3848967.5649.5823.48
LatviaLVA19942548.000.5597500210.145612.6062.486.91
LatviaLVA19952516.000.5275833010.165962.0957.2110.00
LatviaLVA19962491.000.5507500170.186194.1362.7310.41
LatviaLVA19972469.000.5809167030.206596.2263.6311.18
LatviaLVA19982449.000.5898333190.217042.5264.9414.59
LatviaLVA19992410.000.5851666930.217625.3465.0912.42
LatviaLVA20002372.000.606500030.228305.2264.5911.85
MacaoMAC1994418.778.0500001915.8321866.9334.8522.02
MacaoMAC1995430.008.0500001915.9023365.0433.6918.33
MacaoMAC1996440.918.0500001915.6623350.4334.9813.82
MacaoMAC1997418.007.9752922065.8222959.6838.8014.72
MacaoMAC1998426.007.9787669185.5821820.7540.3712.89
MacaoMAC1999434.007.9918498995.2521517.9241.4712.01
MacaoMAC2000438.008.0258998874.9223118.1139.248.25
MoroccoMAR199425926.009.202714923.073512.9882.809.66
MoroccoMAR199526386.008.5402364733.173362.4781.3211.29
MoroccoMAR199626848.008.7158756263.123808.4882.289.56
MoroccoMAR199727310.009.5271072392.983903.3577.1910.08
MoroccoMAR199827775.009.6044158942.874308.9377.3811.45
MoroccoMAR199928238.009.8044185642.854299.6176.7310.55
MoroccoMAR200028705.0010.625639922.884299.2476.1212.22
MoldovaMDA1994nananananana
MoldovaMDA19954339.004.4958000180.642316.8365.5910.32
MoldovaMDA19964325.004.6044831280.802264.2070.629.49
MoldovaMDA19974312.004.623582840.842457.1069.898.85
MoldovaMDA19984299.005.3706998830.922294.6680.259.57
MoldovaMDA19994290.0010.515810011.362111.2276.578.84
MoldovaMDA20004282.0012.434220311.692212.2394.108.70
MadagascarMDG199412915.043067.335938909.03778.1091.642.62
MadagascarMDG199513300.004265.6318361292.75784.2591.302.62
MadagascarMDG199613717.554061.2519531479.40799.0690.082.83
MadagascarMDG199714148.205090.886231566.28818.5991.842.69
MadagascarMDG199814592.385441.3979491675.00836.6791.792.76
MadagascarMDG199915050.506283.7749021819.92862.3392.842.72
MadagascarMDG200015523.006767.4809571925.96876.6893.583.23
MexicoMEX199489352.003.37512.107572.1776.8121.08
MexicoMEX199590903.006.41942.887028.2075.6714.42
MexicoMEX199692450.007.59953.727344.1474.2316.85
MexicoMEX199793990.007.91854.307861.6973.8819.70
MexicoMEX199895521.009.1364.958141.7475.2320.74
MexicoMEX199997428.009.56045.548497.6874.7920.45
MexicoMEX200097221.009.45565.759710.9967.0920.83
MacedoniaMKD19941947.0043.2631797816.974113.1976.928.90
MacedoniaMKD19951966.0037.8817596419.354445.4770.6913.15
MacedoniaMKD19961980.0039.981079119.474571.2172.6412.67
MacedoniaMKD19971996.8750.0035514819.824686.6273.3712.53
MacedoniaMKD19982015.0054.4617309620.134816.1974.2612.49
MacedoniaMKD19992017.0056.9018287719.835236.6472.0410.40
MacedoniaMKD20002031.0065.9038696320.995506.4781.7610.03
MaliMLI19949449.71555.2047119146.93703.6892.977.57
MaliMLI19959705.00499.148407160.86788.5185.677.24
MaliMLI19969993.35511.5523987168.02812.3386.577.79
MaliMLI199710089.80583.6693726161.44888.9579.256.41
MaliMLI199810333.64589.9517822163.33908.8680.316.42
MaliMLI199910583.65615.6990967155.48959.5579.556.17
MaliMLI200010840.00711.9763184151.60995.5277.076.36
MaltaMLT1994368.000.3779211040.2610923.1963.9620.61
MaltaMLT1995371.000.3530587850.2512309.9266.0821.43
MaltaMLT1996373.000.36045590.2413226.5068.2718.81
MaltaMLT1997383.000.3859660920.2414136.2466.6416.58
MaltaMLT1998385.000.3884595040.2414977.6266.6514.55
MaltaMLT1999nananananana
MaltaMLT2000nananananana
MongoliaMNG1994nananananana
MongoliaMNG1995nananananana
MongoliaMNG19962497.75548.4033203185.331268.4862.9816.64
MongoliaMNG1997nananananana
MongoliaMNG1998nananananana
MongoliaMNG1999nananananana
MongoliaMNG2000nananananana
MozambiqueMOZ199415420.006038.5878911070.88809.6799.673.52
MozambiqueMOZ199515820.009024.3330081713.10784.4699.744.36
MozambiqueMOZ199616230.0011293.752322.23853.5597.803.66
MozambiqueMOZ199716630.0011772.629882539.50942.6593.823.33
MozambiqueMOZ199816965.0012110.20022696.711026.0291.564.20
MozambiqueMOZ199917299.0013028.589842868.801046.8097.525.90
MozambiqueMOZ200017691.0015447.139652986.651113.4396.094.68
MauritaniaMRT19942264.96123.574996940.951367.8774.246.87
MauritaniaMRT19952329.00129.768295346.391285.7878.298.14
MauritaniaMRT19962394.35137.221694949.671265.9877.759.95
MauritaniaMRT19972415.46151.85330251.801327.7975.6511.01
MauritaniaMRT19982493.12188.475799655.681357.3579.5810.35
MauritaniaMRT19992576.18209.514205954.691425.5677.378.64
MauritaniaMRT2000nananananana
MauritiusMUS19941113.0017.960369115.6010096.1284.3113.65
MauritiusMUS19951122.0017.386320115.5611067.2481.2710.62
MauritiusMUS19961134.0017.948070535.7611808.2880.1010.40
MauritiusMUS19971147.7121.057260516.1612226.8581.4912.79
MauritiusMUS19981159.7323.992649086.2813440.9079.1311.83
MauritiusMUS19991174.4025.185810096.6513632.8982.1311.14
MauritiusMUS20001186.1426.24955946.7314405.6981.3311.34
MalawiMWI19949493.118.7364053732.28476.4583.598.97
MalawiMWI19959757.0015.283740043.65637.5388.525.03
MalawiMWI199610016.0015.308469774.82718.1295.964.62
MalawiMWI19979664.9316.444179535.17833.0696.644.56
MalawiMWI19989884.0031.072679526.95785.6291.854.35
MalawiMWI199910097.5044.088138589.58824.82100.704.49
MalawiMWI200010311.0059.543811812.13807.7493.583.75
MalaysiaMYS199420103.262.6242570881.247617.4351.1131.97
MalaysiaMYS199520609.862.5044040681.278381.0350.7134.74
MalaysiaMYS199621129.232.515943051.319165.7849.1333.18
MalaysiaMYS199721667.002.8131918911.349688.6748.2034.40
MalaysiaMYS199822180.003.9243750571.2510191.9240.8718.06
MalaysiaMYS199922710.003.7999999521.2710435.7834.8518.26
MalaysiaMYS200023270.003.7999999521.559421.5030.0321.70
NamibiaNAM19941502.853.5507979391.654398.6356.9811.87
NamibiaNAM19951543.003.627084971.814336.0058.9410.53
NamibiaNAM19961582.994.2993488311.994354.8559.4511.40
NamibiaNAM19971647.524.6079621322.334421.2461.6910.19
NamibiaNAM19981681.825.5282840732.534567.8160.9213.25
NamibiaNAM19991718.276.1094841962.674772.4158.5911.67
NamibiaNAM2000nananananana
NigerNER19948842.09555.2047119122.62801.6977.074.13
NigerNER19959150.00499.148407126.81809.7078.252.99
NigerNER19969469.07511.5523987134.38799.4081.473.92
NigerNER19979770.24583.6693726138.02798.7080.444.25
NigerNER199810120.12589.9517822143.64841.3482.784.39
NigerNER199910475.80615.6990967136.84866.4179.183.74
NigerNER200010832.00711.9763184133.32902.2883.323.85
NigeriaNGA1994108012.5721.9960002915.94719.1472.8712.76
NigeriaNGA1995111270.0021.8952598623.53755.8975.4611.04
NigeriaNGA1996114495.5121.8844299326.61926.0961.199.82
NigeriaNGA1997117680.7521.8860492725.87964.8873.979.61
NigeriaNGA1998120817.2621.8859996828.64816.1581.1311.54
NigeriaNGA1999123896.5292.3380966232.58795.7469.8216.31
NigeriaNGA2000126910.00101.697303839.93826.4731.8922.19
NicaraguaNIC19944304.716.7228751181.671711.6984.6010.13
NicaraguaNIC19954426.007.5455918311.751838.3782.7011.31
NicaraguaNIC19964548.058.4355001452.071772.6380.2812.71
NicaraguaNIC19974680.479.4480829242.561553.2894.5316.80
NicaraguaNIC19984810.2910.581919672.731666.0696.2817.16
NicaraguaNIC19994940.7411.809249882.941800.77104.7321.48
NicaraguaNIC20005071.0012.684390073.081947.2292.2117.88
NetherlandsNLD199415381.001.822.1019638.7662.6021.10
NetherlandsNLD199515460.001.60572.0920607.3262.1421.85
NetherlandsNLD199615526.001.68592.0921430.5062.5521.93
NetherlandsNLD199715607.001.95132.0922582.8462.2322.35
NetherlandsNLD199815703.001.98372.1023648.7662.8422.34
NetherlandsNLD199915809.002.06852.1324483.2363.7622.37
NetherlandsNLD200015920.002.39192.1625758.8362.7322.47
NorwayNOR19944337.007.05769.2021746.5160.6125.84
NorwayNOR19954358.006.33529.2623015.9259.8027.17
NorwayNOR19964381.006.44989.3124937.0658.9525.94
NorwayNOR19974405.007.07349.3526615.1457.9128.41
NorwayNOR19984432.007.54519.5626317.2161.3031.31
NorwayNOR19994462.007.79929.7227622.5260.5826.91
NorwayNOR20004491.008.80189.8932057.2953.4524.48
NepalNPL199420753.4549.397518168.221168.2069.4017.03
NepalNPL199521272.0051.890331278.441222.3067.8318.06
NepalNPL199621794.6856.691951758.991272.3170.3718.83
NepalNPL199721444.8858.009548199.461380.5070.7917.36
NepalNPL199821965.4265.975791939.661415.7170.4216.56
NepalNPL199922498.0468.2393722510.291476.5570.4913.26
NepalNPL200023043.0071.0938034110.511564.8367.2716.02
New ZealandNZL19943602.001.68651.4916302.7468.1921.95
New ZealandNZL19953656.001.52391.4817075.0467.7123.36
New ZealandNZL19963714.001.45491.4717707.2668.1923.38
New ZealandNZL19973761.001.51241.4817945.2969.1622.06
New ZealandNZL19983792.001.86831.4818085.4470.5020.99
New ZealandNZL19993811.001.88961.4619007.0370.1222.69
New ZealandNZL20003831.002.20121.4620008.2967.6422.33
OmanOMN1994nananananana
OmanOMN1995nananananana
OmanOMN19962173.000.3844999970.2016667.8858.288.08
OmanOMN1997nananananana
OmanOMN1998nananananana
OmanOMN1999nananananana
OmanOMN2000nananananana
PakistanPAK1994119401.8529.877840047.441768.4471.2911.40
PakistanPAK1995122374.9530.929689418.171878.3271.4611.09
PakistanPAK1996125409.8535.265731818.761951.6674.0211.07
PakistanPAK1997128457.3140.917919169.621962.2576.3610.48
PakistanPAK1998131582.0044.942840589.932048.3973.7210.08
PakistanPAK1999134790.0049.1183395410.442085.4177.288.68
PakistanPAK2000138080.0053.6481895410.692157.8674.048.81
PanamaPAN19942585.2410.555441.8758.4723.68
PanamaPAN19952631.0010.555453.2558.2426.17
PanamaPAN19962674.0010.545670.9257.9426.54
PanamaPAN19972719.0010.506002.1061.2425.19
PanamaPAN19982764.0010.516217.6965.5526.58
PanamaPAN19992811.0010.516336.4263.0728.71
PanamaPAN20002856.0010.526650.2062.2526.65
PeruPER199423149.982.1949999331.194009.2770.8119.94
PeruPER199523532.002.2533330921.294373.1170.2322.00
PeruPER199623947.002.4533329011.414434.0870.8820.86
PeruPER199724371.002.6641669271.364734.2269.4022.28
PeruPER199824801.002.9300000671.454629.3070.3521.78
PeruPER199925230.003.3833329681.494627.9770.0618.43
PeruPER200025661.003.490000011.524799.3069.5317.44
PhilippinesPHL199468661.4926.417169578.742822.8673.0515.89
PhilippinesPHL199570267.0025.714469919.142968.2074.7115.56
PhilippinesPHL199671899.0026.216100699.683122.2975.2516.42
PhilippinesPHL199771324.6829.4706592610.193344.3075.7417.48
PhilippinesPHL199872775.4540.8930511510.853415.2876.5413.95
PhilippinesPHL199974194.8839.0889816311.243726.8971.8312.22
PhilippinesPHL200075580.0044.192249311.014064.7067.1211.63
Papua New GuineaPNG19944201.861.0113400220.314188.1650.165.76
Papua New GuineaPNG19954301.001.2798420190.393800.1662.678.42
Papua New GuineaPNG19964400.901.3190749880.453529.3554.2612.65
Papua New GuineaPNG19974760.731.437971950.433423.7360.9211.06
Papua New GuineaPNG19984882.812.0735919480.493311.2359.269.46
Papua New GuineaPNG19995005.922.5707728860.553313.2663.019.54
Papua New GuineaPNG2000nananananana
PolandPOL199438544.002.27230.886623.4476.0614.85
PolandPOL199538588.002.4251.117204.2272.9117.34
PolandPOL199638618.002.69611.307712.8575.0819.53
PolandPOL199738650.003.27931.488250.2675.6221.50
PolandPOL199838666.003.47541.648727.1475.7522.38
PolandPOL199938654.003.96711.749150.8277.1822.24
PolandPOL200038646.004.34611.849661.3667.2124.35
Puerto RicoPRI1994nananananana
Puerto RicoPRI1995nananananana
Puerto RicoPRI19963733.0010.839765.6596.1122.95
Puerto RicoPRI19973805.0010.8510048.2696.6125.16
Puerto RicoPRI19983833.0010.8710590.0995.5523.29
Puerto RicoPRI1999nananananana
Puerto RicoPRI2000nananananana
PortugalPRT19949902.80165.993122.0012435.1262.8620.71
PortugalPRT19959916.80151.106126.5712907.0072.3823.85
PortugalPRT19969926.90154.244129.1713523.0872.4823.73
PortugalPRT19979940.70175.312131.8814268.5372.2125.41
PortugalPRT19989968.70180.104134.3715165.2272.3326.62
PortugalPRT19999990.00188.178133.2116302.3261.6726.46
PortugalPRT200010005.00217.603135.1517088.9660.7427.22
ParaguayPRY19944711.891911.545044610.275209.5072.5612.24
ParaguayPRY19954828.001970.400024698.175236.2172.8412.89
ParaguayPRY19964955.002062.783936751.375342.3971.6112.43
ParaguayPRY19975085.002177.863037838.304909.9779.8713.06
ParaguayPRY19985219.002726.48999941.074766.3980.8812.43
ParaguayPRY19995358.843119.072998955.204723.7977.1211.63
ParaguayPRY20005496.003486.353027993.264801.3077.1411.06
QatarQAT1994nananananana
QatarQAT1995nananananana
QatarQAT1996693.003.6400001052.4919843.9150.1013.25
QatarQAT1997nananananana
QatarQAT1998nananananana
QatarQAT1999nananananana
QatarQAT2000nananananana
RomaniaROM199422731.001655.08606499.954377.7572.1313.89
RomaniaROM199522681.002033.276001676.224699.6677.5512.60
RomaniaROM199622608.003084.218018962.084983.7683.0811.64
RomaniaROM199722554.007167.9428712345.914787.4182.2711.50
RomaniaROM199822503.008875.5761723402.874848.8683.9410.65
RomaniaROM199922457.9915332.839844983.814818.3581.4710.12
RomaniaROM200022435.0021708.72077059.265023.5381.0311.18
RussiaRUS1994148336.002.1907498840.557499.8649.5118.33
RussiaRUS1995148140.994.5591502191.477068.7460.7317.40
RussiaRUS1996147739.015.120832922.047106.7963.8613.72
RussiaRUS1997147304.005.7848329542.307297.9566.6813.05
RussiaRUS1998146899.019.7050828932.647086.3967.739.20
RussiaRUS1999146308.9924.61993984.038074.7057.358.81
RussiaRUS2000145555.0128.129169464.859995.9154.748.79
RwandaRWA19946230.00194.51750.39529.48132.164.48
RwandaRWA19956400.00262.197509870.67746.3492.773.08
RwandaRWA19966727.00306.820007377.90823.2589.713.21
RwandaRWA19977895.18301.529785284.13847.7991.443.72
RwandaRWA19988105.00312.314086985.32914.2289.344.22
RwandaRWA19998310.00333.941894582.25944.8685.723.46
RwandaRWA20008508.00389.696197584.20976.1683.863.22
Saudi ArabiaSAU1994nananananana
Saudi ArabiaSAU1995nananananana
Saudi ArabiaSAU199619409.003.7449998862.2212245.5746.998.88
Saudi ArabiaSAU1997nananananana
Saudi ArabiaSAU1998nananananana
Saudi ArabiaSAU1999nananananana
Saudi ArabiaSAU2000nananananana
SudanSDN1994nananananana
SudanSDN1995nananananana
SudanSDN199627160.681250.791992328.141159.2679.219.57
SudanSDN1997nananananana
SudanSDN1998nananananana
SudanSDN1999nananananana
SudanSDN2000nananananana
SenegalSEN19948110.87555.2047119182.521363.8081.266.60
SenegalSEN19958330.00499.148407189.551421.7982.136.41
SenegalSEN19968557.01511.5523987187.901477.7083.676.66
SenegalSEN19978777.14583.6693726189.051545.1983.826.55
SenegalSEN19989032.38589.9517822188.741608.4083.677.44
SenegalSEN19999286.27615.6990967190.871650.8186.216.91
SenegalSEN20009530.00711.9763184194.261680.9786.917.14
SingaporeSGP19943421.001.5274440051.4621361.8638.3439.92
SingaporeSGP19953526.001.4173749691.4423306.6036.5141.32
SingaporeSGP19963670.001.4100409751.4124938.8534.7443.93
SingaporeSGP19973794.001.4848059421.4126755.9033.9245.56
SingaporeSGP19983923.001.6736019851.3526322.4832.8740.05
SingaporeSGP19993952.001.6949570181.3926470.2934.7437.74
SingaporeSGP20004018.001.7239630221.3828643.5934.7937.72
Sierra LeoneSLE19944399.00586.7396851130.03951.9081.944.55
Sierra LeoneSLE19954510.00755.2158203163.60885.2492.023.21
Sierra LeoneSLE19964630.00920.7324829203.31921.2298.935.27
Sierra LeoneSLE1997nananananana
Sierra LeoneSLE19984830.481563.618042288.65780.8594.564.22
Sierra LeoneSLE1999nananananana
Sierra LeoneSLE20005031.002092.125361.48733.5493.123.91
El SalvadorSLV19945540.868.7287502293.353816.3789.039.81
El SalvadorSLV19955669.008.7545833593.544143.5989.3110.35
El SalvadorSLV19965798.008.7550001143.694235.7988.777.79
El SalvadorSLV19975911.008.7562503813.744408.4187.057.90
El SalvadorSLV19986035.008.7550001143.884483.9986.729.28
El SalvadorSLV19996153.748.7550001143.864592.3987.768.34
El SalvadorSLV20006276.008.7550001144.004622.3789.268.87
Sao Tome and PrincipeSTP1994128.65732.6281738207.811357.60102.7618.97
Sao Tome and PrincipeSTP1995132.001420.340942378.051294.79114.3117.42
Sao Tome and PrincipeSTP1996135.292203.164063573.951272.02106.5618.71
Sao Tome and PrincipeSTP1997nananananana
Sao Tome and PrincipeSTP1998141.706883.2431641546.811284.0475.4517.81
Sao Tome and PrincipeSTP1999144.907118.9580081797.051284.2774.9618.08
Sao Tome and PrincipeSTP2000148.007978.1718751908.791316.8174.0018.08
Slovak RepublicSVK19945347.0032.04489.659036.7565.4916.74
Slovak RepublicSVK19955364.0029.713410.529675.5665.9121.68
Slovak RepublicSVK19965374.0030.653711.299992.8770.1627.02
Slovak RepublicSVK19975383.0033.616211.8510753.5770.3726.01
Slovak RepublicSVK19985391.0035.233411.7711835.6056.4727.91
Slovak RepublicSVK19995395.8041.362812.4912102.0855.9824.51
Slovak RepublicSVK20005401.0046.035213.0212618.5352.2224.78
SloveniaSVN19941988.90128.808593879.9711662.1253.2119.87
SloveniaSVN19951990.00118.518501389.0312574.9654.4623.11
SloveniaSVN19961991.00135.364303697.2713151.5154.3223.23
SloveniaSVN19971985.96159.6882935103.9614143.0253.2424.14
SloveniaSVN19981982.60166.134201108.9315067.3452.8225.35
SloveniaSVN19991985.50181.7691956113.4316198.3153.2727.82
SloveniaSVN20001988.00222.6560974119.6916983.3851.1327.60
SwedenSWE19948781.007.7169.4419256.7269.4818.48
SwedenSWE19958827.007.13339.5020438.3066.8319.46
SwedenSWE19968841.006.7069.5220864.5567.5018.93
SwedenSWE19978846.007.63499.5821521.1367.2718.59
SwedenSWE19988851.007.94999.5822475.3167.5619.56
SwedenSWE19998858.008.26249.6423477.2767.9319.51
SwedenSWE20008871.009.16229.6024628.4450.1420.60
SwazilandSWZ1994nananananana
SwazilandSWZ1995nananananana
SwazilandSWZ1996928.554.2993488311.095175.4371.2218.45
SwazilandSWZ1997959.704.6079621321.394773.6170.8820.40
SwazilandSWZ1998990.465.5282840731.514839.6169.0721.30
SwazilandSWZ19991019.476.1094841961.634928.8570.4718.63
SwazilandSWZ20001045.006.9398279191.775046.7270.8718.87
SeychellesSYC199473.925.0558581354.028216.6642.5616.11
SeychellesSYC199575.304.7619748123.449352.8352.6316.28
SeychellesSYC199676.544.9699831013.509422.0145.2028.23
SeychellesSYC199777.325.0263419153.3810332.3057.5418.98
SeychellesSYC199878.855.2621917722.8812334.4773.0916.45
SeychellesSYC199980.035.3425831793.3511454.2365.6417.61
SeychellesSYC200081.235.713817123.7111644.4262.1814.50
SyriaSYR199413713.8011.2250003810.873391.8774.7411.94
SyriaSYR199514112.0011.2250003810.563819.4470.8610.43
SyriaSYR199614505.9911.2250003811.373971.0970.939.15
SyriaSYR199715015.0011.2250003812.194071.7367.458.26
SyriaSYR199815402.0011.2250003812.024263.7267.967.89
SyriaSYR199915792.0011.2250003812.454176.4965.987.66
SyriaSYR200016189.0011.2250003812.834337.7860.577.00
ChadTCD19946463.87555.2047119104.70802.6790.137.87
ChadTCD19956707.00499.148407122.82871.6585.244.67
ChadTCD19966893.71511.5523987136.07885.9084.436.47
ChadTCD19977085.62583.6693726132.56936.6884.766.29
ChadTCD19987282.87589.9517822146.16938.4886.656.97
ChadTCD19997485.61615.6990967132.56970.4585.944.83
ChadTCD20007694.00711.9763184135.74959.4179.786.70
TogoTGO19943990.00555.2047119163.22838.1268.929.01
TogoTGO19954110.00499.148407186.59850.5069.319.94
TogoTGO19964230.00511.5523987201.70884.7471.3912.18
TogoTGO19974135.17583.6693726216.81976.0683.5210.62
TogoTGO19984258.14589.9517822199.34983.7477.3212.72
TogoTGO19994388.60615.6990967200.06995.4876.5811.32
TogoTGO20004527.00711.9763184207.24926.0477.4512.32
ThailandTHA199458718.0025.1499500310.256019.2049.7641.04
ThailandTHA199559401.0024.9151802110.646637.2550.8642.04
ThailandTHA199660003.0025.3426799810.837093.7250.6041.49
ThailandTHA199759370.4731.3643302911.277051.2551.8433.08
ThailandTHA199859793.5041.3593902612.306410.1751.0417.75
ThailandTHA199960245.8037.8136596711.856477.3153.0418.58
ThailandTHA200060728.0040.1118011511.886715.3153.4620.87
TajikistanTJK1994nananananana
TajikistanTJK1995nananananana
TajikistanTJK19965927.00295.546.95985.6967.3711.96
TajikistanTJK19976017.000.5623332860.071215.8568.698.66
TajikistanTJK19986127.000.7766249780.141234.3083.126.86
TajikistanTJK19996156.001.2377920150.171278.5371.908.41
TajikistanTJK20006170.002.0762500760.211379.6975.949.09
TurkmenistanTKM1994nananananana
TurkmenistanTKM1995nananananana
TurkmenistanTKM19964598.003978.225098449.044533.3339.0540.47
TurkmenistanTKM1997nananananana
TurkmenistanTKM1998nananananana
TurkmenistanTKM1999nananananana
TurkmenistanTKM2000nananananana
Trinidad&TobagoTTO19941253.515.9249291422.808361.0858.8312.99
Trinidad&TobagoTTO19951262.005.9477958682.739177.1561.439.78
Trinidad&TobagoTTO19961270.176.0050659182.839481.5663.4810.14
Trinidad&TobagoTTO19971277.746.251677993.498211.9169.7517.97
Trinidad&TobagoTTO19981285.146.2983078963.548426.1574.7414.06
Trinidad&TobagoTTO19991292.756.2989001272.9811192.6872.848.36
Trinidad&TobagoTTO20001301.006.2997970582.7613720.5769.767.43
TunisiaTUN19948823.691.0115540030.345214.3976.1712.71
TunisiaTUN19958957.500.9457499980.365343.9576.8512.78
TunisiaTUN19969089.300.9734082820.365830.0577.4813.06
TunisiaTUN19979215.001.1059080360.376077.8478.1113.12
TunisiaTUN19989333.301.1387250420.386352.5879.2712.98
TunisiaTUN19999455.901.1862250570.396787.7878.7412.49
TunisiaTUN20009563.501.3706829550.397130.1578.5613.29
TurkeyTUR199460573.0029608.711092.725757.2869.0416.11
TurkeyTUR199561646.0045845.120693.486085.0068.5921.63
TurkeyTUR199662695.0081404.936675.476424.4270.8420.99
TurkeyTUR199763745.0015186564522.947010.8970.5521.49
TurkeyTUR199864789.00260724111801.757209.8869.1020.15
TurkeyTUR199965819.00418783168680.636972.8569.6518.07
TurkeyTUR200066835.00625218252226.947414.0269.1521.11
TaiwanTWN199421034.9026.459922.8013471.4362.6321.77
TaiwanTWN199521214.9926.489923.0714341.1562.8521.63
TaiwanTWN199621387.8127.459923.0315589.1062.4920.63
TaiwanTWN199721577.3828.722.9716827.6962.7521.83
TaiwanTWN199821777.1033.459923.1117742.8063.9321.96
TaiwanTWN1999nananananana
TaiwanTWN2000nananananana
TanzaniaTZA199428793.00509.6308899159.87437.3286.9711.15
TanzaniaTZA199529646.00574.7617188198.45452.3085.159.92
TanzaniaTZA199630487.82579.9766846235.95471.4085.458.62
TanzaniaTZA199731316.10612.1224976340.30433.0582.2310.42
TanzaniaTZA199832128.48664.6712036367.40449.6889.559.83
TanzaniaTZA199932922.57744.7590942412.84474.7088.058.90
TanzaniaTZA200033696.00800.4085083437.36490.1883.339.39
UgandaUGA199418599.39979.4453735332.78711.2178.672.92
UgandaUGA199519168.00968.916687342.81816.9378.143.53
UgandaUGA199619740.951046.084961362.94855.1580.103.64
UgandaUGA199720420.001083.009033380.43901.6176.783.29
UgandaUGA199821040.001240.30603387.35933.5378.373.17
UgandaUGA199921620.001454.827026397.011016.6383.853.22
UgandaUGA200022210.001644.474976410.331029.5785.063.57
UkraineUKR199451921.000.3275142010.045594.7754.2817.10
UkraineUKR199551531.001.4730750320.224724.5255.8811.12
UkraineUKR199651114.001.8294689660.364402.5256.489.03
UkraineUKR199750697.001.8616579770.424422.6556.859.34
UkraineUKR199850303.002.4495420460.454531.5257.659.36
UkraineUKR199949906.004.1304421420.544833.4654.198.80
UkraineUKR200049501.005.4402332310.685146.9654.369.68
UruguayURY19943194.725.0439171793.008572.8269.5012.00
UruguayURY19953218.006.3489999774.138630.7567.9012.65
UruguayURY19963241.527.9718332295.089285.2369.5911.58
UruguayURY19973265.009.4418325426.329912.4469.8511.79
UruguayURY19983289.0010.471920016.7210571.7770.6312.21
UruguayURY19993313.0011.339300166.8910379.1871.4911.06
UruguayURY20003337.0012.09959037.0710284.5971.8210.03
United StatesUSA1994260616.0011.0026834.1268.1120.90
United StatesUSA1995263073.0011.0027894.9268.1420.98
United StatesUSA1996265504.0011.0029193.9168.0521.58
United StatesUSA1997268087.0011.0030797.8467.4522.52
United StatesUSA1998270560.0011.0032230.1968.0822.89
United StatesUSA1999272996.0011.0033725.7768.8423.14
United StatesUSA2000275423.0011.0035618.6768.2624.25
UzbekistanUZB199422377.0011.41.242339.1755.7813.30
UzbekistanUZB199522785.0030.25.262529.1146.8813.69
UzbekistanUZB199623225.0041.18.602803.8255.539.33
UzbekistanUZB1997nananananana
UzbekistanUZB1998nananananana
UzbekistanUZB1999nananananana
UzbekistanUZB2000nananananana
St.Vincent & GrenadinesVCT1994110.372.7000000481.075555.2755.009.08
St.Vincent & GrenadinesVCT1995111.002.7000000481.056086.1746.909.66
St.Vincent & GrenadinesVCT1996111.682.7000000481.056432.0046.098.90
St.Vincent & GrenadinesVCT1997112.422.7000000481.106389.3657.149.77
St.Vincent & GrenadinesVCT1998113.222.7000000481.126729.9255.1010.36
St.Vincent & GrenadinesVCT1999114.082.7000000481.107033.3753.1710.42
St.Vincent & GrenadinesVCT2000115.002.7000000481.007847.4546.428.43
VenezuelaVEN199421377.00148.502700862.856458.3165.2210.43
VenezuelaVEN199521844.00176.842498894.976586.8764.4513.96
VenezuelaVEN199622311.00417.332489190.336916.3558.9011.65
VenezuelaVEN199722777.00488.6347961280.246785.2162.9415.71
VenezuelaVEN199823242.00547.5557861362.326229.5668.3416.95
VenezuelaVEN199923707.00605.7166748418.596298.2264.4013.85
VenezuelaVEN200024170.00679.9602051469.487232.4757.9913.54
VietnamVNM199471679.2410962.129881777.341339.8973.4412.60
VietnamVNM199572980.0011034.919922079.011471.0775.0113.98
VietnamVNM199674300.0011032.599612108.211651.5679.0614.90
VietnamVNM199775460.0011683.330082049.032032.7277.9113.19
VietnamVNM1998nananananana
VietnamVNM1999nananananana
VietnamVNM2000nananananana
YemenYEM199414785.0012.0100002321.33859.2849.135.30
YemenYEM199515250.0040.8391799936.10815.7355.436.58
YemenYEM199615692.2594.1566696252.23801.6366.806.82
YemenYEM199716139.48129.280807550.391093.1850.506.38
YemenYEM199816599.45135.881698643.991161.4056.056.27
YemenYEM199917047.64155.718307556.011185.5853.315.37
YemenYEM200017507.16161.718307560.941292.5639.775.62
South AfricaZAF199438283.223.5507979391.816980.6062.727.73
South AfricaZAF199539120.003.627084971.987086.0965.008.57
South AfricaZAF199639912.004.2993488312.077429.2365.177.94
South AfricaZAF199740670.334.6079621322.217606.7565.457.61
South AfricaZAF199841402.395.5282840732.337612.7966.237.28
South AfricaZAF199942106.236.1094841962.447749.9665.746.74
South AfricaZAF200042800.996.9398279192.558016.6564.997.08
Congo, Dem. Rep.ZAR199442489.321194.119019518.70315.4480.482.96
Congo, Dem. Rep.ZAR199543848.007024.4311522763.71327.2777.932.63
Congo, Dem. Rep.ZAR199645254.158376420020.81309.8178.432.43
Congo, Dem. Rep.ZAR199746753.571.3134479520.58281.0781.942.60
Congo, Dem. Rep.ZAR1998nananananana
Congo, Dem. Rep.ZAR1999nananananana
Congo, Dem. Rep.ZAR2000nananananana
ZambiaZMB19948740.72669.3706055307.48834.1975.439.86
ZambiaZMB19958980.00864.1192017402.40829.3776.5510.31
ZambiaZMB19969214.401207.900024515.01838.0578.7410.99
ZambiaZMB19979443.211314.498047596.97851.4777.5912.15
ZambiaZMB19989665.711862.06897744.91800.6985.1213.75
ZambiaZMB19999881.212388.019043941.87765.2491.8215.30
ZambiaZMB200010089.003110.8439941157.63840.9786.3315.38
ZimbabweZWE199410775.358.1515388492.012586.8460.1018.53
ZimbabweZWE199511011.008.665375712.152603.3766.8915.03
ZimbabweZWE199611242.1610.002349852.642860.2372.0611.32
ZimbabweZWE199711923.5212.111289983.172727.0682.8211.01
ZimbabweZWE199812153.8523.679109574.062799.8577.6610.75
ZimbabweZWE199912388.3238.301200876.122770.4876.8910.73
ZimbabweZWE200012627.0044.417919169.482607.0369.238.62
- -
- - - -
- - - - - - - - - - - diff --git a/demos/data-types.html b/demos/data-types.html index 106c712f..682257c0 100644 --- a/demos/data-types.html +++ b/demos/data-types.html @@ -471,17 +471,13 @@ var tfConfig = { }, extensions:[ { - name: 'sort', - types: [ - 'number', 'string', 'string', - 'US', 'none', 'string' - ] + name: 'sort' },{ name: 'colOps', - id: ["sum1", "sum2"], + id: ['sum1', 'sum2'], col: [3, 4], - operation: ["sum", "sum"], - write_method: ["innerhtml", 'innerhtml'], + operation: ['sum', 'sum'], + write_method: ['innerhtml', 'innerhtml'], exclude_row: [totRowIndex], decimal_precision: [2, 2], tot_row_index: [totRowIndex], diff --git a/demos/theme-roller.html b/demos/theme-roller.html index 35c94e67..85191983 100644 --- a/demos/theme-roller.html +++ b/demos/theme-roller.html @@ -325,6 +325,7 @@ var tfConfig = { filters_row_index: 2, headers_row_index: 1, sort: true, + paging: true, col_number_format: [ null, null, 'US', null, null, null @@ -374,7 +375,8 @@ var tfConfig = { /* theme */ themes: [{ name: 'default' }], - extensions: [{ name: 'sort' }] + extensions: [{ name: 'sort' },/*{ name: 'colsVisibility'},*/ + {name:'filtersVisibility'}] }; var tf = new TableFilter('books', tfConfig, 2); diff --git a/dist/tablefilter/style/colsVisibility.css b/dist/tablefilter/style/colsVisibility.css index 86cf354b..66dde190 100644 --- a/dist/tablefilter/style/colsVisibility.css +++ b/dist/tablefilter/style/colsVisibility.css @@ -1,6 +1,6 @@ /** * TableFilter v0.0.0 by Max Guglielmi - * build date: 2015-08-09T02:22:27.647Z + * build date: 2015-08-09T12:32:52.610Z * MIT License */ /** diff --git a/dist/tablefilter/style/filtersVisibility.css b/dist/tablefilter/style/filtersVisibility.css index d693f203..e2afaee3 100644 --- a/dist/tablefilter/style/filtersVisibility.css +++ b/dist/tablefilter/style/filtersVisibility.css @@ -1,6 +1,6 @@ /** * TableFilter v0.0.0 by Max Guglielmi - * build date: 2015-08-09T02:22:27.647Z + * build date: 2015-08-09T12:32:52.610Z * MIT License */ /** @@ -11,7 +11,7 @@ span.expClpFlt a.btnExpClpFlt { height: 35px; display: inline-block; } -span.expClpFlt a.btnExpClpFlt :hover { +span.expClpFlt a.btnExpClpFlt:hover { background-color: #f4f4f4; } span.expClpFlt img { diff --git a/dist/tablefilter/style/tablefilter.css b/dist/tablefilter/style/tablefilter.css index 9b22402d..c0c89243 100644 --- a/dist/tablefilter/style/tablefilter.css +++ b/dist/tablefilter/style/tablefilter.css @@ -1,6 +1,6 @@ /** * TableFilter v0.0.0 by Max Guglielmi - * build date: 2015-08-09T02:22:27.647Z + * build date: 2015-08-09T12:32:52.610Z * MIT License */ /** diff --git a/dist/tablefilter/style/themes/default/default.css b/dist/tablefilter/style/themes/default/default.css index dbb3f2f8..9d2e9c75 100644 --- a/dist/tablefilter/style/themes/default/default.css +++ b/dist/tablefilter/style/themes/default/default.css @@ -1,6 +1,6 @@ /** * TableFilter v0.0.0 by Max Guglielmi - * build date: 2015-08-09T02:22:27.647Z + * build date: 2015-08-09T12:32:52.610Z * MIT License */ /** @@ -46,52 +46,39 @@ input.flt { width: 99% !important; } .inf { - background: #f4f4f4 url("images/bg_infDiv.jpg") 0 0 repeat-x !important; + height: $min-height; + background: #d7d7d7 url("images/bg_infDiv.jpg") 0 0 repeat-x !important; } input.reset { - width: 19px; - height: 19px; - cursor: pointer !important; - border: 0 !important; - vertical-align: middle; background: transparent url("images/btn_eraser.gif") center center no-repeat !important; } -input.reset :hover { - background: transparent url("images/btn_over_eraser.gif") center center no-repeat !important; -} -input.pgInp { - width: 19px; - height: 19px; - cursor: pointer !important; - border: 0 !important; +.helpBtn:hover { + background-color: transparent; } .nextPage { background: transparent url("images/btn_next_page.gif") center center no-repeat !important; } -.nextPage :hover { +.nextPage:hover { background: transparent url("images/btn_over_next_page.gif") center center no-repeat !important; } .previousPage { background: transparent url("images/btn_previous_page.gif") center center no-repeat !important; } -.previousPage :hover { +.previousPage:hover { background: transparent url("images/btn_over_previous_page.gif") center center no-repeat !important; } .firstPage { background: transparent url("images/btn_first_page.gif") center center no-repeat !important; } -.firstPage :hover { +.firstPage:hover { background: transparent url("images/btn_over_first_page.gif") center center no-repeat !important; } .lastPage { background: transparent url("images/btn_last_page.gif") center center no-repeat !important; } -.lastPage :hover { +.lastPage:hover { background: transparent url("images/btn_over_last_page.gif") center center no-repeat !important; } -select.rspg { - font-size: 10px; -} div.grd_Cont { background-color: #ebecee !important; border: 1px solid #ccc !important; @@ -119,14 +106,15 @@ div.grd_headTblCont table td { border-left: 1px solid #fff !important; border-top: 1px solid #fff !important; } +div.grd_tblCont table td { + border-bottom: 1px solid #999 !important; +} .grd_inf { background: #d7d7d7 url("images/bg_infDiv.jpg") 0 0 repeat-x !important; border-top: 1px solid #d0d0d0 !important; - height: 29px !important; } .loader { border: 1px solid #999; - background: #fff; } .defaultLoader { width: 32px; @@ -139,3 +127,6 @@ div.grd_headTblCont table td { .odd { background-color: #d5d5d5; } +span.expClpFlt a.btnExpClpFlt:hover { + background-color: transparent !important; +} diff --git a/dist/tablefilter/style/themes/mytheme/mytheme.css b/dist/tablefilter/style/themes/mytheme/mytheme.css index 163bbba8..0e7e45f8 100644 --- a/dist/tablefilter/style/themes/mytheme/mytheme.css +++ b/dist/tablefilter/style/themes/mytheme/mytheme.css @@ -1,6 +1,6 @@ /** * TableFilter v0.0.0 by Max Guglielmi - * build date: 2015-08-09T02:22:27.647Z + * build date: 2015-08-09T12:32:52.610Z * MIT License */ /** @@ -50,62 +50,28 @@ input.flt { width: 99% !important; } .inf { - background: #f4f4f4 url("images/bg_infDiv.jpg") left bottom repeat-x !important; + background: #d8d8d8; + height: $min-height; } input.reset { width: 53px; - height: 19px; - cursor: pointer !important; - border: 0 !important; - vertical-align: middle; background: transparent url("images/btn_filter.png") center center no-repeat !important; } -input.reset :hover { - background: #cad1d6 url("images/btn_filter.png") center center no-repeat !important; -} -.ldiv { - width: 40% !important; -} -.mdiv { - width: 34% !important; - text-align: left !important; -} -.rdiv { - width: 20% !important; -} -input.pgInp { - width: 19px; - height: 19px; - cursor: pointer !important; - border: 0 !important; +.helpBtn:hover { + background-color: transparent; } .nextPage { background: transparent url("images/btn_next_page.gif") center center no-repeat !important; } -.nextPage :hover { - background: #cad1d6 url("images/btn_next_page.gif") center center no-repeat !important; -} .previousPage { background: transparent url("images/btn_previous_page.gif") center center no-repeat !important; } -.previousPage :hover { - background: #cad1d6 url("images/btn_previous_page.gif") center center no-repeat !important; -} .firstPage { background: transparent url("images/btn_first_page.gif") center center no-repeat !important; } -.firstPage :hover { - background: #cad1d6 url("images/btn_first_page.gif") center center no-repeat !important; -} .lastPage { background: transparent url("images/btn_last_page.gif") center center no-repeat !important; } -.lastPage :hover { - background: #cad1d6 url("images/btn_last_page.gif") center center no-repeat !important; -} -select.rspg { - font-size: 10px; -} div.grd_Cont { background: #81963b url("images/bg_headers.jpg") left top repeat-x !important; border: 1px solid #ccc !important; @@ -124,6 +90,10 @@ div.grd_headTblCont { div.grd_tblCont table { border-right: none !important; } +div.grd_tblCont table td { + border-bottom: 1px dotted #81963b; + border-right: 1px dotted #81963b; +} div.grd_tblCont table th, div.grd_headTblCont table th { background: transparent url("images/bg_headers.jpg") 0 0 repeat-x !important; @@ -145,15 +115,12 @@ div.grd_headTblCont table td { padding: 1px 3px 1px 3px !important; } .grd_inf { - background: #f4f4f4 url("images/bg_infDiv.jpg") center bottom repeat-x !important; + background-color: #d8d8d8; border-top: 1px solid #d0d0d0 !important; - height: 29px !important; - padding-top: 2px !important; } .loader { border: 0 !important; - background: transparent !important; - margin: 185px auto !important; + background: #81963b !important; } .defaultLoader { width: 32px; @@ -166,3 +133,6 @@ div.grd_headTblCont table td { .odd { background-color: #fff; } +span.expClpFlt a.btnExpClpFlt:hover { + background-color: transparent !important; +} diff --git a/dist/tablefilter/style/themes/skyblue/skyblue.css b/dist/tablefilter/style/themes/skyblue/skyblue.css index 28fd3a4d..0e5cfa01 100644 --- a/dist/tablefilter/style/themes/skyblue/skyblue.css +++ b/dist/tablefilter/style/themes/skyblue/skyblue.css @@ -1,6 +1,6 @@ /** * TableFilter v0.0.0 by Max Guglielmi - * build date: 2015-08-09T02:22:27.647Z + * build date: 2015-08-09T12:32:52.610Z * MIT License */ /** @@ -55,48 +55,24 @@ input.flt { .inf { background-color: #e3efff !important; border: 1px solid #a4bed4; - height: 25px; + height: $min-height; color: #004a6f; } div.tot, div.status { border-right: 0 !important; } -.helpBtn { - margin: 0 5px 0 5px; - padding: 2px 4px 2px 4px; - color: #004a6f !important; - font-size: 13px; - border: 1px solid transparent !important; -} -.helpBtn :hover { - background-color: #ffe4ab; - border: 1px solid #ffb552 !important; - text-decoration: none; +.helpBtn:hover { + background-color: transparent; } input.reset { - width: 19px; - height: 19px; - cursor: pointer !important; - border: 1px solid transparent !important; - vertical-align: middle; background: transparent url("images/icn_clear_filters.png") center center no-repeat !important; } -input.reset :hover { - background: #ffe4ab url("images/icn_clear_filters.png") center center no-repeat !important; - border: 1px solid #ffb552 !important; -} -input.pgInp { - width: 19px; - height: 19px; - cursor: pointer !important; - border: 0 !important; -} .nextPage { background: transparent url("images/btn_next_page.gif") center center no-repeat !important; border: 1px solid transparent !important; } -.nextPage :hover { +.nextPage:hover { background: #ffe4ab url("images/btn_next_page.gif") center center no-repeat !important; border: 1px solid #ffb552 !important; } @@ -104,7 +80,7 @@ input.pgInp { background: transparent url("images/btn_prev_page.gif") center center no-repeat !important; border: 1px solid transparent !important; } -.previousPage :hover { +.previousPage:hover { background: #ffe4ab url("images/btn_prev_page.gif") center center no-repeat !important; border: 1px solid #ffb552 !important; } @@ -112,7 +88,7 @@ input.pgInp { background: transparent url("images/btn_first_page.gif") center center no-repeat !important; border: 1px solid transparent !important; } -.firstPage :hover { +.firstPage:hover { background: #ffe4ab url("images/btn_first_page.gif") center center no-repeat !important; border: 1px solid #ffb552 !important; } @@ -120,13 +96,10 @@ input.pgInp { background: transparent url("images/btn_last_page.gif") center center no-repeat !important; border: 1px solid transparent !important; } -.lastPage :hover { +.lastPage:hover { background: #ffe4ab url("images/btn_last_page.gif") center center no-repeat !important; border: 1px solid #ffb552 !important; } -select.rspg { - font-size: 10px; -} .activeHeader { background: #ffe4ab !important; border: 1px solid #ffb552 !important; @@ -149,7 +122,6 @@ div.grd_headTblCont { } div.grd_tblCont table { border-right: none !important; - font: 12px/13px "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif !important; } div.grd_tblCont table th, div.grd_headTblCont table th, @@ -159,38 +131,26 @@ div.grd_headTblCont table td { border-right: 1px solid #a4bed4 !important; border-left: 1px solid #fff !important; border-top: 1px solid #fff !important; - padding: 5px 2px 5px 2px !important; } div.grd_tblCont table td { border-bottom: 1px solid #a4bed4 !important; border-right: 0 !important; border-left: 0 !important; border-top: 0 !important; - padding: 5px 2px 5px 2px !important; } .grd_inf { - background-color: #d9eaed !important; - height: 25px; + background-color: #cce2fe; color: #004a6f; border-top: 1px solid #9cc !important; } -.grd_inf .rdiv { - height: 28px; -} .grd_inf a { text-decoration: none; font-weight: bold; } -.grd_inf a.helpBtn { - vertical-align: middle; - margin-top: 2px !important; - padding-top: 1px !important; -} .loader { - border: 0 !important; - background: transparent !important; - margin-top: 40px; - margin-left: 0 !important; + background-color: #2d8eef; + border: 1px solid #cce2fe; + border-radius: 5px; } .even { background-color: #fff; @@ -198,6 +158,9 @@ div.grd_tblCont table td { .odd { background-color: #e3efff; } +span.expClpFlt a.btnExpClpFlt:hover { + background-color: transparent !important; +} .ezActiveRow { background-color: #ffdc61 !important; color: inherit; diff --git a/dist/tablefilter/tablefilter.js b/dist/tablefilter/tablefilter.js index fdfce4d6..b80c6cd7 100644 --- a/dist/tablefilter/tablefilter.js +++ b/dist/tablefilter/tablefilter.js @@ -1,7023 +1,12 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define(factory); - else { - var a = factory(); - for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; - } -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // install a JSONP callback for chunk loading -/******/ var parentJsonpFunction = window["webpackJsonp"]; -/******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) { -/******/ // add "moreModules" to the modules object, -/******/ // then flag all "chunkIds" as loaded and fire callback -/******/ var moduleId, chunkId, i = 0, callbacks = []; -/******/ for(;i < chunkIds.length; i++) { -/******/ chunkId = chunkIds[i]; -/******/ if(installedChunks[chunkId]) -/******/ callbacks.push.apply(callbacks, installedChunks[chunkId]); -/******/ installedChunks[chunkId] = 0; -/******/ } -/******/ for(moduleId in moreModules) { -/******/ modules[moduleId] = moreModules[moduleId]; -/******/ } -/******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules); -/******/ while(callbacks.length) -/******/ callbacks.shift().call(null, __webpack_require__); -/******/ -/******/ }; -/******/ -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // object to store loaded and loading chunks -/******/ // "0" means "already loaded" -/******/ // Array means "loading", array contains callbacks -/******/ var installedChunks = { -/******/ 0:0 -/******/ }; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.loaded = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ // This file contains only the entry chunk. -/******/ // The chunk loading function for additional chunks -/******/ __webpack_require__.e = function requireEnsure(chunkId, callback) { -/******/ // "0" is the signal for "already loaded" -/******/ if(installedChunks[chunkId] === 0) -/******/ return callback.call(null, __webpack_require__); -/******/ -/******/ // an array means "currently loading". -/******/ if(installedChunks[chunkId] !== undefined) { -/******/ installedChunks[chunkId].push(callback); -/******/ } else { -/******/ // start chunk loading -/******/ installedChunks[chunkId] = [callback]; -/******/ var head = document.getElementsByTagName('head')[0]; -/******/ var script = document.createElement('script'); -/******/ script.type = 'text/javascript'; -/******/ script.charset = 'utf-8'; -/******/ script.async = true; -/******/ -/******/ script.src = __webpack_require__.p + "tf-" + ({}[chunkId]||chunkId) + ".js"; -/******/ head.appendChild(script); -/******/ } -/******/ }; -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = "/dist/tablefilter/"; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ function(module, exports, __webpack_require__) { +/** + * TableFilter v0.0.0 by Max Guglielmi + * build date: 2015-08-09T12:32:52.508Z + * MIT License + */ - 'use strict'; - - var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - - Object.defineProperty(exports, '__esModule', { - value: true - }); - - var _Event = __webpack_require__(2); - - var _Event2 = _interopRequireDefault(_Event); - - var _Dom = __webpack_require__(3); - - var _Dom2 = _interopRequireDefault(_Dom); - - var _Str = __webpack_require__(4); - - var _Str2 = _interopRequireDefault(_Str); - - var _Cookie = __webpack_require__(5); - - var _Cookie2 = _interopRequireDefault(_Cookie); - - var _Types = __webpack_require__(6); - - var _Types2 = _interopRequireDefault(_Types); - - var _Arr = __webpack_require__(7); - - var _Arr2 = _interopRequireDefault(_Arr); - - var _DateHelper = __webpack_require__(8); - - var _DateHelper2 = _interopRequireDefault(_DateHelper); - - var _Helpers = __webpack_require__(9); - - var _Helpers2 = _interopRequireDefault(_Helpers); - - // Features - - var _Store = __webpack_require__(10); - - var _GridLayout = __webpack_require__(11); - - var _Loader = __webpack_require__(12); - - var _HighlightKeyword = __webpack_require__(13); - - var _PopupFilter = __webpack_require__(14); - - var _Dropdown = __webpack_require__(15); - - var _CheckList = __webpack_require__(16); - - var _RowsCounter = __webpack_require__(17); - - var _StatusBar = __webpack_require__(18); - - var _Paging = __webpack_require__(19); - - var _ClearButton = __webpack_require__(20); - - var _Help = __webpack_require__(21); - - var _AlternateRows = __webpack_require__(22); - - var global = window, - isValidDate = _DateHelper2['default'].isValid, - formatDate = _DateHelper2['default'].format, - doc = global.document; - - var TableFilter = (function () { - - /** - * TF object constructor - * @param {String} id Table id - * @param {Number} row index indicating the 1st row - * @param {Object} configuration object - * - * TODO: Accept a TABLE element or query selectors - */ - - function TableFilter(id) { - _classCallCheck(this, TableFilter); - - if (arguments.length === 0) { - return; - } - - this.id = id; - this.version = '0.0.0'; - this.year = new Date().getFullYear(); - this.tbl = _Dom2['default'].id(id); - this.startRow = null; - this.refRow = null; - this.headersRow = null; - this.cfg = {}; - this.nbFilterableRows = null; - this.nbRows = null; - this.nbCells = null; - this._hasGrid = false; - this.enableModules = false; - - if (!this.tbl || this.tbl.nodeName != 'TABLE' || this.getRowsNb() === 0) { - throw new Error('Could not instantiate TableFilter: HTML table not found.'); - } - - if (arguments.length > 1) { - for (var i = 0, len = arguments.length; i < len; i++) { - var arg = arguments[i]; - var argtype = typeof arg; - switch (_Str2['default'].lower(argtype)) { - case 'number': - this.startRow = arg; - break; - case 'object': - this.cfg = arg; - break; - } - } - } - - // configuration object - var f = this.cfg; - - //Start row et cols nb - this.refRow = this.startRow === null ? 2 : this.startRow + 1; - try { - this.nbCells = this.getCellsNb(this.refRow); - } catch (e) { - this.nbCells = this.getCellsNb(0); - } - - //default script base path - this.basePath = f.base_path || 'tablefilter/'; - - /*** filter types ***/ - this.fltTypeInp = 'input'; - this.fltTypeSlc = 'select'; - this.fltTypeMulti = 'multiple'; - this.fltTypeCheckList = 'checklist'; - this.fltTypeNone = 'none'; - - /*** filters' grid properties ***/ - - //enables/disables filter grid - this.fltGrid = f.grid === false ? false : true; - - /*** Grid layout ***/ - //enables/disables grid layout (fixed headers) - this.gridLayout = Boolean(f.grid_layout); - this.sourceTblHtml = null; - if (this.gridLayout) { - this.sourceTblHtml = this.tbl.outerHTML; - } - /*** ***/ - - this.filtersRowIndex = f.filters_row_index || 0; - this.headersRow = f.headers_row_index || (this.filtersRowIndex === 0 ? 1 : 0); - - if (this.gridLayout) { - if (this.headersRow > 1) { - this.filtersRowIndex = this.headersRow + 1; - } else { - this.filtersRowIndex = 1; - this.headersRow = 0; - } - } - - //defines tag of the cells containing filters (td/th) - this.fltCellTag = f.filters_cell_tag !== 'th' || f.filters_cell_tag !== 'td' ? 'td' : f.filters_cell_tag; - - //stores filters ids - this.fltIds = []; - //stores filters DOM elements - this.fltElms = []; - //stores filters values - this.searchArgs = null; - //stores table data - this.tblData = []; - //stores valid rows indexes (rows visible upon filtering) - this.validRowsIndex = null; - //stores filters row element - this.fltGridEl = null; - //is first load boolean - this.isFirstLoad = true; - //container div for paging elements, reset btn etc. - this.infDiv = null; - //div for rows counter - this.lDiv = null; - //div for reset button and results per page select - this.rDiv = null; - //div for paging elements - this.mDiv = null; - - //defines css class for div containing paging elements, rows counter etc - this.infDivCssClass = f.inf_div_css_class || 'inf'; - //defines css class for left div - this.lDivCssClass = f.left_div_css_class || 'ldiv'; - //defines css class for right div - this.rDivCssClass = f.right_div_css_class || 'rdiv'; - //defines css class for mid div - this.mDivCssClass = f.middle_div_css_class || 'mdiv'; - //table container div css class - this.contDivCssClass = f.content_div_css_class || 'cont'; - - /*** filters' grid appearance ***/ - //stylesheet file - this.stylePath = f.style_path || this.basePath + 'style/'; - this.stylesheet = f.stylesheet || this.stylePath + 'tablefilter.css'; - this.stylesheetId = this.id + '_style'; - //defines css class for filters row - this.fltsRowCssClass = f.flts_row_css_class || 'fltrow'; - //enables/disables icons (paging, reset button) - this.enableIcons = f.enable_icons === false ? false : true; - //enables/disbles rows alternating bg colors - this.alternateBgs = Boolean(f.alternate_rows); - //defines widths of columns - this.hasColWidths = _Types2['default'].isArray(f.col_widths); - this.colWidths = this.hasColWidths ? f.col_widths : null; - //defines css class for filters - this.fltCssClass = f.flt_css_class || 'flt'; - //defines css class for multiple selects filters - this.fltMultiCssClass = f.flt_multi_css_class || 'flt_multi'; - //defines css class for filters - this.fltSmallCssClass = f.flt_small_css_class || 'flt_s'; - //defines css class for single-filter - this.singleFltCssClass = f.single_flt_css_class || 'single_flt'; - - /*** filters' grid behaviours ***/ - //enables/disables enter key - this.enterKey = f.enter_key === false ? false : true; - //calls function before filtering starts - this.onBeforeFilter = _Types2['default'].isFn(f.on_before_filter) ? f.on_before_filter : null; - //calls function after filtering - this.onAfterFilter = _Types2['default'].isFn(f.on_after_filter) ? f.on_after_filter : null; - //enables/disables case sensitivity - this.caseSensitive = Boolean(f.case_sensitive); - //enables/disbles exact match for search - this.exactMatch = Boolean(f.exact_match); - //refreshes drop-down lists upon validation - this.linkedFilters = Boolean(f.linked_filters); - //wheter excluded options are disabled - this.disableExcludedOptions = Boolean(f.disable_excluded_options); - //stores active filter element - this.activeFlt = null; - //id of active filter - this.activeFilterId = null; - //enables always visible rows - this.hasVisibleRows = Boolean(f.rows_always_visible); - //array containing always visible rows - this.visibleRows = this.hasVisibleRows ? f.rows_always_visible : []; - //enables/disables external filters generation - this.isExternalFlt = Boolean(f.external_flt_grid); - //array containing ids of external elements containing filters - this.externalFltTgtIds = f.external_flt_grid_ids || null; - //stores filters elements if isExternalFlt is true - this.externalFltEls = []; - //delays any filtering process if loader true - this.execDelay = !isNaN(f.exec_delay) ? parseInt(f.exec_delay, 10) : 100; - //calls function when filters grid loaded - this.onFiltersLoaded = _Types2['default'].isFn(f.on_filters_loaded) ? f.on_filters_loaded : null; - //enables/disables single filter search - this.singleSearchFlt = Boolean(f.single_search_filter); - //calls function after row is validated - this.onRowValidated = _Types2['default'].isFn(f.on_row_validated) ? f.on_row_validated : null; - //array defining columns for customCellData event - this.customCellDataCols = f.custom_cell_data_cols ? f.custom_cell_data_cols : []; - //calls custom function for retrieving cell data - this.customCellData = _Types2['default'].isFn(f.custom_cell_data) ? f.custom_cell_data : null; - //input watermark text array - this.watermark = f.watermark || ''; - this.isWatermarkArray = _Types2['default'].isArray(this.watermark); - //id of toolbar container element - this.toolBarTgtId = f.toolbar_target_id || null; - //enables/disables help div - this.helpInstructions = _Types2['default'].isUndef(f.help_instructions) ? undefined : Boolean(f.help_instructions); - //popup filters - this.popUpFilters = Boolean(f.popup_filters); - //active columns color - this.markActiveColumns = Boolean(f.mark_active_columns); - //defines css class for active column header - this.activeColumnsCssClass = f.active_columns_css_class || 'activeHeader'; - //calls function before active column header is marked - this.onBeforeActiveColumn = _Types2['default'].isFn(f.on_before_active_column) ? f.on_before_active_column : null; - //calls function after active column header is marked - this.onAfterActiveColumn = _Types2['default'].isFn(f.on_after_active_column) ? f.on_after_active_column : null; - - /*** select filter's customisation and behaviours ***/ - //defines 1st option text - this.displayAllText = f.display_all_text || 'Clear'; - //enables/disables empty option in combo-box filters - this.enableEmptyOption = Boolean(f.enable_empty_option); - //defines empty option text - this.emptyText = f.empty_text || '(Empty)'; - //enables/disables non empty option in combo-box filters - this.enableNonEmptyOption = Boolean(f.enable_non_empty_option); - //defines empty option text - this.nonEmptyText = f.non_empty_text || '(Non empty)'; - //enables/disables onChange event on combo-box - this.onSlcChange = f.on_change === false ? false : true; - //enables/disables select options sorting - this.sortSlc = f.sort_select === false ? false : true; - //enables/disables ascending numeric options sorting - this.isSortNumAsc = Boolean(f.sort_num_asc); - this.sortNumAsc = this.isSortNumAsc ? f.sort_num_asc : null; - //enables/disables descending numeric options sorting - this.isSortNumDesc = Boolean(f.sort_num_desc); - this.sortNumDesc = this.isSortNumDesc ? f.sort_num_desc : null; - //enabled selects are populated on demand - this.fillSlcOnDemand = Boolean(f.fill_slc_on_demand); - this.hasCustomOptions = _Types2['default'].isObj(f.custom_options); - this.customOptions = f.custom_options; - - /*** Filter operators ***/ - this.rgxOperator = f.regexp_operator || 'rgx:'; - this.emOperator = f.empty_operator || '[empty]'; - this.nmOperator = f.nonempty_operator || '[nonempty]'; - this.orOperator = f.or_operator || '||'; - this.anOperator = f.and_operator || '&&'; - this.grOperator = f.greater_operator || '>'; - this.lwOperator = f.lower_operator || '<'; - this.leOperator = f.lower_equal_operator || '<='; - this.geOperator = f.greater_equal_operator || '>='; - this.dfOperator = f.different_operator || '!'; - this.lkOperator = f.like_operator || '*'; - this.eqOperator = f.equal_operator || '='; - this.stOperator = f.start_with_operator || '{'; - this.enOperator = f.end_with_operator || '}'; - this.curExp = f.cur_exp || '^[¥£€$]'; - this.separator = f.separator || ','; - - /*** rows counter ***/ - //show/hides rows counter - this.rowsCounter = Boolean(f.rows_counter); - - /*** status bar ***/ - //show/hides status bar - this.statusBar = Boolean(f.status_bar); - - /*** loader ***/ - //enables/disables loader/spinner indicator - this.loader = Boolean(f.loader); - - /*** validation - reset buttons/links ***/ - //show/hides filter's validation button - this.displayBtn = Boolean(f.btn); - //defines validation button text - this.btnText = f.btn_text || (!this.enableIcons ? 'Go' : ''); - //defines css class for validation button - this.btnCssClass = f.btn_css_class || (!this.enableIcons ? 'btnflt' : 'btnflt_icon'); - //show/hides reset link - this.btnReset = Boolean(f.btn_reset); - //defines css class for reset button - this.btnResetCssClass = f.btn_reset_css_class || 'reset'; - //callback function before filters are cleared - this.onBeforeReset = _Types2['default'].isFn(f.on_before_reset) ? f.on_before_reset : null; - //callback function after filters are cleared - this.onAfterReset = _Types2['default'].isFn(f.on_after_reset) ? f.on_after_reset : null; - - /*** paging ***/ - //enables/disables table paging - this.paging = Boolean(f.paging); - this.nbVisibleRows = 0; //nb visible rows - this.nbHiddenRows = 0; //nb hidden rows - - /*** autofilter on typing ***/ - //enables/disables auto filtering, table is filtered when user stops - //typing - this.autoFilter = Boolean(f.auto_filter); - //onkeyup delay timer (msecs) - this.autoFilterDelay = !isNaN(f.auto_filter_delay) ? f.auto_filter_delay : 900; - //typing indicator - this.isUserTyping = null; - this.autoFilterTimer = null; - - /*** keyword highlighting ***/ - //enables/disables keyword highlighting - this.highlightKeywords = Boolean(f.highlight_keywords); - - /*** data types ***/ - //defines default date type (european DMY) - this.defaultDateType = f.default_date_type || 'DMY'; - //defines default thousands separator - //US = ',' EU = '.' - this.thousandsSeparator = f.thousands_separator || ','; - //defines default decimal separator - //US & javascript = '.' EU = ',' - this.decimalSeparator = f.decimal_separator || '.'; - //enables number format per column - this.hasColNbFormat = _Types2['default'].isArray(f.col_number_format); - //array containing columns nb formats - this.colNbFormat = this.hasColNbFormat ? f.col_number_format : null; - //enables date type per column - this.hasColDateType = _Types2['default'].isArray(f.col_date_type); - //array containing columns date type - this.colDateType = this.hasColDateType ? f.col_date_type : null; - - /*** status messages ***/ - //filtering - this.msgFilter = f.msg_filter || 'Filtering data...'; - //populating drop-downs - this.msgPopulate = f.msg_populate || 'Populating filter...'; - //populating drop-downs - this.msgPopulateCheckList = f.msg_populate_checklist || 'Populating list...'; - //changing paging page - this.msgChangePage = f.msg_change_page || 'Collecting paging data...'; - //clearing filters - this.msgClear = f.msg_clear || 'Clearing filters...'; - //changing nb results/page - this.msgChangeResults = f.msg_change_results || 'Changing results per page...'; - //re-setting grid values - this.msgResetValues = f.msg_reset_grid_values || 'Re-setting filters values...'; - //re-setting page - this.msgResetPage = f.msg_reset_page || 'Re-setting page...'; - //re-setting page length - this.msgResetPageLength = f.msg_reset_page_length || 'Re-setting page length...'; - //table sorting - this.msgSort = f.msg_sort || 'Sorting data...'; - //extensions loading - this.msgLoadExtensions = f.msg_load_extensions || 'Loading extensions...'; - //themes loading - this.msgLoadThemes = f.msg_load_themes || 'Loading theme(s)...'; - - /*** ids prefixes ***/ - //css class name added to table - this.prfxTf = 'TF'; - //filters (inputs - selects) - this.prfxFlt = 'flt'; - //validation button - this.prfxValButton = 'btn'; - //container div for paging elements, rows counter etc. - this.prfxInfDiv = 'inf_'; - //left div - this.prfxLDiv = 'ldiv_'; - //right div - this.prfxRDiv = 'rdiv_'; - //middle div - this.prfxMDiv = 'mdiv_'; - //filter values cookie - this.prfxCookieFltsValues = 'tf_flts_'; - //page nb cookie - this.prfxCookiePageNb = 'tf_pgnb_'; - //page length cookie - this.prfxCookiePageLen = 'tf_pglen_'; - - /*** cookies ***/ - this.hasStoredValues = false; - //remembers filters values on page load - this.rememberGridValues = Boolean(f.remember_grid_values); - //cookie storing filter values - this.fltsValuesCookie = this.prfxCookieFltsValues + this.id; - //remembers page nb on page load - this.rememberPageNb = this.paging && f.remember_page_number; - //cookie storing page nb - this.pgNbCookie = this.prfxCookiePageNb + this.id; - //remembers page length on page load - this.rememberPageLen = this.paging && f.remember_page_length; - //cookie storing page length - this.pgLenCookie = this.prfxCookiePageLen + this.id; - - /*** extensions ***/ - //imports external script - this.extensions = f.extensions; - this.hasExtensions = _Types2['default'].isArray(this.extensions); - - /*** themes ***/ - this.enableDefaultTheme = Boolean(f.enable_default_theme); - //imports themes - this.hasThemes = this.enableDefaultTheme || _Types2['default'].isArray(f.themes); - this.themes = f.themes || []; - //themes path - this.themesPath = f.themes_path || this.stylePath + 'themes/'; - - // Features registry - this.Mod = {}; - - // Extensions registry - this.ExtRegistry = {}; - - /*** TF events ***/ - this.Evt = { - name: { - filter: 'Filter', - dropdown: 'DropDown', - checklist: 'CheckList', - changepage: 'ChangePage', - clear: 'Clear', - changeresultsperpage: 'ChangeResults', - resetvalues: 'ResetValues', - resetpage: 'ResetPage', - resetpagelength: 'ResetPageLength', - loadextensions: 'LoadExtensions', - loadthemes: 'LoadThemes' - }, - - // Detect key - detectKey: function detectKey(e) { - if (!this.enterKey) { - return; - } - var _ev = e || global.event; - if (_ev) { - var key = _Event2['default'].keyCode(_ev); - if (key === 13) { - this.filter(); - _Event2['default'].cancel(_ev); - _Event2['default'].stop(_ev); - } else { - this.isUserTyping = true; - global.clearInterval(this.autoFilterTimer); - this.autoFilterTimer = null; - } - } - }, - // if auto-filter on, detect user is typing and filter columns - onKeyUp: function onKeyUp(e) { - if (!this.autoFilter) { - return; - } - var _ev = e || global.event; - var key = _Event2['default'].keyCode(_ev); - this.isUserTyping = false; - - function filter() { - /*jshint validthis:true */ - global.clearInterval(this.autoFilterTimer); - this.autoFilterTimer = null; - if (!this.isUserTyping) { - this.filter(); - this.isUserTyping = null; - } - } - - if (key !== 13 && key !== 9 && key !== 27 && key !== 38 && key !== 40) { - if (this.autoFilterTimer === null) { - this.autoFilterTimer = global.setInterval(filter.bind(this), this.autoFilterDelay); - } - } else { - global.clearInterval(this.autoFilterTimer); - this.autoFilterTimer = null; - } - }, - // if auto-filter on, detect user is typing - onKeyDown: function onKeyDown() { - if (!this.autoFilter) { - return; - } - this.isUserTyping = true; - }, - // if auto-filter on, clear interval on filter blur - onInpBlur: function onInpBlur() { - if (this.autoFilter) { - this.isUserTyping = false; - global.clearInterval(this.autoFilterTimer); - } - // TODO: hack to prevent ezEditTable enter key event hijaking. - // Needs to be fixed in the vendor's library - if (this.hasExtension('advancedGrid')) { - var advGrid = this.extension('advancedGrid'); - var ezEditTable = advGrid._ezEditTable; - if (advGrid.cfg.editable) { - ezEditTable.Editable.Set(); - } - if (advGrid.cfg.selection) { - ezEditTable.Selection.Set(); - } - } - }, - // set focused text-box filter as active - onInpFocus: function onInpFocus(e) { - var _ev = e || global.event; - var elm = _Event2['default'].target(_ev); - this.activeFilterId = elm.getAttribute('id'); - this.activeFlt = _Dom2['default'].id(this.activeFilterId); - if (this.popUpFilters) { - _Event2['default'].cancel(_ev); - _Event2['default'].stop(_ev); - } - // TODO: hack to prevent ezEditTable enter key event hijaking. - // Needs to be fixed in the vendor's library - if (this.hasExtension('advancedGrid')) { - var advGrid = this.extension('advancedGrid'); - var ezEditTable = advGrid._ezEditTable; - if (advGrid.cfg.editable) { - ezEditTable.Editable.Remove(); - } - if (advGrid.cfg.selection) { - ezEditTable.Selection.Remove(); - } - } - }, - // set focused drop-down filter as active - onSlcFocus: function onSlcFocus(e) { - var _ev = e || global.event; - var elm = _Event2['default'].target(_ev); - this.activeFilterId = elm.getAttribute('id'); - this.activeFlt = _Dom2['default'].id(this.activeFilterId); - // select is populated when element has focus - if (this.fillSlcOnDemand && elm.getAttribute('filled') === '0') { - var ct = elm.getAttribute('ct'); - this.Mod.dropdown._build(ct); - } - if (this.popUpFilters) { - _Event2['default'].cancel(_ev); - _Event2['default'].stop(_ev); - } - }, - // filter columns on drop-down filter change - onSlcChange: function onSlcChange(e) { - if (!this.activeFlt) { - return; - } - var _ev = e || global.event; - if (this.popUpFilters) { - _Event2['default'].stop(_ev); - } - if (this.onSlcChange) { - this.filter(); - } - }, - // fill checklist filter on click if required - onCheckListClick: function onCheckListClick(e) { - var _ev = e || global.event; - var elm = _Event2['default'].target(_ev); - if (this.fillSlcOnDemand && elm.getAttribute('filled') === '0') { - var ct = elm.getAttribute('ct'); - this.Mod.checkList._build(ct); - this.Mod.checkList.checkListDiv[ct].onclick = null; - this.Mod.checkList.checkListDiv[ct].title = ''; - } - }, - // filter when validation button clicked - onBtnClick: function onBtnClick() { - this.filter(); - } - }; - } - - _createClass(TableFilter, [{ - key: 'init', - - /** - * Initialise filtering grid bar behaviours and layout - * - * TODO: decompose in smaller methods - */ - value: function init() { - if (this._hasGrid) { - return; - } - if (!this.tbl) { - this.tbl = _Dom2['default'].id(this.id); - } - if (this.gridLayout) { - this.refRow = this.startRow === null ? 0 : this.startRow; - } - if (this.popUpFilters && (this.filtersRowIndex === 0 && this.headersRow === 1 || this.gridLayout)) { - this.headersRow = 0; - } - - var Mod = this.Mod; - var n = this.singleSearchFlt ? 1 : this.nbCells, - inpclass = undefined; - - //loads stylesheet if not imported - this['import'](this.stylesheetId, this.stylesheet, null, 'link'); - - //loads theme - if (this.hasThemes) { - this._loadThemes(); - } - - if (this.rememberGridValues || this.rememberPageNb || this.rememberPageLen) { - Mod.store = new _Store.Store(this); - } - - if (this.gridLayout) { - Mod.gridLayout = new _GridLayout.GridLayout(this); - Mod.gridLayout.init(); - } - - if (this.loader) { - if (!Mod.loader) { - Mod.loader = new _Loader.Loader(this); - } - } - - if (this.highlightKeywords) { - Mod.highlightKeyword = new _HighlightKeyword.HighlightKeyword(this); - } - - if (this.popUpFilters) { - if (!Mod.popupFilter) { - Mod.popupFilter = new _PopupFilter.PopupFilter(this); - } - Mod.popupFilter.init(); - } - - //filters grid is not generated - if (!this.fltGrid) { - this.refRow = this.refRow - 1; - if (this.gridLayout) { - this.refRow = 0; - } - this.nbFilterableRows = this.getRowsNb(); - this.nbVisibleRows = this.nbFilterableRows; - this.nbRows = this.nbFilterableRows + this.refRow; - } else { - if (this.isFirstLoad) { - var fltrow = undefined; - if (!this.gridLayout) { - var thead = _Dom2['default'].tag(this.tbl, 'thead'); - if (thead.length > 0) { - fltrow = thead[0].insertRow(this.filtersRowIndex); - } else { - fltrow = this.tbl.insertRow(this.filtersRowIndex); - } - - if (this.headersRow > 1 && this.filtersRowIndex <= this.headersRow && !this.popUpFilters) { - this.headersRow++; - } - if (this.popUpFilters) { - this.headersRow++; - } - - fltrow.className = this.fltsRowCssClass; - //Disable for grid_layout - if (this.isExternalFlt && (!this.gridLayout || this.popUpFilters)) { - fltrow.style.display = 'none'; - } - } - - this.nbFilterableRows = this.getRowsNb(); - this.nbVisibleRows = this.nbFilterableRows; - this.nbRows = this.tbl.rows.length; - - for (var i = 0; i < n; i++) { - // this loop adds filters - - if (this.popUpFilters) { - Mod.popupFilter.build(i); - } - - var fltcell = _Dom2['default'].create(this.fltCellTag), - col = this.getFilterType(i), - externalFltTgtId = this.isExternalFlt && this.externalFltTgtIds ? this.externalFltTgtIds[i] : null; - - if (this.singleSearchFlt) { - fltcell.colSpan = this.nbCells; - } - if (!this.gridLayout) { - fltrow.appendChild(fltcell); - } - inpclass = i == n - 1 && this.displayBtn ? this.fltSmallCssClass : this.fltCssClass; - - //only 1 input for single search - if (this.singleSearchFlt) { - col = this.fltTypeInp; - inpclass = this.singleFltCssClass; - } - - //drop-down filters - if (col === this.fltTypeSlc || col === this.fltTypeMulti) { - if (!Mod.dropdown) { - Mod.dropdown = new _Dropdown.Dropdown(this); - } - var dropdown = Mod.dropdown; - - var slc = _Dom2['default'].create(this.fltTypeSlc, ['id', this.prfxFlt + i + '_' + this.id], ['ct', i], ['filled', '0']); - - if (col === this.fltTypeMulti) { - slc.multiple = this.fltTypeMulti; - slc.title = dropdown.multipleSlcTooltip; - } - slc.className = _Str2['default'].lower(col) === this.fltTypeSlc ? inpclass : this.fltMultiCssClass; // for ie<=6 - - //filter is appended in desired external element - if (externalFltTgtId) { - _Dom2['default'].id(externalFltTgtId).appendChild(slc); - this.externalFltEls.push(slc); - } else { - fltcell.appendChild(slc); - } - - this.fltIds.push(this.prfxFlt + i + '_' + this.id); - - if (!this.fillSlcOnDemand) { - dropdown._build(i); - } - - _Event2['default'].add(slc, 'keypress', this.Evt.detectKey.bind(this)); - _Event2['default'].add(slc, 'change', this.Evt.onSlcChange.bind(this)); - _Event2['default'].add(slc, 'focus', this.Evt.onSlcFocus.bind(this)); - - //1st option is created here since dropdown.build isn't - //invoked - if (this.fillSlcOnDemand) { - var opt0 = _Dom2['default'].createOpt(this.displayAllText, ''); - slc.appendChild(opt0); - } - } - // checklist - else if (col === this.fltTypeCheckList) { - var checkList = undefined; - Mod.checkList = new _CheckList.CheckList(this); - checkList = Mod.checkList; - - var divCont = _Dom2['default'].create('div', ['id', checkList.prfxCheckListDiv + i + '_' + this.id], ['ct', i], ['filled', '0']); - divCont.className = checkList.checkListDivCssClass; - - //filter is appended in desired element - if (externalFltTgtId) { - _Dom2['default'].id(externalFltTgtId).appendChild(divCont); - this.externalFltEls.push(divCont); - } else { - fltcell.appendChild(divCont); - } - - checkList.checkListDiv[i] = divCont; - this.fltIds.push(this.prfxFlt + i + '_' + this.id); - if (!this.fillSlcOnDemand) { - checkList._build(i); - } - - if (this.fillSlcOnDemand) { - _Event2['default'].add(divCont, 'click', this.Evt.onCheckListClick.bind(this)); - divCont.appendChild(_Dom2['default'].text(checkList.activateCheckListTxt)); - } - } else { - //show/hide input - var inptype = col === this.fltTypeInp ? 'text' : 'hidden'; - var inp = _Dom2['default'].create(this.fltTypeInp, ['id', this.prfxFlt + i + '_' + this.id], ['type', inptype], ['ct', i]); - if (inptype !== 'hidden' && this.watermark) { - inp.setAttribute('placeholder', this.isWatermarkArray ? this.watermark[i] || '' : this.watermark); - } - inp.className = inpclass; - _Event2['default'].add(inp, 'focus', this.Evt.onInpFocus.bind(this)); - - //filter is appended in desired element - if (externalFltTgtId) { - _Dom2['default'].id(externalFltTgtId).appendChild(inp); - this.externalFltEls.push(inp); - } else { - fltcell.appendChild(inp); - } - - this.fltIds.push(this.prfxFlt + i + '_' + this.id); - - _Event2['default'].add(inp, 'keypress', this.Evt.detectKey.bind(this)); - _Event2['default'].add(inp, 'keydown', this.Evt.onKeyDown.bind(this)); - _Event2['default'].add(inp, 'keyup', this.Evt.onKeyUp.bind(this)); - _Event2['default'].add(inp, 'blur', this.Evt.onInpBlur.bind(this)); - - if (this.rememberGridValues) { - var flts_values = this.Mod.store.getFilterValues(this.fltsValuesCookie); - if (flts_values[i] != ' ') { - this.setFilterValue(i, flts_values[i], false); - } - } - } - // this adds submit button - if (i == n - 1 && this.displayBtn) { - var btn = _Dom2['default'].create(this.fltTypeInp, ['id', this.prfxValButton + i + '_' + this.id], ['type', 'button'], ['value', this.btnText]); - btn.className = this.btnCssClass; - - //filter is appended in desired element - if (externalFltTgtId) { - _Dom2['default'].id(externalFltTgtId).appendChild(btn); - } else { - fltcell.appendChild(btn); - } - - _Event2['default'].add(btn, 'click', this.Evt.onBtnClick.bind(this)); - } //if - } // for i - } else { - this._resetGrid(); - } //if isFirstLoad - } //if this.fltGrid - - /* Filter behaviours */ - if (this.hasVisibleRows) { - this.enforceVisibility(); - } - if (this.rowsCounter) { - Mod.rowsCounter = new _RowsCounter.RowsCounter(this); - Mod.rowsCounter.init(); - } - if (this.statusBar) { - Mod.statusBar = new _StatusBar.StatusBar(this); - Mod.statusBar.init(); - } - if (this.paging || Mod.paging) { - if (!Mod.paging) { - Mod.paging = new _Paging.Paging(this); - } - - // TODO: handle both cases in paging init - if (Mod.paging.isPagingRemoved) { - Mod.paging.reset(); - } else { - Mod.paging.init(); - } - } - if (this.btnReset) { - Mod.clearButton = new _ClearButton.ClearButton(this); - Mod.clearButton.init(); - } - if (this.helpInstructions) { - if (!Mod.help) { - Mod.help = new _Help.Help(this); - } - Mod.help.init(); - } - if (this.hasColWidths && !this.gridLayout) { - this.setColWidths(); - } - if (this.alternateBgs) { - Mod.alternateRows = new _AlternateRows.AlternateRows(this); - Mod.alternateRows.init(); - } - - this.isFirstLoad = false; - this._hasGrid = true; - - if (this.rememberGridValues || this.rememberPageLen || this.rememberPageNb) { - this.resetValues(); - } - - //TF css class is added to table - if (!this.gridLayout) { - _Dom2['default'].addClass(this.tbl, this.prfxTf); - } - - if (this.loader) { - Mod.loader.show('none'); - } - - /* Loads extensions */ - if (this.hasExtensions) { - this.initExtensions(); - } - - if (this.onFiltersLoaded) { - this.onFiltersLoaded.call(null, this); - } - } - }, { - key: 'EvtManager', - - /** - * Manages state messages - * @param {String} evt Event name - * @param {Object} cfg Config object - */ - value: function EvtManager(evt) { - var cfg = arguments[1] === undefined ? { slcIndex: null, slcExternal: false, slcId: null, pgIndex: null } : arguments[1]; - - var slcIndex = cfg.slcIndex; - var slcExternal = cfg.slcExternal; - var slcId = cfg.slcId; - var pgIndex = cfg.pgIndex; - var cpt = this.Mod; - - function efx() { - /*jshint validthis:true */ - var ev = this.Evt.name; - - switch (evt) { - case ev.filter: - this._filter(); - break; - case ev.dropdown: - if (this.linkedFilters) { - cpt.dropdown._build(slcIndex, true); - } else { - cpt.dropdown._build(slcIndex, false, slcExternal, slcId); - } - break; - case ev.checklist: - cpt.checkList._build(slcIndex, slcExternal, slcId); - break; - case ev.changepage: - cpt.paging._changePage(pgIndex); - break; - case ev.clear: - this._clearFilters(); - this._filter(); - break; - case ev.changeresultsperpage: - cpt.paging._changeResultsPerPage(); - break; - case ev.resetvalues: - this._resetValues(); - this._filter(); - break; - case ev.resetpage: - cpt.paging._resetPage(this.pgNbCookie); - break; - case ev.resetpagelength: - cpt.paging._resetPageLength(this.pgLenCookie); - break; - case ev.loadextensions: - this._loadExtensions(); - break; - case ev.loadthemes: - this._loadThemes(); - break; - } - if (this.statusBar) { - cpt.statusBar.message(''); - } - if (this.loader) { - cpt.loader.show('none'); - } - } - - if (!this.loader && !this.statusBar && !this.linkedFilters) { - efx.call(this); - } else { - if (this.loader) { - cpt.loader.show(''); - } - if (this.statusBar) { - cpt.statusBar.message(this['msg' + evt]); - } - global.setTimeout(efx.bind(this), this.execDelay); - } - } - }, { - key: 'feature', - - /** - * Return a feature instance for a given name - * @param {String} name Name of the feature - * @return {Object} - */ - value: function feature(name) { - return this.Mod[name]; - } - }, { - key: 'initExtensions', - - /** - * Initialise all the extensions defined in the configuration object - */ - value: function initExtensions() { - var exts = this.extensions; - - for (var i = 0, len = exts.length; i < len; i++) { - var ext = exts[i]; - if (!this.ExtRegistry[ext.name]) { - this.loadExtension(ext); - } - } - } - }, { - key: 'loadExtension', - - /** - * Load an extension module - * @param {Object} ext Extension config object - */ - value: function loadExtension(ext) { - var _this = this; - - if (!ext || !ext.name) { - return; - } - - var name = ext.name; - var path = ext.path; - var modulePath = undefined; - - if (name && path) { - modulePath = ext.path + name; - } else { - name = name.replace('.js', ''); - modulePath = 'extensions/{}/{}'.replace(/{}/g, name); - } - - __webpack_require__.e/* require */(1, function(__webpack_require__) { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(1)("./" + modulePath)]; (function (mod) { - var inst = new mod(_this, ext); - inst.init(); - _this.ExtRegistry[name] = inst; - }.apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}); - } - }, { - key: 'extension', - - /** - * Get an extension instance - * @param {String} name Name of the extension - * @return {Object} Extension instance - */ - value: function extension(name) { - return this.ExtRegistry[name]; - } - }, { - key: 'hasExtension', - - /** - * Check passed extension name exists - * @param {String} name Name of the extension - * @return {Boolean} - */ - value: function hasExtension(name) { - return !_Types2['default'].isEmpty(this.ExtRegistry[name]); - } - }, { - key: 'destroyExtensions', - - /** - * Destroy all the extensions defined in the configuration object - */ - value: function destroyExtensions() { - var exts = this.extensions; - - for (var i = 0, len = exts.length; i < len; i++) { - var ext = exts[i]; - var extInstance = this.ExtRegistry[ext.name]; - if (extInstance) { - extInstance.destroy(); - this.ExtRegistry[ext.name] = null; - } - } - } - }, { - key: 'loadThemes', - value: function loadThemes() { - this.EvtManager(this.Evt.name.loadthemes); - } - }, { - key: '_loadThemes', - - /** - * Load themes defined in the configuration object - */ - value: function _loadThemes() { - var themes = this.themes; - //Default theme config - if (this.enableDefaultTheme) { - var defaultTheme = { name: 'default' }; - this.themes.push(defaultTheme); - } - if (_Types2['default'].isArray(themes)) { - for (var i = 0, len = themes.length; i < len; i++) { - var theme = themes[i]; - var _name = theme.name; - var path = theme.path; - var styleId = this.prfxTf + _name; - if (_name && !path) { - path = this.themesPath + _name + '/' + _name + '.css'; - } else if (!_name && theme.path) { - _name = 'theme{0}'.replace('{0}', i); - } - - if (!this.isImported(path, 'link')) { - this['import'](styleId, path, null, 'link'); - } - } - } - - //Some elements need to be overriden for default theme - //Reset button - this.btnResetText = null; - this.btnResetHtml = ''; - - //Paging buttons - this.btnPrevPageHtml = ''; - this.btnNextPageHtml = ''; - this.btnFirstPageHtml = ''; - this.btnLastPageHtml = ''; - - //Loader - this.loader = true; - this.loaderHtml = '
'; - this.loaderText = null; - } - }, { - key: 'getStylesheet', - - /** - * Return stylesheet DOM element for a given theme name - * @return {DOMElement} stylesheet element - */ - value: function getStylesheet() { - var name = arguments[0] === undefined ? 'default' : arguments[0]; - - return _Dom2['default'].id(this.prfxTf + name); - } - }, { - key: 'destroy', - - /** - * Destroy filter grid - */ - value: function destroy() { - if (!this._hasGrid) { - return; - } - var rows = this.tbl.rows, - Mod = this.Mod; - - if (this.isExternalFlt && !this.popUpFilters) { - this.removeExternalFlts(); - } - if (this.infDiv) { - this.removeToolbar(); - } - if (this.highlightKeywords) { - Mod.highlightKeyword.unhighlightAll(); - } - if (this.markActiveColumns) { - this.clearActiveColumns(); - } - if (this.hasExtensions) { - this.destroyExtensions(); - } - - //this loop shows all rows and removes validRow attribute - for (var j = this.refRow; j < this.nbRows; j++) { - rows[j].style.display = ''; - - if (rows[j].hasAttribute('validRow')) { - rows[j].removeAttribute('validRow'); - } - - //removes alternating colors - if (this.alternateBgs) { - Mod.alternateRows.removeRowBg(j); - } - } //for j - - if (this.fltGrid && !this.gridLayout) { - this.fltGridEl = rows[this.filtersRowIndex]; - this.tbl.deleteRow(this.filtersRowIndex); - } - - // Destroy modules - Object.keys(Mod).forEach(function (key) { - var feature = Mod[key]; - if (feature && _Types2['default'].isFn(feature.destroy)) { - feature.destroy(); - } - }); - - _Dom2['default'].removeClass(this.tbl, this.prfxTf); - this.activeFlt = null; - this.isStartBgAlternate = true; - this._hasGrid = false; - this.tbl = null; - } - }, { - key: 'setToolbar', - - /** - * Generate container element for paging, reset button, rows counter etc. - */ - value: function setToolbar() { - if (this.infDiv) { - return; - } - - /*** container div ***/ - var infdiv = _Dom2['default'].create('div', ['id', this.prfxInfDiv + this.id]); - infdiv.className = this.infDivCssClass; - - //custom container - if (this.toolBarTgtId) { - _Dom2['default'].id(this.toolBarTgtId).appendChild(infdiv); - } - //grid-layout - else if (this.gridLayout) { - var gridLayout = this.Mod.gridLayout; - gridLayout.tblMainCont.appendChild(infdiv); - infdiv.className = gridLayout.gridInfDivCssClass; - } - //default location: just above the table - else { - var cont = _Dom2['default'].create('caption'); - cont.appendChild(infdiv); - this.tbl.insertBefore(cont, this.tbl.firstChild); - } - this.infDiv = _Dom2['default'].id(this.prfxInfDiv + this.id); - - /*** left div containing rows # displayer ***/ - var ldiv = _Dom2['default'].create('div', ['id', this.prfxLDiv + this.id]); - ldiv.className = this.lDivCssClass; - infdiv.appendChild(ldiv); - this.lDiv = _Dom2['default'].id(this.prfxLDiv + this.id); - - /*** right div containing reset button - + nb results per page select ***/ - var rdiv = _Dom2['default'].create('div', ['id', this.prfxRDiv + this.id]); - rdiv.className = this.rDivCssClass; - infdiv.appendChild(rdiv); - this.rDiv = _Dom2['default'].id(this.prfxRDiv + this.id); - - /*** mid div containing paging elements ***/ - var mdiv = _Dom2['default'].create('div', ['id', this.prfxMDiv + this.id]); - mdiv.className = this.mDivCssClass; - infdiv.appendChild(mdiv); - this.mDiv = _Dom2['default'].id(this.prfxMDiv + this.id); - - // Enable help instructions by default if topbar is generated and not - // explicitely set to false - if (_Types2['default'].isUndef(this.helpInstructions)) { - if (!this.Mod.help) { - this.Mod.help = new _Help.Help(this); - } - this.Mod.help.init(); - this.helpInstructions = true; - } - } - }, { - key: 'removeToolbar', - - /** - * Remove toolbar container element - */ - value: function removeToolbar() { - if (!this.infDiv) { - return; - } - this.infDiv.parentNode.removeChild(this.infDiv); - this.infDiv = null; - - var tbl = this.tbl; - var captions = _Dom2['default'].tag(tbl, 'caption'); - if (captions.length > 0) { - [].forEach.call(captions, function (elm) { - tbl.removeChild(elm); - }); - } - } - }, { - key: 'removeExternalFlts', - - /** - * Remove all the external column filters - */ - value: function removeExternalFlts() { - if (!this.isExternalFlt || !this.externalFltTgtIds) { - return; - } - var ids = this.externalFltTgtIds, - len = ids.length; - for (var ct = 0; ct < len; ct++) { - var externalFltTgtId = ids[ct], - externalFlt = _Dom2['default'].id(externalFltTgtId); - if (externalFlt) { - externalFlt.innerHTML = ''; - } - } - } - }, { - key: 'isCustomOptions', - - /** - * Check if given column implements a filter with custom options - * @param {Number} colIndex Column's index - * @return {Boolean} - */ - value: function isCustomOptions(colIndex) { - return this.hasCustomOptions && this.customOptions.cols.indexOf(colIndex) != -1; - } - }, { - key: 'getCustomOptions', - - /** - * Returns an array [[value0, value1 ...],[text0, text1 ...]] with the - * custom options values and texts - * @param {Number} colIndex Column's index - * @return {Array} - */ - value: function getCustomOptions(colIndex) { - if (!colIndex || !this.isCustomOptions(colIndex)) { - return; - } - - var customOptions = this.customOptions; - var cols = customOptions.cols; - var optTxt = [], - optArray = []; - var index = _Arr2['default'].indexByValue(cols, colIndex); - var slcValues = customOptions.values[index]; - var slcTexts = customOptions.texts[index]; - var slcSort = customOptions.sorts[index]; - - for (var r = 0, len = slcValues.length; r < len; r++) { - optArray.push(slcValues[r]); - if (slcTexts[r]) { - optTxt.push(slcTexts[r]); - } else { - optTxt.push(slcValues[r]); - } - } - if (slcSort) { - optArray.sort(); - optTxt.sort(); - } - return [optArray, optTxt]; - } - }, { - key: 'resetValues', - value: function resetValues() { - this.EvtManager(this.Evt.name.resetvalues); - } - }, { - key: '_resetValues', - - /** - * Reset persisted filter values - */ - value: function _resetValues() { - //only fillSlcOnDemand - if (this.rememberGridValues && this.fillSlcOnDemand) { - this._resetGridValues(this.fltsValuesCookie); - } - if (this.rememberPageLen && this.Mod.paging) { - this.Mod.paging.resetPageLength(this.pgLenCookie); - } - if (this.rememberPageNb && this.Mod.paging) { - this.Mod.paging.resetPage(this.pgNbCookie); - } - } - }, { - key: '_resetGridValues', - - /** - * Reset persisted filter values when load filters on demand feature is - * enabled - * @param {String} name cookie name storing filter values - */ - value: function _resetGridValues(name) { - if (!this.fillSlcOnDemand) { - return; - } - var fltsValues = this.Mod.store.getFilterValues(name), - slcFltsIndex = this.getFiltersByType(this.fltTypeSlc, true), - multiFltsIndex = this.getFiltersByType(this.fltTypeMulti, true); - - //if the number of columns is the same as before page reload - if (Number(fltsValues[fltsValues.length - 1]) === this.fltIds.length) { - for (var i = 0; i < fltsValues.length - 1; i++) { - if (fltsValues[i] === ' ') { - continue; - } - var s = undefined, - opt = undefined; - var fltType = this.getFilterType(i); - // if fillSlcOnDemand, drop-down needs to contain stored - // value(s) for filtering - if (fltType === this.fltTypeSlc || fltType === this.fltTypeMulti) { - var slc = _Dom2['default'].id(this.fltIds[i]); - slc.options[0].selected = false; - - //selects - if (_Arr2['default'].has(slcFltsIndex, i)) { - opt = _Dom2['default'].createOpt(fltsValues[i], fltsValues[i], true); - slc.appendChild(opt); - this.hasStoredValues = true; - } - //multiple select - if (_Arr2['default'].has(multiFltsIndex, i)) { - s = fltsValues[i].split(' ' + this.orOperator + ' '); - for (var j = 0, len = s.length; j < len; j++) { - if (s[j] === '') { - continue; - } - opt = _Dom2['default'].createOpt(s[j], s[j], true); - slc.appendChild(opt); - this.hasStoredValues = true; - } - } // if multiFltsIndex - } else if (fltType === this.fltTypeCheckList) { - var checkList = this.Mod.checkList; - var divChk = checkList.checkListDiv[i]; - divChk.title = divChk.innerHTML; - divChk.innerHTML = ''; - - var ul = _Dom2['default'].create('ul', ['id', this.fltIds[i]], ['colIndex', i]); - ul.className = checkList.checkListCssClass; - - var li0 = _Dom2['default'].createCheckItem(this.fltIds[i] + '_0', '', this.displayAllText); - li0.className = checkList.checkListItemCssClass; - ul.appendChild(li0); - - divChk.appendChild(ul); - - s = fltsValues[i].split(' ' + this.orOperator + ' '); - for (var j = 0, len = s.length; j < len; j++) { - if (s[j] === '') { - continue; - } - var li = _Dom2['default'].createCheckItem(this.fltIds[i] + '_' + (j + 1), s[j], s[j]); - li.className = checkList.checkListItemCssClass; - ul.appendChild(li); - li.check.checked = true; - checkList.setCheckListValues(li.check); - this.hasStoredValues = true; - } - } - } //end for - - if (!this.hasStoredValues && this.paging) { - this.Mod.paging.setPagingInfo(); - } - } //end if - } - }, { - key: 'filter', - value: function filter() { - this.EvtManager(this.Evt.name.filter); - } - }, { - key: '_filter', - - /** - * Filter the table by retrieving the data from each cell in every single - * row and comparing it to the search term for current column. A row is - * hidden when all the search terms are not found in inspected row. - * - * TODO: Reduce complexity of this massive method - */ - value: function _filter() { - if (!this.fltGrid || !this._hasGrid && !this.isFirstLoad) { - return; - } - //invoke onbefore callback - if (this.onBeforeFilter) { - this.onBeforeFilter.call(null, this); - } - - var row = this.tbl.rows, - Mod = this.Mod, - hiddenrows = 0; - - this.validRowsIndex = []; - - // removes keyword highlighting - if (this.highlightKeywords) { - Mod.highlightKeyword.unhighlightAll(); - } - //removes popup filters active icons - if (this.popUpFilters) { - Mod.popupFilter.buildIcons(); - } - //removes active column header class - if (this.markActiveColumns) { - this.clearActiveColumns(); - } - // search args re-init - this.searchArgs = this.getFiltersValue(); - - var num_cell_data, nbFormat; - var re_le = new RegExp(this.leOperator), - re_ge = new RegExp(this.geOperator), - re_l = new RegExp(this.lwOperator), - re_g = new RegExp(this.grOperator), - re_d = new RegExp(this.dfOperator), - re_lk = new RegExp(_Str2['default'].rgxEsc(this.lkOperator)), - re_eq = new RegExp(this.eqOperator), - re_st = new RegExp(this.stOperator), - re_en = new RegExp(this.enOperator), - - // re_an = new RegExp(this.anOperator), - // re_cr = new RegExp(this.curExp), - re_em = this.emOperator, - re_nm = this.nmOperator, - re_re = new RegExp(_Str2['default'].rgxEsc(this.rgxOperator)); - - //keyword highlighting - function highlight(str, ok, cell) { - /*jshint validthis:true */ - if (this.highlightKeywords && ok) { - str = str.replace(re_lk, ''); - str = str.replace(re_eq, ''); - str = str.replace(re_st, ''); - str = str.replace(re_en, ''); - var w = str; - if (re_le.test(str) || re_ge.test(str) || re_l.test(str) || re_g.test(str) || re_d.test(str)) { - w = _Dom2['default'].getText(cell); - } - if (w !== '') { - Mod.highlightKeyword.highlight(cell, w, Mod.highlightKeyword.highlightCssClass); - } - } - } - - //looks for search argument in current row - function hasArg(sA, cell_data, j) { - /*jshint validthis:true */ - var occurence = undefined, - removeNbFormat = _Helpers2['default'].removeNbFormat; - //Search arg operator tests - var hasLO = re_l.test(sA), - hasLE = re_le.test(sA), - hasGR = re_g.test(sA), - hasGE = re_ge.test(sA), - hasDF = re_d.test(sA), - hasEQ = re_eq.test(sA), - hasLK = re_lk.test(sA), - - // hasAN = re_an.test(sA), - hasST = re_st.test(sA), - hasEN = re_en.test(sA), - hasEM = re_em === sA, - hasNM = re_nm === sA, - hasRE = re_re.test(sA); - - //Search arg dates tests - var isLDate = hasLO && isValidDate(sA.replace(re_l, ''), dtType); - var isLEDate = hasLE && isValidDate(sA.replace(re_le, ''), dtType); - var isGDate = hasGR && isValidDate(sA.replace(re_g, ''), dtType); - var isGEDate = hasGE && isValidDate(sA.replace(re_ge, ''), dtType); - var isDFDate = hasDF && isValidDate(sA.replace(re_d, ''), dtType); - var isEQDate = hasEQ && isValidDate(sA.replace(re_eq, ''), dtType); - - var dte1 = undefined, - dte2 = undefined; - //dates - if (isValidDate(cell_data, dtType)) { - dte1 = formatDate(cell_data, dtType); - // lower date - if (isLDate) { - dte2 = formatDate(sA.replace(re_l, ''), dtType); - occurence = dte1 < dte2; - } - // lower equal date - else if (isLEDate) { - dte2 = formatDate(sA.replace(re_le, ''), dtType); - occurence = dte1 <= dte2; - } - // greater equal date - else if (isGEDate) { - dte2 = formatDate(sA.replace(re_ge, ''), dtType); - occurence = dte1 >= dte2; - } - // greater date - else if (isGDate) { - dte2 = formatDate(sA.replace(re_g, ''), dtType); - occurence = dte1 > dte2; - } - // different date - else if (isDFDate) { - dte2 = formatDate(sA.replace(re_d, ''), dtType); - occurence = dte1.toString() != dte2.toString(); - } - // equal date - else if (isEQDate) { - dte2 = formatDate(sA.replace(re_eq, ''), dtType); - occurence = dte1.toString() == dte2.toString(); - } - // searched keyword with * operator doesn't have to be a date - else if (re_lk.test(sA)) { - // like date - occurence = this._containsStr(sA.replace(re_lk, ''), cell_data, null, false); - } else if (isValidDate(sA, dtType)) { - dte2 = formatDate(sA, dtType); - occurence = dte1.toString() == dte2.toString(); - } - //empty - else if (hasEM) { - occurence = _Str2['default'].isEmpty(cell_data); - } - //non-empty - else if (hasNM) { - occurence = !_Str2['default'].isEmpty(cell_data); - } - } else { - //first numbers need to be formated - if (this.hasColNbFormat && this.colNbFormat[j]) { - num_cell_data = removeNbFormat(cell_data, this.colNbFormat[j]); - nbFormat = this.colNbFormat[j]; - } else { - if (this.thousandsSeparator === ',' && this.decimalSeparator === '.') { - num_cell_data = removeNbFormat(cell_data, 'us'); - nbFormat = 'us'; - } else { - num_cell_data = removeNbFormat(cell_data, 'eu'); - nbFormat = 'eu'; - } - } - - // first checks if there is any operator (<,>,<=,>=,!,*,=,{,}, - // rgx:) - // lower equal - if (hasLE) { - occurence = num_cell_data <= removeNbFormat(sA.replace(re_le, ''), nbFormat); - } - //greater equal - else if (hasGE) { - occurence = num_cell_data >= removeNbFormat(sA.replace(re_ge, ''), nbFormat); - } - //lower - else if (hasLO) { - occurence = num_cell_data < removeNbFormat(sA.replace(re_l, ''), nbFormat); - } - //greater - else if (hasGR) { - occurence = num_cell_data > removeNbFormat(sA.replace(re_g, ''), nbFormat); - } - //different - else if (hasDF) { - occurence = this._containsStr(sA.replace(re_d, ''), cell_data) ? false : true; - } - //like - else if (hasLK) { - occurence = this._containsStr(sA.replace(re_lk, ''), cell_data, null, false); - } - //equal - else if (hasEQ) { - occurence = this._containsStr(sA.replace(re_eq, ''), cell_data, null, true); - } - //starts with - else if (hasST) { - occurence = cell_data.indexOf(sA.replace(re_st, '')) === 0 ? true : false; - } - //ends with - else if (hasEN) { - var searchArg = sA.replace(re_en, ''); - occurence = cell_data.lastIndexOf(searchArg, cell_data.length - 1) === cell_data.length - 1 - (searchArg.length - 1) && cell_data.lastIndexOf(searchArg, cell_data.length - 1) > -1 ? true : false; - } - //empty - else if (hasEM) { - occurence = _Str2['default'].isEmpty(cell_data); - } - //non-empty - else if (hasNM) { - occurence = !_Str2['default'].isEmpty(cell_data); - } - //regexp - else if (hasRE) { - //in case regexp fires an exception - try { - //operator is removed - var srchArg = sA.replace(re_re, ''); - var rgx = new RegExp(srchArg); - occurence = rgx.test(cell_data); - } catch (e) { - occurence = false; - } - } else { - occurence = this._containsStr(sA, cell_data, this.getFilterType(j)); - } - } //else - return occurence; - } //fn - - for (var k = this.refRow; k < this.nbRows; k++) { - /*** if table already filtered some rows are not visible ***/ - if (row[k].style.display === 'none') { - row[k].style.display = ''; - } - - var cell = row[k].cells, - nchilds = cell.length; - - // checks if row has exact cell # - if (nchilds !== this.nbCells) { - continue; - } - - var occurence = [], - isRowValid = true, - - //only for single filter search - singleFltRowValid = false; - - // this loop retrieves cell data - for (var j = 0; j < nchilds; j++) { - //searched keyword - var sA = this.searchArgs[this.singleSearchFlt ? 0 : j]; - var dtType = this.hasColDateType ? this.colDateType[j] : this.defaultDateType; - if (sA === '') { - continue; - } - - var cell_data = _Str2['default'].matchCase(this.getCellData(j, cell[j]), this.caseSensitive); - - //multiple search parameter operator || - var sAOrSplit = sA.split(this.orOperator), - - //multiple search || parameter boolean - hasMultiOrSA = sAOrSplit.length > 1 ? true : false, - - //multiple search parameter operator && - sAAndSplit = sA.split(this.anOperator), - - //multiple search && parameter boolean - hasMultiAndSA = sAAndSplit.length > 1 ? true : false; - - //multiple sarch parameters - if (hasMultiOrSA || hasMultiAndSA) { - var cS = undefined, - occur = false, - s = hasMultiOrSA ? sAOrSplit : sAAndSplit; - for (var w = 0, len = s.length; w < len; w++) { - cS = _Str2['default'].trim(s[w]); - occur = hasArg.call(this, cS, cell_data, j); - highlight.call(this, cS, occur, cell[j]); - if (hasMultiOrSA && occur) { - break; - } - if (hasMultiAndSA && !occur) { - break; - } - } - occurence[j] = occur; - } - //single search parameter - else { - occurence[j] = hasArg.call(this, _Str2['default'].trim(sA), cell_data, j); - highlight.call(this, sA, occurence[j], cell[j]); - } //else single param - - if (!occurence[j]) { - isRowValid = false; - } - if (this.singleSearchFlt && occurence[j]) { - singleFltRowValid = true; - } - if (this.popUpFilters) { - Mod.popupFilter.buildIcon(j, true); - } - if (this.markActiveColumns) { - if (k === this.refRow) { - if (this.onBeforeActiveColumn) { - this.onBeforeActiveColumn.call(null, this, j); - } - _Dom2['default'].addClass(this.getHeaderElement(j), this.activeColumnsCssClass); - if (this.onAfterActiveColumn) { - this.onAfterActiveColumn.call(null, this, j); - } - } - } - } //for j - - if (this.singleSearchFlt && singleFltRowValid) { - isRowValid = true; - } - - if (!isRowValid) { - this.validateRow(k, false); - if (Mod.alternateRows) { - Mod.alternateRows.removeRowBg(k); - } - // always visible rows need to be counted as valid - if (this.hasVisibleRows && this.visibleRows.indexOf(k) !== -1) { - this.validRowsIndex.push(k); - } else { - hiddenrows++; - } - } else { - this.validateRow(k, true); - this.validRowsIndex.push(k); - if (this.alternateBgs) { - Mod.alternateRows.setRowBg(k, this.validRowsIndex.length); - } - if (this.onRowValidated) { - this.onRowValidated.call(null, this, k); - } - } - } // for k - - this.nbVisibleRows = this.validRowsIndex.length; - this.nbHiddenRows = hiddenrows; - - if (this.rememberGridValues) { - Mod.store.saveFilterValues(this.fltsValuesCookie); - } - //applies filter props after filtering process - if (!this.paging) { - this.applyProps(); - } else { - // Shouldn't need to care of that here... - // TODO: provide a method in paging module - Mod.paging.startPagingRow = 0; - Mod.paging.currentPageNb = 1; - // - Mod.paging.setPagingInfo(this.validRowsIndex); - } - //invokes onafter callback - if (this.onAfterFilter) { - this.onAfterFilter.call(null, this); - } - } - }, { - key: 'applyProps', - - /** - * Re-apply the features/behaviour concerned by filtering/paging operation - * - * NOTE: this will disappear whenever custom events in place - */ - value: function applyProps() { - var Mod = this.Mod; - - //shows rows always visible - if (this.hasVisibleRows) { - this.enforceVisibility(); - } - //columns operations - if (this.hasExtension('colOps')) { - this.extension('colOps').calc(); - } - - //re-populates drop-down filters - if (this.linkedFilters) { - this.linkFilters(); - } - - if (this.rowsCounter) { - Mod.rowsCounter.refresh(this.nbVisibleRows); - } - - if (this.popUpFilters) { - Mod.popupFilter.closeAll(); - } - } - }, { - key: 'getColValues', - - /** - * Return the data of a specified colum - * @param {Number} colindex Column index - * @param {Boolean} num Return unformatted number - * @param {Array} exclude List of row indexes to be excluded - * @return {Array} Flat list of data for a column - */ - value: function getColValues(colindex) { - var num = arguments[1] === undefined ? false : arguments[1]; - var exclude = arguments[2] === undefined ? undefined : arguments[2]; - - if (!this.fltGrid) { - return; - } - var row = this.tbl.rows, - colValues = []; - - for (var i = this.refRow; i < this.nbRows; i++) { - var isExludedRow = false; - // checks if current row index appears in exclude array - if (exclude && _Types2['default'].isArray(exclude)) { - isExludedRow = _Arr2['default'].has(exclude, i); - } - var cell = row[i].cells, - nchilds = cell.length; - - // checks if row has exact cell # and is not excluded - if (nchilds === this.nbCells && !isExludedRow) { - // this loop retrieves cell data - for (var j = 0; j < nchilds; j++) { - if (j != colindex || row[i].style.display !== '') { - continue; - } - var cell_data = _Str2['default'].lower(this.getCellData(j, cell[j])), - nbFormat = this.colNbFormat ? this.colNbFormat[colindex] : null, - data = num ? _Helpers2['default'].removeNbFormat(cell_data, nbFormat) : cell_data; - colValues.push(data); - } - } - } - return colValues; - } - }, { - key: 'getFilterValue', - - /** - * Return the filter's value of a specified column - * @param {Number} index Column index - * @return {String} Filter value - */ - value: function getFilterValue(index) { - if (!this.fltGrid) { - return; - } - var fltValue = undefined, - flt = this.getFilterElement(index); - if (!flt) { - return ''; - } - - var fltColType = this.getFilterType(index); - if (fltColType !== this.fltTypeMulti && fltColType !== this.fltTypeCheckList) { - fltValue = flt.value; - } - //mutiple select - else if (fltColType === this.fltTypeMulti) { - fltValue = ''; - for (var j = 0, len = flt.options.length; j < len; j++) { - if (flt.options[j].selected) { - fltValue = fltValue.concat(flt.options[j].value + ' ' + this.orOperator + ' '); - } - } - //removes last operator || - fltValue = fltValue.substr(0, fltValue.length - 4); - } - //checklist - else if (fltColType === this.fltTypeCheckList) { - if (flt.getAttribute('value') !== null) { - fltValue = flt.getAttribute('value'); - //removes last operator || - fltValue = fltValue.substr(0, fltValue.length - 3); - } else { - fltValue = ''; - } - } - return fltValue; - } - }, { - key: 'getFiltersValue', - - /** - * Return the filters' values - * @return {Array} List of filters' values - */ - value: function getFiltersValue() { - if (!this.fltGrid) { - return; - } - var searchArgs = []; - for (var i = 0, len = this.fltIds.length; i < len; i++) { - searchArgs.push(_Str2['default'].trim(_Str2['default'].matchCase(this.getFilterValue(i), this.caseSensitive))); - } - return searchArgs; - } - }, { - key: 'getFilterId', - - /** - * Return the ID of the filter of a specified column - * @param {Number} index Column's index - * @return {String} ID of the filter element - */ - value: function getFilterId(index) { - if (!this.fltGrid) { - return; - } - return this.fltIds[index]; - } - }, { - key: 'getFiltersByType', - - /** - * Return the list of ids of filters matching a specified type. - * Note: hidden filters are also returned - * - * @param {String} type Filter type string ('input', 'select', 'multiple', - * 'checklist') - * @param {Boolean} bool If true returns columns indexes instead of IDs - * @return {[type]} List of element IDs or column indexes - */ - value: function getFiltersByType(type, bool) { - if (!this.fltGrid) { - return; - } - var arr = []; - for (var i = 0, len = this.fltIds.length; i < len; i++) { - var fltType = this.getFilterType(i); - if (fltType === _Str2['default'].lower(type)) { - var a = bool ? i : this.fltIds[i]; - arr.push(a); - } - } - return arr; - } - }, { - key: 'getFilterElement', - - /** - * Return the filter's DOM element for a given column - * @param {Number} index Column's index - * @return {DOMElement} - */ - value: function getFilterElement(index) { - var fltId = this.fltIds[index]; - return _Dom2['default'].id(fltId); - } - }, { - key: 'getCellsNb', - - /** - * Return the number of cells for a given row index - * @param {Number} rowIndex Index of the row - * @return {Number} Number of cells - */ - value: function getCellsNb() { - var rowIndex = arguments[0] === undefined ? 0 : arguments[0]; - - var tr = this.tbl.rows[rowIndex]; - return tr.cells.length; - } - }, { - key: 'getRowsNb', - - /** - * Return the number of filterable rows starting from reference row if - * defined - * @param {Boolean} includeHeaders Include the headers row - * @return {Number} Number of filterable rows - */ - value: function getRowsNb(includeHeaders) { - var s = _Types2['default'].isUndef(this.refRow) ? 0 : this.refRow, - ntrs = this.tbl.rows.length; - if (includeHeaders) { - s = 0; - } - return parseInt(ntrs - s, 10); - } - }, { - key: 'getCellData', - - /** - * Return the data of a given cell - * @param {Number} i Column's index - * @param {Object} cell Cell's DOM object - * @return {String} - */ - value: function getCellData(i, cell) { - if (_Types2['default'].isUndef(i) || !cell) { - return ''; - } - //First checks for customCellData event - if (this.customCellData && _Arr2['default'].has(this.customCellDataCols, i)) { - return this.customCellData.call(null, this, cell, i); - } else { - return _Dom2['default'].getText(cell); - } - } - }, { - key: 'getTableData', - - /** - * Return the table data with following format: - * [ - * [rowIndex, [value0, value1...]], - * [rowIndex, [value0, value1...]] - * ] - * @return {Array} - * - * TODO: provide an API returning data in JSON format - */ - value: function getTableData() { - var row = this.tbl.rows; - for (var k = this.refRow; k < this.nbRows; k++) { - var rowData = [k, []]; - var cells = row[k].cells; - // this loop retrieves cell data - for (var j = 0, len = cells.length; j < len; j++) { - var cell_data = this.getCellData(j, cells[j]); - rowData[1].push(cell_data); - } - this.tblData.push(rowData); - } - return this.tblData; - } - }, { - key: 'getFilteredData', - - /** - * Return the filtered data with following format: - * [ - * [rowIndex, [value0, value1...]], - * [rowIndex, [value0, value1...]] - * ] - * @param {Boolean} includeHeaders Include headers row - * @return {Array} - * - * TODO: provide an API returning data in JSON format - */ - value: function getFilteredData(includeHeaders) { - if (!this.validRowsIndex) { - return []; - } - var row = this.tbl.rows, - filteredData = []; - if (includeHeaders) { - var table = this.gridLayout ? this.Mod.gridLayout.headTbl : this.tbl, - r = table.rows[this.headersRow], - rowData = [r.rowIndex, []]; - for (var j = 0; j < this.nbCells; j++) { - var headerText = this.getCellData(j, r.cells[j]); - rowData[1].push(headerText); - } - filteredData.push(rowData); - } - - var validRows = this.getValidRows(true); - for (var i = 0; i < validRows.length; i++) { - var rData = [this.validRowsIndex[i], []], - cells = row[this.validRowsIndex[i]].cells; - for (var k = 0; k < cells.length; k++) { - var cell_data = this.getCellData(k, cells[k]); - rData[1].push(cell_data); - } - filteredData.push(rData); - } - return filteredData; - } - }, { - key: 'getFilteredDataCol', - - /** - * Return the filtered data for a given column index - * @param {Number} colIndex Colmun's index - * @return {Array} Flat list of values ['val0','val1','val2'...] - * - * TODO: provide an API returning data in JSON format - */ - value: function getFilteredDataCol(colIndex) { - if (colIndex === undefined) { - return []; - } - var data = this.getFilteredData(), - colData = []; - for (var i = 0, len = data.length; i < len; i++) { - var r = data[i], - - //cols values of current row - d = r[1], - - //data of searched column - c = d[colIndex]; - colData.push(c); - } - return colData; - } - }, { - key: 'getRowDisplay', - - /** - * Get the display value of a row - * @param {RowElement} DOM element of the row - * @return {String} Usually 'none' or '' - */ - value: function getRowDisplay(row) { - if (!this.fltGrid || !_Types2['default'].isObj(row)) { - return; - } - return row.style.display; - } - }, { - key: 'validateRow', - - /** - * Validate/invalidate row by setting the 'validRow' attribute on the row - * @param {Number} rowIndex Index of the row - * @param {Boolean} isValid - */ - value: function validateRow(rowIndex, isValid) { - var row = this.tbl.rows[rowIndex]; - if (!row || typeof isValid !== 'boolean') { - return; - } - - // always visible rows are valid - if (this.hasVisibleRows && this.visibleRows.indexOf(rowIndex) !== -1) { - isValid = true; - } - - var displayFlag = isValid ? '' : 'none', - validFlag = isValid ? 'true' : 'false'; - row.style.display = displayFlag; - - if (this.paging) { - row.setAttribute('validRow', validFlag); - } - } - }, { - key: 'validateAllRows', - - /** - * Validate all filterable rows - */ - value: function validateAllRows() { - if (!this._hasGrid) { - return; - } - this.validRowsIndex = []; - for (var k = this.refRow; k < this.nbFilterableRows; k++) { - this.validateRow(k, true); - this.validRowsIndex.push(k); - } - } - }, { - key: 'setFilterValue', - - /** - * Set search value to a given filter - * @param {Number} index Column's index - * @param {String} searcharg Search term - */ - value: function setFilterValue(index) { - var searcharg = arguments[1] === undefined ? '' : arguments[1]; - - if (!this.fltGrid && !this.isFirstLoad || !this.getFilterElement(index)) { - return; - } - var slc = this.getFilterElement(index), - fltColType = this.getFilterType(index); - - if (fltColType !== this.fltTypeMulti && fltColType != this.fltTypeCheckList) { - slc.value = searcharg; - } - //multiple selects - else if (fltColType === this.fltTypeMulti) { - var s = searcharg.split(' ' + this.orOperator + ' '); - // let ct = 0; //keywords counter - for (var j = 0, len = slc.options.length; j < len; j++) { - var option = slc.options[j]; - if (s === '' || s[0] === '') { - option.selected = false; - } - if (option.value === '') { - option.selected = false; - } - if (option.value !== '' && _Arr2['default'].has(s, option.value, true)) { - option.selected = true; - } //if - } //for j - } - //checklist - else if (fltColType === this.fltTypeCheckList) { - searcharg = _Str2['default'].matchCase(searcharg, this.caseSensitive); - var sarg = searcharg.split(' ' + this.orOperator + ' '); - var lisNb = _Dom2['default'].tag(slc, 'li').length; - - slc.setAttribute('value', ''); - slc.setAttribute('indexes', ''); - - for (var k = 0; k < lisNb; k++) { - var li = _Dom2['default'].tag(slc, 'li')[k], - lbl = _Dom2['default'].tag(li, 'label')[0], - chk = _Dom2['default'].tag(li, 'input')[0], - lblTxt = _Str2['default'].matchCase(_Dom2['default'].getText(lbl), this.caseSensitive); - if (lblTxt !== '' && _Arr2['default'].has(sarg, lblTxt, true)) { - chk.checked = true; - this.Mod.checkList.setCheckListValues(chk); - } else { - chk.checked = false; - this.Mod.checkList.setCheckListValues(chk); - } - } - } - } - }, { - key: 'setColWidths', - - /** - * Set them columns' widths as per configuration - * @param {Number} rowIndex Optional row index to apply the widths to - * @param {Element} tbl DOM element - */ - value: function setColWidths(rowIndex, tbl) { - if (!this.fltGrid || !this.hasColWidths) { - return; - } - tbl = tbl || this.tbl; - var rIndex = undefined; - if (rowIndex === undefined) { - rIndex = tbl.rows[0].style.display != 'none' ? 0 : 1; - } else { - rIndex = rowIndex; - } - - setWidths.call(this, tbl.rows[rIndex]); - - function setWidths(row) { - /*jshint validthis:true */ - var nbCols = this.nbCells; - var colWidths = this.colWidths; - if (nbCols != colWidths.length || nbCols != row.cells.length) { - throw new Error('Columns number mismatch!'); - } - - var colTags = _Dom2['default'].tag(tbl, 'col'); - var tblHasColTag = colTags.length > 0; - var frag = !tblHasColTag ? doc.createDocumentFragment() : null; - for (var k = 0; k < nbCols; k++) { - // row.cells[k].style.width = colWidths[k]; - var col = undefined; - if (tblHasColTag) { - col = colTags[k]; - } else { - col = _Dom2['default'].create('col', ['id', this.id + '_col_' + k]); - frag.appendChild(col); - } - col.style.width = colWidths[k]; - } - if (!tblHasColTag) { - tbl.insertBefore(frag, tbl.firstChild); - } - } - } - }, { - key: 'enforceVisibility', - - /** - * Makes defined rows always visible - */ - value: function enforceVisibility() { - if (!this.hasVisibleRows) { - return; - } - for (var i = 0, len = this.visibleRows.length; i < len; i++) { - var row = this.visibleRows[i]; - //row index cannot be > nrows - if (row <= this.nbRows) { - this.validateRow(row, true); - } - } - } - }, { - key: 'clearFilters', - value: function clearFilters() { - this.EvtManager(this.Evt.name.clear); - } - }, { - key: '_clearFilters', - - /** - * Clear all the filters' values - */ - value: function _clearFilters() { - if (!this.fltGrid) { - return; - } - if (this.onBeforeReset) { - this.onBeforeReset.call(null, this, this.getFiltersValue()); - } - for (var i = 0, len = this.fltIds.length; i < len; i++) { - this.setFilterValue(i, ''); - } - if (this.linkedFilters) { - this.activeFilterId = ''; - this.linkFilters(); - } - if (this.rememberPageLen) { - _Cookie2['default'].remove(this.pgLenCookie); - } - if (this.rememberPageNb) { - _Cookie2['default'].remove(this.pgNbCookie); - } - if (this.onAfterReset) { - this.onAfterReset.call(null, this); - } - } - }, { - key: 'clearActiveColumns', - - /** - * Clears filtered columns visual indicator (background color) - * @return {[type]} [description] - */ - value: function clearActiveColumns() { - for (var i = 0, len = this.fltIds.length; i < len; i++) { - _Dom2['default'].removeClass(this.getHeaderElement(i), this.activeColumnsCssClass); - } - } - }, { - key: 'linkFilters', - - /** - * Refresh the filters subject to linking ('select', 'multiple', - * 'checklist' type) - */ - value: function linkFilters() { - if (!this.activeFilterId) { - return; - } - var slcA1 = this.getFiltersByType(this.fltTypeSlc, true), - slcA2 = this.getFiltersByType(this.fltTypeMulti, true), - slcA3 = this.getFiltersByType(this.fltTypeCheckList, true), - slcIndex = slcA1.concat(slcA2); - slcIndex = slcIndex.concat(slcA3); - - var activeFlt = this.activeFilterId.split('_')[0]; - activeFlt = activeFlt.split(this.prfxFlt)[1]; - var slcSelectedValue = undefined; - for (var i = 0, len = slcIndex.length; i < len; i++) { - var curSlc = _Dom2['default'].id(this.fltIds[slcIndex[i]]); - slcSelectedValue = this.getFilterValue(slcIndex[i]); - - // Welcome to cyclomatic complexity hell :) - // TODO: simplify/refactor if statement - if (activeFlt !== slcIndex[i] || this.paging && _Arr2['default'].has(slcA1, slcIndex[i]) && activeFlt === slcIndex[i] || !this.paging && (_Arr2['default'].has(slcA3, slcIndex[i]) || _Arr2['default'].has(slcA2, slcIndex[i])) || slcSelectedValue === this.displayAllText) { - - if (_Arr2['default'].has(slcA3, slcIndex[i])) { - this.Mod.checkList.checkListDiv[slcIndex[i]].innerHTML = ''; - } else { - curSlc.innerHTML = ''; - } - - //1st option needs to be inserted - if (this.fillSlcOnDemand) { - var opt0 = _Dom2['default'].createOpt(this.displayAllText, ''); - if (curSlc) { - curSlc.appendChild(opt0); - } - } - - if (_Arr2['default'].has(slcA3, slcIndex[i])) { - this.Mod.checkList._build(slcIndex[i]); - } else { - this.Mod.dropdown._build(slcIndex[i], true); - } - - this.setFilterValue(slcIndex[i], slcSelectedValue); - } - } // for i - } - }, { - key: '_resetGrid', - - /** - * Re-generate the filters grid bar when previously removed - */ - value: function _resetGrid() { - if (this.isFirstLoad) { - return; - } - - var Mod = this.Mod; - var tbl = this.tbl; - var rows = tbl.rows; - var filtersRowIndex = this.filtersRowIndex; - var filtersRow = rows[filtersRowIndex]; - - // grid was removed, grid row element is stored in fltGridEl property - if (!this.gridLayout) { - // If table has a thead ensure the filters row is appended in the - // thead element - if (tbl.tHead) { - var tempRow = tbl.tHead.insertRow(this.filtersRowIndex); - tbl.tHead.replaceChild(this.fltGridEl, tempRow); - } else { - filtersRow.parentNode.insertBefore(this.fltGridEl, filtersRow); - } - } - - // filters are appended in external placeholders elements - if (this.isExternalFlt) { - var externalFltTgtIds = this.externalFltTgtIds; - for (var ct = 0, len = externalFltTgtIds.length; ct < len; ct++) { - var extFlt = _Dom2['default'].id(externalFltTgtIds[ct]); - - if (!extFlt) { - continue; - } - - var externalFltEl = this.externalFltEls[ct]; - extFlt.appendChild(externalFltEl); - var colFltType = this.getFilterType(ct); - //IE special treatment for gridLayout, appended filters are - //empty - if (this.gridLayout && externalFltEl.innerHTML === '' && colFltType !== this.fltTypeInp) { - if (colFltType === this.fltTypeSlc || colFltType === this.fltTypeMulti) { - Mod.dropdown.build(ct); - } - if (colFltType === this.fltTypeCheckList) { - Mod.checkList.build(ct); - } - } - } - } - - this.nbFilterableRows = this.getRowsNb(); - this.nbVisibleRows = this.nbFilterableRows; - this.nbRows = rows.length; - - if (this.popUpFilters) { - this.headersRow++; - Mod.popupFilter.buildAll(); - } - - if (!this.gridLayout) { - _Dom2['default'].addClass(this.tbl, this.prfxTf); - } - this._hasGrid = true; - } - }, { - key: '_containsStr', - - /** - * Checks if passed data contains the searched arg - * @param {String} arg Search term - * @param {String} data Data string - * @param {String} fltType Filter type ('input', 'select') - * @param {Boolean} forceMatch Exact match - * @return {Boolean]} - * - * TODO: move into string module, remove fltType in order to decouple it - * from TableFilter module - */ - value: function _containsStr(arg, data, fltType, forceMatch) { - // Improved by Cedric Wartel (cwl) - // automatic exact match for selects and special characters are now - // filtered - var regexp = undefined, - modifier = this.caseSensitive ? 'g' : 'gi', - exactMatch = !forceMatch ? this.exactMatch : forceMatch; - if (exactMatch || fltType !== this.fltTypeInp && fltType) { - regexp = new RegExp('(^\\s*)' + _Str2['default'].rgxEsc(arg) + '(\\s*$)', modifier); - } else { - regexp = new RegExp(_Str2['default'].rgxEsc(arg), modifier); - } - return regexp.test(data); - } - }, { - key: 'isImported', - - /** - * Check if passed script or stylesheet is already imported - * @param {String} filePath Ressource path - * @param {String} type Possible values: 'script' or 'link' - * @return {Boolean} - */ - value: function isImported(filePath, type) { - var imported = false, - importType = !type ? 'script' : type, - attr = importType == 'script' ? 'src' : 'href', - files = _Dom2['default'].tag(doc, importType); - for (var i = 0, len = files.length; i < len; i++) { - if (files[i][attr] === undefined) { - continue; - } - if (files[i][attr].match(filePath)) { - imported = true; - break; - } - } - return imported; - } - }, { - key: 'import', - - /** - * Import script or stylesheet - * @param {String} fileId Ressource ID - * @param {String} filePath Ressource path - * @param {Function} callback Callback - * @param {String} type Possible values: 'script' or 'link' - */ - value: function _import(fileId, filePath, callback, type) { - var ftype = !type ? 'script' : type, - imported = this.isImported(filePath, ftype); - if (imported) { - return; - } - var o = this, - isLoaded = false, - file = undefined, - head = _Dom2['default'].tag(doc, 'head')[0]; - - if (_Str2['default'].lower(ftype) === 'link') { - file = _Dom2['default'].create('link', ['id', fileId], ['type', 'text/css'], ['rel', 'stylesheet'], ['href', filePath]); - } else { - file = _Dom2['default'].create('script', ['id', fileId], ['type', 'text/javascript'], ['src', filePath]); - } - - //Browser <> IE onload event works only for scripts, not for stylesheets - file.onload = file.onreadystatechange = function () { - if (!isLoaded && (!this.readyState || this.readyState === 'loaded' || this.readyState === 'complete')) { - isLoaded = true; - if (typeof callback === 'function') { - callback.call(null, o); - } - } - }; - file.onerror = function () { - throw new Error('TF script could not load: ' + filePath); - }; - head.appendChild(file); - } - }, { - key: 'hasGrid', - - /** - * Check if table has filters grid - * @return {Boolean} - */ - value: function hasGrid() { - return this._hasGrid; - } - }, { - key: 'getFiltersId', - - /** - * Get list of filter IDs - * @return {[type]} [description] - */ - value: function getFiltersId() { - return this.fltIds || []; - } - }, { - key: 'getValidRows', - - /** - * Get filtered (valid) rows indexes - * @param {Boolean} reCalc Force calculation of filtered rows list - * @return {Array} List of row indexes - */ - value: function getValidRows(reCalc) { - if (!reCalc) { - return this.validRowsIndex; - } - - this.validRowsIndex = []; - for (var k = this.refRow; k < this.getRowsNb(true); k++) { - var r = this.tbl.rows[k]; - if (!this.paging) { - if (this.getRowDisplay(r) !== 'none') { - this.validRowsIndex.push(r.rowIndex); - } - } else { - if (r.getAttribute('validRow') === 'true' || r.getAttribute('validRow') === null) { - this.validRowsIndex.push(r.rowIndex); - } - } - } - return this.validRowsIndex; - } - }, { - key: 'getFiltersRowIndex', - - /** - * Get the index of the row containing the filters - * @return {Number} - */ - value: function getFiltersRowIndex() { - return this.filtersRowIndex; - } - }, { - key: 'getHeadersRowIndex', - - /** - * Get the index of the headers row - * @return {Number} - */ - value: function getHeadersRowIndex() { - return this.headersRow; - } - }, { - key: 'getStartRowIndex', - - /** - * Get the row index from where the filtering process start (1st filterable - * row) - * @return {Number} - */ - value: function getStartRowIndex() { - return this.refRow; - } - }, { - key: 'getLastRowIndex', - - /** - * Get the index of the last row - * @return {Number} - */ - value: function getLastRowIndex() { - if (!this._hasGrid) { - return; - } - return this.nbRows - 1; - } - }, { - key: 'getHeaderElement', - - /** - * Get the header DOM element for a given column index - * @param {Number} colIndex Column index - * @return {Object} - */ - value: function getHeaderElement(colIndex) { - var table = this.gridLayout ? this.Mod.gridLayout.headTbl : this.tbl; - var tHead = _Dom2['default'].tag(table, 'thead'); - var headersRow = this.headersRow; - var header = undefined; - for (var i = 0; i < this.nbCells; i++) { - if (i !== colIndex) { - continue; - } - if (tHead.length === 0) { - header = table.rows[headersRow].cells[i]; - } - if (tHead.length === 1) { - header = tHead[0].rows[headersRow].cells[i]; - } - break; - } - return header; - } - }, { - key: 'getFilterType', - - /** - * Return the filter type for a specified column - * @param {Number} colIndex Column's index - * @return {String} - */ - value: function getFilterType(colIndex) { - var colType = this.cfg['col_' + colIndex]; - return !colType ? this.fltTypeInp : _Str2['default'].lower(colType); - } - }, { - key: 'getFilterableRowsNb', - - /** - * Get the total number of filterable rows - * @return {Number} - */ - value: function getFilterableRowsNb() { - return this.getRowsNb(false); - } - }, { - key: 'config', - - /** - * Get the configuration object (literal object) - * @return {Object} - */ - value: function config() { - return this.cfg; - } - }]); - - return TableFilter; - })(); - - exports.TableFilter = TableFilter; +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var s=e();for(var i in s)("object"==typeof exports?exports:t)[i]=s[i]}}(this,function(){return function(t){function e(s){if(i[s])return i[s].exports;var a=i[s]={exports:{},id:s,loaded:!1};return t[s].call(a.exports,a,a.exports,e),a.loaded=!0,a.exports}var s=window.webpackJsonp;window.webpackJsonp=function(i,l){for(var n,r,o=0,h=[];o1)for(var s=0,i=arguments.length;i>s;s++){var l=arguments[s],n=typeof l;switch(u["default"].lower(n)){case"number":this.startRow=l;break;case"object":this.cfg=l}}var o=this.cfg;this.refRow=null===this.startRow?2:this.startRow+1;try{this.nbCells=this.getCellsNb(this.refRow)}catch(d){this.nbCells=this.getCellsNb(0)}this.basePath=o.base_path||"tablefilter/",this.fltTypeInp="input",this.fltTypeSlc="select",this.fltTypeMulti="multiple",this.fltTypeCheckList="checklist",this.fltTypeNone="none",this.fltGrid=o.grid===!1?!1:!0,this.gridLayout=Boolean(o.grid_layout),this.sourceTblHtml=null,this.gridLayout&&(this.sourceTblHtml=this.tbl.outerHTML),this.filtersRowIndex=o.filters_row_index||0,this.headersRow=o.headers_row_index||(0===this.filtersRowIndex?1:0),this.gridLayout&&(this.headersRow>1?this.filtersRowIndex=this.headersRow+1:(this.filtersRowIndex=1,this.headersRow=0)),this.fltCellTag="th"!==o.filters_cell_tag||"td"!==o.filters_cell_tag?"td":o.filters_cell_tag,this.fltIds=[],this.fltElms=[],this.searchArgs=null,this.tblData=[],this.validRowsIndex=null,this.fltGridEl=null,this.isFirstLoad=!0,this.infDiv=null,this.lDiv=null,this.rDiv=null,this.mDiv=null,this.infDivCssClass=o.inf_div_css_class||"inf",this.lDivCssClass=o.left_div_css_class||"ldiv",this.rDivCssClass=o.right_div_css_class||"rdiv",this.mDivCssClass=o.middle_div_css_class||"mdiv",this.contDivCssClass=o.content_div_css_class||"cont",this.stylePath=o.style_path||this.basePath+"style/",this.stylesheet=o.stylesheet||this.stylePath+"tablefilter.css",this.stylesheetId=this.id+"_style",this.fltsRowCssClass=o.flts_row_css_class||"fltrow",this.enableIcons=o.enable_icons===!1?!1:!0,this.alternateBgs=Boolean(o.alternate_rows),this.hasColWidths=g["default"].isArray(o.col_widths),this.colWidths=this.hasColWidths?o.col_widths:null,this.fltCssClass=o.flt_css_class||"flt",this.fltMultiCssClass=o.flt_multi_css_class||"flt_multi",this.fltSmallCssClass=o.flt_small_css_class||"flt_s",this.singleFltCssClass=o.single_flt_css_class||"single_flt",this.enterKey=o.enter_key===!1?!1:!0,this.onBeforeFilter=g["default"].isFn(o.on_before_filter)?o.on_before_filter:null,this.onAfterFilter=g["default"].isFn(o.on_after_filter)?o.on_after_filter:null,this.caseSensitive=Boolean(o.case_sensitive),this.exactMatch=Boolean(o.exact_match),this.linkedFilters=Boolean(o.linked_filters),this.disableExcludedOptions=Boolean(o.disable_excluded_options),this.activeFlt=null,this.activeFilterId=null,this.hasVisibleRows=Boolean(o.rows_always_visible),this.visibleRows=this.hasVisibleRows?o.rows_always_visible:[],this.isExternalFlt=Boolean(o.external_flt_grid),this.externalFltTgtIds=o.external_flt_grid_ids||null,this.externalFltEls=[],this.execDelay=isNaN(o.exec_delay)?100:parseInt(o.exec_delay,10),this.onFiltersLoaded=g["default"].isFn(o.on_filters_loaded)?o.on_filters_loaded:null,this.singleSearchFlt=Boolean(o.single_search_filter),this.onRowValidated=g["default"].isFn(o.on_row_validated)?o.on_row_validated:null,this.customCellDataCols=o.custom_cell_data_cols?o.custom_cell_data_cols:[],this.customCellData=g["default"].isFn(o.custom_cell_data)?o.custom_cell_data:null,this.watermark=o.watermark||"",this.isWatermarkArray=g["default"].isArray(this.watermark),this.toolBarTgtId=o.toolbar_target_id||null,this.helpInstructions=g["default"].isUndef(o.help_instructions)?void 0:Boolean(o.help_instructions),this.popUpFilters=Boolean(o.popup_filters),this.markActiveColumns=Boolean(o.mark_active_columns),this.activeColumnsCssClass=o.active_columns_css_class||"activeHeader",this.onBeforeActiveColumn=g["default"].isFn(o.on_before_active_column)?o.on_before_active_column:null,this.onAfterActiveColumn=g["default"].isFn(o.on_after_active_column)?o.on_after_active_column:null,this.displayAllText=o.display_all_text||"Clear",this.enableEmptyOption=Boolean(o.enable_empty_option),this.emptyText=o.empty_text||"(Empty)",this.enableNonEmptyOption=Boolean(o.enable_non_empty_option),this.nonEmptyText=o.non_empty_text||"(Non empty)",this.onSlcChange=o.on_change===!1?!1:!0,this.sortSlc=o.sort_select===!1?!1:!0,this.isSortNumAsc=Boolean(o.sort_num_asc),this.sortNumAsc=this.isSortNumAsc?o.sort_num_asc:null,this.isSortNumDesc=Boolean(o.sort_num_desc),this.sortNumDesc=this.isSortNumDesc?o.sort_num_desc:null,this.fillSlcOnDemand=Boolean(o.fill_slc_on_demand),this.hasCustomOptions=g["default"].isObj(o.custom_options),this.customOptions=o.custom_options,this.rgxOperator=o.regexp_operator||"rgx:",this.emOperator=o.empty_operator||"[empty]",this.nmOperator=o.nonempty_operator||"[nonempty]",this.orOperator=o.or_operator||"||",this.anOperator=o.and_operator||"&&",this.grOperator=o.greater_operator||">",this.lwOperator=o.lower_operator||"<",this.leOperator=o.lower_equal_operator||"<=",this.geOperator=o.greater_equal_operator||">=",this.dfOperator=o.different_operator||"!",this.lkOperator=o.like_operator||"*",this.eqOperator=o.equal_operator||"=",this.stOperator=o.start_with_operator||"{",this.enOperator=o.end_with_operator||"}",this.curExp=o.cur_exp||"^[¥£€$]",this.separator=o.separator||",",this.rowsCounter=Boolean(o.rows_counter),this.statusBar=Boolean(o.status_bar),this.loader=Boolean(o.loader),this.displayBtn=Boolean(o.btn),this.btnText=o.btn_text||(this.enableIcons?"":"Go"),this.btnCssClass=o.btn_css_class||(this.enableIcons?"btnflt_icon":"btnflt"),this.btnReset=Boolean(o.btn_reset),this.btnResetCssClass=o.btn_reset_css_class||"reset",this.onBeforeReset=g["default"].isFn(o.on_before_reset)?o.on_before_reset:null,this.onAfterReset=g["default"].isFn(o.on_after_reset)?o.on_after_reset:null,this.paging=Boolean(o.paging),this.nbVisibleRows=0,this.nbHiddenRows=0,this.autoFilter=Boolean(o.auto_filter),this.autoFilterDelay=isNaN(o.auto_filter_delay)?900:o.auto_filter_delay,this.isUserTyping=null,this.autoFilterTimer=null,this.highlightKeywords=Boolean(o.highlight_keywords),this.defaultDateType=o.default_date_type||"DMY",this.thousandsSeparator=o.thousands_separator||",",this.decimalSeparator=o.decimal_separator||".",this.hasColNbFormat=g["default"].isArray(o.col_number_format),this.colNbFormat=this.hasColNbFormat?o.col_number_format:null,this.hasColDateType=g["default"].isArray(o.col_date_type),this.colDateType=this.hasColDateType?o.col_date_type:null,this.msgFilter=o.msg_filter||"Filtering data...",this.msgPopulate=o.msg_populate||"Populating filter...",this.msgPopulateCheckList=o.msg_populate_checklist||"Populating list...",this.msgChangePage=o.msg_change_page||"Collecting paging data...",this.msgClear=o.msg_clear||"Clearing filters...",this.msgChangeResults=o.msg_change_results||"Changing results per page...",this.msgResetValues=o.msg_reset_grid_values||"Re-setting filters values...",this.msgResetPage=o.msg_reset_page||"Re-setting page...",this.msgResetPageLength=o.msg_reset_page_length||"Re-setting page length...",this.msgSort=o.msg_sort||"Sorting data...",this.msgLoadExtensions=o.msg_load_extensions||"Loading extensions...",this.msgLoadThemes=o.msg_load_themes||"Loading theme(s)...",this.prfxTf="TF",this.prfxFlt="flt",this.prfxValButton="btn",this.prfxInfDiv="inf_",this.prfxLDiv="ldiv_",this.prfxRDiv="rdiv_",this.prfxMDiv="mdiv_",this.prfxCookieFltsValues="tf_flts_",this.prfxCookiePageNb="tf_pgnb_",this.prfxCookiePageLen="tf_pglen_",this.hasStoredValues=!1,this.rememberGridValues=Boolean(o.remember_grid_values),this.fltsValuesCookie=this.prfxCookieFltsValues+this.id,this.rememberPageNb=this.paging&&o.remember_page_number,this.pgNbCookie=this.prfxCookiePageNb+this.id,this.rememberPageLen=this.paging&&o.remember_page_length,this.pgLenCookie=this.prfxCookiePageLen+this.id,this.extensions=o.extensions,this.hasExtensions=g["default"].isArray(this.extensions),this.enableDefaultTheme=Boolean(o.enable_default_theme),this.hasThemes=this.enableDefaultTheme||g["default"].isArray(o.themes),this.themes=o.themes||[],this.themesPath=o.themes_path||this.stylePath+"themes/",this.Mod={},this.ExtRegistry={},this.Evt={name:{filter:"Filter",dropdown:"DropDown",checklist:"CheckList",changepage:"ChangePage",clear:"Clear",changeresultsperpage:"ChangeResults",resetvalues:"ResetValues",resetpage:"ResetPage",resetpagelength:"ResetPageLength",loadextensions:"LoadExtensions",loadthemes:"LoadThemes"},detectKey:function(t){if(this.enterKey){var e=t||O.event;if(e){var s=r["default"].keyCode(e);13===s?(this.filter(),r["default"].cancel(e),r["default"].stop(e)):(this.isUserTyping=!0,O.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null)}}},onKeyUp:function(t){function e(){O.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null,this.isUserTyping||(this.filter(),this.isUserTyping=null)}if(this.autoFilter){var s=t||O.event,i=r["default"].keyCode(s);this.isUserTyping=!1,13!==i&&9!==i&&27!==i&&38!==i&&40!==i?null===this.autoFilterTimer&&(this.autoFilterTimer=O.setInterval(e.bind(this),this.autoFilterDelay)):(O.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null)}},onKeyDown:function(){this.autoFilter&&(this.isUserTyping=!0)},onInpBlur:function(){if(this.autoFilter&&(this.isUserTyping=!1,O.clearInterval(this.autoFilterTimer)),this.hasExtension("advancedGrid")){var t=this.extension("advancedGrid"),e=t._ezEditTable;t.cfg.editable&&e.Editable.Set(),t.cfg.selection&&e.Selection.Set()}},onInpFocus:function(t){var e=t||O.event,s=r["default"].target(e);if(this.activeFilterId=s.getAttribute("id"),this.activeFlt=h["default"].id(this.activeFilterId),this.popUpFilters&&(r["default"].cancel(e),r["default"].stop(e)),this.hasExtension("advancedGrid")){var i=this.extension("advancedGrid"),a=i._ezEditTable;i.cfg.editable&&a.Editable.Remove(),i.cfg.selection&&a.Selection.Remove()}},onSlcFocus:function(t){var e=t||O.event,s=r["default"].target(e);if(this.activeFilterId=s.getAttribute("id"),this.activeFlt=h["default"].id(this.activeFilterId),this.fillSlcOnDemand&&"0"===s.getAttribute("filled")){var i=s.getAttribute("ct");this.Mod.dropdown._build(i)}this.popUpFilters&&(r["default"].cancel(e),r["default"].stop(e))},onSlcChange:function(t){if(this.activeFlt){var e=t||O.event;this.popUpFilters&&r["default"].stop(e),this.onSlcChange&&this.filter()}},onCheckListClick:function(t){var e=t||O.event,s=r["default"].target(e);if(this.fillSlcOnDemand&&"0"===s.getAttribute("filled")){var i=s.getAttribute("ct");this.Mod.checkList._build(i),this.Mod.checkList.checkListDiv[i].onclick=null,this.Mod.checkList.checkListDiv[i].title=""}},onBtnClick:function(){this.filter()}}}}return l(t,[{key:"init",value:function(){if(!this._hasGrid){this.tbl||(this.tbl=h["default"].id(this.id)),this.gridLayout&&(this.refRow=null===this.startRow?0:this.startRow),this.popUpFilters&&(0===this.filtersRowIndex&&1===this.headersRow||this.gridLayout)&&(this.headersRow=0);var t=this.Mod,e=this.singleSearchFlt?1:this.nbCells,s=void 0;if(this["import"](this.stylesheetId,this.stylesheet,null,"link"),this.hasThemes&&this._loadThemes(),(this.rememberGridValues||this.rememberPageNb||this.rememberPageLen)&&(t.store=new w.Store(this)),this.gridLayout&&(t.gridLayout=new x.GridLayout(this),t.gridLayout.init()),this.loader&&(t.loader||(t.loader=new k.Loader(this))),this.highlightKeywords&&(t.highlightKeyword=new T.HighlightKeyword(this)),this.popUpFilters&&(t.popupFilter||(t.popupFilter=new R.PopupFilter(this)),t.popupFilter.init()),this.fltGrid)if(this.isFirstLoad){var i=void 0;if(!this.gridLayout){var a=h["default"].tag(this.tbl,"thead");i=a.length>0?a[0].insertRow(this.filtersRowIndex):this.tbl.insertRow(this.filtersRowIndex),this.headersRow>1&&this.filtersRowIndex<=this.headersRow&&!this.popUpFilters&&this.headersRow++,this.popUpFilters&&this.headersRow++,i.className=this.fltsRowCssClass,!this.isExternalFlt||this.gridLayout&&!this.popUpFilters||(i.style.display="none")}this.nbFilterableRows=this.getRowsNb(),this.nbVisibleRows=this.nbFilterableRows,this.nbRows=this.tbl.rows.length;for(var l=0;e>l;l++){this.popUpFilters&&t.popupFilter.build(l);var n=h["default"].create(this.fltCellTag),o=this.getFilterType(l),d=this.isExternalFlt&&this.externalFltTgtIds?this.externalFltTgtIds[l]:null;if(this.singleSearchFlt&&(n.colSpan=this.nbCells),this.gridLayout||i.appendChild(n),s=l==e-1&&this.displayBtn?this.fltSmallCssClass:this.fltCssClass,this.singleSearchFlt&&(o=this.fltTypeInp,s=this.singleFltCssClass),o===this.fltTypeSlc||o===this.fltTypeMulti){t.dropdown||(t.dropdown=new F.Dropdown(this));var f=t.dropdown,c=h["default"].create(this.fltTypeSlc,["id",this.prfxFlt+l+"_"+this.id],["ct",l],["filled","0"]);if(o===this.fltTypeMulti&&(c.multiple=this.fltTypeMulti,c.title=f.multipleSlcTooltip),c.className=u["default"].lower(o)===this.fltTypeSlc?s:this.fltMultiCssClass,d?(h["default"].id(d).appendChild(c),this.externalFltEls.push(c)):n.appendChild(c),this.fltIds.push(this.prfxFlt+l+"_"+this.id),this.fillSlcOnDemand||f._build(l),r["default"].add(c,"keypress",this.Evt.detectKey.bind(this)),r["default"].add(c,"change",this.Evt.onSlcChange.bind(this)),r["default"].add(c,"focus",this.Evt.onSlcFocus.bind(this)),this.fillSlcOnDemand){var p=h["default"].createOpt(this.displayAllText,"");c.appendChild(p)}}else if(o===this.fltTypeCheckList){var g=void 0;t.checkList=new P.CheckList(this),g=t.checkList;var v=h["default"].create("div",["id",g.prfxCheckListDiv+l+"_"+this.id],["ct",l],["filled","0"]);v.className=g.checkListDivCssClass,d?(h["default"].id(d).appendChild(v),this.externalFltEls.push(v)):n.appendChild(v),g.checkListDiv[l]=v,this.fltIds.push(this.prfxFlt+l+"_"+this.id),this.fillSlcOnDemand||g._build(l),this.fillSlcOnDemand&&(r["default"].add(v,"click",this.Evt.onCheckListClick.bind(this)),v.appendChild(h["default"].text(g.activateCheckListTxt)))}else{var b=o===this.fltTypeInp?"text":"hidden",m=h["default"].create(this.fltTypeInp,["id",this.prfxFlt+l+"_"+this.id],["type",b],["ct",l]);if("hidden"!==b&&this.watermark&&m.setAttribute("placeholder",this.isWatermarkArray?this.watermark[l]||"":this.watermark),m.className=s,r["default"].add(m,"focus",this.Evt.onInpFocus.bind(this)),d?(h["default"].id(d).appendChild(m),this.externalFltEls.push(m)):n.appendChild(m),this.fltIds.push(this.prfxFlt+l+"_"+this.id),r["default"].add(m,"keypress",this.Evt.detectKey.bind(this)),r["default"].add(m,"keydown",this.Evt.onKeyDown.bind(this)),r["default"].add(m,"keyup",this.Evt.onKeyUp.bind(this)),r["default"].add(m,"blur",this.Evt.onInpBlur.bind(this)),this.rememberGridValues){var _=this.Mod.store.getFilterValues(this.fltsValuesCookie);" "!=_[l]&&this.setFilterValue(l,_[l],!1)}}if(l==e-1&&this.displayBtn){var C=h["default"].create(this.fltTypeInp,["id",this.prfxValButton+l+"_"+this.id],["type","button"],["value",this.btnText]);C.className=this.btnCssClass,d?h["default"].id(d).appendChild(C):n.appendChild(C),r["default"].add(C,"click",this.Evt.onBtnClick.bind(this))}}}else this._resetGrid();else this.refRow=this.refRow-1,this.gridLayout&&(this.refRow=0),this.nbFilterableRows=this.getRowsNb(),this.nbVisibleRows=this.nbFilterableRows,this.nbRows=this.nbFilterableRows+this.refRow;this.hasVisibleRows&&this.enforceVisibility(),this.rowsCounter&&(t.rowsCounter=new I.RowsCounter(this),t.rowsCounter.init()),this.statusBar&&(t.statusBar=new S.StatusBar(this),t.statusBar.init()),(this.paging||t.paging)&&(t.paging||(t.paging=new L.Paging(this)),t.paging.isPagingRemoved?t.paging.reset():t.paging.init()),this.btnReset&&(t.clearButton=new E.ClearButton(this),t.clearButton.init()),this.helpInstructions&&(t.help||(t.help=new N.Help(this)),t.help.init()),this.hasColWidths&&!this.gridLayout&&this.setColWidths(),this.alternateBgs&&(t.alternateRows=new D.AlternateRows(this),t.alternateRows.init()),this.isFirstLoad=!1,this._hasGrid=!0,(this.rememberGridValues||this.rememberPageLen||this.rememberPageNb)&&this.resetValues(),this.gridLayout||h["default"].addClass(this.tbl,this.prfxTf),this.loader&&t.loader.show("none"),this.hasExtensions&&this.initExtensions(),this.onFiltersLoaded&&this.onFiltersLoaded.call(null,this)}}},{key:"EvtManager",value:function(t){function e(){var e=this.Evt.name;switch(t){case e.filter:this._filter();break;case e.dropdown:this.linkedFilters?r.dropdown._build(i,!0):r.dropdown._build(i,!1,a,l);break;case e.checklist:r.checkList._build(i,a,l);break;case e.changepage:r.paging._changePage(n);break;case e.clear:this._clearFilters(),this._filter();break;case e.changeresultsperpage:r.paging._changeResultsPerPage();break;case e.resetvalues:this._resetValues(),this._filter();break;case e.resetpage:r.paging._resetPage(this.pgNbCookie);break;case e.resetpagelength:r.paging._resetPageLength(this.pgLenCookie);break;case e.loadextensions:this._loadExtensions();break;case e.loadthemes:this._loadThemes()}this.statusBar&&r.statusBar.message(""),this.loader&&r.loader.show("none")}var s=void 0===arguments[1]?{slcIndex:null,slcExternal:!1,slcId:null,pgIndex:null}:arguments[1],i=s.slcIndex,a=s.slcExternal,l=s.slcId,n=s.pgIndex,r=this.Mod;this.loader||this.statusBar||this.linkedFilters?(this.loader&&r.loader.show(""),this.statusBar&&r.statusBar.message(this["msg"+t]),O.setTimeout(e.bind(this),this.execDelay)):e.call(this)}},{key:"feature",value:function(t){return this.Mod[t]}},{key:"initExtensions",value:function(){for(var t=this.extensions,e=0,s=t.length;s>e;e++){var i=t[e];this.ExtRegistry[i.name]||this.loadExtension(i)}}},{key:"loadExtension",value:function(t){var e=this;if(t&&t.name){var i=t.name,a=t.path,l=void 0;i&&a?l=t.path+i:(i=i.replace(".js",""),l="extensions/{}/{}".replace(/{}/g,i)),s.e(1,function(s){var a=[s(1)("./"+l)];(function(s){var a=new s(e,t);a.init(),e.ExtRegistry[i]=a}).apply(null,a)})}}},{key:"extension",value:function(t){return this.ExtRegistry[t]}},{key:"hasExtension",value:function(t){return!g["default"].isEmpty(this.ExtRegistry[t])}},{key:"destroyExtensions",value:function(){for(var t=this.extensions,e=0,s=t.length;s>e;e++){var i=t[e],a=this.ExtRegistry[i.name];a&&(a.destroy(),this.ExtRegistry[i.name]=null)}}},{key:"loadThemes",value:function(){this.EvtManager(this.Evt.name.loadthemes)}},{key:"_loadThemes",value:function(){var t=this.themes;if(this.enableDefaultTheme){var e={name:"default"};this.themes.push(e)}if(g["default"].isArray(t))for(var s=0,i=t.length;i>s;s++){var a=t[s],l=a.name,n=a.path,r=this.prfxTf+l;l&&!n?n=this.themesPath+l+"/"+l+".css":!l&&a.path&&(l="theme{0}".replace("{0}",s)),this.isImported(n,"link")||this["import"](r,n,null,"link")}this.btnResetText=null,this.btnResetHtml='',this.btnPrevPageHtml='',this.btnNextPageHtml='',this.btnFirstPageHtml='',this.btnLastPageHtml='',this.loader=!0,this.loaderHtml='
',this.loaderText=null}},{key:"getStylesheet",value:function(){var t=void 0===arguments[0]?"default":arguments[0];return h["default"].id(this.prfxTf+t)}},{key:"destroy",value:function(){if(this._hasGrid){var t=this.tbl.rows,e=this.Mod;this.isExternalFlt&&!this.popUpFilters&&this.removeExternalFlts(),this.infDiv&&this.removeToolbar(),this.highlightKeywords&&e.highlightKeyword.unhighlightAll(),this.markActiveColumns&&this.clearActiveColumns(),this.hasExtensions&&this.destroyExtensions();for(var s=this.refRow;s0&&[].forEach.call(e,function(e){t.removeChild(e)})}}},{key:"removeExternalFlts",value:function(){if(this.isExternalFlt&&this.externalFltTgtIds)for(var t=this.externalFltTgtIds,e=t.length,s=0;e>s;s++){var i=t[s],a=h["default"].id(i);a&&(a.innerHTML="")}}},{key:"isCustomOptions",value:function(t){return this.hasCustomOptions&&-1!=this.customOptions.cols.indexOf(t)}},{key:"getCustomOptions",value:function(t){if(t&&this.isCustomOptions(t)){for(var e=this.customOptions,s=e.cols,i=[],a=[],l=b["default"].indexByValue(s,t),n=e.values[l],r=e.texts[l],o=e.sorts[l],h=0,d=n.length;d>h;h++)a.push(n[h]),i.push(r[h]?r[h]:n[h]);return o&&(a.sort(),i.sort()),[a,i]}}},{key:"resetValues",value:function(){this.EvtManager(this.Evt.name.resetvalues)}},{key:"_resetValues",value:function(){this.rememberGridValues&&this.fillSlcOnDemand&&this._resetGridValues(this.fltsValuesCookie),this.rememberPageLen&&this.Mod.paging&&this.Mod.paging.resetPageLength(this.pgLenCookie),this.rememberPageNb&&this.Mod.paging&&this.Mod.paging.resetPage(this.pgNbCookie)}},{key:"_resetGridValues",value:function(t){if(this.fillSlcOnDemand){var e=this.Mod.store.getFilterValues(t),s=this.getFiltersByType(this.fltTypeSlc,!0),i=this.getFiltersByType(this.fltTypeMulti,!0);if(Number(e[e.length-1])===this.fltIds.length){for(var a=0;ad;d++)""!==l[d]&&(n=h["default"].createOpt(l[d],l[d],!0),o.appendChild(n),this.hasStoredValues=!0)}}else if(r===this.fltTypeCheckList){var f=this.Mod.checkList,c=f.checkListDiv[a];c.title=c.innerHTML,c.innerHTML="";var p=h["default"].create("ul",["id",this.fltIds[a]],["colIndex",a]);p.className=f.checkListCssClass;var g=h["default"].createCheckItem(this.fltIds[a]+"_0","",this.displayAllText);g.className=f.checkListItemCssClass,p.appendChild(g),c.appendChild(p),l=e[a].split(" "+this.orOperator+" ");for(var d=0,u=l.length;u>d;d++)if(""!==l[d]){var v=h["default"].createCheckItem(this.fltIds[a]+"_"+(d+1),l[d],l[d]);v.className=f.checkListItemCssClass,p.appendChild(v),v.check.checked=!0,f.setCheckListValues(v.check),this.hasStoredValues=!0}}}!this.hasStoredValues&&this.paging&&this.Mod.paging.setPagingInfo()}}}},{key:"filter",value:function(){this.EvtManager(this.Evt.name.filter)}},{key:"_filter",value:function(){function t(t,e,s){if(this.highlightKeywords&&e){t=t.replace(p,""),t=t.replace(g,""),t=t.replace(v,""),t=t.replace(b,"");var a=t;(r.test(t)||o.test(t)||d.test(t)||f.test(t)||c.test(t))&&(a=h["default"].getText(s)),""!==a&&i.highlightKeyword.highlight(s,a,i.highlightKeyword.highlightCssClass)}}function e(t,e,s){var i=void 0,a=y["default"].removeNbFormat,h=d.test(t),w=r.test(t),x=f.test(t),k=o.test(t),T=c.test(t),R=g.test(t),F=p.test(t),P=v.test(t),I=b.test(t),L=m===t,E=_===t,N=C.test(t),D=h&&B(t.replace(d,""),S),O=w&&B(t.replace(r,""),S),A=x&&B(t.replace(f,""),S),H=k&&B(t.replace(o,""),S),V=T&&B(t.replace(c,""),S),U=R&&B(t.replace(g,""),S),G=void 0,j=void 0;if(B(e,S))G=M(e,S),D?(j=M(t.replace(d,""),S),i=j>G):O?(j=M(t.replace(r,""),S),i=j>=G):H?(j=M(t.replace(o,""),S),i=G>=j):A?(j=M(t.replace(f,""),S),i=G>j):V?(j=M(t.replace(c,""),S),i=G.toString()!=j.toString()):U?(j=M(t.replace(g,""),S),i=G.toString()==j.toString()):p.test(t)?i=this._containsStr(t.replace(p,""),e,null,!1):B(t,S)?(j=M(t,S),i=G.toString()==j.toString()):L?i=u["default"].isEmpty(e):E&&(i=!u["default"].isEmpty(e));else if(this.hasColNbFormat&&this.colNbFormat[s]?(l=a(e,this.colNbFormat[s]),n=this.colNbFormat[s]):","===this.thousandsSeparator&&"."===this.decimalSeparator?(l=a(e,"us"),n="us"):(l=a(e,"eu"),n="eu"),w)i=l<=a(t.replace(r,""),n);else if(k)i=l>=a(t.replace(o,""),n);else if(h)i=la(t.replace(f,""),n);else if(T)i=this._containsStr(t.replace(c,""),e)?!1:!0;else if(F)i=this._containsStr(t.replace(p,""),e,null,!1);else if(R)i=this._containsStr(t.replace(g,""),e,null,!0);else if(P)i=0===e.indexOf(t.replace(v,""))?!0:!1;else if(I){var W=t.replace(b,"");i=e.lastIndexOf(W,e.length-1)===e.length-1-(W.length-1)&&e.lastIndexOf(W,e.length-1)>-1?!0:!1}else if(L)i=u["default"].isEmpty(e);else if(E)i=!u["default"].isEmpty(e);else if(N)try{var $=t.replace(C,""),K=new RegExp($);i=K.test(e)}catch(Y){i=!1}else i=this._containsStr(t,e,this.getFilterType(s));return i}if(this.fltGrid&&(this._hasGrid||this.isFirstLoad)){this.onBeforeFilter&&this.onBeforeFilter.call(null,this);var s=this.tbl.rows,i=this.Mod,a=0;this.validRowsIndex=[],this.highlightKeywords&&i.highlightKeyword.unhighlightAll(),this.popUpFilters&&i.popupFilter.buildIcons(),this.markActiveColumns&&this.clearActiveColumns(),this.searchArgs=this.getFiltersValue();for(var l,n,r=new RegExp(this.leOperator),o=new RegExp(this.geOperator),d=new RegExp(this.lwOperator),f=new RegExp(this.grOperator),c=new RegExp(this.dfOperator),p=new RegExp(u["default"].rgxEsc(this.lkOperator)),g=new RegExp(this.eqOperator),v=new RegExp(this.stOperator),b=new RegExp(this.enOperator),m=this.emOperator,_=this.nmOperator,C=new RegExp(u["default"].rgxEsc(this.rgxOperator)),w=this.refRow;wP;P++){var I=this.searchArgs[this.singleSearchFlt?0:P],S=this.hasColDateType?this.colDateType[P]:this.defaultDateType;if(""!==I){var L=u["default"].matchCase(this.getCellData(P,x[P]),this.caseSensitive),E=I.split(this.orOperator),N=E.length>1?!0:!1,D=I.split(this.anOperator),O=D.length>1?!0:!1;if(N||O){for(var A=void 0,H=!1,V=N?E:D,U=0,G=V.length;G>U&&(A=u["default"].trim(V[U]),H=e.call(this,A,L,P),t.call(this,A,H,x[P]),!N||!H)&&(!O||H);U++);T[P]=H}else T[P]=e.call(this,u["default"].trim(I),L,P),t.call(this,I,T[P],x[P]);T[P]||(R=!1),this.singleSearchFlt&&T[P]&&(F=!0),this.popUpFilters&&i.popupFilter.buildIcon(P,!0),this.markActiveColumns&&w===this.refRow&&(this.onBeforeActiveColumn&&this.onBeforeActiveColumn.call(null,this,P),h["default"].addClass(this.getHeaderElement(P),this.activeColumnsCssClass),this.onAfterActiveColumn&&this.onAfterActiveColumn.call(null,this,P))}}this.singleSearchFlt&&F&&(R=!0),R?(this.validateRow(w,!0),this.validRowsIndex.push(w),this.alternateBgs&&i.alternateRows.setRowBg(w,this.validRowsIndex.length),this.onRowValidated&&this.onRowValidated.call(null,this,w)):(this.validateRow(w,!1),i.alternateRows&&i.alternateRows.removeRowBg(w),this.hasVisibleRows&&-1!==this.visibleRows.indexOf(w)?this.validRowsIndex.push(w):a++)}}this.nbVisibleRows=this.validRowsIndex.length,this.nbHiddenRows=a,this.rememberGridValues&&i.store.saveFilterValues(this.fltsValuesCookie),this.paging?(i.paging.startPagingRow=0,i.paging.currentPageNb=1,i.paging.setPagingInfo(this.validRowsIndex)):this.applyProps(),this.onAfterFilter&&this.onAfterFilter.call(null,this)}}},{key:"applyProps",value:function(){var t=this.Mod;this.hasVisibleRows&&this.enforceVisibility(),this.hasExtension("colOps")&&this.extension("colOps").calc(),this.linkedFilters&&this.linkFilters(),this.rowsCounter&&t.rowsCounter.refresh(this.nbVisibleRows),this.popUpFilters&&t.popupFilter.closeAll()}},{key:"getColValues",value:function(t){var e=void 0===arguments[1]?!1:arguments[1],s=void 0===arguments[2]?void 0:arguments[2];if(this.fltGrid){for(var i=this.tbl.rows,a=[],l=this.refRow;lh;h++)if(h==t&&""===i[l].style.display){var d=u["default"].lower(this.getCellData(h,r[h])),f=this.colNbFormat?this.colNbFormat[t]:null,c=e?y["default"].removeNbFormat(d,f):d;a.push(c)}}return a}}},{key:"getFilterValue",value:function(t){if(this.fltGrid){var e=void 0,s=this.getFilterElement(t);if(!s)return"";var i=this.getFilterType(t);if(i!==this.fltTypeMulti&&i!==this.fltTypeCheckList)e=s.value;else if(i===this.fltTypeMulti){e="";for(var a=0,l=s.options.length;l>a;a++)s.options[a].selected&&(e=e.concat(s.options[a].value+" "+this.orOperator+" "));e=e.substr(0,e.length-4)}else i===this.fltTypeCheckList&&(null!==s.getAttribute("value")?(e=s.getAttribute("value"),e=e.substr(0,e.length-3)):e="");return e}}},{key:"getFiltersValue",value:function(){if(this.fltGrid){for(var t=[],e=0,s=this.fltIds.length;s>e;e++)t.push(u["default"].trim(u["default"].matchCase(this.getFilterValue(e),this.caseSensitive))); -/***/ }, -/* 1 */, -/* 2 */ -/***/ function(module, exports, __webpack_require__) { +return t}}},{key:"getFilterId",value:function(t){return this.fltGrid?this.fltIds[t]:void 0}},{key:"getFiltersByType",value:function(t,e){if(this.fltGrid){for(var s=[],i=0,a=this.fltIds.length;a>i;i++){var l=this.getFilterType(i);if(l===u["default"].lower(t)){var n=e?i:this.fltIds[i];s.push(n)}}return s}}},{key:"getFilterElement",value:function(t){var e=this.fltIds[t];return h["default"].id(e)}},{key:"getCellsNb",value:function(){var t=void 0===arguments[0]?0:arguments[0],e=this.tbl.rows[t];return e.cells.length}},{key:"getRowsNb",value:function(t){var e=g["default"].isUndef(this.refRow)?0:this.refRow,s=this.tbl.rows.length;return t&&(e=0),parseInt(s-e,10)}},{key:"getCellData",value:function(t,e){return g["default"].isUndef(t)||!e?"":this.customCellData&&b["default"].has(this.customCellDataCols,t)?this.customCellData.call(null,this,e,t):h["default"].getText(e)}},{key:"getTableData",value:function(){for(var t=this.tbl.rows,e=this.refRow;ea;a++){var n=this.getCellData(a,i[a]);s[1].push(n)}this.tblData.push(s)}return this.tblData}},{key:"getFilteredData",value:function(t){if(!this.validRowsIndex)return[];var e=this.tbl.rows,s=[];if(t){for(var i=this.gridLayout?this.Mod.gridLayout.headTbl:this.tbl,a=i.rows[this.headersRow],l=[a.rowIndex,[]],n=0;ni;i++){var l=e[i],n=l[1],r=n[t];s.push(r)}return s}},{key:"getRowDisplay",value:function(t){return this.fltGrid&&g["default"].isObj(t)?t.style.display:void 0}},{key:"validateRow",value:function(t,e){var s=this.tbl.rows[t];if(s&&"boolean"==typeof e){this.hasVisibleRows&&-1!==this.visibleRows.indexOf(t)&&(e=!0);var i=e?"":"none",a=e?"true":"false";s.style.display=i,this.paging&&s.setAttribute("validRow",a)}}},{key:"validateAllRows",value:function(){if(this._hasGrid){this.validRowsIndex=[];for(var t=this.refRow;tl;l++){var r=s.options[l];(""===a||""===a[0])&&(r.selected=!1),""===r.value&&(r.selected=!1),""!==r.value&&b["default"].has(a,r.value,!0)&&(r.selected=!0)}else if(i===this.fltTypeCheckList){e=u["default"].matchCase(e,this.caseSensitive);var o=e.split(" "+this.orOperator+" "),d=h["default"].tag(s,"li").length;s.setAttribute("value",""),s.setAttribute("indexes","");for(var f=0;d>f;f++){var c=h["default"].tag(s,"li")[f],p=h["default"].tag(c,"label")[0],g=h["default"].tag(c,"input")[0],v=u["default"].matchCase(h["default"].getText(p),this.caseSensitive);""!==v&&b["default"].has(o,v,!0)?(g.checked=!0,this.Mod.checkList.setCheckListValues(g)):(g.checked=!1,this.Mod.checkList.setCheckListValues(g))}}}}},{key:"setColWidths",value:function(t,e){function s(t){var s=this.nbCells,i=this.colWidths;if(s!=i.length||s!=t.cells.length)throw new Error("Columns number mismatch!");for(var a=h["default"].tag(e,"col"),l=a.length>0,n=l?null:A.createDocumentFragment(),r=0;s>r;r++){var o=void 0;l?o=a[r]:(o=h["default"].create("col",["id",this.id+"_col_"+r]),n.appendChild(o)),o.style.width=i[r]}l||e.insertBefore(n,e.firstChild)}if(this.fltGrid&&this.hasColWidths){e=e||this.tbl;var i=void 0;i=void 0===t?"none"!=e.rows[0].style.display?0:1:t,s.call(this,e.rows[i])}}},{key:"enforceVisibility",value:function(){if(this.hasVisibleRows)for(var t=0,e=this.visibleRows.length;e>t;t++){var s=this.visibleRows[t];s<=this.nbRows&&this.validateRow(s,!0)}}},{key:"clearFilters",value:function(){this.EvtManager(this.Evt.name.clear)}},{key:"_clearFilters",value:function(){if(this.fltGrid){this.onBeforeReset&&this.onBeforeReset.call(null,this,this.getFiltersValue());for(var t=0,e=this.fltIds.length;e>t;t++)this.setFilterValue(t,"");this.linkedFilters&&(this.activeFilterId="",this.linkFilters()),this.rememberPageLen&&c["default"].remove(this.pgLenCookie),this.rememberPageNb&&c["default"].remove(this.pgNbCookie),this.onAfterReset&&this.onAfterReset.call(null,this)}}},{key:"clearActiveColumns",value:function(){for(var t=0,e=this.fltIds.length;e>t;t++)h["default"].removeClass(this.getHeaderElement(t),this.activeColumnsCssClass)}},{key:"linkFilters",value:function(){if(this.activeFilterId){var t=this.getFiltersByType(this.fltTypeSlc,!0),e=this.getFiltersByType(this.fltTypeMulti,!0),s=this.getFiltersByType(this.fltTypeCheckList,!0),i=t.concat(e);i=i.concat(s);var a=this.activeFilterId.split("_")[0];a=a.split(this.prfxFlt)[1];for(var l=void 0,n=0,r=i.length;r>n;n++){var o=h["default"].id(this.fltIds[i[n]]);if(l=this.getFilterValue(i[n]),a!==i[n]||this.paging&&b["default"].has(t,i[n])&&a===i[n]||!this.paging&&(b["default"].has(s,i[n])||b["default"].has(e,i[n]))||l===this.displayAllText){if(b["default"].has(s,i[n])?this.Mod.checkList.checkListDiv[i[n]].innerHTML="":o.innerHTML="",this.fillSlcOnDemand){var d=h["default"].createOpt(this.displayAllText,"");o&&o.appendChild(d)}b["default"].has(s,i[n])?this.Mod.checkList._build(i[n]):this.Mod.dropdown._build(i[n],!0),this.setFilterValue(i[n],l)}}}}},{key:"_resetGrid",value:function(){if(!this.isFirstLoad){var t=this.Mod,e=this.tbl,s=e.rows,i=this.filtersRowIndex,a=s[i];if(!this.gridLayout)if(e.tHead){var l=e.tHead.insertRow(this.filtersRowIndex);e.tHead.replaceChild(this.fltGridEl,l)}else a.parentNode.insertBefore(this.fltGridEl,a);if(this.isExternalFlt)for(var n=this.externalFltTgtIds,r=0,o=n.length;o>r;r++){var d=h["default"].id(n[r]);if(d){var u=this.externalFltEls[r];d.appendChild(u);var f=this.getFilterType(r);this.gridLayout&&""===u.innerHTML&&f!==this.fltTypeInp&&((f===this.fltTypeSlc||f===this.fltTypeMulti)&&t.dropdown.build(r),f===this.fltTypeCheckList&&t.checkList.build(r))}}this.nbFilterableRows=this.getRowsNb(),this.nbVisibleRows=this.nbFilterableRows,this.nbRows=s.length,this.popUpFilters&&(this.headersRow++,t.popupFilter.buildAll()),this.gridLayout||h["default"].addClass(this.tbl,this.prfxTf),this._hasGrid=!0}}},{key:"_containsStr",value:function(t,e,s,i){var a=void 0,l=this.caseSensitive?"g":"gi",n=i?i:this.exactMatch;return a=n||s!==this.fltTypeInp&&s?new RegExp("(^\\s*)"+u["default"].rgxEsc(t)+"(\\s*$)",l):new RegExp(u["default"].rgxEsc(t),l),a.test(e)}},{key:"isImported",value:function(t,e){for(var s=!1,i=e?e:"script",a="script"==i?"src":"href",l=h["default"].tag(A,i),n=0,r=l.length;r>n;n++)if(void 0!==l[n][a]&&l[n][a].match(t)){s=!0;break}return s}},{key:"import",value:function(t,e,s,i){var a=i?i:"script",l=this.isImported(e,a);if(!l){var n=this,r=!1,o=void 0,d=h["default"].tag(A,"head")[0];o="link"===u["default"].lower(a)?h["default"].create("link",["id",t],["type","text/css"],["rel","stylesheet"],["href",e]):h["default"].create("script",["id",t],["type","text/javascript"],["src",e]),o.onload=o.onreadystatechange=function(){r||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(r=!0,"function"==typeof s&&s.call(null,n))},o.onerror=function(){throw new Error("TF script could not load: "+e)},d.appendChild(o)}}},{key:"hasGrid",value:function(){return this._hasGrid}},{key:"getFiltersId",value:function(){return this.fltIds||[]}},{key:"getValidRows",value:function(t){if(!t)return this.validRowsIndex;this.validRowsIndex=[];for(var e=this.refRow;e]+>/g,"");return e=e.replace(/^\s+/,"").replace(/\s+$/,"")},create:function(t){if(t&&""!==t){var e=document.createElement(t),s=arguments;if(s.length>1)for(var i=0;i0){var i=document.cookie,a=i.indexOf(s);if(-1!==a){a+=s.length;var l=i.indexOf(";",a);-1===l&&(l=i.length),e=unescape(i.substring(a,l))}}return e},remove:function(t){this.write(t,"",-1)},valueToArray:function(t,e){e||(e=",");var s=this.read(t),i=s.split(e);return i},getValueByIndex:function(t,e,s){s||(s=",");var i=this.valueToArray(t,s);return i[e]}},t.exports=e["default"]},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=void 0;e["default"]={isObj:function(t){var e=!1;return"string"==typeof t?window[t]&&"object"==typeof window[t]&&(e=!0):t&&"object"==typeof t&&(e=!0),e},isFn:function(t){return t&&t.constructor==Function},isArray:function(t){return t&&t.constructor==Array},isUndef:function(t){return t===i},isNull:function(t){return null===t},isEmpty:function(t){return this.isUndef(t)||this.isNull(t)||0===t.length}},t.exports=e["default"]},function(t,e,s){"use strict";var i=function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(e,"__esModule",{value:!0});var a=s(4),l=i(a);e["default"]={has:function(t,e,s){for(var i=void 0===s?!1:s,a=0;a2)return t;var e=void 0;return 99>=t&&t>50&&(e="19"+t),(50>t||"00"===t)&&(e="20"+t),e}function a(t){if(void 0===t)return 0;for(var e=void 0,s=["january","february","march","april","may","june","july","august","september","october","november","december","jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],i=0;i11||23>e)&&(e-=12),1>e||e>12?0:e}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]={isValid:function(t,e){if(e||(e="DMY"),e=e.toUpperCase(),3!=e.length&&"DDMMMYYYY"===e){var s=this.format(t,e);t=s.getDate()+"/"+(s.getMonth()+1)+"/"+s.getFullYear(),e="DMY"}(-1===e.indexOf("M")||-1===e.indexOf("D")||-1===e.indexOf("Y"))&&(e="DMY");var i=void 0,a=void 0;if("Y"==e.substring(0,1)?(i=/^\d{2}(\-|\/|\.)\d{1,2}\1\d{1,2}$/,a=/^\d{4}(\-|\/|\.)\d{1,2}\1\d{1,2}$/):"Y"==e.substring(1,2)?(i=/^\d{1,2}(\-|\/|\.)\d{2}\1\d{1,2}$/,a=/^\d{1,2}(\-|\/|\.)\d{4}\1\d{1,2}$/):(i=/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{2}$/,a=/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/),i.test(t)===!1&&a.test(t)===!1)return!1;var l=t.split(RegExp.$1),n=void 0,r=void 0,o=void 0;n="M"===e.substring(0,1)?l[0]:"M"===e.substring(1,2)?l[1]:l[2],r="D"===e.substring(0,1)?l[0]:"D"===e.substring(1,2)?l[1]:l[2],o="Y"===e.substring(0,1)?l[0]:"Y"===e.substring(1,2)?l[1]:l[2],parseInt(o,10)<=50&&(o=(parseInt(o,10)+2e3).toString()),parseInt(o,10)<=99&&(o=(parseInt(o,10)+1900).toString());var h=new Date(parseInt(o,10),parseInt(n,10)-1,parseInt(r,10),0,0,0,0);return parseInt(r,10)!=h.getDate()?!1:parseInt(n,10)-1!=h.getMonth()?!1:!0},format:function(t,e){if(e||(e="DMY"),!t||""===t)return new Date(1001,0,1);var s=void 0,l=void 0;switch(e.toUpperCase()){case"DDMMMYYYY":l=t.replace(/[- \/.]/g," ").split(" "),s=new Date(i(l[2]),a(l[1])-1,l[0]);break;case"DMY":l=t.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),s=new Date(i(l[2]),l[1]-1,l[0]);break;case"MDY":l=t.replace(/^(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),s=new Date(i(l[2]),l[0]-1,l[1]);break;case"YMD":l=t.replace(/^((\d\d)?\d\d)([- \/.])(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])$/,"$1 $4 $6").split(" "),s=new Date(i(l[0]),l[1]-1,l[2]);break;default:l=t.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),s=new Date(i(l[2]),l[1]-1,l[0])}return s}},t.exports=e["default"]},function(t,e,s){"use strict";var i=function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(e,"__esModule",{value:!0});var a=s(4),l=i(a);e["default"]={removeNbFormat:function(t,e){if(t){e||(e="us");var s=t;return s="us"===l["default"].lower(e)?+s.replace(/[^\d\.-]/g,""):+s.replace(/[^\d\,-]/g,"").replace(",",".")}}},t.exports=e["default"]},function(t,e,s){"use strict";var i=function(t){return t&&t.__esModule?t:{"default":t}},a=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},l=function(){function t(t,e){for(var s=0;s0&&i.removeChild(T[0]),this.headTbl.style.tableLayout="fixed",i.style.tableLayout="fixed",this.headTbl.cellPadding=i.cellPadding,this.headTbl.cellSpacing=i.cellSpacing,e.setColWidths(0,this.headTbl),i.style.width="",this.headTbl.style.width=i.clientWidth+"px",u["default"].add(this.tblCont,"scroll",function(e){var s=u["default"].target(e),i=s.scrollLeft;t.headTblCont.scrollLeft=i});var R=(s.extensions||[]).filter(function(t){return"sort"===t.name});1===R.length&&(R[0].async_sort=!0,R[0].trigger_ids=g),this.tblHasColTag=r["default"].tag(i,"col").length>0?!0:!1;var F=function(){for(var t=e.nbCells-1;t>=0;t--){var s=r["default"].create("col",["id",e.id+"_col_"+t]);i.insertBefore(s,i.firstChild),s.style.width=e.colWidths[t],this.gridColElms[t]=s}this.tblHasColTag=!0};if(this.tblHasColTag)for(var P=r["default"].tag(i,"col"),I=0;I',this.popUpDivCssClass=s.popup_div_css_class||"popUpFilter",this.onBeforePopUpOpen=r["default"].isFn(s.on_before_popup_filter_open)?s.on_before_popup_filter_open:null,this.onAfterPopUpOpen=r["default"].isFn(s.on_after_popup_filter_open)?s.on_after_popup_filter_open:null,this.onBeforePopUpClose=r["default"].isFn(s.on_before_popup_filter_close)?s.on_before_popup_filter_close:null,this.onAfterPopUpClose=r["default"].isFn(s.on_after_popup_filter_close)?s.on_after_popup_filter_close:null,this.popUpFltSpans=[],this.popUpFltImgs=[],this.popUpFltElms=this.popUpFltElmCache||[],this.popUpFltAdjustToContainer=!0,this.prfxPopUpSpan="popUpSpan_",this.prfxPopUpDiv="popUpDiv_",this.tf=t}return l(e,[{key:"onClick",value:function(e){var s=e||t.event,i=s.target.parentNode,a=parseInt(i.getAttribute("ci"),10);if(this.closeAll(a),this.toggle(a),this.popUpFltAdjustToContainer){var l=this.popUpFltElms[a],n=this.tf.getHeaderElement(a),r=.95*n.clientWidth;l.style.width=parseInt(r,10)+"px"}u["default"].cancel(s),u["default"].stop(s)}},{key:"init",value:function(){for(var t=this,e=this.tf,s=0;sy;y++)if(t===y&&(!e||e&&a.disableExcludedOptions)||t==y&&e&&(""===o[m].style.display&&!a.paging||a.paging&&(!a.validRowsIndex||a.validRowsIndex&&h["default"].has(a.validRowsIndex,m))&&(void 0===f||f==t||f!=t&&h["default"].has(a.validRowsIndex,m)))){var w=a.getCellData(y,_[y]),x=u["default"].matchCase(w,d);if(h["default"].has(this.opts,x,d)||this.opts.push(w),e&&a.disableExcludedOptions){var k=b[y];k||(k=a.getFilteredDataCol(y)),h["default"].has(k,x,d)||h["default"].has(v,x,d)||this.isFirstLoad||v.push(w)}}}if(this.isCustom){var T=a.getCustomOptions(t);this.opts=T[0],this.optsTxt=T[1]}if(a.sortSlc&&!this.isCustom&&(d?(this.opts.sort(),v&&v.sort()):(this.opts.sort(c["default"].ignoreCase),v&&v.sort(c["default"].ignoreCase))),a.sortNumAsc&&h["default"].has(a.sortNumAsc,t))try{this.opts.sort(numSortAsc),v&&v.sort(numSortAsc),this.isCustom&&this.optsTxt.sort(numSortAsc)}catch(R){this.opts.sort(),v&&v.sort(),this.isCustom&&this.optsTxt.sort()}if(a.sortNumDesc&&h["default"].has(a.sortNumDesc,t))try{this.opts.sort(numSortDesc),v&&v.sort(numSortDesc),this.isCustom&&this.optsTxt.sort(numSortDesc)}catch(R){this.opts.sort(),v&&v.sort(),this.isCustom&&this.optsTxt.sort()}this.addOptions(t,n,e,v,p,g)}}},{key:"addOptions",value:function(t,e,s,i,a,l){var n=this.tf,o=u["default"].lower(this.slcFillingMethod),d=e.value;e.innerHTML="",e=this.addFirstOption(e);for(var f=0;f"+p+""}else{var b;b=n.fillSlcOnDemand&&d===this.opts[f]&&n["col"+t]===n.fltTypeSlc?r["default"].createOpt(p,c,!0):n["col"+t]!==n.fltTypeMulti?r["default"].createOpt(p,c," "!==a[t]&&c===a[t]?!0:!1):r["default"].createOpt(p,c,h["default"].has(l,u["default"].matchCase(this.opts[f],n.matchCase),n.matchCase)||-1!==l.toString().indexOf(c)?!0:!1),g&&(b.disabled=!0),e.appendChild(b)}}"innerhtml"===o&&(e.innerHTML+=this.slcInnerHtml),e.setAttribute("filled","1")}},{key:"addFirstOption",value:function(t){var e=this.tf,s=u["default"].lower(this.slcFillingMethod);if("innerhtml"===s)this.slcInnerHtml+='";else{var i=r["default"].createOpt(this.enableSlcResetFilter?e.displayAllText:"","");if(this.enableSlcResetFilter||(i.style.display="none"),t.appendChild(i),e.enableEmptyOption){var a=r["default"].createOpt(e.emptyText,e.emOperator);t.appendChild(a)}if(e.enableNonEmptyOption){var l=r["default"].createOpt(e.nonEmptyText,e.nmOperator);t.appendChild(l)}}return t}}]),t}();e.Dropdown=p},function(t,e,s){"use strict";var i=function(t){return t&&t.__esModule?t:{"default":t}},a=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},l=function(){function t(t,e){for(var s=0;s_;_++)if(t===_&&(!a.linkedFilters||a.linkedFilters&&a.disableExcludedOptions)||t===_&&a.linkedFilters&&(""===d[v].style.display&&!a.paging||a.paging&&(!f||f===t||f!=t&&h["default"].has(a.validRowsIndex,v)))){var C=a.getCellData(_,b[_]),y=u["default"].matchCase(C,a.matchCase);h["default"].has(this.opts,y,a.matchCase)||this.opts.push(C);var w=p[_];a.linkedFilters&&a.disableExcludedOptions&&(w||(w=a.getFilteredDataCol(_)),h["default"].has(w,y,a.matchCase)||h["default"].has(this.excludedOpts,y,a.matchCase)||a.isFirstLoad||this.excludedOpts.push(C))}}if(this.isCustom){var x=a.getCustomOptions(t);this.opts=x[0],this.optsTxt=x[1]}if(a.sortSlc&&!this.isCustom&&(a.matchCase?(this.opts.sort(),this.excludedOpts&&this.excludedOpts.sort()):(this.opts.sort(c["default"].ignoreCase),this.excludedOpts&&this.excludedOpts.sort(c["default"].ignoreCase))),a.sortNumAsc&&h["default"].has(a.sortNumAsc,t))try{this.opts.sort(numSortAsc),this.excludedOpts&&this.excludedOpts.sort(numSortAsc),this.isCustom&&this.optsTxt.sort(numSortAsc)}catch(k){this.opts.sort(),this.excludedOpts&&this.excludedOpts.sort(),this.isCustom&&this.optsTxt.sort()}if(a.sortNumDesc&&h["default"].has(a.sortNumDesc,t))try{this.opts.sort(numSortDesc),this.excludedOpts&&this.excludedOpts.sort(numSortDesc),this.isCustom&&this.optsTxt.sort(numSortDesc)}catch(k){this.opts.sort(),this.excludedOpts&&this.excludedOpts.sort(),this.isCustom&&this.optsTxt.sort()}this.addChecks(t,o,a.separator),a.fillSlcOnDemand&&(n.innerHTML=""),n.appendChild(o),n.setAttribute("filled","1")}}},{key:"addChecks",value:function(t,e){var s=this,i=this.tf,a=this.addTChecks(t,e),l=[],n=i.feature("store"),o=n?n.getFilterValues(i.fltsValuesCookie)[t]:null;o&&u["default"].trim(o).length>0&&(i.hasCustomSlcOptions&&h["default"].has(i.customSlcOptions.cols,t)?l.push(o):l=o.split(" "+i.orOperator+" "));for(var d=0;d0?1:0),l=a+i.pagingLength-1<=e.nbVisibleRows?a+i.pagingLength-1:e.nbVisibleRows;s=a+this.fromToTextSeparator+l+this.overText+e.nbVisibleRows}}else s=t&&""!==t?t:e.nbFilterableRows-e.nbHiddenRows;this.rowsCounterSpan.innerHTML=s,this.onAfterRefreshCounter&&this.onAfterRefreshCounter.call(null,e,this.rowsCounterSpan,s)}}},{key:"destroy",value:function(){var t=this.tf;t.hasGrid()&&this.rowsCounterSpan&&(!this.rowsCounterTgtId&&this.rowsCounterDiv?this.rowsCounterDiv.parentNode.removeChild(this.rowsCounterDiv):r["default"].id(this.rowsCounterTgtId).innerHTML="",this.rowsCounterSpan=null,this.rowsCounterDiv=null)}}]),t}();e.RowsCounter=d},function(t,e,s){"use strict";var i=function(t){return t&&t.__esModule?t:{"default":t}},a=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},l=function(){function t(t,e){for(var s=0;s",this.btnPrevPageText=s.btn_prev_page_text||"<",this.btnLastPageText=s.btn_last_page_text||">|",this.btnFirstPageText=s.btn_first_page_text||"|<",this.btnNextPageHtml=s.btn_next_page_html||(e.enableIcons?'':null),this.btnPrevPageHtml=s.btn_prev_page_html||(e.enableIcons?'':null),this.btnFirstPageHtml=s.btn_first_page_html||(e.enableIcons?'':null),this.btnLastPageHtml=s.btn_last_page_html||(e.enableIcons?'':null),this.pageText=s.page_text||" Page ",this.ofText=s.of_text||" of ",this.nbPgSpanCssClass=s.nb_pages_css_class||"nbpg",this.hasPagingBtns=s.paging_btns===!1?!1:!0,this.pageSelectorType=s.page_selector_type||e.fltTypeSlc,this.onBeforeChangePage=h["default"].isFn(s.on_before_change_page)?s.on_before_change_page:null,this.onAfterChangePage=h["default"].isFn(s.on_after_change_page)?s.on_after_change_page:null,this.prfxSlcPages="slcPages_",this.prfxSlcResults="slcResults_",this.prfxSlcResultsTxt="slcResultsTxt_",this.prfxBtnNextSpan="btnNextSpan_",this.prfxBtnPrevSpan="btnPrevSpan_",this.prfxBtnLastSpan="btnLastSpan_",this.prfxBtnFirstSpan="btnFirstSpan_",this.prfxBtnNext="btnNext_",this.prfxBtnPrev="btnPrev_",this.prfxBtnLast="btnLast_",this.prfxBtnFirst="btnFirst_",this.prfxPgSpan="pgspan_",this.prfxPgBeforeSpan="pgbeforespan_",this.prfxPgAfterSpan="pgafterspan_";var i=this.refRow,l=this.nbRows;this.nbPages=Math.ceil((l-i)/this.pagingLength);var n=this;this.evt={slcIndex:function(){return n.pageSelectorType===e.fltTypeSlc?n.pagingSlc.options.selectedIndex:parseInt(n.pagingSlc.value,10)-1},nbOpts:function(){return n.pageSelectorType===e.fltTypeSlc?parseInt(n.pagingSlc.options.length,10)-1:n.nbPages-1},next:function(){var t=n.evt.slcIndex()0?n.evt.slcIndex()-1:n.evt.nbOpts();n.changePage(t)},last:function(){n.changePage(n.evt.nbOpts())},first:function(){n.changePage(0)},_detectKey:function(t){var s=c["default"].keyCode(t);13===s&&(e.sorted?(e.filter(),n.changePage(n.evt.slcIndex())):n.changePage(),this.blur())},slcPagesChange:null,nextEvt:null,prevEvt:null,lastEvt:null,firstEvt:null},this.tf=e}return l(t,[{key:"init",value:function(){var t,e=this,s=this.tf,i=this.evt;this.hasResultsPerPage&&(this.resultsPerPage.length<2?this.hasResultsPerPage=!1:(this.pagingLength=this.resultsPerPage[1][0],this.setResultsPerPage())),i.slcPagesChange=function(t){var s=t.target;e.changePage(s.selectedIndex)},this.pageSelectorType===s.fltTypeSlc&&(t=r["default"].create(s.fltTypeSlc,["id",this.prfxSlcPages+s.id]),t.className=this.pgSlcCssClass,c["default"].add(t,"change",i.slcPagesChange)),this.pageSelectorType===s.fltTypeInp&&(t=r["default"].create(s.fltTypeInp,["id",this.prfxSlcPages+s.id],["value",this.currentPageNb]),t.className=this.pgInpCssClass,c["default"].add(t,"keypress",i._detectKey));var a=r["default"].create("span",["id",this.prfxBtnNextSpan+s.id]),l=r["default"].create("span",["id",this.prfxBtnPrevSpan+s.id]),n=r["default"].create("span",["id",this.prfxBtnLastSpan+s.id]),o=r["default"].create("span",["id",this.prfxBtnFirstSpan+s.id]);if(this.hasPagingBtns){if(this.btnNextPageHtml)a.innerHTML=this.btnNextPageHtml,c["default"].add(a,"click",i.next);else{var h=r["default"].create(s.fltTypeInp,["id",this.prfxBtnNext+s.id],["type","button"],["value",this.btnNextPageText],["title","Next"]);h.className=this.btnPageCssClass,c["default"].add(h,"click",i.next),a.appendChild(h)}if(this.btnPrevPageHtml)l.innerHTML=this.btnPrevPageHtml,c["default"].add(l,"click",i.prev);else{var d=r["default"].create(s.fltTypeInp,["id",this.prfxBtnPrev+s.id],["type","button"],["value",this.btnPrevPageText],["title","Previous"]);d.className=this.btnPageCssClass,c["default"].add(d,"click",i.prev),l.appendChild(d)}if(this.btnLastPageHtml)n.innerHTML=this.btnLastPageHtml,c["default"].add(n,"click",i.last);else{var u=r["default"].create(s.fltTypeInp,["id",this.prfxBtnLast+s.id],["type","button"],["value",this.btnLastPageText],["title","Last"]);u.className=this.btnPageCssClass,c["default"].add(u,"click",i.last),n.appendChild(u)}if(this.btnFirstPageHtml)o.innerHTML=this.btnFirstPageHtml,c["default"].add(o,"click",i.first);else{var f=r["default"].create(s.fltTypeInp,["id",this.prfxBtnFirst+s.id],["type","button"],["value",this.btnFirstPageText],["title","First"]);f.className=this.btnPageCssClass,c["default"].add(f,"click",i.first),o.appendChild(f)}}this.pagingTgtId||s.setToolbar();var p=this.pagingTgtId?r["default"].id(this.pagingTgtId):s.mDiv;p.appendChild(o),p.appendChild(l);var g=r["default"].create("span",["id",this.prfxPgBeforeSpan+s.id]);g.appendChild(r["default"].text(this.pageText)),g.className=this.nbPgSpanCssClass,p.appendChild(g),p.appendChild(t);var v=r["default"].create("span",["id",this.prfxPgAfterSpan+s.id]);v.appendChild(r["default"].text(this.ofText)),v.className=this.nbPgSpanCssClass,p.appendChild(v);var b=r["default"].create("span",["id",this.prfxPgSpan+s.id]);b.className=this.nbPgSpanCssClass,b.appendChild(r["default"].text(" "+this.nbPages+" ")),p.appendChild(b),p.appendChild(a),p.appendChild(n),this.pagingSlc=r["default"].id(this.prfxSlcPages+s.id),(!s.rememberGridValues||this.isPagingRemoved)&&this.setPagingInfo(),s.fltGrid||(s.validateAllRows(),this.setPagingInfo(s.validRowsIndex)),this.isPagingRemoved=!1}},{key:"reset",value:function(){var t=void 0===arguments[0]?!1:arguments[0],e=this.tf;e.hasGrid()&&!e.paging&&(e.paging=!0,this.isPagingRemoved=!0,this.init(),e.resetValues(),t&&e.filter())}},{key:"setPagingInfo",value:function(){var t=void 0===arguments[0]?[]:arguments[0],e=this.tf,s=e.tbl.rows,i=this.pagingTgtId?r["default"].id(this.pagingTgtId):e.mDiv,a=r["default"].id(this.prfxPgSpan+e.id);if(e.validRowsIndex=t,0===t.length)for(var l=e.refRow;l0)if(i.style.visibility="visible",this.pageSelectorType===e.fltTypeSlc)for(var d=0;dl;l++){var r=e.validRowsIndex[l],o=i[r],d=o.getAttribute("validRow");l>=this.startPagingRow&&a>l?((h["default"].isNull(d)||Boolean("true"===d))&&(o.style.display=""),e.alternateBgs&&s&&s.setRowBg(r,l)):(o.style.display="none",e.alternateBgs&&s&&s.removeRowBg(r))}e.nbVisibleRows=e.validRowsIndex.length,e.applyProps()}},{key:"getPage",value:function(){return this.currentPageNb}},{key:"setPage",value:function(t){var e=this.tf;if(e.hasGrid()&&e.paging){var s=this.evt,i=typeof t;if("string"===i)switch(u["default"].lower(t)){case"next":s.next();break;case"previous":s.prev();break;case"last":s.last();break;case"first":s.first();break;default:s.next()}else"number"===i&&this.changePage(t-1)}}},{key:"setResultsPerPage",value:function(){var t=this,e=this.tf,s=this.evt;if((e.hasGrid()||e.isFirstLoad)&&!this.resultsPerPageSlc&&this.resultsPerPage){s.slcResultsChange=function(e){t.changeResultsPerPage(),e.target.blur()};var i=r["default"].create(e.fltTypeSlc,["id",this.prfxSlcResults+e.id]);i.className=this.resultsSlcCssClass;var a=this.resultsPerPage[0],l=this.resultsPerPage[1],n=r["default"].create("span",["id",this.prfxSlcResultsTxt+e.id]);n.className=this.resultsSpanCssClass,this.resultsPerPageTgtId||e.setToolbar();var o=this.resultsPerPageTgtId?r["default"].id(this.resultsPerPageTgtId):e.rDiv;n.appendChild(r["default"].text(a));var h=e.feature("help");h&&h.cont?(h.cont.parentNode.insertBefore(n,h.cont),h.cont.parentNode.insertBefore(i,h.cont)):(o.appendChild(n),o.appendChild(i));for(var d=0;d=0&&t<=this.nbPages-1&&(this.onBeforeChangePage&&this.onBeforeChangePage.call(null,this,t),this.currentPageNb=parseInt(t,10)+1,this.pageSelectorType===e.fltTypeSlc?this.pagingSlc.options[t].selected=!0:this.pagingSlc.value=this.currentPageNb,e.rememberPageNb&&e.feature("store").savePageNb(e.pgNbCookie),this.startPagingRow=this.pageSelectorType===e.fltTypeSlc?this.pagingSlc.value:t*this.pagingLength,this.groupByPage(),this.onAfterChangePage&&this.onAfterChangePage.call(null,this,t)))}},{key:"_changeResultsPerPage",value:function(){var t=this.tf;if(t.paging){var e=this.resultsPerPageSlc,s=this.pageSelectorType===t.fltTypeSlc?this.pagingSlc.selectedIndex:parseInt(this.pagingSlc.value-1,10);if(this.pagingLength=parseInt(e.options[e.selectedIndex].value,10),this.startPagingRow=this.pagingLength*s,!isNaN(this.pagingLength)){if(this.startPagingRow>=t.nbFilterableRows&&(this.startPagingRow=t.nbFilterableRows-this.pagingLength),this.setPagingInfo(),this.pageSelectorType===t.fltTypeSlc){var i=this.pagingSlc.options.length-1<=s?this.pagingSlc.options.length-1:s;this.pagingSlc.options[i].selected=!0}t.rememberPageLen&&t.feature("store").savePageLength(t.pgLenCookie)}}}},{key:"_resetPage",value:function(t){var e=this.tf,s=e.feature("store").getPageNb(t);""!==s&&this.changePage(s-1)}},{key:"_resetPageLength",value:function(t){var e=this.tf;if(e.paging){var s=e.feature("store").getPageLength(t);""!==s&&(this.resultsPerPageSlc.options[s].selected=!0,this.changeResultsPerPage())}}},{key:"destroy",value:function(){var t=this.tf;if(t.hasGrid()){var e=r["default"].id(this.prfxBtnNextSpan+t.id),s=r["default"].id(this.prfxBtnPrevSpan+t.id),i=r["default"].id(this.prfxBtnLastSpan+t.id),a=r["default"].id(this.prfxBtnFirstSpan+t.id),l=r["default"].id(this.prfxPgBeforeSpan+t.id),n=r["default"].id(this.prfxPgAfterSpan+t.id),o=r["default"].id(this.prfxPgSpan+t.id),h=this.evt;this.pagingSlc&&(this.pageSelectorType===t.fltTypeSlc?c["default"].remove(this.pagingSlc,"change",h.slcPagesChange):this.pageSelectorType===t.fltTypeInp&&c["default"].remove(this.pagingSlc,"keypress",h._detectKey),this.pagingSlc.parentNode.removeChild(this.pagingSlc)),e&&(c["default"].remove(e,"click",h.next),e.parentNode.removeChild(e)),s&&(c["default"].remove(s,"click",h.prev),s.parentNode.removeChild(s)),i&&(c["default"].remove(i,"click",h.last),i.parentNode.removeChild(i)),a&&(c["default"].remove(a,"click",h.first),a.parentNode.removeChild(a)),l&&l.parentNode.removeChild(l),n&&n.parentNode.removeChild(n),o&&o.parentNode.removeChild(o),this.hasResultsPerPage&&this.removeResultsPerPage(),this.pagingSlc=null,this.nbPages=0,this.isPagingRemoved=!0,t.paging=!1}}}]),t}();e.Paging=p},function(t,e,s){"use strict";var i=function(t){return t&&t.__esModule?t:{"default":t}},a=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},l=function(){function t(t,e){for(var s=0;s':null),this.prfxResetSpan="resetspan_",this.tf=e}return l(t,[{key:"onClick",value:function(){this.tf.clearFilters()}},{key:"init",value:function(){var t=this,e=this.tf;if(e.hasGrid()||e.isFirstLoad||!e.btnResetEl){var s=r["default"].create("span",["id",this.prfxResetSpan+e.id]);this.btnResetTgtId||e.setToolbar();var i=this.btnResetTgtId?r["default"].id(this.btnResetTgtId):e.rDiv;if(i.appendChild(s),this.btnResetHtml){s.innerHTML=this.btnResetHtml;var a=s.firstChild;h["default"].add(a,"click",function(){t.onClick()})}else{var l=r["default"].create("a",["href","javascript:void(0);"]);l.className=e.btnResetCssClass,l.appendChild(r["default"].text(this.btnResetText)),s.appendChild(l),h["default"].add(l,"click",function(){t.onClick()})}this.btnResetEl=s.firstChild}}},{key:"destroy",value:function(){var t=this.tf;if(t.hasGrid()&&this.btnResetEl){var e=r["default"].id(t.prfxResetSpan+t.id);e&&e.parentNode.removeChild(e),this.btnResetEl=null}}}]),t}();e.ClearButton=d},function(t,e,s){"use strict";var i=function(t){return t&&t.__esModule?t:{"default":t}},a=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function"); - 'use strict'; - - Object.defineProperty(exports, '__esModule', { - value: true - }); - /** - * DOM event utilities - */ - - exports['default'] = { - add: function add(obj, type, func, capture) { - if (obj.addEventListener) { - obj.addEventListener(type, func, capture); - } else if (obj.attachEvent) { - obj.attachEvent('on' + type, func); - } else { - obj['on' + type] = func; - } - }, - remove: function remove(obj, type, func, capture) { - if (obj.detachEvent) { - obj.detachEvent('on' + type, func); - } else if (obj.removeEventListener) { - obj.removeEventListener(type, func, capture); - } else { - obj['on' + type] = null; - } - }, - stop: function stop(evt) { - if (!evt) { - evt = window.event; - } - if (evt.stopPropagation) { - evt.stopPropagation(); - } else { - evt.cancelBubble = true; - } - }, - cancel: function cancel(evt) { - if (!evt) { - evt = window.event; - } - if (evt.preventDefault) { - evt.preventDefault(); - } else { - evt.returnValue = false; - } - }, - target: function target(evt) { - return evt && evt.target || window.event && window.event.srcElement; - }, - keyCode: function keyCode(evt) { - return evt.charCode ? evt.charCode : evt.keyCode ? evt.keyCode : evt.which ? evt.which : 0; - } - }; - module.exports = exports['default']; - -/***/ }, -/* 3 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, '__esModule', { - value: true - }); - /** - * DOM utilities - */ - - exports['default'] = { - - /** - * Returns text + text of children of given node - * @param {NodeElement} node - * @return {String} - */ - getText: function getText(node) { - var s = node.textContent || node.innerText || node.innerHTML.replace(/<[^<>]+>/g, ''); - s = s.replace(/^\s+/, '').replace(/\s+$/, ''); - return s; - }, - - /** - * Creates an html element with given collection of attributes - * @param {String} tag a string of the html tag to create - * @param {Array} an undetermined number of arrays containing the with 2 - * items, the attribute name and its value ['id','myId'] - * @return {Object} created element - */ - create: function create(tag) { - if (!tag || tag === '') { - return; - } - - var el = document.createElement(tag), - args = arguments; - - if (args.length > 1) { - for (var i = 0; i < args.length; i++) { - var argtype = typeof args[i]; - if (argtype.toLowerCase() === 'object' && args[i].length === 2) { - el.setAttribute(args[i][0], args[i][1]); - } - } - } - return el; - }, - - /** - * Returns a text node with given text - * @param {String} txt - * @return {Object} - */ - text: function text(txt) { - return document.createTextNode(txt); - }, - - hasClass: function hasClass(ele, cls) { - if (!ele) { - return false; - } - - if (supportsClassList()) { - return ele.classList.contains(cls); - } - return ele.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)')); - }, - - addClass: function addClass(ele, cls) { - if (!ele) { - return; - } - - if (supportsClassList()) { - ele.classList.add(cls); - return; - } - - if (ele.className === '') { - ele.className = cls; - } else if (!this.hasClass(ele, cls)) { - ele.className += ' ' + cls; - } - }, - - removeClass: function removeClass(ele, cls) { - if (!ele) { - return; - } - - if (supportsClassList()) { - ele.classList.remove(cls); - return; - } - var reg = new RegExp('(\\s|^)' + cls + '(\\s|$)', 'g'); - ele.className = ele.className.replace(reg, ''); - }, - - /** - * Creates and returns an option element - * @param {String} text option text - * @param {String} value option value - * @param {Boolean} isSel whether option is selected - * @return {Object} option element - */ - createOpt: function createOpt(text, value, isSel) { - var isSelected = isSel ? true : false, - opt = isSelected ? this.create('option', ['value', value], ['selected', 'true']) : this.create('option', ['value', value]); - opt.appendChild(this.text(text)); - return opt; - }, - - /** - * Creates and returns a checklist item - * @param {Number} chkIndex index of check item - * @param {String} chkValue check item value - * @param {String} labelText check item label text - * @return {Object} li DOM element - */ - createCheckItem: function createCheckItem(chkIndex, chkValue, labelText) { - var li = this.create('li'), - label = this.create('label', ['for', chkIndex]), - check = this.create('input', ['id', chkIndex], ['name', chkIndex], ['type', 'checkbox'], ['value', chkValue]); - label.appendChild(check); - label.appendChild(this.text(labelText)); - li.appendChild(label); - li.label = label; - li.check = check; - return li; - }, - - id: function id(_id) { - return document.getElementById(_id); - }, - - tag: function tag(o, tagname) { - return o.getElementsByTagName(tagname); - } - }; - - // HTML5 classList API - function supportsClassList() { - return document.documentElement.classList; - } - module.exports = exports['default']; - -/***/ }, -/* 4 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, '__esModule', { - value: true - }); - /** - * String utilities - */ - - exports['default'] = { - - lower: function lower(text) { - return text.toLowerCase(); - }, - - upper: function upper(text) { - return text.toUpperCase(); - }, - - trim: function trim(text) { - if (text.trim) { - return text.trim(); - } - return text.replace(/^\s*|\s*$/g, ''); - }, - - isEmpty: function isEmpty(text) { - return this.trim(text) === ''; - }, - - rgxEsc: function rgxEsc(text) { - var chars = /[-\/\\^$*+?.()|[\]{}]/g; - var escMatch = '\\$&'; - return String(text).replace(chars, escMatch); - }, - - matchCase: function matchCase(text, mc) { - if (!mc) { - return this.lower(text); - } - return text; - } - - }; - module.exports = exports['default']; - -/***/ }, -/* 5 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, '__esModule', { - value: true - }); - /** - * Cookie utilities - */ - - exports['default'] = { - - write: function write(name, value, hours) { - var expire = ''; - if (hours) { - expire = new Date(new Date().getTime() + hours * 3600000); - expire = '; expires=' + expire.toGMTString(); - } - document.cookie = name + '=' + escape(value) + expire; - }, - - read: function read(name) { - var cookieValue = '', - search = name + '='; - if (document.cookie.length > 0) { - var cookie = document.cookie, - offset = cookie.indexOf(search); - if (offset !== -1) { - offset += search.length; - var end = cookie.indexOf(';', offset); - if (end === -1) { - end = cookie.length; - } - cookieValue = unescape(cookie.substring(offset, end)); - } - } - return cookieValue; - }, - - remove: function remove(name) { - this.write(name, '', -1); - }, - - valueToArray: function valueToArray(name, separator) { - if (!separator) { - separator = ','; - } - //reads the cookie - var val = this.read(name); - //creates an array with filters' values - var arr = val.split(separator); - return arr; - }, - - getValueByIndex: function getValueByIndex(name, index, separator) { - if (!separator) { - separator = ','; - } - //reads the cookie - var val = this.valueToArray(name, separator); - return val[index]; - } - - }; - module.exports = exports['default']; - -/***/ }, -/* 6 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, '__esModule', { - value: true - }); - /** - * Types utilities - */ - - var UNDEFINED = void 0; - - exports['default'] = { - /** - * Check if argument is an object or a global object - * @param {String or Object} v - * @return {Boolean} - */ - isObj: function isObj(v) { - var isO = false; - if (typeof v === 'string') { - if (window[v] && typeof window[v] === 'object') { - isO = true; - } - } else { - if (v && typeof v === 'object') { - isO = true; - } - } - return isO; - }, - - /** - * Check if argument is a function - * @param {Function} fn - * @return {Boolean} - */ - isFn: function isFn(fn) { - return fn && fn.constructor == Function; - }, - - /** - * Check if argument is an array - * @param {Array} obj - * @return {Boolean} - */ - isArray: function isArray(obj) { - return obj && obj.constructor == Array; - }, - - /** - * Determine if argument is undefined - * @param {Any} o - * @return {Boolean} - */ - isUndef: function isUndef(o) { - return o === UNDEFINED; - }, - - /** - * Determine if argument is null - * @param {Any} o - * @return {Boolean} - */ - isNull: function isNull(o) { - return o === null; - }, - - /** - * Determine if argument is empty (undefined, null or empty string) - * @param {Any} o - * @return {Boolean} - */ - isEmpty: function isEmpty(o) { - return this.isUndef(o) || this.isNull(o) || o.length === 0; - } - }; - module.exports = exports['default']; - -/***/ }, -/* 7 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - Object.defineProperty(exports, '__esModule', { - value: true - }); - /** - * Array utilities - */ - - var _Str = __webpack_require__(4); - - var _Str2 = _interopRequireDefault(_Str); - - exports['default'] = { - has: function has(arr, val, caseSensitive) { - var sCase = caseSensitive === undefined ? false : caseSensitive; - for (var i = 0; i < arr.length; i++) { - if (_Str2['default'].matchCase(arr[i].toString(), sCase) == val) { - return true; - } - } - return false; - }, - indexByValue: function indexByValue(arr, val, caseSensitive) { - var sCase = caseSensitive === undefined ? false : caseSensitive; - for (var i = 0; i < arr.length; i++) { - if (_Str2['default'].matchCase(arr[i].toString(), sCase) == val) { - return i; - } - } - return -1; - } - }; - module.exports = exports['default']; - -/***/ }, -/* 8 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, '__esModule', { - value: true - }); - /** - * Date utilities - */ - - exports['default'] = { - isValid: function isValid(dateStr, format) { - if (!format) { - format = 'DMY'; - } - format = format.toUpperCase(); - if (format.length != 3) { - if (format === 'DDMMMYYYY') { - var d = this.format(dateStr, format); - dateStr = d.getDate() + '/' + (d.getMonth() + 1) + '/' + d.getFullYear(); - format = 'DMY'; - } - } - if (format.indexOf('M') === -1 || format.indexOf('D') === -1 || format.indexOf('Y') === -1) { - format = 'DMY'; - } - var reg1 = undefined, - reg2 = undefined; - // If the year is first - if (format.substring(0, 1) == 'Y') { - reg1 = /^\d{2}(\-|\/|\.)\d{1,2}\1\d{1,2}$/; - reg2 = /^\d{4}(\-|\/|\.)\d{1,2}\1\d{1,2}$/; - } else if (format.substring(1, 2) == 'Y') { - // If the year is second - reg1 = /^\d{1,2}(\-|\/|\.)\d{2}\1\d{1,2}$/; - reg2 = /^\d{1,2}(\-|\/|\.)\d{4}\1\d{1,2}$/; - } else { - // The year must be third - reg1 = /^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{2}$/; - reg2 = /^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/; - } - // If it doesn't conform to the right format (with either a 2 digit year - // or 4 digit year), fail - if (reg1.test(dateStr) === false && reg2.test(dateStr) === false) { - return false; - } - // Split into 3 parts based on what the divider was - var parts = dateStr.split(RegExp.$1); - var mm = undefined, - dd = undefined, - yy = undefined; - // Check to see if the 3 parts end up making a valid date - if (format.substring(0, 1) === 'M') { - mm = parts[0]; - } else if (format.substring(1, 2) === 'M') { - mm = parts[1]; - } else { - mm = parts[2]; - } - if (format.substring(0, 1) === 'D') { - dd = parts[0]; - } else if (format.substring(1, 2) === 'D') { - dd = parts[1]; - } else { - dd = parts[2]; - } - if (format.substring(0, 1) === 'Y') { - yy = parts[0]; - } else if (format.substring(1, 2) === 'Y') { - yy = parts[1]; - } else { - yy = parts[2]; - } - if (parseInt(yy, 10) <= 50) { - yy = (parseInt(yy, 10) + 2000).toString(); - } - if (parseInt(yy, 10) <= 99) { - yy = (parseInt(yy, 10) + 1900).toString(); - } - var dt = new Date(parseInt(yy, 10), parseInt(mm, 10) - 1, parseInt(dd, 10), 0, 0, 0, 0); - if (parseInt(dd, 10) != dt.getDate()) { - return false; - } - if (parseInt(mm, 10) - 1 != dt.getMonth()) { - return false; - } - return true; - }, - format: function format(dateStr, formatStr) { - if (!formatStr) { - formatStr = 'DMY'; - } - if (!dateStr || dateStr === '') { - return new Date(1001, 0, 1); - } - var oDate = undefined; - var parts = undefined; - - switch (formatStr.toUpperCase()) { - case 'DDMMMYYYY': - parts = dateStr.replace(/[- \/.]/g, ' ').split(' '); - oDate = new Date(y2kDate(parts[2]), mmm2mm(parts[1]) - 1, parts[0]); - break; - case 'DMY': - /* jshint ignore:start */ - parts = dateStr.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/, '$1 $3 $5').split(' '); - oDate = new Date(y2kDate(parts[2]), parts[1] - 1, parts[0]); - /* jshint ignore:end */ - break; - case 'MDY': - /* jshint ignore:start */ - parts = dateStr.replace(/^(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])([- \/.])((\d\d)?\d\d)$/, '$1 $3 $5').split(' '); - oDate = new Date(y2kDate(parts[2]), parts[0] - 1, parts[1]); - /* jshint ignore:end */ - break; - case 'YMD': - /* jshint ignore:start */ - parts = dateStr.replace(/^((\d\d)?\d\d)([- \/.])(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])$/, '$1 $4 $6').split(' '); - oDate = new Date(y2kDate(parts[0]), parts[1] - 1, parts[2]); - /* jshint ignore:end */ - break; - default: - //in case format is not correct - /* jshint ignore:start */ - parts = dateStr.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/, '$1 $3 $5').split(' '); - oDate = new Date(y2kDate(parts[2]), parts[1] - 1, parts[0]); - /* jshint ignore:end */ - break; - } - return oDate; - } - }; - - function y2kDate(yr) { - if (yr === undefined) { - return 0; - } - if (yr.length > 2) { - return yr; - } - var y = undefined; - //>50 belong to 1900 - if (yr <= 99 && yr > 50) { - y = '19' + yr; - } - //<50 belong to 2000 - if (yr < 50 || yr === '00') { - y = '20' + yr; - } - return y; - } - - function mmm2mm(mmm) { - if (mmm === undefined) { - return 0; - } - var mondigit = undefined; - var MONTH_NAMES = ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december', 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec']; - for (var m_i = 0; m_i < MONTH_NAMES.length; m_i++) { - var month_name = MONTH_NAMES[m_i]; - if (mmm.toLowerCase() === month_name) { - mondigit = m_i + 1; - break; - } - } - if (mondigit > 11 || mondigit < 23) { - mondigit = mondigit - 12; - } - if (mondigit < 1 || mondigit > 12) { - return 0; - } - return mondigit; - } - module.exports = exports['default']; - -/***/ }, -/* 9 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - Object.defineProperty(exports, '__esModule', { - value: true - }); - /** - * Misc helpers - */ - - var _Str = __webpack_require__(4); - - var _Str2 = _interopRequireDefault(_Str); - - exports['default'] = { - removeNbFormat: function removeNbFormat(data, format) { - if (!data) { - return; - } - if (!format) { - format = 'us'; - } - var n = data; - if (_Str2['default'].lower(format) === 'us') { - n = +n.replace(/[^\d\.-]/g, ''); - } else { - n = +n.replace(/[^\d\,-]/g, '').replace(',', '.'); - } - return n; - } - }; - module.exports = exports['default']; - -/***/ }, -/* 10 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - - Object.defineProperty(exports, '__esModule', { - value: true - }); - - var _Cookie = __webpack_require__(5); - - var _Cookie2 = _interopRequireDefault(_Cookie); - - var Store = (function () { - - /** - * Store, persistence manager - * @param {Object} tf TableFilter instance - * - * TODO: use localStorage and fallback to cookie persistence - */ - - function Store(tf) { - _classCallCheck(this, Store); - - var f = tf.config(); - - this.duration = !isNaN(f.set_cookie_duration) ? parseInt(f.set_cookie_duration, 10) : 100000; - - this.tf = tf; - } - - _createClass(Store, [{ - key: 'saveFilterValues', - - /** - * Store filters' values in cookie - * @param {String} cookie name - */ - value: function saveFilterValues(name) { - var tf = this.tf; - var fltValues = []; - //store filters' values - for (var i = 0; i < tf.fltIds.length; i++) { - var value = tf.getFilterValue(i); - if (value === '') { - value = ' '; - } - fltValues.push(value); - } - //adds array size - fltValues.push(tf.fltIds.length); - - //writes cookie - _Cookie2['default'].write(name, fltValues.join(tf.separator), this.duration); - } - }, { - key: 'getFilterValues', - - /** - * Retrieve filters' values from cookie - * @param {String} cookie name - * @return {Array} - */ - value: function getFilterValues(name) { - var flts = _Cookie2['default'].read(name); - var rgx = new RegExp(this.tf.separator, 'g'); - // filters' values array - return flts.split(rgx); - } - }, { - key: 'savePageNb', - - /** - * Store page number in cookie - * @param {String} cookie name - */ - value: function savePageNb(name) { - _Cookie2['default'].write(name, this.tf.feature('paging').currentPageNb, this.duration); - } - }, { - key: 'getPageNb', - - /** - * Retrieve page number from cookie - * @param {String} cookie name - * @return {String} - */ - value: function getPageNb(name) { - return _Cookie2['default'].read(name); - } - }, { - key: 'savePageLength', - - /** - * Store page length in cookie - * @param {String} cookie name - */ - value: function savePageLength(name) { - _Cookie2['default'].write(name, this.tf.feature('paging').resultsPerPageSlc.selectedIndex, this.duration); - } - }, { - key: 'getPageLength', - - /** - * Retrieve page length from cookie - * @param {String} cookie name - * @return {String} - */ - value: function getPageLength(name) { - return _Cookie2['default'].read(name); - } - }]); - - return Store; - })(); - - exports.Store = Store; - -/***/ }, -/* 11 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - - Object.defineProperty(exports, '__esModule', { - value: true - }); - - var _Dom = __webpack_require__(3); - - var _Dom2 = _interopRequireDefault(_Dom); - - var _Types = __webpack_require__(6); - - var _Types2 = _interopRequireDefault(_Types); - - var _Event = __webpack_require__(2); - - var _Event2 = _interopRequireDefault(_Event); - - var GridLayout = (function () { - - /** - * Grid layout, table with fixed headers - * @param {Object} tf TableFilter instance - */ - - function GridLayout(tf) { - _classCallCheck(this, GridLayout); - - var f = tf.config(); - - //defines grid width - this.gridWidth = f.grid_width || null; - //defines grid height - this.gridHeight = f.grid_height || null; - //defines css class for main container - this.gridMainContCssClass = f.grid_cont_css_class || 'grd_Cont'; - //defines css class for div containing table - this.gridContCssClass = f.grid_tbl_cont_css_class || 'grd_tblCont'; - //defines css class for div containing headers' table - this.gridHeadContCssClass = f.grid_tblHead_cont_css_class || 'grd_headTblCont'; - //defines css class for div containing rows counter, paging etc. - this.gridInfDivCssClass = f.grid_inf_grid_css_class || 'grd_inf'; - //defines which row contains column headers - this.gridHeadRowIndex = f.grid_headers_row_index || 0; - //array of headers row indexes to be placed in header table - this.gridHeadRows = f.grid_headers_rows || [0]; - //generate filters in table headers - this.gridEnableFilters = f.grid_enable_default_filters !== undefined ? f.grid_enable_default_filters : true; - //default col width - this.gridDefaultColWidth = f.grid_default_col_width || '100px'; - //enables/disables columns resizer - // this.gridEnableColResizer = f.grid_enable_cols_resizer!==undefined ? - // f.grid_enable_cols_resizer : false; - // //defines col resizer script path - // this.gridColResizerPath = f.grid_cont_col_resizer_path || - // this.basePath+'TFExt_ColsResizer/TFExt_ColsResizer.js'; - - this.gridColElms = []; - - //div containing grid elements if grid_layout true - this.prfxMainTblCont = 'gridCont_'; - //div containing table if grid_layout true - this.prfxTblCont = 'tblCont_'; - //div containing headers table if grid_layout true - this.prfxHeadTblCont = 'tblHeadCont_'; - //headers' table if grid_layout true - this.prfxHeadTbl = 'tblHead_'; - //id of td containing the filter if grid_layout true - this.prfxGridFltTd = '_td_'; - //id of th containing column header if grid_layout true - this.prfxGridTh = 'tblHeadTh_'; - - this.tf = tf; - } - - _createClass(GridLayout, [{ - key: 'init', - - /** - * Generates a grid with fixed headers - */ - value: function init() { - var _this = this; - - var tf = this.tf; - var f = tf.config(); - var tbl = tf.tbl; - - if (!tf.gridLayout) { - return; - } - - tf.isExternalFlt = true; - - // default width of 100px if column widths not set - if (!tf.hasColWidths) { - tf.colWidths = []; - for (var k = 0; k < tf.nbCells; k++) { - var colW, - cell = tbl.rows[this.gridHeadRowIndex].cells[k]; - if (cell.width !== '') { - colW = cell.width; - } else if (cell.style.width !== '') { - colW = parseInt(cell.style.width, 10); - } else { - colW = this.gridDefaultColWidth; - } - tf.colWidths[k] = colW; - } - tf.hasColWidths = true; - } - tf.setColWidths(this.gridHeadRowIndex); - - var tblW; //initial table width - if (tbl.width !== '') { - tblW = tbl.width; - } else if (tbl.style.width !== '') { - tblW = parseInt(tbl.style.width, 10); - } else { - tblW = tbl.clientWidth; - } - - //Main container: it will contain all the elements - this.tblMainCont = _Dom2['default'].create('div', ['id', this.prfxMainTblCont + tf.id]); - this.tblMainCont.className = this.gridMainContCssClass; - if (this.gridWidth) { - this.tblMainCont.style.width = this.gridWidth; - } - tbl.parentNode.insertBefore(this.tblMainCont, tbl); - - //Table container: div wrapping content table - this.tblCont = _Dom2['default'].create('div', ['id', this.prfxTblCont + tf.id]); - this.tblCont.className = this.gridContCssClass; - if (this.gridWidth) { - if (this.gridWidth.indexOf('%') != -1) { - console.log(this.gridWidth); - this.tblCont.style.width = '100%'; - } else { - this.tblCont.style.width = this.gridWidth; - } - } - if (this.gridHeight) { - this.tblCont.style.height = this.gridHeight; - } - tbl.parentNode.insertBefore(this.tblCont, tbl); - var t = tbl.parentNode.removeChild(tbl); - this.tblCont.appendChild(t); - - //In case table width is expressed in % - if (tbl.style.width === '') { - tbl.style.width = (tf._containsStr('%', tblW) ? tbl.clientWidth : tblW) + 'px'; - } - - var d = this.tblCont.parentNode.removeChild(this.tblCont); - this.tblMainCont.appendChild(d); - - //Headers table container: div wrapping headers table - this.headTblCont = _Dom2['default'].create('div', ['id', this.prfxHeadTblCont + tf.id]); - this.headTblCont.className = this.gridHeadContCssClass; - if (this.gridWidth) { - if (this.gridWidth.indexOf('%') != -1) { - console.log(this.gridWidth); - this.headTblCont.style.width = '100%'; - } else { - this.headTblCont.style.width = this.gridWidth; - } - } - - //Headers table - this.headTbl = _Dom2['default'].create('table', ['id', this.prfxHeadTbl + tf.id]); - var tH = _Dom2['default'].create('tHead'); //IE<7 needs it - - //1st row should be headers row, ids are added if not set - //Those ids are used by the sort feature - var hRow = tbl.rows[this.gridHeadRowIndex]; - var sortTriggers = []; - for (var n = 0; n < tf.nbCells; n++) { - var c = hRow.cells[n]; - var thId = c.getAttribute('id'); - if (!thId || thId === '') { - thId = this.prfxGridTh + n + '_' + tf.id; - c.setAttribute('id', thId); - } - sortTriggers.push(thId); - } - - //Filters row is created - var filtersRow = _Dom2['default'].create('tr'); - if (this.gridEnableFilters && tf.fltGrid) { - tf.externalFltTgtIds = []; - for (var j = 0; j < tf.nbCells; j++) { - var fltTdId = tf.prfxFlt + j + this.prfxGridFltTd + tf.id; - var cl = _Dom2['default'].create(tf.fltCellTag, ['id', fltTdId]); - filtersRow.appendChild(cl); - tf.externalFltTgtIds[j] = fltTdId; - } - } - //Headers row are moved from content table to headers table - for (var i = 0; i < this.gridHeadRows.length; i++) { - var headRow = tbl.rows[this.gridHeadRows[0]]; - tH.appendChild(headRow); - } - this.headTbl.appendChild(tH); - if (tf.filtersRowIndex === 0) { - tH.insertBefore(filtersRow, hRow); - } else { - tH.appendChild(filtersRow); - } - - this.headTblCont.appendChild(this.headTbl); - this.tblCont.parentNode.insertBefore(this.headTblCont, this.tblCont); - - //THead needs to be removed in content table for sort feature - var thead = _Dom2['default'].tag(tbl, 'thead'); - if (thead.length > 0) { - tbl.removeChild(thead[0]); - } - - //Headers table style - this.headTbl.style.tableLayout = 'fixed'; - tbl.style.tableLayout = 'fixed'; - this.headTbl.cellPadding = tbl.cellPadding; - this.headTbl.cellSpacing = tbl.cellSpacing; - // this.headTbl.style.width = tbl.style.width; - - //content table without headers needs col widths to be reset - tf.setColWidths(0, this.headTbl); - - //Headers container width - // this.headTblCont.style.width = this.tblCont.clientWidth+'px'; - - tbl.style.width = ''; - // - this.headTbl.style.width = tbl.clientWidth + 'px'; - // - - //scroll synchronisation - _Event2['default'].add(this.tblCont, 'scroll', function (evt) { - var elm = _Event2['default'].target(evt); - var scrollLeft = elm.scrollLeft; - _this.headTblCont.scrollLeft = scrollLeft; - //New pointerX calc taking into account scrollLeft - // if(!o.isPointerXOverwritten){ - // try{ - // o.Evt.pointerX = function(evt){ - // var e = evt || global.event; - // var bdScrollLeft = tf_StandardBody().scrollLeft + - // scrollLeft; - // return (e.pageX + scrollLeft) || - // (e.clientX + bdScrollLeft); - // }; - // o.isPointerXOverwritten = true; - // } catch(err) { - // o.isPointerXOverwritten = false; - // } - // } - }); - - //Configure sort extension if any - var sort = (f.extensions || []).filter(function (itm) { - return itm.name === 'sort'; - }); - if (sort.length === 1) { - sort[0].async_sort = true; - sort[0].trigger_ids = sortTriggers; - } - - // if(this.gridEnableColResizer){ - // if(!tf.hasExtensions){ - // tf.extensions = { - // name:['ColumnsResizer_'+tf.id], - // src:[this.gridColResizerPath], - // description:['Columns Resizing'], - // initialize:[function(o){ - // o.SetColsResizer('ColumnsResizer_'+o.id);}] - // }; - // tf.hasExtensions = true; - // } else { - // if(!tf._containsStr( - // 'colsresizer', - // Str.lower(tf.extensions.src.toString())) ){ - // tf.extensions.name.push('ColumnsResizer_'+tf.id); - // tf.extensions.src.push(tf.gridColResizerPath); - // tf.extensions.description.push('Columns Resizing'); - // tf.extensions.initialize.push(function(o){ - // o.SetColsResizer('ColumnsResizer_'+o.id);}); - // } - // } - // } - - //Default columns resizer properties for grid layout - // f.col_resizer_cols_headers_table = this.headTbl.getAttribute('id'); - // f.col_resizer_cols_headers_index = this.gridHeadRowIndex; - // f.col_resizer_width_adjustment = 0; - // f.col_enable_text_ellipsis = false; - - //Cols generation for all browsers excepted IE<=7 - this.tblHasColTag = _Dom2['default'].tag(tbl, 'col').length > 0 ? true : false; - - //Col elements are enough to keep column widths after sorting and - //filtering - var createColTags = function createColTags() { - for (var k = tf.nbCells - 1; k >= 0; k--) { - var col = _Dom2['default'].create('col', ['id', tf.id + '_col_' + k]); - tbl.insertBefore(col, tbl.firstChild); - col.style.width = tf.colWidths[k]; - this.gridColElms[k] = col; - } - this.tblHasColTag = true; - }; - - if (!this.tblHasColTag) { - createColTags.call(this); - } else { - var cols = _Dom2['default'].tag(tbl, 'col'); - for (var ii = 0; ii < tf.nbCells; ii++) { - cols[ii].setAttribute('id', tf.id + '_col_' + ii); - cols[ii].style.width = tf.colWidths[ii]; - this.gridColElms.push(cols[ii]); - } - } - - var afterColResizedFn = _Types2['default'].isFn(f.on_after_col_resized) ? f.on_after_col_resized : null; - f.on_after_col_resized = function (o, colIndex) { - if (!colIndex) { - return; - } - var w = o.crWColsRow.cells[colIndex].style.width; - var col = o.gridColElms[colIndex]; - col.style.width = w; - - var thCW = o.crWColsRow.cells[colIndex].clientWidth; - var tdCW = o.crWRowDataTbl.cells[colIndex].clientWidth; - - if (thCW != tdCW) { - o.headTbl.style.width = tbl.clientWidth + 'px'; - } - - if (afterColResizedFn) { - afterColResizedFn.call(null, o, colIndex); - } - }; - - if (tbl.clientWidth !== this.headTbl.clientWidth) { - tbl.style.width = this.headTbl.clientWidth + 'px'; - } - } - }, { - key: 'destroy', - - /** - * Removes the grid layout - */ - value: function destroy() { - var tf = this.tf; - var tbl = tf.tbl; - - if (!tf.gridLayout) { - return; - } - var t = tbl.parentNode.removeChild(tbl); - this.tblMainCont.parentNode.insertBefore(t, this.tblMainCont); - this.tblMainCont.parentNode.removeChild(this.tblMainCont); - - this.tblMainCont = null; - this.headTblCont = null; - this.headTbl = null; - this.tblCont = null; - - tbl.outerHTML = tf.sourceTblHtml; - //needed to keep reference of table element - tbl = _Dom2['default'].id(tf.id); - } - }]); - - return GridLayout; - })(); - - exports.GridLayout = GridLayout; - -/***/ }, -/* 12 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - - Object.defineProperty(exports, '__esModule', { - value: true - }); - - var _Dom = __webpack_require__(3); - - var _Dom2 = _interopRequireDefault(_Dom); - - var _Types = __webpack_require__(6); - - var _Types2 = _interopRequireDefault(_Types); - - var global = window; - - var Loader = (function () { - - /** - * Loading message/spinner - * @param {Object} tf TableFilter instance - */ - - function Loader(tf) { - _classCallCheck(this, Loader); - - // TableFilter configuration - var f = tf.config(); - //id of container element - this.loaderTgtId = f.loader_target_id || null; - //div containing loader - this.loaderDiv = null; - //defines loader text - this.loaderText = f.loader_text || 'Loading...'; - //defines loader innerHtml - this.loaderHtml = f.loader_html || null; - //defines css class for loader div - this.loaderCssClass = f.loader_css_class || 'loader'; - //delay for hiding loader - this.loaderCloseDelay = 200; - //callback function before loader is displayed - this.onShowLoader = _Types2['default'].isFn(f.on_show_loader) ? f.on_show_loader : null; - //callback function after loader is closed - this.onHideLoader = _Types2['default'].isFn(f.on_hide_loader) ? f.on_hide_loader : null; - //loader div - this.prfxLoader = 'load_'; - - this.tf = tf; - - var containerDiv = _Dom2['default'].create('div', ['id', this.prfxLoader + tf.id]); - containerDiv.className = this.loaderCssClass; - - var targetEl = !this.loaderTgtId ? tf.tbl.parentNode : _Dom2['default'].id(this.loaderTgtId); - if (!this.loaderTgtId) { - targetEl.insertBefore(containerDiv, tf.tbl); - } else { - targetEl.appendChild(containerDiv); - } - this.loaderDiv = _Dom2['default'].id(this.prfxLoader + tf.id); - if (!this.loaderHtml) { - this.loaderDiv.appendChild(_Dom2['default'].text(this.loaderText)); - } else { - this.loaderDiv.innerHTML = this.loaderHtml; - } - } - - _createClass(Loader, [{ - key: 'show', - value: function show(p) { - var _this = this; - - if (!this.tf.loader || !this.loaderDiv || this.loaderDiv.style.display === p) { - return; - } - - var displayLoader = function displayLoader() { - if (!_this.loaderDiv) { - return; - } - if (_this.onShowLoader && p !== 'none') { - _this.onShowLoader.call(null, _this); - } - _this.loaderDiv.style.display = p; - if (_this.onHideLoader && p === 'none') { - _this.onHideLoader.call(null, _this); - } - }; - - var t = p === 'none' ? this.loaderCloseDelay : 1; - global.setTimeout(displayLoader, t); - } - }, { - key: 'destroy', - value: function destroy() { - if (!this.loaderDiv) { - return; - } - var tf = this.tf, - targetEl = !this.loaderTgtId ? tf.gridLayout ? tf.feature('gridLayout').tblCont : tf.tbl.parentNode : _Dom2['default'].id(this.loaderTgtId); - targetEl.removeChild(this.loaderDiv); - this.loaderDiv = null; - } - }]); - - return Loader; - })(); - - exports.Loader = Loader; - -/***/ }, -/* 13 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - - Object.defineProperty(exports, '__esModule', { - value: true - }); - - var _Dom = __webpack_require__(3); - - var _Dom2 = _interopRequireDefault(_Dom); - - var _Str = __webpack_require__(4); - - var _Str2 = _interopRequireDefault(_Str); - - var HighlightKeyword = (function () { - - /** - * HighlightKeyword, highlight matched keyword - * @param {Object} tf TableFilter instance - */ - - function HighlightKeyword(tf) { - _classCallCheck(this, HighlightKeyword); - - var f = tf.config(); - //defines css class for highlighting - this.highlightCssClass = f.highlight_css_class || 'keyword'; - this.highlightedNodes = []; - - this.tf = tf; - } - - _createClass(HighlightKeyword, [{ - key: 'highlight', - - /** - * highlight occurences of searched term in passed node - * @param {Node} node - * @param {String} word Searched term - * @param {String} cssClass Css class name - */ - value: function highlight(node, word, cssClass) { - // Iterate into this nodes childNodes - if (node.hasChildNodes) { - var children = node.childNodes; - for (var i = 0; i < children.length; i++) { - this.highlight(children[i], word, cssClass); - } - } - - if (node.nodeType === 3) { - var tempNodeVal = _Str2['default'].lower(node.nodeValue); - var tempWordVal = _Str2['default'].lower(word); - if (tempNodeVal.indexOf(tempWordVal) != -1) { - var pn = node.parentNode; - if (pn && pn.className != cssClass) { - // word not highlighted yet - var nv = node.nodeValue, - ni = tempNodeVal.indexOf(tempWordVal), - - // Create a load of replacement nodes - before = _Dom2['default'].text(nv.substr(0, ni)), - docWordVal = nv.substr(ni, word.length), - after = _Dom2['default'].text(nv.substr(ni + word.length)), - hiwordtext = _Dom2['default'].text(docWordVal), - hiword = _Dom2['default'].create('span'); - hiword.className = cssClass; - hiword.appendChild(hiwordtext); - pn.insertBefore(before, node); - pn.insertBefore(hiword, node); - pn.insertBefore(after, node); - pn.removeChild(node); - this.highlightedNodes.push(hiword.firstChild); - } - } - } - } - }, { - key: 'unhighlight', - - /** - * Removes highlight to nodes matching passed string - * @param {String} word - * @param {String} cssClass Css class to remove - */ - value: function unhighlight(word, cssClass) { - var arrRemove = []; - var highlightedNodes = this.highlightedNodes; - for (var i = 0; i < highlightedNodes.length; i++) { - var n = highlightedNodes[i]; - if (!n) { - continue; - } - var tempNodeVal = _Str2['default'].lower(n.nodeValue), - tempWordVal = _Str2['default'].lower(word); - if (tempNodeVal.indexOf(tempWordVal) !== -1) { - var pn = n.parentNode; - if (pn && pn.className === cssClass) { - var prevSib = pn.previousSibling, - nextSib = pn.nextSibling; - if (!prevSib || !nextSib) { - continue; - } - nextSib.nodeValue = prevSib.nodeValue + n.nodeValue + nextSib.nodeValue; - prevSib.nodeValue = ''; - n.nodeValue = ''; - arrRemove.push(i); - } - } - } - for (var k = 0; k < arrRemove.length; k++) { - highlightedNodes.splice(arrRemove[k], 1); - } - } - }, { - key: 'unhighlightAll', - - /** - * Clear all occurrences of highlighted nodes - */ - value: function unhighlightAll() { - if (!this.tf.highlightKeywords || !this.tf.searchArgs) { - return; - } - for (var y = 0; y < this.tf.searchArgs.length; y++) { - this.unhighlight(this.tf.searchArgs[y], this.highlightCssClass); - } - this.highlightedNodes = []; - } - }]); - - return HighlightKeyword; - })(); - - exports.HighlightKeyword = HighlightKeyword; - -/***/ }, -/* 14 */ -/***/ function(module, exports, __webpack_require__) { - - /* WEBPACK VAR INJECTION */(function(global) {'use strict'; - - var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - - Object.defineProperty(exports, '__esModule', { - value: true - }); - - var _Types = __webpack_require__(6); - - var _Types2 = _interopRequireDefault(_Types); - - var _Dom = __webpack_require__(3); - - var _Dom2 = _interopRequireDefault(_Dom); - - var _Event = __webpack_require__(2); - - var _Event2 = _interopRequireDefault(_Event); - - var PopupFilter = (function () { - - /** - * Pop-up filter component - * @param {Object} tf TableFilter instance - */ - - function PopupFilter(tf) { - _classCallCheck(this, PopupFilter); - - // Configuration object - var f = tf.config(); - - // Enable external filters behaviour - tf.isExternalFlt = true; - tf.externalFltTgtIds = []; - - //filter icon path - this.popUpImgFlt = f.popup_filters_image || tf.themesPath + 'icn_filter.gif'; - //active filter icon path - this.popUpImgFltActive = f.popup_filters_image_active || tf.themesPath + 'icn_filterActive.gif'; - this.popUpImgFltHtml = f.popup_filters_image_html || 'Column filter'; - //defines css class for popup div containing filter - this.popUpDivCssClass = f.popup_div_css_class || 'popUpFilter'; - //callback function before popup filtes is opened - this.onBeforePopUpOpen = _Types2['default'].isFn(f.on_before_popup_filter_open) ? f.on_before_popup_filter_open : null; - //callback function after popup filtes is opened - this.onAfterPopUpOpen = _Types2['default'].isFn(f.on_after_popup_filter_open) ? f.on_after_popup_filter_open : null; - //callback function before popup filtes is closed - this.onBeforePopUpClose = _Types2['default'].isFn(f.on_before_popup_filter_close) ? f.on_before_popup_filter_close : null; - //callback function after popup filtes is closed - this.onAfterPopUpClose = _Types2['default'].isFn(f.on_after_popup_filter_close) ? f.on_after_popup_filter_close : null; - - //stores filters spans - this.popUpFltSpans = []; - //stores filters icons - this.popUpFltImgs = []; - //stores filters containers - this.popUpFltElms = this.popUpFltElmCache || []; - this.popUpFltAdjustToContainer = true; - - //id prefix for pop-up filter span - this.prfxPopUpSpan = 'popUpSpan_'; - //id prefix for pop-up div containing filter - this.prfxPopUpDiv = 'popUpDiv_'; - - this.tf = tf; - } - - _createClass(PopupFilter, [{ - key: 'onClick', - value: function onClick(e) { - var evt = e || global.event, - elm = evt.target.parentNode, - colIndex = parseInt(elm.getAttribute('ci'), 10); - - this.closeAll(colIndex); - this.toggle(colIndex); - - if (this.popUpFltAdjustToContainer) { - var popUpDiv = this.popUpFltElms[colIndex], - header = this.tf.getHeaderElement(colIndex), - headerWidth = header.clientWidth * 0.95; - popUpDiv.style.width = parseInt(headerWidth, 10) + 'px'; - } - _Event2['default'].cancel(evt); - _Event2['default'].stop(evt); - } - }, { - key: 'init', - - /** - * Initialize DOM elements - */ - value: function init() { - var _this = this; - - var tf = this.tf; - for (var i = 0; i < tf.nbCells; i++) { - if (tf['col' + i] === tf.fltTypeNone) { - continue; - } - var popUpSpan = _Dom2['default'].create('span', ['id', this.prfxPopUpSpan + tf.id + '_' + i], ['ci', i]); - popUpSpan.innerHTML = this.popUpImgFltHtml; - var header = tf.getHeaderElement(i); - header.appendChild(popUpSpan); - _Event2['default'].add(popUpSpan, 'click', function (evt) { - _this.onClick(evt); - }); - this.popUpFltSpans[i] = popUpSpan; - this.popUpFltImgs[i] = popUpSpan.firstChild; - } - } - }, { - key: 'buildAll', - - /** - * Build all pop-up filters elements - */ - value: function buildAll() { - for (var i = 0; i < this.popUpFltElmCache.length; i++) { - this.build(i, this.popUpFltElmCache[i]); - } - } - }, { - key: 'build', - - /** - * Build a specified pop-up filter elements - * @param {Number} colIndex Column index - * @param {Object} div Optional container DOM element - */ - value: function build(colIndex, div) { - var tf = this.tf; - var popUpDiv = !div ? _Dom2['default'].create('div', ['id', this.prfxPopUpDiv + tf.id + '_' + colIndex]) : div; - popUpDiv.className = this.popUpDivCssClass; - tf.externalFltTgtIds.push(popUpDiv.id); - var header = tf.getHeaderElement(colIndex); - header.insertBefore(popUpDiv, header.firstChild); - _Event2['default'].add(popUpDiv, 'click', function (evt) { - _Event2['default'].stop(evt); - }); - this.popUpFltElms[colIndex] = popUpDiv; - } - }, { - key: 'toggle', - - /** - * Toogle visibility of specified filter - * @param {Number} colIndex Column index - */ - value: function toggle(colIndex) { - var tf = this.tf, - popUpFltElm = this.popUpFltElms[colIndex]; - - if (popUpFltElm.style.display === 'none' || popUpFltElm.style.display === '') { - if (this.onBeforePopUpOpen) { - this.onBeforePopUpOpen.call(null, this, this.popUpFltElms[colIndex], colIndex); - } - popUpFltElm.style.display = 'block'; - if (tf['col' + colIndex] === tf.fltTypeInp) { - var flt = tf.getFilterElement(colIndex); - if (flt) { - flt.focus(); - } - } - if (this.onAfterPopUpOpen) { - this.onAfterPopUpOpen.call(null, this, this.popUpFltElms[colIndex], colIndex); - } - } else { - if (this.onBeforePopUpClose) { - this.onBeforePopUpClose.call(null, this, this.popUpFltElms[colIndex], colIndex); - } - popUpFltElm.style.display = 'none'; - if (this.onAfterPopUpClose) { - this.onAfterPopUpClose.call(null, this, this.popUpFltElms[colIndex], colIndex); - } - } - } - }, { - key: 'closeAll', - - /** - * Close all filters excepted for the specified one if any - * @param {Number} exceptIdx Column index of the filter to not close - */ - value: function closeAll(exceptIdx) { - for (var i = 0; i < this.popUpFltElms.length; i++) { - if (i === exceptIdx) { - continue; - } - var popUpFltElm = this.popUpFltElms[i]; - if (popUpFltElm) { - popUpFltElm.style.display = 'none'; - } - } - } - }, { - key: 'buildIcons', - - /** - * Build all the icons representing the pop-up filters - */ - value: function buildIcons() { - for (var i = 0; i < this.popUpFltImgs.length; i++) { - this.buildIcon(i, false); - } - } - }, { - key: 'buildIcon', - - /** - * Build specified icon - * @param {Number} colIndex Column index - * @param {Boolean} active Apply active state - */ - value: function buildIcon(colIndex, active) { - if (this.popUpFltImgs[colIndex]) { - this.popUpFltImgs[colIndex].src = active ? this.popUpImgFltActive : this.popUpImgFlt; - } - } - }, { - key: 'destroy', - - /** - * Remove pop-up filters - */ - value: function destroy() { - this.popUpFltElmCache = []; - for (var i = 0; i < this.popUpFltElms.length; i++) { - var popUpFltElm = this.popUpFltElms[i], - popUpFltSpan = this.popUpFltSpans[i], - popUpFltImg = this.popUpFltImgs[i]; - if (popUpFltElm) { - popUpFltElm.parentNode.removeChild(popUpFltElm); - this.popUpFltElmCache[i] = popUpFltElm; - } - popUpFltElm = null; - if (popUpFltSpan) { - popUpFltSpan.parentNode.removeChild(popUpFltSpan); - } - popUpFltSpan = null; - if (popUpFltImg) { - popUpFltImg.parentNode.removeChild(popUpFltImg); - } - popUpFltImg = null; - } - this.popUpFltElms = []; - this.popUpFltSpans = []; - this.popUpFltImgs = []; - } - }]); - - return PopupFilter; - })(); - - exports.PopupFilter = PopupFilter; - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) - -/***/ }, -/* 15 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - - Object.defineProperty(exports, '__esModule', { - value: true - }); - - var _Dom = __webpack_require__(3); - - var _Dom2 = _interopRequireDefault(_Dom); - - var _Arr = __webpack_require__(7); - - var _Arr2 = _interopRequireDefault(_Arr); - - var _Str = __webpack_require__(4); - - var _Str2 = _interopRequireDefault(_Str); - - var _Sort = __webpack_require__(23); - - var _Sort2 = _interopRequireDefault(_Sort); - - var Dropdown = (function () { - - /** - * Dropdown UI component - * @param {Object} tf TableFilter instance - */ - - function Dropdown(tf) { - _classCallCheck(this, Dropdown); - - // Configuration object - var f = tf.config(); - - this.enableSlcResetFilter = f.enable_slc_reset_filter === false ? false : true; - //defines empty option text - this.nonEmptyText = f.non_empty_text || '(Non empty)'; - //sets select filling method: 'innerHTML' or 'createElement' - this.slcFillingMethod = f.slc_filling_method || 'createElement'; - //IE only, tooltip text appearing on select before it is populated - this.activateSlcTooltip = f.activate_slc_tooltip || 'Click to activate'; - //tooltip text appearing on multiple select - this.multipleSlcTooltip = f.multiple_slc_tooltip || 'Use Ctrl key for multiple selections'; - - this.isCustom = null; - this.opts = null; - this.optsTxt = null; - this.slcInnerHtml = null; - - this.tf = tf; - } - - _createClass(Dropdown, [{ - key: 'build', - - /** - * Build drop-down filter UI asynchronously - * @param {Number} colIndex Column index - * @param {Boolean} isLinked Enable linked refresh behaviour - * @param {Boolean} isExternal Render in external container - * @param {String} extSlcId External container id - */ - value: function build(colIndex, isLinked, isExternal, extSlcId) { - var tf = this.tf; - tf.EvtManager(tf.Evt.name.dropdown, { - slcIndex: colIndex, - slcRefreshed: isLinked, - slcExternal: isExternal, - slcId: extSlcId - }); - } - }, { - key: '_build', - - /** - * Build drop-down filter UI - * @param {Number} colIndex Column index - * @param {Boolean} isLinked Enable linked refresh behaviour - * @param {Boolean} isExternal Render in external container - * @param {String} extSlcId External container id - */ - value: function _build(colIndex) { - var isLinked = arguments[1] === undefined ? false : arguments[1]; - var isExternal = arguments[2] === undefined ? false : arguments[2]; - var extSlcId = arguments[3] === undefined ? null : arguments[3]; - - var tf = this.tf; - colIndex = parseInt(colIndex, 10); - - this.opts = []; - this.optsTxt = []; - this.slcInnerHtml = ''; - - var slcId = tf.fltIds[colIndex]; - if (!_Dom2['default'].id(slcId) && !isExternal || !_Dom2['default'].id(extSlcId) && isExternal) { - return; - } - var slc = !isExternal ? _Dom2['default'].id(slcId) : _Dom2['default'].id(extSlcId), - rows = tf.tbl.rows, - matchCase = tf.matchCase; - - //custom select test - this.isCustom = tf.isCustomOptions(colIndex); - - //custom selects text - var activeFlt; - if (isLinked && tf.activeFilterId) { - activeFlt = tf.activeFilterId.split('_')[0]; - activeFlt = activeFlt.split(tf.prfxFlt)[1]; - } - - /*** remember grid values ***/ - var fltsValues = [], - fltArr = []; - if (tf.rememberGridValues) { - fltsValues = tf.feature('store').getFilterValues(tf.fltsValuesCookie); - if (fltsValues && !_Str2['default'].isEmpty(fltsValues.toString())) { - if (this.isCustom) { - fltArr.push(fltsValues[colIndex]); - } else { - fltArr = fltsValues[colIndex].split(' ' + tf.orOperator + ' '); - } - } - } - - var excludedOpts = null, - filteredDataCol = null; - if (isLinked && tf.disableExcludedOptions) { - excludedOpts = []; - filteredDataCol = []; - } - - for (var k = tf.refRow; k < tf.nbRows; k++) { - // always visible rows don't need to appear on selects as always - // valid - if (tf.hasVisibleRows && tf.visibleRows.indexOf(k) !== -1) { - continue; - } - - var cell = rows[k].cells, - nchilds = cell.length; - - // checks if row has exact cell # - if (nchilds !== tf.nbCells || this.isCustom) { - continue; - } - - // this loop retrieves cell data - for (var j = 0; j < nchilds; j++) { - // WTF: cyclomatic complexity hell - if (colIndex === j && (!isLinked || isLinked && tf.disableExcludedOptions) || colIndex == j && isLinked && (rows[k].style.display === '' && !tf.paging || tf.paging && (!tf.validRowsIndex || tf.validRowsIndex && _Arr2['default'].has(tf.validRowsIndex, k)) && (activeFlt === undefined || activeFlt == colIndex || activeFlt != colIndex && _Arr2['default'].has(tf.validRowsIndex, k)))) { - var cell_data = tf.getCellData(j, cell[j]), - - //Vary Peter's patch - cell_string = _Str2['default'].matchCase(cell_data, matchCase); - - // checks if celldata is already in array - if (!_Arr2['default'].has(this.opts, cell_string, matchCase)) { - this.opts.push(cell_data); - } - - if (isLinked && tf.disableExcludedOptions) { - var filteredCol = filteredDataCol[j]; - if (!filteredCol) { - filteredCol = tf.getFilteredDataCol(j); - } - if (!_Arr2['default'].has(filteredCol, cell_string, matchCase) && !_Arr2['default'].has(excludedOpts, cell_string, matchCase) && !this.isFirstLoad) { - excludedOpts.push(cell_data); - } - } - } //if colIndex==j - } //for j - } //for k - - //Retrieves custom values - if (this.isCustom) { - var customValues = tf.getCustomOptions(colIndex); - this.opts = customValues[0]; - this.optsTxt = customValues[1]; - } - - if (tf.sortSlc && !this.isCustom) { - if (!matchCase) { - this.opts.sort(_Sort2['default'].ignoreCase); - if (excludedOpts) { - excludedOpts.sort(_Sort2['default'].ignoreCase); - } - } else { - this.opts.sort(); - if (excludedOpts) { - excludedOpts.sort(); - } - } - } - - //asc sort - if (tf.sortNumAsc && _Arr2['default'].has(tf.sortNumAsc, colIndex)) { - try { - this.opts.sort(numSortAsc); - if (excludedOpts) { - excludedOpts.sort(numSortAsc); - } - if (this.isCustom) { - this.optsTxt.sort(numSortAsc); - } - } catch (e) { - this.opts.sort(); - if (excludedOpts) { - excludedOpts.sort(); - } - if (this.isCustom) { - this.optsTxt.sort(); - } - } //in case there are alphanumeric values - } - //desc sort - if (tf.sortNumDesc && _Arr2['default'].has(tf.sortNumDesc, colIndex)) { - try { - this.opts.sort(numSortDesc); - if (excludedOpts) { - excludedOpts.sort(numSortDesc); - } - if (this.isCustom) { - this.optsTxt.sort(numSortDesc); - } - } catch (e) { - this.opts.sort(); - if (excludedOpts) { - excludedOpts.sort(); - } - if (this.isCustom) { - this.optsTxt.sort(); - } - } //in case there are alphanumeric values - } - - //populates drop-down - this.addOptions(colIndex, slc, isLinked, excludedOpts, fltsValues, fltArr); - } - }, { - key: 'addOptions', - - /** - * Add drop-down options - * @param {Number} colIndex Column index - * @param {Object} slc Select Dom element - * @param {Boolean} isLinked Enable linked refresh behaviour - * @param {Array} excludedOpts Array of excluded options - * @param {Array} fltsValues Collection of persisted filter values - * @param {Array} fltArr Collection of persisted filter values - */ - value: function addOptions(colIndex, slc, isLinked, excludedOpts, fltsValues, fltArr) { - var tf = this.tf, - fillMethod = _Str2['default'].lower(this.slcFillingMethod), - slcValue = slc.value; - - slc.innerHTML = ''; - slc = this.addFirstOption(slc); - - for (var y = 0; y < this.opts.length; y++) { - if (this.opts[y] === '') { - continue; - } - var val = this.opts[y]; //option value - var lbl = this.isCustom ? this.optsTxt[y] : val; //option text - var isDisabled = false; - if (isLinked && tf.disableExcludedOptions && _Arr2['default'].has(excludedOpts, _Str2['default'].matchCase(val, tf.matchCase), tf.matchCase)) { - isDisabled = true; - } - - if (fillMethod === 'innerhtml') { - var slcAttr = ''; - if (tf.fillSlcOnDemand && slcValue === this.opts[y]) { - slcAttr = 'selected="selected"'; - } - this.slcInnerHtml += ''; - } else { - var opt; - //fill select on demand - if (tf.fillSlcOnDemand && slcValue === this.opts[y] && tf['col' + colIndex] === tf.fltTypeSlc) { - opt = _Dom2['default'].createOpt(lbl, val, true); - } else { - if (tf['col' + colIndex] !== tf.fltTypeMulti) { - opt = _Dom2['default'].createOpt(lbl, val, fltsValues[colIndex] !== ' ' && val === fltsValues[colIndex] ? true : false); - } else { - opt = _Dom2['default'].createOpt(lbl, val, _Arr2['default'].has(fltArr, _Str2['default'].matchCase(this.opts[y], tf.matchCase), tf.matchCase) || fltArr.toString().indexOf(val) !== -1 ? true : false); - } - } - if (isDisabled) { - opt.disabled = true; - } - slc.appendChild(opt); - } - } // for y - - if (fillMethod === 'innerhtml') { - slc.innerHTML += this.slcInnerHtml; - } - slc.setAttribute('filled', '1'); - } - }, { - key: 'addFirstOption', - - /** - * Add drop-down header option - * @param {Object} slc Select DOM element - */ - value: function addFirstOption(slc) { - var tf = this.tf, - fillMethod = _Str2['default'].lower(this.slcFillingMethod); - - if (fillMethod === 'innerhtml') { - this.slcInnerHtml += ''; - } else { - var opt0 = _Dom2['default'].createOpt(!this.enableSlcResetFilter ? '' : tf.displayAllText, ''); - if (!this.enableSlcResetFilter) { - opt0.style.display = 'none'; - } - slc.appendChild(opt0); - if (tf.enableEmptyOption) { - var opt1 = _Dom2['default'].createOpt(tf.emptyText, tf.emOperator); - slc.appendChild(opt1); - } - if (tf.enableNonEmptyOption) { - var opt2 = _Dom2['default'].createOpt(tf.nonEmptyText, tf.nmOperator); - slc.appendChild(opt2); - } - } - return slc; - } - }]); - - return Dropdown; - })(); - - exports.Dropdown = Dropdown; - -/***/ }, -/* 16 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - - Object.defineProperty(exports, '__esModule', { - value: true - }); - - var _Dom = __webpack_require__(3); - - var _Dom2 = _interopRequireDefault(_Dom); - - var _Arr = __webpack_require__(7); - - var _Arr2 = _interopRequireDefault(_Arr); - - var _Str = __webpack_require__(4); - - var _Str2 = _interopRequireDefault(_Str); - - var _Sort = __webpack_require__(23); - - var _Sort2 = _interopRequireDefault(_Sort); - - var _Event = __webpack_require__(2); - - var _Event2 = _interopRequireDefault(_Event); - - var CheckList = (function () { - - /** - * Checklist UI component - * @param {Object} tf TableFilter instance - */ - - function CheckList(tf) { - _classCallCheck(this, CheckList); - - // Configuration object - var f = tf.config(); - - this.checkListDiv = []; //checklist container div - //defines css class for div containing checklist filter - this.checkListDivCssClass = f.div_checklist_css_class || 'div_checklist'; - //defines css class for checklist filters - this.checkListCssClass = f.checklist_css_class || 'flt_checklist'; - //defines css class for checklist item (li) - this.checkListItemCssClass = f.checklist_item_css_class || 'flt_checklist_item'; - //defines css class for selected checklist item (li) - this.checkListSlcItemCssClass = f.checklist_selected_item_css_class || 'flt_checklist_slc_item'; - //Load on demand text - this.activateCheckListTxt = f.activate_checklist_text || 'Click to load filter data'; - //defines css class for checklist filters - this.checkListItemDisabledCssClass = f.checklist_item_disabled_css_class || 'flt_checklist_item_disabled'; - this.enableCheckListResetFilter = f.enable_checklist_reset_filter === false ? false : true; - //checklist filter container div - this.prfxCheckListDiv = 'chkdiv_'; - - this.isCustom = null; - this.opts = null; - this.optsTxt = null; - this.excludedOpts = null; - - this.tf = tf; - } - - _createClass(CheckList, [{ - key: 'onChange', - - // TODO: move event here - value: function onChange(evt) { - var elm = evt.target; - this.tf.activeFilterId = elm.getAttribute('id'); - this.tf.activeFlt = _Dom2['default'].id(this.tf.activeFilterId); - this.tf.Evt.onSlcChange.call(this.tf, evt); - } - }, { - key: 'optionClick', - value: function optionClick(evt) { - this.setCheckListValues(evt.target); - this.onChange(evt); - } - }, { - key: 'build', - - /** - * Build checklist UI asynchronously - * @param {Number} colIndex Column index - * @param {Boolean} isExternal Render in external container - * @param {String} extFltId External container id - */ - value: function build(colIndex, isExternal, extFltId) { - var tf = this.tf; - tf.EvtManager(tf.Evt.name.checklist, { slcIndex: colIndex, slcExternal: isExternal, slcId: extFltId }); - } - }, { - key: '_build', - - /** - * Build checklist UI - * @param {Number} colIndex Column index - * @param {Boolean} isExternal Render in external container - * @param {String} extFltId External container id - */ - value: function _build(colIndex) { - var _this = this; - - var isExternal = arguments[1] === undefined ? false : arguments[1]; - var extFltId = arguments[2] === undefined ? null : arguments[2]; - - var tf = this.tf; - colIndex = parseInt(colIndex, 10); - - this.opts = []; - this.optsTxt = []; - - var divFltId = this.prfxCheckListDiv + colIndex + '_' + tf.id; - if (!_Dom2['default'].id(divFltId) && !isExternal || !_Dom2['default'].id(extFltId) && isExternal) { - return; - } - - var flt = !isExternal ? this.checkListDiv[colIndex] : _Dom2['default'].id(extFltId); - var ul = _Dom2['default'].create('ul', ['id', tf.fltIds[colIndex]], ['colIndex', colIndex]); - ul.className = this.checkListCssClass; - _Event2['default'].add(ul, 'change', function (evt) { - _this.onChange(evt); - }); - - var rows = tf.tbl.rows; - this.isCustom = tf.isCustomOptions(colIndex); - - var activeFlt; - if (tf.linkedFilters && tf.activeFilterId) { - activeFlt = tf.activeFilterId.split('_')[0]; - activeFlt = activeFlt.split(tf.prfxFlt)[1]; - } - - var filteredDataCol = []; - if (tf.linkedFilters && tf.disableExcludedOptions) { - this.excludedOpts = []; - } - - for (var k = tf.refRow; k < tf.nbRows; k++) { - // always visible rows don't need to appear on selects as always - // valid - if (tf.hasVisibleRows && tf.visibleRows.indexOf(k) !== -1) { - continue; - } - - var cells = rows[k].cells; - var ncells = cells.length; - - // checks if row has exact cell # - if (ncells !== tf.nbCells || this.isCustom) { - continue; - } - - // this loop retrieves cell data - for (var j = 0; j < ncells; j++) { - // WTF: cyclomatic complexity hell :) - if (colIndex === j && (!tf.linkedFilters || tf.linkedFilters && tf.disableExcludedOptions) || colIndex === j && tf.linkedFilters && (rows[k].style.display === '' && !tf.paging || tf.paging && (!activeFlt || activeFlt === colIndex || activeFlt != colIndex && _Arr2['default'].has(tf.validRowsIndex, k)))) { - var cell_data = tf.getCellData(j, cells[j]); - //Vary Peter's patch - var cell_string = _Str2['default'].matchCase(cell_data, tf.matchCase); - // checks if celldata is already in array - if (!_Arr2['default'].has(this.opts, cell_string, tf.matchCase)) { - this.opts.push(cell_data); - } - var filteredCol = filteredDataCol[j]; - if (tf.linkedFilters && tf.disableExcludedOptions) { - if (!filteredCol) { - filteredCol = tf.getFilteredDataCol(j); - } - if (!_Arr2['default'].has(filteredCol, cell_string, tf.matchCase) && !_Arr2['default'].has(this.excludedOpts, cell_string, tf.matchCase) && !tf.isFirstLoad) { - this.excludedOpts.push(cell_data); - } - } - } - } - } - - //Retrieves custom values - if (this.isCustom) { - var customValues = tf.getCustomOptions(colIndex); - this.opts = customValues[0]; - this.optsTxt = customValues[1]; - } - - if (tf.sortSlc && !this.isCustom) { - if (!tf.matchCase) { - this.opts.sort(_Sort2['default'].ignoreCase); - if (this.excludedOpts) { - this.excludedOpts.sort(_Sort2['default'].ignoreCase); - } - } else { - this.opts.sort(); - if (this.excludedOpts) { - this.excludedOpts.sort(); - } - } - } - //asc sort - if (tf.sortNumAsc && _Arr2['default'].has(tf.sortNumAsc, colIndex)) { - try { - this.opts.sort(numSortAsc); - if (this.excludedOpts) { - this.excludedOpts.sort(numSortAsc); - } - if (this.isCustom) { - this.optsTxt.sort(numSortAsc); - } - } catch (e) { - this.opts.sort(); - if (this.excludedOpts) { - this.excludedOpts.sort(); - } - if (this.isCustom) { - this.optsTxt.sort(); - } - } //in case there are alphanumeric values - } - //desc sort - if (tf.sortNumDesc && _Arr2['default'].has(tf.sortNumDesc, colIndex)) { - try { - this.opts.sort(numSortDesc); - if (this.excludedOpts) { - this.excludedOpts.sort(numSortDesc); - } - if (this.isCustom) { - this.optsTxt.sort(numSortDesc); - } - } catch (e) { - this.opts.sort(); - if (this.excludedOpts) { - this.excludedOpts.sort(); - } - if (this.isCustom) { - this.optsTxt.sort(); - } - } //in case there are alphanumeric values - } - - this.addChecks(colIndex, ul, tf.separator); - - if (tf.fillSlcOnDemand) { - flt.innerHTML = ''; - } - flt.appendChild(ul); - flt.setAttribute('filled', '1'); - } - }, { - key: 'addChecks', - - /** - * Add checklist options - * @param {Number} colIndex Column index - * @param {Object} ul Ul element - */ - value: function addChecks(colIndex, ul) { - var _this2 = this; - - var tf = this.tf; - var chkCt = this.addTChecks(colIndex, ul); - var fltArr = []; //remember grid values - var store = tf.feature('store'); - var tmpVal = store ? store.getFilterValues(tf.fltsValuesCookie)[colIndex] : null; - if (tmpVal && _Str2['default'].trim(tmpVal).length > 0) { - if (tf.hasCustomSlcOptions && _Arr2['default'].has(tf.customSlcOptions.cols, colIndex)) { - fltArr.push(tmpVal); - } else { - fltArr = tmpVal.split(' ' + tf.orOperator + ' '); - } - } - - for (var y = 0; y < this.opts.length; y++) { - var val = this.opts[y]; //item value - var lbl = this.isCustom ? this.optsTxt[y] : val; //item text - var li = _Dom2['default'].createCheckItem(tf.fltIds[colIndex] + '_' + (y + chkCt), val, lbl); - li.className = this.checkListItemCssClass; - if (tf.linkedFilters && tf.disableExcludedOptions && _Arr2['default'].has(this.excludedOpts, _Str2['default'].matchCase(val, tf.matchCase), tf.matchCase)) { - _Dom2['default'].addClass(li, this.checkListItemDisabledCssClass); - li.check.disabled = true; - li.disabled = true; - } else { - _Event2['default'].add(li.check, 'click', function (evt) { - _this2.optionClick(evt); - }); - } - ul.appendChild(li); - - if (val === '') { - //item is hidden - li.style.display = 'none'; - } - - /*** remember grid values ***/ - if (tf.rememberGridValues) { - if (tf.hasCustomSlcOptions && _Arr2['default'].has(tf.customSlcOptions.cols, colIndex) && fltArr.toString().indexOf(val) != -1 || _Arr2['default'].has(fltArr, _Str2['default'].matchCase(val, tf.matchCase), tf.matchCase)) { - li.check.checked = true; - this.setCheckListValues(li.check); - } - } - } - } - }, { - key: 'addTChecks', - - /** - * Add checklist header option - * @param {Number} colIndex Column index - * @param {Object} ul Ul element - */ - value: function addTChecks(colIndex, ul) { - var _this3 = this; - - var tf = this.tf; - var chkCt = 1; - var li0 = _Dom2['default'].createCheckItem(tf.fltIds[colIndex] + '_0', '', tf.displayAllText); - li0.className = this.checkListItemCssClass; - ul.appendChild(li0); - - _Event2['default'].add(li0.check, 'click', function (evt) { - _this3.optionClick(evt); - }); - - if (!this.enableCheckListResetFilter) { - li0.style.display = 'none'; - } - - if (tf.enableEmptyOption) { - var li1 = _Dom2['default'].createCheckItem(tf.fltIds[colIndex] + '_1', tf.emOperator, tf.emptyText); - li1.className = this.checkListItemCssClass; - ul.appendChild(li1); - _Event2['default'].add(li1.check, 'click', function (evt) { - _this3.optionClick(evt); - }); - chkCt++; - } - - if (tf.enableNonEmptyOption) { - var li2 = _Dom2['default'].createCheckItem(tf.fltIds[colIndex] + '_2', tf.nmOperator, tf.nonEmptyText); - li2.className = this.checkListItemCssClass; - ul.appendChild(li2); - _Event2['default'].add(li2.check, 'click', function (evt) { - _this3.optionClick(evt); - }); - chkCt++; - } - return chkCt; - } - }, { - key: 'setCheckListValues', - - /** - * Store checked options in DOM element attribute - * @param {Object} o checklist option DOM element - */ - value: function setCheckListValues(o) { - if (!o) { - return; - } - var tf = this.tf; - var chkValue = o.value; //checked item value - var chkIndex = parseInt(o.id.split('_')[2], 10); - var filterTag = 'ul', - itemTag = 'li'; - var n = o; - - //ul tag search - while (_Str2['default'].lower(n.nodeName) !== filterTag) { - n = n.parentNode; - } - - var li = n.childNodes[chkIndex]; - var colIndex = n.getAttribute('colIndex'); - var fltValue = n.getAttribute('value'); //filter value (ul tag) - var fltIndexes = n.getAttribute('indexes'); //selected items (ul tag) - - if (o.checked) { - //show all item - if (chkValue === '') { - if (fltIndexes && fltIndexes !== '') { - //items indexes - var indSplit = fltIndexes.split(tf.separator); - //checked items loop - for (var u = 0; u < indSplit.length; u++) { - //checked item - var cChk = _Dom2['default'].id(tf.fltIds[colIndex] + '_' + indSplit[u]); - if (cChk) { - cChk.checked = false; - _Dom2['default'].removeClass(n.childNodes[indSplit[u]], this.checkListSlcItemCssClass); - } - } - } - n.setAttribute('value', ''); - n.setAttribute('indexes', ''); - } else { - fltValue = fltValue ? fltValue : ''; - chkValue = _Str2['default'].trim(fltValue + ' ' + chkValue + ' ' + tf.orOperator); - chkIndex = fltIndexes + chkIndex + tf.separator; - n.setAttribute('value', chkValue); - n.setAttribute('indexes', chkIndex); - //1st option unchecked - if (_Dom2['default'].id(tf.fltIds[colIndex] + '_0')) { - _Dom2['default'].id(tf.fltIds[colIndex] + '_0').checked = false; - } - } - - if (_Str2['default'].lower(li.nodeName) === itemTag) { - _Dom2['default'].removeClass(n.childNodes[0], this.checkListSlcItemCssClass); - _Dom2['default'].addClass(li, this.checkListSlcItemCssClass); - } - } else { - //removes values and indexes - if (chkValue !== '') { - var replaceValue = new RegExp(_Str2['default'].rgxEsc(chkValue + ' ' + tf.orOperator)); - fltValue = fltValue.replace(replaceValue, ''); - n.setAttribute('value', _Str2['default'].trim(fltValue)); - - var replaceIndex = new RegExp(_Str2['default'].rgxEsc(chkIndex + tf.separator)); - fltIndexes = fltIndexes.replace(replaceIndex, ''); - n.setAttribute('indexes', fltIndexes); - } - if (_Str2['default'].lower(li.nodeName) === itemTag) { - _Dom2['default'].removeClass(li, this.checkListSlcItemCssClass); - } - } - } - }]); - - return CheckList; - })(); - - exports.CheckList = CheckList; - -/***/ }, -/* 17 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - - Object.defineProperty(exports, '__esModule', { - value: true - }); - - var _Dom = __webpack_require__(3); - - var _Dom2 = _interopRequireDefault(_Dom); - - var _Types = __webpack_require__(6); - - var _Types2 = _interopRequireDefault(_Types); - - var RowsCounter = (function () { - - /** - * Rows counter - * @param {Object} tf TableFilter instance - */ - - function RowsCounter(tf) { - _classCallCheck(this, RowsCounter); - - // TableFilter configuration - var f = tf.config(); - - //id of custom container element - this.rowsCounterTgtId = f.rows_counter_target_id || null; - //element containing tot nb rows - this.rowsCounterDiv = null; - //element containing tot nb rows label - this.rowsCounterSpan = null; - //defines rows counter text - this.rowsCounterText = f.rows_counter_text || 'Rows: '; - this.fromToTextSeparator = f.from_to_text_separator || '-'; - this.overText = f.over_text || ' / '; - //defines css class rows counter - this.totRowsCssClass = f.tot_rows_css_class || 'tot'; - //rows counter div - this.prfxCounter = 'counter_'; - //nb displayed rows label - this.prfxTotRows = 'totrows_span_'; - //label preceding nb rows label - this.prfxTotRowsTxt = 'totRowsTextSpan_'; - //callback raised before counter is refreshed - this.onBeforeRefreshCounter = _Types2['default'].isFn(f.on_before_refresh_counter) ? f.on_before_refresh_counter : null; - //callback raised after counter is refreshed - this.onAfterRefreshCounter = _Types2['default'].isFn(f.on_after_refresh_counter) ? f.on_after_refresh_counter : null; - - this.tf = tf; - } - - _createClass(RowsCounter, [{ - key: 'init', - value: function init() { - var tf = this.tf; - - if (!tf.hasGrid() && !tf.isFirstLoad || this.rowsCounterSpan) { - return; - } - - //rows counter container - var countDiv = _Dom2['default'].create('div', ['id', this.prfxCounter + tf.id]); - countDiv.className = this.totRowsCssClass; - //rows counter label - var countSpan = _Dom2['default'].create('span', ['id', this.prfxTotRows + tf.id]); - var countText = _Dom2['default'].create('span', ['id', this.prfxTotRowsTxt + tf.id]); - countText.appendChild(_Dom2['default'].text(this.rowsCounterText)); - - // counter is added to defined element - if (!this.rowsCounterTgtId) { - tf.setToolbar(); - } - var targetEl = !this.rowsCounterTgtId ? tf.lDiv : _Dom2['default'].id(this.rowsCounterTgtId); - - //default container: 'lDiv' - if (!this.rowsCounterTgtId) { - countDiv.appendChild(countText); - countDiv.appendChild(countSpan); - targetEl.appendChild(countDiv); - } else { - //custom container, no need to append statusDiv - targetEl.appendChild(countText); - targetEl.appendChild(countSpan); - } - this.rowsCounterDiv = countDiv; - this.rowsCounterSpan = countSpan; - - this.refresh(); - } - }, { - key: 'refresh', - value: function refresh(p) { - if (!this.rowsCounterSpan) { - return; - } - - var tf = this.tf; - - if (this.onBeforeRefreshCounter) { - this.onBeforeRefreshCounter.call(null, tf, this.rowsCounterSpan); - } - - var totTxt; - if (!tf.paging) { - if (p && p !== '') { - totTxt = p; - } else { - totTxt = tf.nbFilterableRows - tf.nbHiddenRows; - } - } else { - var paging = tf.feature('paging'); - if (paging) { - //paging start row - var paging_start_row = parseInt(paging.startPagingRow, 10) + (tf.nbVisibleRows > 0 ? 1 : 0); - var paging_end_row = paging_start_row + paging.pagingLength - 1 <= tf.nbVisibleRows ? paging_start_row + paging.pagingLength - 1 : tf.nbVisibleRows; - totTxt = paging_start_row + this.fromToTextSeparator + paging_end_row + this.overText + tf.nbVisibleRows; - } - } - - this.rowsCounterSpan.innerHTML = totTxt; - if (this.onAfterRefreshCounter) { - this.onAfterRefreshCounter.call(null, tf, this.rowsCounterSpan, totTxt); - } - } - }, { - key: 'destroy', - value: function destroy() { - var tf = this.tf; - if (!tf.hasGrid() || !this.rowsCounterSpan) { - return; - } - - if (!this.rowsCounterTgtId && this.rowsCounterDiv) { - this.rowsCounterDiv.parentNode.removeChild(this.rowsCounterDiv); - } else { - _Dom2['default'].id(this.rowsCounterTgtId).innerHTML = ''; - } - this.rowsCounterSpan = null; - this.rowsCounterDiv = null; - } - }]); - - return RowsCounter; - })(); - - exports.RowsCounter = RowsCounter; - -/***/ }, -/* 18 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - - Object.defineProperty(exports, '__esModule', { - value: true - }); - - var _Dom = __webpack_require__(3); - - var _Dom2 = _interopRequireDefault(_Dom); - - var _Types = __webpack_require__(6); - - var _Types2 = _interopRequireDefault(_Types); - - var global = window; - - var StatusBar = (function () { - - /** - * Status bar UI component - * @param {Object} tf TableFilter instance - */ - - function StatusBar(tf) { - _classCallCheck(this, StatusBar); - - // Configuration object - var f = tf.config(); - - //id of custom container element - this.statusBarTgtId = f.status_bar_target_id || null; - //element containing status bar label - this.statusBarDiv = null; - //status bar - this.statusBarSpan = null; - //status bar label - this.statusBarSpanText = null; - //defines status bar text - this.statusBarText = f.status_bar_text || ''; - //defines css class status bar - this.statusBarCssClass = f.status_bar_css_class || 'status'; - //delay for status bar clearing - this.statusBarCloseDelay = 250; - - //calls function before message is displayed - this.onBeforeShowMsg = _Types2['default'].isFn(f.on_before_show_msg) ? f.on_before_show_msg : null; - //calls function after message is displayed - this.onAfterShowMsg = _Types2['default'].isFn(f.on_after_show_msg) ? f.on_after_show_msg : null; - - // status bar div - this.prfxStatus = 'status_'; - // status bar label - this.prfxStatusSpan = 'statusSpan_'; - // text preceding status bar label - this.prfxStatusTxt = 'statusText_'; - - this.tf = tf; - } - - _createClass(StatusBar, [{ - key: 'init', - value: function init() { - var tf = this.tf; - if (!tf.hasGrid() && !tf.isFirstLoad) { - return; - } - - //status bar container - var statusDiv = _Dom2['default'].create('div', ['id', this.prfxStatus + tf.id]); - statusDiv.className = this.statusBarCssClass; - - //status bar label - var statusSpan = _Dom2['default'].create('span', ['id', this.prfxStatusSpan + tf.id]); - //preceding text - var statusSpanText = _Dom2['default'].create('span', ['id', this.prfxStatusTxt + tf.id]); - statusSpanText.appendChild(_Dom2['default'].text(this.statusBarText)); - - // target element container - if (!this.statusBarTgtId) { - tf.setToolbar(); - } - var targetEl = !this.statusBarTgtId ? tf.lDiv : _Dom2['default'].id(this.statusBarTgtId); - - //default container: 'lDiv' - if (!this.statusBarTgtId) { - statusDiv.appendChild(statusSpanText); - statusDiv.appendChild(statusSpan); - targetEl.appendChild(statusDiv); - } else { - // custom container, no need to append statusDiv - targetEl.appendChild(statusSpanText); - targetEl.appendChild(statusSpan); - } - - this.statusBarDiv = statusDiv; - this.statusBarSpan = statusSpan; - this.statusBarSpanText = statusSpanText; - } - }, { - key: 'message', - value: function message() { - var _this = this; - - var t = arguments[0] === undefined ? '' : arguments[0]; - - var tf = this.tf; - if (!tf.statusBar || !this.statusBarSpan) { - return; - } - if (this.onBeforeShowMsg) { - this.onBeforeShowMsg.call(null, this.tf, t); - } - - var d = t === '' ? this.statusBarCloseDelay : 1; - global.setTimeout(function () { - _this.statusBarSpan.innerHTML = t; - if (_this.onAfterShowMsg) { - _this.onAfterShowMsg.call(null, _this.tf, t); - } - }, d); - } - }, { - key: 'destroy', - value: function destroy() { - var tf = this.tf; - if (!tf.hasGrid() || !this.statusBarDiv) { - return; - } - - this.statusBarDiv.innerHTML = ''; - this.statusBarDiv.parentNode.removeChild(this.statusBarDiv); - this.statusBarSpan = null; - this.statusBarSpanText = null; - this.statusBarDiv = null; - } - }]); - - return StatusBar; - })(); - - exports.StatusBar = StatusBar; - -/***/ }, -/* 19 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - - Object.defineProperty(exports, '__esModule', { - value: true - }); - - var _Dom = __webpack_require__(3); - - var _Dom2 = _interopRequireDefault(_Dom); - - var _Types = __webpack_require__(6); - - var _Types2 = _interopRequireDefault(_Types); - - var _Str = __webpack_require__(4); - - var _Str2 = _interopRequireDefault(_Str); - - var _Event = __webpack_require__(2); - - var _Event2 = _interopRequireDefault(_Event); - - var Paging = (function () { - - /** - * Pagination component - * @param {Object} tf TableFilter instance - */ - - function Paging(tf) { - _classCallCheck(this, Paging); - - // Configuration object - var f = tf.config(); - - //css class for paging buttons (previous,next,etc.) - this.btnPageCssClass = f.paging_btn_css_class || 'pgInp'; - //stores paging select element - this.pagingSlc = null; - //results per page select element - this.resultsPerPageSlc = null; - //id of container element - this.pagingTgtId = f.paging_target_id || null; - //defines table paging length - this.pagingLength = !isNaN(f.paging_length) ? f.paging_length : 10; - //id of container element - this.resultsPerPageTgtId = f.results_per_page_target_id || null; - //css class for paging select element - this.pgSlcCssClass = f.paging_slc_css_class || 'pgSlc'; - //css class for paging input element - this.pgInpCssClass = f.paging_inp_css_class || 'pgNbInp'; - //stores results per page text and values - this.resultsPerPage = f.results_per_page || null; - //enables/disables results per page drop-down - this.hasResultsPerPage = _Types2['default'].isArray(this.resultsPerPage); - //defines css class for results per page select - this.resultsSlcCssClass = f.results_slc_css_class || 'rspg'; - //css class for label preceding results per page select - this.resultsSpanCssClass = f.results_span_css_class || 'rspgSpan'; - //1st row index of current page - this.startPagingRow = 0; - //total nb of pages - this.nbPages = 0; - //current page nb - this.currentPageNb = 1; - //defines next page button text - this.btnNextPageText = f.btn_next_page_text || '>'; - //defines previous page button text - this.btnPrevPageText = f.btn_prev_page_text || '<'; - //defines last page button text - this.btnLastPageText = f.btn_last_page_text || '>|'; - //defines first page button text - this.btnFirstPageText = f.btn_first_page_text || '|<'; - //defines next page button html - this.btnNextPageHtml = f.btn_next_page_html || (!tf.enableIcons ? null : ''); - //defines previous page button html - this.btnPrevPageHtml = f.btn_prev_page_html || (!tf.enableIcons ? null : ''); - //defines last page button html - this.btnFirstPageHtml = f.btn_first_page_html || (!tf.enableIcons ? null : ''); - //defines previous page button html - this.btnLastPageHtml = f.btn_last_page_html || (!tf.enableIcons ? null : ''); - //defines text preceeding page selector drop-down - this.pageText = f.page_text || ' Page '; - //defines text after page selector drop-down - this.ofText = f.of_text || ' of '; - //css class for span containing tot nb of pages - this.nbPgSpanCssClass = f.nb_pages_css_class || 'nbpg'; - //enables/disables paging buttons - this.hasPagingBtns = f.paging_btns === false ? false : true; - //defines previous page button html - this.pageSelectorType = f.page_selector_type || tf.fltTypeSlc; - //calls function before page is changed - this.onBeforeChangePage = _Types2['default'].isFn(f.on_before_change_page) ? f.on_before_change_page : null; - //calls function before page is changed - this.onAfterChangePage = _Types2['default'].isFn(f.on_after_change_page) ? f.on_after_change_page : null; - - //pages select - this.prfxSlcPages = 'slcPages_'; - //results per page select - this.prfxSlcResults = 'slcResults_'; - //label preciding results per page select - this.prfxSlcResultsTxt = 'slcResultsTxt_'; - //span containing next page button - this.prfxBtnNextSpan = 'btnNextSpan_'; - //span containing previous page button - this.prfxBtnPrevSpan = 'btnPrevSpan_'; - //span containing last page button - this.prfxBtnLastSpan = 'btnLastSpan_'; - //span containing first page button - this.prfxBtnFirstSpan = 'btnFirstSpan_'; - //next button - this.prfxBtnNext = 'btnNext_'; - //previous button - this.prfxBtnPrev = 'btnPrev_'; - //last button - this.prfxBtnLast = 'btnLast_'; - //first button - this.prfxBtnFirst = 'btnFirst_'; - //span for tot nb pages - this.prfxPgSpan = 'pgspan_'; - //span preceding pages select (contains 'Page') - this.prfxPgBeforeSpan = 'pgbeforespan_'; - //span following pages select (contains ' of ') - this.prfxPgAfterSpan = 'pgafterspan_'; - - var start_row = this.refRow; - var nrows = this.nbRows; - //calculates page nb - this.nbPages = Math.ceil((nrows - start_row) / this.pagingLength); - - //Paging elements events - var o = this; - // Paging DOM events - this.evt = { - slcIndex: function slcIndex() { - return o.pageSelectorType === tf.fltTypeSlc ? o.pagingSlc.options.selectedIndex : parseInt(o.pagingSlc.value, 10) - 1; - }, - nbOpts: function nbOpts() { - return o.pageSelectorType === tf.fltTypeSlc ? parseInt(o.pagingSlc.options.length, 10) - 1 : o.nbPages - 1; - }, - next: function next() { - var nextIndex = o.evt.slcIndex() < o.evt.nbOpts() ? o.evt.slcIndex() + 1 : 0; - o.changePage(nextIndex); - }, - prev: function prev() { - var prevIndex = o.evt.slcIndex() > 0 ? o.evt.slcIndex() - 1 : o.evt.nbOpts(); - o.changePage(prevIndex); - }, - last: function last() { - o.changePage(o.evt.nbOpts()); - }, - first: function first() { - o.changePage(0); - }, - _detectKey: function _detectKey(e) { - var key = _Event2['default'].keyCode(e); - if (key === 13) { - if (tf.sorted) { - tf.filter(); - o.changePage(o.evt.slcIndex()); - } else { - o.changePage(); - } - this.blur(); - } - }, - slcPagesChange: null, - nextEvt: null, - prevEvt: null, - lastEvt: null, - firstEvt: null - }; - - this.tf = tf; - } - - _createClass(Paging, [{ - key: 'init', - - /** - * Initialize DOM elements - */ - value: function init() { - var _this = this; - - var slcPages; - var tf = this.tf; - var evt = this.evt; - - // Check resultsPerPage is in expected format and initialise the - // results per page component - if (this.hasResultsPerPage) { - if (this.resultsPerPage.length < 2) { - this.hasResultsPerPage = false; - } else { - this.pagingLength = this.resultsPerPage[1][0]; - this.setResultsPerPage(); - } - } - - evt.slcPagesChange = function (event) { - var slc = event.target; - _this.changePage(slc.selectedIndex); - }; - - // Paging drop-down list selector - if (this.pageSelectorType === tf.fltTypeSlc) { - slcPages = _Dom2['default'].create(tf.fltTypeSlc, ['id', this.prfxSlcPages + tf.id]); - slcPages.className = this.pgSlcCssClass; - _Event2['default'].add(slcPages, 'change', evt.slcPagesChange); - } - - // Paging input selector - if (this.pageSelectorType === tf.fltTypeInp) { - slcPages = _Dom2['default'].create(tf.fltTypeInp, ['id', this.prfxSlcPages + tf.id], ['value', this.currentPageNb]); - slcPages.className = this.pgInpCssClass; - _Event2['default'].add(slcPages, 'keypress', evt._detectKey); - } - - // btns containers - var btnNextSpan = _Dom2['default'].create('span', ['id', this.prfxBtnNextSpan + tf.id]); - var btnPrevSpan = _Dom2['default'].create('span', ['id', this.prfxBtnPrevSpan + tf.id]); - var btnLastSpan = _Dom2['default'].create('span', ['id', this.prfxBtnLastSpan + tf.id]); - var btnFirstSpan = _Dom2['default'].create('span', ['id', this.prfxBtnFirstSpan + tf.id]); - - if (this.hasPagingBtns) { - // Next button - if (!this.btnNextPageHtml) { - var btn_next = _Dom2['default'].create(tf.fltTypeInp, ['id', this.prfxBtnNext + tf.id], ['type', 'button'], ['value', this.btnNextPageText], ['title', 'Next']); - btn_next.className = this.btnPageCssClass; - _Event2['default'].add(btn_next, 'click', evt.next); - btnNextSpan.appendChild(btn_next); - } else { - btnNextSpan.innerHTML = this.btnNextPageHtml; - _Event2['default'].add(btnNextSpan, 'click', evt.next); - } - // Previous button - if (!this.btnPrevPageHtml) { - var btn_prev = _Dom2['default'].create(tf.fltTypeInp, ['id', this.prfxBtnPrev + tf.id], ['type', 'button'], ['value', this.btnPrevPageText], ['title', 'Previous']); - btn_prev.className = this.btnPageCssClass; - _Event2['default'].add(btn_prev, 'click', evt.prev); - btnPrevSpan.appendChild(btn_prev); - } else { - btnPrevSpan.innerHTML = this.btnPrevPageHtml; - _Event2['default'].add(btnPrevSpan, 'click', evt.prev); - } - // Last button - if (!this.btnLastPageHtml) { - var btn_last = _Dom2['default'].create(tf.fltTypeInp, ['id', this.prfxBtnLast + tf.id], ['type', 'button'], ['value', this.btnLastPageText], ['title', 'Last']); - btn_last.className = this.btnPageCssClass; - _Event2['default'].add(btn_last, 'click', evt.last); - btnLastSpan.appendChild(btn_last); - } else { - btnLastSpan.innerHTML = this.btnLastPageHtml; - _Event2['default'].add(btnLastSpan, 'click', evt.last); - } - // First button - if (!this.btnFirstPageHtml) { - var btn_first = _Dom2['default'].create(tf.fltTypeInp, ['id', this.prfxBtnFirst + tf.id], ['type', 'button'], ['value', this.btnFirstPageText], ['title', 'First']); - btn_first.className = this.btnPageCssClass; - _Event2['default'].add(btn_first, 'click', evt.first); - btnFirstSpan.appendChild(btn_first); - } else { - btnFirstSpan.innerHTML = this.btnFirstPageHtml; - _Event2['default'].add(btnFirstSpan, 'click', evt.first); - } - } - - // paging elements (buttons+drop-down list) are added to defined element - if (!this.pagingTgtId) { - tf.setToolbar(); - } - var targetEl = !this.pagingTgtId ? tf.mDiv : _Dom2['default'].id(this.pagingTgtId); - targetEl.appendChild(btnFirstSpan); - targetEl.appendChild(btnPrevSpan); - - var pgBeforeSpan = _Dom2['default'].create('span', ['id', this.prfxPgBeforeSpan + tf.id]); - pgBeforeSpan.appendChild(_Dom2['default'].text(this.pageText)); - pgBeforeSpan.className = this.nbPgSpanCssClass; - targetEl.appendChild(pgBeforeSpan); - targetEl.appendChild(slcPages); - var pgAfterSpan = _Dom2['default'].create('span', ['id', this.prfxPgAfterSpan + tf.id]); - pgAfterSpan.appendChild(_Dom2['default'].text(this.ofText)); - pgAfterSpan.className = this.nbPgSpanCssClass; - targetEl.appendChild(pgAfterSpan); - var pgspan = _Dom2['default'].create('span', ['id', this.prfxPgSpan + tf.id]); - pgspan.className = this.nbPgSpanCssClass; - pgspan.appendChild(_Dom2['default'].text(' ' + this.nbPages + ' ')); - targetEl.appendChild(pgspan); - targetEl.appendChild(btnNextSpan); - targetEl.appendChild(btnLastSpan); - this.pagingSlc = _Dom2['default'].id(this.prfxSlcPages + tf.id); - - if (!tf.rememberGridValues || this.isPagingRemoved) { - this.setPagingInfo(); - } - if (!tf.fltGrid) { - tf.validateAllRows(); - this.setPagingInfo(tf.validRowsIndex); - } - - this.isPagingRemoved = false; - } - }, { - key: 'reset', - - /** - * Reset paging when filters are already instantiated - * @param {Boolean} filterTable Execute filtering once paging instanciated - */ - value: function reset() { - var filterTable = arguments[0] === undefined ? false : arguments[0]; - - var tf = this.tf; - if (!tf.hasGrid() || tf.paging) { - return; - } - tf.paging = true; - this.isPagingRemoved = true; - this.init(); - tf.resetValues(); - if (filterTable) { - tf.filter(); - } - } - }, { - key: 'setPagingInfo', - - /** - * Calculate number of pages based on valid rows - * Refresh paging select according to number of pages - * @param {Array} validRows Collection of valid rows - */ - value: function setPagingInfo() { - var validRows = arguments[0] === undefined ? [] : arguments[0]; - - var tf = this.tf; - var rows = tf.tbl.rows; - var mdiv = !this.pagingTgtId ? tf.mDiv : _Dom2['default'].id(this.pagingTgtId); - var pgspan = _Dom2['default'].id(this.prfxPgSpan + tf.id); - - //store valid rows indexes - tf.validRowsIndex = validRows; - - if (validRows.length === 0) { - //counts rows to be grouped - for (var j = tf.refRow; j < tf.nbRows; j++) { - var row = rows[j]; - if (!row) { - continue; - } - - var isRowValid = row.getAttribute('validRow'); - if (_Types2['default'].isNull(isRowValid) || Boolean(isRowValid === 'true')) { - tf.validRowsIndex.push(j); - } - } - } - - //calculate nb of pages - this.nbPages = Math.ceil(tf.validRowsIndex.length / this.pagingLength); - //refresh page nb span - pgspan.innerHTML = this.nbPages; - //select clearing shortcut - if (this.pageSelectorType === tf.fltTypeSlc) { - this.pagingSlc.innerHTML = ''; - } - - if (this.nbPages > 0) { - mdiv.style.visibility = 'visible'; - if (this.pageSelectorType === tf.fltTypeSlc) { - for (var z = 0; z < this.nbPages; z++) { - var opt = _Dom2['default'].createOpt(z + 1, z * this.pagingLength, false); - this.pagingSlc.options[z] = opt; - } - } else { - //input type - this.pagingSlc.value = this.currentPageNb; - } - } else { - /*** if no results paging select and buttons are hidden ***/ - mdiv.style.visibility = 'hidden'; - } - this.groupByPage(tf.validRowsIndex); - } - }, { - key: 'groupByPage', - - /** - * Group table rows by page and display valid rows - * @param {Array} validRows Collection of valid rows - */ - value: function groupByPage(validRows) { - var tf = this.tf; - var alternateRows = tf.feature('alternateRows'); - var rows = tf.tbl.rows; - var endPagingRow = parseInt(this.startPagingRow, 10) + parseInt(this.pagingLength, 10); - - //store valid rows indexes - if (validRows) { - tf.validRowsIndex = validRows; - } - - //this loop shows valid rows of current page - for (var h = 0, len = tf.validRowsIndex.length; h < len; h++) { - var validRowIdx = tf.validRowsIndex[h]; - var r = rows[validRowIdx]; - var isRowValid = r.getAttribute('validRow'); - - if (h >= this.startPagingRow && h < endPagingRow) { - if (_Types2['default'].isNull(isRowValid) || Boolean(isRowValid === 'true')) { - r.style.display = ''; - } - if (tf.alternateBgs && alternateRows) { - alternateRows.setRowBg(validRowIdx, h); - } - } else { - r.style.display = 'none'; - if (tf.alternateBgs && alternateRows) { - alternateRows.removeRowBg(validRowIdx); - } - } - } - - tf.nbVisibleRows = tf.validRowsIndex.length; - //re-applies filter behaviours after filtering process - tf.applyProps(); - } - }, { - key: 'getPage', - - /** - * Return the current page number - * @return {Number} Page number - */ - value: function getPage() { - return this.currentPageNb; - } - }, { - key: 'setPage', - - /** - * Show page based on passed param value (string or number): - * @param {String} or {Number} cmd possible string values: 'next', - * 'previous', 'last', 'first' or page number as per param - */ - value: function setPage(cmd) { - var tf = this.tf; - if (!tf.hasGrid() || !tf.paging) { - return; - } - var btnEvt = this.evt, - cmdtype = typeof cmd; - if (cmdtype === 'string') { - switch (_Str2['default'].lower(cmd)) { - case 'next': - btnEvt.next(); - break; - case 'previous': - btnEvt.prev(); - break; - case 'last': - btnEvt.last(); - break; - case 'first': - btnEvt.first(); - break; - default: - btnEvt.next(); - break; - } - } else if (cmdtype === 'number') { - this.changePage(cmd - 1); - } - } - }, { - key: 'setResultsPerPage', - - /** - * Generates UI elements for the number of results per page drop-down - */ - value: function setResultsPerPage() { - var _this2 = this; - - var tf = this.tf; - var evt = this.evt; - - if (!tf.hasGrid() && !tf.isFirstLoad) { - return; - } - if (this.resultsPerPageSlc || !this.resultsPerPage) { - return; - } - - evt.slcResultsChange = function (ev) { - _this2.changeResultsPerPage(); - ev.target.blur(); - }; - - var slcR = _Dom2['default'].create(tf.fltTypeSlc, ['id', this.prfxSlcResults + tf.id]); - slcR.className = this.resultsSlcCssClass; - var slcRText = this.resultsPerPage[0], - slcROpts = this.resultsPerPage[1]; - var slcRSpan = _Dom2['default'].create('span', ['id', this.prfxSlcResultsTxt + tf.id]); - slcRSpan.className = this.resultsSpanCssClass; - - // results per page select is added to external element - if (!this.resultsPerPageTgtId) { - tf.setToolbar(); - } - var targetEl = !this.resultsPerPageTgtId ? tf.rDiv : _Dom2['default'].id(this.resultsPerPageTgtId); - slcRSpan.appendChild(_Dom2['default'].text(slcRText)); - - var help = tf.feature('help'); - if (help && help.cont) { - help.cont.parentNode.insertBefore(slcRSpan, help.cont); - help.cont.parentNode.insertBefore(slcR, help.cont); - } else { - targetEl.appendChild(slcRSpan); - targetEl.appendChild(slcR); - } - - for (var r = 0; r < slcROpts.length; r++) { - var currOpt = new Option(slcROpts[r], slcROpts[r], false, false); - slcR.options[r] = currOpt; - } - _Event2['default'].add(slcR, 'change', evt.slcResultsChange); - this.resultsPerPageSlc = slcR; - } - }, { - key: 'removeResultsPerPage', - - /** - * Remove number of results per page UI elements - */ - value: function removeResultsPerPage() { - var tf = this.tf; - if (!tf.hasGrid() || !this.resultsPerPageSlc || !this.resultsPerPage) { - return; - } - var slcR = this.resultsPerPageSlc, - slcRSpan = _Dom2['default'].id(this.prfxSlcResultsTxt + tf.id); - if (slcR) { - slcR.parentNode.removeChild(slcR); - } - if (slcRSpan) { - slcRSpan.parentNode.removeChild(slcRSpan); - } - this.resultsPerPageSlc = null; - } - }, { - key: 'changePage', - - /** - * Change the page asynchronously according to passed index - * @param {Number} index Index of the page (0-n) - */ - value: function changePage(index) { - var tf = this.tf; - var evt = tf.Evt; - tf.EvtManager(evt.name.changepage, { pgIndex: index }); - } - }, { - key: 'changeResultsPerPage', - - /** - * Change rows asynchronously according to page results - */ - value: function changeResultsPerPage() { - var tf = this.tf; - var evt = tf.Evt; - tf.EvtManager(evt.name.changeresultsperpage); - } - }, { - key: 'resetPage', - - /** - * Re-set asynchronously page nb at page re-load - */ - value: function resetPage() { - var tf = this.tf; - var evt = tf.Evt; - tf.EvtManager(evt.name.resetpage); - } - }, { - key: 'resetPageLength', - - /** - * Re-set asynchronously page length at page re-load - */ - value: function resetPageLength() { - var tf = this.tf; - var evt = tf.Evt; - tf.EvtManager(evt.name.resetpagelength); - } - }, { - key: '_changePage', - - /** - * Change the page according to passed index - * @param {Number} index Index of the page (0-n) - */ - value: function _changePage(index) { - var tf = this.tf; - - if (!tf.paging) { - return; - } - if (index === null) { - index = this.pageSelectorType === tf.fltTypeSlc ? this.pagingSlc.options.selectedIndex : this.pagingSlc.value - 1; - } - if (index >= 0 && index <= this.nbPages - 1) { - if (this.onBeforeChangePage) { - this.onBeforeChangePage.call(null, this, index); - } - this.currentPageNb = parseInt(index, 10) + 1; - if (this.pageSelectorType === tf.fltTypeSlc) { - this.pagingSlc.options[index].selected = true; - } else { - this.pagingSlc.value = this.currentPageNb; - } - - if (tf.rememberPageNb) { - tf.feature('store').savePageNb(tf.pgNbCookie); - } - this.startPagingRow = this.pageSelectorType === tf.fltTypeSlc ? this.pagingSlc.value : index * this.pagingLength; - - this.groupByPage(); - - if (this.onAfterChangePage) { - this.onAfterChangePage.call(null, this, index); - } - } - } - }, { - key: '_changeResultsPerPage', - - /** - * Change rows according to page results drop-down - * TODO: accept a parameter setting the results per page length - */ - value: function _changeResultsPerPage() { - var tf = this.tf; - - if (!tf.paging) { - return; - } - var slcR = this.resultsPerPageSlc; - var slcPagesSelIndex = this.pageSelectorType === tf.fltTypeSlc ? this.pagingSlc.selectedIndex : parseInt(this.pagingSlc.value - 1, 10); - this.pagingLength = parseInt(slcR.options[slcR.selectedIndex].value, 10); - this.startPagingRow = this.pagingLength * slcPagesSelIndex; - - if (!isNaN(this.pagingLength)) { - if (this.startPagingRow >= tf.nbFilterableRows) { - this.startPagingRow = tf.nbFilterableRows - this.pagingLength; - } - this.setPagingInfo(); - - if (this.pageSelectorType === tf.fltTypeSlc) { - var slcIndex = this.pagingSlc.options.length - 1 <= slcPagesSelIndex ? this.pagingSlc.options.length - 1 : slcPagesSelIndex; - this.pagingSlc.options[slcIndex].selected = true; - } - if (tf.rememberPageLen) { - tf.feature('store').savePageLength(tf.pgLenCookie); - } - } - } - }, { - key: '_resetPage', - - /** - * Re-set page nb at page re-load - */ - value: function _resetPage(name) { - var tf = this.tf; - var pgnb = tf.feature('store').getPageNb(name); - if (pgnb !== '') { - this.changePage(pgnb - 1); - } - } - }, { - key: '_resetPageLength', - - /** - * Re-set page length value at page re-load - */ - value: function _resetPageLength(name) { - var tf = this.tf; - if (!tf.paging) { - return; - } - var pglenIndex = tf.feature('store').getPageLength(name); - - if (pglenIndex !== '') { - this.resultsPerPageSlc.options[pglenIndex].selected = true; - this.changeResultsPerPage(); - } - } - }, { - key: 'destroy', - - /** - * Remove paging feature - */ - value: function destroy() { - var tf = this.tf; - - if (!tf.hasGrid()) { - return; - } - // btns containers - var btnNextSpan = _Dom2['default'].id(this.prfxBtnNextSpan + tf.id); - var btnPrevSpan = _Dom2['default'].id(this.prfxBtnPrevSpan + tf.id); - var btnLastSpan = _Dom2['default'].id(this.prfxBtnLastSpan + tf.id); - var btnFirstSpan = _Dom2['default'].id(this.prfxBtnFirstSpan + tf.id); - //span containing 'Page' text - var pgBeforeSpan = _Dom2['default'].id(this.prfxPgBeforeSpan + tf.id); - //span containing 'of' text - var pgAfterSpan = _Dom2['default'].id(this.prfxPgAfterSpan + tf.id); - //span containing nb of pages - var pgspan = _Dom2['default'].id(this.prfxPgSpan + tf.id); - - var evt = this.evt; - - if (this.pagingSlc) { - if (this.pageSelectorType === tf.fltTypeSlc) { - _Event2['default'].remove(this.pagingSlc, 'change', evt.slcPagesChange); - } else if (this.pageSelectorType === tf.fltTypeInp) { - _Event2['default'].remove(this.pagingSlc, 'keypress', evt._detectKey); - } - this.pagingSlc.parentNode.removeChild(this.pagingSlc); - } - - if (btnNextSpan) { - _Event2['default'].remove(btnNextSpan, 'click', evt.next); - btnNextSpan.parentNode.removeChild(btnNextSpan); - } - - if (btnPrevSpan) { - _Event2['default'].remove(btnPrevSpan, 'click', evt.prev); - btnPrevSpan.parentNode.removeChild(btnPrevSpan); - } - - if (btnLastSpan) { - _Event2['default'].remove(btnLastSpan, 'click', evt.last); - btnLastSpan.parentNode.removeChild(btnLastSpan); - } - - if (btnFirstSpan) { - _Event2['default'].remove(btnFirstSpan, 'click', evt.first); - btnFirstSpan.parentNode.removeChild(btnFirstSpan); - } - - if (pgBeforeSpan) { - pgBeforeSpan.parentNode.removeChild(pgBeforeSpan); - } - - if (pgAfterSpan) { - pgAfterSpan.parentNode.removeChild(pgAfterSpan); - } - - if (pgspan) { - pgspan.parentNode.removeChild(pgspan); - } - - if (this.hasResultsPerPage) { - this.removeResultsPerPage(); - } - - this.pagingSlc = null; - this.nbPages = 0; - this.isPagingRemoved = true; - tf.paging = false; - } - }]); - - return Paging; - })(); - - exports.Paging = Paging; - -/***/ }, -/* 20 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - - Object.defineProperty(exports, '__esModule', { - value: true - }); - - var _Dom = __webpack_require__(3); - - var _Dom2 = _interopRequireDefault(_Dom); - - var _Event = __webpack_require__(2); - - var _Event2 = _interopRequireDefault(_Event); - - var ClearButton = (function () { - - /** - * Clear button component - * @param {Object} tf TableFilter instance - */ - - function ClearButton(tf) { - _classCallCheck(this, ClearButton); - - // Configuration object - var f = tf.config(); - - //id of container element - this.btnResetTgtId = f.btn_reset_target_id || null; - //reset button element - this.btnResetEl = null; - //defines reset text - this.btnResetText = f.btn_reset_text || 'Reset'; - //defines reset button tooltip - this.btnResetTooltip = f.btn_reset_tooltip || 'Clear filters'; - //defines reset button innerHtml - this.btnResetHtml = f.btn_reset_html || (!tf.enableIcons ? null : ''); - //span containing reset button - this.prfxResetSpan = 'resetspan_'; - - this.tf = tf; - } - - _createClass(ClearButton, [{ - key: 'onClick', - value: function onClick() { - this.tf.clearFilters(); - } - }, { - key: 'init', - - /** - * Build DOM elements - */ - value: function init() { - var _this = this; - - var tf = this.tf; - - if (!tf.hasGrid() && !tf.isFirstLoad && tf.btnResetEl) { - return; - } - - var resetspan = _Dom2['default'].create('span', ['id', this.prfxResetSpan + tf.id]); - - // reset button is added to defined element - if (!this.btnResetTgtId) { - tf.setToolbar(); - } - var targetEl = !this.btnResetTgtId ? tf.rDiv : _Dom2['default'].id(this.btnResetTgtId); - targetEl.appendChild(resetspan); - - if (!this.btnResetHtml) { - var fltreset = _Dom2['default'].create('a', ['href', 'javascript:void(0);']); - fltreset.className = tf.btnResetCssClass; - fltreset.appendChild(_Dom2['default'].text(this.btnResetText)); - resetspan.appendChild(fltreset); - // fltreset.onclick = this.Evt._Clear; - _Event2['default'].add(fltreset, 'click', function () { - _this.onClick(); - }); - } else { - resetspan.innerHTML = this.btnResetHtml; - var resetEl = resetspan.firstChild; - // resetEl.onclick = this.Evt._Clear; - _Event2['default'].add(resetEl, 'click', function () { - _this.onClick(); - }); - } - this.btnResetEl = resetspan.firstChild; - } - }, { - key: 'destroy', - - /** - * Remove clear button UI - */ - value: function destroy() { - var tf = this.tf; - - if (!tf.hasGrid() || !this.btnResetEl) { - return; - } - - var resetspan = _Dom2['default'].id(tf.prfxResetSpan + tf.id); - if (resetspan) { - resetspan.parentNode.removeChild(resetspan); - } - this.btnResetEl = null; - } - }]); - - return ClearButton; - })(); - - exports.ClearButton = ClearButton; - -/***/ }, -/* 21 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - - Object.defineProperty(exports, '__esModule', { - value: true - }); - - var _Dom = __webpack_require__(3); - - var _Dom2 = _interopRequireDefault(_Dom); - - var _Event = __webpack_require__(2); - - var _Event2 = _interopRequireDefault(_Event); - - var Help = (function () { - - /** - * Help UI component - * @param {Object} tf TableFilter instance - */ - - function Help(tf) { - _classCallCheck(this, Help); - - // Configuration object - var f = tf.config(); - - //id of custom container element for instructions - this.tgtId = f.help_instructions_target_id || null; - //id of custom container element for instructions - this.contTgtId = f.help_instructions_container_target_id || null; - //defines help text - this.instrText = f.help_instructions_text ? f.help_instructions_text : 'Use the filters above each column to filter and limit table ' + 'data. Avanced searches can be performed by using the following ' + 'operators:
<, <=, >, ' + '>=, =, *, !, {, }, ' + '||,&&, [empty], [nonempty], ' + 'rgx:
' + 'Learn more.
'; - //defines help innerHtml - this.instrHtml = f.help_instructions_html || null; - //defines reset button text - this.btnText = f.help_instructions_btn_text || '?'; - //defines reset button innerHtml - this.btnHtml = f.help_instructions_btn_html || null; - //defines css class for help button - this.btnCssClass = f.help_instructions_btn_css_class || 'helpBtn'; - //defines css class for help container - this.contCssClass = f.help_instructions_container_css_class || 'helpCont'; - //help button element - this.btn = null; - //help content div - this.cont = null; - this.defaultHtml = '

TableFilter ' + 'v. ' + tf.version + '

' + 'https://github.com/koalyptus/TableFilter/' + '
©2015-' + tf.year + ' Max Guglielmi.' + '
' + 'Close
'; - - //id prefix for help elements - this.prfxHelpSpan = 'helpSpan_'; - //id prefix for help elements - this.prfxHelpDiv = 'helpDiv_'; - - this.tf = tf; - } - - _createClass(Help, [{ - key: 'init', - value: function init() { - var _this = this; - - if (this.btn) { - return; - } - - var tf = this.tf; - - var helpspan = _Dom2['default'].create('span', ['id', this.prfxHelpSpan + tf.id]); - var helpdiv = _Dom2['default'].create('div', ['id', this.prfxHelpDiv + tf.id]); - - //help button is added to defined element - if (!this.tgtId) { - tf.setToolbar(); - } - var targetEl = !this.tgtId ? tf.rDiv : _Dom2['default'].id(this.tgtId); - targetEl.appendChild(helpspan); - - var divContainer = !this.contTgtId ? helpspan : _Dom2['default'].id(this.contTgtId); - - if (!this.btnHtml) { - divContainer.appendChild(helpdiv); - var helplink = _Dom2['default'].create('a', ['href', 'javascript:void(0);']); - helplink.className = this.btnCssClass; - helplink.appendChild(_Dom2['default'].text(this.btnText)); - helpspan.appendChild(helplink); - _Event2['default'].add(helplink, 'click', function () { - _this.toggle(); - }); - } else { - helpspan.innerHTML = this.btnHtml; - var helpEl = helpspan.firstChild; - _Event2['default'].add(helpEl, 'click', function () { - _this.toggle(); - }); - divContainer.appendChild(helpdiv); - } - - if (!this.instrHtml) { - helpdiv.innerHTML = this.instrText; - helpdiv.className = this.contCssClass; - _Event2['default'].add(helpdiv, 'dblclick', function () { - _this.toggle(); - }); - } else { - if (this.contTgtId) { - divContainer.appendChild(helpdiv); - } - helpdiv.innerHTML = this.instrHtml; - if (!this.contTgtId) { - helpdiv.className = this.contCssClass; - _Event2['default'].add(helpdiv, 'dblclick', function () { - _this.toggle(); - }); - } - } - helpdiv.innerHTML += this.defaultHtml; - _Event2['default'].add(helpdiv, 'click', function () { - _this.toggle(); - }); - - this.cont = helpdiv; - this.btn = helpspan; - } - }, { - key: 'toggle', - - /** - * Toggle help pop-up - */ - value: function toggle() { - if (!this.cont) { - return; - } - var divDisplay = this.cont.style.display; - if (divDisplay === '' || divDisplay === 'none') { - this.cont.style.display = 'inline'; - } else { - this.cont.style.display = 'none'; - } - } - }, { - key: 'destroy', - - /** - * Remove help UI - */ - value: function destroy() { - if (!this.btn) { - return; - } - this.btn.parentNode.removeChild(this.btn); - this.btn = null; - if (!this.cont) { - return; - } - this.cont.parentNode.removeChild(this.cont); - this.cont = null; - } - }]); - - return Help; - })(); - - exports.Help = Help; - -/***/ }, -/* 22 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - - Object.defineProperty(exports, '__esModule', { - value: true - }); - - var _Dom = __webpack_require__(3); - - var _Dom2 = _interopRequireDefault(_Dom); - - var AlternateRows = (function () { - - /** - * Alternating rows color - * @param {Object} tf TableFilter instance - */ - - function AlternateRows(tf) { - _classCallCheck(this, AlternateRows); - - var f = tf.config(); - //defines css class for even rows - this.evenCss = f.even_row_css_class || 'even'; - //defines css class for odd rows - this.oddCss = f.odd_row_css_class || 'odd'; - - this.tf = tf; - } - - _createClass(AlternateRows, [{ - key: 'init', - - /** - * Sets alternating rows color - */ - value: function init() { - var tf = this.tf; - if (!tf.hasGrid() && !tf.isFirstLoad) { - return; - } - var validRowsIndex = tf.validRowsIndex; - var noValidRowsIndex = validRowsIndex === null; - //1st index - var beginIndex = noValidRowsIndex ? tf.refRow : 0; - // nb indexes - var indexLen = noValidRowsIndex ? tf.nbFilterableRows + beginIndex : validRowsIndex.length; - var idx = 0; - - //alternates bg color - for (var j = beginIndex; j < indexLen; j++) { - var rowIdx = noValidRowsIndex ? j : validRowsIndex[j]; - this.setRowBg(rowIdx, idx); - idx++; - } - } - }, { - key: 'setRowBg', - - /** - * Sets row background color - * @param {Number} rowIdx Row index - * @param {Number} idx Valid rows collection index needed to calculate bg - * color - */ - value: function setRowBg(rowIdx, idx) { - if (!this.tf.alternateBgs || isNaN(rowIdx)) { - return; - } - var rows = this.tf.tbl.rows; - var i = isNaN(idx) ? rowIdx : idx; - this.removeRowBg(rowIdx); - - _Dom2['default'].addClass(rows[rowIdx], i % 2 ? this.evenCss : this.oddCss); - } - }, { - key: 'removeRowBg', - - /** - * Removes row background color - * @param {Number} idx Row index - */ - value: function removeRowBg(idx) { - if (isNaN(idx)) { - return; - } - var rows = this.tf.tbl.rows; - _Dom2['default'].removeClass(rows[idx], this.oddCss); - _Dom2['default'].removeClass(rows[idx], this.evenCss); - } - }, { - key: 'remove', - - /** - * Removes all alternating backgrounds - */ - value: function remove() { - if (!this.tf.hasGrid()) { - return; - } - for (var i = this.tf.refRow; i < this.tf.nbRows; i++) { - this.removeRowBg(i); - } - } - }, { - key: 'enable', - value: function enable() { - this.tf.alternateBgs = true; - } - }, { - key: 'disable', - value: function disable() { - this.tf.alternateBgs = false; - } - }]); - - return AlternateRows; - })(); - - exports.AlternateRows = AlternateRows; - -/***/ }, -/* 23 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - Object.defineProperty(exports, '__esModule', { - value: true - }); - - var _Str = __webpack_require__(4); - - var _Str2 = _interopRequireDefault(_Str); - - exports['default'] = { - ignoreCase: function ignoreCase(a, b) { - var x = _Str2['default'].lower(a); - var y = _Str2['default'].lower(b); - return x < y ? -1 : x > y ? 1 : 0; - } - }; - module.exports = exports['default']; - -/***/ } -/******/ ]) -}); -; -//# sourceMappingURL=tablefilter.js.map \ No newline at end of file +},l=function(){function t(t,e){for(var s=0;s<, <=, >, >=, =, *, !, {, }, ||,&&, [empty], [nonempty], rgx:
Learn more.
',this.instrHtml=s.help_instructions_html||null,this.btnText=s.help_instructions_btn_text||"?",this.btnHtml=s.help_instructions_btn_html||null,this.btnCssClass=s.help_instructions_btn_css_class||"helpBtn",this.contCssClass=s.help_instructions_container_css_class||"helpCont",this.btn=null,this.cont=null,this.defaultHtml='

TableFilter v. '+e.version+'

https://github.com/koalyptus/TableFilter/
©2015-'+e.year+' Max Guglielmi.
',this.prfxHelpSpan="helpSpan_",this.prfxHelpDiv="helpDiv_",this.tf=e}return l(t,[{key:"init",value:function(){var t=this;if(!this.btn){var e=this.tf,s=r["default"].create("span",["id",this.prfxHelpSpan+e.id]),i=r["default"].create("div",["id",this.prfxHelpDiv+e.id]);this.tgtId||e.setToolbar();var a=this.tgtId?r["default"].id(this.tgtId):e.rDiv;a.appendChild(s);var l=this.contTgtId?r["default"].id(this.contTgtId):s;if(this.btnHtml){s.innerHTML=this.btnHtml;var n=s.firstChild;h["default"].add(n,"click",function(){t.toggle()}),l.appendChild(i)}else{l.appendChild(i);var o=r["default"].create("a",["href","javascript:void(0);"]);o.className=this.btnCssClass,o.appendChild(r["default"].text(this.btnText)),s.appendChild(o),h["default"].add(o,"click",function(){t.toggle()})}this.instrHtml?(this.contTgtId&&l.appendChild(i),i.innerHTML=this.instrHtml,this.contTgtId||(i.className=this.contCssClass,h["default"].add(i,"dblclick",function(){t.toggle()}))):(i.innerHTML=this.instrText,i.className=this.contCssClass,h["default"].add(i,"dblclick",function(){t.toggle()})),i.innerHTML+=this.defaultHtml,h["default"].add(i,"click",function(){t.toggle()}),this.cont=i,this.btn=s}}},{key:"toggle",value:function(){if(this.cont){var t=this.cont.style.display;""===t||"none"===t?this.cont.style.display="inline":this.cont.style.display="none"}}},{key:"destroy",value:function(){this.btn&&(this.btn.parentNode.removeChild(this.btn),this.btn=null,this.cont&&(this.cont.parentNode.removeChild(this.cont),this.cont=null))}}]),t}();e.Help=d},function(t,e,s){"use strict";var i=function(t){return t&&t.__esModule?t:{"default":t}},a=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},l=function(){function t(t,e){for(var s=0;sn;n++){var r=s?n:e[n];this.setRowBg(r,l),l++}}},{key:"setRowBg",value:function(t,e){if(this.tf.alternateBgs&&!isNaN(t)){var s=this.tf.tbl.rows,i=isNaN(e)?t:e;this.removeRowBg(t),r["default"].addClass(s[t],i%2?this.evenCss:this.oddCss)}}},{key:"removeRowBg",value:function(t){if(!isNaN(t)){var e=this.tf.tbl.rows;r["default"].removeClass(e[t],this.oddCss),r["default"].removeClass(e[t],this.evenCss)}}},{key:"remove",value:function(){if(this.tf.hasGrid())for(var t=this.tf.refRow;ts?-1:s>i?1:0}},t.exports=e["default"]}])}); \ No newline at end of file diff --git a/dist/tablefilter/tf-1.js b/dist/tablefilter/tf-1.js index 4a5029c1..472a5fc1 100644 --- a/dist/tablefilter/tf-1.js +++ b/dist/tablefilter/tf-1.js @@ -1,2222 +1,8 @@ -webpackJsonp([1],[ -/* 0 */, -/* 1 */ -/***/ function(module, exports, __webpack_require__) { +/** + * TableFilter v0.0.0 by Max Guglielmi + * build date: 2015-08-09T12:32:52.508Z + * MIT License + */ - var map = { - "./array": 7, - "./array.js": 7, - "./cookie": 5, - "./cookie.js": 5, - "./date": 8, - "./date.js": 8, - "./dom": 3, - "./dom.js": 3, - "./event": 2, - "./event.js": 2, - "./extensions/advancedGrid/adapterEzEditTable": 24, - "./extensions/advancedGrid/adapterEzEditTable.js": 24, - "./extensions/advancedGrid/advancedGrid": 25, - "./extensions/advancedGrid/advancedGrid.js": 25, - "./extensions/colOps/colOps": 26, - "./extensions/colOps/colOps.js": 26, - "./extensions/colsVisibility/colsVisibility": 27, - "./extensions/colsVisibility/colsVisibility.js": 27, - "./extensions/filtersVisibility/filtersVisibility": 28, - "./extensions/filtersVisibility/filtersVisibility.js": 28, - "./extensions/sort/adapterSortabletable": 29, - "./extensions/sort/adapterSortabletable.js": 29, - "./extensions/sort/sort": 30, - "./extensions/sort/sort.js": 30, - "./helpers": 9, - "./helpers.js": 9, - "./modules/alternateRows": 22, - "./modules/alternateRows.js": 22, - "./modules/checkList": 16, - "./modules/checkList.js": 16, - "./modules/clearButton": 20, - "./modules/clearButton.js": 20, - "./modules/dropdown": 15, - "./modules/dropdown.js": 15, - "./modules/gridLayout": 11, - "./modules/gridLayout.js": 11, - "./modules/help": 21, - "./modules/help.js": 21, - "./modules/highlightKeywords": 13, - "./modules/highlightKeywords.js": 13, - "./modules/loader": 12, - "./modules/loader.js": 12, - "./modules/paging": 19, - "./modules/paging.js": 19, - "./modules/popupFilter": 14, - "./modules/popupFilter.js": 14, - "./modules/rowsCounter": 17, - "./modules/rowsCounter.js": 17, - "./modules/statusBar": 18, - "./modules/statusBar.js": 18, - "./modules/store": 10, - "./modules/store.js": 10, - "./sort": 23, - "./sort.js": 23, - "./string": 4, - "./string.js": 4, - "./types": 6, - "./types.js": 6 - }; - function webpackContext(req) { - return __webpack_require__(webpackContextResolve(req)); - }; - function webpackContextResolve(req) { - return map[req] || (function() { throw new Error("Cannot find module '" + req + "'.") }()); - }; - webpackContext.keys = function webpackContextKeys() { - return Object.keys(map); - }; - webpackContext.resolve = webpackContextResolve; - module.exports = webpackContext; - webpackContext.id = 1; - - -/***/ }, -/* 2 */, -/* 3 */, -/* 4 */, -/* 5 */, -/* 6 */, -/* 7 */, -/* 8 */, -/* 9 */, -/* 10 */, -/* 11 */, -/* 12 */, -/* 13 */, -/* 14 */, -/* 15 */, -/* 16 */, -/* 17 */, -/* 18 */, -/* 19 */, -/* 20 */, -/* 21 */, -/* 22 */, -/* 23 */, -/* 24 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - - Object.defineProperty(exports, '__esModule', { - value: true - }); - - var _Dom = __webpack_require__(3); - - var _Dom2 = _interopRequireDefault(_Dom); - - var _Arr = __webpack_require__(7); - - var _Arr2 = _interopRequireDefault(_Arr); - - var AdapterEzEditTable = (function () { - /** - * Adapter module for ezEditTable, an external library providing advanced - * grid features (selection and edition): - * http://codecanyon.net/item/ezedittable-enhance-html-tables/2425123?ref=koalyptus - * - * @param {Object} tf TableFilter instance - */ - - function AdapterEzEditTable(tf, cfg) { - _classCallCheck(this, AdapterEzEditTable); - - // ezEditTable config - this.initialized = false; - this.desc = cfg.description || 'ezEditTable adapter'; - this.filename = cfg.filename || 'ezEditTable.js'; - this.vendorPath = cfg.vendor_path; - this.loadStylesheet = Boolean(cfg.load_stylesheet); - this.stylesheet = cfg.stylesheet || this.vendorPath + 'ezEditTable.css'; - this.stylesheetName = cfg.stylesheet_name || 'ezEditTableCss'; - this.err = 'Failed to instantiate EditTable object.\n"ezEditTable" ' + 'dependency not found.'; - - this._ezEditTable = null; - this.cfg = cfg; - this.tf = tf; - } - - _createClass(AdapterEzEditTable, [{ - key: 'init', - - /** - * Conditionally load ezEditTable library and set advanced grid - * @return {[type]} [description] - */ - value: function init() { - var _this = this; - - var tf = this.tf; - if (window.EditTable) { - this._setAdvancedGrid(); - } else { - var path = this.vendorPath + this.filename; - tf['import'](this.filename, path, function () { - _this._setAdvancedGrid(); - }); - } - if (this.loadStylesheet && !tf.isImported(this.stylesheet, 'link')) { - tf['import'](this.stylesheetName, this.stylesheet, null, 'link'); - } - } - }, { - key: '_setAdvancedGrid', - - /** - * Instantiate ezEditTable component for advanced grid features - */ - value: function _setAdvancedGrid() { - var tf = this.tf; - - //start row for EditTable constructor needs to be calculated - var startRow, - cfg = this.cfg, - thead = _Dom2['default'].tag(tf.tbl, 'thead'); - - //if thead exists and startRow not specified, startRow is calculated - //automatically by EditTable - if (thead.length > 0 && !cfg.startRow) { - startRow = undefined; - } - //otherwise startRow config property if any or TableFilter refRow - else { - startRow = cfg.startRow || tf.refRow; - } - - cfg.base_path = cfg.base_path || tf.basePath + 'ezEditTable/'; - var editable = cfg.editable; - var selectable = cfg.selection; - - if (selectable) { - cfg.default_selection = cfg.default_selection || 'row'; - } - //CSS Styles - cfg.active_cell_css = cfg.active_cell_css || 'ezETSelectedCell'; - - var _lastValidRowIndex = 0; - var _lastRowIndex = 0; - - if (selectable) { - //Row navigation needs to be calculated according to TableFilter's - //validRowsIndex array - var onAfterSelection = function onAfterSelection(et, selectedElm, e) { - var slc = et.Selection; - //Next valid filtered row needs to be selected - var doSelect = function doSelect(nextRowIndex) { - if (et.defaultSelection === 'row') { - slc.SelectRowByIndex(nextRowIndex); - } else { - et.ClearSelections(); - var cellIndex = selectedElm.cellIndex, - row = tf.tbl.rows[nextRowIndex]; - if (et.defaultSelection === 'both') { - slc.SelectRowByIndex(nextRowIndex); - } - if (row) { - slc.SelectCell(row.cells[cellIndex]); - } - } - //Table is filtered - if (tf.validRowsIndex.length !== tf.getRowsNb()) { - var r = tf.tbl.rows[nextRowIndex]; - if (r) { - r.scrollIntoView(false); - } - if (cell) { - if (cell.cellIndex === tf.getCellsNb() - 1 && tf.gridLayout) { - tf.tblCont.scrollLeft = 100000000; - } else if (cell.cellIndex === 0 && tf.gridLayout) { - tf.tblCont.scrollLeft = 0; - } else { - cell.scrollIntoView(false); - } - } - } - }; - - //table is not filtered - if (!tf.validRowsIndex) { - return; - } - var validIndexes = tf.validRowsIndex, - validIdxLen = validIndexes.length, - row = et.defaultSelection !== 'row' ? selectedElm.parentNode : selectedElm, - - //cell for default_selection = 'both' or 'cell' - cell = selectedElm.nodeName === 'TD' ? selectedElm : null, - keyCode = e !== undefined ? et.Event.GetKey(e) : 0, - isRowValid = _Arr2['default'].has(validIndexes, row.rowIndex), - nextRowIndex, - - //pgup/pgdown keys - d = keyCode === 34 || keyCode === 33 ? tf.feature('paging').pagingLength || et.nbRowsPerPage : 1; - - //If next row is not valid, next valid filtered row needs to be - //calculated - if (!isRowValid) { - //Selection direction up/down - if (row.rowIndex > _lastRowIndex) { - //last row - if (row.rowIndex >= validIndexes[validIdxLen - 1]) { - nextRowIndex = validIndexes[validIdxLen - 1]; - } else { - var calcRowIndex = _lastValidRowIndex + d; - if (calcRowIndex > validIdxLen - 1) { - nextRowIndex = validIndexes[validIdxLen - 1]; - } else { - nextRowIndex = validIndexes[calcRowIndex]; - } - } - } else { - //first row - if (row.rowIndex <= validIndexes[0]) { - nextRowIndex = validIndexes[0]; - } else { - var v = validIndexes[_lastValidRowIndex - d]; - nextRowIndex = v ? v : validIndexes[0]; - } - } - _lastRowIndex = row.rowIndex; - doSelect(nextRowIndex); - } else { - //If filtered row is valid, special calculation for - //pgup/pgdown keys - if (keyCode !== 34 && keyCode !== 33) { - _lastValidRowIndex = _Arr2['default'].indexByValue(validIndexes, row.rowIndex); - _lastRowIndex = row.rowIndex; - } else { - if (keyCode === 34) { - //pgdown - //last row - if (_lastValidRowIndex + d <= validIdxLen - 1) { - nextRowIndex = validIndexes[_lastValidRowIndex + d]; - } else { - nextRowIndex = [validIdxLen - 1]; - } - } else { - //pgup - //first row - if (_lastValidRowIndex - d <= validIndexes[0]) { - nextRowIndex = validIndexes[0]; - } else { - nextRowIndex = validIndexes[_lastValidRowIndex - d]; - } - } - _lastRowIndex = nextRowIndex; - _lastValidRowIndex = _Arr2['default'].indexByValue(validIndexes, nextRowIndex); - doSelect(nextRowIndex); - } - } - }; - - //Page navigation has to be enforced whenever selected row is out of - //the current page range - var onBeforeSelection = function onBeforeSelection(et, selectedElm) { - var row = et.defaultSelection !== 'row' ? selectedElm.parentNode : selectedElm; - if (tf.paging) { - if (tf.feature('paging').nbPages > 1) { - var paging = tf.feature('paging'); - //page length is re-assigned in case it has changed - et.nbRowsPerPage = paging.pagingLength; - var validIndexes = tf.validRowsIndex, - validIdxLen = validIndexes.length, - pagingEndRow = parseInt(paging.startPagingRow, 10) + parseInt(paging.pagingLength, 10); - var rowIndex = row.rowIndex; - - if (rowIndex === validIndexes[validIdxLen - 1] && paging.currentPageNb !== paging.nbPages) { - paging.setPage('last'); - } else if (rowIndex == validIndexes[0] && paging.currentPageNb !== 1) { - paging.setPage('first'); - } else if (rowIndex > validIndexes[pagingEndRow - 1] && rowIndex < validIndexes[validIdxLen - 1]) { - paging.setPage('next'); - } else if (rowIndex < validIndexes[paging.startPagingRow] && rowIndex > validIndexes[0]) { - paging.setPage('previous'); - } - } - } - }; - - //Selected row needs to be visible when paging is activated - if (tf.paging) { - tf.feature('paging').onAfterChangePage = function (paging) { - var advGrid = paging.tf.extension('advancedGrid'); - var et = advGrid._ezEditTable; - var slc = et.Selection; - var row = slc.GetActiveRow(); - if (row) { - row.scrollIntoView(false); - } - var cell = slc.GetActiveCell(); - if (cell) { - cell.scrollIntoView(false); - } - }; - } - - //Rows navigation when rows are filtered is performed with the - //EditTable row selection callback events - if (cfg.default_selection === 'row') { - var fnB = cfg.on_before_selected_row; - cfg.on_before_selected_row = function () { - onBeforeSelection(arguments[0], arguments[1], arguments[2]); - if (fnB) { - fnB.call(null, arguments[0], arguments[1], arguments[2]); - } - }; - var fnA = cfg.on_after_selected_row; - cfg.on_after_selected_row = function () { - onAfterSelection(arguments[0], arguments[1], arguments[2]); - if (fnA) { - fnA.call(null, arguments[0], arguments[1], arguments[2]); - } - }; - } else { - var fnD = cfg.on_before_selected_cell; - cfg.on_before_selected_cell = function () { - onBeforeSelection(arguments[0], arguments[1], arguments[2]); - if (fnD) { - fnD.call(null, arguments[0], arguments[1], arguments[2]); - } - }; - var fnC = cfg.on_after_selected_cell; - cfg.on_after_selected_cell = function () { - onAfterSelection(arguments[0], arguments[1], arguments[2]); - if (fnC) { - fnC.call(null, arguments[0], arguments[1], arguments[2]); - } - }; - } - } - if (editable) { - //Added or removed rows, TF rows number needs to be re-calculated - var fnE = cfg.on_added_dom_row; - cfg.on_added_dom_row = function () { - tf.nbFilterableRows++; - if (!tf.paging) { - tf.feature('rowsCounter').refresh(); - } else { - tf.nbRows++; - tf.nbVisibleRows++; - tf.nbFilterableRows++; - tf.paging = false; - tf.feature('paging').destroy(); - tf.feature('paging').reset(); - } - if (tf.alternateBgs) { - tf.feature('alternateRows').init(); - } - if (fnE) { - fnE.call(null, arguments[0], arguments[1], arguments[2]); - } - }; - if (cfg.actions && cfg.actions['delete']) { - var fnF = cfg.actions['delete'].on_after_submit; - cfg.actions['delete'].on_after_submit = function () { - tf.nbFilterableRows--; - if (!tf.paging) { - tf.feature('rowsCounter').refresh(); - } else { - tf.nbRows--; - tf.nbVisibleRows--; - tf.nbFilterableRows--; - tf.paging = false; - tf.feature('paging').destroy(); - tf.feature('paging').reset(false); - } - if (tf.alternateBgs) { - tf.feature('alternateRows').init(); - } - if (fnF) { - fnF.call(null, arguments[0], arguments[1]); - } - }; - } - } - - try { - this._ezEditTable = new EditTable(tf.id, cfg, startRow); - this._ezEditTable.Init(); - } catch (e) { - throw new Error(this.err); - } - - this.initialized = true; - } - }, { - key: 'reset', - - /** - * Reset advanced grid when previously removed - */ - value: function reset() { - var ezEditTable = this._ezEditTable; - if (ezEditTable) { - if (this.cfg.selection) { - ezEditTable.Selection.Set(); - } - if (this.cfg.editable) { - ezEditTable.Editable.Set(); - } - } - } - }, { - key: 'destroy', - - /** - * Remove advanced grid - */ - value: function destroy() { - var ezEditTable = this._ezEditTable; - if (ezEditTable) { - if (this.cfg.selection) { - ezEditTable.Selection.ClearSelections(); - ezEditTable.Selection.Remove(); - } - if (this.cfg.editable) { - ezEditTable.Editable.Remove(); - } - } - this.initialized = false; - } - }]); - - return AdapterEzEditTable; - })(); - - exports['default'] = AdapterEzEditTable; - module.exports = exports['default']; - -/***/ }, -/* 25 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - Object.defineProperty(exports, '__esModule', { - value: true - }); - - var _AdapterEzEditTable = __webpack_require__(24); - - var _AdapterEzEditTable2 = _interopRequireDefault(_AdapterEzEditTable); - - exports['default'] = _AdapterEzEditTable2['default']; - module.exports = exports['default']; - -/***/ }, -/* 26 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - - Object.defineProperty(exports, '__esModule', { - value: true - }); - - var _Dom = __webpack_require__(3); - - var _Dom2 = _interopRequireDefault(_Dom); - - var _Str = __webpack_require__(4); - - var _Str2 = _interopRequireDefault(_Str); - - var _Types = __webpack_require__(6); - - var _Types2 = _interopRequireDefault(_Types); - - var ColOps = (function () { - - /** - * Column calculations - * @param {Object} tf TableFilter instance - */ - - function ColOps(tf, opts) { - _classCallCheck(this, ColOps); - - //calls function before col operation - this.onBeforeOperation = _Types2['default'].isFn(opts.on_before_operation) ? opts.on_before_operation : null; - //calls function after col operation - this.onAfterOperation = _Types2['default'].isFn(opts.on_after_operation) ? opts.on_after_operation : null; - - this.opts = opts; - this.tf = tf; - } - - _createClass(ColOps, [{ - key: 'init', - value: function init() { - this.calc(); - } - }, { - key: 'calc', - - /** - * Calculates columns' values - * Configuration options are stored in 'opts' property - * - 'id' contains ids of elements showing result (array) - * - 'col' contains the columns' indexes (array) - * - 'operation' contains operation type (array, values: 'sum', 'mean', - * 'min', 'max', 'median', 'q1', 'q3') - * - 'write_method' array defines which method to use for displaying the - * result (innerHTML, setValue, createTextNode) - default: 'innerHTML' - * - 'tot_row_index' defines in which row results are displayed - * (integers array) - * - * - changes made by Nuovella: - * (1) optimized the routine (now it will only process each column once), - * (2) added calculations for the median, lower and upper quartile. - */ - value: function calc() { - var tf = this.tf; - if (!tf.isFirstLoad && !tf.hasGrid()) { - return; - } - - if (this.onBeforeOperation) { - this.onBeforeOperation.call(null, tf); - } - - var opts = this.opts, - labelId = opts.id, - colIndex = opts.col, - operation = opts.operation, - outputType = opts.write_method, - totRowIndex = opts.tot_row_index, - excludeRow = opts.exclude_row, - decimalPrecision = _Types2['default'].isUndef(opts.decimal_precision) ? 2 : opts.decimal_precision; - - //nuovella: determine unique list of columns to operate on - var ucolIndex = [], - ucolMax = 0; - ucolIndex[ucolMax] = colIndex[0]; - - for (var ii = 1; ii < colIndex.length; ii++) { - var saved = 0; - //see if colIndex[ii] is already in the list of unique indexes - for (var jj = 0; jj <= ucolMax; jj++) { - if (ucolIndex[jj] === colIndex[ii]) { - saved = 1; - } - } - //if not saved then, save the index; - if (saved === 0) { - ucolMax++; - ucolIndex[ucolMax] = colIndex[ii]; - } - } - - if (_Str2['default'].lower(typeof labelId) == 'object' && _Str2['default'].lower(typeof colIndex) == 'object' && _Str2['default'].lower(typeof operation) == 'object') { - var rows = tf.tbl.rows, - colvalues = []; - - for (var ucol = 0; ucol <= ucolMax; ucol++) { - //this retrieves col values - //use ucolIndex because we only want to pass through this loop - //once for each column get the values in this unique column - colvalues.push(tf.getColValues(ucolIndex[ucol], true, excludeRow)); - - //next: calculate all operations for this column - var result, - nbvalues = 0, - temp, - meanValue = 0, - sumValue = 0, - minValue = null, - maxValue = null, - q1Value = null, - medValue = null, - q3Value = null, - meanFlag = 0, - sumFlag = 0, - minFlag = 0, - maxFlag = 0, - q1Flag = 0, - medFlag = 0, - q3Flag = 0, - theList = [], - opsThisCol = [], - decThisCol = [], - labThisCol = [], - oTypeThisCol = [], - mThisCol = -1; - - for (var k = 0; k < colIndex.length; k++) { - if (colIndex[k] === ucolIndex[ucol]) { - mThisCol++; - opsThisCol[mThisCol] = _Str2['default'].lower(operation[k]); - decThisCol[mThisCol] = decimalPrecision[k]; - labThisCol[mThisCol] = labelId[k]; - oTypeThisCol = outputType !== undefined && _Str2['default'].lower(typeof outputType) === 'object' ? outputType[k] : null; - - switch (opsThisCol[mThisCol]) { - case 'mean': - meanFlag = 1; - break; - case 'sum': - sumFlag = 1; - break; - case 'min': - minFlag = 1; - break; - case 'max': - maxFlag = 1; - break; - case 'median': - medFlag = 1; - break; - case 'q1': - q1Flag = 1; - break; - case 'q3': - q3Flag = 1; - break; - } - } - } - - for (var j = 0; j < colvalues[ucol].length; j++) { - //sort the list for calculation of median and quartiles - if (q1Flag == 1 || q3Flag == 1 || medFlag == 1) { - if (j < colvalues[ucol].length - 1) { - for (k = j + 1; k < colvalues[ucol].length; k++) { - if (eval(colvalues[ucol][k]) < eval(colvalues[ucol][j])) { - temp = colvalues[ucol][j]; - colvalues[ucol][j] = colvalues[ucol][k]; - colvalues[ucol][k] = temp; - } - } - } - } - var cvalue = parseFloat(colvalues[ucol][j]); - theList[j] = parseFloat(cvalue); - - if (!isNaN(cvalue)) { - nbvalues++; - if (sumFlag === 1 || meanFlag === 1) { - sumValue += parseFloat(cvalue); - } - if (minFlag === 1) { - if (minValue === null) { - minValue = parseFloat(cvalue); - } else { - minValue = parseFloat(cvalue) < minValue ? parseFloat(cvalue) : minValue; - } - } - if (maxFlag === 1) { - if (maxValue === null) { - maxValue = parseFloat(cvalue); - } else { - maxValue = parseFloat(cvalue) > maxValue ? parseFloat(cvalue) : maxValue; - } - } - } - } //for j - if (meanFlag === 1) { - meanValue = sumValue / nbvalues; - } - if (medFlag === 1) { - var aux = 0; - if (nbvalues % 2 === 1) { - aux = Math.floor(nbvalues / 2); - medValue = theList[aux]; - } else { - medValue = (theList[nbvalues / 2] + theList[nbvalues / 2 - 1]) / 2; - } - } - var posa; - if (q1Flag === 1) { - posa = 0; - posa = Math.floor(nbvalues / 4); - if (4 * posa == nbvalues) { - q1Value = (theList[posa - 1] + theList[posa]) / 2; - } else { - q1Value = theList[posa]; - } - } - if (q3Flag === 1) { - posa = 0; - var posb = 0; - posa = Math.floor(nbvalues / 4); - if (4 * posa === nbvalues) { - posb = 3 * posa; - q3Value = (theList[posb] + theList[posb - 1]) / 2; - } else { - q3Value = theList[nbvalues - posa - 1]; - } - } - - for (var i = 0; i <= mThisCol; i++) { - switch (opsThisCol[i]) { - case 'mean': - result = meanValue; - break; - case 'sum': - result = sumValue; - break; - case 'min': - result = minValue; - break; - case 'max': - result = maxValue; - break; - case 'median': - result = medValue; - break; - case 'q1': - result = q1Value; - break; - case 'q3': - result = q3Value; - break; - } - - var precision = !isNaN(decThisCol[i]) ? decThisCol[i] : 2; - - //if outputType is defined - if (oTypeThisCol && result) { - result = result.toFixed(precision); - - if (_Dom2['default'].id(labThisCol[i])) { - switch (_Str2['default'].lower(oTypeThisCol)) { - case 'innerhtml': - if (isNaN(result) || !isFinite(result) || nbvalues === 0) { - _Dom2['default'].id(labThisCol[i]).innerHTML = '.'; - } else { - _Dom2['default'].id(labThisCol[i]).innerHTML = result; - } - break; - case 'setvalue': - _Dom2['default'].id(labThisCol[i]).value = result; - break; - case 'createtextnode': - var oldnode = _Dom2['default'].id(labThisCol[i]).firstChild; - var txtnode = _Dom2['default'].text(result); - _Dom2['default'].id(labThisCol[i]).replaceChild(txtnode, oldnode); - break; - } //switch - } - } else { - try { - if (isNaN(result) || !isFinite(result) || nbvalues === 0) { - _Dom2['default'].id(labThisCol[i]).innerHTML = '.'; - } else { - _Dom2['default'].id(labThisCol[i]).innerHTML = result.toFixed(precision); - } - } catch (e) {} //catch - } //else - } //for i - - // row(s) with result are always visible - var totRow = totRowIndex && totRowIndex[ucol] ? rows[totRowIndex[ucol]] : null; - if (totRow) { - totRow.style.display = ''; - } - } //for ucol - } //if typeof - - if (this.onAfterOperation) { - this.onAfterOperation.call(null, tf); - } - } - }, { - key: 'destroy', - value: function destroy() {} - }]); - - return ColOps; - })(); - - exports['default'] = ColOps; - module.exports = exports['default']; - -/***/ }, -/* 27 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - - Object.defineProperty(exports, '__esModule', { - value: true - }); - - var _Dom = __webpack_require__(3); - - var _Dom2 = _interopRequireDefault(_Dom); - - var _Types = __webpack_require__(6); - - var _Types2 = _interopRequireDefault(_Types); - - var _Event = __webpack_require__(2); - - var _Event2 = _interopRequireDefault(_Event); - - var _Arr = __webpack_require__(7); - - var _Arr2 = _interopRequireDefault(_Arr); - - var ColsVisibility = (function () { - - /** - * Columns Visibility extension - * @param {Object} tf TableFilter instance - * @param {Object} f Config - */ - - function ColsVisibility(tf, f) { - _classCallCheck(this, ColsVisibility); - - // Configuration object - var cfg = tf.config(); - - this.initialized = false; - this.name = f.name; - this.desc = f.description || 'Columns visibility manager'; - - //show/hide cols span element - this.spanEl = null; - //show/hide cols button element - this.btnEl = null; - //show/hide cols container div element - this.contEl = null; - - //tick to hide or show column - this.tickToHide = f.tick_to_hide === false ? false : true; - //enables/disables cols manager generation - this.manager = f.manager === false ? false : true; - //only if external headers - this.headersTbl = f.headers_table || false; - //only if external headers - this.headersIndex = f.headers_index || 1; - //id of container element - this.contElTgtId = f.container_target_id || null; - //alternative headers text - this.headersText = f.headers_text || null; - //id of button container element - this.btnTgtId = f.btn_target_id || null; - //defines show/hide cols text - this.btnText = f.btn_text || 'Columns▼'; - //defines show/hide cols button innerHtml - this.btnHtml = f.btn_html || null; - //defines css class for show/hide cols button - this.btnCssClass = f.btn_css_class || 'colVis'; - //defines close link text - this.btnCloseText = f.btn_close_text || 'Close'; - //defines close button innerHtml - this.btnCloseHtml = f.btn_close_html || null; - //defines css class for close button - this.btnCloseCssClass = f.btn_close_css_class || this.btnCssClass; - this.stylesheet = f.stylesheet || 'colsVisibility.css'; - //span containing show/hide cols button - this.prfx = 'colVis_'; - //defines css class span containing show/hide cols - this.spanCssClass = f.span_css_class || 'colVisSpan'; - this.prfxCont = this.prfx + 'Cont_'; - //defines css class div containing show/hide cols - this.contCssClass = f.cont_css_class || 'colVisCont'; - //defines css class for cols list (ul) - this.listCssClass = cfg.list_css_class || 'cols_checklist'; - //defines css class for list item (li) - this.listItemCssClass = cfg.checklist_item_css_class || 'cols_checklist_item'; - //defines css class for selected list item (li) - this.listSlcItemCssClass = cfg.checklist_selected_item_css_class || 'cols_checklist_slc_item'; - //text preceding columns list - this.text = f.text || (this.tickToHide ? 'Hide: ' : 'Show: '); - this.atStart = f.at_start || null; - this.enableHover = Boolean(f.enable_hover); - //enables select all option - this.enableTickAll = Boolean(f.enable_tick_all); - //text preceding columns list - this.tickAllText = f.tick_all_text || 'Select all:'; - - //array containing hidden columns indexes - this.hiddenCols = []; - this.tblHasColTag = _Dom2['default'].tag(tf.tbl, 'col').length > 0; - - //callback invoked just after cols manager is loaded - this.onLoaded = _Types2['default'].isFn(f.on_loaded) ? f.on_loaded : null; - //calls function before cols manager is opened - this.onBeforeOpen = _Types2['default'].isFn(f.on_before_open) ? f.on_before_open : null; - //calls function after cols manager is opened - this.onAfterOpen = _Types2['default'].isFn(f.on_after_open) ? f.on_after_open : null; - //calls function before cols manager is closed - this.onBeforeClose = _Types2['default'].isFn(f.on_before_close) ? f.on_before_close : null; - //calls function after cols manager is closed - this.onAfterClose = _Types2['default'].isFn(f.on_after_close) ? f.on_after_close : null; - - //callback before col is hidden - this.onBeforeColHidden = _Types2['default'].isFn(f.on_before_col_hidden) ? f.on_before_col_hidden : null; - //callback after col is hidden - this.onAfterColHidden = _Types2['default'].isFn(f.on_after_col_hidden) ? f.on_after_col_hidden : null; - //callback before col is displayed - this.onBeforeColDisplayed = _Types2['default'].isFn(f.on_before_col_displayed) ? f.on_before_col_displayed : null; - //callback after col is displayed - this.onAfterColDisplayed = _Types2['default'].isFn(f.on_after_col_displayed) ? f.on_after_col_displayed : null; - - //Grid layout compatibility - if (tf.gridLayout) { - this.headersTbl = tf.feature('gridLayout').headTbl; //headers table - this.headersIndex = 0; //headers index - this.onAfterColDisplayed = function () {}; - this.onAfterColHidden = function () {}; - } - - //Loads extension stylesheet - tf['import'](f.name + 'Style', tf.stylePath + this.stylesheet, null, 'link'); - - this.tf = tf; - } - - _createClass(ColsVisibility, [{ - key: 'toggle', - value: function toggle() { - var contDisplay = this.contEl.style.display; - var onBeforeOpen = this.onBeforeOpen; - var onBeforeClose = this.onBeforeClose; - var onAfterOpen = this.onAfterOpen; - var onAfterClose = this.onAfterClose; - - if (onBeforeOpen && contDisplay !== 'inline') { - onBeforeOpen.call(null, this); - } - if (onBeforeClose && contDisplay === 'inline') { - onBeforeClose.call(null, this); - } - - this.contEl.style.display = contDisplay === 'inline' ? 'none' : 'inline'; - - if (onAfterOpen && contDisplay !== 'inline') { - onAfterOpen.call(null, this); - } - if (onAfterClose && contDisplay === 'inline') { - onAfterClose.call(null, this); - } - } - }, { - key: 'checkItem', - value: function checkItem(lbl) { - var li = lbl.parentNode; - if (!li || !lbl) { - return; - } - var isChecked = lbl.firstChild.checked; - var colIndex = lbl.firstChild.getAttribute('id').split('_')[1]; - colIndex = parseInt(colIndex, 10); - if (isChecked) { - _Dom2['default'].addClass(li, this.listSlcItemCssClass); - } else { - _Dom2['default'].removeClass(li, this.listSlcItemCssClass); - } - - var hide = false; - if (this.tickToHide && isChecked || !this.tickToHide && !isChecked) { - hide = true; - } - this.setHidden(colIndex, hide); - } - }, { - key: 'init', - value: function init() { - if (!this.manager) { - return; - } - this.buildBtn(); - this.buildManager(); - - this.initialized = true; - } - }, { - key: 'buildBtn', - - /** - * Build main button UI - */ - value: function buildBtn() { - var _this = this; - - if (this.btnEl) { - return; - } - var tf = this.tf; - var span = _Dom2['default'].create('span', ['id', this.prfx + tf.id]); - span.className = this.spanCssClass; - - //Container element (rdiv or custom element) - if (!this.btnTgtId) { - tf.setToolbar(); - } - var targetEl = !this.btnTgtId ? tf.rDiv : _Dom2['default'].id(this.btnTgtId); - - if (!this.btnTgtId) { - var firstChild = targetEl.firstChild; - firstChild.parentNode.insertBefore(span, firstChild); - } else { - targetEl.appendChild(span); - } - - if (!this.btnHtml) { - var btn = _Dom2['default'].create('a', ['href', 'javascript:;']); - btn.className = this.btnCssClass; - btn.title = this.desc; - - btn.innerHTML = this.btnText; - span.appendChild(btn); - if (!this.enableHover) { - _Event2['default'].add(btn, 'click', function (evt) { - _this.toggle(evt); - }); - } else { - _Event2['default'].add(btn, 'mouseover', function (evt) { - _this.toggle(evt); - }); - } - } else { - //Custom html - span.innerHTML = this.btnHtml; - var colVisEl = span.firstChild; - if (!this.enableHover) { - _Event2['default'].add(colVisEl, 'click', function (evt) { - _this.toggle(evt); - }); - } else { - _Event2['default'].add(colVisEl, 'mouseover', function (evt) { - _this.toggle(evt); - }); - } - } - - this.spanEl = span; - this.btnEl = this.spanEl.firstChild; - - if (this.onLoaded) { - this.onLoaded.call(null, this); - } - } - }, { - key: 'buildManager', - - /** - * Build columns manager UI - */ - value: function buildManager() { - var _this2 = this; - - var tf = this.tf; - - var container = !this.contElTgtId ? _Dom2['default'].create('div', ['id', this.prfxCont + tf.id]) : _Dom2['default'].id(this.contElTgtId); - container.className = this.contCssClass; - - //Extension description - var extNameLabel = _Dom2['default'].create('p'); - extNameLabel.innerHTML = this.text; - container.appendChild(extNameLabel); - - //Headers list - var ul = _Dom2['default'].create('ul', ['id', 'ul' + this.name + '_' + tf.id]); - ul.className = this.listCssClass; - - var tbl = this.headersTbl ? this.headersTbl : tf.tbl; - var headerIndex = this.headersTbl ? this.headersIndex : tf.getHeadersRowIndex(); - var headerRow = tbl.rows[headerIndex]; - - //Tick all option - if (this.enableTickAll) { - var li = _Dom2['default'].createCheckItem('col__' + tf.id, this.tickAllText, this.tickAllText); - _Dom2['default'].addClass(li, this.listItemCssClass); - ul.appendChild(li); - li.check.checked = !this.tickToHide; - - _Event2['default'].add(li.check, 'click', function () { - for (var h = 0; h < headerRow.cells.length; h++) { - var itm = _Dom2['default'].id('col_' + h + '_' + tf.id); - if (itm && li.check.checked !== itm.checked) { - itm.click(); - itm.checked = li.check.checked; - } - } - }); - } - - for (var i = 0; i < headerRow.cells.length; i++) { - var cell = headerRow.cells[i]; - var cellText = this.headersText && this.headersText[i] ? this.headersText[i] : this._getHeaderText(cell); - var liElm = _Dom2['default'].createCheckItem('col_' + i + '_' + tf.id, cellText, cellText); - _Dom2['default'].addClass(liElm, this.listItemCssClass); - if (!this.tickToHide) { - _Dom2['default'].addClass(liElm, this.listSlcItemCssClass); - } - ul.appendChild(liElm); - if (!this.tickToHide) { - liElm.check.checked = true; - } - - _Event2['default'].add(liElm.check, 'click', function (evt) { - var elm = _Event2['default'].target(evt); - var lbl = elm.parentNode; - _this2.checkItem(lbl); - }); - } - - //separator - var p = _Dom2['default'].create('p', ['align', 'center']); - var btn; - //Close link - if (!this.btnCloseHtml) { - btn = _Dom2['default'].create('a', ['href', 'javascript:;']); - btn.className = this.btnCloseCssClass; - btn.innerHTML = this.btnCloseText; - _Event2['default'].add(btn, 'click', function (evt) { - _this2.toggle(evt); - }); - p.appendChild(btn); - } else { - p.innerHTML = this.btnCloseHtml; - btn = p.firstChild; - _Event2['default'].add(btn, 'click', function (evt) { - _this2.toggle(evt); - }); - } - - container.appendChild(ul); - container.appendChild(p); - - this.btnEl.parentNode.insertBefore(container, this.btnEl); - this.contEl = container; - - if (this.atStart) { - var a = this.atStart; - for (var k = 0; k < a.length; k++) { - var itm = _Dom2['default'].id('col_' + a[k] + '_' + tf.id); - if (itm) { - itm.click(); - } - } - } - } - }, { - key: 'setHidden', - - /** - * Hide or show specified columns - * @param {Numner} colIndex Column index - * @param {Boolean} hide hide column if true or show if false - */ - value: function setHidden(colIndex, hide) { - var tf = this.tf; - var tbl = tf.tbl; - - if (this.onBeforeColHidden && hide) { - this.onBeforeColHidden.call(null, this, colIndex); - } - if (this.onBeforeColDisplayed && !hide) { - this.onBeforeColDisplayed.call(null, this, colIndex); - } - - this._hideCells(tbl, colIndex, hide); - if (this.headersTbl) { - this._hideCells(this.headersTbl, colIndex, hide); - } - - var hiddenCols = this.hiddenCols; - if (hide) { - if (hiddenCols.indexOf(colIndex) === -1) { - this.hiddenCols.push(colIndex); - } - } else { - var itemIndex = _Arr2['default'].indexByValue(hiddenCols, colIndex, true); - if (hiddenCols.indexOf(colIndex) !== -1) { - this.hiddenCols.splice(itemIndex, 1); - } - } - - var gridLayout; - var headTbl; - var gridColElms; - if (this.onAfterColHidden && hide) { - //This event is fired just after a column is displayed for - //grid_layout support - //TODO: grid layout module should be responsible for those - //calculations - if (tf.gridLayout) { - gridLayout = tf.feature('gridLayout'); - headTbl = gridLayout.headTbl; - gridColElms = gridLayout.gridColElms; - var hiddenWidth = parseInt(gridColElms[colIndex].style.width, 10); - - var headTblW = parseInt(headTbl.style.width, 10); - headTbl.style.width = headTblW - hiddenWidth + 'px'; - tbl.style.width = headTbl.style.width; - } - this.onAfterColHidden.call(null, this, colIndex); - } - - if (this.onAfterColDisplayed && !hide) { - //This event is fired just after a column is displayed for - //grid_layout support - //TODO: grid layout module should be responsible for those - //calculations - if (tf.gridLayout) { - gridLayout = tf.feature('gridLayout'); - headTbl = gridLayout.headTbl; - gridColElms = gridLayout.gridColElms; - var width = parseInt(gridColElms[colIndex].style.width, 10); - headTbl.style.width = parseInt(headTbl.style.width, 10) + width + 'px'; - tf.tbl.style.width = headTbl.style.width; - } - this.onAfterColDisplayed.call(null, this, colIndex); - } - } - }, { - key: 'showCol', - - /** - * Show specified column - * @param {Number} colIndex Column index - */ - value: function showCol(colIndex) { - if (colIndex === undefined || !this.isColHidden(colIndex)) { - return; - } - if (this.manager && this.contEl) { - var itm = _Dom2['default'].id('col_' + colIndex + '_' + this.tf.id); - if (itm) { - itm.click(); - } - } else { - this.setHidden(colIndex, false); - } - } - }, { - key: 'hideCol', - - /** - * Hide specified column - * @param {Number} colIndex Column index - */ - value: function hideCol(colIndex) { - if (colIndex === undefined || this.isColHidden(colIndex)) { - return; - } - if (this.manager && this.contEl) { - var itm = _Dom2['default'].id('col_' + colIndex + '_' + this.tf.id); - if (itm) { - itm.click(); - } - } else { - this.setHidden(colIndex, true); - } - } - }, { - key: 'isColHidden', - - /** - * Determine if specified column is hidden - * @param {Number} colIndex Column index - */ - value: function isColHidden(colIndex) { - if (this.hiddenCols.indexOf(colIndex) !== -1) { - return true; - } - return false; - } - }, { - key: 'toggleCol', - - /** - * Toggle visibility of specified column - * @param {Number} colIndex Column index - */ - value: function toggleCol(colIndex) { - if (colIndex === undefined || this.isColHidden(colIndex)) { - this.showCol(colIndex); - } else { - this.hideCol(colIndex); - } - } - }, { - key: 'getHiddenCols', - - /** - * Returns the indexes of the columns currently hidden - * @return {Array} column indexes - */ - value: function getHiddenCols() { - return this.hiddenCols; - } - }, { - key: 'destroy', - - /** - * Remove the columns manager - */ - value: function destroy() { - if (!this.btnEl && !this.contEl) { - return; - } - if (_Dom2['default'].id(this.contElTgtId)) { - _Dom2['default'].id(this.contElTgtId).innerHTML = ''; - } else { - this.contEl.innerHTML = ''; - this.contEl.parentNode.removeChild(this.contEl); - this.contEl = null; - } - this.btnEl.innerHTML = ''; - this.btnEl.parentNode.removeChild(this.btnEl); - this.btnEl = null; - this.initialized = false; - } - }, { - key: '_getHeaderText', - value: function _getHeaderText(cell) { - if (!cell.hasChildNodes) { - return ''; - } - - for (var i = 0; i < cell.childNodes.length; i++) { - var n = cell.childNodes[i]; - if (n.nodeType === 3) { - return n.nodeValue; - } else if (n.nodeType === 1) { - if (n.id && n.id.indexOf('popUp') !== -1) { - continue; - } else { - return _Dom2['default'].getText(n); - } - } - continue; - } - return ''; - } - }, { - key: '_hideCells', - value: function _hideCells(tbl, colIndex, hide) { - for (var i = 0; i < tbl.rows.length; i++) { - var row = tbl.rows[i]; - var cell = row.cells[colIndex]; - if (cell) { - cell.style.display = hide ? 'none' : ''; - } - } - } - }]); - - return ColsVisibility; - })(); - - exports['default'] = ColsVisibility; - module.exports = exports['default']; - -/***/ }, -/* 28 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - - Object.defineProperty(exports, '__esModule', { - value: true - }); - - var _Dom = __webpack_require__(3); - - var _Dom2 = _interopRequireDefault(_Dom); - - var _Types = __webpack_require__(6); - - var _Types2 = _interopRequireDefault(_Types); - - var _Event = __webpack_require__(2); - - var _Event2 = _interopRequireDefault(_Event); - - var FiltersVisibility = (function () { - - /** - * Filters Row Visibility extension - * @param {Object} tf TableFilter instance - * @param {Object} f Config - */ - - function FiltersVisibility(tf, f) { - _classCallCheck(this, FiltersVisibility); - - this.initialized = false; - this.name = f.name; - this.desc = f.description || 'Filters row visibility manager'; - - // Path and image filenames - this.stylesheet = f.stylesheet || 'filtersVisibility.css'; - this.icnExpand = f.expand_icon_name || 'icn_exp.png'; - this.icnCollapse = f.collapse_icon_name || 'icn_clp.png'; - - //expand/collapse filters span element - this.contEl = null; - //expand/collapse filters btn element - this.btnEl = null; - - this.icnExpandHtml = 'Expand filters'; - this.icnCollapseHtml = 'Collapse filters'; - this.defaultText = 'Toggle filters'; - - //id of container element - this.targetId = f.target_id || null; - //enables/disables expand/collapse icon - this.enableIcon = f.enable_icon === false ? false : true; - this.btnText = f.btn_text || ''; - - //defines expand/collapse filters text - this.collapseBtnHtml = this.enableIcon ? this.icnCollapseHtml + this.btnText : this.btnText || this.defaultText; - this.expandBtnHtml = this.enableIcon ? this.icnExpandHtml + this.btnText : this.btnText || this.defaultText; - - //defines expand/collapse filters button innerHtml - this.btnHtml = f.btn_html || null; - //defines css class for expand/collapse filters button - this.btnCssClass = f.btn_css_class || 'btnExpClpFlt'; - //defines css class span containing expand/collapse filters - this.contCssClass = f.cont_css_class || 'expClpFlt'; - this.filtersRowIndex = !_Types2['default'].isUndef(f.filters_row_index) ? f.filters_row_index : tf.getFiltersRowIndex(); - - this.visibleAtStart = !_Types2['default'].isUndef(f.visible_at_start) ? Boolean(f.visible_at_start) : true; - - // Prefix - this.prfx = 'fltsVis_'; - - //callback before filters row is shown - this.onBeforeShow = _Types2['default'].isFn(f.on_before_show) ? f.on_before_show : null; - //callback after filters row is shown - this.onAfterShow = _Types2['default'].isFn(f.on_after_show) ? f.on_after_show : null; - //callback before filters row is hidden - this.onBeforeHide = _Types2['default'].isFn(f.on_before_hide) ? f.on_before_hide : null; - //callback after filters row is hidden - this.onAfterHide = _Types2['default'].isFn(f.on_after_hide) ? f.on_after_hide : null; - - //Loads extension stylesheet - tf['import'](f.name + 'Style', tf.stylePath + this.stylesheet, null, 'link'); - - this.tf = tf; - } - - _createClass(FiltersVisibility, [{ - key: 'init', - - /** - * Initialise extension - */ - value: function init() { - if (this.initialized) { - return; - } - - this.buildUI(); - this.initialized = true; - } - }, { - key: 'buildUI', - - /** - * Build UI elements - */ - value: function buildUI() { - var _this = this; - - var tf = this.tf; - var span = _Dom2['default'].create('span', ['id', this.prfx + tf.id]); - span.className = this.contCssClass; - - //Container element (rdiv or custom element) - if (!this.targetId) { - tf.setToolbar(); - } - var targetEl = !this.targetId ? tf.rDiv : _Dom2['default'].id(this.targetId); - - if (!this.targetId) { - var firstChild = targetEl.firstChild; - firstChild.parentNode.insertBefore(span, firstChild); - } else { - targetEl.appendChild(span); - } - - var btn = undefined; - if (!this.btnHtml) { - btn = _Dom2['default'].create('a', ['href', 'javascript:void(0);']); - btn.className = this.btnCssClass; - btn.title = this.btnText || this.defaultText; - btn.innerHTML = this.collapseBtnHtml; - span.appendChild(btn); - _Event2['default'].add(btn, 'click', function () { - return _this.toggle(); - }); - } else { - //Custom html - span.innerHTML = this.btnHtml; - btn = span.firstChild; - _Event2['default'].add(btn, 'click', function () { - return _this.toggle(); - }); - } - - this.contEl = span; - this.btnEl = btn; - - if (!this.visibleAtStart) { - this.toggle(); - } - } - }, { - key: 'toggle', - - /** - * Toggle filters visibility - */ - value: function toggle() { - var tf = this.tf; - var tbl = tf.gridLayout ? tf.feature('gridLayout').headTbl : tf.tbl; - var fltRow = tbl.rows[this.filtersRowIndex]; - var fltRowDisplay = fltRow.style.display; - - if (this.onBeforeShow && fltRowDisplay !== '') { - this.onBeforeShow.call(this, this); - } - if (this.onBeforeHide && fltRowDisplay === '') { - this.onBeforeHide.call(null, this); - } - - fltRow.style.display = fltRowDisplay === '' ? 'none' : ''; - if (this.enableIcon && !this.btnHtml) { - this.btnEl.innerHTML = fltRowDisplay === '' ? this.expandBtnHtml : this.collapseBtnHtml; - } - - if (this.onAfterShow && fltRowDisplay !== '') { - this.onAfterShow.call(null, this); - } - if (this.onAfterHide && fltRowDisplay === '') { - this.onAfterHide.call(null, this); - } - } - }, { - key: 'destroy', - - /** - * Destroy the UI - */ - value: function destroy() { - if (!this.btnEl && !this.contEl) { - return; - } - - this.btnEl.innerHTML = ''; - this.btnEl.parentNode.removeChild(this.btnEl); - this.btnEl = null; - - this.contEl.innerHTML = ''; - this.contEl.parentNode.removeChild(this.contEl); - this.contEl = null; - this.initialized = false; - } - }]); - - return FiltersVisibility; - })(); - - exports['default'] = FiltersVisibility; - module.exports = exports['default']; - -/***/ }, -/* 29 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - - Object.defineProperty(exports, '__esModule', { - value: true - }); - - var _Types = __webpack_require__(6); - - var _Types2 = _interopRequireDefault(_Types); - - var _Dom = __webpack_require__(3); - - var _Dom2 = _interopRequireDefault(_Dom); - - var _Arr = __webpack_require__(7); - - var _Arr2 = _interopRequireDefault(_Arr); - - var _Event = __webpack_require__(2); - - var _Event2 = _interopRequireDefault(_Event); - - var _DateHelper = __webpack_require__(8); - - var _DateHelper2 = _interopRequireDefault(_DateHelper); - - var _Helpers = __webpack_require__(9); - - var _Helpers2 = _interopRequireDefault(_Helpers); - - var AdapterSortableTable = (function () { - - /** - * SortableTable Adapter module - * @param {Object} tf TableFilter instance - */ - - function AdapterSortableTable(tf, opts) { - _classCallCheck(this, AdapterSortableTable); - - // Configuration object - var f = tf.config(); - - this.initialized = false; - this.name = opts.name; - this.desc = opts.description || 'Sortable table'; - - //indicates if paging is enabled - this.isPaged = false; - - //indicates if tables was sorted - this.sorted = false; - - this.sortTypes = _Types2['default'].isArray(opts.types) ? opts.types : []; - this.sortColAtStart = _Types2['default'].isArray(opts.sort_col_at_start) ? opts.sort_col_at_start : null; - this.asyncSort = Boolean(opts.async_sort); - this.triggerIds = _Types2['default'].isArray(opts.trigger_ids) ? opts.trigger_ids : []; - - // edit .sort-arrow.descending / .sort-arrow.ascending in - // tablefilter.css to reflect any path change - this.imgPath = opts.images_path || tf.themesPath; - this.imgBlank = opts.image_blank || 'blank.png'; - this.imgClassName = opts.image_class_name || 'sort-arrow'; - this.imgAscClassName = opts.image_asc_class_name || 'ascending'; - this.imgDescClassName = opts.image_desc_class_name || 'descending'; - //cell attribute storing custom key - this.customKey = opts.custom_key || 'data-tf-sortKey'; - - /*** TF additional events ***/ - //additional paging events for alternating background - // o.Evt._Paging.nextEvt = function(){ - // if(o.sorted && o.alternateBgs) o.Filter(); - // } - // o.Evt._Paging.prevEvt = o.Evt._Paging.nextEvt; - // o.Evt._Paging.firstEvt = o.Evt._Paging.nextEvt; - // o.Evt._Paging.lastEvt = o.Evt._Paging.nextEvt; - // o.Evt._OnSlcPagesChangeEvt = o.Evt._Paging.nextEvt; - - // callback invoked after sort is loaded and instanciated - this.onSortLoaded = _Types2['default'].isFn(opts.on_sort_loaded) ? opts.on_sort_loaded : null; - // callback invoked before table is sorted - this.onBeforeSort = _Types2['default'].isFn(opts.on_before_sort) ? opts.on_before_sort : null; - // callback invoked after table is sorted - this.onAfterSort = _Types2['default'].isFn(opts.on_after_sort) ? f.on_after_sort : null; - - this.tf = tf; - } - - _createClass(AdapterSortableTable, [{ - key: 'init', - value: function init() { - var tf = this.tf; - var adpt = this; - - // SortableTable class sanity check (sortabletable.js) - if (_Types2['default'].isUndef(SortableTable)) { - throw new Error('SortableTable class not found.'); - } - - this.overrideSortableTable(); - this.setSortTypes(); - - //Column sort at start - var sortColAtStart = adpt.sortColAtStart; - if (sortColAtStart) { - this.stt.sort(sortColAtStart[0], sortColAtStart[1]); - } - - if (this.onSortLoaded) { - this.onSortLoaded.call(null, tf, this); - } - - /*** SortableTable callbacks ***/ - this.stt.onbeforesort = function () { - if (this.onBeforeSort) { - this.onBeforeSort.call(null, tf, this.stt.sortColumn); - } - - /*** sort behaviour for paging ***/ - if (tf.paging) { - adpt.isPaged = true; - tf.paging = false; - tf.feature('paging').destroy(); - } - }; - - this.stt.onsort = function () { - adpt.sorted = true; - - //rows alternating bg issue - // TODO: move into AlternateRows component - if (tf.alternateBgs) { - var rows = tf.tbl.rows, - c = 0; - - var setClass = function setClass(row, i, removeOnly) { - if (_Types2['default'].isUndef(removeOnly)) { - removeOnly = false; - } - var altRows = tf.feature('alternateRows'), - oddCls = altRows.oddCss, - evenCls = altRows.evenCss; - _Dom2['default'].removeClass(row, oddCls); - _Dom2['default'].removeClass(row, evenCls); - - if (!removeOnly) { - _Dom2['default'].addClass(row, i % 2 ? oddCls : evenCls); - } - }; - - for (var i = tf.refRow; i < tf.nbRows; i++) { - var isRowValid = rows[i].getAttribute('validRow'); - if (tf.paging && rows[i].style.display === '') { - setClass(rows[i], c); - c++; - } else { - if ((isRowValid === 'true' || isRowValid === null) && rows[i].style.display === '') { - setClass(rows[i], c); - c++; - } else { - setClass(rows[i], c, true); - } - } - } - } - //sort behaviour for paging - if (adpt.isPaged) { - var paginator = tf.feature('paging'); - paginator.reset(false); - paginator.setPage(paginator.getPage()); - adpt.isPaged = false; - } - - if (adpt.onAfterSort) { - adpt.onAfterSort.call(null, tf, tf.stt.sortColumn); - } - }; - - this.initialized = true; - } - }, { - key: 'sortByColumnIndex', - - /** - * Sort specified column - * @param {Number} colIdx Column index - */ - value: function sortByColumnIndex(colIdx) { - this.stt.sort(colIdx); - } - }, { - key: 'overrideSortableTable', - value: function overrideSortableTable() { - var adpt = this, - tf = this.tf; - - /** - * Overrides headerOnclick method in order to handle th event - * @param {Object} e [description] - */ - SortableTable.prototype.headerOnclick = function (evt) { - if (!adpt.initialized) { - return; - } - - // find Header element - var el = evt.target || evt.srcElement; - - while (el.tagName !== 'TD' && el.tagName !== 'TH') { - el = el.parentNode; - } - - this.sort(SortableTable.msie ? SortableTable.getCellIndex(el) : el.cellIndex); - }; - - /** - * Overrides getCellIndex IE returns wrong cellIndex when columns are - * hidden - * @param {Object} oTd TD element - * @return {Number} Cell index - */ - SortableTable.getCellIndex = function (oTd) { - var cells = oTd.parentNode.cells, - l = cells.length, - i = undefined; - for (i = 0; cells[i] != oTd && i < l; i++) {} - return i; - }; - - /** - * Overrides initHeader in order to handle filters row position - * @param {Array} oSortTypes - */ - SortableTable.prototype.initHeader = function (oSortTypes) { - var stt = this; - if (!stt.tHead) { - if (tf.gridLayout) { - stt.tHead = tf.feature('gridLayout').headTbl.tHead; - } else { - return; - } - } - - stt.headersRow = tf.headersRow; - var cells = stt.tHead.rows[stt.headersRow].cells; - stt.sortTypes = oSortTypes || []; - var l = cells.length; - var img = undefined, - c = undefined; - - for (var i = 0; i < l; i++) { - c = cells[i]; - if (stt.sortTypes[i] !== null && stt.sortTypes[i] !== 'None') { - c.style.cursor = 'pointer'; - img = _Dom2['default'].create('img', ['src', adpt.imgPath + adpt.imgBlank]); - c.appendChild(img); - if (stt.sortTypes[i] !== null) { - c.setAttribute('_sortType', stt.sortTypes[i]); - } - _Event2['default'].add(c, 'click', stt._headerOnclick); - } else { - c.setAttribute('_sortType', oSortTypes[i]); - c._sortType = 'None'; - } - } - stt.updateHeaderArrows(); - }; - - /** - * Overrides updateHeaderArrows in order to handle arrows indicators - */ - SortableTable.prototype.updateHeaderArrows = function () { - var stt = this; - var cells = undefined, - l = undefined, - img = undefined; - - // external headers - if (adpt.asyncSort && adpt.triggerIds.length > 0) { - var triggers = adpt.triggerIds; - cells = []; - l = triggers.length; - for (var j = 0; j < triggers.length; j++) { - cells.push(_Dom2['default'].id(triggers[j])); - } - } else { - if (!this.tHead) { - return; - } - cells = stt.tHead.rows[stt.headersRow].cells; - l = cells.length; - } - for (var i = 0; i < l; i++) { - var cellAttr = cells[i].getAttribute('_sortType'); - if (cellAttr !== null && cellAttr !== 'None') { - img = cells[i].lastChild || cells[i]; - if (img.nodeName.toLowerCase() !== 'img') { - img = _Dom2['default'].create('img', ['src', adpt.imgPath + adpt.imgBlank]); - cells[i].appendChild(img); - } - if (i === stt.sortColumn) { - img.className = adpt.imgClassName + ' ' + (this.descending ? adpt.imgDescClassName : adpt.imgAscClassName); - } else { - img.className = adpt.imgClassName; - } - } - } - }; - - /** - * Overrides getRowValue for custom key value feature - * @param {Object} oRow Row element - * @param {String} sType - * @param {Number} nColumn - * @return {String} - */ - SortableTable.prototype.getRowValue = function (oRow, sType, nColumn) { - var stt = this; - // if we have defined a custom getRowValue use that - var sortTypeInfo = stt._sortTypeInfo[sType]; - if (sortTypeInfo && sortTypeInfo.getRowValue) { - return sortTypeInfo.getRowValue(oRow, nColumn); - } - var c = oRow.cells[nColumn]; - var s = SortableTable.getInnerText(c); - return stt.getValueFromString(s, sType); - }; - - /** - * Overrides getInnerText in order to avoid Firefox unexpected sorting - * behaviour with untrimmed text elements - * @param {Object} oNode DOM element - * @return {String} DOM element inner text - */ - SortableTable.getInnerText = function (oNode) { - if (!oNode) { - return; - } - if (oNode.getAttribute(adpt.customKey)) { - return oNode.getAttribute(adpt.customKey); - } else { - return _Dom2['default'].getText(oNode); - } - }; - } - }, { - key: 'addSortType', - value: function addSortType() { - var args = arguments; - SortableTable.prototype.addSortType(args[0], args[1], args[2], args[3]); - } - }, { - key: 'setSortTypes', - value: function setSortTypes() { - var _this = this; - - var tf = this.tf, - sortTypes = this.sortTypes, - _sortTypes = []; - - for (var i = 0; i < tf.nbCells; i++) { - var colType = undefined; - - if (sortTypes[i]) { - colType = sortTypes[i].toLowerCase(); - if (colType === 'none') { - colType = 'None'; - } - } else { - // resolve column types - if (tf.hasColNbFormat && tf.colNbFormat[i] !== null) { - colType = tf.colNbFormat[i].toLowerCase(); - } else if (tf.hasColDateType && tf.colDateType[i] !== null) { - colType = tf.colDateType[i].toLowerCase() + 'date'; - } else { - colType = 'String'; - } - } - _sortTypes.push(colType); - } - - //Public TF method to add sort type - - //Custom sort types - this.addSortType('number', Number); - this.addSortType('caseinsensitivestring', SortableTable.toUpperCase); - this.addSortType('date', SortableTable.toDate); - this.addSortType('string'); - this.addSortType('us', usNumberConverter); - this.addSortType('eu', euNumberConverter); - this.addSortType('dmydate', dmyDateConverter); - this.addSortType('ymddate', ymdDateConverter); - this.addSortType('mdydate', mdyDateConverter); - this.addSortType('ddmmmyyyydate', ddmmmyyyyDateConverter); - this.addSortType('ipaddress', ipAddress, sortIP); - - this.stt = new SortableTable(tf.tbl, _sortTypes); - - /*** external table headers adapter ***/ - if (this.asyncSort && this.triggerIds.length > 0) { - (function () { - var triggers = _this.triggerIds; - for (var j = 0; j < triggers.length; j++) { - if (triggers[j] === null) { - continue; - } - var trigger = _Dom2['default'].id(triggers[j]); - if (trigger) { - trigger.style.cursor = 'pointer'; - - _Event2['default'].add(trigger, 'click', function (evt) { - var elm = evt.target; - if (!_this.tf.sort) { - return; - } - _this.stt.asyncSort(_Arr2['default'].indexByValue(triggers, elm.id, true)); - }); - trigger.setAttribute('_sortType', _sortTypes[j]); - } - } - })(); - } - } - }, { - key: 'destroy', - - /** - * Destroy sort - */ - value: function destroy() { - var tf = this.tf; - this.sorted = false; - this.initialized = false; - this.stt.destroy(); - - var ids = tf.getFiltersId(); - for (var idx = 0; idx < ids.length; idx++) { - var header = tf.getHeaderElement(idx); - var img = _Dom2['default'].tag(header, 'img'); - - if (img.length === 1) { - header.removeChild(img[0]); - } - } - } - }]); - - return AdapterSortableTable; - })(); - - exports['default'] = AdapterSortableTable; - - //Converters - function usNumberConverter(s) { - return _Helpers2['default'].removeNbFormat(s, 'us'); - } - function euNumberConverter(s) { - return _Helpers2['default'].removeNbFormat(s, 'eu'); - } - function dateConverter(s, format) { - return _DateHelper2['default'].format(s, format); - } - function dmyDateConverter(s) { - return dateConverter(s, 'DMY'); - } - function mdyDateConverter(s) { - return dateConverter(s, 'MDY'); - } - function ymdDateConverter(s) { - return dateConverter(s, 'YMD'); - } - function ddmmmyyyyDateConverter(s) { - return dateConverter(s, 'DDMMMYYYY'); - } - - function ipAddress(value) { - var vals = value.split('.'); - for (var x in vals) { - var val = vals[x]; - while (3 > val.length) { - val = '0' + val; - } - vals[x] = val; - } - return vals.join('.'); - } - - function sortIP(a, b) { - var aa = ipAddress(a.value.toLowerCase()); - var bb = ipAddress(b.value.toLowerCase()); - if (aa == bb) { - return 0; - } else if (aa < bb) { - return -1; - } else { - return 1; - } - } - module.exports = exports['default']; - -/***/ }, -/* 30 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - - Object.defineProperty(exports, '__esModule', { - value: true - }); - // import 'script!sortabletable'; - - var _AdapterSortableTable = __webpack_require__(29); - - var _AdapterSortableTable2 = _interopRequireDefault(_AdapterSortableTable); - - if (!window.SortableTable) { - __webpack_require__(31); - } - - exports['default'] = _AdapterSortableTable2['default']; - module.exports = exports['default']; - -/***/ }, -/* 31 */ -/***/ function(module, exports, __webpack_require__) { - - __webpack_require__(32)(__webpack_require__(33)+"\n\n// SCRIPT-LOADER FOOTER\n//# sourceURL=script:///C:/Users/max.guglielmi/Documents/dev/perso/javascript/GitHub/TableFilter/libs/sortabletable.js") - -/***/ }, -/* 32 */ -/***/ function(module, exports, __webpack_require__) { - - /* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra - */ - module.exports = function(src) { - if (typeof execScript === "function") - execScript(src); - else - eval.call(null, src); - } - -/***/ }, -/* 33 */ -/***/ function(module, exports, __webpack_require__) { - - module.exports = "/*----------------------------------------------------------------------------\\\r\n| Sortable Table 1.12 |\r\n|-----------------------------------------------------------------------------|\r\n| Created by Erik Arvidsson |\r\n| (http://webfx.eae.net/contact.html#erik) |\r\n| For WebFX (http://webfx.eae.net/) |\r\n|-----------------------------------------------------------------------------|\r\n| A DOM 1 based script that allows an ordinary HTML table to be sortable. |\r\n|-----------------------------------------------------------------------------|\r\n| Copyright (c) 1998 - 2006 Erik Arvidsson |\r\n|-----------------------------------------------------------------------------|\r\n| Licensed under the Apache License, Version 2.0 (the \"License\"); you may not |\r\n| use this file except in compliance with the License. You may obtain a copy |\r\n| of the License at http://www.apache.org/licenses/LICENSE-2.0 |\r\n| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |\r\n| Unless required by applicable law or agreed to in writing, software |\r\n| distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT |\r\n| WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |\r\n| License for the specific language governing permissions and limitations |\r\n| under the License. |\r\n|-----------------------------------------------------------------------------|\r\n| 2003-01-10 | First version |\r\n| 2003-01-19 | Minor changes to the date parsing |\r\n| 2003-01-28 | JScript 5.0 fixes (no support for 'in' operator) |\r\n| 2003-02-01 | Sloppy typo like error fixed in getInnerText |\r\n| 2003-07-04 | Added workaround for IE cellIndex bug. |\r\n| 2003-11-09 | The bDescending argument to sort was not correctly working |\r\n| | Using onclick DOM0 event if no support for addEventListener |\r\n| | or attachEvent |\r\n| 2004-01-13 | Adding addSortType and removeSortType which makes it a lot |\r\n| | easier to add new, custom sort types. |\r\n| 2004-01-27 | Switch to use descending = false as the default sort order. |\r\n| | Change defaultDescending to suit your needs. |\r\n| 2004-03-14 | Improved sort type None look and feel a bit |\r\n| 2004-08-26 | Made the handling of tBody and tHead more flexible. Now you |\r\n| | can use another tHead or no tHead, and you can chose some |\r\n| | other tBody. |\r\n| 2006-04-25 | Changed license to Apache Software License 2.0 |\r\n|-----------------------------------------------------------------------------|\r\n| Created 2003-01-10 | All changes are in the log above. | Updated 2006-04-25 |\r\n\\----------------------------------------------------------------------------*/\r\n\r\n\r\nfunction SortableTable(oTable, oSortTypes) {\r\n\r\n\tthis.sortTypes = oSortTypes || [];\r\n\r\n\tthis.sortColumn = null;\r\n\tthis.descending = null;\r\n\r\n\tvar oThis = this;\r\n\tthis._headerOnclick = function (e) {\r\n\t\toThis.headerOnclick(e);\r\n\t};\r\n\r\n\tif (oTable) {\r\n\t\tthis.setTable( oTable );\r\n\t\tthis.document = oTable.ownerDocument || oTable.document;\r\n\t}\r\n\telse {\r\n\t\tthis.document = document;\r\n\t}\r\n\r\n\r\n\t// only IE needs this\r\n\tvar win = this.document.defaultView || this.document.parentWindow;\r\n\tthis._onunload = function () {\r\n\t\toThis.destroy();\r\n\t};\r\n\tif (win && typeof win.attachEvent != \"undefined\") {\r\n\t\twin.attachEvent(\"onunload\", this._onunload);\r\n\t}\r\n}\r\n\r\nSortableTable.gecko = navigator.product == \"Gecko\";\r\nSortableTable.msie = /msie/i.test(navigator.userAgent);\r\n// Mozilla is faster when doing the DOM manipulations on\r\n// an orphaned element. MSIE is not\r\nSortableTable.removeBeforeSort = SortableTable.gecko;\r\n\r\nSortableTable.prototype.onsort = function () {};\r\n\r\n// default sort order. true -> descending, false -> ascending\r\nSortableTable.prototype.defaultDescending = false;\r\n\r\n// shared between all instances. This is intentional to allow external files\r\n// to modify the prototype\r\nSortableTable.prototype._sortTypeInfo = {};\r\n\r\nSortableTable.prototype.setTable = function (oTable) {\r\n\tif ( this.tHead )\r\n\t\tthis.uninitHeader();\r\n\tthis.element = oTable;\r\n\tthis.setTHead( oTable.tHead );\r\n\tthis.setTBody( oTable.tBodies[0] );\r\n};\r\n\r\nSortableTable.prototype.setTHead = function (oTHead) {\r\n\tif (this.tHead && this.tHead != oTHead )\r\n\t\tthis.uninitHeader();\r\n\tthis.tHead = oTHead;\r\n\tthis.initHeader( this.sortTypes );\r\n};\r\n\r\nSortableTable.prototype.setTBody = function (oTBody) {\r\n\tthis.tBody = oTBody;\r\n};\r\n\r\nSortableTable.prototype.setSortTypes = function ( oSortTypes ) {\r\n\tif ( this.tHead )\r\n\t\tthis.uninitHeader();\r\n\tthis.sortTypes = oSortTypes || [];\r\n\tif ( this.tHead )\r\n\t\tthis.initHeader( this.sortTypes );\r\n};\r\n\r\n// adds arrow containers and events\r\n// also binds sort type to the header cells so that reordering columns does\r\n// not break the sort types\r\nSortableTable.prototype.initHeader = function (oSortTypes) {\r\n\tif (!this.tHead) return;\r\n\tvar cells = this.tHead.rows[0].cells;\r\n\tvar doc = this.tHead.ownerDocument || this.tHead.document;\r\n\tthis.sortTypes = oSortTypes || [];\r\n\tvar l = cells.length;\r\n\tvar img, c;\r\n\tfor (var i = 0; i < l; i++) {\r\n\t\tc = cells[i];\r\n\t\tif (this.sortTypes[i] != null && this.sortTypes[i] != \"None\") {\r\n\t\t\timg = doc.createElement(\"IMG\");\r\n\t\t\timg.src = \"images/blank.png\";\r\n\t\t\tc.appendChild(img);\r\n\t\t\tif (this.sortTypes[i] != null)\r\n\t\t\t\tc._sortType = this.sortTypes[i];\r\n\t\t\tif (typeof c.addEventListener != \"undefined\")\r\n\t\t\t\tc.addEventListener(\"click\", this._headerOnclick, false);\r\n\t\t\telse if (typeof c.attachEvent != \"undefined\")\r\n\t\t\t\tc.attachEvent(\"onclick\", this._headerOnclick);\r\n\t\t\telse\r\n\t\t\t\tc.onclick = this._headerOnclick;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tc.setAttribute( \"_sortType\", oSortTypes[i] );\r\n\t\t\tc._sortType = \"None\";\r\n\t\t}\r\n\t}\r\n\tthis.updateHeaderArrows();\r\n};\r\n\r\n// remove arrows and events\r\nSortableTable.prototype.uninitHeader = function () {\r\n\tif (!this.tHead) return;\r\n\tvar cells = this.tHead.rows[0].cells;\r\n\tvar l = cells.length;\r\n\tvar c;\r\n\tfor (var i = 0; i < l; i++) {\r\n\t\tc = cells[i];\r\n\t\tif (c._sortType != null && c._sortType != \"None\") {\r\n\t\t\tc.removeChild(c.lastChild);\r\n\t\t\tif (typeof c.removeEventListener != \"undefined\")\r\n\t\t\t\tc.removeEventListener(\"click\", this._headerOnclick, false);\r\n\t\t\telse if (typeof c.detachEvent != \"undefined\")\r\n\t\t\t\tc.detachEvent(\"onclick\", this._headerOnclick);\r\n\t\t\tc._sortType = null;\r\n\t\t\tc.removeAttribute( \"_sortType\" );\r\n\t\t}\r\n\t}\r\n};\r\n\r\nSortableTable.prototype.updateHeaderArrows = function () {\r\n\tif (!this.tHead) return;\r\n\tvar cells = this.tHead.rows[0].cells;\r\n\tvar l = cells.length;\r\n\tvar img;\r\n\tfor (var i = 0; i < l; i++) {\r\n\t\tif (cells[i]._sortType != null && cells[i]._sortType != \"None\") {\r\n\t\t\timg = cells[i].lastChild;\r\n\t\t\tif (i == this.sortColumn)\r\n\t\t\t\timg.className = \"sort-arrow \" + (this.descending ? \"descending\" : \"ascending\");\r\n\t\t\telse\r\n\t\t\t\timg.className = \"sort-arrow\";\r\n\t\t}\r\n\t}\r\n};\r\n\r\nSortableTable.prototype.headerOnclick = function (e) {\r\n\t// find TD element\r\n\tvar el = e.target || e.srcElement;\r\n\twhile (el.tagName != \"TD\")\r\n\t\tel = el.parentNode;\r\n\r\n\tthis.sort(SortableTable.msie ? SortableTable.getCellIndex(el) : el.cellIndex);\r\n};\r\n\r\n// IE returns wrong cellIndex when columns are hidden\r\nSortableTable.getCellIndex = function (oTd) {\r\n\tvar cells = oTd.parentNode.childNodes\r\n\tvar l = cells.length;\r\n\tvar i;\r\n\tfor (i = 0; cells[i] != oTd && i < l; i++)\r\n\t\t;\r\n\treturn i;\r\n};\r\n\r\nSortableTable.prototype.getSortType = function (nColumn) {\r\n\treturn this.sortTypes[nColumn] || \"String\";\r\n};\r\n\r\n// only nColumn is required\r\n// if bDescending is left out the old value is taken into account\r\n// if sSortType is left out the sort type is found from the sortTypes array\r\n\r\nSortableTable.prototype.sort = function (nColumn, bDescending, sSortType) {\r\n\tif (!this.tBody) return;\r\n\tif (sSortType == null)\r\n\t\tsSortType = this.getSortType(nColumn);\r\n\r\n\t// exit if None\r\n\tif (sSortType == \"None\")\r\n\t\treturn;\r\n\r\n\tif (bDescending == null) {\r\n\t\tif (this.sortColumn != nColumn)\r\n\t\t\tthis.descending = this.defaultDescending;\r\n\t\telse\r\n\t\t\tthis.descending = !this.descending;\r\n\t}\r\n\telse\r\n\t\tthis.descending = bDescending;\r\n\r\n\tthis.sortColumn = nColumn;\r\n\r\n\tif (typeof this.onbeforesort == \"function\")\r\n\t\tthis.onbeforesort();\r\n\r\n\tvar f = this.getSortFunction(sSortType, nColumn);\r\n\tvar a = this.getCache(sSortType, nColumn);\r\n\tvar tBody = this.tBody;\r\n\r\n\ta.sort(f);\r\n\r\n\tif (this.descending)\r\n\t\ta.reverse();\r\n\r\n\tif (SortableTable.removeBeforeSort) {\r\n\t\t// remove from doc\r\n\t\tvar nextSibling = tBody.nextSibling;\r\n\t\tvar p = tBody.parentNode;\r\n\t\tp.removeChild(tBody);\r\n\t}\r\n\r\n\t// insert in the new order\r\n\tvar l = a.length;\r\n\tfor (var i = 0; i < l; i++)\r\n\t\ttBody.appendChild(a[i].element);\r\n\r\n\tif (SortableTable.removeBeforeSort) {\r\n\t\t// insert into doc\r\n\t\tp.insertBefore(tBody, nextSibling);\r\n\t}\r\n\r\n\tthis.updateHeaderArrows();\r\n\r\n\tthis.destroyCache(a);\r\n\r\n\tif (typeof this.onsort == \"function\")\r\n\t\tthis.onsort();\r\n};\r\n\r\nSortableTable.prototype.asyncSort = function (nColumn, bDescending, sSortType) {\r\n\tvar oThis = this;\r\n\tthis._asyncsort = function () {\r\n\t\toThis.sort(nColumn, bDescending, sSortType);\r\n\t};\r\n\twindow.setTimeout(this._asyncsort, 1);\r\n};\r\n\r\nSortableTable.prototype.getCache = function (sType, nColumn) {\r\n\tif (!this.tBody) return [];\r\n\tvar rows = this.tBody.rows;\r\n\tvar l = rows.length;\r\n\tvar a = new Array(l);\r\n\tvar r;\r\n\tfor (var i = 0; i < l; i++) {\r\n\t\tr = rows[i];\r\n\t\ta[i] = {\r\n\t\t\tvalue:\t\tthis.getRowValue(r, sType, nColumn),\r\n\t\t\telement:\tr\r\n\t\t};\r\n\t};\r\n\treturn a;\r\n};\r\n\r\nSortableTable.prototype.destroyCache = function (oArray) {\r\n\tvar l = oArray.length;\r\n\tfor (var i = 0; i < l; i++) {\r\n\t\toArray[i].value = null;\r\n\t\toArray[i].element = null;\r\n\t\toArray[i] = null;\r\n\t}\r\n};\r\n\r\nSortableTable.prototype.getRowValue = function (oRow, sType, nColumn) {\r\n\t// if we have defined a custom getRowValue use that\r\n\tif (this._sortTypeInfo[sType] && this._sortTypeInfo[sType].getRowValue)\r\n\t\treturn this._sortTypeInfo[sType].getRowValue(oRow, nColumn);\r\n\r\n\tvar s;\r\n\tvar c = oRow.cells[nColumn];\r\n\tif (typeof c.innerText != \"undefined\")\r\n\t\ts = c.innerText;\r\n\telse\r\n\t\ts = SortableTable.getInnerText(c);\r\n\treturn this.getValueFromString(s, sType);\r\n};\r\n\r\nSortableTable.getInnerText = function (oNode) {\r\n\tvar s = \"\";\r\n\tvar cs = oNode.childNodes;\r\n\tvar l = cs.length;\r\n\tfor (var i = 0; i < l; i++) {\r\n\t\tswitch (cs[i].nodeType) {\r\n\t\t\tcase 1: //ELEMENT_NODE\r\n\t\t\t\ts += SortableTable.getInnerText(cs[i]);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\t//TEXT_NODE\r\n\t\t\t\ts += cs[i].nodeValue;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\treturn s;\r\n};\r\n\r\nSortableTable.prototype.getValueFromString = function (sText, sType) {\r\n\tif (this._sortTypeInfo[sType])\r\n\t\treturn this._sortTypeInfo[sType].getValueFromString( sText );\r\n\treturn sText;\r\n\t/*\r\n\tswitch (sType) {\r\n\t\tcase \"Number\":\r\n\t\t\treturn Number(sText);\r\n\t\tcase \"CaseInsensitiveString\":\r\n\t\t\treturn sText.toUpperCase();\r\n\t\tcase \"Date\":\r\n\t\t\tvar parts = sText.split(\"-\");\r\n\t\t\tvar d = new Date(0);\r\n\t\t\td.setFullYear(parts[0]);\r\n\t\t\td.setDate(parts[2]);\r\n\t\t\td.setMonth(parts[1] - 1);\r\n\t\t\treturn d.valueOf();\r\n\t}\r\n\treturn sText;\r\n\t*/\r\n\t};\r\n\r\nSortableTable.prototype.getSortFunction = function (sType, nColumn) {\r\n\tif (this._sortTypeInfo[sType])\r\n\t\treturn this._sortTypeInfo[sType].compare;\r\n\treturn SortableTable.basicCompare;\r\n};\r\n\r\nSortableTable.prototype.destroy = function () {\r\n\tthis.uninitHeader();\r\n\tvar win = this.document.parentWindow;\r\n\tif (win && typeof win.detachEvent != \"undefined\") {\t// only IE needs this\r\n\t\twin.detachEvent(\"onunload\", this._onunload);\r\n\t}\r\n\tthis._onunload = null;\r\n\tthis.element = null;\r\n\tthis.tHead = null;\r\n\tthis.tBody = null;\r\n\tthis.document = null;\r\n\tthis._headerOnclick = null;\r\n\tthis.sortTypes = null;\r\n\tthis._asyncsort = null;\r\n\tthis.onsort = null;\r\n};\r\n\r\n// Adds a sort type to all instance of SortableTable\r\n// sType : String - the identifier of the sort type\r\n// fGetValueFromString : function ( s : string ) : T - A function that takes a\r\n// string and casts it to a desired format. If left out the string is just\r\n// returned\r\n// fCompareFunction : function ( n1 : T, n2 : T ) : Number - A normal JS sort\r\n// compare function. Takes two values and compares them. If left out less than,\r\n// <, compare is used\r\n// fGetRowValue : function( oRow : HTMLTRElement, nColumn : int ) : T - A function\r\n// that takes the row and the column index and returns the value used to compare.\r\n// If left out then the innerText is first taken for the cell and then the\r\n// fGetValueFromString is used to convert that string the desired value and type\r\n\r\nSortableTable.prototype.addSortType = function (sType, fGetValueFromString, fCompareFunction, fGetRowValue) {\r\n\tthis._sortTypeInfo[sType] = {\r\n\t\ttype:\t\t\t\tsType,\r\n\t\tgetValueFromString:\tfGetValueFromString || SortableTable.idFunction,\r\n\t\tcompare:\t\t\tfCompareFunction || SortableTable.basicCompare,\r\n\t\tgetRowValue:\t\tfGetRowValue\r\n\t};\r\n};\r\n\r\n// this removes the sort type from all instances of SortableTable\r\nSortableTable.prototype.removeSortType = function (sType) {\r\n\tdelete this._sortTypeInfo[sType];\r\n};\r\n\r\nSortableTable.basicCompare = function compare(n1, n2) {\r\n\tif (n1.value < n2.value)\r\n\t\treturn -1;\r\n\tif (n2.value < n1.value)\r\n\t\treturn 1;\r\n\treturn 0;\r\n};\r\n\r\nSortableTable.idFunction = function (x) {\r\n\treturn x;\r\n};\r\n\r\nSortableTable.toUpperCase = function (s) {\r\n\treturn s.toUpperCase();\r\n};\r\n\r\nSortableTable.toDate = function (s) {\r\n\tvar parts = s.split(\"-\");\r\n\tvar d = new Date(0);\r\n\td.setFullYear(parts[0]);\r\n\td.setDate(parts[2]);\r\n\td.setMonth(parts[1] - 1);\r\n\treturn d.valueOf();\r\n};\r\n\r\n\r\n// add sort types\r\nSortableTable.prototype.addSortType(\"Number\", Number);\r\nSortableTable.prototype.addSortType(\"CaseInsensitiveString\", SortableTable.toUpperCase);\r\nSortableTable.prototype.addSortType(\"Date\", SortableTable.toDate);\r\nSortableTable.prototype.addSortType(\"String\");\r\n// None is a special case\r\n" - -/***/ } -]); -//# sourceMappingURL=tf-1.js.map \ No newline at end of file +webpackJsonp([1],[,function(t,e,s){function i(t){return s(l(t))}function l(t){return a[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}var a={"./array":7,"./array.js":7,"./cookie":5,"./cookie.js":5,"./date":8,"./date.js":8,"./dom":3,"./dom.js":3,"./event":2,"./event.js":2,"./extensions/advancedGrid/adapterEzEditTable":24,"./extensions/advancedGrid/adapterEzEditTable.js":24,"./extensions/advancedGrid/advancedGrid":25,"./extensions/advancedGrid/advancedGrid.js":25,"./extensions/colOps/colOps":26,"./extensions/colOps/colOps.js":26,"./extensions/colsVisibility/colsVisibility":27,"./extensions/colsVisibility/colsVisibility.js":27,"./extensions/filtersVisibility/filtersVisibility":28,"./extensions/filtersVisibility/filtersVisibility.js":28,"./extensions/sort/adapterSortabletable":29,"./extensions/sort/adapterSortabletable.js":29,"./extensions/sort/sort":30,"./extensions/sort/sort.js":30,"./helpers":9,"./helpers.js":9,"./modules/alternateRows":22,"./modules/alternateRows.js":22,"./modules/checkList":16,"./modules/checkList.js":16,"./modules/clearButton":20,"./modules/clearButton.js":20,"./modules/dropdown":15,"./modules/dropdown.js":15,"./modules/gridLayout":11,"./modules/gridLayout.js":11,"./modules/help":21,"./modules/help.js":21,"./modules/highlightKeywords":13,"./modules/highlightKeywords.js":13,"./modules/loader":12,"./modules/loader.js":12,"./modules/paging":19,"./modules/paging.js":19,"./modules/popupFilter":14,"./modules/popupFilter.js":14,"./modules/rowsCounter":17,"./modules/rowsCounter.js":17,"./modules/statusBar":18,"./modules/statusBar.js":18,"./modules/store":10,"./modules/store.js":10,"./sort":23,"./sort.js":23,"./string":4,"./string.js":4,"./types":6,"./types.js":6};i.keys=function(){return Object.keys(a)},i.resolve=l,t.exports=i,i.id=1},,,,,,,,,,,,,,,,,,,,,,,function(t,e,s){"use strict";var i=function(t){return t&&t.__esModule?t:{"default":t}},l=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a=function(){function t(t,e){for(var s=0;s0&&!s.startRow?void 0:s.startRow||e.refRow,s.base_path=s.base_path||e.basePath+"ezEditTable/";var l=s.editable,a=s.selection;a&&(s.default_selection=s.default_selection||"row"),s.active_cell_css=s.active_cell_css||"ezETSelectedCell";var n=0,o=0;if(a){var d=function(t,s,i){var l=t.Selection,a=function(i){if("row"===t.defaultSelection)l.SelectRowByIndex(i);else{t.ClearSelections();var a=s.cellIndex,n=e.tbl.rows[i];"both"===t.defaultSelection&&l.SelectRowByIndex(i),n&&l.SelectCell(n.cells[a])}if(e.validRowsIndex.length!==e.getRowsNb()){var r=e.tbl.rows[i];r&&r.scrollIntoView(!1),f&&(f.cellIndex===e.getCellsNb()-1&&e.gridLayout?e.tblCont.scrollLeft=1e8:0===f.cellIndex&&e.gridLayout?e.tblCont.scrollLeft=0:f.scrollIntoView(!1))}};if(e.validRowsIndex){var r,d=e.validRowsIndex,u=d.length,c="row"!==t.defaultSelection?s.parentNode:s,f="TD"===s.nodeName?s:null,p=void 0!==i?t.Event.GetKey(i):0,g=h["default"].has(d,c.rowIndex),v=34===p||33===p?e.feature("paging").pagingLength||t.nbRowsPerPage:1;if(g)34!==p&&33!==p?(n=h["default"].indexByValue(d,c.rowIndex),o=c.rowIndex):(r=34===p?u-1>=n+v?d[n+v]:[u-1]:n-v<=d[0]?d[0]:d[n-v],o=r,n=h["default"].indexByValue(d,r),a(r));else{if(c.rowIndex>o)if(c.rowIndex>=d[u-1])r=d[u-1];else{var b=n+v;r=b>u-1?d[u-1]:d[b]}else if(c.rowIndex<=d[0])r=d[0];else{var m=d[n-v];r=m?m:d[0]}o=c.rowIndex,a(r)}}},u=function(t,s){var i="row"!==t.defaultSelection?s.parentNode:s;if(e.paging&&e.feature("paging").nbPages>1){var l=e.feature("paging");t.nbRowsPerPage=l.pagingLength;var a=e.validRowsIndex,n=a.length,r=parseInt(l.startPagingRow,10)+parseInt(l.pagingLength,10),o=i.rowIndex;o===a[n-1]&&l.currentPageNb!==l.nbPages?l.setPage("last"):o==a[0]&&1!==l.currentPageNb?l.setPage("first"):o>a[r-1]&&oa[0]&&l.setPage("previous")}};if(e.paging&&(e.feature("paging").onAfterChangePage=function(t){var e=t.tf.extension("advancedGrid"),s=e._ezEditTable,i=s.Selection,l=i.GetActiveRow();l&&l.scrollIntoView(!1);var a=i.GetActiveCell();a&&a.scrollIntoView(!1)}),"row"===s.default_selection){var c=s.on_before_selected_row;s.on_before_selected_row=function(){u(arguments[0],arguments[1],arguments[2]),c&&c.call(null,arguments[0],arguments[1],arguments[2])};var f=s.on_after_selected_row;s.on_after_selected_row=function(){d(arguments[0],arguments[1],arguments[2]),f&&f.call(null,arguments[0],arguments[1],arguments[2])}}else{var p=s.on_before_selected_cell;s.on_before_selected_cell=function(){u(arguments[0],arguments[1],arguments[2]),p&&p.call(null,arguments[0],arguments[1],arguments[2])};var g=s.on_after_selected_cell;s.on_after_selected_cell=function(){d(arguments[0],arguments[1],arguments[2]),g&&g.call(null,arguments[0],arguments[1],arguments[2])}}}if(l){var v=s.on_added_dom_row;if(s.on_added_dom_row=function(){e.nbFilterableRows++,e.paging?(e.nbRows++,e.nbVisibleRows++,e.nbFilterableRows++,e.paging=!1,e.feature("paging").destroy(),e.feature("paging").reset()):e.feature("rowsCounter").refresh(),e.alternateBgs&&e.feature("alternateRows").init(),v&&v.call(null,arguments[0],arguments[1],arguments[2])},s.actions&&s.actions["delete"]){var b=s.actions["delete"].on_after_submit;s.actions["delete"].on_after_submit=function(){e.nbFilterableRows--,e.paging?(e.nbRows--,e.nbVisibleRows--,e.nbFilterableRows--,e.paging=!1,e.feature("paging").destroy(),e.feature("paging").reset(!1)):e.feature("rowsCounter").refresh(),e.alternateBgs&&e.feature("alternateRows").init(),b&&b.call(null,arguments[0],arguments[1])}}}try{this._ezEditTable=new EditTable(e.id,s,t),this._ezEditTable.Init()}catch(m){throw new Error(this.err)}this.initialized=!0}},{key:"reset",value:function(){var t=this._ezEditTable;t&&(this.cfg.selection&&t.Selection.Set(),this.cfg.editable&&t.Editable.Set())}},{key:"destroy",value:function(){var t=this._ezEditTable;t&&(this.cfg.selection&&(t.Selection.ClearSelections(),t.Selection.Remove()),this.cfg.editable&&t.Editable.Remove()),this.initialized=!1}}]),t}();e["default"]=d,t.exports=e["default"]},function(t,e,s){"use strict";var i=function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(e,"__esModule",{value:!0});var l=s(24),a=i(l);e["default"]=a["default"],t.exports=e["default"]},function(module,exports,__webpack_require__){"use strict";var _interopRequireDefault=function(t){return t&&t.__esModule?t:{"default":t}},_classCallCheck=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},_createClass=function(){function t(t,e){for(var s=0;s=jj;jj++)ucolIndex[jj]===colIndex[ii]&&(saved=1);0===saved&&(ucolMax++,ucolIndex[ucolMax]=colIndex[ii])}if("object"==_Str2["default"].lower(typeof labelId)&&"object"==_Str2["default"].lower(typeof colIndex)&&"object"==_Str2["default"].lower(typeof operation))for(var rows=tf.tbl.rows,colvalues=[],ucol=0;ucolMax>=ucol;ucol++){colvalues.push(tf.getColValues(ucolIndex[ucol],!0,excludeRow));for(var result,nbvalues=0,temp,meanValue=0,sumValue=0,minValue=null,maxValue=null,q1Value=null,medValue=null,q3Value=null,meanFlag=0,sumFlag=0,minFlag=0,maxFlag=0,q1Flag=0,medFlag=0,q3Flag=0,theList=[],opsThisCol=[],decThisCol=[],labThisCol=[],oTypeThisCol=[],mThisCol=-1,k=0;kmaxValue?parseFloat(cvalue):maxValue))}if(1===meanFlag&&(meanValue=sumValue/nbvalues),1===medFlag){var aux=0;nbvalues%2===1?(aux=Math.floor(nbvalues/2),medValue=theList[aux]):medValue=(theList[nbvalues/2]+theList[nbvalues/2-1])/2}var posa;if(1===q1Flag&&(posa=0,posa=Math.floor(nbvalues/4),q1Value=4*posa==nbvalues?(theList[posa-1]+theList[posa])/2:theList[posa]),1===q3Flag){posa=0;var posb=0;posa=Math.floor(nbvalues/4),4*posa===nbvalues?(posb=3*posa,q3Value=(theList[posb]+theList[posb-1])/2):q3Value=theList[nbvalues-posa-1]}for(var i=0;mThisCol>=i;i++){switch(opsThisCol[i]){case"mean":result=meanValue;break;case"sum":result=sumValue;break;case"min":result=minValue;break;case"max":result=maxValue;break;case"median":result=medValue;break;case"q1":result=q1Value;break;case"q3":result=q3Value}var precision=isNaN(decThisCol[i])?2:decThisCol[i];if(oTypeThisCol&&result){if(result=result.toFixed(precision),_Dom2["default"].id(labThisCol[i]))switch(_Str2["default"].lower(oTypeThisCol)){case"innerhtml":isNaN(result)||!isFinite(result)||0===nbvalues?_Dom2["default"].id(labThisCol[i]).innerHTML=".":_Dom2["default"].id(labThisCol[i]).innerHTML=result;break;case"setvalue":_Dom2["default"].id(labThisCol[i]).value=result;break;case"createtextnode":var oldnode=_Dom2["default"].id(labThisCol[i]).firstChild,txtnode=_Dom2["default"].text(result);_Dom2["default"].id(labThisCol[i]).replaceChild(txtnode,oldnode)}}else try{isNaN(result)||!isFinite(result)||0===nbvalues?_Dom2["default"].id(labThisCol[i]).innerHTML=".":_Dom2["default"].id(labThisCol[i]).innerHTML=result.toFixed(precision)}catch(e){}}var totRow=totRowIndex&&totRowIndex[ucol]?rows[totRowIndex[ucol]]:null;totRow&&(totRow.style.display="")}this.onAfterOperation&&this.onAfterOperation.call(null,tf)}}},{key:"destroy",value:function(){}}]),ColOps}();exports["default"]=ColOps,module.exports=exports["default"]},function(t,e,s){"use strict";var i=function(t){return t&&t.__esModule?t:{"default":t}},l=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a=function(){function t(t,e){for(var s=0;s0,this.onLoaded=h["default"].isFn(s.on_loaded)?s.on_loaded:null,this.onBeforeOpen=h["default"].isFn(s.on_before_open)?s.on_before_open:null,this.onAfterOpen=h["default"].isFn(s.on_after_open)?s.on_after_open:null,this.onBeforeClose=h["default"].isFn(s.on_before_close)?s.on_before_close:null,this.onAfterClose=h["default"].isFn(s.on_after_close)?s.on_after_close:null,this.onBeforeColHidden=h["default"].isFn(s.on_before_col_hidden)?s.on_before_col_hidden:null,this.onAfterColHidden=h["default"].isFn(s.on_after_col_hidden)?s.on_after_col_hidden:null,this.onBeforeColDisplayed=h["default"].isFn(s.on_before_col_displayed)?s.on_before_col_displayed:null,this.onAfterColDisplayed=h["default"].isFn(s.on_after_col_displayed)?s.on_after_col_displayed:null,e.gridLayout&&(this.headersTbl=e.feature("gridLayout").headTbl,this.headersIndex=0,this.onAfterColDisplayed=function(){},this.onAfterColHidden=function(){}),e["import"](s.name+"Style",e.stylePath+this.stylesheet,null,"link"),this.tf=e}return a(t,[{key:"toggle",value:function(){var t=this.contEl.style.display,e=this.onBeforeOpen,s=this.onBeforeClose,i=this.onAfterOpen,l=this.onAfterClose;e&&"inline"!==t&&e.call(null,this),s&&"inline"===t&&s.call(null,this),this.contEl.style.display="inline"===t?"none":"inline",i&&"inline"!==t&&i.call(null,this),l&&"inline"===t&&l.call(null,this)}},{key:"checkItem",value:function(t){var e=t.parentNode;if(e&&t){var s=t.firstChild.checked,i=t.firstChild.getAttribute("id").split("_")[1];i=parseInt(i,10),s?r["default"].addClass(e,this.listSlcItemCssClass):r["default"].removeClass(e,this.listSlcItemCssClass);var l=!1;(this.tickToHide&&s||!this.tickToHide&&!s)&&(l=!0),this.setHidden(i,l)}}},{key:"init",value:function(){this.manager&&(this.buildBtn(),this.buildManager(),this.initialized=!0)}},{key:"buildBtn",value:function(){var t=this;if(!this.btnEl){var e=this.tf,s=r["default"].create("span",["id",this.prfx+e.id]);s.className=this.spanCssClass,this.btnTgtId||e.setToolbar();var i=this.btnTgtId?r["default"].id(this.btnTgtId):e.rDiv;if(this.btnTgtId)i.appendChild(s);else{var l=i.firstChild;l.parentNode.insertBefore(s,l)}if(this.btnHtml){s.innerHTML=this.btnHtml;var a=s.firstChild;this.enableHover?u["default"].add(a,"mouseover",function(e){t.toggle(e)}):u["default"].add(a,"click",function(e){t.toggle(e)})}else{var n=r["default"].create("a",["href","javascript:;"]);n.className=this.btnCssClass,n.title=this.desc,n.innerHTML=this.btnText,s.appendChild(n),this.enableHover?u["default"].add(n,"mouseover",function(e){t.toggle(e)}):u["default"].add(n,"click",function(e){t.toggle(e)})}this.spanEl=s,this.btnEl=this.spanEl.firstChild,this.onLoaded&&this.onLoaded.call(null,this)}}},{key:"buildManager",value:function(){var t=this,e=this.tf,s=this.contElTgtId?r["default"].id(this.contElTgtId):r["default"].create("div",["id",this.prfxCont+e.id]);s.className=this.contCssClass;var i=r["default"].create("p");i.innerHTML=this.text,s.appendChild(i);var l=r["default"].create("ul",["id","ul"+this.name+"_"+e.id]);l.className=this.listCssClass;var a=this.headersTbl?this.headersTbl:e.tbl,n=this.headersTbl?this.headersIndex:e.getHeadersRowIndex(),o=a.rows[n];if(this.enableTickAll){var h=r["default"].createCheckItem("col__"+e.id,this.tickAllText,this.tickAllText);r["default"].addClass(h,this.listItemCssClass),l.appendChild(h),h.check.checked=!this.tickToHide,u["default"].add(h.check,"click",function(){for(var t=0;t',this.icnCollapseHtml='Collapse filters',this.defaultText="Toggle filters",this.targetId=s.target_id||null,this.enableIcon=s.enable_icon===!1?!1:!0,this.btnText=s.btn_text||"",this.collapseBtnHtml=this.enableIcon?this.icnCollapseHtml+this.btnText:this.btnText||this.defaultText,this.expandBtnHtml=this.enableIcon?this.icnExpandHtml+this.btnText:this.btnText||this.defaultText,this.btnHtml=s.btn_html||null,this.btnCssClass=s.btn_css_class||"btnExpClpFlt",this.contCssClass=s.cont_css_class||"expClpFlt",this.filtersRowIndex=h["default"].isUndef(s.filters_row_index)?e.getFiltersRowIndex():s.filters_row_index,this.visibleAtStart=h["default"].isUndef(s.visible_at_start)?!0:Boolean(s.visible_at_start),this.prfx="fltsVis_",this.onBeforeShow=h["default"].isFn(s.on_before_show)?s.on_before_show:null,this.onAfterShow=h["default"].isFn(s.on_after_show)?s.on_after_show:null,this.onBeforeHide=h["default"].isFn(s.on_before_hide)?s.on_before_hide:null,this.onAfterHide=h["default"].isFn(s.on_after_hide)?s.on_after_hide:null,e["import"](s.name+"Style",e.stylePath+this.stylesheet,null,"link"),this.tf=e}return a(t,[{key:"init",value:function(){this.initialized||(this.buildUI(),this.initialized=!0)}},{key:"buildUI",value:function(){var t=this,e=this.tf,s=r["default"].create("span",["id",this.prfx+e.id]);s.className=this.contCssClass,this.targetId||e.setToolbar();var i=this.targetId?r["default"].id(this.targetId):e.rDiv;if(this.targetId)i.appendChild(s);else{var l=i.firstChild;l.parentNode.insertBefore(s,l)}var a=void 0;this.btnHtml?(s.innerHTML=this.btnHtml,a=s.firstChild,u["default"].add(a,"click",function(){return t.toggle()})):(a=r["default"].create("a",["href","javascript:void(0);"]),a.className=this.btnCssClass,a.title=this.btnText||this.defaultText,a.innerHTML=this.collapseBtnHtml,s.appendChild(a),u["default"].add(a,"click",function(){return t.toggle()})),this.contEl=s,this.btnEl=a,this.visibleAtStart||this.toggle()}},{key:"toggle",value:function(){var t=this.tf,e=t.gridLayout?t.feature("gridLayout").headTbl:t.tbl,s=e.rows[this.filtersRowIndex],i=s.style.display;this.onBeforeShow&&""!==i&&this.onBeforeShow.call(this,this),this.onBeforeHide&&""===i&&this.onBeforeHide.call(null,this),s.style.display=""===i?"none":"",this.enableIcon&&!this.btnHtml&&(this.btnEl.innerHTML=""===i?this.expandBtnHtml:this.collapseBtnHtml),this.onAfterShow&&""!==i&&this.onAfterShow.call(null,this),this.onAfterHide&&""===i&&this.onAfterHide.call(null,this)}},{key:"destroy",value:function(){(this.btnEl||this.contEl)&&(this.btnEl.innerHTML="",this.btnEl.parentNode.removeChild(this.btnEl),this.btnEl=null,this.contEl.innerHTML="",this.contEl.parentNode.removeChild(this.contEl),this.contEl=null,this.initialized=!1)}}]),t}();e["default"]=c,t.exports=e["default"]},function(t,e,s){"use strict";function i(t){return S["default"].removeNbFormat(t,"us")}function l(t){return S["default"].removeNbFormat(t,"eu")}function a(t,e){return x["default"].format(t,e)}function n(t){return a(t,"DMY")}function r(t){return a(t,"MDY")}function o(t){return a(t,"YMD")}function h(t){return a(t,"DDMMMYYYY")}function d(t){var e=t.split(".");for(var s in e){for(var i=e[s];3>i.length;)i="0"+i;e[s]=i}return e.join(".")}function u(t,e){var s=d(t.value.toLowerCase()),i=d(e.value.toLowerCase());return s==i?0:i>s?-1:1}var c=function(t){return t&&t.__esModule?t:{"default":t}},f=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},p=function(){function t(t,e){for(var s=0;si;i++);return i},SortableTable.prototype.initHeader=function(s){var i=this;if(!i.tHead){if(!e.gridLayout)return;i.tHead=e.feature("gridLayout").headTbl.tHead}i.headersRow=e.headersRow;var l=i.tHead.rows[i.headersRow].cells;i.sortTypes=s||[];for(var a=l.length,n=void 0,r=void 0,o=0;a>o;o++)r=l[o],null!==i.sortTypes[o]&&"None"!==i.sortTypes[o]?(r.style.cursor="pointer",n=m["default"].create("img",["src",t.imgPath+t.imgBlank]),r.appendChild(n),null!==i.sortTypes[o]&&r.setAttribute("_sortType",i.sortTypes[o]),w["default"].add(r,"click",i._headerOnclick)):(r.setAttribute("_sortType",s[o]),r._sortType="None");i.updateHeaderArrows()},SortableTable.prototype.updateHeaderArrows=function(){var e=this,s=void 0,i=void 0,l=void 0;if(t.asyncSort&&t.triggerIds.length>0){var a=t.triggerIds;s=[],i=a.length;for(var n=0;nr;r++){var o=s[r].getAttribute("_sortType");null!==o&&"None"!==o&&(l=s[r].lastChild||s[r],"img"!==l.nodeName.toLowerCase()&&(l=m["default"].create("img",["src",t.imgPath+t.imgBlank]),s[r].appendChild(l)),r===e.sortColumn?l.className=t.imgClassName+" "+(this.descending?t.imgDescClassName:t.imgAscClassName):l.className=t.imgClassName)}},SortableTable.prototype.getRowValue=function(t,e,s){var i=this,l=i._sortTypeInfo[e];if(l&&l.getRowValue)return l.getRowValue(t,s);var a=t.cells[s],n=SortableTable.getInnerText(a);return i.getValueFromString(n,e)},SortableTable.getInnerText=function(e){return e?e.getAttribute(t.customKey)?e.getAttribute(t.customKey):m["default"].getText(e):void 0}}},{key:"addSortType",value:function(){var t=arguments;SortableTable.prototype.addSortType(t[0],t[1],t[2],t[3])}},{key:"setSortTypes",value:function(){for(var t=this,e=this.tf,s=this.sortTypes,a=[],c=0;c0&&!function(){for(var e=t.triggerIds,s=0;s descending, false -> ascending\r\nSortableTable.prototype.defaultDescending = false;\r\n\r\n// shared between all instances. This is intentional to allow external files\r\n// to modify the prototype\r\nSortableTable.prototype._sortTypeInfo = {};\r\n\r\nSortableTable.prototype.setTable = function (oTable) {\r\n if ( this.tHead )\r\n this.uninitHeader();\r\n this.element = oTable;\r\n this.setTHead( oTable.tHead );\r\n this.setTBody( oTable.tBodies[0] );\r\n};\r\n\r\nSortableTable.prototype.setTHead = function (oTHead) {\r\n if (this.tHead && this.tHead != oTHead )\r\n this.uninitHeader();\r\n this.tHead = oTHead;\r\n this.initHeader( this.sortTypes );\r\n};\r\n\r\nSortableTable.prototype.setTBody = function (oTBody) {\r\n this.tBody = oTBody;\r\n};\r\n\r\nSortableTable.prototype.setSortTypes = function ( oSortTypes ) {\r\n if ( this.tHead )\r\n this.uninitHeader();\r\n this.sortTypes = oSortTypes || [];\r\n if ( this.tHead )\r\n this.initHeader( this.sortTypes );\r\n};\r\n\r\n// adds arrow containers and events\r\n// also binds sort type to the header cells so that reordering columns does\r\n// not break the sort types\r\nSortableTable.prototype.initHeader = function (oSortTypes) {\r\n if (!this.tHead) return;\r\n var cells = this.tHead.rows[0].cells;\r\n var doc = this.tHead.ownerDocument || this.tHead.document;\r\n this.sortTypes = oSortTypes || [];\r\n var l = cells.length;\r\n var img, c;\r\n for (var i = 0; i < l; i++) {\r\n c = cells[i];\r\n if (this.sortTypes[i] != null && this.sortTypes[i] != "None") {\r\n img = doc.createElement("IMG");\r\n img.src = "images/blank.png";\r\n c.appendChild(img);\r\n if (this.sortTypes[i] != null)\r\n c._sortType = this.sortTypes[i];\r\n if (typeof c.addEventListener != "undefined")\r\n c.addEventListener("click", this._headerOnclick, false);\r\n else if (typeof c.attachEvent != "undefined")\r\n c.attachEvent("onclick", this._headerOnclick);\r\n else\r\n c.onclick = this._headerOnclick;\r\n }\r\n else\r\n {\r\n c.setAttribute( "_sortType", oSortTypes[i] );\r\n c._sortType = "None";\r\n }\r\n }\r\n this.updateHeaderArrows();\r\n};\r\n\r\n// remove arrows and events\r\nSortableTable.prototype.uninitHeader = function () {\r\n if (!this.tHead) return;\r\n var cells = this.tHead.rows[0].cells;\r\n var l = cells.length;\r\n var c;\r\n for (var i = 0; i < l; i++) {\r\n c = cells[i];\r\n if (c._sortType != null && c._sortType != "None") {\r\n c.removeChild(c.lastChild);\r\n if (typeof c.removeEventListener != "undefined")\r\n c.removeEventListener("click", this._headerOnclick, false);\r\n else if (typeof c.detachEvent != "undefined")\r\n c.detachEvent("onclick", this._headerOnclick);\r\n c._sortType = null;\r\n c.removeAttribute( "_sortType" );\r\n }\r\n }\r\n};\r\n\r\nSortableTable.prototype.updateHeaderArrows = function () {\r\n if (!this.tHead) return;\r\n var cells = this.tHead.rows[0].cells;\r\n var l = cells.length;\r\n var img;\r\n for (var i = 0; i < l; i++) {\r\n if (cells[i]._sortType != null && cells[i]._sortType != "None") {\r\n img = cells[i].lastChild;\r\n if (i == this.sortColumn)\r\n img.className = "sort-arrow " + (this.descending ? "descending" : "ascending");\r\n else\r\n img.className = "sort-arrow";\r\n }\r\n }\r\n};\r\n\r\nSortableTable.prototype.headerOnclick = function (e) {\r\n // find TD element\r\n var el = e.target || e.srcElement;\r\n while (el.tagName != "TD")\r\n el = el.parentNode;\r\n\r\n this.sort(SortableTable.msie ? SortableTable.getCellIndex(el) : el.cellIndex);\r\n};\r\n\r\n// IE returns wrong cellIndex when columns are hidden\r\nSortableTable.getCellIndex = function (oTd) {\r\n var cells = oTd.parentNode.childNodes\r\n var l = cells.length;\r\n var i;\r\n for (i = 0; cells[i] != oTd && i < l; i++)\r\n ;\r\n return i;\r\n};\r\n\r\nSortableTable.prototype.getSortType = function (nColumn) {\r\n return this.sortTypes[nColumn] || "String";\r\n};\r\n\r\n// only nColumn is required\r\n// if bDescending is left out the old value is taken into account\r\n// if sSortType is left out the sort type is found from the sortTypes array\r\n\r\nSortableTable.prototype.sort = function (nColumn, bDescending, sSortType) {\r\n if (!this.tBody) return;\r\n if (sSortType == null)\r\n sSortType = this.getSortType(nColumn);\r\n\r\n // exit if None\r\n if (sSortType == "None")\r\n return;\r\n\r\n if (bDescending == null) {\r\n if (this.sortColumn != nColumn)\r\n this.descending = this.defaultDescending;\r\n else\r\n this.descending = !this.descending;\r\n }\r\n else\r\n this.descending = bDescending;\r\n\r\n this.sortColumn = nColumn;\r\n\r\n if (typeof this.onbeforesort == "function")\r\n this.onbeforesort();\r\n\r\n var f = this.getSortFunction(sSortType, nColumn);\r\n var a = this.getCache(sSortType, nColumn);\r\n var tBody = this.tBody;\r\n\r\n a.sort(f);\r\n\r\n if (this.descending)\r\n a.reverse();\r\n\r\n if (SortableTable.removeBeforeSort) {\r\n // remove from doc\r\n var nextSibling = tBody.nextSibling;\r\n var p = tBody.parentNode;\r\n p.removeChild(tBody);\r\n }\r\n\r\n // insert in the new order\r\n var l = a.length;\r\n for (var i = 0; i < l; i++)\r\n tBody.appendChild(a[i].element);\r\n\r\n if (SortableTable.removeBeforeSort) {\r\n // insert into doc\r\n p.insertBefore(tBody, nextSibling);\r\n }\r\n\r\n this.updateHeaderArrows();\r\n\r\n this.destroyCache(a);\r\n\r\n if (typeof this.onsort == "function")\r\n this.onsort();\r\n};\r\n\r\nSortableTable.prototype.asyncSort = function (nColumn, bDescending, sSortType) {\r\n var oThis = this;\r\n this._asyncsort = function () {\r\n oThis.sort(nColumn, bDescending, sSortType);\r\n };\r\n window.setTimeout(this._asyncsort, 1);\r\n};\r\n\r\nSortableTable.prototype.getCache = function (sType, nColumn) {\r\n if (!this.tBody) return [];\r\n var rows = this.tBody.rows;\r\n var l = rows.length;\r\n var a = new Array(l);\r\n var r;\r\n for (var i = 0; i < l; i++) {\r\n r = rows[i];\r\n a[i] = {\r\n value: this.getRowValue(r, sType, nColumn),\r\n element: r\r\n };\r\n };\r\n return a;\r\n};\r\n\r\nSortableTable.prototype.destroyCache = function (oArray) {\r\n var l = oArray.length;\r\n for (var i = 0; i < l; i++) {\r\n oArray[i].value = null;\r\n oArray[i].element = null;\r\n oArray[i] = null;\r\n }\r\n};\r\n\r\nSortableTable.prototype.getRowValue = function (oRow, sType, nColumn) {\r\n // if we have defined a custom getRowValue use that\r\n if (this._sortTypeInfo[sType] && this._sortTypeInfo[sType].getRowValue)\r\n return this._sortTypeInfo[sType].getRowValue(oRow, nColumn);\r\n\r\n var s;\r\n var c = oRow.cells[nColumn];\r\n if (typeof c.innerText != "undefined")\r\n s = c.innerText;\r\n else\r\n s = SortableTable.getInnerText(c);\r\n return this.getValueFromString(s, sType);\r\n};\r\n\r\nSortableTable.getInnerText = function (oNode) {\r\n var s = "";\r\n var cs = oNode.childNodes;\r\n var l = cs.length;\r\n for (var i = 0; i < l; i++) {\r\n switch (cs[i].nodeType) {\r\n case 1: //ELEMENT_NODE\r\n s += SortableTable.getInnerText(cs[i]);\r\n break;\r\n case 3: //TEXT_NODE\r\n s += cs[i].nodeValue;\r\n break;\r\n }\r\n }\r\n return s;\r\n};\r\n\r\nSortableTable.prototype.getValueFromString = function (sText, sType) {\r\n if (this._sortTypeInfo[sType])\r\n return this._sortTypeInfo[sType].getValueFromString( sText );\r\n return sText;\r\n /*\r\n switch (sType) {\r\n case "Number":\r\n return Number(sText);\r\n case "CaseInsensitiveString":\r\n return sText.toUpperCase();\r\n case "Date":\r\n var parts = sText.split("-");\r\n var d = new Date(0);\r\n d.setFullYear(parts[0]);\r\n d.setDate(parts[2]);\r\n d.setMonth(parts[1] - 1);\r\n return d.valueOf();\r\n }\r\n return sText;\r\n */\r\n };\r\n\r\nSortableTable.prototype.getSortFunction = function (sType, nColumn) {\r\n if (this._sortTypeInfo[sType])\r\n return this._sortTypeInfo[sType].compare;\r\n return SortableTable.basicCompare;\r\n};\r\n\r\nSortableTable.prototype.destroy = function () {\r\n this.uninitHeader();\r\n var win = this.document.parentWindow;\r\n if (win && typeof win.detachEvent != "undefined") { // only IE needs this\r\n win.detachEvent("onunload", this._onunload);\r\n }\r\n this._onunload = null;\r\n this.element = null;\r\n this.tHead = null;\r\n this.tBody = null;\r\n this.document = null;\r\n this._headerOnclick = null;\r\n this.sortTypes = null;\r\n this._asyncsort = null;\r\n this.onsort = null;\r\n};\r\n\r\n// Adds a sort type to all instance of SortableTable\r\n// sType : String - the identifier of the sort type\r\n// fGetValueFromString : function ( s : string ) : T - A function that takes a\r\n// string and casts it to a desired format. If left out the string is just\r\n// returned\r\n// fCompareFunction : function ( n1 : T, n2 : T ) : Number - A normal JS sort\r\n// compare function. Takes two values and compares them. If left out less than,\r\n// <, compare is used\r\n// fGetRowValue : function( oRow : HTMLTRElement, nColumn : int ) : T - A function\r\n// that takes the row and the column index and returns the value used to compare.\r\n// If left out then the innerText is first taken for the cell and then the\r\n// fGetValueFromString is used to convert that string the desired value and type\r\n\r\nSortableTable.prototype.addSortType = function (sType, fGetValueFromString, fCompareFunction, fGetRowValue) {\r\n this._sortTypeInfo[sType] = {\r\n type: sType,\r\n getValueFromString: fGetValueFromString || SortableTable.idFunction,\r\n compare: fCompareFunction || SortableTable.basicCompare,\r\n getRowValue: fGetRowValue\r\n };\r\n};\r\n\r\n// this removes the sort type from all instances of SortableTable\r\nSortableTable.prototype.removeSortType = function (sType) {\r\n delete this._sortTypeInfo[sType];\r\n};\r\n\r\nSortableTable.basicCompare = function compare(n1, n2) {\r\n if (n1.value < n2.value)\r\n return -1;\r\n if (n2.value < n1.value)\r\n return 1;\r\n return 0;\r\n};\r\n\r\nSortableTable.idFunction = function (x) {\r\n return x;\r\n};\r\n\r\nSortableTable.toUpperCase = function (s) {\r\n return s.toUpperCase();\r\n};\r\n\r\nSortableTable.toDate = function (s) {\r\n var parts = s.split("-");\r\n var d = new Date(0);\r\n d.setFullYear(parts[0]);\r\n d.setDate(parts[2]);\r\n d.setMonth(parts[1] - 1);\r\n return d.valueOf();\r\n};\r\n\r\n\r\n// add sort types\r\nSortableTable.prototype.addSortType("Number", Number);\r\nSortableTable.prototype.addSortType("CaseInsensitiveString", SortableTable.toUpperCase);\r\nSortableTable.prototype.addSortType("Date", SortableTable.toDate);\r\nSortableTable.prototype.addSortType("String");\r\n// None is a special case\r\n'}]); \ No newline at end of file diff --git a/static/style/extensions/filtersVisibility.styl b/static/style/extensions/filtersVisibility.styl index 5c28a3a4..5aac4a14 100644 --- a/static/style/extensions/filtersVisibility.styl +++ b/static/style/extensions/filtersVisibility.styl @@ -11,7 +11,7 @@ span.expClpFlt height $min-height display inline-block - :hover + &:hover background-color $toolbar-hover-color img diff --git a/static/style/themes/default/default.styl b/static/style/themes/default/default.styl index f82b05b0..6ad649b7 100644 --- a/static/style/themes/default/default.styl +++ b/static/style/themes/default/default.styl @@ -43,50 +43,37 @@ input.flt // toolbar .inf - background #f4f4f4 url(images/bg_infDiv.jpg) 0 0 repeat-x !important + height $min-height + background #D7D7D7 url(images/bg_infDiv.jpg) 0 0 repeat-x !important // reset button input.reset - width 19px - height 19px - cursor pointer !important - border 0 !important - vertical-align middle background transparent url(images/btn_eraser.gif) center center no-repeat !important - :hover - background transparent url(images/btn_over_eraser.gif) center center no-repeat !important - -// paging -input.pgInp - width 19px - height 19px - cursor pointer !important - border 0 !important +.helpBtn + &:hover + background-color transparent .nextPage background transparent url(images/btn_next_page.gif) center center no-repeat !important - :hover + &:hover background transparent url(images/btn_over_next_page.gif) center center no-repeat !important .previousPage background transparent url(images/btn_previous_page.gif) center center no-repeat !important - :hover + &:hover background transparent url(images/btn_over_previous_page.gif) center center no-repeat !important .firstPage background transparent url(images/btn_first_page.gif) center center no-repeat !important - :hover + &:hover background transparent url(images/btn_over_first_page.gif) center center no-repeat !important .lastPage background transparent url(images/btn_last_page.gif) center center no-repeat !important - :hover + &:hover background transparent url(images/btn_over_last_page.gif) center center no-repeat !important -select.rspg - font-size 10px - // grid-layout // main container @@ -110,8 +97,8 @@ div.grd_headTblCont border-right none !important // headers -div.grd_tblCont table th, -div.grd_headTblCont table th, +div.grd_tblCont table th +div.grd_headTblCont table th div.grd_headTblCont table td background #EBECEE url(images/bg_th.jpg) left top repeat-x !important border-bottom 1px solid #D0D0D0 !important @@ -119,15 +106,17 @@ div.grd_headTblCont table td border-left 1px solid #fff !important border-top 1px solid #fff !important +div.grd_tblCont table td + border-bottom 1px solid #999 !important + // toolbar containing left, middle and right divs .grd_inf background #D7D7D7 url(images/bg_infDiv.jpg) 0 0 repeat-x !important border-top 1px solid #D0D0D0 !important - height 29px !important // loader .loader - border 1px solid #999; background:#fff + border 1px solid #999 .defaultLoader width 32px height 32px @@ -138,3 +127,9 @@ div.grd_headTblCont table td background-color #fff .odd background-color #D5D5D5 + +// filters visibility +span.expClpFlt + a.btnExpClpFlt + &:hover + background-color transparent !important diff --git a/static/style/themes/mytheme/mytheme.styl b/static/style/themes/mytheme/mytheme.styl index de755f14..8bb1c89b 100644 --- a/static/style/themes/mytheme/mytheme.styl +++ b/static/style/themes/mytheme/mytheme.styl @@ -47,63 +47,30 @@ input.flt // toolbar .inf - background #f4f4f4 url(images/bg_infDiv.jpg) left bottom repeat-x !important + background #D8D8D8 + height $min-height // reset button input.reset width 53px - height 19px - cursor pointer !important - border 0 !important - vertical-align middle - background transparent url(images/btn_filter.png) center center no-repeat !important; + background transparent url(images/btn_filter.png) center center no-repeat !important - :hover - background #CAD1D6 url(images/btn_filter.png) center center no-repeat !important +.helpBtn + &:hover + background-color transparent // paging - -// left div -.ldiv - width 40% !important - -// middle div */ -.mdiv - width 34% !important - text-align left !important - -// right div -.rdiv - width 20% !important - -input.pgInp - width 19px - height 19px - cursor pointer !important - border 0 !important - .nextPage background transparent url(images/btn_next_page.gif) center center no-repeat !important - :hover - background #CAD1D6 url(images/btn_next_page.gif) center center no-repeat !important .previousPage background transparent url(images/btn_previous_page.gif) center center no-repeat !important - :hover - background #CAD1D6 url(images/btn_previous_page.gif) center center no-repeat !important .firstPage background transparent url(images/btn_first_page.gif) center center no-repeat !important - :hover - background #CAD1D6 url(images/btn_first_page.gif) center center no-repeat !important .lastPage background transparent url(images/btn_last_page.gif) center center no-repeat !important - :hover - background #CAD1D6 url(images/btn_last_page.gif) center center no-repeat !important - -select.rspg - font-size 10px // grid-layout @@ -128,6 +95,10 @@ div.grd_headTblCont div.grd_tblCont table border-right none !important + td + border-bottom 1px dotted #81963B + border-right 1px dotted #81963B + // headers div.grd_tblCont table th, div.grd_headTblCont table th @@ -152,16 +123,13 @@ div.grd_headTblCont table td // div containing left, middle and right divs .grd_inf - background #f4f4f4 url(images/bg_infDiv.jpg) center bottom repeat-x !important + background-color #D8D8D8 border-top 1px solid #D0D0D0 !important - height 29px !important - padding-top 2px !important // loader .loader border 0 !important - background transparent !important - margin 185px auto !important + background #81963b !important .defaultLoader width 32px @@ -174,3 +142,9 @@ div.grd_headTblCont table td .odd background-color #fff + +// filters visibility +span.expClpFlt + a.btnExpClpFlt + &:hover + background-color transparent !important diff --git a/static/style/themes/skyblue/skyblue.styl b/static/style/themes/skyblue/skyblue.styl index 4d53cdfe..57ec0b4d 100644 --- a/static/style/themes/skyblue/skyblue.styl +++ b/static/style/themes/skyblue/skyblue.styl @@ -15,7 +15,7 @@ table.TF margin 0 padding 5px color inherit - background #D1E5FE url("images/bg_skyblue.gif") 0 0 repeat-x + background #D1E5FE url(images/bg_skyblue.gif) 0 0 repeat-x border-color #FDFDFD #A4BED4 #A4BED4 #FDFDFD border-width 1px border-style solid @@ -53,7 +53,7 @@ input.flt .inf background-color #E3EFFF !important border 1px solid #A4BED4 - height 25px + height $min-height color #004A6F div.tot, @@ -62,42 +62,18 @@ div.status // help .helpBtn - margin 0 5px 0 5px - padding 2px 4px 2px 4px - color #004A6F !important - font-size 13px - border 1px solid transparent !important - - :hover - background-color #FFE4AB - border 1px solid #FFB552 !important - text-decoration none + &:hover + background-color transparent // reset button input.reset - width 19px - height 19px - cursor pointer !important - border 1px solid transparent !important - vertical-align middle background transparent url(images/icn_clear_filters.png) center center no-repeat !important - :hover - background #FFE4AB url(images/icn_clear_filters.png) center center no-repeat !important - border 1px solid #FFB552 !important - -// paging -input.pgInp - width 19px - height 19px - cursor pointer !important - border 0 !important - .nextPage background transparent url(images/btn_next_page.gif) center center no-repeat !important border 1px solid transparent !important - :hover + &:hover background #FFE4AB url(images/btn_next_page.gif) center center no-repeat !important border 1px solid #FFB552 !important @@ -105,7 +81,7 @@ input.pgInp background transparent url(images/btn_prev_page.gif) center center no-repeat !important border 1px solid transparent !important - :hover + &:hover background #FFE4AB url(images/btn_prev_page.gif) center center no-repeat !important border 1px solid #FFB552 !important @@ -113,7 +89,7 @@ input.pgInp background transparent url(images/btn_first_page.gif) center center no-repeat !important border 1px solid transparent !important - :hover + &:hover background #FFE4AB url(images/btn_first_page.gif) center center no-repeat !important border 1px solid #FFB552 !important @@ -121,13 +97,10 @@ input.pgInp background transparent url(images/btn_last_page.gif) center center no-repeat !important border 1px solid transparent !important - :hover + &:hover background #FFE4AB url(images/btn_last_page.gif) center center no-repeat !important border 1px solid #FFB552 !important -select.rspg - font-size 10px - // active header .activeHeader background #FFE4AB !important @@ -157,7 +130,6 @@ div.grd_headTblCont div.grd_tblCont table border-right none !important - font 12px/13px "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif !important // headers div.grd_tblCont table th, @@ -168,41 +140,28 @@ div.grd_headTblCont table td border-right 1px solid #A4BED4 !important border-left 1px solid #fff !important border-top 1px solid #fff !important - padding 5px 2px 5px 2px !important div.grd_tblCont table td border-bottom 1px solid #A4BED4 !important border-right 0 !important border-left 0 !important border-top 0 !important - padding 5px 2px 5px 2px !important // toolbar containing left, middle and right divs .grd_inf - background-color #D9EAED !important - height 25px + background-color #CCE2FE color #004A6F border-top 1px solid #99CCCC !important - .rdiv - height 28px - a text-decoration none font-weight bold - // help button - a.helpBtn - vertical-align middle - margin-top 2px !important - padding-top 1px !important - // loader .loader - border 0 !important - background transparent !important - margin-top 40px - margin-left 0 !important + background-color #2D8EEF + border 1px solid #CCE2FE + border-radius 5px // alternating background colors .even @@ -211,6 +170,12 @@ div.grd_tblCont table td .odd background-color #E3EFFF +// filters visibility +span.expClpFlt + a.btnExpClpFlt + &:hover + background-color transparent !important + // ezedittable // selection diff --git a/static/templates/advanced-grid-editable.html b/static/templates/advanced-grid-editable.html index dabca780..a5521a23 100644 --- a/static/templates/advanced-grid-editable.html +++ b/static/templates/advanced-grid-editable.html @@ -50,6 +50,7 @@ var filtersConfig = { base_path: '../dist/tablefilter/', grid_layout: true, + grid_width: '900px', alternate_rows: true, btn_reset: true, rows_counter: true, @@ -58,9 +59,9 @@ col_1: 'select', col_2: 'select', col_widths: [ - "150px", "70px", "70px", - "120px", "120px", "100px", - "100px", "100px", "100px" + '150px', '90px', '70px', + '120px', '120px', '100px', + '100px', '100px', '100px' ], extensions:[ { diff --git a/static/templates/data-types.html b/static/templates/data-types.html index 104b9721..70e793d0 100644 --- a/static/templates/data-types.html +++ b/static/templates/data-types.html @@ -96,17 +96,13 @@ var tfConfig = { }, extensions:[ { - name: 'sort', - types: [ - 'number', 'string', 'string', - 'US', 'none', 'string' - ] + name: 'sort' },{ name: 'colOps', - id: ["sum1", "sum2"], + id: ['sum1', 'sum2'], col: [3, 4], - operation: ["sum", "sum"], - write_method: ["innerhtml", 'innerhtml'], + operation: ['sum', 'sum'], + write_method: ['innerhtml', 'innerhtml'], exclude_row: [totRowIndex], decimal_precision: [2, 2], tot_row_index: [totRowIndex], diff --git a/static/templates/theme-roller.html b/static/templates/theme-roller.html index dbdef3cc..c3386ce5 100644 --- a/static/templates/theme-roller.html +++ b/static/templates/theme-roller.html @@ -30,6 +30,7 @@ var tfConfig = { filters_row_index: 2, headers_row_index: 1, sort: true, + paging: true, col_number_format: [ null, null, 'US', null, null, null @@ -79,7 +80,8 @@ var tfConfig = { /* theme */ themes: [{ name: 'default' }], - extensions: [{ name: 'sort' }] + extensions: [{ name: 'sort' },/*{ name: 'colsVisibility'},*/ + {name:'filtersVisibility'}] }; var tf = new TableFilter('books', tfConfig, 2); From e33670e51be9dd902e82862c4fe5f61ca92385e0 Mon Sep 17 00:00:00 2001 From: Max Guglielmi Date: Sun, 9 Aug 2015 22:40:10 +1000 Subject: [PATCH 7/8] Set default stylus compression --- Gruntfile.js | 1 - dist/tablefilter/style/colsVisibility.css | 88 +-- dist/tablefilter/style/filtersVisibility.css | 17 +- dist/tablefilter/style/tablefilter.css | 731 +----------------- .../style/themes/default/default.css | 130 +--- .../style/themes/mytheme/mytheme.css | 136 +--- .../style/themes/skyblue/skyblue.css | 179 +---- 7 files changed, 27 insertions(+), 1255 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index c50bb156..39e1fe7d 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -173,7 +173,6 @@ module.exports = function (grunt) { stylus: { compile: { options: { - compress: false, banner: '/** \n' + ' *\t '+ pkg.name +' v'+ pkg.version + ' by Max Guglielmi \n' + diff --git a/dist/tablefilter/style/colsVisibility.css b/dist/tablefilter/style/colsVisibility.css index 66dde190..ef130509 100644 --- a/dist/tablefilter/style/colsVisibility.css +++ b/dist/tablefilter/style/colsVisibility.css @@ -1,90 +1,6 @@ /** * TableFilter v0.0.0 by Max Guglielmi - * build date: 2015-08-09T12:32:52.610Z + * build date: 2015-08-09T12:39:08.406Z * MIT License */ -/** - * ColsVisibility extension default style - */ -span.colVisSpan { - text-align: left; -} -span.colVisSpan a.colVis { - display: inline-block; - padding: 7px 5px 0; - font-size: inherit; - font-weight: inherit; - vertical-align: top; -} -div.colVisCont { - position: relative; - background: #fff; - -webkit-box-shadow: 3px 3px 2px #888; - -moz-box-shadow: 3px 3px 2px #888; - box-shadow: 3px 3px 2px #888; - position: absolute; - display: none; - border: 1px solid #ccc; - height: auto; - width: 250px; - background-color: #fff; - margin: 35px 0 0 -100px; - z-index: 10000; - padding: 10px 10px 10px 10px; - text-align: left; - font-size: 12px; -} -div.colVisCont:after, -div.colVisCont:before { - bottom: 100%; - left: 50%; - border: solid transparent; - content: " "; - height: 0; - width: 0; - position: absolute; - pointer-events: none; -} -div.colVisCont:after { - border-color: rgba(255,255,255,0); - border-bottom-color: #fff; - border-width: 10px; - margin-left: -10px; -} -div.colVisCont:before { - border-color: rgba(255,255,255,0); - border-bottom-color: #ccc; - border-width: 12px; - margin-left: -12px; -} -div.colVisCont p { - margin: 6px auto 6px auto; -} -div.colVisCont a.colVis { - display: initial; - font-weight: inherit; -} -ul.cols_checklist { - padding: 0; - margin: 0; - list-style: none; -} -ul.cols_checklist label { - display: block; -} -ul.cols_checklist input { - vertical-align: middle; - margin: 2px 5px 2px 1px; -} -li.cols_checklist_item { - padding: 4px; - margin: 0; -} -li.cols_checklist_item:hover { - background-color: #335ea8; - color: #fff; -} -.cols_checklist_slc_item { - background-color: #335ea8; - color: #fff; -} +span.colVisSpan{text-align:left;}span.colVisSpan a.colVis{display:inline-block;padding:7px 5px 0;font-size:inherit;font-weight:inherit;vertical-align:top}div.colVisCont{position:relative;background:#fff;-webkit-box-shadow:3px 3px 2px #888;-moz-box-shadow:3px 3px 2px #888;box-shadow:3px 3px 2px #888;position:absolute;display:none;border:1px solid #ccc;height:auto;width:250px;background-color:#fff;margin:35px 0 0 -100px;z-index:10000;padding:10px 10px 10px 10px;text-align:left;font-size:12px;}div.colVisCont:after,div.colVisCont:before{bottom:100%;left:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}div.colVisCont:after{border-color:rgba(255,255,255,0);border-bottom-color:#fff;border-width:10px;margin-left:-10px}div.colVisCont:before{border-color:rgba(255,255,255,0);border-bottom-color:#ccc;border-width:12px;margin-left:-12px}div.colVisCont p{margin:6px auto 6px auto}div.colVisCont a.colVis{display:initial;font-weight:inherit}ul.cols_checklist{padding:0;margin:0;list-style:none;}ul.cols_checklist label{display:block}ul.cols_checklist input{vertical-align:middle;margin:2px 5px 2px 1px}li.cols_checklist_item{padding:4px;margin:0;}li.cols_checklist_item:hover{background-color:#335ea8;color:#fff}.cols_checklist_slc_item{background-color:#335ea8;color:#fff} \ No newline at end of file diff --git a/dist/tablefilter/style/filtersVisibility.css b/dist/tablefilter/style/filtersVisibility.css index e2afaee3..877485bc 100644 --- a/dist/tablefilter/style/filtersVisibility.css +++ b/dist/tablefilter/style/filtersVisibility.css @@ -1,19 +1,6 @@ /** * TableFilter v0.0.0 by Max Guglielmi - * build date: 2015-08-09T12:32:52.610Z + * build date: 2015-08-09T12:39:08.406Z * MIT License */ -/** - * Filters visibility extension default style - */ -span.expClpFlt a.btnExpClpFlt { - width: 35px; - height: 35px; - display: inline-block; -} -span.expClpFlt a.btnExpClpFlt:hover { - background-color: #f4f4f4; -} -span.expClpFlt img { - padding: 8px 11px 11px 11px; -} +span.expClpFlt a.btnExpClpFlt{width:35px;height:35px;display:inline-block;}span.expClpFlt a.btnExpClpFlt:hover{background-color:#f4f4f4}span.expClpFlt img{padding:8px 11px 11px 11px} \ No newline at end of file diff --git a/dist/tablefilter/style/tablefilter.css b/dist/tablefilter/style/tablefilter.css index c0c89243..9baeb506 100644 --- a/dist/tablefilter/style/tablefilter.css +++ b/dist/tablefilter/style/tablefilter.css @@ -1,719 +1,22 @@ /** * TableFilter v0.0.0 by Max Guglielmi - * build date: 2015-08-09T12:32:52.610Z + * build date: 2015-08-09T12:39:08.406Z * MIT License */ -/** - * Filtered column marker default style - */ -.activeHeader { - background-color: #66afe9 !important; - color: #fff !important; -} +.activeHeader{background-color:#66afe9 !important;color:#fff !important} +.even{background-color:#fff}.odd{background-color:#f9f9f9} -/** - * Alternating rows default style - */ -.even { - background-color: #fff; -} -.odd { - background-color: #f9f9f9; -} - -/** - * Global variables - */ - -/** - * ezEditTable integration default overrides - */ -.ezActiveRow { - background-color: #2852a8 !important; - color: #fff; -} -.ezSelectedRow { - background-color: #316ac5 !important; - color: #fff; -} -.ezActiveCell { - background-color: #d9e8fb !important; - color: #000 !important; - font-weight: bold; -} -.ezETSelectedCell { - background-color: #ffdc61 !important; - font-weight: bold; - color: #000 !important; -} -.ezUnselectable { - -moz-user-select: -moz-none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - user-select: none; -} -.ezInputEditor { - width: 95%; - height: auto; - font-size: inherit; - border: 1px solid #aaccf6; -} -.ezTextareaEditor { - width: 95%; - height: 35px; - font-size: inherit; - border: 1px solid #aaccf6; -} -.ezSelectEditor { - width: 100%; - font-size: inherit; - border: 1px solid #aaccf6; -} -.ezModifiedCell { - background: transparent url("themes/bg_mod_cell.png") 0 0 no-repeat; -} -select[multiple="multiple"].ezSelectEditor { - height: 35px; -} -/* Command type editor */ -.ezCommandEditor { - margin: 2px; -} -.ezCommandEditor button, -.ezCommandEditor input[type="button"] { - min-height: 22px; - margin: 1px; - padding: 3px; - border: 1px solid #ccc; - background: #fff; - border-radius: 4px 4px 4px 4px; - -moz-border-radius: 4px 4px 4px 4px; -} -.ezCommandEditor button:hover, -.ezCommandEditor input[type="button"]:hover { - border: 1px solid #999; -} -.ezCommandEditor img { - border: 0; - vertical-align: middle; - margin: 2px; -} -.ezOpacity { - opacity: 0.6 /* CSS3 standard */; -} -.alignLeft { - text-align: left; -} -.alignCenter { - text-align: center; -} -.alignRight { - text-align: right; -} - -/** - * Checklist filters default style - */ -.div_checklist { - width: 100%; - height: 90px; - border: 1px solid #f4f4f4; - overflow: auto; - text-align: left; - background-color: #fff; - color: #444; -} -.div_checklist ul.flt_checklist { - padding: 0 !important; - margin: 0 !important; - list-style: none !important; -} -.div_checklist li.flt_checklist_item { - padding: 1px !important; - margin: 0 !important; - font-size: 10px !important; - border-bottom: 1px solid #f4f4f4 !important; -} -.div_checklist li.flt_checklist_item:hover { - background-color: #335ea8 !important; - color: #fff !important; -} -.div_checklist label { - display: block !important; -} -.div_checklist input { - vertical-align: middle !important; - margin: 2px 5px 2px 1px !important; -} -.flt_checklist_item_disabled { - background-color: #e5e5e5; -} -.flt_checklist_slc_item { - background-color: #335ea8 !important; - color: #fff !important; -} - -/** - * Filters' default style - */ -.fltrow { - height: 1em; - background-color: #eaeaea; -} -.fltrow td { - border-bottom: 1px solid #ccc !important; - border-top: 1px solid #ccc; - border-left: 1px solid #ccc; - border-right: 1px solid #f4f4f4; - padding: 0.2em !important; -} -.btnflt { - height: 35px; - font-family: inherit; - font-size: inherit; - vertical-align: middle; - margin: 0 2px 0 2px; - padding: 0 1px 0 1px; -} -.btnflt_icon { - font-family: inherit; - font-size: inherit; - width: 35px; - height: 35px; - cursor: pointer !important; - border: 0 !important; - vertical-align: middle; - background: transparent url("themes/btn_filter.png") center center no-repeat !important; -} -.flt, -.flt_s, -.single_flt { - font-family: inherit; - display: block; - color: #444; - background-color: #fff; - border: 1px inset #f4f4f4; - margin: 0; - padding: 0 0 0 0.2em; - width: 100%; - height: 35px; - vertical-align: middle; - border-radius: 2px; - box-sizing: border-box; -} -.flt:focus, -.flt_s:focus, -.single_flt:focus { - border-color: #66afe9; - outline: 0 none; - -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.075) inset, 0 0 8px rgba(102,175,233,0.6); - -moz-box-shadow: 0 1px 1px rgba(0,0,0,0.075) inset, 0 0 8px rgba(102,175,233,0.6); - box-shadow: 0 1px 1px rgba(0,0,0,0.075) inset, 0 0 8px rgba(102,175,233,0.6); -} -select.flt_multi { - font-family: inherit; - color: #444; - background-color: #fff; - border: 1px solid #f4f4f4; - margin: 0; - padding: 0.2em; - width: 100%; - height: 90px; - vertical-align: middle; - box-sizing: border-box; -} -.flt_s { - width: 60%; - box-sizing: initial; - display: initial; -} -.single_flt { - width: 70%; - box-sizing: initial; - display: initial; -} -div.popUpFilter { - position: relative; - background: #fff; - -webkit-box-shadow: 3px 3px 2px #888; - -moz-box-shadow: 3px 3px 2px #888; - box-shadow: 3px 3px 2px #888; - margin: 30px auto 0 0; - position: absolute; - display: none; - width: 100px; - background-color: #eaeaea; - border: 1px solid #eaeaea; - padding: 0; -} -div.popUpFilter:after, -div.popUpFilter:before { - bottom: 100%; - left: 50%; - border: solid transparent; - content: " "; - height: 0; - width: 0; - position: absolute; - pointer-events: none; -} -div.popUpFilter:after { - border-color: rgba(255,255,255,0); - border-bottom-color: #fff; - border-width: 10px; - margin-left: -10px; -} -div.popUpFilter:before { - border-color: rgba(255,255,255,0); - border-bottom-color: #eaeaea; - border-width: 12px; - margin-left: -12px; -} - -/** - * Grid layout default style - */ -div.grd_Cont { - -webkit-box-shadow: 4px 4px 10px 0px rgba(50,50,50,0.75); - -moz-box-shadow: 4px 4px 10px 0px rgba(50,50,50,0.75); - box-shadow: 4px 4px 10px 0px rgba(50,50,50,0.75); - width: 800px; - height: auto; - overflow: hidden; - padding: 3px 3px 3px 3px; - background-color: #c8e0fb; - border: 1px solid #99bbe8; -} -div.grd_Cont .fltrow { - background-color: transparent; -} -div.grd_Cont .flt { - border: 1px solid #99bbe8; - width: 97%; -} -div.grd_Cont .flt :focus { - border: 1px solid #558dd9; -} -div.grd_Cont .even { - background-color: #fff; -} -div.grd_Cont .odd { - background-color: #dfe8f6; -} -div.grd_tblCont { - height: 400px; - width: 800px; - background: #fff; - overflow-x: auto; - overflow-y: scroll; -} -div.grd_headTblCont { - height: auto; - width: 800px; - overflow: hidden; - border-bottom: 1px solid #99bbe8; - background-color: #c8e0fb; -} -div.grd_tblCont table, -div.grd_headTblCont table { - border-collapse: collapse; - table-layout: fixed; -} -div.grd_tblCont table { - border-right: 1px solid #99bbe8; -} -div.grd_tblCont table th, -div.grd_headTblCont table th, -div.grd_headTblCont table td { - height: 35px; - background-color: #c8e0fb; - padding: 0.1em 0.5em; - color: #333; - border-right: 1px solid #99bbe8 !important; - overflow: hidden; - text-overflow: ellipsis; -} -div.grd_headTblCont table td { - padding: 0.2em 0.2em; -} -div.grd_tblCont table td { - padding: 0.5em 0.7em; - border-bottom: 1px solid #99bbe8; - overflow: hidden; - text-overflow: ellipsis; -} -.grd_inf { - clear: both; - width: auto; - height: 35px; - background-color: #c8e0fb; - margin: 0; - padding: 1px 3px 1px 3px; - border-top: 1px solid #99bbe8; -} -.grd_inf a { - color: #333; - text-decoration: none; - font-weight: bold; -} -.grd_inf a:hover { - text-decoration: underline; - background-color: transparent; -} -.grd_inf input.reset:hover { - background-color: transparent; -} -.grd_inf .mdiv { - width: 40% !important; -} -.grd_inf .ldiv div { - border: 0; -} -.grd_inf .helpBtn { - border: 0 !important; -} -.grd_inf div.status { - position: absolute; - float: none !important; - height: auto !important; - margin: 19px 0 !important; - font-size: 12px; - color: #333; - border: 0 !important; -} -.grd_inf div.tot { - border: 0 !important; -} - -/** - * Help box default style - */ -.helpBtn { - display: inline-block; - height: 27px; - margin: 0; - padding: 8px 15px 0 15px; - vertical-align: top; -} -.helpBtn:hover { - background-color: #f4f4f4; -} -div.helpCont { - position: relative; - background: #fff; - -webkit-box-shadow: 3px 3px 2px #888; - -moz-box-shadow: 3px 3px 2px #888; - box-shadow: 3px 3px 2px #888; - position: absolute; - display: none; - width: 300px; - padding: 10px; - margin: 45px 0 0 -150px; - border: 1px solid #ccc; - line-height: 20px; - font-size: inherit; - color: #333; - background: #fff; - text-align: left; -} -div.helpCont:after, -div.helpCont:before { - bottom: 100%; - left: 50%; - border: solid transparent; - content: " "; - height: 0; - width: 0; - position: absolute; - pointer-events: none; -} -div.helpCont:after { - border-color: rgba(255,255,255,0); - border-bottom-color: #fff; - border-width: 10px; - margin-left: -10px; -} -div.helpCont:before { - border-color: rgba(255,255,255,0); - border-bottom-color: #ccc; - border-width: 12px; - margin-left: -12px; -} -div.helpCont a { - color: #c00; - text-decoration: underline; - font-weight: normal; -} -div.helpCont a.close { - color: #333; - text-decoration: none; - font-weight: bold; -} -div.helpCont a.close:hover { - text-decoration: none; -} -div.helpCont hr { - border: 1px solid #ccc; -} -div.helpFooter { - margin: 10px 0 0 0; -} -div.helpFooter h4 { - margin: 2px 2px 2px 2px; - color: #333; -} - -/** - * Keyword highlighting default style - */ -span.keyword { - font-weight: 700; - font-style: italic; - border-bottom: 1px dotted #ccc; -} - -/** - * Loading message default style - */ -.loader { - position: absolute; - padding: 0.5em 0.7em; - margin: 10em 0 0 3em; - width: auto; - z-index: 1000; - font-weight: 600; - background-color: #a7a7a8; - vertical-align: middle; - border-radius: 10px; - color: #fff; - text-shadow: 1px 1px #333; -} - -/** - * Paging default style - */ -select.pgSlc { - height: 35px; - margin: 0; - border: 1px solid #f4f4f4; - background-color: #fff; - vertical-align: middle; -} -select.pgSlc:focus { - border-color: #66afe9; - outline: 0 none; - box-shadow: 0 1px 1px rgba(0,0,0,0.075) inset, 0 0 8px rgba(102,175,233,0.6); -} -input.pgNbInp { - height: 35px; - margin: 0; - border: 1px solid #f4f4f4; - background-color: #fff; - width: 35px; -} -input.pgNbInp:focus { - border-color: #66afe9; - outline: 0 none; - box-shadow: 0 1px 1px rgba(0,0,0,0.075) inset, 0 0 8px rgba(102,175,233,0.6); -} -input.pgInp, -.nextPage, -.previousPage, -.firstPage, -.lastPage { - height: 35px; - margin: 0; - border: 1px solid #f4f4f4; - background-color: #fff; - vertical-align: middle; - width: 35px; - border: 0; - font-weight: bold; -} -input.pgInp:focus, -.nextPage:focus, -.previousPage:focus, -.firstPage:focus, -.lastPage:focus { - border-color: #66afe9; - outline: 0 none; - box-shadow: 0 1px 1px rgba(0,0,0,0.075) inset, 0 0 8px rgba(102,175,233,0.6); -} -.nextPage { - background: transparent url("themes/btn_next_page.gif") center center no-repeat !important; -} -.nextPage:hover { - background-color: #f4f4f4 !important; -} -.previousPage { - background: transparent url("themes/btn_previous_page.gif") center center no-repeat !important; -} -.previousPage:hover { - background-color: #f4f4f4 !important; -} -.firstPage { - background: transparent url("themes/btn_first_page.gif") center center no-repeat !important; -} -.firstPage:hover { - background-color: #f4f4f4 !important; -} -.lastPage { - background: transparent url("themes/btn_last_page.gif") center center no-repeat !important; -} -.lastPage:hover { - background-color: #f4f4f4 !important; -} -span.nbpg { - padding: 0 5px; -} -select.rspg { - height: 35px; - margin: 0; - border: 1px solid #f4f4f4; - background-color: #fff; - margin: 0 0 0 5px; - vertical-align: middle; -} -select.rspg:focus { - border-color: #66afe9; - outline: 0 none; - box-shadow: 0 1px 1px rgba(0,0,0,0.075) inset, 0 0 8px rgba(102,175,233,0.6); -} -span.rspgSpan { - font-size: inherit; -} - -/** - * Reset button default style - */ -input.reset { - display: inline-block; - width: 35px; - height: 35px; - border: 0; - background: transparent url("themes/btn_clear_filters.png") center center no-repeat; - vertical-align: top; -} -input.reset:hover { - background-color: #f4f4f4; -} - -/** - * Rows counter default style - */ -div.tot { - float: left; - overflow: hidden; - min-width: 150px; - height: 100%; - margin: 0; - padding: 0.5em; - vertical-align: middle; -} -div.tot span { - font-weight: 500; -} - -/** - * Sorting elements default style - */ -.sort-arrow { - width: 11px; - height: 11px; - margin: 0 2px; - background-position: center center; - background-repeat: no-repeat; -} -.descending { - background-image: url("themes/downsimple.png"); -} -.ascending { - background-image: url("themes/upsimple.png"); -} - -/** - * Status bar default style - */ -div.status { - float: left; - overflow: hidden; - min-width: 120px; - height: 100%; - margin: 0; - padding: 0.5em; -} -div.status span { - font-size: inherit; -} - -/** - * Table's default style - */ -table.TF { - font-family: inherit; - border-spacing: 0; - border: 0; -} -table.TF th { - height: 35px; - margin: 0; - background-color: #eaeaea; - border-bottom: 1px solid #ddd; - border-top: 1px solid #f4f4f4; - border-left: 1px solid #ccc; - border-right: 1px solid #f4f4f4; - padding: 0.1em 0.7em; - color: #333; -} -table.TF td { - margin: 0; - padding: 0.5em 0.7em; - border-bottom: 1px solid #c6c6c6; -} - -/** - * Toolbar default style - */ -.inf { - clear: both; - width: auto; - height: 35px; - background-color: #fff; - font-size: inherit; - margin: 0; - padding: 0; - border-top: 1px solid #ccc; - border-left: 1px solid #ccc; - border-right: 1px solid #ccc; - overflow: hidden; - border-top-left-radius: 3px; - border-top-right-radius: 3px; -} -.inf a { - color: #333; - text-decoration: none; - font-weight: bold; -} -.inf a:hover { - text-decoration: underline; -} -.ldiv { - float: left; - width: 30%; - position: inherit; - text-align: left; -} -.mdiv { - float: left; - width: 38%; - position: inherit; - text-align: center; - padding: 0; -} -.rdiv { - float: right; - width: 30%; - position: inherit; - text-align: right; -} +.ezActiveRow{background-color:#2852a8 !important;color:#fff}.ezSelectedRow{background-color:#316ac5 !important;color:#fff}.ezActiveCell{background-color:#d9e8fb !important;color:#000 !important;font-weight:bold}.ezETSelectedCell{background-color:#ffdc61 !important;font-weight:bold;color:#000 !important}.ezUnselectable{-moz-user-select:-moz-none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.ezInputEditor{width:95%;height:auto;font-size:inherit;border:1px solid #aaccf6}.ezTextareaEditor{width:95%;height:35px;font-size:inherit;border:1px solid #aaccf6}.ezSelectEditor{width:100%;font-size:inherit;border:1px solid #aaccf6}.ezModifiedCell{background:transparent url("themes/bg_mod_cell.png") 0 0 no-repeat}select[multiple="multiple"].ezSelectEditor{height:35px}.ezCommandEditor{margin:2px;}.ezCommandEditor button,.ezCommandEditor input[type="button"]{min-height:22px;margin:1px;padding:3px;border:1px solid #ccc;background:#fff;border-radius:4px 4px 4px 4px;-moz-border-radius:4px 4px 4px 4px;}.ezCommandEditor button:hover,.ezCommandEditor input[type="button"]:hover{border:1px solid #999}.ezCommandEditor img{border:0;vertical-align:middle;margin:2px}.ezOpacity{opacity:.6}.alignLeft{text-align:left}.alignCenter{text-align:center}.alignRight{text-align:right} +.div_checklist{width:100%;height:90px;border:1px solid #f4f4f4;overflow:auto;text-align:left;background-color:#fff;color:#444;}.div_checklist ul.flt_checklist{padding:0 !important;margin:0 !important;list-style:none !important}.div_checklist li.flt_checklist_item{padding:1px !important;margin:0 !important;font-size:10px !important;border-bottom:1px solid #f4f4f4 !important;}.div_checklist li.flt_checklist_item:hover{background-color:#335ea8 !important;color:#fff !important}.div_checklist label{display:block !important}.div_checklist input{vertical-align:middle !important;margin:2px 5px 2px 1px !important}.flt_checklist_item_disabled{background-color:#e5e5e5}.flt_checklist_slc_item{background-color:#335ea8 !important;color:#fff !important} +.fltrow{height:1em;background-color:#eaeaea;}.fltrow td{border-bottom:1px solid #ccc !important;border-top:1px solid #ccc;border-left:1px solid #ccc;border-right:1px solid #f4f4f4;padding:.2em !important}.btnflt{height:35px;font-family:inherit;font-size:inherit;vertical-align:middle;margin:0 2px 0 2px;padding:0 1px 0 1px}.btnflt_icon{font-family:inherit;font-size:inherit;width:35px;height:35px;cursor:pointer !important;border:0 !important;vertical-align:middle;background:transparent url("themes/btn_filter.png") center center no-repeat !important}.flt,.flt_s,.single_flt{font-family:inherit;display:block;color:#444;background-color:#fff;border:1px inset #f4f4f4;margin:0;padding:0 0 0 .2em;width:100%;height:35px;vertical-align:middle;border-radius:2px;box-sizing:border-box;}.flt:focus,.flt_s:focus,.single_flt:focus{border-color:#66afe9;outline:0 none;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6);-moz-box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6);box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6)}select.flt_multi{font-family:inherit;color:#444;background-color:#fff;border:1px solid #f4f4f4;margin:0;padding:.2em;width:100%;height:90px;vertical-align:middle;box-sizing:border-box}.flt_s{width:60%;box-sizing:initial;display:initial}.single_flt{width:70%;box-sizing:initial;display:initial}div.popUpFilter{position:relative;background:#fff;-webkit-box-shadow:3px 3px 2px #888;-moz-box-shadow:3px 3px 2px #888;box-shadow:3px 3px 2px #888;margin:30px auto 0 0;position:absolute;display:none;width:100px;background-color:#eaeaea;border:1px solid #eaeaea;padding:0}div.popUpFilter:after,div.popUpFilter:before{bottom:100%;left:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}div.popUpFilter:after{border-color:rgba(255,255,255,0);border-bottom-color:#fff;border-width:10px;margin-left:-10px}div.popUpFilter:before{border-color:rgba(255,255,255,0);border-bottom-color:#eaeaea;border-width:12px;margin-left:-12px} +div.grd_Cont{-webkit-box-shadow:4px 4px 10px 0 rgba(50,50,50,0.75);-moz-box-shadow:4px 4px 10px 0 rgba(50,50,50,0.75);box-shadow:4px 4px 10px 0 rgba(50,50,50,0.75);width:800px;height:auto;overflow:hidden;padding:3px 3px 3px 3px;background-color:#c8e0fb;border:1px solid #99bbe8;}div.grd_Cont .fltrow{background-color:transparent}div.grd_Cont .flt{border:1px solid #99bbe8;width:97%;}div.grd_Cont .flt :focus{border:1px solid #558dd9}div.grd_Cont .even{background-color:#fff}div.grd_Cont .odd{background-color:#dfe8f6}div.grd_tblCont{height:400px;width:800px;background:#fff;overflow-x:auto;overflow-y:scroll}div.grd_headTblCont{height:auto;width:800px;overflow:hidden;border-bottom:1px solid #99bbe8;background-color:#c8e0fb}div.grd_tblCont table,div.grd_headTblCont table{border-collapse:collapse;table-layout:fixed}div.grd_tblCont table{border-right:1px solid #99bbe8}div.grd_tblCont table th,div.grd_headTblCont table th,div.grd_headTblCont table td{height:35px;background-color:#c8e0fb;padding:.1em .5em;color:#333;border-right:1px solid #99bbe8 !important;overflow:hidden;text-overflow:ellipsis}div.grd_headTblCont table td{padding:.2em .2em}div.grd_tblCont table td{padding:.5em .7em;border-bottom:1px solid #99bbe8;overflow:hidden;text-overflow:ellipsis}.grd_inf{clear:both;width:auto;height:35px;background-color:#c8e0fb;margin:0;padding:1px 3px 1px 3px;border-top:1px solid #99bbe8;}.grd_inf a{color:#333;text-decoration:none;font-weight:bold;}.grd_inf a:hover{text-decoration:underline;background-color:transparent}.grd_inf input.reset:hover{background-color:transparent}.grd_inf .mdiv{width:40% !important}.grd_inf .ldiv div{border:0}.grd_inf .helpBtn{border:0 !important}.grd_inf div.status{position:absolute;float:none !important;height:auto !important;margin:19px 0 !important;font-size:12px;color:#333;border:0 !important}.grd_inf div.tot{border:0 !important} +.helpBtn{display:inline-block;height:27px;margin:0;padding:8px 15px 0 15px;vertical-align:top;}.helpBtn:hover{background-color:#f4f4f4}div.helpCont{position:relative;background:#fff;-webkit-box-shadow:3px 3px 2px #888;-moz-box-shadow:3px 3px 2px #888;box-shadow:3px 3px 2px #888;position:absolute;display:none;width:300px;padding:10px;margin:45px 0 0 -150px;border:1px solid #ccc;line-height:20px;font-size:inherit;color:#333;background:#fff;text-align:left;}div.helpCont:after,div.helpCont:before{bottom:100%;left:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}div.helpCont:after{border-color:rgba(255,255,255,0);border-bottom-color:#fff;border-width:10px;margin-left:-10px}div.helpCont:before{border-color:rgba(255,255,255,0);border-bottom-color:#ccc;border-width:12px;margin-left:-12px}div.helpCont a{color:#c00;text-decoration:underline;font-weight:normal}div.helpCont a.close{color:#333;text-decoration:none;font-weight:bold;}div.helpCont a.close:hover{text-decoration:none}div.helpCont hr{border:1px solid #ccc}div.helpFooter{margin:10px 0 0 0;}div.helpFooter h4{margin:2px 2px 2px 2px;color:#333} +span.keyword{font-weight:700;font-style:italic;border-bottom:1px dotted #ccc} +.loader{position:absolute;padding:.5em .7em;margin:10em 0 0 3em;width:auto;z-index:1000;font-weight:600;background-color:#a7a7a8;vertical-align:middle;border-radius:10px;color:#fff;text-shadow:1px 1px #333} +select.pgSlc{height:35px;margin:0;border:1px solid #f4f4f4;background-color:#fff;vertical-align:middle}select.pgSlc:focus{border-color:#66afe9;outline:0 none;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6)}input.pgNbInp{height:35px;margin:0;border:1px solid #f4f4f4;background-color:#fff;width:35px}input.pgNbInp:focus{border-color:#66afe9;outline:0 none;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6)}input.pgInp,.nextPage,.previousPage,.firstPage,.lastPage{height:35px;margin:0;border:1px solid #f4f4f4;background-color:#fff;vertical-align:middle;width:35px;border:0;font-weight:bold}input.pgInp:focus,.nextPage:focus,.previousPage:focus,.firstPage:focus,.lastPage:focus{border-color:#66afe9;outline:0 none;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6)}.nextPage{background:transparent url("themes/btn_next_page.gif") center center no-repeat !important;}.nextPage:hover{background-color:#f4f4f4 !important}.previousPage{background:transparent url("themes/btn_previous_page.gif") center center no-repeat !important;}.previousPage:hover{background-color:#f4f4f4 !important}.firstPage{background:transparent url("themes/btn_first_page.gif") center center no-repeat !important;}.firstPage:hover{background-color:#f4f4f4 !important}.lastPage{background:transparent url("themes/btn_last_page.gif") center center no-repeat !important;}.lastPage:hover{background-color:#f4f4f4 !important}span.nbpg{padding:0 5px}select.rspg{height:35px;margin:0;border:1px solid #f4f4f4;background-color:#fff;margin:0 0 0 5px;vertical-align:middle}select.rspg:focus{border-color:#66afe9;outline:0 none;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6)}span.rspgSpan{font-size:inherit} +input.reset{display:inline-block;width:35px;height:35px;border:0;background:transparent url("themes/btn_clear_filters.png") center center no-repeat;vertical-align:top;}input.reset:hover{background-color:#f4f4f4} +div.tot{float:left;overflow:hidden;min-width:150px;height:100%;margin:0;padding:.5em;vertical-align:middle;}div.tot span{font-weight:500} +.sort-arrow{width:11px;height:11px;margin:0 2px;background-position:center center;background-repeat:no-repeat}.descending{background-image:url("themes/downsimple.png")}.ascending{background-image:url("themes/upsimple.png")} +div.status{float:left;overflow:hidden;min-width:120px;height:100%;margin:0;padding:.5em;}div.status span{font-size:inherit} +table.TF{font-family:inherit;border-spacing:0;border:0;}table.TF th{height:35px;margin:0;background-color:#eaeaea;border-bottom:1px solid #ddd;border-top:1px solid #f4f4f4;border-left:1px solid #ccc;border-right:1px solid #f4f4f4;padding:.1em .7em;color:#333}table.TF td{margin:0;padding:.5em .7em;border-bottom:1px solid #c6c6c6} +.inf{clear:both;width:auto;height:35px;background-color:#fff;font-size:inherit;margin:0;padding:0;border-top:1px solid #ccc;border-left:1px solid #ccc;border-right:1px solid #ccc;overflow:hidden;border-top-left-radius:3px;border-top-right-radius:3px;}.inf a{color:#333;text-decoration:none;font-weight:bold;}.inf a:hover{text-decoration:underline}.ldiv{float:left;width:30%;position:inherit;text-align:left}.mdiv{float:left;width:38%;position:inherit;text-align:center;padding:0}.rdiv{float:right;width:30%;position:inherit;text-align:right} \ No newline at end of file diff --git a/dist/tablefilter/style/themes/default/default.css b/dist/tablefilter/style/themes/default/default.css index 9d2e9c75..a0aeb784 100644 --- a/dist/tablefilter/style/themes/default/default.css +++ b/dist/tablefilter/style/themes/default/default.css @@ -1,132 +1,6 @@ /** * TableFilter v0.0.0 by Max Guglielmi - * build date: 2015-08-09T12:32:52.610Z + * build date: 2015-08-09T12:39:08.406Z * MIT License */ -/** - * Default theme overrides - */ -table.TF { - border-left: 1px solid #ccc !important; - border-top: none !important; - border-right: none !important; - border-bottom: none !important; -} -table.TF th { - background: #ebecee url("images/bg_th.jpg") left top repeat-x !important; - border-bottom: 1px solid #d0d0d0 !important; - border-right: 1px solid #d0d0d0 !important; - border-left: 1px solid #fff !important; - border-top: 1px solid #fff !important; - padding: 2px !important; - color: #333 !important; - height: 25px !important; -} -table.TF td { - border-bottom: 1px dotted #999 !important; - padding: 5px !important; -} -.fltrow { - background-color: #ebecee !important; -} -.fltrow th, -.fltrow td { - border-bottom: 1px dotted #666 !important; - padding: 1px 3px 1px 3px !important; -} -.flt, -select.flt, -select.flt_multi, -.flt_s, -.single_flt, -.div_checklist { - border: 1px solid #999 !important; -} -input.flt { - width: 99% !important; -} -.inf { - height: $min-height; - background: #d7d7d7 url("images/bg_infDiv.jpg") 0 0 repeat-x !important; -} -input.reset { - background: transparent url("images/btn_eraser.gif") center center no-repeat !important; -} -.helpBtn:hover { - background-color: transparent; -} -.nextPage { - background: transparent url("images/btn_next_page.gif") center center no-repeat !important; -} -.nextPage:hover { - background: transparent url("images/btn_over_next_page.gif") center center no-repeat !important; -} -.previousPage { - background: transparent url("images/btn_previous_page.gif") center center no-repeat !important; -} -.previousPage:hover { - background: transparent url("images/btn_over_previous_page.gif") center center no-repeat !important; -} -.firstPage { - background: transparent url("images/btn_first_page.gif") center center no-repeat !important; -} -.firstPage:hover { - background: transparent url("images/btn_over_first_page.gif") center center no-repeat !important; -} -.lastPage { - background: transparent url("images/btn_last_page.gif") center center no-repeat !important; -} -.lastPage:hover { - background: transparent url("images/btn_over_last_page.gif") center center no-repeat !important; -} -div.grd_Cont { - background-color: #ebecee !important; - border: 1px solid #ccc !important; - padding: 0 !important; -} -div.grd_Cont .even { - background-color: #fff; -} -div.grd_Cont .odd { - background-color: #d5d5d5; -} -div.grd_headTblCont { - background-color: #ebecee !important; - border-bottom: none !important; -} -div.grd_headTblCont table { - border-right: none !important; -} -div.grd_tblCont table th, -div.grd_headTblCont table th, -div.grd_headTblCont table td { - background: #ebecee url("images/bg_th.jpg") left top repeat-x !important; - border-bottom: 1px solid #d0d0d0 !important; - border-right: 1px solid #d0d0d0 !important; - border-left: 1px solid #fff !important; - border-top: 1px solid #fff !important; -} -div.grd_tblCont table td { - border-bottom: 1px solid #999 !important; -} -.grd_inf { - background: #d7d7d7 url("images/bg_infDiv.jpg") 0 0 repeat-x !important; - border-top: 1px solid #d0d0d0 !important; -} -.loader { - border: 1px solid #999; -} -.defaultLoader { - width: 32px; - height: 32px; - background: transparent url("images/img_loading.gif") 0 0 no-repeat !important; -} -.even { - background-color: #fff; -} -.odd { - background-color: #d5d5d5; -} -span.expClpFlt a.btnExpClpFlt:hover { - background-color: transparent !important; -} +table.TF{border-left:1px solid #ccc !important;border-top:none !important;border-right:none !important;border-bottom:none !important;}table.TF th{background:#ebecee url("images/bg_th.jpg") left top repeat-x !important;border-bottom:1px solid #d0d0d0 !important;border-right:1px solid #d0d0d0 !important;border-left:1px solid #fff !important;border-top:1px solid #fff !important;padding:2px !important;color:#333 !important;height:25px !important}table.TF td{border-bottom:1px dotted #999 !important;padding:5px !important}.fltrow{background-color:#ebecee !important;}.fltrow th,.fltrow td{border-bottom:1px dotted #666 !important;padding:1px 3px 1px 3px !important}.flt,select.flt,select.flt_multi,.flt_s,.single_flt,.div_checklist{border:1px solid #999 !important}input.flt{width:99% !important}.inf{height:$min-height;background:#d7d7d7 url("images/bg_infDiv.jpg") 0 0 repeat-x !important}input.reset{background:transparent url("images/btn_eraser.gif") center center no-repeat !important}.helpBtn:hover{background-color:transparent}.nextPage{background:transparent url("images/btn_next_page.gif") center center no-repeat !important;}.nextPage:hover{background:transparent url("images/btn_over_next_page.gif") center center no-repeat !important}.previousPage{background:transparent url("images/btn_previous_page.gif") center center no-repeat !important;}.previousPage:hover{background:transparent url("images/btn_over_previous_page.gif") center center no-repeat !important}.firstPage{background:transparent url("images/btn_first_page.gif") center center no-repeat !important;}.firstPage:hover{background:transparent url("images/btn_over_first_page.gif") center center no-repeat !important}.lastPage{background:transparent url("images/btn_last_page.gif") center center no-repeat !important;}.lastPage:hover{background:transparent url("images/btn_over_last_page.gif") center center no-repeat !important}div.grd_Cont{background-color:#ebecee !important;border:1px solid #ccc !important;padding:0 !important;}div.grd_Cont .even{background-color:#fff}div.grd_Cont .odd{background-color:#d5d5d5}div.grd_headTblCont{background-color:#ebecee !important;border-bottom:none !important;}div.grd_headTblCont table{border-right:none !important}div.grd_tblCont table th,div.grd_headTblCont table th,div.grd_headTblCont table td{background:#ebecee url("images/bg_th.jpg") left top repeat-x !important;border-bottom:1px solid #d0d0d0 !important;border-right:1px solid #d0d0d0 !important;border-left:1px solid #fff !important;border-top:1px solid #fff !important}div.grd_tblCont table td{border-bottom:1px solid #999 !important}.grd_inf{background:#d7d7d7 url("images/bg_infDiv.jpg") 0 0 repeat-x !important;border-top:1px solid #d0d0d0 !important}.loader{border:1px solid #999}.defaultLoader{width:32px;height:32px;background:transparent url("images/img_loading.gif") 0 0 no-repeat !important}.even{background-color:#fff}.odd{background-color:#d5d5d5}span.expClpFlt a.btnExpClpFlt:hover{background-color:transparent !important} \ No newline at end of file diff --git a/dist/tablefilter/style/themes/mytheme/mytheme.css b/dist/tablefilter/style/themes/mytheme/mytheme.css index 0e7e45f8..e75db20d 100644 --- a/dist/tablefilter/style/themes/mytheme/mytheme.css +++ b/dist/tablefilter/style/themes/mytheme/mytheme.css @@ -1,138 +1,6 @@ /** * TableFilter v0.0.0 by Max Guglielmi - * build date: 2015-08-09T12:32:52.610Z + * build date: 2015-08-09T12:39:08.406Z * MIT License */ -/** - * mytheme theme overrides - */ -table.TF { - border-left: 1px dotted #81963b !important; - border-top: none !important; - border-right: 0 !important; - border-bottom: none !important; -} -table.TF th { - background: #39424b url("images/bg_headers.jpg") left top repeat-x !important; - border-bottom: 0 !important; - border-right: 1px dotted #d0d0d0 !important; - border-left: 0 !important; - border-top: 0 !important; - padding: 0 4px 0 4px !important; - color: #fff !important; - height: 35px !important; -} -table.TF td { - border-bottom: 1px dotted #81963b; - border-right: 1px dotted #81963b; - padding: 5px !important; -} -.fltrow { - background-color: #81963b !important; -} -.fltrow th, -.fltrow td { - border-bottom: 1px dotted #39424b !important; - border-right: 1px dotted #fff !important; - border-left: 0 !important; - border-top: 0 !important; - padding: 1px 3px 1px 3px !important; -} -.flt, -select.flt, -select.flt_multi, -.flt_s, -.single_flt, -.div_checklist { - border: 1px solid #687830 !important; -} -input.flt { - width: 99% !important; -} -.inf { - background: #d8d8d8; - height: $min-height; -} -input.reset { - width: 53px; - background: transparent url("images/btn_filter.png") center center no-repeat !important; -} -.helpBtn:hover { - background-color: transparent; -} -.nextPage { - background: transparent url("images/btn_next_page.gif") center center no-repeat !important; -} -.previousPage { - background: transparent url("images/btn_previous_page.gif") center center no-repeat !important; -} -.firstPage { - background: transparent url("images/btn_first_page.gif") center center no-repeat !important; -} -.lastPage { - background: transparent url("images/btn_last_page.gif") center center no-repeat !important; -} -div.grd_Cont { - background: #81963b url("images/bg_headers.jpg") left top repeat-x !important; - border: 1px solid #ccc !important; - padding: 0 1px 1px 1px !important; -} -div.grd_Cont .even { - background-color: #bccd83; -} -div.grd_Cont .odd { - background-color: #fff; -} -div.grd_headTblCont { - background-color: #ebecee !important; - border-bottom: none !important; -} -div.grd_tblCont table { - border-right: none !important; -} -div.grd_tblCont table td { - border-bottom: 1px dotted #81963b; - border-right: 1px dotted #81963b; -} -div.grd_tblCont table th, -div.grd_headTblCont table th { - background: transparent url("images/bg_headers.jpg") 0 0 repeat-x !important; - border-bottom: 0 !important; - border-right: 1px dotted #d0d0d0 !important; - border-left: 0 !important; - border-top: 0 !important; - padding: 0 4px 0 4px !important; - color: #fff !important; - height: 35px !important; -} -/* filters cells */ -div.grd_headTblCont table td { - border-bottom: 1px dotted #39424b !important; - border-right: 1px dotted #fff !important; - border-left: 0 !important; - border-top: 0 !important; - background-color: #81963b !important; - padding: 1px 3px 1px 3px !important; -} -.grd_inf { - background-color: #d8d8d8; - border-top: 1px solid #d0d0d0 !important; -} -.loader { - border: 0 !important; - background: #81963b !important; -} -.defaultLoader { - width: 32px; - height: 32px; - background: transparent url("images/img_loading.gif") 0 0 no-repeat !important; -} -.even { - background-color: #bccd83; -} -.odd { - background-color: #fff; -} -span.expClpFlt a.btnExpClpFlt:hover { - background-color: transparent !important; -} +table.TF{border-left:1px dotted #81963b !important;border-top:none !important;border-right:0 !important;border-bottom:none !important;}table.TF th{background:#39424b url("images/bg_headers.jpg") left top repeat-x !important;border-bottom:0 !important;border-right:1px dotted #d0d0d0 !important;border-left:0 !important;border-top:0 !important;padding:0 4px 0 4px !important;color:#fff !important;height:35px !important}table.TF td{border-bottom:1px dotted #81963b;border-right:1px dotted #81963b;padding:5px !important}.fltrow{background-color:#81963b !important;}.fltrow th,.fltrow td{border-bottom:1px dotted #39424b !important;border-right:1px dotted #fff !important;border-left:0 !important;border-top:0 !important;padding:1px 3px 1px 3px !important}.flt,select.flt,select.flt_multi,.flt_s,.single_flt,.div_checklist{border:1px solid #687830 !important}input.flt{width:99% !important}.inf{background:#d8d8d8;height:$min-height}input.reset{width:53px;background:transparent url("images/btn_filter.png") center center no-repeat !important}.helpBtn:hover{background-color:transparent}.nextPage{background:transparent url("images/btn_next_page.gif") center center no-repeat !important}.previousPage{background:transparent url("images/btn_previous_page.gif") center center no-repeat !important}.firstPage{background:transparent url("images/btn_first_page.gif") center center no-repeat !important}.lastPage{background:transparent url("images/btn_last_page.gif") center center no-repeat !important}div.grd_Cont{background:#81963b url("images/bg_headers.jpg") left top repeat-x !important;border:1px solid #ccc !important;padding:0 1px 1px 1px !important;}div.grd_Cont .even{background-color:#bccd83}div.grd_Cont .odd{background-color:#fff}div.grd_headTblCont{background-color:#ebecee !important;border-bottom:none !important}div.grd_tblCont table{border-right:none !important;}div.grd_tblCont table td{border-bottom:1px dotted #81963b;border-right:1px dotted #81963b}div.grd_tblCont table th,div.grd_headTblCont table th{background:transparent url("images/bg_headers.jpg") 0 0 repeat-x !important;border-bottom:0 !important;border-right:1px dotted #d0d0d0 !important;border-left:0 !important;border-top:0 !important;padding:0 4px 0 4px !important;color:#fff !important;height:35px !important}div.grd_headTblCont table td{border-bottom:1px dotted #39424b !important;border-right:1px dotted #fff !important;border-left:0 !important;border-top:0 !important;background-color:#81963b !important;padding:1px 3px 1px 3px !important}.grd_inf{background-color:#d8d8d8;border-top:1px solid #d0d0d0 !important}.loader{border:0 !important;background:#81963b !important}.defaultLoader{width:32px;height:32px;background:transparent url("images/img_loading.gif") 0 0 no-repeat !important}.even{background-color:#bccd83}.odd{background-color:#fff}span.expClpFlt a.btnExpClpFlt:hover{background-color:transparent !important} \ No newline at end of file diff --git a/dist/tablefilter/style/themes/skyblue/skyblue.css b/dist/tablefilter/style/themes/skyblue/skyblue.css index 0e5cfa01..9a0e1a6b 100644 --- a/dist/tablefilter/style/themes/skyblue/skyblue.css +++ b/dist/tablefilter/style/themes/skyblue/skyblue.css @@ -1,181 +1,6 @@ /** * TableFilter v0.0.0 by Max Guglielmi - * build date: 2015-08-09T12:32:52.610Z + * build date: 2015-08-09T12:39:08.406Z * MIT License */ -/** - * skyblue theme overrides - */ -table.TF { - padding: 0; - color: #000; - border-right: 1px solid #a4bed4; - border-top: 1px solid #a4bed4; - border-left: 1px solid #a4bed4; - border-bottom: 0; -} -table.TF th { - margin: 0; - padding: 5px; - color: inherit; - background: #d1e5fe url("images/bg_skyblue.gif") 0 0 repeat-x; - border-color: #fdfdfd #a4bed4 #a4bed4 #fdfdfd; - border-width: 1px; - border-style: solid; -} -table.TF td { - margin: 0; - padding: 5px; - color: inherit; - border-bottom: 1px solid #a4bed4; - border-left: 0; - border-top: 0; - border-right: 0; -} -.fltrow { - background-color: #d1e5fe !important; -} -.fltrow th, -.fltrow td { - border-top: 1px dotted #666 !important; - border-bottom: 1px dotted #666 !important; - padding: 1px 3px 1px 3px !important; -} -.flt, -select.flt, -select.flt_multi, -.flt_s, -.single_flt, -.div_checklist { - border: 1px solid #a4bed4 !important; -} -input.flt { - width: 99% !important; -} -.inf { - background-color: #e3efff !important; - border: 1px solid #a4bed4; - height: $min-height; - color: #004a6f; -} -div.tot, -div.status { - border-right: 0 !important; -} -.helpBtn:hover { - background-color: transparent; -} -input.reset { - background: transparent url("images/icn_clear_filters.png") center center no-repeat !important; -} -.nextPage { - background: transparent url("images/btn_next_page.gif") center center no-repeat !important; - border: 1px solid transparent !important; -} -.nextPage:hover { - background: #ffe4ab url("images/btn_next_page.gif") center center no-repeat !important; - border: 1px solid #ffb552 !important; -} -.previousPage { - background: transparent url("images/btn_prev_page.gif") center center no-repeat !important; - border: 1px solid transparent !important; -} -.previousPage:hover { - background: #ffe4ab url("images/btn_prev_page.gif") center center no-repeat !important; - border: 1px solid #ffb552 !important; -} -.firstPage { - background: transparent url("images/btn_first_page.gif") center center no-repeat !important; - border: 1px solid transparent !important; -} -.firstPage:hover { - background: #ffe4ab url("images/btn_first_page.gif") center center no-repeat !important; - border: 1px solid #ffb552 !important; -} -.lastPage { - background: transparent url("images/btn_last_page.gif") center center no-repeat !important; - border: 1px solid transparent !important; -} -.lastPage:hover { - background: #ffe4ab url("images/btn_last_page.gif") center center no-repeat !important; - border: 1px solid #ffb552 !important; -} -.activeHeader { - background: #ffe4ab !important; - border: 1px solid #ffb552 !important; - color: inherit !important; -} -div.grd_Cont { - background-color: #d9eaed !important; - border: 1px solid #9cc !important; - padding: 0 !important; -} -div.grd_Cont .even { - background-color: #fff; -} -div.grd_Cont .odd { - background-color: #e3efff; -} -div.grd_headTblCont { - background-color: #d9eaed !important; - border-bottom: none !important; -} -div.grd_tblCont table { - border-right: none !important; -} -div.grd_tblCont table th, -div.grd_headTblCont table th, -div.grd_headTblCont table td { - background: #d9eaed url("images/bg_skyblue.gif") left top repeat-x; - border-bottom: 1px solid #a4bed4; - border-right: 1px solid #a4bed4 !important; - border-left: 1px solid #fff !important; - border-top: 1px solid #fff !important; -} -div.grd_tblCont table td { - border-bottom: 1px solid #a4bed4 !important; - border-right: 0 !important; - border-left: 0 !important; - border-top: 0 !important; -} -.grd_inf { - background-color: #cce2fe; - color: #004a6f; - border-top: 1px solid #9cc !important; -} -.grd_inf a { - text-decoration: none; - font-weight: bold; -} -.loader { - background-color: #2d8eef; - border: 1px solid #cce2fe; - border-radius: 5px; -} -.even { - background-color: #fff; -} -.odd { - background-color: #e3efff; -} -span.expClpFlt a.btnExpClpFlt:hover { - background-color: transparent !important; -} -.ezActiveRow { - background-color: #ffdc61 !important; - color: inherit; -} -.ezSelectedRow { - background-color: #ffe4ab !important; - color: inherit; -} -.ezActiveCell { - background-color: #fff !important; - color: #000 !important; - font-weight: bold; -} -.ezETSelectedCell { - background-color: #fff !important; - font-weight: bold; - color: #000 !important; -} +table.TF{padding:0;color:#000;border-right:1px solid #a4bed4;border-top:1px solid #a4bed4;border-left:1px solid #a4bed4;border-bottom:0;}table.TF th{margin:0;padding:5px;color:inherit;background:#d1e5fe url("images/bg_skyblue.gif") 0 0 repeat-x;border-color:#fdfdfd #a4bed4 #a4bed4 #fdfdfd;border-width:1px;border-style:solid}table.TF td{margin:0;padding:5px;color:inherit;border-bottom:1px solid #a4bed4;border-left:0;border-top:0;border-right:0}.fltrow{background-color:#d1e5fe !important;}.fltrow th,.fltrow td{border-top:1px dotted #666 !important;border-bottom:1px dotted #666 !important;padding:1px 3px 1px 3px !important}.flt,select.flt,select.flt_multi,.flt_s,.single_flt,.div_checklist{border:1px solid #a4bed4 !important}input.flt{width:99% !important}.inf{background-color:#e3efff !important;border:1px solid #a4bed4;height:$min-height;color:#004a6f}div.tot,div.status{border-right:0 !important}.helpBtn:hover{background-color:transparent}input.reset{background:transparent url("images/icn_clear_filters.png") center center no-repeat !important}.nextPage{background:transparent url("images/btn_next_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.nextPage:hover{background:#ffe4ab url("images/btn_next_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.previousPage{background:transparent url("images/btn_prev_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.previousPage:hover{background:#ffe4ab url("images/btn_prev_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.firstPage{background:transparent url("images/btn_first_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.firstPage:hover{background:#ffe4ab url("images/btn_first_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.lastPage{background:transparent url("images/btn_last_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.lastPage:hover{background:#ffe4ab url("images/btn_last_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.activeHeader{background:#ffe4ab !important;border:1px solid #ffb552 !important;color:inherit !important}div.grd_Cont{background-color:#d9eaed !important;border:1px solid #9cc !important;padding:0 !important;}div.grd_Cont .even{background-color:#fff}div.grd_Cont .odd{background-color:#e3efff}div.grd_headTblCont{background-color:#d9eaed !important;border-bottom:none !important}div.grd_tblCont table{border-right:none !important}div.grd_tblCont table th,div.grd_headTblCont table th,div.grd_headTblCont table td{background:#d9eaed url("images/bg_skyblue.gif") left top repeat-x;border-bottom:1px solid #a4bed4;border-right:1px solid #a4bed4 !important;border-left:1px solid #fff !important;border-top:1px solid #fff !important}div.grd_tblCont table td{border-bottom:1px solid #a4bed4 !important;border-right:0 !important;border-left:0 !important;border-top:0 !important}.grd_inf{background-color:#cce2fe;color:#004a6f;border-top:1px solid #9cc !important;}.grd_inf a{text-decoration:none;font-weight:bold}.loader{background-color:#2d8eef;border:1px solid #cce2fe;border-radius:5px}.even{background-color:#fff}.odd{background-color:#e3efff}span.expClpFlt a.btnExpClpFlt:hover{background-color:transparent !important}.ezActiveRow{background-color:#ffdc61 !important;color:inherit}.ezSelectedRow{background-color:#ffe4ab !important;color:inherit}.ezActiveCell{background-color:#fff !important;color:#000 !important;font-weight:bold}.ezETSelectedCell{background-color:#fff !important;font-weight:bold;color:#000 !important} \ No newline at end of file From 377b3404ad33e39aa147939d380b038c39273cd8 Mon Sep 17 00:00:00 2001 From: Max Guglielmi Date: Sun, 9 Aug 2015 22:43:50 +1000 Subject: [PATCH 8/8] Removed changes to theme-roller demo --- demos/theme-roller.html | 4 +--- static/templates/theme-roller.html | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/demos/theme-roller.html b/demos/theme-roller.html index 85191983..35c94e67 100644 --- a/demos/theme-roller.html +++ b/demos/theme-roller.html @@ -325,7 +325,6 @@ var tfConfig = { filters_row_index: 2, headers_row_index: 1, sort: true, - paging: true, col_number_format: [ null, null, 'US', null, null, null @@ -375,8 +374,7 @@ var tfConfig = { /* theme */ themes: [{ name: 'default' }], - extensions: [{ name: 'sort' },/*{ name: 'colsVisibility'},*/ - {name:'filtersVisibility'}] + extensions: [{ name: 'sort' }] }; var tf = new TableFilter('books', tfConfig, 2); diff --git a/static/templates/theme-roller.html b/static/templates/theme-roller.html index c3386ce5..dbdef3cc 100644 --- a/static/templates/theme-roller.html +++ b/static/templates/theme-roller.html @@ -30,7 +30,6 @@ var tfConfig = { filters_row_index: 2, headers_row_index: 1, sort: true, - paging: true, col_number_format: [ null, null, 'US', null, null, null @@ -80,8 +79,7 @@ var tfConfig = { /* theme */ themes: [{ name: 'default' }], - extensions: [{ name: 'sort' },/*{ name: 'colsVisibility'},*/ - {name:'filtersVisibility'}] + extensions: [{ name: 'sort' }] }; var tf = new TableFilter('books', tfConfig, 2);