gallery frontend ui fixed.
This commit is contained in:
parent
1945921fcb
commit
af103fa427
|
@ -220,14 +220,19 @@ var galleryAPI = function(){
|
||||||
|
|
||||||
$img.fadeOut(200,function(){
|
$img.fadeOut(200,function(){
|
||||||
g.loadstart();
|
g.loadstart();
|
||||||
if($rslide.hasClass("fullscreen"))
|
if($rslide.hasClass("fullscreen")){
|
||||||
|
|
||||||
$img.attr({"src":dom.attr("data-content")}).css("height","100%").load(function(){
|
$img.attr({"src":dom.attr("data-content")}).css("height","100%").load(function(){
|
||||||
g.loadcomplete();
|
g.loadcomplete();
|
||||||
$img.fadeIn(200);
|
$img.fadeIn(200);
|
||||||
});
|
});
|
||||||
else
|
}else{
|
||||||
$img.attr({"src":dom.attr("data-content")}).css("height","auto");
|
$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")){
|
if($rslide.hasClass("fullscreen")){
|
||||||
$img.css({"padding":($rslide.height()-$img.height())/2})
|
$img.css({"padding":($rslide.height()-$img.height())/2})
|
||||||
}
|
}
|
||||||
|
@ -236,7 +241,7 @@ var galleryAPI = function(){
|
||||||
if(rcom.getInternetExplorerVersion() == -1){
|
if(rcom.getInternetExplorerVersion() == -1){
|
||||||
|
|
||||||
if(pageurl!=window.location){
|
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);
|
window.history.pushState({path:pageurl},'',pageurl);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
|
|
@ -144,6 +144,9 @@
|
||||||
-moz-transition: all 0.3s ease;
|
-moz-transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
.rslide.fullscreen { position: fixed; z-index: 99; }
|
.rslide.fullscreen { position: fixed; z-index: 99; }
|
||||||
|
.rslide.fullscreen .comp img{
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
.rslideinside {
|
.rslideinside {
|
||||||
}
|
}
|
||||||
.comp {
|
.comp {
|
||||||
|
@ -156,7 +159,7 @@
|
||||||
-webkit-transition: all 0.3s ease;
|
-webkit-transition: all 0.3s ease;
|
||||||
-moz-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%; }
|
.comp .full{ width: auto; height: auto; max-width: 100%; max-height: 100%; }
|
||||||
.rslidenav {
|
.rslidenav {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
@ -25,7 +25,7 @@ class Panel::Gallery::FrontEnd::AlbumsController < OrbitWidgetController
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@categoryids.each do |id|
|
@categoryids.each do |id|
|
||||||
category = GalleryCategory.find(id)
|
category = Category.find(id)
|
||||||
if @tags
|
if @tags
|
||||||
if @tags.kind_of?(Array)
|
if @tags.kind_of?(Array)
|
||||||
@tags.each do |tag|
|
@tags.each do |tag|
|
||||||
|
@ -44,8 +44,9 @@ class Panel::Gallery::FrontEnd::AlbumsController < OrbitWidgetController
|
||||||
@albs = Array.new
|
@albs = Array.new
|
||||||
album.each do |values|
|
album.each do |values|
|
||||||
tags = Tag.find(values.tagged_ids).map{|t| t.name}
|
tags = Tag.find(values.tagged_ids).map{|t| t.name}
|
||||||
category = GalleryCategory.find(values.gallery_category_id).name
|
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.gallery_category_id,"name"=>values.name,"tag_ids"=>values.tag_ids,"tag_names"=>tags}
|
|
||||||
|
@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
|
end
|
||||||
@output << @albs
|
@output << @albs
|
||||||
end
|
end
|
||||||
|
@ -85,8 +86,8 @@ class Panel::Gallery::FrontEnd::AlbumsController < OrbitWidgetController
|
||||||
@albumid = @image.gallery_album_id
|
@albumid = @image.gallery_album_id
|
||||||
@album = GalleryAlbum.find(@albumid)
|
@album = GalleryAlbum.find(@albumid)
|
||||||
@images = @album.gallery_images.all
|
@images = @album.gallery_images.all
|
||||||
tags = @album.tag_ids
|
tags = @album.tagged_ids
|
||||||
@tagnames = Tag.find(tags.tagged_ids).map{|t| t.name}
|
@tagnames = Tag.find(tags).map{|t| t.name}
|
||||||
@back_link = panel_gallery_front_end_album_path(@albumid)
|
@back_link = panel_gallery_front_end_album_path(@albumid)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
</script>
|
</script>
|
||||||
<% content_for :page_specific_javascript do %>
|
<% content_for :page_specific_javascript do %>
|
||||||
<%= javascript_include_tag "galleryAPI_frontend" %>
|
<%= javascript_include_tag "galleryAPI_frontend" %>
|
||||||
<%= javascript_include_tag "jquery.tinyscrollbar" %>
|
<%#= javascript_include_tag "jquery.tinyscrollbar" %>
|
||||||
<%= javascript_include_tag "rss" %>
|
<%= javascript_include_tag "rss" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
<% content_for :page_specific_javascript do %>
|
<% content_for :page_specific_javascript do %>
|
||||||
<%= javascript_include_tag "galleryAPI_frontend" %>
|
<%= javascript_include_tag "galleryAPI_frontend" %>
|
||||||
<%= javascript_include_tag "jquery.tinyscrollbar" %>
|
<%#= javascript_include_tag "jquery.tinyscrollbar" %>
|
||||||
<%= javascript_include_tag "rss" %>
|
<%= javascript_include_tag "rss" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
Reference in New Issue