gallery update

This commit is contained in:
devin 2012-08-21 14:31:25 +08:00 committed by Christophe Vilayphiou
parent ede9727a18
commit 584d1eb0e0
3 changed files with 18 additions and 5 deletions

View File

@ -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="tag_item">' + album.tag_names[tag] + '</span>'; tag_string+= '<span class="label label-tags">' + 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);

View File

@ -491,8 +491,14 @@
top: 50%; top: 50%;
margin-top: -7px; margin-top: -7px;
} }
#tag_panel .bt-save { #tag_panel .tag_save {
position: absolute;
right: 0;
bottom: 0;
height: 31px;
border-left: solid 1px #ccc;
background-color: #fff;
padding: 2px 4px 0 4px;
} }
@ -520,3 +526,10 @@
.o_album .rgbody { .o_album .rgbody {
margin: 10px 8px; margin: 10px 8px;
} }
.o_gallery .tagnames {
display: inline-block;
}
.o_gallery .label-tags {
display: inline-block;
margin: 0 6px 6px 0;
}

View File

@ -92,8 +92,8 @@
</ul> </ul>
</div> </div>
</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 class="tag_save"><a class="btn bt-save"><i class="icon-ok"></i><%= I18n.t("gallery.save") %></a></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>
</div> </div>
<% end %> <% end %>
<script type="text/javascript"> <script type="text/javascript">