papermill 0.16.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.16.3
1
+ 1.0.0
@@ -36,7 +36,7 @@ class PapermillController < ApplicationController
36
36
  end
37
37
 
38
38
  def edit
39
- render :action => "edit", :layout => (params[:layout] || false)
39
+ render :action => "edit"
40
40
  end
41
41
 
42
42
  def create
@@ -13,5 +13,4 @@
13
13
  <% end %>
14
14
  <%= submit_tag t('papermill.save') %>
15
15
  <% end %>
16
- </form>
17
- <%= javascript_include_tag("http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js") if params[:with_jquery] %>
16
+ </form>
@@ -11,7 +11,7 @@ en:
11
11
  delete-confirmation: "Delete '{{resource}}'?"
12
12
  SWFUPLOAD_PENDING: "Pending..."
13
13
  SWFUPLOAD_LOADING: "Loading..."
14
- SWFUPLOAD_ERROR: "Something happened while loading" # + " <file_name> (<swfupload error message> [<error code>])"
14
+ SWFUPLOAD_ERROR: "File is too big, of unauthorized type, or an error occured on the server."
15
15
  file_type: "{{type.capitalize}} file"
16
16
  name: "Name"
17
17
  content_type: "Content-type"
@@ -44,7 +44,7 @@ fr:
44
44
  delete-confirmation: "Êtes-vous sûr de vouloir supprimer '{{resource}}' ?"
45
45
  SWFUPLOAD_PENDING: "En attente..."
46
46
  SWFUPLOAD_LOADING: "Chargement..."
47
- SWFUPLOAD_ERROR: "Une erreur est survenue pendant le chargement de"
47
+ SWFUPLOAD_ERROR: "Fichier trop gros, type de fichier non autorisé ou erreur serveur."
48
48
  file_type: "Fichier {{type}}"
49
49
  name: "Nom"
50
50
  content_type: "Content-type"
@@ -19,8 +19,8 @@ class PapermillAsset < ActiveRecord::Base
19
19
  default_scope :order => 'position'
20
20
 
21
21
  def Filedata=(data)
22
+ data.content_type = data.get_content_type # SWFUpload content-type fix
22
23
  self.file = data
23
- self.file_content_type = data.get_content_type
24
24
  end
25
25
 
26
26
  def Filename=(name)
@@ -90,7 +90,7 @@ class PapermillAsset < ActiveRecord::Base
90
90
  end
91
91
 
92
92
  def self.cleanup
93
- PapermillAsset.all(:conditions => ["id < 0 AND created_at < ?", DateTime.now.yesterday]).each &:destroy
93
+ self.all(:conditions => ["id < 0 AND created_at < ?", DateTime.now.yesterday]).each &:destroy
94
94
  end
95
95
 
96
96
  private
@@ -1,5 +1,5 @@
1
1
  popup = function(url) {
2
- window.open (url + "?with_jquery=true", "Papermill", config='height=580, width=870, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no')
2
+ window.open (url, "Papermill", config='height=580, width=870, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no')
3
3
  }
4
4
 
5
5
  close_popup = function(source) {
@@ -8,10 +8,7 @@ close_popup = function(source) {
8
8
 
9
9
 
10
10
  /*
11
- If you have a popup library, OVERRIDE popup and close_popup in your application.js
12
- You'll need jQuery loaded, so specify with_jquery=true if you load edit in an iframe or a true popup.
13
- You can specify a layout as well, with layout=application in your URL.
14
-
11
+ If you have a popup library, override popup and close_popup in your application.js
15
12
 
16
13
  * e.g. facebox :
17
14
 
@@ -31,7 +28,7 @@ close_popup = function(source) {
31
28
 
32
29
  popup = function(url) {
33
30
  Shadowbox.open({
34
- content: url + "?with_jquery=true",
31
+ content: url-,
35
32
  player: "iframe",
36
33
  width: 870,
37
34
  height: 580
@@ -52,11 +52,11 @@ class PapermillTest < Test::Unit::TestCase
52
52
  @article = Article.create!
53
53
  @decoy_article = Article.create!
54
54
  @file = File.new(File.join(File.dirname(__FILE__), "fixtures", "5k.png"), 'rb')
55
- PapermillAsset.create!(:Filedata => @file, :assetable => @article, :assetable_key => "asset1", :position => 2)
56
- PapermillAsset.create!(:Filedata => @file, :assetable => @article, :assetable_key => "asset1", :position => 1)
57
- MyAsset.create!(:Filedata => @file, :assetable => @article, :assetable_key => "my_assets")
58
- MyAsset.create!(:Filedata => @file, :assetable => @article, :assetable_key => "my_assets")
59
- MyAsset.create!(:Filedata => @file, :assetable => @decoy_article, :assetable_key => "my_assets")
55
+ PapermillAsset.create!(:file => @file, :assetable => @article, :assetable_key => "asset1", :position => 2)
56
+ PapermillAsset.create!(:file => @file, :assetable => @article, :assetable_key => "asset1", :position => 1)
57
+ MyAsset.create!(:file => @file, :assetable => @article, :assetable_key => "my_assets")
58
+ MyAsset.create!(:file => @file, :assetable => @article, :assetable_key => "my_assets")
59
+ MyAsset.create!(:file => @file, :assetable => @decoy_article, :assetable_key => "my_assets")
60
60
 
61
61
  def initialize(*args)
62
62
  super
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: papermill
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.3
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Benoit B\xC3\xA9n\xC3\xA9zech"