activeadmin-selleo-cms 0.0.40 → 0.0.41

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,7 +11,7 @@ ActiveAdmin.register ActiveadminSelleoCms::Attachment, as: 'Attachment' do
11
11
  private
12
12
 
13
13
  def set_styles
14
- params[:image][:cover] = params[:image].delete :cover
14
+ params[:attachment][:cover] = params[:attachment].delete :cover
15
15
  end
16
16
 
17
17
  public
@@ -57,7 +57,6 @@ function delete_related_item(related_item_id) {
57
57
  }
58
58
 
59
59
  function update_positions(pagesArray) {
60
- $('.update-positions-button').attr('disabled', true).attr('value', 'Saving...')
61
60
  $.ajax({
62
61
  url: '/admin/pages/update_positions.js',
63
62
  data: { 'page_ids': pagesArray },
@@ -14,7 +14,7 @@ module ActiveadminSelleoCms
14
14
  :default_style => :normal
15
15
 
16
16
  validates_attachment_size :cover, :less_than => 10.megabytes
17
- validates_presence_of :assetable
17
+ #validates_presence_of :assetable
18
18
 
19
19
  def url(format=nil)
20
20
  data.url(format)
@@ -3,4 +3,10 @@
3
3
  %li.ui-state-default{'data-id' => page.id}
4
4
  %span.ui-icon.ui-icon-arrowthick-2-n-s
5
5
  = page
6
- = button_to_function "Save", "update_positions( $('.sortable').sortable( 'toArray', { attribute: 'data-id' } ))", class: 'update-positions-button'
6
+
7
+ :javascript
8
+ $('.sortable').sortable({
9
+ update: function( event, ui ) {
10
+ update_positions( $('.sortable').sortable( 'toArray', { attribute: 'data-id' } ));
11
+ }
12
+ });
@@ -1,5 +1,5 @@
1
1
  <% if ActiveadminSelleoCms::Page.update_positions(params[:page_ids]) %>
2
- alert('Changes saved');
2
+ $('#wrapper').effect('highlight');
3
3
  <% else %>
4
4
  alert('An error has occured. Changes are NOT saved');
5
5
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module ActiveadminSelleoCms
2
- VERSION = "0.0.40"
2
+ VERSION = "0.0.41"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin-selleo-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.40
4
+ version: 0.0.41
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-14 00:00:00.000000000 Z
12
+ date: 2013-06-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails