lalala 4.0.0.dev.277 → 4.0.0.dev.279

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: e278e14f0eb5c4746f3aa83df32fa07142d9cb70
4
- data.tar.gz: 8f2ed2866f9b5d290a60cf0808005740b30be35b
3
+ metadata.gz: ccc606f086137e14a5e08168385c0c38e5f7e4e5
4
+ data.tar.gz: 485447d2da4248fe3b99bd08bda7732ca1e364d9
5
5
  SHA512:
6
- metadata.gz: 61dfdecbf9aedd55b4234ef4638abf8e8e93aacd5ab94a2315b896025f874b42ea8b37ab0e7bab02e3ac6c0baa3db47c8c84107d64d683cec4ae11cba964c8d3
7
- data.tar.gz: c510a027e73b58fd62493def9398a5319d59cbd176b12c8c89e1edd0e95c7539468d1931bcaf60d7c2fb1a91e711a621e44911866669fe5f697f18ef9d85c18d
6
+ metadata.gz: 9f9b6294bda402b07640de4b20604b37cd71ff03ad681463207de46fa4e2f277b6e261f490581513c5c1107d771f622394e7b41d98de5c91ecc4602ef9b7959f
7
+ data.tar.gz: d973cdb51d14480f5e606f851c79efd58abe377288ec88cfb997f80de9b0f2a2f8373d84732e487ef1b3bcc7576fd026b067ca4a0433cfcbd669bf939d0dc67d
@@ -16,7 +16,7 @@ function CPT() {
16
16
  this.addTriggers();
17
17
  this.initStates();
18
18
 
19
- this.$tree_parents.on('click.collapsible_tree', '.collapse', $.proxy(this.toggleState, this));
19
+ this.$tree_parents.on('click.collapsible_tree', '.collapsable', $.proxy(this.toggleState, this));
20
20
 
21
21
  // Best behaviour would be to save on window unload,
22
22
  // but the current storage save on unload is wrong,
@@ -26,14 +26,14 @@ function CPT() {
26
26
 
27
27
 
28
28
  /**
29
- * Get tree items with children
29
+ * Get tree items (<tr>'s) with children
30
30
  *
31
31
  * It adds the target as a data attribute to the tree parent element
32
32
  *
33
33
  * @return {jQuery Array}
34
34
  */
35
35
  CPT.prototype.getTreeParents = function() {
36
- return this.$element.find('td.subtree').map(function() {
36
+ return this.$element.find('td.subtree').closest('tr').map(function() {
37
37
  var $subtree = $(this),
38
38
  $tree_parent = $(this).closest('tr').prev();
39
39
 
@@ -48,12 +48,19 @@ CPT.prototype.getTreeParents = function() {
48
48
  * Add trigger column to tree parent rows
49
49
  */
50
50
  CPT.prototype.addTriggers = function() {
51
- this.$tree_parents.each(function() {
52
- var $tree_parent = $(this),
53
- $trigger = $('<td class="collapse"></td>');
51
+ var $trigger = $('<td class="collapse"></td>');
52
+
53
+ // Add <td> to every <tr> to keep table structure in balance
54
+ this.$element.find('tr').prepend( $trigger );
55
+
56
+ // Activate triggers
57
+ this.$element.find('table.subtree').each(function() {
58
+ var $subtree = $(this),
59
+ $tree_parent = $subtree.closest('tr').prev();
54
60
 
55
- $trigger.data('tree_parent', $tree_parent);
56
- $trigger.prependTo($tree_parent);
61
+ $tree_parent.find('.collapse')
62
+ .addClass('collapsable')
63
+ .data('tree_parent', $tree_parent);
57
64
  });
58
65
  };
59
66
 
@@ -74,7 +74,7 @@
74
74
  padding: 13px 15px 12px 15px;
75
75
 
76
76
  &.subtree {
77
- padding: 0 0 0 21px;
77
+ padding: 0 0 0 12px;
78
78
  }
79
79
 
80
80
  &.selectable {
@@ -11,23 +11,30 @@
11
11
  background-color: white;
12
12
 
13
13
  &.collapse {
14
- padding: 0 0 0 10px;
15
- width: 14px;
14
+ cursor: pointer;
15
+ padding: 0 0 0 5px;
16
+ width: 10px;
17
+ }
18
+
19
+ &.collapse.collapsable {
20
+
16
21
 
17
22
  &:before {
18
23
  border-color: black transparent transparent transparent;
19
24
  border-style: solid;
20
- border-width: 7px;
25
+ border-width: 4px;
21
26
  content: "";
22
- cursor: pointer;
23
27
  display: block;
28
+ height: 0;
29
+ left: 2px;
24
30
  position: relative;
25
- top: 4px;
31
+ top: 3px;
32
+ width: 0;
26
33
  }
27
34
 
28
35
  }
29
36
 
30
- &.collapse.closed {
37
+ &.collapse.collapsable.closed {
31
38
 
32
39
  &:before {
33
40
  border-color: transparent transparent transparent black;
@@ -38,12 +45,12 @@
38
45
  }
39
46
 
40
47
  &.selectable {
41
- padding-right: 0;
48
+ padding: 0 5px;
42
49
  width: 16px;
43
50
  }
44
51
 
45
52
  &.position {
46
- padding-left: 0;
53
+ padding: 0;
47
54
  width: 16px;
48
55
 
49
56
  .drag-handle {
@@ -1,6 +1,6 @@
1
1
  module Lalala
2
2
  VERSION = "4.0.0"
3
- BUILD = "277"
3
+ BUILD = "279"
4
4
 
5
5
  if BUILD != ("{{BUILD_NUMBER" + "}}") # prevent sed replacement (see script/ci)
6
6
  BUILD_VERSION = "#{VERSION}.dev.#{BUILD}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lalala
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.dev.277
4
+ version: 4.0.0.dev.279
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Menke