olap-view 0.0.20 → 0.0.21

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: 91c60606c6113ffbdd9470f84c8a88be24b5783f
4
- data.tar.gz: 62201cfa22e446d086dd18861bf14c0fad14770c
3
+ metadata.gz: 42cf2ed179c16cadadb5ffc35422f581ffa2969a
4
+ data.tar.gz: 6e23d51d68b9eb6cd785d8d94c9f3ca4fda8f0ae
5
5
  SHA512:
6
- metadata.gz: 0e6d797a7ac8d137f4d0ebe6ff7c570a9b75f0f4f70a124c733f438d512c0828329e8a53c8ddd8f03b7516c3429e2ddea14ed04229c156d97aff45bcffe54671
7
- data.tar.gz: 7237d27f37ca630dd9ed28688d49f0f107ad0f34dabb7edfa9106c856f3b434953ce290fcff36f2b9500a4f4a499e5556949b5df39ad35b4931cf2dfa54a0dcd
6
+ metadata.gz: bdc3a45a8120f7df90bf285491dc7f73f6f0ed81958dfe53a9f729d694bee246d47f4999905139a2b31d3bce452af8e3417a65b3d772a2dc7d2edd945b9c9d9c
7
+ data.tar.gz: e863c64321a5b76e94cbb1f9160a3249b026c56fb970d35d879000238004473adc1753f67ea15ad27cf4727365f56cfb48680a63493e1fa0e202247a39bf039e
@@ -30,31 +30,37 @@
30
30
  function rowSpan(id){
31
31
  var rows = $('#'+ id +' table tbody tr');
32
32
 
33
- var first_row_dimention = [];
34
-
33
+ var dimensions_prev;
35
34
  $.each(rows, function(i, row){
36
- dimentions = $(row).find('td.dimension');
37
-
38
- $.each(dimentions, function(j, dimention){
39
- var prev_row_dimention = $($(rows[i-1]).find('td.dimension')[j]);
40
-
41
- if ((first_row_dimention[j] == undefined) || ($(dimention).html() != first_row_dimention[j].html())) {
42
- first_row_dimention[j] = $(dimention);
43
- prev_row_dimention.css({
44
- 'border-bottom-style': 'solid'});
45
- $(dimention).css({'border-bottom-style': 'none'});
35
+ var dimensions = $(row).find('td.dimension');
36
+ var can_update = true;
37
+ $.each(dimensions, function(j, dimension){
38
+ var dimension = $(dimension);
39
+
40
+ if (dimensions_prev != undefined){
41
+ if (dimension.html() != $(dimensions_prev[j]).html()){
42
+ can_update = false;
43
+ }
44
+ if(can_update){
45
+ dimension.addClass('delete_cell');
46
+ dimension.css({
47
+ color: 'transparent',
48
+ backgroundColor: $(dimensions_prev[j]).css('background-color'),
49
+ 'border-top-style': 'none',
50
+ 'border-bottom-style': 'none'
51
+ });
52
+ } else {
53
+ $(dimensions_prev[j]).css({'border-bottom-style': 'solid'});
54
+ $(dimension).css({'border-bottom-style': 'none'});
55
+ }
46
56
  } else {
47
- $(dimention).html('');
48
- $(dimention).css({
49
- backgroundColor: first_row_dimention[j].css('background-color'),
50
- 'border-top-style': 'none',
51
- 'border-bottom-style': 'none'
52
- });
57
+ dimension.css({'border-bottom-style': 'none'});
53
58
  }
54
59
  });
60
+ dimensions_prev = dimensions;
55
61
  });
56
-
57
62
  rows.last().find("td.dimension").css({'border-bottom-style': 'solid'});
63
+ rows.find('.delete_cell').html('');
58
64
  }
59
65
 
60
66
  function total(data){
@@ -1,5 +1,5 @@
1
1
  module Olap
2
2
  module View
3
- VERSION = "0.0.20"
3
+ VERSION = "0.0.21"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: olap-view
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20
4
+ version: 0.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - stepanovit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-16 00:00:00.000000000 Z
11
+ date: 2016-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler