tabulator-rails 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSIONS.md +1 -0
- data/lib/tabulator-rails/version.rb +1 -1
- data/vendor/assets/javascripts/tabulator.js +57 -41
- data/vendor/assets/stylesheets/tabulator.css +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ffec393cfb81d3ddb3653a4ffb0777cef0786081
|
|
4
|
+
data.tar.gz: 52ed8f057996b52e924844a3daf7ae9eeb04496a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9be46aa3afd5813bbd27154ce416d9377c9cafd66d0ff7078b78045ed8d02fdccf641151af97b3c25602eddb28d36c6b0caa165ae56e7eed2acd8047ed4f4161
|
|
7
|
+
data.tar.gz: 9c5ce112234766d6727e16a1c2e356af66740a386b4ec76a069a2ad575ad67dd3d500cd47f98be6fa0871252c30e2d1979bf97959397d81e8309e0f91e60d9ac
|
data/VERSIONS.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
|
4
4
|
|
|
5
|
-
/* Tabulator v3.5.
|
|
5
|
+
/* Tabulator v3.5.1 (c) Oliver Folkerd */
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
* This file is part of the Tabulator package.
|
|
@@ -3950,15 +3950,15 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
3950
3950
|
|
|
3951
3951
|
if (this.vDomTop) {
|
|
3952
3952
|
|
|
3953
|
-
var
|
|
3954
|
-
topRow = rows[
|
|
3953
|
+
var index = this.vDomTop - 1,
|
|
3954
|
+
topRow = rows[index],
|
|
3955
3955
|
topRowHeight = topRow.getHeight() || this.vDomRowHeight;
|
|
3956
3956
|
|
|
3957
3957
|
//hide top row if needed
|
|
3958
3958
|
|
|
3959
3959
|
if (topDiff >= topRowHeight) {
|
|
3960
3960
|
|
|
3961
|
-
this.styleRow(topRow,
|
|
3961
|
+
this.styleRow(topRow, index);
|
|
3962
3962
|
|
|
3963
3963
|
table.prepend(topRow.getElement());
|
|
3964
3964
|
|
|
@@ -3978,10 +3978,10 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
3978
3978
|
|
|
3979
3979
|
if (this.vDomTopPad < 0) {
|
|
3980
3980
|
|
|
3981
|
-
this.vDomTopPad =
|
|
3981
|
+
this.vDomTopPad = index * this.vDomRowHeight;
|
|
3982
3982
|
}
|
|
3983
3983
|
|
|
3984
|
-
if (!
|
|
3984
|
+
if (!index) {
|
|
3985
3985
|
|
|
3986
3986
|
this.vDomTopPad = 0;
|
|
3987
3987
|
}
|
|
@@ -4038,15 +4038,15 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
4038
4038
|
|
|
4039
4039
|
if (this.vDomBottom < this.displayRowsCount - 1) {
|
|
4040
4040
|
|
|
4041
|
-
var
|
|
4042
|
-
bottomRow = rows[
|
|
4041
|
+
var index = this.vDomBottom + 1,
|
|
4042
|
+
bottomRow = rows[index],
|
|
4043
4043
|
bottomRowHeight = bottomRow.getHeight() || this.vDomRowHeight;
|
|
4044
4044
|
|
|
4045
4045
|
//hide bottom row if needed
|
|
4046
4046
|
|
|
4047
4047
|
if (bottomDiff >= bottomRowHeight) {
|
|
4048
4048
|
|
|
4049
|
-
this.styleRow(bottomRow,
|
|
4049
|
+
this.styleRow(bottomRow, index);
|
|
4050
4050
|
|
|
4051
4051
|
table.append(bottomRow.getElement());
|
|
4052
4052
|
|
|
@@ -4064,7 +4064,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
4064
4064
|
|
|
4065
4065
|
this.vDomBottomPad -= bottomRowHeight;
|
|
4066
4066
|
|
|
4067
|
-
if (this.vDomBottomPad < 0 ||
|
|
4067
|
+
if (this.vDomBottomPad < 0 || index == this.displayRowsCount - 1) {
|
|
4068
4068
|
|
|
4069
4069
|
this.vDomBottomPad = 0;
|
|
4070
4070
|
}
|
|
@@ -4576,7 +4576,20 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
4576
4576
|
|
|
4577
4577
|
Row.prototype.calcHeight = function () {
|
|
4578
4578
|
|
|
4579
|
-
|
|
4579
|
+
var maxHeight = 0,
|
|
4580
|
+
minHeight = this.element[0].clientHeight;
|
|
4581
|
+
|
|
4582
|
+
this.cells.forEach(function (cell) {
|
|
4583
|
+
|
|
4584
|
+
var height = cell.getHeight();
|
|
4585
|
+
|
|
4586
|
+
if (height > maxHeight) {
|
|
4587
|
+
|
|
4588
|
+
maxHeight = height;
|
|
4589
|
+
}
|
|
4590
|
+
});
|
|
4591
|
+
|
|
4592
|
+
this.height = Math.max(maxHeight, minHeight);
|
|
4580
4593
|
|
|
4581
4594
|
this.outerHeight = this.element[0].offsetHeight;
|
|
4582
4595
|
};
|
|
@@ -4848,6 +4861,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
4848
4861
|
|
|
4849
4862
|
Row.prototype.delete = function () {
|
|
4850
4863
|
|
|
4864
|
+
var index = this.table.rowManager.getRowIndex(this);
|
|
4865
|
+
|
|
4851
4866
|
this.deleteActual();
|
|
4852
4867
|
|
|
4853
4868
|
if (this.table.options.history && this.table.extExists("history")) {
|
|
@@ -8356,7 +8371,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
8356
8371
|
|
|
8357
8372
|
if (!connections.length && selectors) {
|
|
8358
8373
|
|
|
8359
|
-
console.
|
|
8374
|
+
console.warn("Table Connection Error - No tables matching selector found", selectors);
|
|
8360
8375
|
}
|
|
8361
8376
|
};
|
|
8362
8377
|
|
|
@@ -14794,11 +14809,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
14794
14809
|
width,
|
|
14795
14810
|
attributes;
|
|
14796
14811
|
|
|
14797
|
-
//list of possible attributes
|
|
14798
|
-
|
|
14799
|
-
|
|
14800
|
-
var attribList = ["title", "field", "align", "width", "minWidth", "frozen", "sortable", "sorter", "formatter", "cellClick", "cellDblClick", "cellContext", "editable", "editor", "visible", "cssClass", "tooltip", "tooltipHeader", "editableTitle", "headerFilter", "mutator", "mutateType", "accessor"];
|
|
14801
|
-
|
|
14802
14812
|
if (col) {
|
|
14803
14813
|
|
|
14804
14814
|
exists = true;
|
|
@@ -14824,9 +14834,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
14824
14834
|
|
|
14825
14835
|
attributes = header[0].attributes;
|
|
14826
14836
|
|
|
14827
|
-
//check for tablator inline options
|
|
14837
|
+
// //check for tablator inline options
|
|
14828
14838
|
|
|
14829
14839
|
|
|
14840
|
+
self._extractOptions(header, col);
|
|
14841
|
+
|
|
14830
14842
|
for (var i in attributes) {
|
|
14831
14843
|
|
|
14832
14844
|
var attrib = attributes[i],
|
|
@@ -14836,13 +14848,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
14836
14848
|
|
|
14837
14849
|
name = attrib.name.replace("tabulator-", "");
|
|
14838
14850
|
|
|
14839
|
-
|
|
14840
|
-
|
|
14841
|
-
if (key.toLowerCase() == name) {
|
|
14842
|
-
|
|
14843
|
-
col[key] = self._attribValue(attrib.value);
|
|
14844
|
-
}
|
|
14845
|
-
});
|
|
14851
|
+
col[name] = self._attribValue(attrib.value);
|
|
14846
14852
|
}
|
|
14847
14853
|
}
|
|
14848
14854
|
|
|
@@ -14865,9 +14871,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
14865
14871
|
|
|
14866
14872
|
HtmlTableImport.prototype._generateBlankHeaders = function (element) {
|
|
14867
14873
|
|
|
14868
|
-
var self = this
|
|
14869
|
-
|
|
14870
|
-
|
|
14874
|
+
var self = this,
|
|
14875
|
+
headers = $("tr:first td", element),
|
|
14876
|
+
rows = $("tbody tr", element);
|
|
14871
14877
|
|
|
14872
14878
|
headers.each(function (index) {
|
|
14873
14879
|
|
|
@@ -15673,6 +15679,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
15673
15679
|
|
|
15674
15680
|
this.endMove = this.endMove.bind(this);
|
|
15675
15681
|
|
|
15682
|
+
this.tableRowDropEvent = false;
|
|
15683
|
+
|
|
15676
15684
|
this.connection = false;
|
|
15677
15685
|
|
|
15678
15686
|
this.connections = [];
|
|
@@ -15902,9 +15910,12 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
15902
15910
|
|
|
15903
15911
|
this._unbindMouseMove();
|
|
15904
15912
|
|
|
15905
|
-
|
|
15913
|
+
if (!this.connection) {
|
|
15914
|
+
|
|
15915
|
+
this.placeholderElement.after(this.moving.getElement());
|
|
15906
15916
|
|
|
15907
|
-
|
|
15917
|
+
this.placeholderElement.detach();
|
|
15918
|
+
}
|
|
15908
15919
|
|
|
15909
15920
|
this.hoverElement.detach();
|
|
15910
15921
|
|
|
@@ -16029,7 +16040,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
16029
16040
|
}
|
|
16030
16041
|
});
|
|
16031
16042
|
|
|
16032
|
-
self.
|
|
16043
|
+
self.tableRowDropEvent = self.tableRowDrop.bind(self);
|
|
16044
|
+
|
|
16045
|
+
self.table.element.on("mouseup", self.tableRowDropEvent);
|
|
16033
16046
|
|
|
16034
16047
|
this.table.options.movableRowsReceivingStart(row, table);
|
|
16035
16048
|
|
|
@@ -16065,7 +16078,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
16065
16078
|
}
|
|
16066
16079
|
});
|
|
16067
16080
|
|
|
16068
|
-
self.table.element.off("mouseup", self.
|
|
16081
|
+
self.table.element.off("mouseup", self.tableRowDropEvent);
|
|
16069
16082
|
|
|
16070
16083
|
this.table.options.movableRowsReceivingStop(table);
|
|
16071
16084
|
} else {
|
|
@@ -17025,14 +17038,14 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
17025
17038
|
|
|
17026
17039
|
var footer = this.table.footerManager.element;
|
|
17027
17040
|
|
|
17028
|
-
if (footer.innerWidth() - footer[0].scrollWidth < 0) {
|
|
17041
|
+
if (Math.ceil(footer.innerWidth()) - footer[0].scrollWidth < 0) {
|
|
17029
17042
|
|
|
17030
17043
|
this.pagesElement.hide();
|
|
17031
17044
|
} else {
|
|
17032
17045
|
|
|
17033
17046
|
this.pagesElement.show();
|
|
17034
17047
|
|
|
17035
|
-
if (footer.innerWidth() - footer[0].scrollWidth < 0) {
|
|
17048
|
+
if (Math.ceil(footer.innerWidth()) - footer[0].scrollWidth < 0) {
|
|
17036
17049
|
|
|
17037
17050
|
this.pagesElement.hide();
|
|
17038
17051
|
}
|
|
@@ -18270,19 +18283,22 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
18270
18283
|
|
|
18271
18284
|
if (row) {
|
|
18272
18285
|
|
|
18273
|
-
|
|
18286
|
+
if (self.selectedRows.indexOf(row) == -1) {
|
|
18274
18287
|
|
|
18275
|
-
|
|
18288
|
+
var self = this;
|
|
18276
18289
|
|
|
18277
|
-
|
|
18290
|
+
row.extensions.select.selected = true;
|
|
18278
18291
|
|
|
18279
|
-
|
|
18292
|
+
row.getElement().addClass("tabulator-selected");
|
|
18280
18293
|
|
|
18281
|
-
|
|
18294
|
+
self.selectedRows.push(row);
|
|
18295
|
+
|
|
18296
|
+
if (!silent) {
|
|
18282
18297
|
|
|
18283
|
-
|
|
18298
|
+
self.table.options.rowSelected(row.getComponent());
|
|
18284
18299
|
|
|
18285
|
-
|
|
18300
|
+
self._rowSelectionChanged();
|
|
18301
|
+
}
|
|
18286
18302
|
}
|
|
18287
18303
|
} else {
|
|
18288
18304
|
|