typus_treeview 0.1.0
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.
- data/.gitignore +5 -0
- data/Gemfile +4 -0
- data/Rakefile +2 -0
- data/app/helpers/typus_treeview_helper.rb +37 -0
- data/lib/generators/templates/assets/images/ajax-loader.gif +0 -0
- data/lib/generators/templates/assets/images/file.gif +0 -0
- data/lib/generators/templates/assets/images/folder-closed.gif +0 -0
- data/lib/generators/templates/assets/images/folder.gif +0 -0
- data/lib/generators/templates/assets/images/minus.gif +0 -0
- data/lib/generators/templates/assets/images/plus.gif +0 -0
- data/lib/generators/templates/assets/images/treeview-black-line.gif +0 -0
- data/lib/generators/templates/assets/images/treeview-black.gif +0 -0
- data/lib/generators/templates/assets/images/treeview-default-line.gif +0 -0
- data/lib/generators/templates/assets/images/treeview-default.gif +0 -0
- data/lib/generators/templates/assets/images/treeview-famfamfam-line.gif +0 -0
- data/lib/generators/templates/assets/images/treeview-famfamfam.gif +0 -0
- data/lib/generators/templates/assets/images/treeview-gray-line.gif +0 -0
- data/lib/generators/templates/assets/images/treeview-gray.gif +0 -0
- data/lib/generators/templates/assets/images/treeview-red-line.gif +0 -0
- data/lib/generators/templates/assets/images/treeview-red.gif +0 -0
- data/lib/generators/templates/assets/jquery.treeview.css +74 -0
- data/lib/generators/templates/assets/jquery.treeview.js +256 -0
- data/lib/generators/templates/views/sidebar.html.erb +21 -0
- data/lib/generators/typus_treeview_generator.rb +17 -0
- data/lib/typus_treeview/version.rb +3 -0
- data/lib/typus_treeview.rb +19 -0
- data/typus_treeview.gemspec +21 -0
- metadata +93 -0
data/Gemfile
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
module TypusTreeviewHelper
|
2
|
+
def treeview
|
3
|
+
model = @object_name.classify.constantize
|
4
|
+
if model.respond_to?(:roots) && method = Typus.treeview[@object_name.to_sym]
|
5
|
+
res = ''
|
6
|
+
res << javascript_include_tag("jquery.treeview")
|
7
|
+
res << stylesheet_link_tag("jquery.treeview")
|
8
|
+
res << (content_tag :ul, :id => "treeview" do
|
9
|
+
model.roots.map do |root|
|
10
|
+
treeview_draw(root, method)
|
11
|
+
end.join.html_safe
|
12
|
+
end)
|
13
|
+
res << javascript_tag('$(document).ready(function(){$("#treeview").treeview({persist: "location"});});')
|
14
|
+
res.html_safe
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def treeview_draw node, method
|
19
|
+
content_tag :li, :class => "closed" do
|
20
|
+
res = ''
|
21
|
+
name = method.is_a?(Proc) ? method.call(node) : node.send(method)
|
22
|
+
res << content_tag(:span, link_to(name, { :action => "edit",
|
23
|
+
:id => node.id,
|
24
|
+
:host => request.host,
|
25
|
+
:port => request.port == 80 ? nil : request.port,
|
26
|
+
:protocol => request.scheme }))
|
27
|
+
if node.children.size > 0
|
28
|
+
res << (content_tag :ul do
|
29
|
+
node.children.map do |child|
|
30
|
+
treeview_draw(child, method)
|
31
|
+
end.join.html_safe
|
32
|
+
end)
|
33
|
+
end
|
34
|
+
res.html_safe
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,74 @@
|
|
1
|
+
.treeview, .treeview ul {
|
2
|
+
padding: 0;
|
3
|
+
margin: 0;
|
4
|
+
list-style: none;
|
5
|
+
}
|
6
|
+
|
7
|
+
.treeview ul {
|
8
|
+
background-color: white;
|
9
|
+
margin-top: 4px;
|
10
|
+
}
|
11
|
+
|
12
|
+
.treeview .hitarea {
|
13
|
+
background: url(/images/jquery_treeview/treeview-default.gif) -64px -25px no-repeat;
|
14
|
+
height: 16px;
|
15
|
+
width: 16px;
|
16
|
+
margin-left: -16px;
|
17
|
+
float: left;
|
18
|
+
cursor: pointer;
|
19
|
+
}
|
20
|
+
/* fix for IE6 */
|
21
|
+
* html .hitarea {
|
22
|
+
display: inline;
|
23
|
+
float:none;
|
24
|
+
}
|
25
|
+
|
26
|
+
.treeview li {
|
27
|
+
margin: 0;
|
28
|
+
padding: 3px 0pt 3px 16px;
|
29
|
+
}
|
30
|
+
|
31
|
+
.treeview a.selected {
|
32
|
+
background-color: #eee;
|
33
|
+
}
|
34
|
+
|
35
|
+
#treecontrol { margin: 1em 0; display: none; }
|
36
|
+
|
37
|
+
.treeview .hover { color: red; cursor: pointer; }
|
38
|
+
|
39
|
+
.treeview li { background: url(/images/jquery_treeview/treeview-default-line.gif) 0 0 no-repeat; }
|
40
|
+
.treeview li.collapsable, .treeview li.expandable { background-position: 0 -176px; }
|
41
|
+
|
42
|
+
.treeview .expandable-hitarea { background-position: -80px -3px; }
|
43
|
+
|
44
|
+
.treeview li.last { background-position: 0 -1766px }
|
45
|
+
.treeview li.lastCollapsable, .treeview li.lastExpandable { background-image: url(/images/jquery_treeview/treeview-default.gif); }
|
46
|
+
.treeview li.lastCollapsable { background-position: 0 -111px }
|
47
|
+
.treeview li.lastExpandable { background-position: -32px -67px }
|
48
|
+
|
49
|
+
.treeview div.lastCollapsable-hitarea, .treeview div.lastExpandable-hitarea { background-position: 0; }
|
50
|
+
|
51
|
+
.treeview-red li { background-image: url(/images/jquery_treeview/treeview-red-line.gif); }
|
52
|
+
.treeview-red .hitarea, .treeview-red li.lastCollapsable, .treeview-red li.lastExpandable { background-image: url(/images/jquery_treeview/treeview-red.gif); }
|
53
|
+
|
54
|
+
.treeview-black li { background-image: url(/images/jquery_treeview/treeview-black-line.gif); }
|
55
|
+
.treeview-black .hitarea, .treeview-black li.lastCollapsable, .treeview-black li.lastExpandable { background-image: url(/images/jquery_treeview/treeview-black.gif); }
|
56
|
+
|
57
|
+
.treeview-gray li { background-image: url(/images/jquery_treeview/treeview-gray-line.gif); }
|
58
|
+
.treeview-gray .hitarea, .treeview-gray li.lastCollapsable, .treeview-gray li.lastExpandable { background-image: url(/images/jquery_treeview/treeview-gray.gif); }
|
59
|
+
|
60
|
+
.treeview-famfamfam li { background-image: url(/images/jquery_treeview/treeview-famfamfam-line.gif); }
|
61
|
+
.treeview-famfamfam .hitarea, .treeview-famfamfam li.lastCollapsable, .treeview-famfamfam li.lastExpandable { background-image: url(/images/jquery_treeview/treeview-famfamfam.gif); }
|
62
|
+
|
63
|
+
.treeview .placeholder {
|
64
|
+
background: url(/images/jquery_treeview/ajax-loader.gif) 0 0 no-repeat;
|
65
|
+
height: 16px;
|
66
|
+
width: 16px;
|
67
|
+
display: block;
|
68
|
+
}
|
69
|
+
|
70
|
+
.filetree li { padding: 3px 0 2px 16px; }
|
71
|
+
.filetree span.folder, .filetree span.file { padding: 1px 0 1px 16px; display: block; }
|
72
|
+
.filetree span.folder { background: url(/images/jquery_treeview/folder.gif) 0 0 no-repeat; }
|
73
|
+
.filetree li.expandable span.folder { background: url(/images/jquery_treeview/folder-closed.gif) 0 0 no-repeat; }
|
74
|
+
.filetree span.file { background: url(/images/jquery_treeview/file.gif) 0 0 no-repeat; }
|
@@ -0,0 +1,256 @@
|
|
1
|
+
/*
|
2
|
+
* Treeview 1.5pre - jQuery plugin to hide and show branches of a tree
|
3
|
+
*
|
4
|
+
* http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
|
5
|
+
* http://docs.jquery.com/Plugins/Treeview
|
6
|
+
*
|
7
|
+
* Copyright (c) 2007 Jörn Zaefferer
|
8
|
+
*
|
9
|
+
* Dual licensed under the MIT and GPL licenses:
|
10
|
+
* http://www.opensource.org/licenses/mit-license.php
|
11
|
+
* http://www.gnu.org/licenses/gpl.html
|
12
|
+
*
|
13
|
+
* Revision: $Id: jquery.treeview.js 5759 2008-07-01 07:50:28Z joern.zaefferer $
|
14
|
+
*
|
15
|
+
*/
|
16
|
+
|
17
|
+
;(function($) {
|
18
|
+
|
19
|
+
// TODO rewrite as a widget, removing all the extra plugins
|
20
|
+
$.extend($.fn, {
|
21
|
+
swapClass: function(c1, c2) {
|
22
|
+
var c1Elements = this.filter('.' + c1);
|
23
|
+
this.filter('.' + c2).removeClass(c2).addClass(c1);
|
24
|
+
c1Elements.removeClass(c1).addClass(c2);
|
25
|
+
return this;
|
26
|
+
},
|
27
|
+
replaceClass: function(c1, c2) {
|
28
|
+
return this.filter('.' + c1).removeClass(c1).addClass(c2).end();
|
29
|
+
},
|
30
|
+
hoverClass: function(className) {
|
31
|
+
className = className || "hover";
|
32
|
+
return this.hover(function() {
|
33
|
+
$(this).addClass(className);
|
34
|
+
}, function() {
|
35
|
+
$(this).removeClass(className);
|
36
|
+
});
|
37
|
+
},
|
38
|
+
heightToggle: function(animated, callback) {
|
39
|
+
animated ?
|
40
|
+
this.animate({ height: "toggle" }, animated, callback) :
|
41
|
+
this.each(function(){
|
42
|
+
jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
|
43
|
+
if(callback)
|
44
|
+
callback.apply(this, arguments);
|
45
|
+
});
|
46
|
+
},
|
47
|
+
heightHide: function(animated, callback) {
|
48
|
+
if (animated) {
|
49
|
+
this.animate({ height: "hide" }, animated, callback);
|
50
|
+
} else {
|
51
|
+
this.hide();
|
52
|
+
if (callback)
|
53
|
+
this.each(callback);
|
54
|
+
}
|
55
|
+
},
|
56
|
+
prepareBranches: function(settings) {
|
57
|
+
if (!settings.prerendered) {
|
58
|
+
// mark last tree items
|
59
|
+
this.filter(":last-child:not(ul)").addClass(CLASSES.last);
|
60
|
+
// collapse whole tree, or only those marked as closed, anyway except those marked as open
|
61
|
+
this.filter((settings.collapsed ? "" : "." + CLASSES.closed) + ":not(." + CLASSES.open + ")").find(">ul").hide();
|
62
|
+
}
|
63
|
+
// return all items with sublists
|
64
|
+
return this.filter(":has(>ul)");
|
65
|
+
},
|
66
|
+
applyClasses: function(settings, toggler) {
|
67
|
+
// TODO use event delegation
|
68
|
+
this.filter(":has(>ul):not(:has(>a))").find(">span").unbind("click.treeview").bind("click.treeview", function(event) {
|
69
|
+
// don't handle click events on children, eg. checkboxes
|
70
|
+
if ( this == event.target )
|
71
|
+
toggler.apply($(this).next());
|
72
|
+
}).add( $("a", this) ).hoverClass();
|
73
|
+
|
74
|
+
if (!settings.prerendered) {
|
75
|
+
// handle closed ones first
|
76
|
+
this.filter(":has(>ul:hidden)")
|
77
|
+
.addClass(CLASSES.expandable)
|
78
|
+
.replaceClass(CLASSES.last, CLASSES.lastExpandable);
|
79
|
+
|
80
|
+
// handle open ones
|
81
|
+
this.not(":has(>ul:hidden)")
|
82
|
+
.addClass(CLASSES.collapsable)
|
83
|
+
.replaceClass(CLASSES.last, CLASSES.lastCollapsable);
|
84
|
+
|
85
|
+
// create hitarea if not present
|
86
|
+
var hitarea = this.find("div." + CLASSES.hitarea);
|
87
|
+
if (!hitarea.length)
|
88
|
+
hitarea = this.prepend("<div class=\"" + CLASSES.hitarea + "\"/>").find("div." + CLASSES.hitarea);
|
89
|
+
hitarea.removeClass().addClass(CLASSES.hitarea).each(function() {
|
90
|
+
var classes = "";
|
91
|
+
$.each($(this).parent().attr("class").split(" "), function() {
|
92
|
+
classes += this + "-hitarea ";
|
93
|
+
});
|
94
|
+
$(this).addClass( classes );
|
95
|
+
})
|
96
|
+
}
|
97
|
+
|
98
|
+
// apply event to hitarea
|
99
|
+
this.find("div." + CLASSES.hitarea).click( toggler );
|
100
|
+
},
|
101
|
+
treeview: function(settings) {
|
102
|
+
|
103
|
+
settings = $.extend({
|
104
|
+
cookieId: "treeview"
|
105
|
+
}, settings);
|
106
|
+
|
107
|
+
if ( settings.toggle ) {
|
108
|
+
var callback = settings.toggle;
|
109
|
+
settings.toggle = function() {
|
110
|
+
return callback.apply($(this).parent()[0], arguments);
|
111
|
+
};
|
112
|
+
}
|
113
|
+
|
114
|
+
// factory for treecontroller
|
115
|
+
function treeController(tree, control) {
|
116
|
+
// factory for click handlers
|
117
|
+
function handler(filter) {
|
118
|
+
return function() {
|
119
|
+
// reuse toggle event handler, applying the elements to toggle
|
120
|
+
// start searching for all hitareas
|
121
|
+
toggler.apply( $("div." + CLASSES.hitarea, tree).filter(function() {
|
122
|
+
// for plain toggle, no filter is provided, otherwise we need to check the parent element
|
123
|
+
return filter ? $(this).parent("." + filter).length : true;
|
124
|
+
}) );
|
125
|
+
return false;
|
126
|
+
};
|
127
|
+
}
|
128
|
+
// click on first element to collapse tree
|
129
|
+
$("a:eq(0)", control).click( handler(CLASSES.collapsable) );
|
130
|
+
// click on second to expand tree
|
131
|
+
$("a:eq(1)", control).click( handler(CLASSES.expandable) );
|
132
|
+
// click on third to toggle tree
|
133
|
+
$("a:eq(2)", control).click( handler() );
|
134
|
+
}
|
135
|
+
|
136
|
+
// handle toggle event
|
137
|
+
function toggler() {
|
138
|
+
$(this)
|
139
|
+
.parent()
|
140
|
+
// swap classes for hitarea
|
141
|
+
.find(">.hitarea")
|
142
|
+
.swapClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
|
143
|
+
.swapClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea )
|
144
|
+
.end()
|
145
|
+
// swap classes for parent li
|
146
|
+
.swapClass( CLASSES.collapsable, CLASSES.expandable )
|
147
|
+
.swapClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
|
148
|
+
// find child lists
|
149
|
+
.find( ">ul" )
|
150
|
+
// toggle them
|
151
|
+
.heightToggle( settings.animated, settings.toggle );
|
152
|
+
if ( settings.unique ) {
|
153
|
+
$(this).parent()
|
154
|
+
.siblings()
|
155
|
+
// swap classes for hitarea
|
156
|
+
.find(">.hitarea")
|
157
|
+
.replaceClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
|
158
|
+
.replaceClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea )
|
159
|
+
.end()
|
160
|
+
.replaceClass( CLASSES.collapsable, CLASSES.expandable )
|
161
|
+
.replaceClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
|
162
|
+
.find( ">ul" )
|
163
|
+
.heightHide( settings.animated, settings.toggle );
|
164
|
+
}
|
165
|
+
}
|
166
|
+
this.data("toggler", toggler);
|
167
|
+
|
168
|
+
function serialize() {
|
169
|
+
function binary(arg) {
|
170
|
+
return arg ? 1 : 0;
|
171
|
+
}
|
172
|
+
var data = [];
|
173
|
+
branches.each(function(i, e) {
|
174
|
+
data[i] = $(e).is(":has(>ul:visible)") ? 1 : 0;
|
175
|
+
});
|
176
|
+
$.cookie(settings.cookieId, data.join(""), settings.cookieOptions );
|
177
|
+
}
|
178
|
+
|
179
|
+
function deserialize() {
|
180
|
+
var stored = $.cookie(settings.cookieId);
|
181
|
+
if ( stored ) {
|
182
|
+
var data = stored.split("");
|
183
|
+
branches.each(function(i, e) {
|
184
|
+
$(e).find(">ul")[ parseInt(data[i]) ? "show" : "hide" ]();
|
185
|
+
});
|
186
|
+
}
|
187
|
+
}
|
188
|
+
|
189
|
+
// add treeview class to activate styles
|
190
|
+
this.addClass("treeview");
|
191
|
+
|
192
|
+
// prepare branches and find all tree items with child lists
|
193
|
+
var branches = this.find("li").prepareBranches(settings);
|
194
|
+
|
195
|
+
switch(settings.persist) {
|
196
|
+
case "cookie":
|
197
|
+
var toggleCallback = settings.toggle;
|
198
|
+
settings.toggle = function() {
|
199
|
+
serialize();
|
200
|
+
if (toggleCallback) {
|
201
|
+
toggleCallback.apply(this, arguments);
|
202
|
+
}
|
203
|
+
};
|
204
|
+
deserialize();
|
205
|
+
break;
|
206
|
+
case "location":
|
207
|
+
var current = this.find("a").filter(function() {
|
208
|
+
return this.href.toLowerCase() == location.href.toLowerCase();
|
209
|
+
});
|
210
|
+
if ( current.length ) {
|
211
|
+
// TODO update the open/closed classes
|
212
|
+
var items = current.addClass("selected").parents("ul, li").add( current.next() ).show();
|
213
|
+
if (settings.prerendered) {
|
214
|
+
// if prerendered is on, replicate the basic class swapping
|
215
|
+
items.filter("li")
|
216
|
+
.swapClass( CLASSES.collapsable, CLASSES.expandable )
|
217
|
+
.swapClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
|
218
|
+
.find(">.hitarea")
|
219
|
+
.swapClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
|
220
|
+
.swapClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea );
|
221
|
+
}
|
222
|
+
}
|
223
|
+
break;
|
224
|
+
}
|
225
|
+
|
226
|
+
branches.applyClasses(settings, toggler);
|
227
|
+
|
228
|
+
// if control option is set, create the treecontroller and show it
|
229
|
+
if ( settings.control ) {
|
230
|
+
treeController(this, settings.control);
|
231
|
+
$(settings.control).show();
|
232
|
+
}
|
233
|
+
|
234
|
+
return this;
|
235
|
+
}
|
236
|
+
});
|
237
|
+
|
238
|
+
// classes used by the plugin
|
239
|
+
// need to be styled via external stylesheet, see first example
|
240
|
+
$.treeview = {};
|
241
|
+
var CLASSES = ($.treeview.classes = {
|
242
|
+
open: "open",
|
243
|
+
closed: "closed",
|
244
|
+
expandable: "expandable",
|
245
|
+
expandableHitarea: "expandable-hitarea",
|
246
|
+
lastExpandableHitarea: "lastExpandable-hitarea",
|
247
|
+
collapsable: "collapsable",
|
248
|
+
collapsableHitarea: "collapsable-hitarea",
|
249
|
+
lastCollapsableHitarea: "lastCollapsable-hitarea",
|
250
|
+
lastCollapsable: "lastCollapsable",
|
251
|
+
lastExpandable: "lastExpandable",
|
252
|
+
last: "last",
|
253
|
+
hitarea: "hitarea"
|
254
|
+
});
|
255
|
+
|
256
|
+
})(jQuery);
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<% resources.each do |key, value| %>
|
2
|
+
|
3
|
+
<%
|
4
|
+
klass = key.typus_constantize
|
5
|
+
resource = "/admin/#{klass.to_resource}"
|
6
|
+
%>
|
7
|
+
|
8
|
+
<%= link_to :controller => resource, :action => "index" do %>
|
9
|
+
<h3><%= klass.model_name.human.pluralize %></h3>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<% if @resource.model_name.eql?(key) %>
|
13
|
+
<ul>
|
14
|
+
<% value.each do |v| %>
|
15
|
+
<li><%= v %></li>
|
16
|
+
<% end %>
|
17
|
+
</ul>
|
18
|
+
<%= treeview %>
|
19
|
+
<% end %>
|
20
|
+
|
21
|
+
<% end %>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class TypusTreeviewGenerator < Rails::Generators::Base
|
2
|
+
class << self
|
3
|
+
def source_root
|
4
|
+
File.expand_path("../templates", __FILE__)
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
def copy_views
|
9
|
+
copy_file "views/sidebar.html.erb", "app/views/admin/helpers/sidebar/_sidebar.html.erb"
|
10
|
+
end
|
11
|
+
|
12
|
+
def copy_assets
|
13
|
+
copy_file "assets/jquery.treeview.js", "public/javascripts/jquery.treeview.js"
|
14
|
+
copy_file "assets/jquery.treeview.css", "public/stylesheets/jquery.treeview.css"
|
15
|
+
directory "assets/images", "public/images/jquery_treeview"
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module TypusTreeview
|
2
|
+
class Engine < Rails::Engine
|
3
|
+
initializer 'typus_treeview.helper' do |app|
|
4
|
+
ActionView::Base.send :include, TypusTreeviewHelper
|
5
|
+
end
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
module Typus
|
10
|
+
class << self
|
11
|
+
def treeview= val
|
12
|
+
@treeview = val
|
13
|
+
end
|
14
|
+
|
15
|
+
def treeview
|
16
|
+
@treeview || {}
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "typus_treeview/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "typus_treeview"
|
7
|
+
s.version = TypusTreeview::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Nick Recobra"]
|
10
|
+
s.email = ["oruenu@gmail.com"]
|
11
|
+
s.homepage = "https://github.com/oruen/typus_treeview"
|
12
|
+
s.summary = %q{Typus extension implementing Treeview.}
|
13
|
+
s.description = %q{Implements treeview via jquery.treeview for models using acts_as_tree.}
|
14
|
+
|
15
|
+
s.rubyforge_project = "typus_treeview"
|
16
|
+
s.add_dependency 'typus', '>= 3.0.4'
|
17
|
+
s.files = `git ls-files`.split("\n")
|
18
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
|
+
s.require_paths = ["lib"]
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: typus_treeview
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.1.0
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Nick Recobra
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2011-06-24 00:00:00 +04:00
|
14
|
+
default_executable:
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: typus
|
18
|
+
prerelease: false
|
19
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
|
+
none: false
|
21
|
+
requirements:
|
22
|
+
- - ">="
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: 3.0.4
|
25
|
+
type: :runtime
|
26
|
+
version_requirements: *id001
|
27
|
+
description: Implements treeview via jquery.treeview for models using acts_as_tree.
|
28
|
+
email:
|
29
|
+
- oruenu@gmail.com
|
30
|
+
executables: []
|
31
|
+
|
32
|
+
extensions: []
|
33
|
+
|
34
|
+
extra_rdoc_files: []
|
35
|
+
|
36
|
+
files:
|
37
|
+
- .gitignore
|
38
|
+
- Gemfile
|
39
|
+
- Rakefile
|
40
|
+
- app/helpers/typus_treeview_helper.rb
|
41
|
+
- lib/generators/templates/assets/images/ajax-loader.gif
|
42
|
+
- lib/generators/templates/assets/images/file.gif
|
43
|
+
- lib/generators/templates/assets/images/folder-closed.gif
|
44
|
+
- lib/generators/templates/assets/images/folder.gif
|
45
|
+
- lib/generators/templates/assets/images/minus.gif
|
46
|
+
- lib/generators/templates/assets/images/plus.gif
|
47
|
+
- lib/generators/templates/assets/images/treeview-black-line.gif
|
48
|
+
- lib/generators/templates/assets/images/treeview-black.gif
|
49
|
+
- lib/generators/templates/assets/images/treeview-default-line.gif
|
50
|
+
- lib/generators/templates/assets/images/treeview-default.gif
|
51
|
+
- lib/generators/templates/assets/images/treeview-famfamfam-line.gif
|
52
|
+
- lib/generators/templates/assets/images/treeview-famfamfam.gif
|
53
|
+
- lib/generators/templates/assets/images/treeview-gray-line.gif
|
54
|
+
- lib/generators/templates/assets/images/treeview-gray.gif
|
55
|
+
- lib/generators/templates/assets/images/treeview-red-line.gif
|
56
|
+
- lib/generators/templates/assets/images/treeview-red.gif
|
57
|
+
- lib/generators/templates/assets/jquery.treeview.css
|
58
|
+
- lib/generators/templates/assets/jquery.treeview.js
|
59
|
+
- lib/generators/templates/views/sidebar.html.erb
|
60
|
+
- lib/generators/typus_treeview_generator.rb
|
61
|
+
- lib/typus_treeview.rb
|
62
|
+
- lib/typus_treeview/version.rb
|
63
|
+
- typus_treeview.gemspec
|
64
|
+
has_rdoc: true
|
65
|
+
homepage: https://github.com/oruen/typus_treeview
|
66
|
+
licenses: []
|
67
|
+
|
68
|
+
post_install_message:
|
69
|
+
rdoc_options: []
|
70
|
+
|
71
|
+
require_paths:
|
72
|
+
- lib
|
73
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ">="
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: "0"
|
79
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
80
|
+
none: false
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: "0"
|
85
|
+
requirements: []
|
86
|
+
|
87
|
+
rubyforge_project: typus_treeview
|
88
|
+
rubygems_version: 1.5.2
|
89
|
+
signing_key:
|
90
|
+
specification_version: 3
|
91
|
+
summary: Typus extension implementing Treeview.
|
92
|
+
test_files: []
|
93
|
+
|