minor changes

This commit is contained in:
Harry Bomrah committed 2012-08-29 20:16:46 +08:00
1 parent 34764fb28d
commit 3423167600
2 files changed
+3 -39

No files matched your search

@@ -11,8 +11,7 @@ class Panel::Gallery::BackEnd::AlbumImagesController < OrbitBackendController
@image = GalleryImage.find(params[:id])
@albumid = @image.gallery_album_id
@album = GalleryAlbum.find(@albumid)
@images = @album.gallery_images.all
@images = @album.gallery_images.all
end
@@ -29,39 +28,4 @@ class Panel::Gallery::BackEnd::AlbumImagesController < OrbitBackendController
render :json =>{"success"=>true}.to_json
end
def update_album
# data = params['data']
# album_name = params['name']
# aid = params['aid']
# data.each do |d|
# image = GalleryImage.find(d[1][:id])
# image.update_attributes(:description=>d[1][:text])
# end
# album = GalleryAlbum.find(aid)
# album.update_attributes(:name => album_name)
# album_names = params[:albumnm]
# data = params[:data]
# aid =params[:aid]
# debugger
# data.each do |d|
# image = GalleryImage.find(d[1][:id])
# @site_valid_locales.each do |locale|
# image.description_translations[locale] = d[1][:text][locale]
# end
# image.save!
# end
# album = GalleryAlbum.find(aid)
# @site_valid_locales.each_with_index do |locale,i|
# album.name_translations[locale] = album_names[i]
# end
# album.save!
@album = GalleryAlbum.find(params[:id])
@album.update_attributes(params[:gallery_albums])
render :json =>{"success"=>true}.to_json
end
end