gallery update

please don't forget to add translation in other language
This commit is contained in:
devin 2012-10-24 09:47:09 +08:00 committed by chris
parent 79e0b8e383
commit 8c6e5deb64
6 changed files with 10 additions and 10 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -55,7 +55,7 @@ var galleryAPI = function(){
} }
this.makeNewAlbum = function(path){ this.makeNewAlbum = function(path){
$.get(path,function(html){ $.get(path,function(html){
rcom.modalWindow({loadHtml:html,width:400,height:320,"closeBtn":false},function(dom){ rcom.modalWindow({loadHtml:html,width:320,height:320,"closeBtn":false},function(dom){
$("form#new_gallery_album").submit(function(){ $("form#new_gallery_album").submit(function(){
var validated = true; var validated = true;
$(this).find(".error").removeClass("error"); $(this).find(".error").removeClass("error");

View File

@ -270,8 +270,8 @@
.slidelist a { .slidelist a {
border: solid 2px #fff; border: solid 2px #fff;
display: block; display: block;
width: 120px; width: 150px;
height: 90px; height: 120px;
position: relative; position: relative;
box-shadow: 0 0 6px rgba(0,0,0,0.7); box-shadow: 0 0 6px rgba(0,0,0,0.7);

View File

@ -4,10 +4,10 @@
</div> </div>
<%= form_for @album, :url => {:action => "create"}, :remote => true do |f| %> <%= form_for @album, :url => {:action => "create"}, :remote => true do |f| %>
<div class="modal-body add-album"> <div class="modal-body add-album">
<div> <%= f.select(:gallery_category_id, GalleryCategory.all.collect {|p| [ p.name, p.id ] },{:prompt => t("gallery.select_category")},:class => "validate") %> </div> <div> <%= f.select(:gallery_category_id, GalleryCategory.all.collect {|p| [ p.name, p.id ] },{:prompt => t("gallery.select_category")},:class => "validate input-xlarge") %> </div>
<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| %>
<li <%= ( i == 0 ) ? " class='active'" : '' %>><a data-toggle="tab" href=".<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li> <li class=<%= ( i == 0 ) ? "active" : "" %>><a data-toggle="tab" href=".<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
<% end %> <% end %>
</ul> </ul>
<div class="tab_content form-horizontal"> <div class="tab_content form-horizontal">
@ -20,7 +20,7 @@
<% end %> <% end %>
<p class="control-group"> <p class="control-group">
<%= label_tag(locale, t("gallery.album_name")) %> <%= label_tag(locale, t("gallery.album_name")) %>
<%= name.text_field locale, :class => "validate" %> <%= name.text_field locale, :class => "validate input-xlarge" %>
</p> </p>
</div> </div>
<% end %> <% end %>
@ -34,7 +34,7 @@
<% end %> <% end %>
<p class="control-group"> <p class="control-group">
<%= label_tag(locale, t("gallery.album_desc")) %> <%= label_tag(locale, t("gallery.album_desc")) %>
<%= desc.text_field locale %> <%= desc.text_field locale, :class => "input-xlarge" %>
</p> </p>
</div> </div>
<% end %> <% end %>

View File

@ -1,8 +1,7 @@
<div id="tags" class="clear"> <div id="tags" class="clear">
<%= render :partial => 'category', :collection => @categorylist %> <%= render :partial => 'category', :collection => @categorylist %>
</div> </div>
<div class="form-actions form-fixed pagination-right"> <div class="form-actions form-fixed form-inline pagination-right">
<div style="margin:0;padding:0;display:inline">
<%= form_for @new_category, :url => {:action => "create"}, :remote => true do |f| %> <%= form_for @new_category, :url => {:action => "create"}, :remote => true do |f| %>
<%= f.fields_for :name_translations do |name| %> <%= f.fields_for :name_translations do |name| %>
<% @site_valid_locales.each do |locale| %> <% @site_valid_locales.each do |locale| %>
@ -12,7 +11,6 @@
<% end %> <% end %>
<%= f.submit t("gallery.save"), :class=> "btn btn-primary" %> <%= f.submit t("gallery.save"), :class=> "btn btn-primary" %>
<% end %> <% end %>
</div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
var deleteCategory = function(a){ var deleteCategory = function(a){

View File

@ -30,3 +30,5 @@ zh_tw:
search_tags: 搜尋標籤 search_tags: 搜尋標籤
cover: 封面 cover: 封面
set_cover: 設為封面 set_cover: 設為封面
sure?: "你確定嗎?"
no_description: 沒有描述