calendar "edit calendar" update

This commit is contained in:
devin 2012-11-01 15:21:42 +08:00
parent d904163090
commit 9bf812b8d9
4 changed files with 40 additions and 26 deletions

View File

@ -338,6 +338,21 @@
margin: 4px 0 0 0; margin: 4px 0 0 0;
} }
/* category edit */
.edit_cal {
margin: -8px;
background-color: whitesmoke;
}
.edit_cal .table td, .edit_cal .table {
border: 0 !important;
background-color: transparent !important;
margin: 0 !important;
}
.main-list td {
border-top: solid 1px #ddd;
}
/* create / edit event panel */ /* create / edit event panel */
#tags_panel { #tags_panel {
top: auto; top: auto;

View File

@ -1,8 +1,6 @@
<tr class="with_action" for="<%= calendar.id.to_s %>"> <tr class="with_action" for="<%= calendar.id.to_s %>">
<td> <td>
<span class="calendars_color_tag" style="background-color: <%= calendar.color %>"></span> <span class="calendars_color_tag" style="background-color: <%= calendar.color %>"></span>
<div id="edit_area_<%= calendar.id %>" style="display:hidden;"></div>
<div class="quick-edit"> <div class="quick-edit">
<ul class="nav nav-pills hide"> <ul class="nav nav-pills hide">
<li><%= link_to t("calendar.edit"), edit_panel_calendar_back_end_cal_path(calendar), :remote => true, :class=>"btn-edit-a", :for => calendar.id %></li> <li><%= link_to t("calendar.edit"), edit_panel_calendar_back_end_cal_path(calendar), :remote => true, :class=>"btn-edit-a", :for => calendar.id %></li>
@ -15,4 +13,7 @@
<%= calendar.name_translations[locale] %> <%= calendar.name_translations[locale] %>
</td> </td>
<% end %> <% end %>
</tr>
<tr class="with_action">
<td colspan="3" id="edit_area_<%= calendar.id %>" style="display:none;"></td>
</tr> </tr>

View File

@ -1,26 +1,23 @@
<%= form_for @calendar, :url => panel_calendar_back_end_cal_path(@calendar), :remote => true do |f| %> <%= form_for @calendar, :url => panel_calendar_back_end_cal_path(@calendar), :remote => true do |f| %>
<h4>Edit</h4> <table class="table" style="table-layout: fixed;">
<div class="row-fluid"> <tr>
<div class="span2"> <td>
<%= label_tag("color", t("calendar.color")) %> <!--<%= label_tag("color", t("calendar.color")) %>-->
<%= f.text_field :color, :class => "color-picker miniColors", :size => "5", :maxlength => "5", :autocomplete=>"off",:value=>@calendar.color %> <%= f.text_field :color, :class => "color-picker miniColors input-small", :maxlength => "5", :autocomplete=>"off",:value=>@calendar.color %>
</div> </td>
</div> <%= f.fields_for :name_translations do |name| %>
<% @site_valid_locales.each_with_index do |locale, i| %>
<div> <td class="form-inline">
<%= f.fields_for :name_translations do |name| %> <%= name.text_field locale, :class => "input-large", :value=>@calendar.name_translations[locale] %>
<% @site_valid_locales.each_with_index do |locale, i| %> </td>
<div class="control-group"> <% end %>
<%= label_tag(locale, t("calendar.name")+"-"+I18nVariable.from_locale(locale)) %>
<div class="controls">
<%= name.text_field locale, :class => "input-xxlarge", :size=>"30", :value=>@calendar.name_translations[locale] %>
</div>
</div>
<% end %> <% end %>
<% end %> </tr>
</div> <tr>
<div class=""> <td colspan="3">
<%= f.submit t("calendar.save"), :class=>"btn btn-primary" %> <%= f.submit t("calendar.save"), :class=>"btn btn-primary" %>
<button class="btn btn-primary bt-cancel" for="<%= @calendar.id %>">Cancel</button> <button class="btn btn-primary bt-cancel" for="<%= @calendar.id %>">Cancel</button>
</div> </td>
</tr>
</table>
<% end %> <% end %>

View File

@ -1,5 +1,6 @@
<%= stylesheet_link_tag "jquery.miniColors" %> <%= stylesheet_link_tag "jquery.miniColors" %>
<%= stylesheet_link_tag "calendar" %> <%= stylesheet_link_tag "calendar" %>
<%= stylesheet_link_tag "bootstrap-responsive" %>
<%= javascript_include_tag "jquery.miniColors.min" %> <%= javascript_include_tag "jquery.miniColors.min" %>
<% content_for :page_specific_javascript do %> <% content_for :page_specific_javascript do %>
<%= javascript_include_tag "calendarAPI" %> <%= javascript_include_tag "calendarAPI" %>
@ -57,7 +58,7 @@
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
<div class="form-actions pagination-right"> <div class="form-actions form-fixed pagination-right">
<%= f.submit t("calendar.save"), :class=>"btn btn-primary" %> <%= f.submit t("calendar.save"), :class=>"btn btn-primary" %>
</div> </div>
<% end %> <% end %>