infopark_fiona7 1.1.0.0.3 → 1.1.0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/fiona7_ui.js +0 -13
- data/app/controllers/fiona7/release_controller.rb +19 -6
- data/lib/fiona7/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e4faba12e3777d253526addb84018eccbd43d47
|
4
|
+
data.tar.gz: 3a977b389028604ec428e740d27817d8850c89fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa45a12ba6bf41a71a95297a5068b578e90350515e593cce94c374b855094634a5cc35029bb6cbb727db333e5b544ed2e9fd4017be19560ee74f3b85460ef169
|
7
|
+
data.tar.gz: 838319f5d92587be802dda0b0a73275e3dfce799a8ebfe55fcf1a1daadf65a6371f031ce05c0fd8d818ede2ae30ccb995fb6b76702a5dc29c94666368e627827
|
@@ -236,19 +236,6 @@
|
|
236
236
|
open_release_dialog(obj.id()).done(function(objIds, comment) {
|
237
237
|
scrivito.with_saving_overlay(scrivito.ajax('PUT', 'objs/release', {data: {objs: objIds, comment: comment}}).then(function() {
|
238
238
|
scrivito.reload();
|
239
|
-
}).fail(function(error) {
|
240
|
-
scrivito.alert_dialog(scrivito.t('commands.'+action+'_obj.failed'));
|
241
|
-
}));
|
242
|
-
});
|
243
|
-
|
244
|
-
return;
|
245
|
-
|
246
|
-
/* TODO: implement permission check */
|
247
|
-
open_confirmation_dialog(action, dialog_icons[action]).done(function(comment) {
|
248
|
-
scrivito.with_saving_overlay(scrivito.ajax('PUT', 'objs/' + obj.id() + '/release?comment=' + (comment || "")).then(function() {
|
249
|
-
scrivito.reload();
|
250
|
-
}).fail(function(error) {
|
251
|
-
scrivito.alert_dialog(scrivito.t('commands.'+action+'_obj.failed'));
|
252
239
|
}));
|
253
240
|
});
|
254
241
|
}
|
@@ -11,12 +11,18 @@ module Fiona7
|
|
11
11
|
|
12
12
|
carefully_release(errors, main_obj, comment)
|
13
13
|
objs.each do |other_obj|
|
14
|
-
carefully_release(errors, other_obj)
|
14
|
+
carefully_release(errors, other_obj, comment)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
|
-
|
19
|
-
|
18
|
+
if errors.empty?
|
19
|
+
render json: {}
|
20
|
+
else
|
21
|
+
render json: {message: errors.join("\n"), message_for_editor: errors.join("\n")}, status: 412
|
22
|
+
end
|
23
|
+
|
24
|
+
rescue => e
|
25
|
+
render json: {message: e.message}, status: 500
|
20
26
|
end
|
21
27
|
|
22
28
|
def preview
|
@@ -41,12 +47,19 @@ module Fiona7
|
|
41
47
|
|
42
48
|
def carefully_release(errors, obj, comment=nil)
|
43
49
|
obj.take
|
44
|
-
obj.release!(comment)
|
50
|
+
obj.release!(comment) if obj.really_edited?
|
45
51
|
|
46
52
|
complex_object = Fiona7::ComplexObject.new(obj)
|
47
53
|
complex_object.widgets.each do |widget_obj|
|
48
|
-
|
49
|
-
|
54
|
+
begin
|
55
|
+
widget_obj.take
|
56
|
+
widget_obj.release!(comment) if widget_obj.really_edited?
|
57
|
+
rescue => e
|
58
|
+
Rails.logger.error("Error occured when releasing #{obj.id}: unable to release Object with ID #{widget_obj.id} (#{widget_obj.path} because: #{e.inspect}")
|
59
|
+
# TODO: translate
|
60
|
+
error = "Unable to release Object with ID #{widget_obj.id} because: #{e.message}"
|
61
|
+
errors << error
|
62
|
+
end
|
50
63
|
end
|
51
64
|
#complex_object.binaries.each do |widget_obj|
|
52
65
|
# widget_obj.take
|
data/lib/fiona7/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: infopark_fiona7
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.0.0.
|
4
|
+
version: 1.1.0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomasz Przedmojski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|