address field and text field convert

This commit is contained in:
Matthew K. Fu JuYuan committed 2012-11-15 17:23:39 +08:00
1 parent 39612b879c
commit 995bdbc86c
10 files changed
+217 -116

No files matched your search

-8
View File
@@ -42,14 +42,6 @@
var NewNode;
$(document).ready(function(){
// function mas(){
// $('.site-map').masonry({
// itemSelector: '.map-block',
// columnWidth: 450,
// isAnimated: true
// });
// }
function checkSwitch() {
$(".groups").addClass('disabled').has('.groups > .form-horizontal > div:not(.hide)').removeClass('disabled');
}
@@ -13,7 +13,8 @@
<%= javascript_include_tag "lib/contenteditable" %>
<%= javascript_include_tag "inc/ploy_input_field" %>
<%= javascript_include_tag "inc/input_module" %>
<%= javascript_include_tag "inc/attribute_panel_select" %>
<%= javascript_include_tag "inc/attribute_onoff" %>
<% end -%>
@@ -1,4 +1,4 @@
<div class="modal hide fade address-edit <%= btn_class %>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal hide fade address-edit <%= btn_class %>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" id=<%= html_id%>>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel"><%= (field_name rescue nil) || t("address_modal.default_title") %></h3>
@@ -7,8 +7,8 @@
<div class="tabbable">
<ul class="nav nav-tabs">
<% VALID_LOCALES.each do |locale|%>
<% active = (locale == VALID_LOCALES.first ? "active" : nil ) %>
<%= content_tag :i,:class=>active do%>
<% active = (locale == I18n.locale.to_s ? ["active"] : [] ) %>
<%= content_tag :li,:class=>active.push("modal_tab","address_tab").join(' '),:for=>locale do%>
<%= link_to t("langs.#{locale}"),".#{btn_class}.address_modal.#{locale}",:data=>{:toggle=>"tab"}%>
<% end %>
<% end %>
@@ -16,36 +16,36 @@
<div class="tab-content">
<% VALID_LOCALES.each do |locale|%>
<!-- start of lang tab context -->
<% active = (locale == VALID_LOCALES.first ? "active" : "" ) %>
<% active = (locale == I18n.locale.to_s ? "active" : "" ) %>
<div class="tab-pane <%= active %> fade in <%= "#{btn_class} address_modal #{locale}" %>" for="<%= locale %>">
<div class="control-group">
<label class="control-label" for="street_address"><%= t("address_modal.street_address") %></label>
<div class="controls">
<%= text_area_tag("#{btn_class}_street_address_#{locale}",nil,:rows=>3) %>
<%= text_area_tag("#{btn_class}_street_address_#{locale}",nil,:rows=>3,:func=>'street_address') %>
</div>
</div>
<div class="control-group">
<label class="control-label" for="city"><%= t("address_modal.city") %></label>
<div class="controls">
<%= text_field_tag("#{btn_class}_city_#{locale}") %>
<%= text_field_tag("#{btn_class}_city_#{locale}",'',:func=>'city') %>
</div>
</div>
<div class="control-group">
<label class="control-label" for="counties"><%= t("address_modal.county") %></label>
<div class="controls">
<%= text_field_tag("#{btn_class}_county_#{locale}") %>
<%= text_field_tag("#{btn_class}_county_#{locale}",'',:func=>'county') %>
</div>
</div>
<div class="control-group">
<label class="control-label" for="zip"><%= t("address_modal.zip") %></label>
<div class="controls">
<%= text_field_tag("#{btn_class}_zip_#{locale}",nil,:class=>"input-mini") %>
<%= text_field_tag("#{btn_class}_zip_#{locale}",nil,:class=>"input-mini",:func=>'zip') %>
</div>
</div>
<div class="control-group">
<label class="control-label" for="country"><%= t("address_modal.country") %></label>
<div class="controls">
<%= text_field_tag("#{btn_class}_country_#{locale}") %>
<%= text_field_tag("#{btn_class}_country_#{locale}",'',:func=>'country') %>
</div>
</div>
</div>