spree_essentials 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,25 @@
1
1
  Change Log
2
2
  ----------
3
3
 
4
+ **0.1.4 - 2011/6/10**
5
+
6
+ * Removed console.log from jquery.autodate.js
7
+ * Updated resource controller with better flash message handling
8
+ * Added faker.lorem.words to en.yml to prevent NoMethodError in integration tests
9
+
10
+
11
+ **0.1.3 - 2011/6/8**
12
+
13
+ * Added test in teardown to check for missing translations
14
+ * Removed some old bits of CMS code
15
+
16
+
17
+ **0.1.2 - 2011/6/7**
18
+
19
+ * Added missing translation
20
+ * Cleanup
21
+
22
+
4
23
  **0.1.1 - 2011/6/7**
5
24
 
6
25
  * Released 0.1.1
data/README.md CHANGED
@@ -161,6 +161,25 @@ To Do
161
161
  Change Log
162
162
  ----------
163
163
 
164
+ **0.1.4 - 2011/6/10**
165
+
166
+ * Removed console.log from jquery.autodate.js
167
+ * Updated resource controller with better flash message handling
168
+ * Added faker.lorem.words to en.yml to prevent NoMethodError in integration tests
169
+
170
+
171
+ **0.1.3 - 2011/6/8**
172
+
173
+ * Added test in teardown to check for missing translations
174
+ * Removed some old bits of CMS code
175
+
176
+
177
+ **0.1.2 - 2011/6/7**
178
+
179
+ * Added missing translation
180
+ * Cleanup
181
+
182
+
164
183
  **0.1.1 - 2011/6/7**
165
184
 
166
185
  * Released 0.1.1
@@ -6,6 +6,12 @@ class Admin::ResourceController < Admin::BaseController
6
6
  respond_to :html
7
7
  respond_to :js, :except => [:show, :index]
8
8
 
9
+ def flash_message_for(object, event_sym)
10
+ resource_desc = object.class.model_name.human
11
+ resource_desc += " \"#{object.name}\"" if object.respond_to?(:name)
12
+ I18n.t(event_sym, :resource => resource_desc)
13
+ end
14
+
9
15
  def new
10
16
  respond_with(@object) do |format|
11
17
  format.html { render :layout => !request.xhr? }
@@ -24,9 +30,7 @@ class Admin::ResourceController < Admin::BaseController
24
30
  invoke_callbacks(:update, :before)
25
31
  if @object.update_attributes(params[object_name])
26
32
  invoke_callbacks(:update, :after)
27
- resource_desc = translated_object_name
28
- resource_desc += " \"#{@object.name}\"" if @object.respond_to?(:name)
29
- flash[:notice] = I18n.t(:successfully_updated, :resource => resource_desc)
33
+ flash[:notice] = flash_message_for(@object, :successfully_updated)
30
34
  respond_with(@object) do |format|
31
35
  format.html { redirect_to location_after_save }
32
36
  format.js { render :layout => false }
@@ -41,9 +45,7 @@ class Admin::ResourceController < Admin::BaseController
41
45
  invoke_callbacks(:create, :before)
42
46
  if @object.save
43
47
  invoke_callbacks(:create, :after)
44
- resource_desc = translated_object_name
45
- resource_desc += " \"#{@object.name}\"" if @object.respond_to?(:name)
46
- flash[:notice] = I18n.t(:successfully_created, :resource => resource_desc)
48
+ flash[:notice] = flash_message_for(@object, :successfully_created)
47
49
  respond_with(@object) do |format|
48
50
  format.html { redirect_to location_after_save }
49
51
  format.js { render :layout => false }
@@ -58,9 +60,7 @@ class Admin::ResourceController < Admin::BaseController
58
60
  invoke_callbacks(:destroy, :before)
59
61
  if @object.destroy
60
62
  invoke_callbacks(:destroy, :after)
61
- resource_desc = translated_object_name
62
- resource_desc += " \"#{@object.name}\"" if @object.respond_to?(:name)
63
- flash[:notice] = I18n.t(:successfully_removed, :resource => resource_desc)
63
+ flash[:notice] = flash_message_for(@object, :successfully_removed)
64
64
  respond_with(@object) do |format|
65
65
  format.html { redirect_to collection_url }
66
66
  format.js { render :partial => "/admin/shared/destroy" }
@@ -106,10 +106,6 @@ class Admin::ResourceController < Admin::BaseController
106
106
  controller_name.classify.constantize
107
107
  end
108
108
 
109
- def translated_object_name
110
- I18n.t(object_name)
111
- end
112
-
113
109
  def object_name
114
110
  controller_name.singularize
115
111
  end
@@ -17,4 +17,4 @@ class Admin::UploadsController < Admin::ResourceController
17
17
  @collection = @search.paginate(:per_page => Spree::Config[:orders_per_page], :page => params[:page])
18
18
  end
19
19
 
20
- end
20
+ end
@@ -2,6 +2,10 @@
2
2
 
3
3
  <h3><%= t('.new_upload') %></h3>
4
4
 
5
+ <% if @upload.try(:errors).present? %>
6
+ <%= render 'shared/error_messages', :target => @upload %>
7
+ <% end %>
8
+
5
9
  <%= form_for([:admin, @upload], :html => { :multipart => true }) do |form| %>
6
10
  <table class="basic-table">
7
11
  <%= render "form", :form => form %>
@@ -35,3 +35,7 @@ en:
35
35
  index:
36
36
  listing_uploads: Listing Uploads
37
37
  new_upload: Upload a file
38
+
39
+ faker:
40
+ lorem:
41
+ words: [alias, consequatur, perferendis, voluptatem, accusantium, doloremque, aperiam, eaque, ipsa, quae, illo, inventore, veritatis, quasi, architecto, beatae, vitae, dicta, sunt, explicabo, aspernatur, aut, odit, aut, fugit, sed, quia, consequuntur, magni, dolores, eos, qui, ratione, voluptatem, sequi, nesciunt, neque, dolorem, ipsum, quia, dolor, sit, amet, consectetur, adipisci, velit, sed, quia, non, numquam, eius, modi, tempora, incidunt, ut, labore, et, dolore, magnam, aliquam, quaerat, voluptatem, ut, enim, ad, minima, veniam, quis, nostrum, exercitationem, ullam, corporis, nemo, enim, ipsam, voluptatem, quia, voluptas, sit, suscipit, laboriosam, nisi, ut, aliquid, ex, ea, commodi, consequatur, quis, autem, vel, eum, iure, reprehenderit, qui, in, ea, voluptate, velit, esse, quam, nihil, molestiae, et, iusto, odio, dignissimos, ducimus, qui, blanditiis, praesentium, laudantium, totam, rem, voluptatum, deleniti, atque, corrupti, quos, dolores, et, quas, molestias, excepturi, sint, occaecati, cupiditate, non, provident, sed, ut, perspiciatis, unde, omnis, iste, natus, error, similique, sunt, in, culpa, qui, officia, deserunt, mollitia, animi, id, est, laborum, et, dolorum, fuga, et, harum, quidem, rerum, facilis, est, et, expedita, distinctio, nam, libero, tempore, cum, soluta, nobis, est, eligendi, optio, cumque, nihil, impedit, quo, porro, quisquam, est, qui, minus, id, quod, maxime, placeat, facere, possimus, omnis, voluptas, assumenda, est, omnis, dolor, repellendus, temporibus, autem, quibusdam, et, aut, consequatur, vel, illum, qui, dolorem, eum, fugiat, quo, voluptas, nulla, pariatur, accusamus, officiis, debitis, aut, rerum, necessitatibus, saepe, eveniet, ut, et, voluptates, repudiandae, sint, molestiae, non, recusandae, itaque, earum, rerum, tenetur, sapiente, delectus, reiciendis, voluptatibus, maiores, doloribus, asperiores, repellat]
@@ -1,3 +1,3 @@
1
1
  module SpreeEssentials
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -43,8 +43,6 @@
43
43
  }
44
44
  function parseDate() {
45
45
  var val = (input.val() || "").replace(/the|of|in|on/gi, '')
46
- console.log(val);
47
- console.log(Date.parse(val))
48
46
  return date = Date.parse(val);
49
47
  }
50
48
  function updateDisplay() {
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: spree_essentials
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.3
5
+ version: 0.1.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Spencer Steffen
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-08 00:00:00 -07:00
13
+ date: 2011-06-10 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -231,7 +231,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
231
231
  requirements:
232
232
  - - ">="
233
233
  - !ruby/object:Gem::Version
234
- hash: -2758525506888662486
234
+ hash: 3910544631989460612
235
235
  segments:
236
236
  - 0
237
237
  version: "0"
@@ -240,7 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
240
240
  requirements:
241
241
  - - ">="
242
242
  - !ruby/object:Gem::Version
243
- hash: -2758525506888662486
243
+ hash: 3910544631989460612
244
244
  segments:
245
245
  - 0
246
246
  version: "0"