jquery_sortable_tree 3.1.0 → 3.1.1
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: 6fae97d1cfe28cf48b9452f4616454fd5667b2f4
|
4
|
+
data.tar.gz: 6a571ea0ae0282b21659f19fcefeeff6e8ca7bc1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bdc12b9aec2e283c0e66c8f3e8eb9554ede8fcc8881c37e497be0502f09b163d162bd634a5d3738fd9262cb6b845bf8afafa785f7b3c4dba51639ab483efa7c
|
7
|
+
data.tar.gz: b5835e1a754d3f874bac4b49f3a6b516cdf179627bd7cdb0793cd36776086f18702bf726c9ddd99df9ca429099c4ee34bf0f0d77ed996e198774b5d696827355
|
data/README.md
CHANGED
@@ -80,6 +80,7 @@ or Extendable GUI:
|
|
80
80
|
|
81
81
|
```ruby
|
82
82
|
//= require expandable_tree/initializer
|
83
|
+
```
|
83
84
|
|
84
85
|
#### Stylesheets
|
85
86
|
|
@@ -339,4 +340,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
339
340
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
340
341
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
341
342
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
342
|
-
W
|
343
|
+
W
|
@@ -50,7 +50,7 @@ $ ->
|
|
50
50
|
list_item.appendTo(sortable_tree)
|
51
51
|
|
52
52
|
# remove items that deleted
|
53
|
-
$('ol.sortable_tree').on 'ajax:success', '.controls a.delete', -> $(this).parent().parent().remove()
|
53
|
+
$('ol.sortable_tree').on 'ajax:success', '.controls a.delete', -> $(this).parent().parent().parent().remove()
|
54
54
|
|
55
55
|
# edit clicked item
|
56
56
|
$('ol.sortable_tree').on 'click', 'h4 > a.edit', @edit_node
|
@@ -54,16 +54,21 @@ module JquerySortableTreeHelper
|
|
54
54
|
OpenStruct.new(options[:title] => '', id: ':id', children: nil)
|
55
55
|
end
|
56
56
|
|
57
|
-
def
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
57
|
+
def fake_sortable_ol_tag(options)
|
58
|
+
content_tag(:ol, build_tree_html(self, TREE_RENDERERS[:sortable], base_options.merge(options).merge({ node: fake_node(options) })), class: 'fake-node hidden', style: 'display: none;')
|
59
|
+
end
|
60
|
+
|
61
|
+
def real_sortable_ol_tag(tree, options)
|
62
|
+
content_tag(:ol, build_server_tree(tree, { type: :sortable }.merge(options)),
|
62
63
|
class: 'sortable_tree',
|
63
64
|
data: base_data.merge(options.slice(:parent_id, :model, :rebuild_url, :title, :max_levels))
|
64
65
|
)
|
65
66
|
end
|
66
67
|
|
68
|
+
def sortable_tree(tree, options = {})
|
69
|
+
space(20) + add_new_node_form(base_data.merge(options)) + fake_sortable_ol_tag(options) + real_sortable_ol_tag(tree, options)
|
70
|
+
end
|
71
|
+
|
67
72
|
def form_for_options(options)
|
68
73
|
{
|
69
74
|
html: { id: "new-#{options[:model]}-form" },
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jquery_sortable_tree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilya N. Zykin
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-08-
|
14
|
+
date: 2014-08-19 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|