gallery fixed bugs including tags and tags while uploading.
This commit is contained in:
parent
995a1ff5db
commit
9509bdd55f
|
@ -6,7 +6,7 @@
|
|||
"type": "sftp",
|
||||
|
||||
"save_before_upload": true,
|
||||
"upload_on_save": true,
|
||||
"upload_on_save": false,
|
||||
"sync_down_on_open": false,
|
||||
"sync_skip_deletes": false,
|
||||
"confirm_downloads": false,
|
||||
|
|
|
@ -241,6 +241,10 @@ $(function() {
|
|||
var fetchNewImages = function(){
|
||||
var lastid = ( $("li.rgalbum:last").length ? $("li.rgalbum:last").data("image-id") : null),
|
||||
albumid = $("#fileupload_aid").val();
|
||||
|
||||
$.getJSON(window.location.pathname, function(json, textStatus) {
|
||||
photosData = json;
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url : "/panel/gallery/back_end/new_images",
|
||||
|
|
|
@ -54,7 +54,7 @@ class Panel::Gallery::BackEnd::AlbumImagesController < OrbitBackendController
|
|||
|
||||
def image_tagging
|
||||
images = params[:image_ids]
|
||||
tags = params[:tag_ids]
|
||||
tags = params[:tag_ids] || []
|
||||
i = nil
|
||||
images.each do |image|
|
||||
img = AlbumImage.find(image)
|
||||
|
|
|
@ -156,6 +156,7 @@ class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
|
|||
@files.each do |file|
|
||||
@image = @album.album_images.new
|
||||
@image.file = file
|
||||
@image.tagged_ids = @album.tag_ids
|
||||
@image.save!
|
||||
a << {"thumbnail_url"=>@image.file.thumb.url,"url"=>panel_gallery_back_end_album_image_path(@image)}
|
||||
end
|
||||
|
|
Reference in New Issue