refinerycms-portfolio 0.9.8.rc9 → 0.9.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,9 @@
1
- <% content_for :head do %>
1
+ <% if Refinery.version < '0.9.9' %>
2
2
  <%= stylesheet_link_tag 'portfolio' %>
3
3
  <%= javascript_include_tag 'portfolio' %>
4
+ <% else %>
5
+ <% content_for :javascripts, javascript_include_tag('portfolio') %>
6
+ <% content_for :stylesheets, stylesheet_link_tag('portfolio') %>
4
7
  <% end %>
5
8
 
6
9
  <%= form_for([:admin, @portfolio_entry]) do |f| %>
@@ -2,7 +2,7 @@ User.find(:all).each do |user|
2
2
  user.plugins.create({
3
3
  :name => "portfolio",
4
4
  :position => (user.plugins.maximum(:position) || -1) +1
5
- }) unless user.plugins.find_by_name('portfolio').any?
5
+ }) unless user.plugins.find_by_name('portfolio').present?
6
6
  end
7
7
 
8
8
  unless Page.find_by_link_url('/portfolio').present?
@@ -1,7 +1,7 @@
1
1
  module Refinery
2
2
  module Portfolio
3
3
  def self.version
4
- %q{0.9.8.rc9}
4
+ %q{0.9.9}
5
5
  end
6
6
  end
7
7
  end
@@ -49,33 +49,26 @@ image_added = function(image) {
49
49
  new_list_item = (current_list_item = $('li.empty')).clone();
50
50
  image_id = $(image).attr('id').replace('image_', '');
51
51
  current_list_item.find('input:hidden').val(image_id);
52
- $.ajax({
53
- async: false,
54
- url: '/refinery/images/'+image_id+'/url',
55
- data: {size: '135x135#c'},
56
- success: function (result, status, xhr) {
57
- if (result.error) {
58
- if (console && console.log) {
59
- console.log("Something went wrong with the image insertion!");
60
- console.log(result);
61
- }
62
- } else {
63
- (img = $("<img />")).attr({
64
- title: $(image).attr('title')
65
- , alt: $(image).attr('alt')
66
- , src: result.url
67
- }).appendTo(current_list_item);
68
- }
69
- },
70
- error: function(xhr, txt, status) {
71
- if (console && console.log) {
72
- console.log("Something went wrong with the image insertion!");
73
- console.log(xhr);
74
- console.log(txt);
75
- console.log(status);
76
- }
77
- }
78
- });
52
+ if($('meta[refinerycms]').attr('refinerycms') >= '0.9.9') {
53
+ $("<img />").attr({
54
+ title: $(image).attr('title')
55
+ , alt: $(image).attr('alt')
56
+ , src: $(image).attr('data-grid') // use 'grid' size that is built into Refinery CMS (135x135#c).
57
+ }).appendTo(current_list_item);
58
+ } else {
59
+ $.ajax({
60
+ async: false,
61
+ url: '/refinery/images/'+image_id+'/url',
62
+ data: {size: '135x135#c'},
63
+ success: function (result, status, xhr) {
64
+ (img = $("<img />")).attr({
65
+ title: $(image).attr('title')
66
+ , alt: $(image).attr('alt')
67
+ , src: result.url
68
+ }).appendTo(current_list_item);
69
+ }
70
+ });
71
+ }
79
72
 
80
73
  current_list_item.attr('id', 'image_' + image_id).removeClass('empty');
81
74
 
data/readme.md CHANGED
@@ -2,13 +2,18 @@
2
2
 
3
3
  By: [Resolve Digital](http://www.resolvedigital.com)
4
4
 
5
+ ## Requirements
6
+
7
+ This engine requires RefineryCMS version >= 0.9.8 - if you want support for versions before this,
8
+ look at [the rails2-stable branch](https://github.com/resolve/refinerycms-portfolio/tree/rails2-stable).
9
+
5
10
  ## Gem Installation
6
11
 
7
12
  Ensure you have created your application's database before adding this engine (with ``rake db:setup``).
8
13
 
9
14
  Open your ``Gemfile`` and add this line to the bottom:
10
15
 
11
- gem 'refinerycms-portfolio', '~> 0.9.8.rc8'
16
+ gem 'refinerycms-portfolio', '~> 0.9.9'
12
17
 
13
18
  Now run ``bundle install`` and once bundler has installed the gem run:
14
19
 
metadata CHANGED
@@ -1,14 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinerycms-portfolio
3
3
  version: !ruby/object:Gem::Version
4
- hash: 977940526
5
- prerelease: true
4
+ prerelease: false
6
5
  segments:
7
6
  - 0
8
7
  - 9
9
- - 8
10
- - rc9
11
- version: 0.9.8.rc9
8
+ - 9
9
+ version: 0.9.9
12
10
  platform: ruby
13
11
  authors:
14
12
  - Resolve Digital
@@ -16,7 +14,7 @@ autorequire:
16
14
  bindir: bin
17
15
  cert_chain: []
18
16
 
19
- date: 2010-11-02 00:00:00 +13:00
17
+ date: 2010-11-17 00:00:00 +13:00
20
18
  default_executable:
21
19
  dependencies:
22
20
  - !ruby/object:Gem::Dependency
@@ -27,7 +25,6 @@ dependencies:
27
25
  requirements:
28
26
  - - ">="
29
27
  - !ruby/object:Gem::Version
30
- hash: 43
31
28
  segments:
32
29
  - 0
33
30
  - 9
@@ -90,21 +87,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
90
87
  requirements:
91
88
  - - ">="
92
89
  - !ruby/object:Gem::Version
93
- hash: 3
94
90
  segments:
95
91
  - 0
96
92
  version: "0"
97
93
  required_rubygems_version: !ruby/object:Gem::Requirement
98
94
  none: false
99
95
  requirements:
100
- - - ">"
96
+ - - ">="
101
97
  - !ruby/object:Gem::Version
102
- hash: 25
103
98
  segments:
104
- - 1
105
- - 3
106
- - 1
107
- version: 1.3.1
99
+ - 0
100
+ version: "0"
108
101
  requirements: []
109
102
 
110
103
  rubyforge_project: