dynatree-rails 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,4 +1,6 @@
1
- # Dynatree::Rails
1
+ # Dynatree-Rails
2
+
3
+ A Dynatree integration for rails 3.1 asset pipeline
2
4
 
3
5
  http://code.google.com/p/dynatree/
4
6
 
@@ -35,7 +37,9 @@ For dynatree usage and examples see: http://code.google.com/p/dynatree/
35
37
  ## An optional model-to-javascript tree renderer for mongoid_nested_set
36
38
 
37
39
  Can be used to turn association select to a tree select, like this:
38
-
40
+
41
+
42
+
39
43
  #checkboxes
40
44
  = f.association :categories, as: :check_boxes, collection: Category.all
41
45
  #tree.controls.input{style: 'width: 220px;'}
@@ -57,7 +61,7 @@ Can be used to turn association select to a tree select, like this:
57
61
  $("form").submit(function() {
58
62
  var tree = $("#tree").dynatree("getTree"),
59
63
  arr = tree.serializeArray(),
60
- sel = $('#restaurant_category_ids');
64
+ sel = $('#checkboxes');
61
65
  sel.find('option:selected').removeAttr('selected');
62
66
  $.each(arr, function(k, v) {
63
67
  sel.find('[value=' + v.value + ']').prop('selected', 'selected');
@@ -72,3 +76,16 @@ Can be used to turn association select to a tree select, like this:
72
76
  3. Commit your changes (`git commit -am 'Added some feature'`)
73
77
  4. Push to the branch (`git push origin my-new-feature`)
74
78
  5. Create new Pull Request
79
+
80
+ ## License
81
+
82
+ Dynatree is
83
+
84
+ Copyright (c) 2008-2011, Martin Wendt (http://wwWendt.de)
85
+ Dual licensed under the MIT or GPL Version 2 licenses.
86
+ http://code.google.com/p/dynatree/wiki/LicenseInfo
87
+
88
+ This code is:
89
+
90
+ Copyright (c) 2008-2011, GlebTV
91
+ Dual licensed under the MIT or GPL Version 2 licenses.
@@ -42,7 +42,7 @@ module Dynatree
42
42
  end
43
43
  end
44
44
  ch['title'] = item.name
45
- ch['key'] = item.id
45
+ ch['key'] = item.id.to_s
46
46
  ch['children'] = self.recurse(item.id)
47
47
  ret << ch
48
48
  end
@@ -1,5 +1,5 @@
1
1
  module Dynatree
2
2
  module Rails
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynatree-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: