calendar "edit calendar" update

This commit is contained in:
devin 2012-11-01 15:21:42 +08:00 committed by chris
parent 295aef32ab
commit e5d31f50a0
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>
@ -16,3 +14,6 @@
</td> </td>
<% end %> <% end %>
</tr> </tr>
<tr class="with_action">
<td colspan="3" id="edit_area_<%= calendar.id %>" style="display:none;"></td>
</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>
<div>
<%= f.fields_for :name_translations do |name| %> <%= f.fields_for :name_translations do |name| %>
<% @site_valid_locales.each_with_index do |locale, i| %> <% @site_valid_locales.each_with_index do |locale, i| %>
<div class="control-group"> <td class="form-inline">
<%= label_tag(locale, t("calendar.name")+"-"+I18nVariable.from_locale(locale)) %> <%= name.text_field locale, :class => "input-large", :value=>@calendar.name_translations[locale] %>
<div class="controls"> </td>
<%= name.text_field locale, :class => "input-xxlarge", :size=>"30", :value=>@calendar.name_translations[locale] %>
</div>
</div>
<% end %> <% end %>
<% end %> <% end %>
</div> </tr>
<div class=""> <tr>
<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 %>