diff --git a/Gruntfile.js b/Gruntfile.js
index de3d09757..aef0f0819 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -11,7 +11,8 @@ module.exports = function(grunt) {
bower_concat: {
all: {
mainFiles: {
- 'bootstrap-table': [ "src/bootstrap-table.js", "src/bootstrap-table.css", "dist/extensions/export/bootstrap-table-export.js", "dist/extensions/mobile/bootstrap-table-mobile.js", "dist/extensions/sticky-header/bootstrap-table-sticky-header.js", "dist/extensions/sticky-header/bootstrap-table-sticky-header.css"]
+ 'bootstrap-table': [ "dist/bootstrap-table.min.js", "dist/bootstrap-table.css", "dist/extensions/export/bootstrap-table-export.min.js", "dist/extensions/mobile/bootstrap-table-mobile.min.js", "dist/extensions/sticky-header/bootstrap-table-sticky-header.min.js", "dist/extensions/sticky-header/bootstrap-table-sticky-header.css"],
+ 'chartist-plugin-axistitle': [ "./dist/chartist-plugin-axistitle.min.js"]
},
dest: {
'js': 'tmp/opensourcepos_bower.js',
diff --git a/application/views/partial/header.php b/application/views/partial/header.php
index 04d7ba0d0..8571952f6 100644
--- a/application/views/partial/header.php
+++ b/application/views/partial/header.php
@@ -14,7 +14,7 @@
-
+
@@ -42,19 +42,19 @@
-
-
-
-
+
+
+
+
-
+
+
-
+
-
+
-
@@ -75,7 +75,7 @@
-
+
@@ -84,7 +84,7 @@
-
+
diff --git a/application/views/reports/tabular.php b/application/views/reports/tabular.php
index 03a6daf1c..b5433aa9f 100644
--- a/application/views/reports/tabular.php
+++ b/application/views/reports/tabular.php
@@ -37,23 +37,29 @@
{
load->view('partial/bootstrap_tables_locale'); ?>
- $('#table').bootstrapTable({
- columns: ,
- stickyHeader: true,
- pageSize: config->item('lines_per_page'); ?>,
- striped: true,
- sortable: true,
- showExport: true,
- exportDataType: 'all',
- exportTypes: ['json', 'xml', 'csv', 'txt', 'sql', 'excel', 'pdf'],
- pagination: true,
- showColumns: true,
- data: ,
- iconSize: 'sm',
- paginationVAlign: 'bottom',
- escape: false
+ $('#table')
+ .addClass("table-striped")
+ .addClass("table-bordered")
+ .bootstrapTable({
+ columns: ,
+ stickyHeader: true,
+ stickyHeaderOffsetLeft: $('#table').offset().left + 'px',
+ stickyHeaderOffsetRight: $('#table').offset().right + 'px',
+ pageSize: config->item('lines_per_page'); ?>,
+ sortable: true,
+ showExport: true,
+ exportDataType: 'all',
+ exportTypes: ['json', 'xml', 'csv', 'txt', 'sql', 'excel', 'pdf'],
+ pagination: true,
+ showColumns: true,
+ data: ,
+ iconSize: 'sm',
+ paginationVAlign: 'bottom',
+ escape: false
});
+ table_support.init_resize();
+
});
diff --git a/application/views/reports/tabular_details.php b/application/views/reports/tabular_details.php
index 9b6b23482..59f3698e5 100644
--- a/application/views/reports/tabular_details.php
+++ b/application/views/reports/tabular_details.php
@@ -45,48 +45,53 @@
?>
};
- $('#table').bootstrapTable({
- columns: ,
- stickyHeader: true,
- pageSize: config->item('lines_per_page'); ?>,
- striped: true,
- pagination: true,
- sortable: true,
- showColumns: true,
- uniqueId: 'id',
- showExport: true,
- exportDataType: 'all',
- exportTypes: ['json', 'xml', 'csv', 'txt', 'sql', 'excel', 'pdf'],
- data: ,
- iconSize: 'sm',
- paginationVAlign: 'bottom',
- detailView: true,
- escape: false,
- onPageChange: init_dialog,
- onPostBody: function() {
- dialog_support.init("a.modal-dlg");
- },
- onExpandRow: function (index, row, $detail) {
- $detail.html('
').find("table").bootstrapTable({
- columns: ,
- data: details_data[(!isNaN(row.id) && row.id) || $(row[0] || row.id).text().replace(/(POS|RECV)\s*/g, '')]
- });
-
- config->item('customer_reward_enable') == TRUE && !empty($details_data_rewards))
- {
- ?>
- $detail.append('').find("table").bootstrapTable({
- columns: ,
- data: details_data_rewards[(!isNaN(row.id) && row.id) || $(row[0] || row.id).text().replace(/(POS|RECV)\s*/g, '')]
+ $('#table')
+ .addClass("table-striped")
+ .addClass("table-bordered")
+ .bootstrapTable({
+ columns: ,
+ stickyHeader: true,
+ stickyHeaderOffsetLeft: $('#table').offset().left + 'px',
+ stickyHeaderOffsetRight: $('#table').offset().right + 'px',
+ pageSize: config->item('lines_per_page'); ?>,
+ pagination: true,
+ sortable: true,
+ showColumns: true,
+ uniqueId: 'id',
+ showExport: true,
+ exportDataType: 'all',
+ exportTypes: ['json', 'xml', 'csv', 'txt', 'sql', 'excel', 'pdf'],
+ data: ,
+ iconSize: 'sm',
+ paginationVAlign: 'bottom',
+ detailView: true,
+ escape: false,
+ onPageChange: init_dialog,
+ onPostBody: function() {
+ dialog_support.init("a.modal-dlg");
+ },
+ onExpandRow: function (index, row, $detail) {
+ $detail.html('').find("table").bootstrapTable({
+ columns: ,
+ data: details_data[(!isNaN(row.id) && row.id) || $(row[0] || row.id).text().replace(/(POS|RECV)\s*/g, '')]
});
- config->item('customer_reward_enable') == TRUE && !empty($details_data_rewards))
+ {
+ ?>
+ $detail.append('').find("table").bootstrapTable({
+ columns: ,
+ data: details_data_rewards[(!isNaN(row.id) && row.id) || $(row[0] || row.id).text().replace(/(POS|RECV)\s*/g, '')]
+ });
+
}
- ?>
- }
});
init_dialog();
+ table_support.init_resize();
});
diff --git a/bower.json b/bower.json
index 0e80da4fe..240eca4a3 100644
--- a/bower.json
+++ b/bower.json
@@ -33,12 +33,12 @@
"bootswatch": "3.4.1+1",
"smalot-bootstrap-datetimepicker": "~2.4.4",
"bootstrap-select": "~1.13.18",
- "bootstrap-table": "~1.12.2",
+ "bootstrap-table": "~1.18.1",
"bootstrap-daterangepicker": "~2.1.27",
- "tableExport.jquery.plugin": "1.5.1",
- "jspdf": "~1.0.272",
- "chartist": "0.9.8",
- "chartist-plugin-axistitle": "0.0.5",
+ "tableExport.jquery.plugin": "1.10.20",
+ "jspdf": "~1.3.4",
+ "chartist": "0.11.4",
+ "chartist-plugin-axistitle": "0.0.7",
"chartist-plugin-pointlabels": "0.0.4",
"chartist-plugin-tooltip": "https://github.com/tmmdata/chartist-plugin-tooltip.git#0.0.18",
"chartist-plugin-barlabels": "https://github.com/mtgibbs/chartist-plugin-barlabels.git#0.0.5",
@@ -48,7 +48,8 @@
"bootstrap-toggle": "^2.2.2"
},
"resolutions": {
- "jquery": "~1.12.4"
+ "chartist": "0.9.8",
+ "jspdf": ">=1.3.4"
},
"overrides": {
"jquery-ui": {
@@ -62,18 +63,20 @@
"tableExport.js"
]
},
+ "chartist-axis-plugin": {
+ "main": [
+ "dist/chartist-plugin-axistitle.js"
+ ]
+ },
"bootstrap-table": {
"main": [
- "src/bootstrap-table.js",
- "src/bootstrap-table.css",
- "dist/extensions/export/bootstrap-table-export.js",
- "dist/extensions/mobile/bootstrap-table-mobile.js",
- "dist/extensions/sticky-header/bootstrap-table-sticky-header.js",
+ "dist/bootstrap-table.min.js",
+ "dist/bootstrap-table.css",
+ "dist/extensions/export/bootstrap-table-export.min.js",
+ "dist/extensions/mobile/bootstrap-table-mobile.min.js",
+ "dist/extensions/sticky-header/bootstrap-table-sticky-header.min.js",
"dist/extensions/sticky-header/bootstrap-table-sticky-header.css"
]
}
- },
- "resolutions": {
- "chartist": "0.9.8"
}
}
diff --git a/package.json b/package.json
index 609094b2a..5ad95e56d 100644
--- a/package.json
+++ b/package.json
@@ -33,7 +33,7 @@
"grunt-contrib-concat": "~0.5.1",
"grunt-contrib-cssmin": "^0.14.0",
"grunt-contrib-jshint": "~0.6.3",
- "grunt-contrib-uglify": "~0.8.0",
+ "grunt-contrib-uglify-es": "github:opensourcepos/grunt-contrib-uglify#harmony",
"grunt-contrib-watch": "~0.5.3",
"grunt-license-bower": "~1.0.1",
"grunt-mocha-webdriver": "^1.2.2",
diff --git a/public/js/manage_tables.js b/public/js/manage_tables.js
index d56f2f50e..c272fff91 100644
--- a/public/js/manage_tables.js
+++ b/public/js/manage_tables.js
@@ -204,19 +204,24 @@
options = _options;
enable_actions = enable_actions(options.enableActions);
load_success = load_success(options.onLoadSuccess);
- $('#table').bootstrapTable($.extend(options, {
+ $('#table')
+ .addClass("table-striped")
+ .addClass("table-bordered")
+ .bootstrapTable($.extend(options, {
columns: options.headers,
stickyHeader: true,
+ stickyHeaderOffsetLeft: $('#table').offset().right + 'px',
+ stickyHeaderOffsetRight: $('#table').offset().right + 'px',
url: options.resource + '/search',
sidePagination: 'server',
+ selectItemName: 'btSelectItem',
pageSize: options.pageSize,
- striped: true,
pagination: true,
search: options.resource || false,
showColumns: true,
clickToSelect: true,
showExport: true,
- exportDataType: 'all',
+ exportDataType: 'basic',
exportTypes: ['json', 'xml', 'csv', 'txt', 'sql', 'excel', 'pdf'],
exportOptions: {
fileName: options.resource.replace(/.*\/(.*?)$/g, '$1')
@@ -253,10 +258,20 @@
enable_actions();
init_delete();
init_restore();
+ init_resize();
toggle_column_visibility();
dialog_support.init("button.modal-dlg");
};
+ var init_resize = function() {
+ $(window).resize(function () {
+ $('#table').bootstrapTable('refreshOptions', {
+ stickyHeaderOffsetLeft: $('#table').offset().left + 'px',
+ stickyHeaderOffsetRight: $('#table').offset().right + 'px',
+ })
+ })
+ }
+
var init_delete = function (confirmMessage) {
$("#delete").click(function(event) {
do_action("delete")();
@@ -314,6 +329,7 @@
},
handle_submit: handle_submit,
init: init,
+ init_resize: init_resize,
do_delete: do_action("delete"),
do_restore: do_action("restore"),
refresh : refresh,