Merge branch 'dev_hjq' of https://git.trustie.net/jacknudt/trustieforge into dev_hjq
commit
06b89c5108
@ -0,0 +1,16 @@
|
|||||||
|
<script type="text/javascript">
|
||||||
|
$(function(){
|
||||||
|
$("#RSide").removeAttr("id");
|
||||||
|
$("#Container").css("width","1000px");
|
||||||
|
$("#message_subject").focus();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<div class="homepageRight mt0 ml10">
|
||||||
|
<div class="homepageRightBanner">
|
||||||
|
<div class="NewsBannerName">
|
||||||
|
编辑帖子
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<%= render :partial => 'boards/project_new_topic',
|
||||||
|
:locals => {:f => f, :edit_mode => edit_mode, :topic => topic, :project => project} %>
|
||||||
|
</div>
|
@ -1,79 +1,79 @@
|
|||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
input.is_public,input.is_public_checkbox{height:12px;}
|
input.is_public,input.is_public_checkbox{height:12px;}
|
||||||
input.is_public_checkbox{margin-left:4px;margin-right:4px;}
|
input.is_public_checkbox{margin-left:4px;margin-right:4px;}
|
||||||
</style>
|
</style>
|
||||||
<div class="fl">
|
<div class="fl">
|
||||||
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
|
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
|
||||||
<% if defined?(container) && container && container.saved_attachments %>
|
<% if defined?(container) && container && container.saved_attachments %>
|
||||||
<% container.attachments.each_with_index do |attachment, i| %>
|
<% container.attachments.each_with_index do |attachment, i| %>
|
||||||
<span id="attachments_p<%= i %>" class="attachment">
|
<span id="attachments_p<%= i %>" class="attachment">
|
||||||
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly => 'readonly') %><%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style => "display: inline-block;") %><span class="ispublic-label"><%= l(:field_is_public) %>:</span>
|
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly => 'readonly') %><%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style => "display: inline-block;") %><span class="ispublic-label"><%= l(:field_is_public) %>:</span>
|
||||||
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public, attachment.is_public == 1 ? true : false, :class => 'is_public') %>
|
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public, attachment.is_public == 1 ? true : false, :class => 'is_public') %>
|
||||||
<%= if attachment.id.nil?
|
<%= if attachment.id.nil?
|
||||||
#待补充代码
|
#待补充代码
|
||||||
else
|
else
|
||||||
link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload')
|
link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload')
|
||||||
end
|
end
|
||||||
%>
|
%>
|
||||||
<%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>
|
<%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>
|
||||||
|
|
||||||
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||||
</span>
|
</span>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% container.saved_attachments.each_with_index do |attachment, i| %>
|
<% container.saved_attachments.each_with_index do |attachment, i| %>
|
||||||
<span id="attachments_p<%= i %>" class="attachment">
|
<span id="attachments_p<%= i %>" class="attachment">
|
||||||
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly => 'readonly') %>
|
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly => 'readonly') %>
|
||||||
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style => "display: inline-block;") %>
|
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style => "display: inline-block;") %>
|
||||||
<span class="ispublic-label"><%= l(:field_is_public) %>:</span>
|
<span class="ispublic-label"><%= l(:field_is_public) %>:</span>
|
||||||
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public, attachment.is_public == 1 ? true : false, :class => 'is_public') %>
|
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public, attachment.is_public == 1 ? true : false, :class => 'is_public') %>
|
||||||
<%= if attachment.id.nil?
|
<%= if attachment.id.nil?
|
||||||
#待补充代码
|
#待补充代码
|
||||||
else
|
else
|
||||||
link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload')
|
link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload')
|
||||||
end
|
end
|
||||||
%>
|
%>
|
||||||
<%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>
|
<%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>
|
||||||
|
|
||||||
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||||
</span>
|
</span>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<span class="add_attachment" style="font-weight:normal;">
|
<span class="add_attachment" style="font-weight:normal;">
|
||||||
<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
|
<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
|
||||||
<!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%-->
|
<!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%-->
|
||||||
<%#= button_tag "文件浏览", :type=>"button", :onclick=>"$('#_file').click();",:onmouseover => 'this.focus()',:class => 'sub_btn' %>
|
<%#= button_tag "文件浏览", :type=>"button", :onclick=>"$('#_file').click();",:onmouseover => 'this.focus()',:class => 'sub_btn' %>
|
||||||
<a href="javascript:void(0);" onclick="_file.click();" class="AnnexBtn fl mr15">上传附件</a>
|
<a href="javascript:void(0);" onclick="_file.click();" class="AnnexBtn fl mr15">上传附件</a>
|
||||||
<%= file_field_tag 'attachments[dummy][file]',
|
<%= file_field_tag 'attachments[dummy][file]',
|
||||||
:id => '_file',
|
:id => '_file',
|
||||||
:class => 'file_selector',
|
:class => 'file_selector',
|
||||||
:multiple => true,
|
:multiple => true,
|
||||||
:onchange => 'addInputFiles(this);',
|
:onchange => 'addInputFiles(this);',
|
||||||
:style => ie8? ? '' : 'display:none',
|
:style => ie8? ? '' : 'display:none',
|
||||||
:data => {
|
:data => {
|
||||||
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
||||||
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||||
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||||
:upload_path => uploads_path(:format => 'js'),
|
:upload_path => uploads_path(:format => 'js'),
|
||||||
:description_placeholder => l(:label_optional_description),
|
:description_placeholder => l(:label_optional_description),
|
||||||
:field_is_public => l(:field_is_public),
|
:field_is_public => l(:field_is_public),
|
||||||
:are_you_sure => l(:text_are_you_sure),
|
:are_you_sure => l(:text_are_you_sure),
|
||||||
:file_count => l(:label_file_count),
|
:file_count => l(:label_file_count),
|
||||||
:lebel_file_uploding => l(:lebel_file_uploding),
|
:lebel_file_uploding => l(:lebel_file_uploding),
|
||||||
:delete_all_files => l(:text_are_you_sure_all)
|
:delete_all_files => l(:text_are_you_sure_all)
|
||||||
} %>
|
} %>
|
||||||
<span id="upload_file_count">
|
<span id="upload_file_count">
|
||||||
<%= l(:label_no_file_uploaded) %>
|
<%= l(:label_no_file_uploaded) %>
|
||||||
</span>
|
</span>
|
||||||
(<%= l(:label_max_size) %>:
|
(<%= l(:label_max_size) %>:
|
||||||
<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
|
<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<% content_for :header_tags do %>
|
<% content_for :header_tags do %>
|
||||||
<%= javascript_include_tag 'attachments' %>
|
<%= javascript_include_tag 'attachments' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in new issue