tabulator-rails 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSIONS.md +1 -0
- data/lib/tabulator-rails/version.rb +1 -1
- data/vendor/assets/javascripts/tabulator.js +35 -29
- data/vendor/assets/stylesheets/tabulator.css +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b7907380148815bc804afd176e7947d2f9e86a6
|
4
|
+
data.tar.gz: '0287d5974762b274f9d432dfefb5142b7e574bf0'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 118a938f502101ba8311b3930226a79826aa9686f281c0a41cfd75696cfad53b8dde251dcd2a834b8ee5df646e9b5ac305891d24e756dab6b9833474dbfb519c
|
7
|
+
data.tar.gz: 03b62cad7b433157bd351026333dd052f9ee2f2ad30f221dfd1ee708283ced0d570cd7b44ccfa9436b3aa108c5529d453df8cd899eaca529718c0e3851d79341
|
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.4.
|
5
|
+
/* Tabulator v3.4.4 (c) Oliver Folkerd */
|
6
6
|
|
7
7
|
/*
|
8
8
|
* This file is part of the Tabulator package.
|
@@ -1079,7 +1079,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
1079
1079
|
|
1080
1080
|
if (def.field) {
|
1081
1081
|
|
1082
|
-
self.table.extensions.localize.bind("columns
|
1082
|
+
self.table.extensions.localize.bind("columns|" + def.field, function (value) {
|
1083
1083
|
|
1084
1084
|
self.element.attr("title", value || def.title);
|
1085
1085
|
});
|
@@ -1464,7 +1464,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
1464
1464
|
|
1465
1465
|
if (def.field) {
|
1466
1466
|
|
1467
|
-
table.extensions.localize.bind("columns
|
1467
|
+
table.extensions.localize.bind("columns|" + def.field, function (text) {
|
1468
1468
|
|
1469
1469
|
titleElement.val(text || def.title || " ");
|
1470
1470
|
});
|
@@ -1476,7 +1476,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
1476
1476
|
|
1477
1477
|
if (def.field) {
|
1478
1478
|
|
1479
|
-
table.extensions.localize.bind("columns
|
1479
|
+
table.extensions.localize.bind("columns|" + def.field, function (text) {
|
1480
1480
|
|
1481
1481
|
self._formatColumnHeaderTitle(titleHolderElement, text || def.title || " ");
|
1482
1482
|
});
|
@@ -2306,9 +2306,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
2306
2306
|
|
2307
2307
|
RowManager.prototype.scrollToRow = function (row) {
|
2308
2308
|
|
2309
|
-
var rowIndex;
|
2310
|
-
|
2311
|
-
rowIndex = this.displayRows.indexOf(row);
|
2309
|
+
var rowIndex = this.displayRows.indexOf(row);
|
2312
2310
|
|
2313
2311
|
if (rowIndex > -1) {
|
2314
2312
|
|
@@ -2459,7 +2457,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
2459
2457
|
|
2460
2458
|
var row = self.addRow(item, pos, index, true);
|
2461
2459
|
|
2462
|
-
rows.push(row
|
2460
|
+
rows.push(row);
|
2463
2461
|
});
|
2464
2462
|
|
2465
2463
|
if (this.table.options.groupBy && this.table.extExists("groupRows")) {
|
@@ -3271,11 +3269,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
3271
3269
|
|
3272
3270
|
//check if position is too close to bottom of table
|
3273
3271
|
|
3274
|
-
var heightOccpied = (self.displayRowsCount - position) * self.vDomRowHeight;
|
3272
|
+
var heightOccpied = (self.displayRowsCount - position + 1) * self.vDomRowHeight;
|
3275
3273
|
|
3276
3274
|
if (heightOccpied < self.height) {
|
3277
3275
|
|
3278
|
-
position -= Math.ceil((self.height - heightOccpied) / self.
|
3276
|
+
position -= Math.ceil((self.height - heightOccpied) / self.vDomRowHeight);
|
3279
3277
|
|
3280
3278
|
if (position < 0) {
|
3281
3279
|
|
@@ -6039,7 +6037,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
6039
6037
|
this.extensions.columnCalcs.recalc(this.rowManager.displayRows);
|
6040
6038
|
}
|
6041
6039
|
|
6042
|
-
return row;
|
6040
|
+
return row.getComponent();
|
6043
6041
|
},
|
6044
6042
|
|
6045
6043
|
//update a row if it exitsts otherwise create it
|
@@ -7295,8 +7293,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
7295
7293
|
|
7296
7294
|
Localize.prototype.getText = function (path, value) {
|
7297
7295
|
|
7298
|
-
var path = value ? path + "
|
7299
|
-
pathArray = path.split("
|
7296
|
+
var path = value ? path + "|" + value : path,
|
7297
|
+
pathArray = path.split("|"),
|
7300
7298
|
text = this._getLangElement(pathArray, this.locale);
|
7301
7299
|
|
7302
7300
|
// if(text === false){
|
@@ -10039,13 +10037,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
10039
10037
|
|
10040
10038
|
if (field) {
|
10041
10039
|
|
10042
|
-
self.table.extensions.localize.bind("headerFilters
|
10040
|
+
self.table.extensions.localize.bind("headerFilters|columns|" + column.definition.field, function (value) {
|
10043
10041
|
|
10044
10042
|
editorElement.attr("placeholder", typeof value !== "undefined" && value ? value : self.table.extensions.localize.getText("headerFilters.default"));
|
10045
10043
|
});
|
10046
10044
|
} else {
|
10047
10045
|
|
10048
|
-
self.table.extensions.localize.bind("headerFilters
|
10046
|
+
self.table.extensions.localize.bind("headerFilters|default", function (value) {
|
10049
10047
|
|
10050
10048
|
editorElement.attr("placeholdder", typeof self.column.definition.headerFilterPlaceholder !== "undefined" && self.column.definition.headerFilterPlaceholder ? self.column.definition.headerFilterPlaceholder : value);
|
10051
10049
|
});
|
@@ -10993,7 +10991,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
10993
10991
|
percentValue,
|
10994
10992
|
color,
|
10995
10993
|
legend,
|
10996
|
-
legendColor
|
10994
|
+
legendColor,
|
10995
|
+
top,
|
10996
|
+
left,
|
10997
|
+
right,
|
10998
|
+
bottom;
|
10997
10999
|
|
10998
11000
|
//make sure value is in range
|
10999
11001
|
|
@@ -11007,7 +11009,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
11007
11009
|
|
11008
11010
|
percent = (max - min) / 100;
|
11009
11011
|
|
11010
|
-
percentValue =
|
11012
|
+
percentValue = Math.round((percentValue - min) / percent);
|
11011
11013
|
|
11012
11014
|
//set bar color
|
11013
11015
|
|
@@ -11036,7 +11038,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
11036
11038
|
|
11037
11039
|
index = Math.min(index, formatterParams.color.length - 1);
|
11038
11040
|
|
11039
|
-
|
11041
|
+
index = Math.max(index, 0);
|
11042
|
+
|
11043
|
+
color = formatterParams.color[index];
|
11040
11044
|
|
11041
11045
|
break;
|
11042
11046
|
}
|
@@ -11103,7 +11107,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
11103
11107
|
|
11104
11108
|
index = Math.min(index, formatterParams.legendColor.length - 1);
|
11105
11109
|
|
11106
|
-
|
11110
|
+
index = Math.max(index, 0);
|
11111
|
+
|
11112
|
+
legendColor = formatterParams.legendColor[index];
|
11107
11113
|
|
11108
11114
|
break;
|
11109
11115
|
}
|
@@ -11124,7 +11130,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
11124
11130
|
|
11125
11131
|
element.attr("aria-label", percentValue);
|
11126
11132
|
|
11127
|
-
return "<div style='position:absolute; top:8px; bottom:8px; left:4px; right:" + percentValue + "
|
11133
|
+
return "<div style='position:absolute; top:8px; bottom:8px; left:4px; right:4px;'><div style='position:relative; height:100%; width:calc(" + percentValue + "%); background-color:" + color + "; display:inline-block;' data-max='" + max + "' data-min='" + min + "'></div></div>" + (legend ? "<div style='position:absolute; top:4px; left:0; text-align:center; width:100%; color:" + legendColor + ";'>" + legend + "</div>" : "");
|
11128
11134
|
},
|
11129
11135
|
|
11130
11136
|
//background color
|
@@ -12234,7 +12240,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
12234
12240
|
}]; //starting state of group
|
12235
12241
|
|
12236
12242
|
|
12237
|
-
self.table.extensions.localize.bind("groups
|
12243
|
+
self.table.extensions.localize.bind("groups|item", function (langValue, lang) {
|
12238
12244
|
|
12239
12245
|
self.headerGenerator[0] = function (value, count, data) {
|
12240
12246
|
//header layout function
|
@@ -14007,42 +14013,42 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
14007
14013
|
//bind localizations
|
14008
14014
|
|
14009
14015
|
|
14010
|
-
self.table.extensions.localize.bind("pagination
|
14016
|
+
self.table.extensions.localize.bind("pagination|first", function (value) {
|
14011
14017
|
|
14012
14018
|
self.firstBut.html(value);
|
14013
14019
|
});
|
14014
14020
|
|
14015
|
-
self.table.extensions.localize.bind("pagination
|
14021
|
+
self.table.extensions.localize.bind("pagination|first_title", function (value) {
|
14016
14022
|
|
14017
14023
|
self.firstBut.attr("aria-label", value).attr("title", value);
|
14018
14024
|
});
|
14019
14025
|
|
14020
|
-
self.table.extensions.localize.bind("pagination
|
14026
|
+
self.table.extensions.localize.bind("pagination|prev", function (value) {
|
14021
14027
|
|
14022
14028
|
self.prevBut.html(value);
|
14023
14029
|
});
|
14024
14030
|
|
14025
|
-
self.table.extensions.localize.bind("pagination
|
14031
|
+
self.table.extensions.localize.bind("pagination|prev_title", function (value) {
|
14026
14032
|
|
14027
14033
|
self.prevBut.attr("aria-label", value).attr("title", value);
|
14028
14034
|
});
|
14029
14035
|
|
14030
|
-
self.table.extensions.localize.bind("pagination
|
14036
|
+
self.table.extensions.localize.bind("pagination|next", function (value) {
|
14031
14037
|
|
14032
14038
|
self.nextBut.html(value);
|
14033
14039
|
});
|
14034
14040
|
|
14035
|
-
self.table.extensions.localize.bind("pagination
|
14041
|
+
self.table.extensions.localize.bind("pagination|next_title", function (value) {
|
14036
14042
|
|
14037
14043
|
self.nextBut.attr("aria-label", value).attr("title", value);
|
14038
14044
|
});
|
14039
14045
|
|
14040
|
-
self.table.extensions.localize.bind("pagination
|
14046
|
+
self.table.extensions.localize.bind("pagination|last", function (value) {
|
14041
14047
|
|
14042
14048
|
self.lastBut.html(value);
|
14043
14049
|
});
|
14044
14050
|
|
14045
|
-
self.table.extensions.localize.bind("pagination
|
14051
|
+
self.table.extensions.localize.bind("pagination|last_title", function (value) {
|
14046
14052
|
|
14047
14053
|
self.lastBut.attr("aria-label", value).attr("title", value);
|
14048
14054
|
});
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tabulator-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tanvir hasan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|