papermill 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/controllers/papermill_controller.rb +7 -5
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.4.
|
1
|
+
1.4.1
|
@@ -42,9 +42,11 @@ class PapermillController < ApplicationController
|
|
42
42
|
page << %{ jQuery('#papermill_asset_#{@old_asset.id}').remove() } if @old_asset
|
43
43
|
end
|
44
44
|
else
|
45
|
-
|
46
|
-
|
47
|
-
|
45
|
+
render :update do |page|
|
46
|
+
page << %{ notify('#{@asset.name}', '#{escape_javascript @asset.errors.full_messages.join("<br />")}', 'error'); }
|
47
|
+
page << %{ jQuery('##{params[:Fileid]}').remove(); }
|
48
|
+
page << %{ jQuery('#papermill_asset_#{@old_asset.id}').show(); } if @old_asset
|
49
|
+
end
|
48
50
|
end
|
49
51
|
end
|
50
52
|
|
@@ -60,9 +62,9 @@ class PapermillController < ApplicationController
|
|
60
62
|
@asset.create_thumb_file(params[:target], params[:papermill_asset].merge({ :geometry => "#{params[:target]}#" })) if params[:target]
|
61
63
|
render :update do |page|
|
62
64
|
if @asset.update_attributes(params[:papermill_asset])
|
63
|
-
page << %{ notify(
|
65
|
+
page << %{ notify('#{@asset.name}', '#{ escape_javascript t("papermill.updated", :resource => @asset.name)}', 'notice'); close_popup(self); }
|
64
66
|
else
|
65
|
-
page << %{ jQuery(
|
67
|
+
page << %{ jQuery('#error').html('#{ escape_javascript @asset.errors.full_messages.join("<br />") }'); jQuery('#error').show(); }
|
66
68
|
end
|
67
69
|
end
|
68
70
|
end
|