gallery update
This commit is contained in:
parent
0e5a305f39
commit
ede9727a18
Binary file not shown.
Before Width: | Height: | Size: 3.1 KiB |
|
@ -165,7 +165,7 @@ var galleryAPI = function(){
|
||||||
var $img = $("<div class='rgalbum'><a title='"+album.description+"' href='?album="+album._id+"'><img src='"+album.cover_path+"' width='120px' height='90px'/></a><span class='albumname'>"+album.name+"</span><span class='tagnames'></span></div>");
|
var $img = $("<div class='rgalbum'><a title='"+album.description+"' href='?album="+album._id+"'><img src='"+album.cover_path+"' width='120px' height='90px'/></a><span class='albumname'>"+album.name+"</span><span class='tagnames'></span></div>");
|
||||||
var tag_string = "";
|
var tag_string = "";
|
||||||
for(tag in album.tag_names){
|
for(tag in album.tag_names){
|
||||||
tag_string+= '<span class="label label-tags">' + album.tag_names[tag] + '</span>';
|
tag_string+= '<span class="tag_item">' + album.tag_names[tag] + '</span>';
|
||||||
}
|
}
|
||||||
$img.find(".tagnames").html(tag_string);
|
$img.find(".tagnames").html(tag_string);
|
||||||
g.albumArea.find("#imgholder").append($img);
|
g.albumArea.find("#imgholder").append($img);
|
||||||
|
|
|
@ -43,17 +43,10 @@
|
||||||
.rgalbum, .rgphoto { float: left; margin: 0 10px 24px 0; }
|
.rgalbum, .rgphoto { float: left; margin: 0 10px 24px 0; }
|
||||||
.rgalbum {
|
.rgalbum {
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
margin: 0 8px 8px 0;
|
margin: 0;
|
||||||
border: solid 1px #ccc;
|
border-right: solid 1px #ccc;
|
||||||
|
border-bottom: solid 1px #ccc;
|
||||||
height: 180px;
|
height: 180px;
|
||||||
border-radius: 4px;
|
|
||||||
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
-webkit-transition: all 0.3s ease;
|
|
||||||
-moz-transition: all 0.3s ease;
|
|
||||||
}
|
|
||||||
.rgalbum:hover {
|
|
||||||
box-shadow: 0 0 6px rgba(0,0,0,0.2);
|
|
||||||
}
|
}
|
||||||
.rgalbum img {
|
.rgalbum img {
|
||||||
transition: all, 0.5s ease;
|
transition: all, 0.5s ease;
|
||||||
|
@ -62,23 +55,8 @@
|
||||||
-ms-transition: all, 0.5s ease;
|
-ms-transition: all, 0.5s ease;
|
||||||
}
|
}
|
||||||
.rgphoto { }
|
.rgphoto { }
|
||||||
.rgphoto a {
|
|
||||||
display: block;
|
|
||||||
padding: 4px;
|
|
||||||
border: solid 1px #ddd;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 4px;
|
|
||||||
transition: all, 0.3s ease;
|
|
||||||
-webkit-transition: all, 0.3s ease;
|
|
||||||
-moz-transition: all, 0.3s ease;
|
|
||||||
}
|
|
||||||
.rgphoto a:hover {
|
|
||||||
border-color: #999;
|
|
||||||
box-shadow: 0 3px 6px rgba(0,0,0,0.2);
|
|
||||||
}
|
|
||||||
.rgphoto img, .rgphoto_edit img {
|
.rgphoto img, .rgphoto_edit img {
|
||||||
display: block;
|
display: block;
|
||||||
border-radius: 3px;
|
|
||||||
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;
|
||||||
|
@ -104,6 +82,7 @@
|
||||||
clear: both;
|
clear: both;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
border-bottom: solid 1px #fcfcfc;
|
||||||
}
|
}
|
||||||
.albumname_edit label {
|
.albumname_edit label {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
|
@ -357,6 +336,23 @@
|
||||||
padding: 6px;
|
padding: 6px;
|
||||||
}
|
}
|
||||||
.rgphoto_edit .rgbtsg.active { display: inline-block; }
|
.rgphoto_edit .rgbtsg.active { display: inline-block; }
|
||||||
|
/*
|
||||||
|
.bt-add { background-position: 0 -106px; }
|
||||||
|
.bt-add:hover { background-position: 0 -296px; }
|
||||||
|
.bt-add:active { background-position: 0 -486px; }
|
||||||
|
.bt-del { background-position: 0 -144px; }
|
||||||
|
.bt-del:hover { background-position: 0 -334px; }
|
||||||
|
.bt-del:active { background-position: 0 -524px; }
|
||||||
|
.bt-edit { background-position: 0 -182px; }
|
||||||
|
.bt-edit:hover { background-position: 0 -372px; }
|
||||||
|
.bt-edit:active { background-position: 0 -562px; }
|
||||||
|
.bt-back { background-position: 0 -676px; }
|
||||||
|
.bt-back:hover { background-position: 0 -714px; }
|
||||||
|
.bt-back:active { background-position: 0 -752px; }
|
||||||
|
.bt-save, .bt-finish { background-position: 0 -220px; }
|
||||||
|
.bt-save:hover, .bt-finish:hover { background-position: 0 -410px; }
|
||||||
|
.bt-save:active, .bt-finish:active { background-position: 0 -600px; }
|
||||||
|
*/
|
||||||
.bt-finish { display: block; float: right; clear: both; }
|
.bt-finish { display: block; float: right; clear: both; }
|
||||||
.bt-addnew {
|
.bt-addnew {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
@ -495,14 +491,8 @@
|
||||||
top: 50%;
|
top: 50%;
|
||||||
margin-top: -7px;
|
margin-top: -7px;
|
||||||
}
|
}
|
||||||
#tag_panel .tag_save {
|
#tag_panel .bt-save {
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
height: 31px;
|
|
||||||
border-left: solid 1px #ccc;
|
|
||||||
background-color: #fff;
|
|
||||||
padding: 2px 4px 0 4px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -527,21 +517,6 @@
|
||||||
}
|
}
|
||||||
#orbit_gallery .form-actions { background-color: whiteSmoke; }
|
#orbit_gallery .form-actions { background-color: whiteSmoke; }
|
||||||
|
|
||||||
.o_gallery .tagnames {
|
.o_album .rgbody {
|
||||||
display: inline-block;
|
margin: 10px 8px;
|
||||||
}
|
}
|
||||||
.o_gallery .label-tags {
|
|
||||||
display: inline-block;
|
|
||||||
margin: 0 6px 6px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.o_gallery .rgbody, .o_album .rgbody {
|
|
||||||
padding: 10px 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#categories .add-album .control-label {
|
|
||||||
text-align: left;
|
|
||||||
width: 100px;
|
|
||||||
padding-left: 12px;
|
|
||||||
padding-right: 12px;
|
|
||||||
}
|
|
|
@ -4,17 +4,42 @@
|
||||||
<li class="text-blue"><%= t('gallery.edit') %></li>
|
<li class="text-blue"><%= t('gallery.edit') %></li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
|
<%# @site_valid_locales.each_with_index do |locale, i| %>
|
||||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||||
<li <%= ( i == 0 ) ? " class='active'" : '' %>><a data-toggle="tab" href=".<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
|
<li <%= ( i == 0 ) ? " class='active'" : '' %>><a data-toggle="tab" href=".<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
<form id="edit_album" action="update_album" method="post">
|
<form id="edit_album">
|
||||||
<div class="tab_content">
|
<div class="tab_content">
|
||||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
<% i = 0 %>
|
||||||
<% if i == 0 %>
|
<% @site_valid_locales.each do |locale| %>
|
||||||
<div class="<%= locale %> fade tab-pane in active">
|
<% if i == 0 %>
|
||||||
<% else %>
|
<div class="<%= locale %> fade tab-pane in active">
|
||||||
<div class="<%= locale %> fade tab-pane" >
|
<% else %>
|
||||||
|
<div class="<%= locale %> fade tab-pane" >
|
||||||
|
<% end %>
|
||||||
|
<% i = 1 %>
|
||||||
|
<div class="albumname_edit">
|
||||||
|
<label for=""><%= t("gallery.album_name") %></label>
|
||||||
|
<div class="inputui rginput rgih26 w380"><input type="text" name="edit_album[name][<%= locale %>]" value="<%= @album_name[locale] %>" class="txtchange" /></div>
|
||||||
|
</div>
|
||||||
|
<div class='description_loader'>
|
||||||
|
<% @images.each do |image| %>
|
||||||
|
<div class="rgphoto_edit">
|
||||||
|
<a href="orbit_gallery?theater=<%= image.id %>"><img src="<%= image.file.thumb.url %>"></a>
|
||||||
|
<div class="inputui rginput rgih98 w380">
|
||||||
|
<textarea name="edit[description][<%= locale %>]" class="txtchange" for="<%= image.id%>"><%= image.description_translations[locale] %></textarea>
|
||||||
|
</div>
|
||||||
|
<div class="edit_fn">
|
||||||
|
<% if image.id.to_s == @cover %>
|
||||||
|
<a class="btn btn-primary rgbtsg bt-cover setcover active" onclick="return false;" title="Cover" href="<%= image.id %>"><span class="icon-star icon-white"></span></a>
|
||||||
|
<% else %>
|
||||||
|
<a class="btn rgbtsg bt-cover" onclick="return false;" title="Set Cover" href="<%= image.id %>"><span class="icon-star-empty"></span></a>
|
||||||
|
<% end %>
|
||||||
|
<a class="btn rgbtsg bt-tag" onclick="return false;" title="Tags" href="<%= image.id %>"><span class="icon-tags"></span></a>
|
||||||
|
<a class="btn rgbtsg bt-dels" onclick="return false;" title="Delete" href="<%= image.id %>"><span class="icon-trash"></span></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="albumname_edit">
|
<div class="albumname_edit">
|
||||||
|
|
|
@ -92,8 +92,8 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tag_search"><div class="icon-search"></div><input type="text" value="<%= t('gallery.search_tags') %>" onblur="if(this.value=='')this.value='<%= t('gallery.search_tags') %>';" onfocus="if(this.value=='<%= t("gallery.search_tags") %>')this.value='';" id="tag_search_box"><div class="tag_save"><a class="btn bt-save"><i class="icon-ok"></i><%= I18n.t("gallery.save") %></a></div></div>
|
<a class="btn bt-save" style="position:absolute; bottom: 0;"><i class="icon-ok"></i><%= I18n.t("gallery.save") %></a>
|
||||||
|
<div class="tag_search"><div class="icon-search"></div><input type="text" value="<%= t('gallery.search_tags') %>" onblur="if(this.value=='')this.value='<%= t('gallery.search_tags') %>';" onfocus="if(this.value=='<%= t("gallery.search_tags") %>')this.value='';" id="tag_search_box"></div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
|
@ -28,5 +28,3 @@ en:
|
||||||
cate_auth: Category Authorization
|
cate_auth: Category Authorization
|
||||||
cancel: Cancel
|
cancel: Cancel
|
||||||
search_tags: Search Tags
|
search_tags: Search Tags
|
||||||
cover: Album Cover
|
|
||||||
set_cover: Set as Album Cover
|
|
|
@ -28,5 +28,3 @@ zh_tw:
|
||||||
cate_auth: 類別權限
|
cate_auth: 類別權限
|
||||||
cancel: 取消
|
cancel: 取消
|
||||||
search_tags: 搜尋標籤
|
search_tags: 搜尋標籤
|
||||||
cover: 封面
|
|
||||||
set_cover: 設為封面
|
|
Loading…
Reference in New Issue