gallery frontend ui fixed.

This commit is contained in:
Harry Bomrah 2013-11-05 13:23:18 +08:00
parent 54f778f17d
commit a6a7694211
5 changed files with 22 additions and 13 deletions

View File

@ -220,14 +220,19 @@ var galleryAPI = function(){
$img.fadeOut(200,function(){
g.loadstart();
if($rslide.hasClass("fullscreen"))
if($rslide.hasClass("fullscreen")){
$img.attr({"src":dom.attr("data-content")}).css("height","100%").load(function(){
g.loadcomplete();
$img.fadeIn(200);
});
else
$img.attr({"src":dom.attr("data-content")}).css("height","auto");
}else{
$img.attr({"src":dom.attr("data-content")}).css("height","auto").load(function(){
console.log(dom.attr("data-content"));
g.loadcomplete();
$img.fadeIn(200);
});;
}
if($rslide.hasClass("fullscreen")){
$img.css({"padding":($rslide.height()-$img.height())/2})
}
@ -236,7 +241,7 @@ var galleryAPI = function(){
if(rcom.getInternetExplorerVersion() == -1){
if(pageurl!=window.location){
pageurl = "gallery?id="+pageurl+"&controller_action=theater";
pageurl = window.location.pathname.replace("/","")+"?id="+pageurl+"&controller_action=theater";
window.history.pushState({path:pageurl},'',pageurl);
}
}else{

View File

@ -144,6 +144,9 @@
-moz-transition: all 0.3s ease;
}
.rslide.fullscreen { position: fixed; z-index: 99; }
.rslide.fullscreen .comp img{
width: auto;
}
.rslideinside {
}
.comp {
@ -156,7 +159,7 @@
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
}
.comp img{ display: block; width: auto; height: auto; margin: 0 auto; cursor: pointer; min-height: 250px; }
.comp img{ display: block; width: 100%; height: auto; margin: 0 auto; cursor: pointer; min-height: 250px; }
.comp .full{ width: auto; height: auto; max-width: 100%; max-height: 100%; }
.rslidenav {
position: absolute;

View File

@ -25,7 +25,7 @@ class Panel::Gallery::FrontEnd::AlbumsController < OrbitWidgetController
end
else
@categoryids.each do |id|
category = GalleryCategory.find(id)
category = Category.find(id)
if @tags
if @tags.kind_of?(Array)
@tags.each do |tag|
@ -44,8 +44,9 @@ class Panel::Gallery::FrontEnd::AlbumsController < OrbitWidgetController
@albs = Array.new
album.each do |values|
tags = Tag.find(values.tagged_ids).map{|t| t.name}
category = GalleryCategory.find(values.gallery_category_id).name
@albs << {"_id"=>values.id,"show_path"=>panel_gallery_front_end_album_path(values),"cover"=>values.cover,"cover_path"=>values.cover_path,"description"=>values.description,"category_name"=>category,"gallery_category_id" => values.gallery_category_id,"name"=>values.name,"tag_ids"=>values.tag_ids,"tag_names"=>tags}
category = Category.find(values.category_id).title
@albs << {"_id"=>values.id,"show_path"=>panel_gallery_front_end_album_path(values),"cover"=>values.cover,"cover_path"=>values.cover_path,"description"=>values.description,"category_name"=>category,"gallery_category_id" => values.category_id,"name"=>values.name,"tag_ids"=>values.tag_ids,"tag_names"=>tags}
end
@output << @albs
end
@ -85,8 +86,8 @@ class Panel::Gallery::FrontEnd::AlbumsController < OrbitWidgetController
@albumid = @image.gallery_album_id
@album = GalleryAlbum.find(@albumid)
@images = @album.gallery_images.all
tags = @album.tag_ids
@tagnames = Tag.find(tags.tagged_ids).map{|t| t.name}
tags = @album.tagged_ids
@tagnames = Tag.find(tags).map{|t| t.name}
@back_link = panel_gallery_front_end_album_path(@albumid)
end
end

View File

@ -20,7 +20,7 @@
</script>
<% content_for :page_specific_javascript do %>
<%= javascript_include_tag "galleryAPI_frontend" %>
<%= javascript_include_tag "jquery.tinyscrollbar" %>
<%#= javascript_include_tag "jquery.tinyscrollbar" %>
<%= javascript_include_tag "rss" %>
<% end %>

View File

@ -27,7 +27,7 @@
<% content_for :page_specific_javascript do %>
<%= javascript_include_tag "galleryAPI_frontend" %>
<%= javascript_include_tag "jquery.tinyscrollbar" %>
<%#= javascript_include_tag "jquery.tinyscrollbar" %>
<%= javascript_include_tag "rss" %>
<% end %>