gallery update
This commit is contained in:
		
							parent
							
								
									9430f66bee
								
							
						
					
					
						commit
						93da8520ed
					
				|  | @ -87,7 +87,7 @@ var galleryAPI = function(){ | ||||||
| 	} | 	} | ||||||
| 	this.makeNewAlbum = function(){ | 	this.makeNewAlbum = function(){ | ||||||
| 		$.get("add_album",function(html){ | 		$.get("add_album",function(html){ | ||||||
| 			rcom.modalWindow({loadHtml:html,width:400,"closeBtn":false},function(dom){ | 			rcom.modalWindow({loadHtml:html,width:400,height:320,"closeBtn":false},function(dom){ | ||||||
| 				dom.find("#album_name_save_btn").click(function(){ | 				dom.find("#album_name_save_btn").click(function(){ | ||||||
| 					var options ={ | 					var options ={ | ||||||
| 						cid : dom.find("select#category_list").val(), | 						cid : dom.find("select#category_list").val(), | ||||||
|  |  | ||||||
|  | @ -537,4 +537,11 @@ | ||||||
| 
 | 
 | ||||||
| .o_gallery .rgbody, .o_album .rgbody { | .o_gallery .rgbody, .o_album .rgbody { | ||||||
| 	padding: 10px 8px; | 	padding: 10px 8px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | #categories .add-album .control-label { | ||||||
|  | 	text-align: left; | ||||||
|  | 	width: 100px; | ||||||
|  | 	padding-left: 12px; | ||||||
|  | 	padding-right: 12px; | ||||||
| } | } | ||||||
|  | @ -1,20 +1,31 @@ | ||||||
| <div class="modal-window" id="categories"> | <div class="modal-window" id="categories"> | ||||||
|   <div class="modal-header"> |   <div class="modal-header"> | ||||||
|     <h3><%= t("gallery.album_name") %></h3> |     <h3><%= t("gallery.add_album") %></h3> | ||||||
|   </div> |   </div> | ||||||
|   <div class="modal-body"> |   <div class="modal-body add-album"> | ||||||
|     <p>Category: |  | ||||||
|     <select id="category_list"> |     <select id="category_list"> | ||||||
|         <option value=""><%= t("gallery.select_category") %></option> |         <option value=""><%= t("gallery.select_category") %></option> | ||||||
|       <% @categorylist.each do |category| %> |       <% @categorylist.each do |category| %> | ||||||
|         <option value='<%= category.id %>' ><%= category.name %></option> |         <option value='<%= category.id %>' ><%= category.name %></option> | ||||||
|       <% end %> |       <% end %> | ||||||
|     </select> |     </select> | ||||||
|   </p> |     <ul class="nav nav-tabs"> | ||||||
|   <p><%= t("gallery.album_name") %>[<%=t("gallery.english")%>]: <input type="text" id="name_en" /></p> |       <% @site_valid_locales.each_with_index do |locale, i| %> | ||||||
|   <p><%= t("gallery.album_name") %>[<%=t("gallery.chinese")%>]: <input type="text" id="name_zh_tw" /></p> |         <li <%= ( i == 0 ) ? " class='active'" : '' %>><a data-toggle="tab" href=".<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li> | ||||||
|   <p><%= t("gallery.album_desc") %>[<%=t("gallery.english")%>]: <input type="text" id="desc_en" /></p> |       <% end %> | ||||||
|   <p><%= t("gallery.album_desc") %>[<%=t("gallery.chinese")%>]: <input type="text" id="desc_zh_tw" /></p> |     </ul> | ||||||
|  |     <div class="tab_content form-horizontal"> | ||||||
|  |       <% @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" > | ||||||
|  |       <% end %> | ||||||
|  |         <p class="control-group"><label class="control-label"><%= t("gallery.album_name") %></label><input type="text" id="name_<%= locale %>" /></p> | ||||||
|  |         <p class="control-group"><label class="control-label"><%= t("gallery.album_desc") %></label><input type="text" id="desc_<%= locale %>" /></p> | ||||||
|  |       </div> | ||||||
|  |     <% end %> | ||||||
|  |     </div> | ||||||
|   </div> |   </div> | ||||||
|   <div class="modal-footer"> |   <div class="modal-footer"> | ||||||
|     <a href="#" class="btn" data-dismiss="modal" id="album_name_close_btn" onclick="return false;"><%= t("gallery.close") %></a> |     <a href="#" class="btn" data-dismiss="modal" id="album_name_close_btn" onclick="return false;"><%= t("gallery.close") %></a> | ||||||
|  |  | ||||||
|  | @ -4,7 +4,6 @@ | ||||||
| 	<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 %> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue