tabulator-rails 0.2.2 → 0.2.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 23e571464d638240a28e71bdaf174e84f3319f6f
4
- data.tar.gz: e392e22ae683ac9bbe87e0db66b783740d2b02c4
3
+ metadata.gz: ddce4c8124ac79464fbadd4ab2ce382df6337a2b
4
+ data.tar.gz: 3f2bf6ff4842aec82475628fcb9c2d0b32d50447
5
5
  SHA512:
6
- metadata.gz: 1459e8946d8d4b798799eee9d56582ed1d3d425bb64bf577ab0ab9445414c6278e593a5077ca5d6f5e889b91854c3a13d70404173234f784cc63eff1be0fe49d
7
- data.tar.gz: ee56c42dde84320fcf45cc4c1701b6282da8e8754e3c8b8966d8340a2fd5a620569e302a9219727d72286d6bc755656a39eaa386a34c821455d25f95f832f85e
6
+ metadata.gz: 5d7bed4e74cdc1d40fa44631182bb3ba1eefe4df2e756e1a87d4dd3aedbe6efa3178b1843aed70eb2531b39970689e29ec9e5cc20f1418eadde2bb55b18a0063
7
+ data.tar.gz: 17b61542152f7711e5ba100d9fe4826a4450498683b261eaad4966676160a05c1884decc01df3b01eaa9c3acfdf6062473cfe16ef3117b5d1727ce3460fcb02f
data/VERSIONS.md CHANGED
@@ -7,4 +7,5 @@
7
7
  | 0.2.0 | 3.4.0
8
8
  | 0.2.1 | 3.4.1
9
9
  | 0.2.2 | 3.4.2
10
+ | 0.2.3 | 3.4.3
10
11
 
@@ -1,5 +1,5 @@
1
1
  module Tabulator
2
2
  module Rails
3
- VERSION = "0.2.2"
3
+ VERSION = "0.2.3"
4
4
  end
5
5
  end
@@ -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.2 (c) Oliver Folkerd */
5
+ /* Tabulator v3.4.3 (c) Oliver Folkerd */
6
6
 
7
7
  /*
8
8
  * This file is part of the Tabulator package.
@@ -5542,6 +5542,15 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
5542
5542
 
5543
5543
  element.addClass("tabulator").attr("role", "grid").empty();
5544
5544
 
5545
+ //set table height
5546
+
5547
+ if (options.height) {
5548
+
5549
+ options.height = isNaN(options.height) ? options.height : options.height + "px";
5550
+
5551
+ this.element.css({ "height": options.height });
5552
+ }
5553
+
5545
5554
  this.rowManager.initialize();
5546
5555
 
5547
5556
  this._detectBrowser();
@@ -5572,15 +5581,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
5572
5581
  options.placeholder = $("<div class='tabulator-placeholder'><span>" + options.placeholder + "</span></div>");
5573
5582
  }
5574
5583
 
5575
- //set table height
5576
-
5577
- if (options.height) {
5578
-
5579
- options.height = isNaN(options.height) ? options.height : options.height + "px";
5580
-
5581
- this.element.css({ "height": options.height });
5582
- }
5583
-
5584
5584
  //build table elements
5585
5585
 
5586
5586
  element.append(this.columnManager.getElement());
@@ -8857,7 +8857,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
8857
8857
  self.mouseClick = true;
8858
8858
  });
8859
8859
 
8860
- element.on("focus", function (e) {
8860
+ element.on("focus", function (e, force) {
8861
8861
 
8862
8862
  self.edit(cell, e);
8863
8863
  });
@@ -8872,6 +8872,16 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
8872
8872
  cellEditor,
8873
8873
  component;
8874
8874
 
8875
+ //if currently editing another cell trigger blur to trigger save and validate actions
8876
+
8877
+
8878
+ if (this.currentCell) {
8879
+
8880
+ cell.getElement().focus();
8881
+
8882
+ return;
8883
+ }
8884
+
8875
8885
  //handle successfull value change
8876
8886
 
8877
8887
 
@@ -15994,12 +16004,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
15994
16004
 
15995
16005
  if (isNaN(a)) {
15996
16006
 
15997
- return -1;
15998
-
15999
- if (isNaN(b)) {
16000
-
16001
- return 0;
16002
- }
16007
+ return isNaN(b) ? 0 : -1;
16003
16008
  } else if (isNaN(b)) {
16004
16009
 
16005
16010
  return 1;
@@ -16161,12 +16166,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
16161
16166
 
16162
16167
  if (!Array.isArray(a)) {
16163
16168
 
16164
- return -1;
16165
-
16166
- if (!Array.isArray(b)) {
16167
-
16168
- return 0;
16169
- }
16169
+ return !Array.isArray(b) ? 0 : -1;
16170
16170
  } else if (!Array.isArray(b)) {
16171
16171
 
16172
16172
  return 1;
@@ -1,4 +1,4 @@
1
- /* Tabulator v3.4.2 (c) Oliver Folkerd */
1
+ /* Tabulator v3.4.3 (c) Oliver Folkerd */
2
2
  .tabulator {
3
3
  position: relative;
4
4
  border: 1px solid #999;
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.2
4
+ version: 0.2.3
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-25 00:00:00.000000000 Z
11
+ date: 2018-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler