Merge branch 'szzh' into guange_dev
This commit is contained in:
commit
a77a572a4d
|
@ -80,7 +80,7 @@ class BoardsController < ApplicationController
|
|||
includes(:last_reply).
|
||||
limit(@topic_pages.per_page).
|
||||
offset(@topic_pages.offset).
|
||||
order(sort_clause).
|
||||
order("last_replies_messages.created_on desc").
|
||||
preload(:author, {:last_reply => :author}).
|
||||
all
|
||||
elsif @course
|
||||
|
@ -88,7 +88,7 @@ class BoardsController < ApplicationController
|
|||
includes(:last_reply).
|
||||
# limit(@topic_pages.per_page).
|
||||
# offset(@topic_pages.offset).
|
||||
order(sort_clause).
|
||||
order("last_replies_messages.created_on desc").
|
||||
preload(:author, {:last_reply => :author}).
|
||||
all : []
|
||||
@topics = paginateHelper board_topics,10
|
||||
|
|
|
@ -593,6 +593,17 @@ module ApplicationHelper
|
|||
Project.project_tree(projects, &block)
|
||||
end
|
||||
|
||||
# 判断当前用户是否为项目管理员
|
||||
def is_project_manager?(user_id,project_id)
|
||||
@result = false
|
||||
mem = Member.where("user_id = ? and project_id = ?",user_id, project_id)
|
||||
unless mem.blank?
|
||||
mem.first.roles.to_s.include?("Manager")
|
||||
@result = false
|
||||
end
|
||||
return @result
|
||||
end
|
||||
|
||||
def principals_check_box_tags(name, principals)
|
||||
s = ''
|
||||
principals.each do |principal|
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
<% container.saved_attachments.each_with_index do |attachment, i| %>
|
||||
<span id="attachments_p<%= i %>" class="attachment">
|
||||
|
@ -34,10 +35,12 @@
|
|||
|
||||
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
<% project = project %>
|
||||
<div class="cl"></div>
|
||||
<span class="add_attachment" style="font-weight:normal;">
|
||||
<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
|
||||
<!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%-->
|
||||
|
|
|
@ -1,4 +1,72 @@
|
|||
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
|
||||
<% if defined?(container) %>
|
||||
<span id="attachments_fields<%= container.id %>" class="attachments_fields" xmlns="http://www.w3.org/1999/html">
|
||||
<% if defined?(container) && container && container.saved_attachments %>
|
||||
<% if isReply %>
|
||||
<% container.saved_attachments.each_with_index do |attachment, i| %>
|
||||
<span id="attachments_p<%= i %>" class="sub_btn">
|
||||
|
||||
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%>
|
||||
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 255, :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_checkbox')%>
|
||||
|
||||
<%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %>
|
||||
<%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>
|
||||
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% container.attachments.each_with_index do |attachment, i| %>
|
||||
<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 => 255, :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_checkbox')%>
|
||||
|
||||
<%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %>
|
||||
<%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>
|
||||
|
||||
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
<script type='text/javascript'>
|
||||
// function CompatibleSend()
|
||||
// {
|
||||
// var obj=document.getElementById("_file");
|
||||
// var file= $(obj).clone();
|
||||
// file.click();
|
||||
// }
|
||||
</script>
|
||||
<span class="add_attachment">
|
||||
<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
|
||||
<!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%-->
|
||||
<%= button_tag "文件浏览", :type=>"button", :onclick=>"_file#{container.id}.click()", :class =>"sub_btn",:style => ie8? ? 'display:none' : '' %>
|
||||
<%= file_field_tag 'attachments[dummy][file]',
|
||||
:id => "_file#{container.id}",
|
||||
:class => 'file_selector',
|
||||
:multiple => true,
|
||||
:onchange => "addInputFiles_board(this, '#{container.id}');",
|
||||
:style => 'display:none',
|
||||
:data => {
|
||||
: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_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||
:upload_path => uploads_path(:format => 'js'),
|
||||
:description_placeholder => l(:label_optional_description),
|
||||
:field_is_public => l(:field_is_public),
|
||||
:are_you_sure => l(:text_are_you_sure),
|
||||
:file_count => l(:label_file_count),
|
||||
:delete_all_files => l(:text_are_you_sure_all)
|
||||
} %>
|
||||
<span id="upload_file_count<%=container.id %>" :class="c_grey"><%= l(:label_no_file_uploaded)%></span>
|
||||
(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
|
||||
</span>
|
||||
<% else %>
|
||||
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
|
||||
<% if defined?(container) && container && container.saved_attachments %>
|
||||
<% if isReply %>
|
||||
<% container.saved_attachments.each_with_index do |attachment, i| %>
|
||||
|
@ -27,39 +95,40 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
<script type='text/javascript'>
|
||||
// function CompatibleSend()
|
||||
// {
|
||||
// var obj=document.getElementById("_file");
|
||||
// var file= $(obj).clone();
|
||||
// file.click();
|
||||
// }
|
||||
</script>
|
||||
<span class="add_attachment">
|
||||
<script type='text/javascript'>
|
||||
// function CompatibleSend()
|
||||
// {
|
||||
// var obj=document.getElementById("_file");
|
||||
// var file= $(obj).clone();
|
||||
// file.click();
|
||||
// }
|
||||
</script>
|
||||
<span class="add_attachment">
|
||||
<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
|
||||
<!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%-->
|
||||
<%= button_tag "文件浏览", :type=>"button", :onclick=>"_file.click()", :class =>"sub_btn",:style => ie8? ? 'display:none' : '' %>
|
||||
<%= file_field_tag 'attachments[dummy][file]',
|
||||
:id => '_file',
|
||||
:class => 'file_selector',
|
||||
:multiple => true,
|
||||
:onchange => 'addInputFiles(this);',
|
||||
:style => 'display:none',
|
||||
:data => {
|
||||
: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_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||
:upload_path => uploads_path(:format => 'js'),
|
||||
:description_placeholder => l(:label_optional_description),
|
||||
:field_is_public => l(:field_is_public),
|
||||
:are_you_sure => l(:text_are_you_sure),
|
||||
:file_count => l(:label_file_count),
|
||||
:delete_all_files => l(:text_are_you_sure_all)
|
||||
} %>
|
||||
<span id="upload_file_count" :class="c_grey"><%= l(:label_no_file_uploaded)%></span>
|
||||
<!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%-->
|
||||
<%= button_tag "文件浏览", :type=>"button", :onclick=>"_file.click()", :class =>"sub_btn",:style => ie8? ? 'display:none' : '' %>
|
||||
<%= file_field_tag 'attachments[dummy][file]',
|
||||
:id => '_file',
|
||||
:class => 'file_selector',
|
||||
:multiple => true,
|
||||
:onchange => 'addInputFiles(this);',
|
||||
:style => 'display:none',
|
||||
:data => {
|
||||
: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_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||
:upload_path => uploads_path(:format => 'js'),
|
||||
:description_placeholder => l(:label_optional_description),
|
||||
:field_is_public => l(:field_is_public),
|
||||
:are_you_sure => l(:text_are_you_sure),
|
||||
:file_count => l(:label_file_count),
|
||||
:delete_all_files => l(:text_are_you_sure_all)
|
||||
} %>
|
||||
<span id="upload_file_count" :class="c_grey"><%= l(:label_no_file_uploaded)%></span>
|
||||
(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
|
||||
</span>
|
||||
|
||||
<% end %>
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag 'attachments' %>
|
||||
<% end %>
|
||||
|
|
|
@ -13,6 +13,6 @@
|
|||
:target => "_blank"%>
|
||||
</div>
|
||||
<% end %>
|
||||
<br>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -3,14 +3,15 @@ var fileSpan = $('#attachments_<%= j params[:attachment_id] %>');
|
|||
fileSpan.hide();
|
||||
alert("<%= escape_javascript @attachment.errors.full_messages.join(', ') %>");
|
||||
<% else %>
|
||||
$('<input>', { type: 'hidden', name: 'attachments[<%= j params[:attachment_id] %>][token]' } ).val('<%= j @attachment.token %>').appendTo(fileSpan);
|
||||
fileSpan.find('a.remove-upload')
|
||||
.attr({
|
||||
"data-remote": true,
|
||||
"data-method": 'delete',
|
||||
"href": '<%= j attachment_path(@attachment, :attachment_id => params[:attachment_id], :format => 'js') %>'
|
||||
})
|
||||
.off('click');
|
||||
.attr({
|
||||
"data-remote": true,
|
||||
"data-method": 'delete',
|
||||
"href": '<%= j attachment_path(@attachment, :attachment_id => params[:attachment_id], :format => 'js') %>'
|
||||
})
|
||||
.off('click');
|
||||
$('<input>', { type: 'hidden', name: 'attachments[<%= j params[:attachment_id] %>][token]' } ).val('<%= j @attachment.token %>').appendTo(fileSpan);
|
||||
|
||||
//var divattach = fileSpan.find('div.div_attachments');
|
||||
//divattach.html('<%= j(render :partial => 'tags/tagEx', :locals => {:obj => @attachment, :object_flag => "6"})%>');
|
||||
<% end %>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<%= render :partial => 'form_course', :locals => {:f => f, :topic => @message} %>
|
||||
<li>
|
||||
<a href="javascript:void(0)" onclick="show_newtalk();" class="grey_btn fr ml10"><%= l(:button_cancel) %></a>
|
||||
<a href="#" onclick="$('#message-form').submit();" class="blue_btn fr " style="margin-left: 55px"><%= l(:button_submit)%></a>
|
||||
<a href="#" onclick="submitProjectsBoard('<%= @message.id %>')" class="blue_btn fr " style="margin-left: 55px"><%= l(:button_submit)%></a>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<p class="c_dark mb5">讨论区共有<span class="c_orange"><%= @topic_count %></span>个帖子</p>
|
||||
<% if @topics.any? %>
|
||||
<% @topics.each do |topic| %>
|
||||
<div class="talkmain_box" style="border:none; margin-bottom:0; border-bottom: 1px dashed #d9d9d9;">
|
||||
<div class="talkmain_box" style="border:none; margin-bottom:0; border-bottom: 1px dashed #d9d9d9;" id="topic<%= topic.id %>">
|
||||
<%= link_to image_tag(url_to_avatar(topic.author), :width=>"42",:height=>"42"), user_path(topic.author),:class =>'talkmain_pic fl' %>
|
||||
<div class="talkmain_txt fl mt5">
|
||||
<% author = topic.author.to_s + ":" %>
|
||||
|
@ -40,12 +40,10 @@
|
|||
|
||||
<p class="talkmain_tit fl fb break_word"> <%= h(topic.subject) %></p>
|
||||
<% if topic.course_editable_by?(User.current) %>
|
||||
<a href="javascript:void(0)" onclick="show_newtalk1('#about_newtalk<%= topic.id%>');" style="color: #426e9a;float: left;
|
||||
margin-left: 20px;"><%= l(:button_edit) %></a>
|
||||
<% end %>
|
||||
<% if topic.sticky? %>
|
||||
<a href="javascript:void(0)" class="talk_up fr c_red" style="margin-right: 10px;"><%= l(:label_board_sticky)%></a>
|
||||
<a href="javascript:void(0)" onclick="show_newtalk1('#about_newtalk<%= topic.id%>');" style="color: #426e9a;float: right;
|
||||
margin-right: 10px;"><%= l(:button_edit) %></a>
|
||||
<% end %>
|
||||
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
{:controller =>'messages',:action => 'destroy', :id => topic.id, :board_id => topic.board_id, :is_board=>'true'},
|
||||
|
@ -55,7 +53,9 @@
|
|||
:style => ' margin-right: 10px;'
|
||||
) if topic.destroyable_by?(User.current) %>
|
||||
|
||||
|
||||
<% if topic.sticky? %>
|
||||
<a href="javascript:void(0)" class="talk_up fr c_red" style="margin-right: 10px;"><%= l(:label_board_sticky)%></a>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
|
||||
<script>
|
||||
|
@ -63,7 +63,7 @@
|
|||
</script>
|
||||
<div class="project_board_content break_word" id="content_<%=topic.id%>">
|
||||
<div id="contentmessage<%=topic.id %>" class="upload_img">
|
||||
<%= topic.content %>
|
||||
<%= topic.content.html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -100,7 +100,8 @@
|
|||
<%= form_for reply, :as => :reply, :url => {:controller=>'messages',:action => 'reply', :id => topic.id, :board_id => topic.board_id, :is_board => 'true'}, :html => {:multipart => true, :id => 'message_form' + topic.id.to_s} do |f| %>
|
||||
|
||||
<%= render :partial => 'form_project', :locals => {:f => f, :replying => true} %>
|
||||
<a href="#" onclick="$('#message_form<%= topic.id%>').submit();" class="talk_btn fr c_white" style=""><%= l(:label_memo_create)%></a>
|
||||
<%= toggle_link l(:button_cancel), "reply" + topic.id.to_s, :focus => 'message_content',:class => 'grey_btn fr ml10' %>
|
||||
<a href="#" onclick="$('#message_form<%= topic.id%>').submit();" class="blue_btn fr " style=""><%= l(:label_memo_create)%></a>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
} do |f| %>
|
||||
<%= render :partial => 'form_project',
|
||||
:locals => {:f => f, :replying => !topic.parent.nil?, :topic => topic} %>
|
||||
<a href="#" onclick="$('#message-form<%= topic.id%>').submit();" class="blue_btn fl c_white" ><%= l(:button_submit)%></a>
|
||||
<a href="javascript:void(0)" onclick="submitProjectsBoard('<%= topic.id%>');" class="blue_btn fl c_white" ><%= l(:button_submit)%></a>
|
||||
<a href="javascript:void(0)" onclick="show_newtalk1('#about_newtalk<%= topic.id%>');" class="blue_btn grey_btn fl c_white"><%= l(:button_cancel) %></a>
|
||||
<%#= link_to l(:button_cancel), board_message_url(topic.board, topic.root, :r => (topic.parent_id && topic.id)), :class => "blue_btn grey_btn fl c_white" %>
|
||||
</ul>
|
||||
|
@ -31,10 +31,10 @@
|
|||
} do |f| %>
|
||||
<%= render :partial => 'form_course',
|
||||
:locals => {:f => f, :replying => !topic.parent.nil?, :topic => topic} %>
|
||||
<a href="javascript:void(0)" onclick="$('#message-form<%= topic.id%>').submit();"class="blue_btn fl c_white"><%= l(:button_submit)%></a>
|
||||
<%= link_to l(:button_cancel), board_message_url(topic.board,topic.root, :r => (topic.parent_id &&topic.id)), :class => "blue_btn grey_btn fl c_white" %>
|
||||
<a href="javascript:void(0)" onclick="submitProjectsBoard('<%= topic.id%>');"class="blue_btn fl c_white"><%= l(:button_submit)%></a>
|
||||
<a href="javascript:void(0)" onclick="show_newtalk1('#about_newtalk<%= topic.id%>');" class="blue_btn grey_btn fl c_white"><%= l(:button_cancel) %></a>
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -8,16 +8,16 @@
|
|||
<%= f.text_field :subject, { size: 60, id: "message_subject",:class=>"talk_input w585" }.merge(extra_option) %>
|
||||
|
||||
|
||||
<p id="subject_span" class="ml55"></p>
|
||||
<p id="subject_span<%= topic.id%>" class="ml55"></p>
|
||||
</li>
|
||||
<% else %>
|
||||
<li>
|
||||
<label><span class="c_red">*</span> <%= l(:field_subject) %> :</label>
|
||||
|
||||
|
||||
<%= f.text_field :subject, { size: 60, id: "message_subject", onkeyup: "regexSubject();",:class=>"talk_input w585" }.merge(extra_option) %>
|
||||
<%= f.text_field :subject, { size: 60, id: "message_subject#{f.object.id}", onkeyup: "regexSubject('#{f.object.id}');",:class=>"talk_input w585" }.merge(extra_option) %>
|
||||
|
||||
<p id="subject_span" class="ml55"></p>
|
||||
<p id="subject_span<%= f.object.id%>" class="ml55"></p>
|
||||
</li>
|
||||
<% end %>
|
||||
<li class="ml60 mb5">
|
||||
|
@ -40,12 +40,12 @@
|
|||
<% end %>
|
||||
<%= text_area :quote,:quote,:style => 'display:none' %>
|
||||
<% if replying%>
|
||||
<%= f.text_area :content, :class => 'talk_text fl', :id => 'message_content', :onkeyup => "regexContent();", :maxlength => 5000,:placeholder => "最多3000个汉字(或6000个英文字符)", :style=>"width: 575px;" %>
|
||||
<%= f.text_area :content, :class => 'talk_text fl', :id => "message_content#{f.object.id}", :onkeyup => "regexContent('#{f.object.id}');", :maxlength => 5000,:placeholder => "最多3000个汉字(或6000个英文字符)", :style=>"width: 575px;" %>
|
||||
<% else %>
|
||||
<%= f.text_area :content, :class => 'talk_text fl', :id => 'message_content', :onkeyup => "regexContent();", :maxlength => 5000,:placeholder => "最多3000个汉字(或6000个英文字符)" %>
|
||||
<%= f.text_area :content, :class => 'talk_text fl', :id => "message_content#{f.object.id}", :onkeyup => "regexContent('#{f.object.id}');", :maxlength => 5000,:placeholder => "最多3000个汉字(或6000个英文字符)" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<p id="message_content_span" class="ml55"></p>
|
||||
<p id="message_content_span<%= f.object.id%>" class="ml55"></p>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li>
|
||||
|
|
|
@ -5,19 +5,19 @@
|
|||
<li style="display: none">
|
||||
<label><span class="c_red">*</span> <%= l(:field_subject) %> :</label>
|
||||
|
||||
<%= f.text_field :subject, { size: 60, id: "message_subject",:class=>"talk_input w585" }.merge(extra_option) %>
|
||||
<%= f.text_field :subject, { size: 60, id: "message_subject#{f.object.id}",:class=>"talk_input w585" }.merge(extra_option) %>
|
||||
|
||||
|
||||
<p id="subject_span" class="ml55"></p>
|
||||
<p id="subject_span<%= f.object.id%>" class="ml55"></p>
|
||||
</li>
|
||||
<% else %>
|
||||
<li>
|
||||
<label><span class="c_red">*</span> <%= l(:field_subject) %> :</label>
|
||||
|
||||
|
||||
<%= f.text_field :subject, { size: 60, id: "message_subject", onkeyup: "regexSubject();",:class=>"talk_input w585" }.merge(extra_option) %>
|
||||
<%= f.text_field :subject, { size: 60, id: "message_subject#{f.object.id}", onkeyup: "regexSubject('#{f.object.id}');",:class=>"talk_input w585" }.merge(extra_option) %>
|
||||
|
||||
<p id="subject_span" class="ml55"></p>
|
||||
<p id="subject_span<%= f.object.id%>" class="ml55"></p>
|
||||
</li>
|
||||
<% end %>
|
||||
<li class="ml60 mb5">
|
||||
|
@ -36,16 +36,16 @@
|
|||
<li>
|
||||
<div id="message_quote" class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;"></div>
|
||||
<% unless replying %>
|
||||
<label class="fl ml3" ><span class="c_red">*</span> <%= l(:field_description) %> :</label>
|
||||
<label class="fl ml3" ><span class="c_red">*</span> <%= l(:field_description) %> :</label>
|
||||
<% end %>
|
||||
<%= text_area :quote,:quote,:style => 'display:none' %>
|
||||
<% if replying%>
|
||||
<%= f.text_area :content, :class => 'talk_text fl', :id => 'message_content', :onkeyup => "regexContent();", :maxlength => 5000,:placeholder => "最多3000个汉字(或6000个英文字符)", :style=>"width: 575px;" %>
|
||||
<%= f.text_area :content, :class => 'talk_text fl', :id => "message_content#{f.object.id}", :onkeyup => "regexContent('#{f.object.id}');", :maxlength => 5000,:placeholder => "最多3000个汉字(或6000个英文字符)", :style=>"width: 575px;" %>
|
||||
<% else %>
|
||||
<%= f.text_area :content, :class => 'talk_text fl', :id => 'message_content', :onkeyup => "regexContent();", :maxlength => 5000,:placeholder => "最多3000个汉字(或6000个英文字符)" %>
|
||||
<%= f.text_area :content, :class => 'talk_text fl', :id => "message_content#{f.object.id}", :onkeyup => "regexContent('#{f.object.id}');", :maxlength => 5000,:placeholder => "最多3000个汉字(或6000个英文字符)" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<p id="message_content_span" class="ml55"></p>
|
||||
<p id="message_content_span<%= f.object.id%>" class="ml55"></p>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<li>
|
||||
<a href="javascript:void(0)" onclick="show_newtalk();" class="grey_btn fr ml10"><%= l(:button_cancel) %></a>
|
||||
|
||||
<a href="#" onclick="$('#message-form').submit();" class="blue_btn fr " style="margin-left: 55px"><%= l(:button_submit)%></a>
|
||||
<a href="#" onclick="submitProjectsBoard('<%= @message.id %>')" class="blue_btn fr " style="margin-left: 55px"><%= l(:button_submit)%></a>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
|
@ -33,7 +33,7 @@
|
|||
<% if @topics.any? %>
|
||||
<% @topics.each do |topic| %>
|
||||
|
||||
<div class="talkmain_box" style="border:none; margin-bottom:0; border-bottom: 1px dashed #d9d9d9;">
|
||||
<div class="talkmain_box" id="topic<%= topic.id %>" style="border:none; margin-bottom:0; border-bottom: 1px dashed #d9d9d9;">
|
||||
<%= link_to image_tag(url_to_avatar(topic.author), :width=>"42",:height=>"42"), user_path(topic.author),:class =>'talkmain_pic fl' %>
|
||||
<div class="talkmain_txt fl mt5">
|
||||
<% author = topic.author.to_s + ":" %>
|
||||
|
@ -215,20 +215,5 @@
|
|||
$("#message_form").submit();
|
||||
}
|
||||
}
|
||||
function regexContent()
|
||||
{
|
||||
var content = $.trim($("#message_content").val());
|
||||
if(content.length ==0)
|
||||
{
|
||||
$("#message_content_span").text("<%= l(:label_reply_empty) %>");
|
||||
$("#message_content_span").css('color','#ff0000');
|
||||
flag = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#message_content_span").text("<%= l(:label_field_correct) %>");
|
||||
$("#message_content_span").css('color','#008000');
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
|
@ -25,14 +25,29 @@
|
|||
<script type="text/javascript">//侧导航
|
||||
|
||||
window.onload = function () {
|
||||
$("p[aa='bb']").each(function() {
|
||||
alert((this.offsetHeight == '55'));
|
||||
if(this.offsetHeight == '55') {
|
||||
this.next.style.dispaly="block";
|
||||
}
|
||||
})
|
||||
var topic_id = getParam('topic_id');
|
||||
document.getElementById(topic_id).focus();
|
||||
}
|
||||
|
||||
var getParam = function(name){
|
||||
var search = document.location.search;
|
||||
var pattern = new RegExp("[?&]"+name+"\=([^&]+)", "g");
|
||||
var matcher = pattern.exec(search);
|
||||
var items = null;
|
||||
if(null != matcher){
|
||||
try{
|
||||
items = decodeURIComponent(decodeURIComponent(matcher[1]));
|
||||
}catch(e){
|
||||
try{
|
||||
items = decodeURIComponent(matcher[1]);
|
||||
}catch(e){
|
||||
items = matcher[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
return items;
|
||||
};
|
||||
|
||||
function show_newtalk()
|
||||
{
|
||||
$("#about_newtalk").toggle();
|
||||
|
@ -42,6 +57,9 @@ function show_newtalk1(id)
|
|||
{
|
||||
$(id).toggle();
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<% if @project %>
|
||||
<%= render :partial => 'project_show', locals: {project: @project} %>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<span class="fl"> </span>
|
||||
<span class="fl"> <%= l(:label_new_activity) %>:</span>
|
||||
<%= link_to "#{eventToLanguageCourse(e.event_type, @course)} "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Course)) ? course_files_path(e.container) :
|
||||
(e.event_type.eql?("bid") ? homework_course_path(@course) : e.event_url),:class => "problem_tit c_dblue fl fb"%>
|
||||
(e.event_type.eql?("bid") ? homework_course_path(@course) : (e.event_type.eql?("message") || e.event_type.eql?("reply") ? course_boards_path(@course,:topic_id => e.id) : e.event_url)),:class => "problem_tit c_dblue fl fb"%>
|
||||
<br />
|
||||
<p class="mt5 break_word"><%= e.event_description.html_safe %>
|
||||
<br />
|
||||
|
|
|
@ -20,16 +20,14 @@
|
|||
<div class="">
|
||||
<%= link_to_attachment file, :download => true,:text => truncate(file.filename,length: 35, omission: '...'), :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "c_dblue f_14 f_b f_l" %>
|
||||
<% if User.current.logged? %>
|
||||
<!--私有项目资源部能引用,不能设置公开私有-->
|
||||
<!--公开项目资源可以应用,管理员和资源上传者拥有设置公开私有权限-->
|
||||
<%# if project.is_public? %>
|
||||
<%#--私有项目资源不能引用,不能设置公开私有--%>
|
||||
<%#--公开项目资源可以应用,管理员和资源上传者拥有设置公开私有权限--%>
|
||||
<%= link_to(l(:label_slected_to_other_project),quote_resource_show_project_project_file_path(project,file),:class => "f_l re_select",:remote => true) if has_project?(User.current,file) %>
|
||||
<% if (Member.where(:user_id => User.current.id, :project_id => @project.id).first.roles.to_s.include?("Manager") || file.author_id == User.current.id) && project_contains_attachment?(project,file) && file.container_id == project.id && file.container_type == "Project" %>
|
||||
<% if (is_project_manager?(User.current.id, @project.id) || file.author_id == User.current.id) && project_contains_attachment?(project,file) && file.container_id == project.id && file.container_type == "Project" %>
|
||||
<span id="is_public_<%= file.id %>">
|
||||
<%= link_to (file.is_public? ? "公开":"私有"), update_file_dense_attachments_path(:attachmentid=>file.id,:newtype=>(file.is_public? ? 0:1)),:remote=>true,:class=>"f_l re_open",:method => :post %>
|
||||
</span>
|
||||
<% end %>
|
||||
<%# end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -48,8 +48,8 @@
|
|||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="pagination">
|
||||
<% end %>
|
||||
<div class="pagination" style="margin-top: 10px;">
|
||||
<%= pagination_links_full @forums_pages, @forums_count %>
|
||||
</div>
|
||||
<% else %>
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
<strong style="float: left;">
|
||||
文件:
|
||||
</strong>
|
||||
<div id="homework_attach_jour_attachment">
|
||||
<div id="homework_attach_jour_attachment" style="padding-left: 40px;">
|
||||
<%= render :partial => 'attachments/form' %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -12,13 +12,13 @@
|
|||
$("#stars_value").val(num);
|
||||
}
|
||||
|
||||
function ChoseZero()
|
||||
{
|
||||
if(confirm('是否确定评分为0分?'))
|
||||
{
|
||||
ChoseStars(0);
|
||||
}
|
||||
}
|
||||
// function ChoseZero()
|
||||
// {
|
||||
// if(confirm('是否确定评分为0分?'))
|
||||
// {
|
||||
// ChoseStars(0);
|
||||
// }
|
||||
// }
|
||||
</script>
|
||||
<div id="popbox">
|
||||
<div class="ping_con">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a style="float: right;padding-left: 10px;font-weight: normal;cursor: pointer;color: red;" onclick="ChoseZero();">零分</a>
|
||||
<a style="float: right;padding-left: 10px;font-weight: normal;cursor: pointer;color: red;" onclick="ChoseStars(0);">零分</a>
|
||||
<span><a href="javascript:" id="star05" onclick="ChoseStars(5)" style="background-position:<%= start_score>=5 ? '-24px 0px;':'-2px 0'%>"></a></span>
|
||||
<span><a href="javascript:" id="star04" onclick="ChoseStars(4)" style="background-position:<%= start_score>=4 ? '-24px 0px;':'-2px 0'%>"></a></span>
|
||||
<span><a href="javascript:" id="star03" onclick="ChoseStars(3)" style="background-position:<%= start_score>=3 ? '-24px 0px;':'-2px 0'%>"></a></span>
|
||||
|
|
|
@ -75,16 +75,32 @@
|
|||
<%= f.text_area :description, :rows => 8, :name => "homework_description", :class => "w620",
|
||||
:maxlength => 3000, :placeholder => "最多3000个汉字" %>
|
||||
</p>
|
||||
<p>
|
||||
<label style="float: left;">
|
||||
<!--<div class="cl"></div>-->
|
||||
<!--<p>-->
|
||||
<!--<label style="float: left;">-->
|
||||
<!-- 添加附件 :-->
|
||||
<!--</label>-->
|
||||
<!--<div style="float: left;padding-bottom: 15px;">-->
|
||||
<!--<%#= render :partial => 'attachments/form', :locals => {:container => @homework}%>-->
|
||||
<!--</div>-->
|
||||
<!--</p>-->
|
||||
<!--<div class="cl"></div>-->
|
||||
|
||||
|
||||
<div class="cl"></div>
|
||||
<label style="float: left;padding-left: 15px;">
|
||||
添加附件 :
|
||||
</label>
|
||||
<div style="float: left;padding-bottom: 15px;">
|
||||
<%= render :partial => 'attachments/form', :locals => {:container => @homework}%>
|
||||
<!--<div style="float: left;margin-left: 5px;">-->
|
||||
<!--<%#= render :partial => 'attachments/form',locals: {:container => @homework}%>-->
|
||||
<!--</div>-->
|
||||
|
||||
<div style="float: left;">
|
||||
<%= render :partial => 'attachments/form', :locals => {:container => @homework} %>
|
||||
</div>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
<p>
|
||||
|
||||
<p style="padding-top: 10px;">
|
||||
<label> 开发项目
|
||||
<img src="/images/bid/pic_question.png" width="16" height="16"
|
||||
title="项目是一种由用户创建的基于网络的协作空间,能够为个人或小组提供分布式的协同交流和资料管理等方面的支持。
|
||||
|
@ -101,7 +117,7 @@
|
|||
<span style="float: left;">
|
||||
|
||||
</span>
|
||||
<a href="javascript:" class="tijiao" onclick="submit_homework_form();">
|
||||
<a href="javascript:void(0)" class="tijiao" onclick="submit_homework_form();">
|
||||
<%= l(:label_button_ok) %>
|
||||
</a>
|
||||
<a href="javascript:history.back()" class="tijiao">取 消</a>
|
||||
|
|
|
@ -168,16 +168,16 @@ function cookieget(n)
|
|||
<div class="side_title"><a title="<%= l(:label_feedback) %>" class="close_btn"><span><%= l(:label_feedback) %></span></a></div>
|
||||
<div class="side_center">
|
||||
<div class="custom_service">
|
||||
<% if @public_forum %>
|
||||
<% get_memo %>
|
||||
<%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %>
|
||||
<%= f.text_area :subject,:id=>"subject", :class => "opnionText", :placeholder => l(:label_feedback_tips) %>
|
||||
<%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %>
|
||||
<%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %>
|
||||
<label class="c_grey">您还能输入<span id="textCount" class="c_orange">50</span>个字符</label>
|
||||
<a href="javascript:void(0);" class="opnionButton" style=" color:#fff;" id="" onclick="f_submit();"><%= l(:label_submit)%></a>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%# if @public_forum %>
|
||||
<% get_memo %>
|
||||
<%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %>
|
||||
<%= f.text_area :subject,:id=>"subject", :class => "opnionText", :placeholder => l(:label_feedback_tips) %>
|
||||
<%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %>
|
||||
<%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %>
|
||||
<label class="c_grey">您还能输入<span id="textCount" class="c_orange">50</span>个字符</label>
|
||||
<a href="javascript:void(0);" class="opnionButton" style=" color:#fff;" id="" onclick="f_submit();"><%= l(:label_submit)%></a>
|
||||
<% end %>
|
||||
<%# end %>
|
||||
</div>
|
||||
<div class="msgserver">
|
||||
<a href="http://user.trustie.net/users/34/user_newfeedback" style="color: #15BCCF;"><%= l(:label_technical_support) %>白 羽</a>
|
||||
|
|
|
@ -2,15 +2,15 @@
|
|||
|
||||
<div class="actions" style="max-width:680px;">
|
||||
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
|
||||
<p><%= f.text_field :subject, :required => true, :size => 95 %></p>
|
||||
<p><%= f.text_field :subject, :required => true, :size => 95, :style => 'width:98%' %></p>
|
||||
<p style="max-width:680px"><%= f.kindeditor :content,:width=>'99%', :required => true %></p>
|
||||
<!--<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01');</script> -->
|
||||
<br/>
|
||||
<div class="cl"></div>
|
||||
|
||||
<p style="margin-right: 10px;" class="fl">
|
||||
<%= l(:label_attachment_plural) %><br />
|
||||
<%= render :partial => 'attachments/form', :locals => {:container => @memo} %>
|
||||
</p>
|
||||
<label class="fl" style="margin-left: -80px;margin-top: 10px;"><%= l(:label_attachment_plural) %></label>
|
||||
<div style="margin-left: 110px;margin-top: 10px;margin-bottom: 10px;" class="fl">
|
||||
<%= render :partial => 'attachments/form', :locals => {:container => @memo} %>
|
||||
</div>
|
||||
<%= f.submit :value => l(:label_memo_create), :style => "margin-left: 100px;"%> <%= link_to l(:button_back), forum_path(@forum) %>
|
||||
</div>
|
||||
<% end %>
|
|
@ -5,22 +5,22 @@
|
|||
<% @nav_dispaly_forum_label = 1%>
|
||||
<!-- <h1>New memo</h1> -->
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor" %>
|
||||
<div class="top-content">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="info_font" style="width: 240px; color: #15bccf"><%= l(:label_projects_community)%></td>
|
||||
<td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
|
||||
<td rowspan="2" width="250px">
|
||||
<div class="top-content-search">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 8px"><%= link_to request.host()+"/forums", forums_path %></td>
|
||||
<td><p class="top-content-list"><%=link_to l(:label_home),home_path %> > <%=link_to l(:label_forum), :controller => 'forums', :action => 'index' %> > <%=link_to @forum.name %></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="top-content">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="info_font" style="width: 240px; color: #15bccf"><%= l(:label_projects_community)%></td>
|
||||
<td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
|
||||
<td rowspan="2" width="250px">
|
||||
<div class="top-content-search">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 8px"><%= link_to request.host()+"/forums", forums_path %></td>
|
||||
<td><p class="top-content-list"><%=link_to l(:label_home),home_path %> > <%=link_to l(:label_forum), :controller => 'forums', :action => 'index' %> > <%=link_to @forum.name %></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<h3><%=l(:label_memo_new)%></h3>
|
||||
<div class="box tabular">
|
||||
<div style="width:780px">
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<%= link_to l(:button_cancel), course_news_index_path(@course), :onclick => '$("#add-news").hide()', :class => 'blue_btn grey_btn fl c_white' %>
|
||||
<% else %>
|
||||
<%= link_to l(:button_save), "javascript:void(0)", :onclick => "submitNews();",:onmouseover => 'this.focus()',:class => 'blue_btn fl c_white' %>
|
||||
<%= link_to l(:button_cancel), "javascript:void(0)", :onclick => '$("#edit-news").hide(); return false;',:class => 'blue_btn grey_btn fl c_white' %>
|
||||
<%= link_to l(:button_cancel), news_path(@news), :class => 'blue_btn grey_btn fl c_white' %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
|
|
@ -66,9 +66,7 @@
|
|||
<%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %></a><span class="fl"> <%= l(:label_new_activity) %> :</span>
|
||||
|
||||
<%= link_to format_activity_title("#{act.board.name}: #{act.subject}"),
|
||||
{:controller => 'messages',
|
||||
:action => 'show',
|
||||
:board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}),
|
||||
project_boards_path(@project,:topic_id => act.id),
|
||||
:class => "problem_tit fl fb " %>
|
||||
<br />
|
||||
<p class="mt5 break_word"><%= textAreailizable act,:content %><br />
|
||||
|
|
|
@ -323,10 +323,9 @@
|
|||
</span>
|
||||
|
||||
<%= link_to format_activity_title("#{act.board.name}: #{act.subject}"),
|
||||
{:controller => 'messages',
|
||||
:action => 'show',
|
||||
:board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %>
|
||||
</td>
|
||||
act.board.project ? project_boards_path(act.board.project,:topic_id => act.id) : course_boards_path(act.board.course,:topic_id => act.id),
|
||||
:class => "problem_tit fl fb " %>
|
||||
</td>
|
||||
<% else %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong>
|
||||
|
|
|
@ -28,7 +28,13 @@
|
|||
<td colspan="2" valign="top" width="50" ><img src="/images/new/news.png" width="40" height="40"/></td>
|
||||
<td><table width="580" border="0">
|
||||
<tr>
|
||||
<td colspan="2" valign="top"><strong> <%= content_tag('span', h(e.project), :class => 'project') %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title(e.event_title), e.event_url %></td>
|
||||
<td colspan="2" valign="top"><strong> <%= content_tag('span', h(e.project), :class => 'project') %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span>
|
||||
<% if e.event_type.eql?("message") || e.event_type.eql?("reply") %>
|
||||
<%= link_to format_activity_title(e.event_title), e.board.project ? project_boards_path(e.board.project,:topic_id => e.id):course_boards_path(e.board.course,:topic_id => e.id) %>
|
||||
<%else %>
|
||||
<%= link_to format_activity_title(e.event_title), e.event_url %>
|
||||
<%end%>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580" ><p class="font_description"><%= format_activity_description(e.event_description) %></p></td>
|
||||
|
|
|
@ -151,45 +151,48 @@ function submit_edit_course(id)
|
|||
|
||||
///////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////课程讨论区
|
||||
function regexSubject()
|
||||
{
|
||||
var content = $.trim($("#message_subject").val());
|
||||
if(content.length ==0)
|
||||
{
|
||||
$("#subject_span").text("主题不能为空");
|
||||
$("#subject_span").css('color','#ff0000');
|
||||
function regexSubject(id) {
|
||||
var subjectid = "#message_subject" + id ;
|
||||
var content = $.trim($(subjectid).val());
|
||||
var message = "#subject_span" + id;
|
||||
if (content.length == 0) {
|
||||
$(message).text("主题不能为空");
|
||||
$(message).css('color', '#ff0000');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#subject_span").text("填写正确");
|
||||
$("#subject_span").css('color','#008000');
|
||||
else {
|
||||
$(message).text("填写正确");
|
||||
$(message).css('color', '#008000');
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function regexContent()
|
||||
{
|
||||
var content = message_content_editor.html();
|
||||
if(content.length ==0)
|
||||
{
|
||||
$("#message_content_span").text("描述不能为空");
|
||||
$("#message_content_span").css('color','#ff0000');
|
||||
function regexContent(id) {
|
||||
var contentid = "#message_content" + id;
|
||||
var message = "#message_content_span"+ id;
|
||||
var content = $.trim($(contentid).val());
|
||||
if (content.length == 0) {
|
||||
$(message).text("描述不能为空");
|
||||
$(message).css('color', '#ff0000');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#message_content_span").text("填写正确");
|
||||
$("#message_content_span").css('color','#008000');
|
||||
else {
|
||||
$(message).text("填写正确");
|
||||
$(message).css('color', '#008000');
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function submitCoursesBoard()
|
||||
{
|
||||
message_content_editor.sync();
|
||||
if(regexSubject()&®exContent()){$("#message-form").submit();}
|
||||
|
||||
// 项目讨论区编辑和提交
|
||||
function submitProjectsBoard(id) {
|
||||
var formid = "#message-form" + id;
|
||||
if (regexSubject(id) && regexContent(id)) {
|
||||
$(formid).submit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////// 课程通知
|
||||
function regexTitle()
|
||||
|
|
|
@ -144,42 +144,51 @@ $(function(){
|
|||
|
||||
///////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////项目讨论区
|
||||
function regexSubject() {
|
||||
var content = $.trim($("#message_subject").val());
|
||||
function regexSubject(id) {
|
||||
|
||||
var subjectid = "#message_subject" + id ;
|
||||
var content = $.trim($(subjectid).val());
|
||||
var message = "#subject_span" + id;
|
||||
if (content.length == 0) {
|
||||
$("#subject_span").text("主题不能为空");
|
||||
$("#subject_span").css('color', '#ff0000');
|
||||
$(message).text("主题不能为空");
|
||||
$(message).css('color', '#ff0000');
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
$("#subject_span").text("填写正确");
|
||||
$("#subject_span").css('color', '#008000');
|
||||
$(message).text("填写正确");
|
||||
$(message).css('color', '#008000');
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function regexContent() {
|
||||
var content = $.trim($("#message_content").val());
|
||||
function regexContent(id) {
|
||||
|
||||
var contentid = "#message_content" + id;
|
||||
var message = "#message_content_span"+ id;
|
||||
var content = $.trim($(contentid).val());
|
||||
if (content.length == 0) {
|
||||
$("#message_content_span").text("描述不能为空");
|
||||
$("#message_content_span").css('color', '#ff0000');
|
||||
|
||||
$(message).text("描述不能为空");
|
||||
$(message).css('color', '#ff0000');
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
$("#message_content_span").text("填写正确");
|
||||
$("#message_content_span").css('color', '#008000');
|
||||
|
||||
$(message).text("填写正确");
|
||||
$(message).css('color', '#008000');
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// 项目讨论区编辑和提交
|
||||
function submitProjectsBoard() {
|
||||
if (regexSubject() && regexContent()) {
|
||||
$("#message-form").submit();
|
||||
function submitProjectsBoard(id) {
|
||||
var formid = "#message-form" + id;
|
||||
|
||||
if (regexSubject(id) && regexContent(id)) {
|
||||
$(formid).submit();
|
||||
}
|
||||
}
|
||||
|
||||
// 提交新闻
|
||||
function regexTitle() {
|
||||
var name = $("#news_title").val();
|
||||
|
|
|
@ -361,7 +361,7 @@ span.forums-avatar-right{
|
|||
}
|
||||
.content-text-list{
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px dashed rgb(204, 204, 204);
|
||||
/*border-bottom: 1px dashed rgb(204, 204, 204);*/
|
||||
width: 580px;
|
||||
}
|
||||
|
||||
|
@ -2004,9 +2004,15 @@ color:#505050;
|
|||
}
|
||||
|
||||
img.ui-datepicker-trigger {
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
margin-left: 4px;
|
||||
display: block;
|
||||
background: url(../images/public_icon.png) -31px 0 no-repeat;
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
margin-left: 5px;
|
||||
margin-top: 5px;
|
||||
width: 16px;
|
||||
height: 15px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
/***** Progress bar *****/
|
||||
|
@ -2511,7 +2517,7 @@ a.close-icon:hover {background-image:url('../images/close_hl.png');}
|
|||
.icon-user { background-image: url(../images/user.png); }
|
||||
.icon-projects { background-image: url(../images/projects.png); }
|
||||
.icon-help { background-image: url(../images/help.png); }
|
||||
.icon-attachment { background-image: url(../images/attachment.png); }
|
||||
.icon-attachment { background-image: url(../images/attachment.png);padding-left: 20px !important; }
|
||||
.icon-history { background-image: url(../images/history.png); }
|
||||
.icon-time { background-image: url(../images/time.png); }
|
||||
.icon-time-add { background-image: url(../images/time_add.png); }
|
||||
|
|
|
@ -86,7 +86,7 @@ a.wzan_visited{background:url(images/pic_zan.png) 0 0 no-repeat;}
|
|||
.ping_con h2{ font-size:14px; color:#444443; margin-bottom:10px; }
|
||||
.ping_con p{ color:#777777; font-size:12px; border-bottom:1px dashed #CCC; padding-bottom:5px;}
|
||||
.ping_con p span a{ color:#777777;}
|
||||
.ping_star{ width:185px; color:#333; font-weight:bold; margin-bottom:5px;}
|
||||
.ping_star{ width:195px; color:#333; font-weight:bold; margin-bottom:5px;}
|
||||
.ping_star span a{ float:right; width:20px; height:20px; background:url(images/star.png);background-repeat: no-repeat; margin-right:3px;}
|
||||
.ping_con textarea{ height:76px; border:1px solid #15bccf; margin-bottom:5px; color:#666; font-size:12px;}
|
||||
a.ping_sub{ float:right; height:22px; width:60px; margin-right:20px; background:#15bccf; color:#fff; text-align:center;}
|
||||
|
|
|
@ -1190,7 +1190,8 @@ div.pagination {
|
|||
text-align: left;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.pagination li a{margin-top: 10px;}
|
||||
.pagination li span{margin-top: 10px;}
|
||||
.m5p5 {
|
||||
display: inline-block;
|
||||
height: auto;
|
||||
|
|
|
@ -738,6 +738,6 @@ a:hover.Reply_pic{border:1px solid #64bdd9;}
|
|||
.Replybox{ float:left; width:495px; margin-left:5px;}
|
||||
.talk_nextpage{ border:none; width:410px; margin:0 auto;}
|
||||
.newtalk { margin-top:8px; margin-right:8px;}
|
||||
.talk_new{ border-bottom:1px dashed #d9d9d9; padding-bottom:10px;}
|
||||
|
||||
#about_newtalk{ display:none;}
|
||||
|
||||
|
|
Loading…
Reference in New Issue