diff --git a/app/controllers/org_subfields_controller.rb b/app/controllers/org_subfields_controller.rb
index ba4c1f18f..bc339319b 100644
--- a/app/controllers/org_subfields_controller.rb
+++ b/app/controllers/org_subfields_controller.rb
@@ -11,7 +11,7 @@ class OrgSubfieldsController < ApplicationController
sql = "select subfield_subdomain_dirs.* from subfield_subdomain_dirs, org_subfields where subfield_subdomain_dirs.org_subfield_id = org_subfields.id "+
"and org_subfields.organization_id=#{@organization.id} and subfield_subdomain_dirs.name='#{params[:sub_dir]}'"
if SubfieldSubdomainDir.find_by_sql(sql).count == 0
- SubfieldSubdomainDir.create(:org_subfield_id => @subfield.id, :name => params[:sub_dir])
+ SubfieldSubdomainDir.create(:org_subfield_id => @subfield.id, :name => params[:sub_dir].downcase)
end
end
@subfield.update_attributes(:field_type => params[:field_type])
diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb
index 239253d82..da0eb8009 100644
--- a/app/controllers/organizations_controller.rb
+++ b/app/controllers/organizations_controller.rb
@@ -225,7 +225,7 @@ class OrganizationsController < ApplicationController
condition = "%#{params[:name].strip}%".gsub(" ","")
end
sql = "select courses.* from courses inner join members on courses.id = members.course_id where members.user_id = #{User.current.id} and courses.name like '#{condition}'"+
- "and courses.id not in (select distinct org_courses.course_id from org_courses where org_courses.organization_id = #{@organization.id})"
+ "and courses.id not in (select distinct org_courses.course_id from org_courses where org_courses.organization_id = #{@organization.id}) and courses.is_delete=0"
#user_courses = Course.find_by_sql(sql)
@courses = Course.find_by_sql(sql)
# @added_course_ids = @organization.courses.map(&:id)
@@ -269,7 +269,7 @@ class OrganizationsController < ApplicationController
condition = "%#{params[:name].strip}%".gsub(" ","")
end
sql = "select projects.* from projects inner join members on projects.id = members.project_id where members.user_id = #{User.current.id} and projects.status != 9 and projects.name like '#{condition}'" +
- " and projects.id not in (select org_projects.project_id from org_projects where organization_id = #{@organization.id})"
+ " and projects.id not in (select org_projects.project_id from org_projects where organization_id = #{@organization.id}) and status=1"
#user_projects = Course.find_by_sql(sql)
@projects = Course.find_by_sql(sql)
# @added_course_ids = @organization.projects.map(&:id)
diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb
index 71b23fdcf..6c86abf82 100644
--- a/app/controllers/student_work_controller.rb
+++ b/app/controllers/student_work_controller.rb
@@ -63,6 +63,13 @@ class StudentWorkController < ApplicationController
homework_message.update_attributes(:viewed => true) if homework_message.viewed == 0
end
end
+
+ #修改作品提示消息更新
+ student_work_messages = CourseMessage.where("user_id =? and course_id =? and course_message_type =? and viewed =?", User.current.id, @homework.course, StudentWork.name, 0)
+ student_work_messages.each do |message|
+ message.update_attribute(:viewed, true)
+ end
+
# 作品打分消息状态更新
studentworks_scores = CourseMessage.where("user_id =? and course_id =? and course_message_type =? and viewed =?", User.current.id, @homework.course, "StudentWorksScore", 0)
studentworks_scores.each do |studentworks_score|
@@ -369,6 +376,8 @@ class StudentWorkController < ApplicationController
@work.save_attachments(params[:attachments])
render_attachment_warning_if_needed(@work)
if @work.save
+ #如果学生作品被打分后修改,应该给老师提示
+ send_message_to_teacher(@work)
if @homework.homework_type == 3
@student_work_project = @homework.student_work_projects.where("user_id=?",User.current.id).first
student_work_projects = @homework.student_work_projects.where("student_work_id=? and is_leader =?",@work.id,0)
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 3c779420b..f885c5c1c 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -714,6 +714,7 @@ class UsersController < ApplicationController
end
student_work.save
+ send_message_to_teacher(student_work)
homework.update_attributes(:updated_at => Time.now)
update_course_activity(homework.class,homework.id)
update_user_activity(homework.class,homework.id)
@@ -1218,7 +1219,7 @@ class UsersController < ApplicationController
@page = params[:page] ? params[:page].to_i + 1 : 0
user_project_ids = (@user.projects.visible.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (@user.projects.visible.map{|project| project.id}-shield_project_ids).join(",") + ")"
user_course_ids = (@user.courses.visible.map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (@user.courses.visible.map{|course| course.id}-shield_course_ids).join(",") + ")"
- course_types = "('Message','News','HomeworkCommon','Poll','Course')"
+ course_types = "('Message','News','HomeworkCommon','Poll','Course','JournalsForMessage')"
project_types = "('Message','Issue','ProjectCreateInfo')"
principal_types = "JournalsForMessage"
if params[:type].present?
@@ -1231,6 +1232,8 @@ class UsersController < ApplicationController
@user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'Message'").order('updated_at desc').limit(10).offset(@page * 10)
when "course_poll"
@user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'Poll'").order('updated_at desc').limit(10).offset(@page * 10)
+ when "course_journals"
+ @user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'JournalsForMessage'").order('updated_at desc').limit(10).offset(@page * 10)
when "project_issue"
@user_activities = UserActivity.where("container_type = 'Project' and container_id in #{user_project_ids} and act_type = 'Issue'").order('updated_at desc').limit(10).offset(@page * 10)
when "project_message"
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 6432d83d8..1d443610f 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -2137,6 +2137,20 @@ module ApplicationHelper
end
+ #如果学生作品被打分后修改,应该给老师提示
+ def send_message_to_teacher student_work
+ if StudentWork === student_work
+ if student_work.student_works_scores.any?
+ course = student_work.homework_common.course
+ course.members.map(&:user_id).uniq.each do|user_id|
+ if User.find(user_id).allowed_to?(:as_teacher, course)
+ student_work.course_messages << CourseMessage.new(:user_id => user_id, :course_id => course.id, :viewed => false, :status => 1)
+ end
+ end
+ end
+ end
+ end
+
private
def wiki_helper
@@ -3044,3 +3058,7 @@ def is_default_field? field
(field.name == 'activity' || field.name == 'course' || field.name == 'project') && field.field_type == 'default'
end
+def host_with_protocol
+ return Setting.protocol + "://" + Setting.host_name
+end
+
diff --git a/app/helpers/org_member_helper.rb b/app/helpers/org_member_helper.rb
index fd70a0516..e16051eaf 100644
--- a/app/helpers/org_member_helper.rb
+++ b/app/helpers/org_member_helper.rb
@@ -9,7 +9,7 @@ module OrgMemberHelper
principals = paginateHelper scope,10
s = content_tag('ul', project_member_check_box_tags_ex('membership[user_ids][]', principals), :class => 'mb5', :id => 'principals')
links = pagination_links_full(@obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true){|text, parameters, options|
- link_to text, org_member_autocomplete_org_member_index_path(parameters.merge(:q => params[:q],:flag => true,:org=> org, :format => 'js')), :remote => true
+ link_to text, host_with_protocol + "/org_member/org_member_autocomplete?" + parameters.merge(:q => params[:q],:flag => true,:org=> org, :format => 'js').to_query, :remote => true
}
s + content_tag('ul', links,:class => 'wlist',:style=>'float:left !important', :id => "org_member_pagination_links" )
end
diff --git a/app/models/principal.rb b/app/models/principal.rb
index dd376f609..2c8465538 100644
--- a/app/models/principal.rb
+++ b/app/models/principal.rb
@@ -42,9 +42,9 @@ class Principal < ActiveRecord::Base
if q.blank?
where({})
else
- pattern = "%#{q}%"
+ pattern = "%#{q}%".gsub("/","//").gsub("_","/_")
# sql = %w(login firstname lastname mail).map {|column| "LOWER(#{table_name}.#{column}) LIKE LOWER(:p)"}.join(" OR ")
- sql= "LOWER(concat(lastname,firstname)) LIKE LOWER(:p) or LOWER(login) LIKE LOWER(:p) or LOWER(mail) LIKE LOWER(:p)"
+ sql= "LOWER(concat(lastname,firstname)) LIKE LOWER(:p) or LOWER(login) LIKE LOWER(:p) or LOWER(mail) LIKE LOWER(:p) escape '/'"
params = {:p => pattern}
if q =~ /^(.+)\s+(.+)$/
a, b = "#{$1}%", "#{$2}%"
diff --git a/app/views/attachments/_activity_attach.html.erb b/app/views/attachments/_activity_attach.html.erb
index 32e796382..3cc429185 100644
--- a/app/views/attachments/_activity_attach.html.erb
+++ b/app/views/attachments/_activity_attach.html.erb
@@ -3,14 +3,14 @@
- <%= link_to_short_attachment attachment,:length=> 58, :class => 'hidden link_file_a fl newsBlue mw400', :download => true -%>
+ <%= link_to_short_attachment attachment,:length=> 58, :class => 'hidden link_file_a fl newsBlue mw380', :download => true -%>
(
<%= number_to_human_size attachment.filesize %>)
- <%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author),:class => "c_orange" %>,
+ <%= link_to h(truncate(attachment.author.name, length: 15, omission: '...')),user_path(attachment.author),:class => "c_orange" %>,
<%= format_time(attachment.created_on) %>
diff --git a/app/views/files/_org_order_filter.html.erb b/app/views/files/_org_order_filter.html.erb
new file mode 100644
index 000000000..7fcf115f8
--- /dev/null
+++ b/app/views/files/_org_order_filter.html.erb
@@ -0,0 +1,9 @@
+<% if @order == "asc" %>
+ 按 <%= link_to "时间",params.merge(:sort => "created_on:desc", :order => order,:tag_name => tag_name,:name => search_name),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"created_on"} %> /
+ <%= link_to "下载次数",params.merge(:sort => "downloads:desc", :order => order,:tag_name => tag_name,:name => search_name),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"downloads"} %> /
+ <%= link_to "引用次数",params.merge(:sort => "quotes:desc", :order => order,:tag_name => tag_name,:name => search_name),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"quotes"} %> 排序
+<% else %>
+ 按 <%= link_to "时间",params.merge(:sort => "created_on:asc", :order => order, :tag_name => tag_name,:name => search_name),:class => "f_b c_grey" ,:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"created_on"} %> /
+ <%= link_to "下载次数",params.merge(:sort => "downloads:asc", :order => order, :tag_name => tag_name,:name => search_name),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"downloads"} %> /
+ <%= link_to "引用次数",params.merge(:sort =>"quotes:asc", :order => order, :tag_name => tag_name,:name => search_name),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"quotes"} %> 排序
+<% end %>
\ No newline at end of file
diff --git a/app/views/files/_subfield_files.html.erb b/app/views/files/_subfield_files.html.erb
index 9e0dd41d0..516e42c68 100644
--- a/app/views/files/_subfield_files.html.erb
+++ b/app/views/files/_subfield_files.html.erb
@@ -56,16 +56,8 @@
共有 <%= User.current.member_of_org?(@org_subfield.organization) ? @all_attachments.count : @all_attachments.select{|attach| attach.is_public == 1 }.count %> 个资源
-
- <% if @order == "asc" %>
- 按 <%= link_to "时间",params.merge(:sort=>"created_on:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"created_on"} %> /
- <%= link_to "下载次数",params.merge(:sort=>"downloads:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"downloads"} %> /
- <%= link_to "引用次数",params.merge(:sort=>"quotes:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"quotes"} %> 排序
- <% else %>
- 按 <%= link_to "时间",params.merge(:sort=>"created_on:asc"),:class => "f_b c_grey" ,:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"created_on"} %> /
- <%= link_to "下载次数",params.merge(:sort=>"downloads:asc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"downloads"} %> /
- <%= link_to "引用次数",params.merge(:sort=>"quotes:asc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"quotes"} %> 排序
- <% end %>
+
+ <%= render :partial => 'files/org_order_filter', :locals => {:order => @order, :sort => @sort, :tag_name => @tag_name, :search_name => nil} %>
diff --git a/app/views/files/search_files_in_subfield.js.erb b/app/views/files/search_files_in_subfield.js.erb
index 77c364817..f1056debd 100644
--- a/app/views/files/search_files_in_subfield.js.erb
+++ b/app/views/files/search_files_in_subfield.js.erb
@@ -5,4 +5,6 @@
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'org_subfield_list',
:locals => {org_subfield: @org_subfield,all_attachments: @result,sort:@sort,order:@order,org_subfield_attachments:@searched_attach})%>");
$("#attachment_count").html("<%= @result.count %>");
+ $("#org_sort").html("<%= escape_javascript(render :partial => 'org_order_filter',
+ :locals => {:sort => @sort, :order => @order, :tag_name => @tag_name, :search_name => @q}) %>");
<% end %>
\ No newline at end of file
diff --git a/app/views/files/search_org_subfield_tag_attachment.js.erb b/app/views/files/search_org_subfield_tag_attachment.js.erb
index fe4aed937..775fd24a4 100644
--- a/app/views/files/search_org_subfield_tag_attachment.js.erb
+++ b/app/views/files/search_org_subfield_tag_attachment.js.erb
@@ -1,3 +1,5 @@
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'org_subfield_list',
:locals => {org_subfield: @org_subfield,all_attachments: @result,sort:@sort,order:@order,org_subfield_attachments:@searched_attach})%>");
-$("#attachment_count").html("<%= @result.count %>");
\ No newline at end of file
+$("#attachment_count").html("<%= @result.count %>");
+$("#org_sort").html("<%= escape_javascript(render :partial => 'org_order_filter',
+ :locals => {:sort => @sort, :order => @order, :tag_name => @tag_name,:search_name => @q}) %>");
\ No newline at end of file
diff --git a/app/views/layouts/base_org.html.erb b/app/views/layouts/base_org.html.erb
index f2ece1f35..faf141600 100644
--- a/app/views/layouts/base_org.html.erb
+++ b/app/views/layouts/base_org.html.erb
@@ -90,8 +90,8 @@
<% end%>
-
- <%= link_to @organization.name, organization_path(@organization.id), :class=>"pr_info_name fl c_dark fb break_word" %>
+
+ <%= link_to truncate(@organization.name,:length => 26), organization_path(@organization.id), :class=>"pr_info_name c_dark fb break_word" %>
<% if User.current.logged? %>
<% if @organization.is_public? %>
<%= l(:label_public)%>
diff --git a/app/views/org_document_comments/new.html.erb b/app/views/org_document_comments/new.html.erb
index fea89459b..679b35e5b 100644
--- a/app/views/org_document_comments/new.html.erb
+++ b/app/views/org_document_comments/new.html.erb
@@ -32,7 +32,10 @@
location.href = document.referrer;
}
-
+
+
<%= form_tag organization_org_document_comments_path(:organization_id => @organization.id, :field_id => params[:field_id]), :id => 'new_org_document_form' do |f| %>
diff --git a/app/views/org_subfields/create.js.erb b/app/views/org_subfields/create.js.erb
index 84b69717a..3e08d9f9e 100644
--- a/app/views/org_subfields/create.js.erb
+++ b/app/views/org_subfields/create.js.erb
@@ -4,7 +4,6 @@
:locals => {:subfields => @organization.org_subfields.order("priority") }) %>");
$("#sub_field_left_lists").html("");
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
- $("#subfield_name").val("");
-<% else %>
- $("#subfield_name").val("");
-<% end %>
\ No newline at end of file
+<% end %>
+$("#subfield_name").val("");
+$("#sub_dir").val("");
\ No newline at end of file
diff --git a/app/views/organizations/_org_left_subfield_list.html.erb b/app/views/organizations/_org_left_subfield_list.html.erb
index 53003c85a..7e49d1780 100644
--- a/app/views/organizations/_org_left_subfield_list.html.erb
+++ b/app/views/organizations/_org_left_subfield_list.html.erb
@@ -63,7 +63,7 @@
@@ -77,7 +77,7 @@
diff --git a/app/views/organizations/_show_org_document.html.erb b/app/views/organizations/_show_org_document.html.erb
index e3ed492a0..cf68d71f5 100644
--- a/app/views/organizations/_show_org_document.html.erb
+++ b/app/views/organizations/_show_org_document.html.erb
@@ -10,6 +10,9 @@
TO <%= link_to document.organization.name, organization_path(document.organization), :class => "newsBlue" %>
|
<%= document.org_subfield_id.nil? ? "组织文章" :"#{OrgSubfield.find(document.org_subfield_id).name}" %>
+ <% if @organization.home_id == document.id %>
+
已设为首页
+ <% end %>
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id) %>
diff --git a/app/views/organizations/_subfield_list.html.erb b/app/views/organizations/_subfield_list.html.erb
index 0d490df77..d907ac33e 100644
--- a/app/views/organizations/_subfield_list.html.erb
+++ b/app/views/organizations/_subfield_list.html.erb
@@ -54,7 +54,7 @@
<% end %>
-
+
<%#= link_to "隐藏", hide_org_subfield_organizations_path(field), :method => 'post', :remote => true, :id => "hide_#{field.id}", :class => "linkBlue fr mr5" %>
@@ -85,6 +85,9 @@
url: "/org_subfields/" + field_id + "?name=" + input_value,
type: 'put'
});
+ else{
+ $(edit_id).children("input").val($(show_id).html().trim());
+ }
}
$(show_id).show();
$(edit_id).hide();
@@ -109,6 +112,9 @@
url: "/org_subfields/" + field_id + "/update_sub_dir?sub_dir_name=" + input_value,
type: 'put'
});
+ else{
+ $(edit_id).children("input").val($(show_id).html().trim());
+ }
}
$(show_id).show();
$(edit_id).hide();
@@ -128,16 +134,13 @@
function update_priority(show_id, edit_id, field_id, input_value){
var re = /^[0-9]*[1-9]*[0-9]$/
if(re.test(input_value) && $(show_id).html().trim() != input_value.trim() && input_value.trim() != ''){
- if(confirm("确定修改为" + input_value + "?")){
- $.ajax({
- url: "/org_subfields/" + field_id + "/update_priority?priority=" + input_value,
- type: 'put'
- });
- }
+ $.ajax({
+ url: "/org_subfields/" + field_id + "/update_priority?priority=" + input_value,
+ type: 'put'
+ });
}
- else
- {
- $(edit_id).find("input").val($(show_id).html().trim());
+ else{
+ $(edit_id).children("input").val($(show_id).html().trim());
}
$(show_id).show();
$(edit_id).hide();
diff --git a/app/views/organizations/new.html.erb b/app/views/organizations/new.html.erb
index e12bf3849..b0c961d82 100644
--- a/app/views/organizations/new.html.erb
+++ b/app/views/organizations/new.html.erb
@@ -30,7 +30,7 @@
-
+
(打钩为公开,不打钩则不公开,若不公开,仅组织成员可见该组织。)
diff --git a/app/views/organizations/setting.html.erb b/app/views/organizations/setting.html.erb
index 3ef5d547c..c0ca2cfe4 100644
--- a/app/views/organizations/setting.html.erb
+++ b/app/views/organizations/setting.html.erb
@@ -19,8 +19,11 @@
'<%= check_uniq_organizations_path%>'+'?org_name='+$("#organization_name").val().trim()+"&config_page=Y" + "&org_id="+id
)
}
- function update_org(id){
- check_uniq(id);
+ function update_org(id, old_value, input_value){
+ if (old_value == input_value)
+ {
+ check_uniq(id);
+ }
if( $checkName){
$("#edit_organization_"+id).submit();
}
@@ -57,7 +60,7 @@
组织URL:
-
保存
+
保存
<% end %>
@@ -96,7 +99,7 @@
添加成员
<%= form_tag url_for(:controller => 'org_member',:action => 'create',:org=>@organization),:id=>'org_member_add_form',:remote=>true do |f|%>
- <%= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript org_member_autocomplete_org_member_index_path(:org=>@organization, :format => 'js') }')" %>
+ <%= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript host_with_protocol + "/org_member/org_member_autocomplete?" + {:org=> @organization.id}.to_query }')" %>
<%= find_user_not_in_current_org_by_name(@project) %>
@@ -129,9 +132,9 @@
域名目录(用户自定义url,可选)
<% if domain %>
-
<%= domain.subname %>.trustie.net/
+
<%= domain.subname %>.trustie.net/
<% else %>
-
您还没有子域名,请先在左侧信息栏申请子域名
+
您还没有子域名,请先在左侧信息栏申请子域名
<% end %>
@@ -195,12 +198,25 @@
}
}
-// $(document).ready(function(){
-// if ( $("#is_public").attr("checked") != true){
-// alert($(this).attr("checked"));
-// $("#allow_download").attr("checked", false);
-// $("#allow_download").attr("disabled", true);
-// $("#allow_down_hint").html("");
-// }
-// });
+ //输入子域名或者二级目录,自动将输入换成小写
+ function observe_input_to_lowercase(id){
+ $(id).each(function(){
+ var $this = $(this);
+ var old_input = $this.val();
+ var check=function(){
+ var val = $this.val();
+ if ( old_input != val){
+ $this.val(val.toLowerCase());
+ old_input = val.toLowerCase();
+ }
+ };
+ var reset = function() {
+ if (timer) {
+ clearInterval(timer);
+ }
+ };
+ var timer = setInterval(check, 300);
+ $this.bind('blur', reset);
+ });
+ }
\ No newline at end of file
diff --git a/app/views/student_work/_programing_work_show.html.erb b/app/views/student_work/_programing_work_show.html.erb
index 20d6df9ba..6bcda51da 100644
--- a/app/views/student_work/_programing_work_show.html.erb
+++ b/app/views/student_work/_programing_work_show.html.erb
@@ -59,7 +59,7 @@
<% if x["status"].to_i != 0 %>
测试错误!
您的输出:
-
<%=x["result"]%>
+
<%=x["result"].force_encoding("UTF-8")%>
正确输出:
<%=x["output"]%>
diff --git a/app/views/student_work/_student_work_list.html.erb b/app/views/student_work/_student_work_list.html.erb
index 0badbb192..8b2f57723 100644
--- a/app/views/student_work/_student_work_list.html.erb
+++ b/app/views/student_work/_student_work_list.html.erb
@@ -46,45 +46,43 @@
<% end%>
\ No newline at end of file
diff --git a/app/views/users/_user_message_course.html.erb b/app/views/users/_user_message_course.html.erb
index 5c05474a0..ccd329852 100644
--- a/app/views/users/_user_message_course.html.erb
+++ b/app/views/users/_user_message_course.html.erb
@@ -9,6 +9,13 @@
+
+
标题:<%= ma.course_message.title %>
+ <% unless ma.course_message.description.nil? %>
+
内容:
+
<%= ma.course_message.description.html_safe %>
+ <% end %>
+
<%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -22,6 +29,13 @@
+
+
评论对象:<%= ma.course_message.commented.title %>
+ <% unless ma.course_message.comments.nil? %>
+
评论内容:
+
<%= ma.course_message.comments.html_safe %>
+ <% end %>
+
<%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -44,6 +58,43 @@
<% end %>
+
+ <% if User.current.allowed_to?(:as_teacher,ma.course_message.course) %>
+
+ <%= User.current.lastname + User.current.firstname %>老师您好!
+ <%= User.current.eql?(ma.course_message.user)?"您":(ma.course_message.user.show_name + "老师")%>刚刚发布了一个作业:
+
+
+ - 课程名称:<%= ma.course_message.course.name %>
+ (<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)
+ - 作业标题:<%= ma.course_message.name %>
+ - 发布时间:<%= DateTime.parse(ma.course_message.created_at.to_s).strftime('%Y-%m-%d %H:%M').to_s %>
+ - 提交截止:<%= ma.course_message.end_time %> 23:59
+ - 匿评开始:<%= ma.course_message.homework_detail_manual.evaluation_start %> 23:59
+ - 匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %> 23:59
+ - 迟交扣分:<%= ma.course_message.late_penalty %>分
+ - 缺评扣分:<%= ma.course_message.homework_detail_manual.absence_penalty %>分
+
+
+ 您可以修改作业内容、评分规则、匿评过程等,谢谢!
+
+ <% else %>
+
<%= User.current.lastname + User.current.firstname %>同学您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业:
+
+ - 课程名称:<%= ma.course_message.course.name %>
+ (<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)
+ - 作业标题:<%= ma.course_message.name %>
+ - 提交截止:<%= ma.course_message.end_time %> 23:59
+ - 匿评开始:<%= ma.course_message.homework_detail_manual.evaluation_start %> 23:59
+ - 匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %> 23:59
+ - 迟交扣分:<%= ma.course_message.late_penalty %>分
+ - 缺评扣分:<%= ma.course_message.homework_detail_manual.absence_penalty %>分
+
+
+ 请抓紧时间提交您的作品,谢谢!
+
+ <% end %>
+
<%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -59,6 +110,24 @@
+
+ <% if !User.current.allowed_to?(:as_teacher,ma.course_message.course) %>
+
+ <%= User.current.lastname + User.current.firstname %>同学您好!
+ <%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师发布的作业截止日期快到了:
+
+
+ - 课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)
+ - 作业标题:<%= ma.course_message.name %>
+ - 提交截止:<%= ma.course_message.end_time %> 23:59
+ - 匿评开始:<%= ma.course_message.homework_detail_manual.evaluation_start %> 23:59
+ - 匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %> 23:59
+ - 迟交扣分:<%= ma.course_message.late_penalty %>分
+ - 缺评扣分:<%= ma.course_message.homework_detail_manual.absence_penalty %>分
+ 请抓紧时间提交您的作品,谢谢!
+
+ <% end %>
+
截止时间快到啦
<%= time_tag(ma.created_at).html_safe %>
@@ -79,6 +148,22 @@
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %>
+
+
+ <%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher,ma.course_message.course) ? '老师' : '同学' %>您好!
+ <%= User.current.eql?(ma.course_message.user)?"您":(ma.course_message.user.lastname + ma.course_message.user.firstname+"老师") %>开启了匿评,作业详情如下:
+
+
+ - 课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)
+ - 作业标题:<%= ma.course_message.name %>
+ - 缺评扣分:<%= ma.course_message.homework_detail_manual.absence_penalty %>分
+ - 匿评截止:<%= ma.course_message.homework_detail_manual.evaluation_end %> 23:59
+
+ <% unless User.current.allowed_to?(:as_teacher, ma.course_message.course)%>
+
请您尽早完成匿评,如果您在截止日期前未完成匿评,您的最终成绩将被扣除<%= ma.course_message.homework_detail_manual.absence_penalty %>分乘以缺评份数。
+
例如,您缺评了两份作品,则您的最终成绩将被扣除 <%= ma.course_message.homework_detail_manual.absence_penalty %> * 2 = <%= ma.course_message.homework_detail_manual.absence_penalty * 2 %>分
+ <% end%>
+
<%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -94,6 +179,22 @@
+
+
+ <%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher,ma.course_message.course) ? '老师':'同学'%>您好!
+ 该作业已经关闭了匿评。作业信息如下:
+
+
+ - 课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)
+ - 作业标题:<%= ma.course_message.name %>
+
+
+
注:缺省情况下,系统将在作业提交截止日期后14天自动关闭匿评。
+
+ <% if User.current.allowed_to?(:as_teacher,ma.course_message.course)%>
+
祝您的教学活动高效、顺利、愉快!
+ <% end %>
+
<%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -113,6 +214,18 @@
+
+
+ <%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher, ma.course_message.course) ? '老师':'同学'%>您好!
+ <%= User.current.eql?(ma.course_message.user) ?"您":(ma.course_message.user.lastname + ma.course_message.user.firstname + "老师") %>启动作业匿评失败啦
+
+
+
+ - 课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年' + ma.course_message.course.term %>)
+ - 作业标题:<%= ma.course_message.name %>
+ - 提交截止:<%= ma.course_message.end_time%> 23:59
+
+
<%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -127,6 +240,9 @@
+
+ <%= ma.course_message.polls_name %>
+
<%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -136,13 +252,37 @@
<%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %>">
<%= ma.course_message.parent_id.nil? ? "发布了课程帖子:" : "评论了课程帖子:" %>
-
- <%= link_to ma.course_message.subject, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
- :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}" %>
-
-
-
+ <% if ma.course_message.parent_id.nil? %>
+
+ <%= link_to ma.course_message.subject, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
+ :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}" %>
+
+
+
+
+
主题:<%= ma.course_message.subject %>
+ <% unless ma.course_message.content.nil? %>
+
内容:
+
<%= ma.course_message.content.html_safe %>
+ <% end %>
+
+ <% else %>
+
+ <%= link_to ma.course_message.content.html_safe, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
+ :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}" %>
+
+
+
+
+
主题:<%= ma.course_message.subject %>
+ <% unless ma.course_message.content.nil? %>
+
内容:
+
<%= ma.course_message.content.html_safe %>
+ <% end %>
+
+ <% end %>
<%= time_tag(ma.created_at).html_safe %>
+
<% end %>
<% if ma.course_message_type == "StudentWorksScore" %>
@@ -167,14 +307,33 @@
<% unless ma.content.nil? %>
- <%= link_to ma.content.html_safe, student_work_index_path(:homework => ma.course_message.student_work.homework_common_id, :student_work_id => ma.course_message.student_work),
+ <%= link_to ma.content.html_safe, student_work_index_path(:homework => ma.course_message.student_work.homework_common_id),
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+
+
+ <%= User.current.show_name %>同学您好!
+ <%= ma.course_message.reviewer_role == 3? "匿名用户" : (ma.course_message.user.show_name + "老师")%><%= ma.status == 0? "评阅了您的作品":"重新评阅了您的作品"%>。详情如下:
+
+
+ - 课程名称:<%= ma.course.name %>(<%= ma.course.time.to_s + '年'+ ma.course.term %>)
+ - 作业标题:<%=ma.course_message.student_work.homework_common.name %>
+ <% content = ma.content.gsub("作业评分:","").split(" 评语:")%>
+ - 作品评分:<%= content[0] %>分
+ <% if content.size > 1 %>
+ - 作品评语:
+ <%= content[1] %>
+ <% end %>
+
+
+ 本次作业将在<%= ma.course_message.student_work.homework_common.homework_detail_manual.evaluation_end %> 23:59结束匿评,到时您将可以看到所有其他同学的作品啦!大家可以进一步互相学习。 期待您取得更大的进步!
+
+
<% end %>
-
<%= time_tag(ma.created_at).html_safe %>
-
+
<%= time_tag(ma.created_at).html_safe %>
+
<% end %>
<% if ma.course_message_type == "JournalsForMessage" %>
<% if ma.course_message.jour_type == 'Course' %>
@@ -193,6 +352,9 @@
+
+ <%= ma.course_message.notes.html_safe %>
+
<%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -208,11 +370,23 @@
">回复了作品评论:
- <%= link_to ma.course_message.notes, student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id, :student_work_id => ma.course_message.jour.student_work), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+ <%= link_to ma.course_message.notes, student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id,:show_work_id => ma.course_message.jour.student_work_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+
+
+ <%= User.current.show_name %>老师您好!
+ <%= ma.course_message.user.show_name%><%= ma.course_message.user.allowed_to?(:as_teacher, ma.course)?"老师":"同学"%>回复了您的作品评论。详情如下:
+
+
+ - 回复内容:<%= ma.course_message.notes %>
+ - 您的评论:<%= ma.course_message.jour.comment %>
+ - 课程名称:<%= ma.course.name %>(<%= ma.course.time.to_s + '年'+ ma.course.term %>)
+ - 作业标题:<%=ma.course_message.jour.student_work.homework_common.name %>
+
+
<%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -232,10 +406,46 @@
+
+
+ <%= User.current.lastname + User.current.firstname %>
+ <%= User.current.allowed_to?(:as_teacher,ma.course_message.homework_common.course) ? '老师':'同学'%>您好!由于迟交作业,您及您的作品都不能参与以下作业的匿评。作业详情如下:
+
+
+ - 课程名称:<%= ma.course_message.homework_common.course.name %>(<%= ma.course_message.homework_common.course.time.to_s + '年' + ma.course_message.homework_common.course.term %>)
+ - 作业标题:<%= ma.course_message.homework_common.name %>
+ - 提交截止:<%= ma.course_message.homework_common.end_time %> 23:59
+ - 提交时间:<%= format_time(ma.course_message.created_at) %>
+ - 迟交扣分:<%= ma.course_message.homework_common.late_penalty %>分
+
+
如需获得最终成绩,请您联系主讲老师对您的作品进行单独评分!
+
您成功提交了作品(但被标记为迟交啦)
<%= time_tag(ma.created_at).html_safe %>
<% end %>
+
+
+ <% if ma.course_message_type == "StudentWork" && ma.status == 1 %>
+
+ -
+ <%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
+
+ -
+ <%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "同学",
+ user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
+ ">重新提交了作品:
+
+ -
+ <%= link_to "作业标题:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.homework_common_id, :show_work_id => ma.course_message_id),
+ :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+ <%#= link_to truncate(ma.course_message.name,:length=>25)+'(失败原因:提交作品的人数低于2人)', student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "c_red" : "newsGrey "}" %>
+
+
+
+ - <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
<% if ma.course_message_type == "Course" %>
@@ -252,6 +462,23 @@
+
+
+ <%= User.current.lastname + User.current.firstname %>老师您好!您成功创建了一个课程,详情如下:
+
+
课程名称:<%= ma.course_message.name %>
+
开课学期:<%= ma.course_message.time.to_s + '年' + ma.course_message.term %>
+
课程ID:<%= ma.course_message.id %>
+
课程密码:<%= ma.course_message.password %>
+
学时总数:<%= ma.course_message.class_period %>
+
创建时间:<%= format_time(ma.course_message.created_at) %>
+
您可以点击左上角的“配置”按钮,修改课程基本信息,添加及删除课程成员。您也可以把课程ID及密码告诉学生和其他成员,让他们输入ID及密码加入课程。
+ <% if ma.course_message.is_public %>
+
您的课程是公开的,所有人都能访问您的课程。若不想设置为公开,您可以在配置中设置。
+ <% else %>
+
您的课程是私有的,非课程成员不能访问您的课程。如果想设置为公开,您可以在配置中设置。
+ <% end %>
+
- <%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -269,6 +496,16 @@
+
+
+ <%= User.current.lastname + User.current.firstname %>老师您好!您有了新的课程成员申请,信息如下:
+
+
真实姓名:<%= User.find(ma.course_message_id).realname %>
+
申请课程:<%= Course.find(ma.course_id).name%>
+
课程描述:
+
<%= Course.find(ma.course_id).description.html_safe %>
+
申请职位:<%= ma.content == '9' ? "教师" : "教辅"%>
+
<% if ma.status == 0 || ma.status.nil?%>
@@ -304,6 +541,15 @@
+
+
+ <%= User.current.lastname + User.current.firstname %>老师您好!您已成功加入课程<%= Course.find(ma.course_id).name%>。
+
+
申请课程:<%= Course.find(ma.course_id).name%>
+
课程描述:
+
<%= Course.find(ma.course_id).description.html_safe %>
+
申请职位:<%= ma.content == '9' ? "教师" : "教辅"%>
+
<%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -324,6 +570,20 @@
+
+ <% if ma.course.is_public? || User.current.member_of_course?(ma.course) || User.current.admin? %>
+ <% teacher = User.find(ma.course_message_id) %>
+
<%= teacher.show_name %>(<%= teacher %>)老师把您加入了课程,详情如下:
+
课程名称:<%= ma.course.name %>
+
开课学期:<%= ma.course.time.to_s + '年'+ ma.course.term %>
+
课程ID:<%= ma.course.id %>
+
课时总数:<%= ma.course.class_period %>
+ <% else %>
+
+ 您已经被移出该私有课程,非课程成员没有权限访问私有课程
+
+ <% end %>
+
<%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -344,6 +604,20 @@
+
+ <% if ma.course.is_public? || User.current.member_of_course?(ma.course) || User.current.admin? %>
+
您增加了新的课程成员,详情如下:
+
成员:<%= User.find(ma.course_message_id).login+"("+(User.find(ma.course_message_id).realname ? User.find(ma.course_message_id).realname : User.find(ma.course_message_id).login) +")" %>
+
课程名称:<%= ma.course.name %>
+
开课学期:<%= ma.course.time.to_s + '年'+ ma.course.term %>
+
课程ID:<%= ma.course.id %>
+
课时总数:<%= ma.course.class_period %>
+ <% else %>
+
+ 您已经被移出该私有课程,非课程成员没有权限访问私有课程
+
+ <% end %>
+
<%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -364,6 +638,21 @@
+
+ <% if ma.course.is_public? || User.current.member_of?(ma.course) || User.current.admin? %>
+
您已被<%= User.find(ma.course_message_id).show_name %>老师移出了课程,详情如下:
+
课程名称:<%= ma.course.name %>
+
开课学期:<%= ma.course.time.to_s + '年'+ ma.course.term %>
+ <% if !ma.content.nil? %>
+
担任角色:<%= ma.content %>
+ <% end %>
+
学时总数:<%= ma.course.class_period %>
+ <% else %>
+
+ 您已经被移出该私有课程,非课程成员没有权限访问私有课程
+
+ <% end %>
+
<%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -380,6 +669,27 @@
+
+
+
+ <%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher,ma.course_message.course) ? '老师':'同学'%>您好!
+ <%= User.current.eql?(ma.course_message.user)?"您":(ma.course_message.user.lastname + ma.course_message.user.firstname+"老师") %>发布了课程测验 ,测验详情如下:
+
+
+ - 课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)
+ - 测验标题:<%= ma.course_message.exercise_name %>
+
+
+
+
+
+ - 截止时间:<%= ma.course_message.end_time.to_s.gsub("+0800","").to_datetime.strftime("%Y-%m-%d %H:%M:%S") %>
+ - 答题时长:<%= ma.course_message.time == -1 ? '不限时' : ma.course_message.time.to_s + '分钟' %>
+ <% if !User.current.allowed_to?(:as_teacher,ma.course_message.course)%>
+ 请记得在截止时间前完成测验噢,辛苦啦!
+ <% end %>
+
+
<%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -395,7 +705,23 @@
<%= link_to "测验题目:" + ma.course_message.exercise_name, exercise_path(:id => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+
+
+
+
+ <%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher,ma.course_message.course) ? '老师':'同学'%>您好!
+ <%= User.current.eql?(ma.course_message.user)?"您":(ma.course_message.user.lastname + ma.course_message.user.firstname+"老师") %>发布的课程测验截止时间快到了,测验详情如下:
+
+
+
+ - 课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)
+ - 测验标题:<%= ma.course_message.exercise_name %>
+ - 截止时间:<%= ma.course_message.end_time.to_s.gsub("+0800","").to_datetime.strftime("%Y-%m-%d %H:%M:%S") %>
+ - 答题时长:<%= ma.course_message.time == -1 ? '无限制' : ma.course_message.time.to_s + '分钟' %>
+ 请及时完成课程测验,辛苦啦!
+
+
截止时间快到啦
<%= time_tag(ma.created_at).html_safe %>
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index fa4eaacbe..2fe9ab079 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -14,6 +14,7 @@
<%= link_to "论坛动态", {:controller => "users", :action => "show", :type => "course_message"}, :class => "homepagePostTypeForum postTypeGrey"%>
<%= link_to "问卷动态", {:controller => "users", :action => "show", :type => "course_poll"}, :class => "homepagePostTypeQuiz postTypeGrey"%>
+ <%= link_to "课程留言", {:controller => "users", :action => "show", :type => "course_journals"}, :class =>"homepagePostTypeMessage postTypeGrey"%>
@@ -30,7 +31,7 @@
- 更多
- - <%= link_to "留言动态", {:controller => "users", :action => "show", :type => "user_journals"}, :class =>"homepagePostTypeMessage postTypeGrey"%>
+
- <%= link_to "个人留言", {:controller => "users", :action => "show", :type => "user_journals"}, :class =>"homepagePostTypeMessage postTypeGrey"%>
- <%= link_to "我的动态", {:controller => "users", :action => "show", :type => "current_user"}, :class =>"homepagePostTypeMine postTypeGrey"%>
- <%= link_to "全部动态", {:controller => "users", :action => "show", :type => nil}, :class =>"homepagePostTypeAll postTypeGrey"%>
diff --git a/db/migrate/20160322032610_change_domain_name_to_lowercase.rb b/db/migrate/20160322032610_change_domain_name_to_lowercase.rb
new file mode 100644
index 000000000..35a82477d
--- /dev/null
+++ b/db/migrate/20160322032610_change_domain_name_to_lowercase.rb
@@ -0,0 +1,14 @@
+class ChangeDomainNameToLowercase < ActiveRecord::Migration
+ def up
+ Secdomain.all.each do |domain|
+ domain.update_attribute(:subname, domain.subname.downcase)
+ end
+
+ SubfieldSubdomainDir.all.each do |dir|
+ dir.update_attribute(:name, dir.name.downcase)
+ end
+ end
+
+ def down
+ end
+end
diff --git a/public/javascripts/des_kindEditor.js b/public/javascripts/des_kindEditor.js
index 3a05c909d..126d2a334 100644
--- a/public/javascripts/des_kindEditor.js
+++ b/public/javascripts/des_kindEditor.js
@@ -54,7 +54,7 @@ function nh_check_field(params){
params.content.sync();
if(params.content.isEmpty()){
- params.contentmsg.html('内容不能为空');
+ params.contentmsg.html('请输入文章描述');
params.contentmsg.css({color:'#ff0000'});
}else{
params.contentmsg.html('填写正确');
@@ -131,7 +131,7 @@ function init_des_data(){
});
params.submit_btn.click(function () {
params.editor.sync();
- params.form[0].submit();
+ params.form.submit();
});
params.textarea.data('init', 1);
$(this).show();
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index 7dd3fd74f..b4d07f64f 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -419,6 +419,7 @@ a:hover.ping_sub{ background:#14a8b9;}
/*.ping_distop span a{ float:right; width:20px; height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}*/
.list_style ol li{list-style-type: decimal;margin-left: 20px;}
.list_style ul li{list-style-type: disc;margin-left: 20px;}
+span.author { font-size: 0.9em; color: #888; }
/* 创建作品 work */
.Newwork{ width:668px; height:418px;}
diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css
index 94e3fa85a..c455a5998 100644
--- a/public/stylesheets/new_user.css
+++ b/public/stylesheets/new_user.css
@@ -99,6 +99,7 @@ a.linkGrey6:hover {color:#ffffff !important;}
.mr40{ margin-right:40px !important;}
.mr65 {margin-right: 65px;}
.mw20{ margin: 0 20px;}
+.mw380 {max-width: 380px !important;}
.mw400 {max-width: 400px !important;}
.mt-20 {margin-top:-20px;}
.mt-4 {margin-top: -4px;}
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index 0a3732ced..9d37dc1cb 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -180,6 +180,7 @@ h4{ font-size:14px; color:#3b3b3b;}
.h150{ height:150px;}
.p10 {padding-left:10px; padding-right:10px;}
.mw360 {max-width: 360px !important;}
+.mw380 {max-width: 380px !important;}
.mw400 {max-width: 400px !important;}
.mh18 {max-height: 18px;}
@@ -1136,4 +1137,4 @@ a.program-btn{background: url(../images/homepage_icon.png) -86px -393px no-repea
.mediaIco{margin: 30px 0 30px 20px;width: 200px;}
/*排序样式*/
a.st_up{ display: block; width:8px; float:left; height:13px; background:url(../images/pic_up.png) 0 0 no-repeat; margin-top:5px; margin-left:3px;}
-a.st_down{ display: block; width:8px; float:left; height:13px; background:url(../images/pic_up.png) 0 -22px no-repeat; margin-top:5px; margin-left:3px;}
+a.st_down{ display: block; width:8px; float:left; height:13px; background:url(../images/pic_up.png) 0 -22px no-repeat; margin-top:5px; margin-left:3px;}