Fix bugs:

Page content: after edit and redirect to index, there's a gap between the headers and the first row
	TinyMCE: the size of the textarea change depending on the language
This commit is contained in:
chris 2012-11-01 09:30:12 +08:00
parent bc9082a858
commit 451d73897b
4 changed files with 12 additions and 11 deletions

View File

@ -14,7 +14,8 @@ function load_tinymce() {
theme_advanced_toolbar_align : "left", theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom", theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true, theme_advanced_resizing : true,
relative_urls : false, relative_urls : false,
// Skin options // Skin options
skin : "o2k7", skin : "o2k7",
skin_variant : "silver", skin_variant : "silver",
@ -46,7 +47,11 @@ function load_tinymce() {
// Valide HTML elements // Valide HTML elements
valid_elements : '*[*]', valid_elements : '*[*]',
valid_children : '*[*]' valid_children : '*[*]',
// Height & width
height : '400',
width : '100%'
}); });
} }
function myFileBrowser(field_name, url, type, win) { function myFileBrowser(field_name, url, type, win) {

View File

@ -20,16 +20,14 @@
<img class="pull-left upload-picture" src="/assets/default-img.png" /> <img class="pull-left upload-picture" src="/assets/default-img.png" />
<% end %> <% end %>
</div> </div>
<span class="alert widgetInfo"><%= t("ad.widget_info_for_ad_image_size", :best_size=> "290px x 150px") %></span>
<div class="controls file-upload input-prepend"> <div class="controls file-upload input-prepend">
<label class="control-label add-on btn" for="input-upload">
<%= t(:browse) %> <%= t(:browse) %>
<%= f.file_field :image, :id => "input-upload", :class => 'upload', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %> <%= f.file_field :image, :id => "input-upload", :class => '', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %>
</label> <!-- <span id='fu' class="file-name"></span>
<span id='fu' class="file-name"></span>
<br> <br>
<input name='fu' class="input-medium" type="text"> <input name='fu' class="input-medium" type="text">
<span class="alert widgetInfo"><%= t("ad.widget_info_for_ad_image_size", :best_size=> "290px x 150px") %></span> <br> -->
<br>
<% if @news_bulletin.image.file %> <% if @news_bulletin.image.file %>
<%= f.check_box :remove_image %> <%= f.check_box :remove_image %>
<%= t(:delete_file) %> <%= t(:delete_file) %>

View File

@ -25,7 +25,7 @@
<%= f.label :context, t(:content) %> <%= f.label :context, t(:content) %>
<%= f.fields_for :context_translations do |f| %> <%= f.fields_for :context_translations do |f| %>
<%= I18nVariable.from_locale(locale) %> <%= I18nVariable.from_locale(locale) %>
<%= f.text_area locale, :style => "width:100%;height:400px;", :class => 'tinymce_textarea', :value => (@page_context.context_translations[locale] rescue nil) %> <%= f.text_area locale, :style => "width:100%;", :class => 'tinymce_textarea', :value => (@page_context.context_translations[locale] rescue nil) %>
<% end %> <% end %>
</div> </div>

View File

@ -1,5 +1,3 @@
<%= flash_messages %>
<%= render 'filter' %> <%= render 'filter' %>
<table class="table main-list"> <table class="table main-list">