ish_manager 0.1.8.382 → 0.1.8.383
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/ish_manager/application.js +27 -6
- data/app/assets/stylesheets/ish_manager/photos.scss +11 -0
- data/app/controllers/ish_manager/galleries_controller.rb +2 -2
- data/app/controllers/ish_manager/photos_controller.rb +5 -4
- data/app/views/ish_manager/galleries/show.haml +3 -3
- data/app/views/ish_manager/photos/_multinew.haml +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3aae4c46f6f96a6a9caa0d44d807ca0f6e84c81d8bce8211bda475be394bf3f5
|
|
4
|
+
data.tar.gz: c9021cf3ec2a606fc8d6111f1dff32d17094b0fa829b0055304a93f75027c6d2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7f4f9255e0fa368ec06d6c1b55f5c93fa2f09ea180f32f41f59f7ce70c3b73c81cd32472258df83a115a5bab3d2e3e2c69a3e076eaf17f3e1cc520c50efab7df
|
|
7
|
+
data.tar.gz: 6168704327873458aa4c885277e0c96241e721ce97365bbfe9ffb6ab7299d6387cddc296778e6622113469394c514bb1586b99b77b37fd3037704cbf60b84112
|
|
@@ -33,13 +33,35 @@ const AppRouter = {
|
|
|
33
33
|
|
|
34
34
|
$(function () {
|
|
35
35
|
|
|
36
|
+
var fileuploadCount = 0
|
|
36
37
|
$('#fileupload').fileupload({
|
|
37
38
|
dataType: 'json',
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
success: function(ev) {
|
|
40
|
+
logg(ev, 'success')
|
|
41
|
+
ev = ev[0]
|
|
42
|
+
fileuploadCount += 1
|
|
43
|
+
|
|
44
|
+
var el = $('<div class="item" />')
|
|
45
|
+
var photosEl = $('#photos')
|
|
46
|
+
|
|
47
|
+
$('<div/>').html(fileuploadCount).appendTo(el)
|
|
48
|
+
$('<img/>').attr('src', ev.thumbnail_url).appendTo(el)
|
|
49
|
+
$('<div/>').html(ev.name).appendTo(el)
|
|
50
|
+
el.appendTo(photosEl)
|
|
51
|
+
},
|
|
52
|
+
error: function(err) {
|
|
53
|
+
logg(err, 'error')
|
|
54
|
+
err = err.responseJSON
|
|
55
|
+
fileuploadCount += 1
|
|
56
|
+
|
|
57
|
+
var el = $('<div class="item" />')
|
|
58
|
+
var errorsEl = $('.photos--multinew .errors')
|
|
59
|
+
|
|
60
|
+
$('<div/>').html(fileuploadCount).appendTo(el)
|
|
61
|
+
$('<div />').html(err.filename).appendTo(el)
|
|
62
|
+
$('<div />').html(err.message).appendTo(el)
|
|
63
|
+
el.appendTo(errorsEl)
|
|
64
|
+
},
|
|
43
65
|
});
|
|
44
66
|
|
|
45
67
|
$('*[data-confirm]').click(function(){
|
|
@@ -97,7 +119,6 @@ $(function () {
|
|
|
97
119
|
})
|
|
98
120
|
|
|
99
121
|
$(".expand-next").click(function (_e) {
|
|
100
|
-
// logg($(this).next(), 'expand?')
|
|
101
122
|
$(this).next().slideToggle()
|
|
102
123
|
})
|
|
103
124
|
|
|
@@ -3,7 +3,7 @@ class IshManager::GalleriesController < IshManager::ApplicationController
|
|
|
3
3
|
before_action :set_lists
|
|
4
4
|
before_action :set_gallery, only: %w|destroy edit j_show show update update_ordering|
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Alphabetized! : )
|
|
7
7
|
|
|
8
8
|
def create
|
|
9
9
|
params[:gallery][:shared_profiles] ||= []
|
|
@@ -19,7 +19,7 @@ class IshManager::GalleriesController < IshManager::ApplicationController
|
|
|
19
19
|
redirect_to edit_gallery_path(@gallery)
|
|
20
20
|
else
|
|
21
21
|
puts! @gallery.errors.messages
|
|
22
|
-
flash[:alert] = "Cannot create the gallery: #{@gallery.errors.full_messages}"
|
|
22
|
+
flash[:alert] = "Cannot create the gallery: #{@gallery.errors.full_messages.join(', ')}"
|
|
23
23
|
render :action => 'new'
|
|
24
24
|
end
|
|
25
25
|
end
|
|
@@ -27,11 +27,10 @@ class IshManager::PhotosController < IshManager::ApplicationController
|
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
def j_create
|
|
30
|
-
# find this gallery
|
|
31
30
|
if params[:slug]
|
|
32
31
|
gallery = Gallery.unscoped.where( :slug => params[:slug] ).first
|
|
33
32
|
gallery ||= Gallery.unscoped.find params[:slug]
|
|
34
|
-
elsif params[:gallery_id]
|
|
33
|
+
elsif params[:gallery_id]
|
|
35
34
|
gallery = Gallery.unscoped.find( params[:gallery_id] )
|
|
36
35
|
gallery ||= Gallery.unscoped.where( :slug => params[:gallery_id] ).first
|
|
37
36
|
end
|
|
@@ -41,7 +40,6 @@ class IshManager::PhotosController < IshManager::ApplicationController
|
|
|
41
40
|
@photo.is_public = true
|
|
42
41
|
@photo.gallery = gallery
|
|
43
42
|
|
|
44
|
-
# cache
|
|
45
43
|
@photo.gallery.touch
|
|
46
44
|
|
|
47
45
|
if @photo.save
|
|
@@ -55,7 +53,10 @@ class IshManager::PhotosController < IshManager::ApplicationController
|
|
|
55
53
|
}
|
|
56
54
|
render :json => [ j ]
|
|
57
55
|
else
|
|
58
|
-
render :json => {
|
|
56
|
+
render :json => {
|
|
57
|
+
message: @photo.errors.full_messages.join(", "),
|
|
58
|
+
filename: @photo.photo.original_filename,
|
|
59
|
+
}, status: 400
|
|
59
60
|
end
|
|
60
61
|
end
|
|
61
62
|
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
-# ish_manager / galleries / show
|
|
3
3
|
-#
|
|
4
4
|
|
|
5
|
-
.galleries-show
|
|
5
|
+
.galleries-show.padded
|
|
6
6
|
.row
|
|
7
|
-
.col-
|
|
7
|
+
.col-md-6
|
|
8
8
|
= render 'title', :gallery => @gallery
|
|
9
|
-
.col-
|
|
9
|
+
.col-md-6
|
|
10
10
|
= render 'ish_manager/photos/multinew', :gallery => @gallery
|
|
11
11
|
|
|
12
12
|
.row-deleted
|