gallery update

This commit is contained in:
devin 2012-08-11 01:32:53 +08:00
parent 50baac2cb7
commit 7fb6a1e86b
4 changed files with 46 additions and 37 deletions

View File

@ -168,10 +168,21 @@ var galleryAPI = function(){
// tag // tag
$('.bt-tag').click(function(){ $('.bt-tag').click(function(){
$('#tag_panel').animate({'right':0}); var $tag_panel = $('#tag_panel'),
return false; tag_panel_position = 0;
if( $tag_panel.css('right') == '0px' ){
tag_panel_position = -200;
}
$tag_panel.animate({'right':tag_panel_position}, 300);
g.albumArea
.delay(200)
.animate({'margin-right':tag_panel_position+200},300);
return false;
}); });
} }
this.loadTheater = function(id){ this.loadTheater = function(id){
var imageArray; var imageArray;
@ -321,6 +332,7 @@ var galleryAPI = function(){
var head = $('<a href="" class="bt-back btn pull-left" title="<%= I18n.t("gallery.back_to_photos") %>"><i class="icon-arrow-left icon-black"></i><%= I18n.t("gallery.back_to_photos") %></a></div>'); var head = $('<a href="" class="bt-back btn pull-left" title="<%= I18n.t("gallery.back_to_photos") %>"><i class="icon-arrow-left icon-black"></i><%= I18n.t("gallery.back_to_photos") %></a></div>');
var head1 = $('<a class="bt-edit btn btn-primary pull-right" title="<%= I18n.t("gallery.edit") %>" href="" ><i class="icon-pencil icon-white"></i><%= I18n.t("gallery.edit") %></a>'); var head1 = $('<a class="bt-edit btn btn-primary pull-right" title="<%= I18n.t("gallery.edit") %>" href="" ><i class="icon-pencil icon-white"></i><%= I18n.t("gallery.edit") %></a>');
var head2 = $('<a class="bt-tag btn btn-primary pull-right" title="<%= I18n.t("gallery.photo_tag") %>" href="" ><i class="icon-tag icon-white"></i><%= I18n.t("gallery.photo_tag") %></a>');
g.albumArea.find("#imgholder").load("theater?pic="+id,function(theater,response,xhr){ g.albumArea.find("#imgholder").load("theater?pic="+id,function(theater,response,xhr){
if(xhr.status == 404){ if(xhr.status == 404){
$(this).text("<%= I18n.t('gallery.pic_not_found') %>."); $(this).text("<%= I18n.t('gallery.pic_not_found') %>.");
@ -332,10 +344,27 @@ var galleryAPI = function(){
head.attr("href","orbit_gallery?album="+albumid); head.attr("href","orbit_gallery?album="+albumid);
head1.attr("href","orbit_gallery?edit="+albumid); head1.attr("href","orbit_gallery?edit="+albumid);
g.albumArea.find(".rghead .rgfn").html(head); g.albumArea.find(".rghead .rgfn").html(head);
g.albumArea.find(".rghead .rgfn").append(head1); g.albumArea.find(".rghead .rgfn").append(head1,head2);
picHeight = $(window).height() - ($("#orbit-bar").outerHeight() + $("#orbit_gallery .rghead").outerHeight()); picHeight = $(window).height() - ($("#orbit-bar").outerHeight() + $("#orbit_gallery .rghead").outerHeight());
preparestage(albumid); preparestage(albumid);
})
// tag
$('.bt-tag').click(function(){
var $tag_panel = $('#tag_panel'),
tag_panel_position = 0;
if( $tag_panel.css('right') == '0px' ){
tag_panel_position = -200;
}
$tag_panel.animate({'right':tag_panel_position}, 300);
g.albumArea
.delay(200)
.animate({'margin-right':tag_panel_position+200},300);
return false;
});
});
} }
this.editAlbum = function(id){ this.editAlbum = function(id){

View File

@ -59,12 +59,12 @@ body.fullscreen, .fullscreen #container, .fullscreen #container2, .fullscreen #m
} }
.rgfn { overflow: hidden; padding: 4px 10px; } .rgfn { overflow: hidden; padding: 4px 10px; }
.rgalbum, .rgphoto { float: left; margin: 0 16px 24px 0; } .rgalbum, .rgphoto { float: left; margin: 0 0 24px 0; }
.rgalbum { width: 134px; height: 169px; text-align: center; position: relative; margin-bottom: 12px; } .rgalbum {
.rgalbum img { width: 150px;
background: transparent 0 0 url(../../../assets/gallery/albumframe.png) no-repeat; margin-bottom: 12px;
padding: 7px 7px 8px 7px; }
.rgalbum img {
transition: all, 0.5s ease; transition: all, 0.5s ease;
-webkit-transition: all, 0.5s ease; -webkit-transition: all, 0.5s ease;
-moz-transition: all 0.5s ease; -moz-transition: all 0.5s ease;
@ -96,38 +96,14 @@ body.fullscreen, .fullscreen #container, .fullscreen #container2, .fullscreen #m
border-color: #666; border-color: #666;
} }
.rgalbum .albumname { .rgalbum .albumname {
display: block;
margin: 4px;
padding: 2px 0;
font-size: 13px;
height: 52px;
overflow: hidden;
cursor: default;
transition: background 0.3s ease; transition: background 0.3s ease;
-webkit-transition: background 0.3s ease; -webkit-transition: background 0.3s ease;
-moz-transition: background 0.3s ease; -moz-transition: background 0.3s ease;
-ms-transition: background 0.3s ease; -ms-transition: background 0.3s ease;
} }
.rgalbum .albumname:hover {
position: absolute;
width: 126px;
height: auto;
min-height: 52px;
z-index: 999;
overflow: auto;
background: #fff;
box-shadow: 0 0 6px #ddd;
-webkit-box-shadow: 0 0 6px #ddd;
-moz-box-shadow: 0 0 6px #ddd;
-ms-box-shadow: 0 0 6px #ddd;
}
.rgalbum a:hover img { .rgalbum a:hover img {
opacity: 0.85; opacity: 0.85;
-webkit-opacity: 0.85;
-moz-opacity: 0.85;
-ms-opacity: 0.85;
} }
.rgp .rgtitle { margin: 0 0 10px 0; } .rgp .rgtitle { margin: 0 0 10px 0; }
@ -166,14 +142,14 @@ body.fullscreen, .fullscreen #container, .fullscreen #container2, .fullscreen #m
overflow: hidden; overflow: hidden;
background: #333; background: #333;
clear: both; clear: both;
z-index: 99; /*z-index: 99;*/
min-height: 250px; min-height: 250px;
transition: all 0.3s ease; transition: all 0.3s ease;
-webkit-transition: all 0.3s ease; -webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease; -moz-transition: all 0.3s ease;
} }
.rslide.fullscreen { position: fixed; } .rslide.fullscreen { position: fixed; z-index: 99; }
.rslideinside { .rslideinside {
/* /*
position: absolute; position: absolute;
@ -235,7 +211,7 @@ body.fullscreen, .fullscreen #container, .fullscreen #container2, .fullscreen #m
height: 30px; height: 30px;
background: #000 left top url(../../../assets/gallery/slidetitlebg.png) repeat-x; background: #000 left top url(../../../assets/gallery/slidetitlebg.png) repeat-x;
background: rgba(0,0,0,0.9) left top url(../../../assets/gallery/slidetitlebg.png) repeat-x; background: rgba(0,0,0,0.9) left top url(../../../assets/gallery/slidetitlebg.png) repeat-x;
z-index: 999; /*z-index: 999;*/
} }
.slidectrl a { .slidectrl a {
display: block; display: block;
@ -477,6 +453,8 @@ body.fullscreen, .fullscreen #container, .fullscreen #container2, .fullscreen #m
.w380 { width: 380px; } .w380 { width: 380px; }
#imgholder { overflow: hidden; }
/* upload panel */ /* upload panel */
#upload_panel_holder { #upload_panel_holder {
display: none; display: none;

View File

@ -2,6 +2,7 @@ en:
gallery: gallery:
album_name: Album Name album_name: Album Name
album_tag: Album Tag album_tag: Album Tag
photo_tag: Photo Tag
all: All all: All
select_category: "--Select a category--" select_category: "--Select a category--"
manage_categories: Manage Categories manage_categories: Manage Categories

View File

@ -2,6 +2,7 @@ zh_tw:
gallery: gallery:
album_name: 相簿名稱 album_name: 相簿名稱
album_tag: 相簿標籤 album_tag: 相簿標籤
photo_tag: 照片標籤
all: 全部 all: 全部
select_category: 選擇類別 select_category: 選擇類別
manage_categories: 類別管理 manage_categories: 類別管理