ajax_scaffold_generator 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -20
- data/README +28 -28
- data/ajax_scaffold_generator.rb +123 -123
- data/templates/controller.rb +61 -61
- data/templates/form.rhtml +4 -4
- data/templates/functional_test.rb +88 -88
- data/templates/helper.rb +12 -12
- data/templates/layout.rhtml +15 -15
- data/templates/partial_item.rhtml +24 -24
- data/templates/script.js +425 -327
- data/templates/style.css +345 -324
- data/templates/view_edit.rhtml +1 -1
- data/templates/view_index.rhtml +1 -1
- data/templates/view_list.rhtml +57 -52
- data/templates/view_new.rhtml +2 -1
- metadata +5 -3
data/templates/view_list.rhtml
CHANGED
@@ -1,53 +1,58 @@
|
|
1
|
-
<div id="<%= singular_name %>-list-wrapper" class="list-wrapper">
|
2
|
-
<div id="<%= singular_name %>-list-header" class="list-header">
|
3
|
-
<h2><%= Inflector.titleize(plural_name) %></h2>
|
4
|
-
|
5
|
-
<div class="actions">
|
6
|
-
<%%= loading_indicator_tag '<%= singular_name %>', "new" %>
|
7
|
-
<%%= link_to_remote "Create New",
|
8
|
-
:url => { :controller => '<%= controller_name %>', :action => 'new' },
|
9
|
-
:loading => "AjaxScaffold.newOnLoading(request,'<%= singular_name %>');",
|
10
|
-
:success => "AjaxScaffold.newOnSuccess(request,'<%= singular_name %>');",
|
11
|
-
:failure => "AjaxScaffold.newOnFailure(request,'<%= singular_name %>');",
|
12
|
-
:complete => "AjaxScaffold.newOnComplete(request,'<%= singular_name %>');",
|
13
|
-
:class => "create" %>
|
14
|
-
|
15
|
-
</div>
|
16
|
-
|
17
|
-
</div>
|
18
|
-
<table id="<%= singular_name %>-list" class="list" cellpadding="0" cellspacing="0">
|
19
|
-
<thead>
|
20
|
-
<tr class="header">
|
21
|
-
<%% for column in <%= model_name %>.content_columns %>
|
22
|
-
<th><%%= column.human_name %></th>
|
23
|
-
<%% end %>
|
24
|
-
<th></th>
|
25
|
-
</tr>
|
26
|
-
</thead>
|
27
|
-
<tbody>
|
28
|
-
<tr id="<%= singular_name %>-error-message" class="error-message" style="display:none;">
|
29
|
-
<td colspan="<%%= num_columns - 1 %>">
|
30
|
-
<p>An error has occurred</p>
|
31
|
-
</td>
|
32
|
-
<td class="actions">
|
33
|
-
<%%= link_to_function "Close", "AjaxScaffold.hideError('<%= singular_name %>');" %>
|
34
|
-
</td>
|
35
|
-
</tr>
|
36
|
-
<tr id="<%= singular_name %>-empty-message" class="empty-message" <%%= " style=\"display:none;\" " if !@<%= plural_name %>.empty? %>>
|
37
|
-
<td colspan="<%%= num_columns %>">No Entries</td>
|
38
|
-
</tr>
|
39
|
-
</tbody>
|
40
|
-
<tbody id="<%= singular_name %>-list-body">
|
41
|
-
<%% if !@<%= plural_name %>.empty? %>
|
42
|
-
<%%= render :partial => '<%= singular_name %>', :collection => @<%= plural_name
|
43
|
-
<%% end %>
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
1
|
+
<div id="<%= singular_name %>-list-wrapper" class="list-wrapper">
|
2
|
+
<div id="<%= singular_name %>-list-header" class="list-header">
|
3
|
+
<h2><%= Inflector.titleize(plural_name) %></h2>
|
4
|
+
|
5
|
+
<div class="actions">
|
6
|
+
<%%= loading_indicator_tag '<%= singular_name %>', "new" %>
|
7
|
+
<%%= link_to_remote "Create New",
|
8
|
+
:url => { :controller => '<%= controller_name %>', :action => 'new' },
|
9
|
+
:loading => "AjaxScaffold.newOnLoading(request,'<%= singular_name %>');",
|
10
|
+
:success => "AjaxScaffold.newOnSuccess(request,'<%= singular_name %>');",
|
11
|
+
:failure => "AjaxScaffold.newOnFailure(request,'<%= singular_name %>');",
|
12
|
+
:complete => "AjaxScaffold.newOnComplete(request,'<%= singular_name %>');",
|
13
|
+
:class => "create" %>
|
14
|
+
|
15
|
+
</div>
|
16
|
+
|
17
|
+
</div>
|
18
|
+
<table id="<%= singular_name %>-list" class="list" cellpadding="0" cellspacing="0">
|
19
|
+
<thead>
|
20
|
+
<tr class="header">
|
21
|
+
<%% for column in <%= model_name %>.content_columns %>
|
22
|
+
<th><%%= column.human_name %></th>
|
23
|
+
<%% end %>
|
24
|
+
<th></th>
|
25
|
+
</tr>
|
26
|
+
</thead>
|
27
|
+
<tbody>
|
28
|
+
<tr id="<%= singular_name %>-error-message" class="error-message" style="display:none;">
|
29
|
+
<td colspan="<%%= num_columns - 1 %>">
|
30
|
+
<p>An error has occurred</p>
|
31
|
+
</td>
|
32
|
+
<td class="actions">
|
33
|
+
<%%= link_to_function "Close", "AjaxScaffold.hideError('<%= singular_name %>');" %>
|
34
|
+
</td>
|
35
|
+
</tr>
|
36
|
+
<tr id="<%= singular_name %>-empty-message" class="empty-message" <%%= " style=\"display:none;\" " if !@<%= plural_name %>.empty? %>>
|
37
|
+
<td colspan="<%%= num_columns %>">No Entries</td>
|
38
|
+
</tr>
|
39
|
+
</tbody>
|
40
|
+
<tbody id="<%= singular_name %>-list-body">
|
41
|
+
<%% if !@<%= plural_name %>.empty? %>
|
42
|
+
<%%= render :partial => '<%= singular_name %>', :collection => @<%= plural_name %>, :locals => { :hidden => false } %>
|
43
|
+
<%% end %>
|
44
|
+
<!-- Do not remove the following TR, it is needed to load up the even row color when enableHighlighting is turned on -->
|
45
|
+
<tr class="even ignore" style="display: none;">
|
46
|
+
<td colspan="<%%= num_columns %>"></td>
|
47
|
+
</tr>
|
48
|
+
</tbody>
|
49
|
+
</table>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
<script type="text/javascript">
|
53
|
+
TableBodyUtil.enableHighlighting(AjaxScaffold.getTableBodyElement('<%= singular_name %>'));
|
54
|
+
<%% if !@<%= plural_name %>.empty? %>
|
55
|
+
TableBodyUtil.paintStripes(AjaxScaffold.getTableBodyElement('<%= singular_name %>'));
|
56
|
+
<%% end %>
|
57
|
+
Rico.Corner.round('<%= singular_name %>-list-wrapper', {color: '#005CB8', bgColor: '#fff', compact: true});
|
53
58
|
</script>
|
data/templates/view_new.rhtml
CHANGED
@@ -4,7 +4,8 @@
|
|
4
4
|
:loading => "AjaxScaffold.createOnLoading(request,'<%= singular_name %>',#{@temp_id});",
|
5
5
|
:success => "AjaxScaffold.createOnSuccess(request,'<%= singular_name %>',#{@temp_id});",
|
6
6
|
:complete => "AjaxScaffold.createOnComplete(request,'<%= singular_name %>',#{@temp_id});",
|
7
|
-
:failure => "AjaxScaffold.createOnFailure(request,'<%= singular_name %>',#{@temp_id});"
|
7
|
+
:failure => "AjaxScaffold.createOnFailure(request,'<%= singular_name %>',#{@temp_id});",
|
8
|
+
:html => { :id => "create-<%= singular_name %>-#{@temp_id}-form" } %>
|
8
9
|
|
9
10
|
<h4>New <%= Inflector.titleize(singular_name) %></h4>
|
10
11
|
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.8.
|
2
|
+
rubygems_version: 0.8.11
|
3
3
|
specification_version: 1
|
4
4
|
name: ajax_scaffold_generator
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 2.
|
7
|
-
date: 2006-02-
|
6
|
+
version: 2.1.0
|
7
|
+
date: 2006-02-23 00:00:00 -05:00
|
8
8
|
summary: Ajax scaffold generator is a rails generator for ajaxified scaffolds
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -24,6 +24,8 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
|
|
24
24
|
version: 0.0.0
|
25
25
|
version:
|
26
26
|
platform: ruby
|
27
|
+
signing_key:
|
28
|
+
cert_chain:
|
27
29
|
authors: []
|
28
30
|
files:
|
29
31
|
- README
|