fullstack-cms 0.2.32.fix → 0.2.33

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -14,6 +14,7 @@ gem "awesome_nested_set"
14
14
  gem "rails_i18n_gettext"
15
15
  gem "sitemap", :git => "git://github.com/viseztrance/rails-sitemap.git"
16
16
  gem "whenever"
17
+ gem 'rinku', '~> 1.2.2', :require => 'rails_rinku'
17
18
 
18
19
  gem 'bluecloth'
19
20
  # gem 'i18n_fields'
data/Gemfile.lock CHANGED
@@ -246,6 +246,7 @@ GEM
246
246
  remotipart (1.0.2)
247
247
  resource-presentation-helpers (0.1.1)
248
248
  rails
249
+ rinku (1.2.2)
249
250
  sprockets (2.1.3)
250
251
  hike (~> 1.2)
251
252
  rack (~> 1.0)
@@ -279,5 +280,6 @@ DEPENDENCIES
279
280
  fullstack-admin (~> 0.1.53)
280
281
  jeweler
281
282
  rails_i18n_gettext
283
+ rinku (~> 1.2.2)
282
284
  sitemap!
283
285
  whenever
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.32.fix
1
+ 0.2.33
@@ -32,7 +32,11 @@ class Admin::PhotosController < Admin::BaseController
32
32
  def update
33
33
  @photo.attributes = params[:photo]
34
34
  @photo.save
35
- respond_with(@photo)
35
+ if request.format == "json"
36
+ render :json => {:success => true}
37
+ else
38
+ respond_with(@photo)
39
+ end
36
40
  end
37
41
 
38
42
  def destroy
data/app/models/photo.rb CHANGED
@@ -1,4 +1,6 @@
1
1
  class Photo < ActiveRecord::Base
2
+ include Positionable
3
+ default_scope order(:position)
2
4
 
3
5
  validates_attachment :image, :presence => true,
4
6
  :size => { :in => 0..2.megabytes }
@@ -1,8 +1,10 @@
1
- <li class="span2">
1
+ <li class="span2" data-id="<%= photo.id %>">
2
2
  <div class="thumbnail">
3
- <%= image_tag photo.url(:thumb), :style => "height: 141px", :'data-zoom-url' => photo.url %>
3
+ <%= image_tag photo.url(:thumb), :style => "height: 141px" %>
4
4
  <div class="thumbnail-toolbar">
5
- <%= btn t('fullstack.admin.edit', :default => "Edit"), edit_admin_photo_path(photo), :'data-target' => '#edit-photo-modal', :'data-toggle' => 'modal' %>
5
+ <%= btn '<i class="icon-zoom-in"></i>'.html_safe, photo.url, :rel => "facebox", :'data-tip' => t('fullstack.admin.preview', :default => "Preview") %>
6
+
7
+ <%= btn '<i class="icon-edit"></i>'.html_safe, edit_admin_photo_path(photo), :'data-target' => '#edit-photo-modal', :'data-toggle' => 'modal', :"data-tip" => t('fullstack.admin.edit', :default => "Edit") %>
6
8
  <%= btn '', admin_photo_path(photo), :remote => true, :method => :delete, :confirm => t('fullstack.admin.are_you_sure', :default => "Are you sure?"), :icon => :trash, :type => :danger, :icon_color => :white, :'data-tip' => t('fullstack.admin.delete', :default => "Delete") %>
7
9
  </div>
8
10
  </div>
@@ -21,7 +21,7 @@
21
21
 
22
22
  <h4 class="page-header"><%= t('fullstack.admin.resources.photos', :default => "Photos") %> <span class="badge counter"><%= photographable.photos.size %></span></h4>
23
23
 
24
- <ul class="thumbnails">
24
+ <ul class="thumbnails sortable" id="photographable-thumbnails">
25
25
  <% photographable.photos.order('created_at DESC').each do |photo| %>
26
26
  <%= render :partial => "admin/photos/photo", :locals => {:photo => photo} %>
27
27
  <% end %>
@@ -30,4 +30,21 @@
30
30
  </div>
31
31
 
32
32
  <div class="modal fade" id="edit-photo-modal"></div>
33
- <% end %>
33
+ <% end %>
34
+
35
+ <% content_for :javascripts do -%>
36
+
37
+ <script type="text/javascript" charset="utf-8">
38
+ $(document).ready(function(){
39
+ $("#photographable-thumbnails").bind('sortstop', function(e, ui){
40
+ $(this).find("> li").each(function(i, e){
41
+ var photo_id = $(this).data('id');
42
+ var url = '<%= admin_photos_path %>/' + photo_id + ".json";
43
+ $.post(url, {_method: "put", photo: {position: i}});
44
+ });
45
+ });
46
+
47
+ });
48
+ </script>
49
+
50
+ <% end -%>
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "fullstack-cms"
8
- s.version = "0.2.32.fix"
8
+ s.version = "0.2.33"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["mcasimir"]
12
- s.date = "2012-10-03"
12
+ s.date = "2012-10-26"
13
13
  s.description = "CMS system built on fullstack"
14
14
  s.email = "maurizio.cas@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -143,6 +143,7 @@ Gem::Specification.new do |s|
143
143
  s.add_runtime_dependency(%q<rails_i18n_gettext>, [">= 0"])
144
144
  s.add_runtime_dependency(%q<sitemap>, [">= 0"])
145
145
  s.add_runtime_dependency(%q<whenever>, [">= 0"])
146
+ s.add_runtime_dependency(%q<rinku>, ["~> 1.2.2"])
146
147
  s.add_runtime_dependency(%q<bluecloth>, [">= 0"])
147
148
  s.add_development_dependency(%q<jeweler>, [">= 0"])
148
149
  else
@@ -154,6 +155,7 @@ Gem::Specification.new do |s|
154
155
  s.add_dependency(%q<rails_i18n_gettext>, [">= 0"])
155
156
  s.add_dependency(%q<sitemap>, [">= 0"])
156
157
  s.add_dependency(%q<whenever>, [">= 0"])
158
+ s.add_dependency(%q<rinku>, ["~> 1.2.2"])
157
159
  s.add_dependency(%q<bluecloth>, [">= 0"])
158
160
  s.add_dependency(%q<jeweler>, [">= 0"])
159
161
  end
@@ -166,6 +168,7 @@ Gem::Specification.new do |s|
166
168
  s.add_dependency(%q<rails_i18n_gettext>, [">= 0"])
167
169
  s.add_dependency(%q<sitemap>, [">= 0"])
168
170
  s.add_dependency(%q<whenever>, [">= 0"])
171
+ s.add_dependency(%q<rinku>, ["~> 1.2.2"])
169
172
  s.add_dependency(%q<bluecloth>, [">= 0"])
170
173
  s.add_dependency(%q<jeweler>, [">= 0"])
171
174
  end
@@ -41,6 +41,8 @@
41
41
  %>
42
42
  <% end %>
43
43
  <% end %>
44
+
45
+ <meta name="keywords" content="bed and breakfast bologna, bed and breakfast bologna ospedale maggiore, bed and breakfast bologna aereoporto, bed and breakfast bologna fiera" />
44
46
 
45
47
  <link rel="shortcut icon" href="/favicon.ico?v=2" />
46
48
  <%= stylesheet_link_tag 'site/site' %>
@@ -36,9 +36,7 @@ Fullstack::Cms.configure do |config|
36
36
  # = Settings =
37
37
  # ============
38
38
 
39
- config.setting(:google_analytics_code, :localized => false)
40
- config.setting(:facebook_app_id, :localized => false)
41
-
39
+ config.setting(:google_analytics_code, :localized => false)
42
40
  config.setting(:title)
43
41
  config.setting(:slogan)
44
42
  config.setting(:description, :kind => :text)
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fullstack-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.32.fix
5
- prerelease: 7
4
+ version: 0.2.33
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - mcasimir
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-03 00:00:00.000000000 Z
12
+ date: 2012-10-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fullstack-admin
@@ -139,6 +139,22 @@ dependencies:
139
139
  - - ! '>='
140
140
  - !ruby/object:Gem::Version
141
141
  version: '0'
142
+ - !ruby/object:Gem::Dependency
143
+ name: rinku
144
+ requirement: !ruby/object:Gem::Requirement
145
+ none: false
146
+ requirements:
147
+ - - ~>
148
+ - !ruby/object:Gem::Version
149
+ version: 1.2.2
150
+ type: :runtime
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ~>
156
+ - !ruby/object:Gem::Version
157
+ version: 1.2.2
142
158
  - !ruby/object:Gem::Dependency
143
159
  name: bluecloth
144
160
  requirement: !ruby/object:Gem::Requirement
@@ -299,6 +315,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
299
315
  - - ! '>='
300
316
  - !ruby/object:Gem::Version
301
317
  version: '0'
318
+ segments:
319
+ - 0
320
+ hash: 4051166054774937559
302
321
  required_rubygems_version: !ruby/object:Gem::Requirement
303
322
  none: false
304
323
  requirements:
@@ -307,7 +326,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
307
326
  version: '0'
308
327
  requirements: []
309
328
  rubyforge_project:
310
- rubygems_version: 1.8.25
329
+ rubygems_version: 1.8.24
311
330
  signing_key:
312
331
  specification_version: 3
313
332
  summary: CMS system built on fullstack