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 tag_string = ""; | ||||
| 					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); | ||||
| 					g.albumArea.find("#imgholder").append($img); | ||||
|  |  | |||
|  | @ -43,17 +43,10 @@ | |||
| .rgalbum, .rgphoto { float: left; margin: 0 10px 24px 0; } | ||||
| .rgalbum { | ||||
| 	padding: 16px; | ||||
| 	margin: 0 8px 8px 0; | ||||
| 	border: solid 1px #ccc; | ||||
| 	margin: 0; | ||||
| 	border-right: solid 1px #ccc; | ||||
| 	border-bottom: solid 1px #ccc; | ||||
| 	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 {		 | ||||
| 	transition: all, 0.5s ease; | ||||
|  | @ -62,23 +55,8 @@ | |||
| 	-ms-transition: all, 0.5s ease; | ||||
| 	} | ||||
| .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 {  | ||||
| 	display: block; | ||||
| 	border-radius: 3px; | ||||
| 	display: block;	 | ||||
| 	transition: all, 0.3s ease; | ||||
| 	-webkit-transition: all, 0.3s ease; | ||||
| 	-moz-transition: all, 0.3s ease; | ||||
|  | @ -104,6 +82,7 @@ | |||
| 	clear: both; | ||||
| 	overflow: hidden; | ||||
| 	margin-bottom: 10px; | ||||
| 	border-bottom: solid 1px #fcfcfc; | ||||
| } | ||||
| .albumname_edit label {  | ||||
| 	width: 120px; | ||||
|  | @ -357,6 +336,23 @@ | |||
| 	padding: 6px; | ||||
| 	} | ||||
| .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-addnew { | ||||
| 	margin: 0 auto; | ||||
|  | @ -495,14 +491,8 @@ | |||
| 	top: 50%; | ||||
| 	margin-top: -7px; | ||||
| } | ||||
| #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; | ||||
| #tag_panel .bt-save { | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | @ -527,21 +517,6 @@ | |||
| } | ||||
| #orbit_gallery .form-actions { background-color: whiteSmoke; } | ||||
| 
 | ||||
| .o_gallery .tagnames { | ||||
| 	display: inline-block; | ||||
| .o_album .rgbody { | ||||
| 	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> | ||||
| </ul> | ||||
| <ul class="nav nav-tabs"> | ||||
| 	<%# @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> | ||||
| 	<% end %> | ||||
| </ul> | ||||
| <form id="edit_album" action="update_album" method="post"> | ||||
| 	<div class="tab_content"> | ||||
| 		<% @site_valid_locales.each_with_index do |locale, i| %> | ||||
| 			<% if i == 0 %> | ||||
| 				<div class="<%= locale %> fade tab-pane in active"> | ||||
| 			<% else %> | ||||
| 				<div class="<%= locale %> fade tab-pane" > | ||||
| <form id="edit_album"> | ||||
| <div class="tab_content"> | ||||
| 	<% i = 0 %> | ||||
| 	<% @site_valid_locales.each do |locale| %> | ||||
| 	<% if i == 0 %> | ||||
| 		<div class="<%= locale %> fade tab-pane in active"> | ||||
| 	<% 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 %> | ||||
| 
 | ||||
| 			<div class="albumname_edit"> | ||||
|  |  | |||
|  | @ -92,8 +92,8 @@ | |||
|         </ul> | ||||
|       </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> | ||||
|   <% end %> | ||||
|   <script type="text/javascript"> | ||||
|  |  | |||
|  | @ -28,5 +28,3 @@ en: | |||
|     cate_auth: Category Authorization | ||||
|     cancel: Cancel | ||||
|     search_tags: Search Tags | ||||
|     cover: Album Cover | ||||
|     set_cover: Set as Album Cover | ||||
|  | @ -28,5 +28,3 @@ zh_tw: | |||
|     cate_auth: 類別權限 | ||||
|     cancel: 取消 | ||||
|     search_tags: 搜尋標籤 | ||||
|     cover: 封面 | ||||
|     set_cover: 設為封面 | ||||
		Loading…
	
		Reference in New Issue