
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
A Dynatree integration for rails 3.1+ asset pipeline
http://code.google.com/p/dynatree/
Add this line to your application's Gemfile:
gem 'dynatree-rails'
And then execute:
$ bundle
Or install it yourself as:
$ gem install dynatree-rails
css:
//= require dynatree/skin
or
//= require dynatree/skin-vista
js:
//= require dynatree/jquery.dynatree
For dynatree usage and examples see: http://code.google.com/p/dynatree/
Can be used to turn association select to a tree select, like this:
#checkboxes
-# with simple_form
= f.association :categories, as: :check_boxes, collection: Category.all
-# with formtastic
= f.input :categories, as: :check_boxes, collection: Category.all
-# without any
- Category.each do |c|
= check_box_tag "item[category_ids][]", c.id, @item.category_ids.include?(c.id)
#tree.controls.input{style: 'width: 220px;'}
:javascript
var categories = #{Dynatree::Renderer.new(Category.nested_set.all, f.object.categories).render()};
$(function(){
$('#checkboxes').hide();
$("#tree").dynatree({
checkbox: true,
selectMode: 3,
classNames: {
active: "dynatree-active-no"
},
children: categories
});
$("form").submit(function() {
var tree = $("#tree").dynatree("getTree"),
arr = tree.serializeArray(),
sel = $('#checkboxes');
sel.find(':checked').prop('checked', false);
$.each(arr, function(k, v) {
sel.find('[value=' + v.value + ']').prop('checked', true);
});
});
});
git checkout -b my-new-feature
)git commit -am 'Added some feature'
)git push origin my-new-feature
)Dynatree is
Copyright (c) 2008-2011, Martin Wendt (http://wwWendt.de)
Dual licensed under the MIT or GPL Version 2 licenses.
http://code.google.com/p/dynatree/wiki/LicenseInfo
This code is:
Copyright (c) 2012-2014, Gleb Tv
Dual licensed under the MIT or GPL Version 2 licenses.
FAQs
Unknown package
We found that dynatree-rails demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.