manifest-rails 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -21,4 +21,14 @@ $(function() {
21
21
  });
22
22
 
23
23
  $('a:not([data-remote]):not([data-behavior]):not([data-skip-pjax])').pjax('.app-content', { timeout: 10000 });
24
+
25
+ $('tbody tr').live('click', function() {
26
+ controller = $(this).parent().parent().attr('id').split(':').pop();
27
+ id = $(this).attr('id').split('_').pop();
28
+
29
+ $.pjax({
30
+ url: '/manifest/' + controller + '/' + id + '/edit',
31
+ container: '.app-content'
32
+ })
33
+ });
24
34
  })
@@ -26,6 +26,13 @@ tr:nth-child(even) {
26
26
  background: #fff;
27
27
  }
28
28
 
29
+ tbody tr:hover {
30
+ background: lighten($accent, 10);
31
+ background: $accent;
32
+ cursor: pointer;
33
+ color: white;
34
+ }
35
+
29
36
  tbody {
30
37
  border: 1px solid #ccc;
31
38
  border-top: none;
@@ -1,7 +1,7 @@
1
1
  <h2>Content Blocks</h2>
2
2
 
3
3
  <% if @content_blocks.count > 0 %>
4
- <table>
4
+ <table id='table:<%= controller_name %>'>
5
5
  <thead>
6
6
  <th>Title</th>
7
7
  <th>Page</th>
@@ -12,8 +12,8 @@
12
12
  <tbody>
13
13
  <% @content_blocks.each do |c| %>
14
14
  <%= content_tag_for(:tr, c) do %>
15
- <td><%= link_to c.title, edit_manifest_content_block_path(c) %></td>
16
- <td><%= link_to c.page.title, manifest_page_path(c.page) %></td>
15
+ <td><%= c.title %></td>
16
+ <td><%= c.page.title %></td>
17
17
  <td><%= c.created_at.to_s(:short) %></td>
18
18
  <td><%= c.updated_at.to_s(:short) %></td>
19
19
  <% end %>
@@ -3,7 +3,7 @@
3
3
  <h3>Content Blocks</h3>
4
4
 
5
5
  <% if @page.content_blocks.count > 0 %>
6
- <table>
6
+ <table id='table:content_blocks'>
7
7
  <thead>
8
8
  <th>Title</th>
9
9
  <th>Created</th>
@@ -13,7 +13,7 @@
13
13
  <tbody>
14
14
  <% @page.content_blocks.each do |c| %>
15
15
  <%= content_tag_for(:tr, c) do %>
16
- <td><%= link_to c.title, edit_manifest_content_block_path(c) %></td>
16
+ <td><%= c.title %></td>
17
17
  <td><%= c.created_at.to_s(:short) %></td>
18
18
  <td><%= c.updated_at.to_s(:short) %></td>
19
19
  <% end %>
@@ -19,7 +19,7 @@ class Manifest::<%= ActiveSupport::Inflector.pluralize(name) %>Controller < Mani
19
19
  @<%= name.underscore %> = <%= name %>.new(params[:<%= name.underscore %>])
20
20
 
21
21
  if @<%= name.underscore %>.save
22
- redirect_to manifest_<%= plural_name.underscore %>_path(@<%= name.underscore %>)
22
+ redirect_to manifest_<%= plural_name.underscore %>_path
23
23
  else
24
24
  render 'new'
25
25
  end
@@ -1,7 +1,7 @@
1
1
  <h2><%= table_name %></h2>
2
2
 
3
3
  <%% if @<%= table_name %>.count > 0 %>
4
- <table>
4
+ <table id='table:<%%= controller_name %>'>
5
5
  <thead>
6
6
  <% attributes.each do |attribute| -%>
7
7
  <th><%= attribute.name.humanize %></th>
@@ -1,3 +1,3 @@
1
1
  module Manifest
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: manifest-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-03-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70349375304740 !ruby/object:Gem::Requirement
16
+ requirement: &70156223187960 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.2.2
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70349375304740
24
+ version_requirements: *70156223187960
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: friendly_id
27
- requirement: &70349375302020 !ruby/object:Gem::Requirement
27
+ requirement: &70156223184920 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70349375302020
35
+ version_requirements: *70156223184920
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: sass-rails
38
- requirement: &70349375296940 !ruby/object:Gem::Requirement
38
+ requirement: &70156223180700 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 3.2.3
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70349375296940
46
+ version_requirements: *70156223180700
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: compass-rails
49
- requirement: &70349375289660 !ruby/object:Gem::Requirement
49
+ requirement: &70156223178900 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70349375289660
57
+ version_requirements: *70156223178900
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: bcrypt-ruby
60
- requirement: &70349375287360 !ruby/object:Gem::Requirement
60
+ requirement: &70156223174360 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 3.0.0
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70349375287360
68
+ version_requirements: *70156223174360
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: tinymce-rails
71
- requirement: &70349375285060 !ruby/object:Gem::Requirement
71
+ requirement: &70156223171280 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *70349375285060
79
+ version_requirements: *70156223171280
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: sqlite3
82
- requirement: &70349375278380 !ruby/object:Gem::Requirement
82
+ requirement: &70156223169580 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70349375278380
90
+ version_requirements: *70156223169580
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: rspec-rails
93
- requirement: &70349375276620 !ruby/object:Gem::Requirement
93
+ requirement: &70156223165620 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *70349375276620
101
+ version_requirements: *70156223165620
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: factory_girl_rails
104
- requirement: &70349375275600 !ruby/object:Gem::Requirement
104
+ requirement: &70156223162060 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '0'
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *70349375275600
112
+ version_requirements: *70156223162060
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: yard
115
- requirement: &70349375274540 !ruby/object:Gem::Requirement
115
+ requirement: &70156223160760 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: '0'
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *70349375274540
123
+ version_requirements: *70156223160760
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: rake
126
- requirement: &70349375272960 !ruby/object:Gem::Requirement
126
+ requirement: &70156223159660 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ! '>='
@@ -131,7 +131,7 @@ dependencies:
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
- version_requirements: *70349375272960
134
+ version_requirements: *70156223159660
135
135
  description: Manifest allows for the creation of simple content management with support
136
136
  for easy custom data types. It attempts to preserve the Rails way of working where
137
137
  possible.
@@ -214,7 +214,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
214
214
  version: '0'
215
215
  segments:
216
216
  - 0
217
- hash: 4330576662095754274
217
+ hash: 57213454251924948
218
218
  required_rubygems_version: !ruby/object:Gem::Requirement
219
219
  none: false
220
220
  requirements:
@@ -223,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
223
  version: '0'
224
224
  segments:
225
225
  - 0
226
- hash: 4330576662095754274
226
+ hash: 57213454251924948
227
227
  requirements: []
228
228
  rubyforge_project:
229
229
  rubygems_version: 1.8.17