lalala 4.0.0.dev.283 → 4.0.0.dev.284
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4f3a5d1a4796cad776c0233c5c5240527d95ac7
|
4
|
+
data.tar.gz: ad34a1c15ca8c26c85a0a0ad96c72ae1db453970
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a32301a9e9d57a7ffbd007b95c08040992cfc93bb2d7db481e4a13a7890bb2981ab45cbf3bf4bbe3a2d503f26ea755af3e81f248095ff35d669c953b4ea5217f
|
7
|
+
data.tar.gz: ce098aeaa7a34e49ba5e49d3cc3af51b2dbba649833fe57f9521eaf1f57a5a055e4d285314db540270d88f696e78a3feb5fcc4a22cf2795d9865a0a302c3cf93
|
@@ -8,8 +8,8 @@ var lalalaStorage = require('lalala/modules/storage'),
|
|
8
8
|
/**
|
9
9
|
* @constructor
|
10
10
|
*/
|
11
|
-
function CPT() {
|
12
|
-
this.$element = $
|
11
|
+
function CPT($element) {
|
12
|
+
this.$element = $element;
|
13
13
|
this.$tree_parents = this.getTreeParents();
|
14
14
|
this.states = lalalaStorage[storage_key] || [];
|
15
15
|
|
@@ -88,6 +88,11 @@ CPT.prototype.initStates = function() {
|
|
88
88
|
* @param {jQuery object} $trigger The trigger element
|
89
89
|
*/
|
90
90
|
CPT.prototype.close = function($target, $trigger) {
|
91
|
+
if ( !$target ) {
|
92
|
+
console.warn('Can not find tree target');
|
93
|
+
return;
|
94
|
+
}
|
95
|
+
|
91
96
|
$target.hide();
|
92
97
|
$trigger.addClass('closed');
|
93
98
|
|
@@ -102,6 +107,11 @@ CPT.prototype.close = function($target, $trigger) {
|
|
102
107
|
* @param {jQuery object} $trigger The trigger element
|
103
108
|
*/
|
104
109
|
CPT.prototype.open = function($target, $trigger) {
|
110
|
+
if ( !$target ) {
|
111
|
+
console.warn('Can not find tree target');
|
112
|
+
return;
|
113
|
+
}
|
114
|
+
|
105
115
|
$target.show();
|
106
116
|
$trigger.removeClass('closed');
|
107
117
|
|
@@ -155,5 +165,17 @@ CPT.prototype.saveState = function() {
|
|
155
165
|
* Initialize module
|
156
166
|
*/
|
157
167
|
exports.init = function() {
|
158
|
-
|
168
|
+
var $collapsible_page_trees = $('#index_tree_table_pages');
|
169
|
+
|
170
|
+
if ( $collapsible_page_trees.length < 1 ) {
|
171
|
+
return;
|
172
|
+
}
|
173
|
+
|
174
|
+
$collapsible_page_trees.each( function() {
|
175
|
+
var $this = $(this);
|
176
|
+
|
177
|
+
if ( !$this.data('collapsible_pages_tree_instance') ) {
|
178
|
+
$this.data( 'collapsible_pages_tree_instance', new CPT($this) );
|
179
|
+
}
|
180
|
+
});
|
159
181
|
};
|
data/lib/lalala/version.rb
CHANGED
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.
|
4
|
+
version: 4.0.0.dev.284
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Menke
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2014-02-
|
16
|
+
date: 2014-02-24 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: activeadmin
|