From 4b272b6b9c622dbc009da3de584847ae3a1cc083 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Mon, 9 Nov 2015 11:14:24 +0800 Subject: [PATCH 01/22] =?UTF-8?q?=E8=AE=BA=E5=9D=9B=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E5=85=81=E8=AE=B8=E6=89=A9=E5=A4=A7=E4=B8=BA40000=E4=B8=AA?= =?UTF-8?q?=E5=AD=97=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/memo.rb | 2 +- app/views/forums/show.html.erb | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/models/memo.rb b/app/models/memo.rb index 33b24db50..f6449a550 100644 --- a/app/models/memo.rb +++ b/app/models/memo.rb @@ -9,7 +9,7 @@ class Memo < ActiveRecord::Base # 若是主题帖,则内容可以是空 #validates :content, presence: true, if: Proc.new{|o| !o.parent_id.nil? } validates_length_of :subject, maximum: 50 - validates_length_of :content, maximum: 5000 + validates_length_of :content, maximum: 40000 validate :cannot_reply_to_locked_topic, :on => :create acts_as_tree :counter_cache => :replies_count, :order => "#{Memo.table_name}.created_at ASC" diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index 25a4fae46..3d239cff1 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -76,10 +76,10 @@ $("#error").html("主题 过长(最长为 50 个字符)").show(); return false; } -// if(memo_content.html().trim().length > 5000){ -// $("#error").html("内容 过长(最长为 5000 个字符)").show(); -// return false; -// } + if(memo_content.html().trim().length > 40000){ + $("#error").html("内容 过长(最长为 40000 个字符)").show(); + return false; + } return true; } From 1edd87f9e020cc69efd3f41d0689fd6baf76ba06 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Mon, 9 Nov 2015 11:15:01 +0800 Subject: [PATCH 02/22] =?UTF-8?q?=E8=AE=BA=E5=9D=9B=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E5=85=81=E8=AE=B8=E6=89=A9=E5=A4=A7=E4=B8=BA20000=E4=B8=AA?= =?UTF-8?q?=E5=AD=97=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/memo.rb | 2 +- app/views/forums/show.html.erb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/memo.rb b/app/models/memo.rb index f6449a550..94ff5cee2 100644 --- a/app/models/memo.rb +++ b/app/models/memo.rb @@ -9,7 +9,7 @@ class Memo < ActiveRecord::Base # 若是主题帖,则内容可以是空 #validates :content, presence: true, if: Proc.new{|o| !o.parent_id.nil? } validates_length_of :subject, maximum: 50 - validates_length_of :content, maximum: 40000 + validates_length_of :content, maximum: 20000 validate :cannot_reply_to_locked_topic, :on => :create acts_as_tree :counter_cache => :replies_count, :order => "#{Memo.table_name}.created_at ASC" diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index 3d239cff1..4bbf81668 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -76,8 +76,8 @@ $("#error").html("主题 过长(最长为 50 个字符)").show(); return false; } - if(memo_content.html().trim().length > 40000){ - $("#error").html("内容 过长(最长为 40000 个字符)").show(); + if(memo_content.html().trim().length > 20000){ + $("#error").html("内容 过长(最长为 20000 个字符)").show(); return false; } return true; From 2d321d2dbc2d11b9a79fe19c147400c424c849d4 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Mon, 9 Nov 2015 11:24:20 +0800 Subject: [PATCH 03/22] =?UTF-8?q?=E8=AE=BA=E5=9D=9B=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E5=85=81=E8=AE=B8=E6=89=A9=E5=A4=A7=E4=B8=BA20000=E4=B8=AA?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=EF=BC=8C=E8=B6=85=E8=BF=87=E4=B8=A4=E4=B8=87?= =?UTF-8?q?=E4=B8=AA=E5=AD=97=E7=AC=A6=E4=B8=8D=E5=85=81=E8=AE=B8=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/forums/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index 4bbf81668..8e5a6b8e0 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -76,7 +76,7 @@ $("#error").html("主题 过长(最长为 50 个字符)").show(); return false; } - if(memo_content.html().trim().length > 20000){ + if(memo_content.html().length > 20000){ $("#error").html("内容 过长(最长为 20000 个字符)").show(); return false; } From 2e092b0d04078f0a1c09f0dfcaf4d9c8d30fc71d Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Mon, 9 Nov 2015 11:27:05 +0800 Subject: [PATCH 04/22] =?UTF-8?q?=E8=AE=BA=E5=9D=9B=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E5=85=81=E8=AE=B8=E6=89=A9=E5=A4=A7=E4=B8=BA30000=E4=B8=AA?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=EF=BC=8C=E8=B6=85=E8=BF=87=E4=B8=A4=E4=B8=87?= =?UTF-8?q?=E4=B8=AA=E5=AD=97=E7=AC=A6=E4=B8=8D=E5=85=81=E8=AE=B8=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/memo.rb | 2 +- app/views/forums/show.html.erb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/memo.rb b/app/models/memo.rb index 94ff5cee2..7c4fbdcf1 100644 --- a/app/models/memo.rb +++ b/app/models/memo.rb @@ -9,7 +9,7 @@ class Memo < ActiveRecord::Base # 若是主题帖,则内容可以是空 #validates :content, presence: true, if: Proc.new{|o| !o.parent_id.nil? } validates_length_of :subject, maximum: 50 - validates_length_of :content, maximum: 20000 + validates_length_of :content, maximum: 30000 validate :cannot_reply_to_locked_topic, :on => :create acts_as_tree :counter_cache => :replies_count, :order => "#{Memo.table_name}.created_at ASC" diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index 8e5a6b8e0..523ab1300 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -76,8 +76,8 @@ $("#error").html("主题 过长(最长为 50 个字符)").show(); return false; } - if(memo_content.html().length > 20000){ - $("#error").html("内容 过长(最长为 20000 个字符)").show(); + if(memo_content.html().length > 30000){ + $("#error").html("内容 过长(最长为 30000 个字符)").show(); return false; } return true; From 157ba12513784cb6f9526c8cb2df64d4dd67e203 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Mon, 9 Nov 2015 14:04:51 +0800 Subject: [PATCH 05/22] =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=BA=93=E8=99=9A?= =?UTF-8?q?=E7=BA=BF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_resources_list.html.erb | 2 ++ public/stylesheets/new_user.css | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/users/_resources_list.html.erb b/app/views/users/_resources_list.html.erb index 34d609487..6f47e3535 100644 --- a/app/views/users/_resources_list.html.erb +++ b/app/views/users/_resources_list.html.erb @@ -21,5 +21,7 @@
  • <%= format_date(attach.created_on) %>
  • <%= attach.id %>
  • + + <% end %> <% end %> diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 7263c2f58..a4b8da25f 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -401,7 +401,8 @@ a.resourcesBlack {font-size:12px; color:#4c4c4c;white-space: nowrap;text-align: a.resourcesBlack:hover {font-size:12px; color:#000000;} .resourcesListCheckbox {width:20px; height:40px; line-height:40px; text-align:center; vertical-align:middle;} .resourcesCheckbox {padding:0px; margin:0px; margin-top:14px; width:12px; height:12px;} -.resourcesList {width:710px; height:39px; background-color:#ffffff; border-bottom:1px dashed #eaeaea; color:#9a9a9a; font-size:12px; margin-left:auto; margin-right:auto;} +.resourcesList {width:710px; height:39px; background-color:#ffffff; color:#9a9a9a; font-size:12px; margin-left:auto; margin-right:auto;} /*border-bottom:1px dashed #eaeaea;*/ +.resourcesListDashLine {width:710px;border-bottom:1px dashed #eaeaea !important; margin-left:auto; margin-right:auto; padding-bottom: 2px} /*border-bottom:1px dashed #eaeaea;*/ .resourcesListOption {width:710px; height:40px; line-height:40px; vertical-align:middle; margin-left:auto; margin-right:auto; background-color:#f6f6f6;} .resourcesCheckAll {width:20px; height:40px; line-height:40px; text-align:center; vertical-align:middle; float:left;} .resourcesSelectSend {float:right;} From 0c202a47bb5436b3249996a1efb35efce4b1ace2 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Mon, 9 Nov 2015 14:35:12 +0800 Subject: [PATCH 06/22] =?UTF-8?q?=E5=8D=9A=E5=AE=A2=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=EF=BC=8C=E7=82=B9=E5=87=BB=E5=8F=96=E6=B6=88=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E6=A1=86=E7=9A=84=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/blog_comments/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/blog_comments/show.html.erb b/app/views/blog_comments/show.html.erb index 2d4754a0a..54c9541f2 100644 --- a/app/views/blog_comments/show.html.erb +++ b/app/views/blog_comments/show.html.erb @@ -164,7 +164,7 @@
    <%= form_for :blog_comment, :url => {:action => 'reply',:controller => 'blog_comments',:user_id=>@article.author.id,:blog_id=>@article.blog_id, :id => @article.id}, :html => {:multipart => true, :id => 'message_form'} do |f| %> <%= render :partial => 'blog_comments/reply_form', :locals => {:f => f,:user=>@user,:article=>@article} %> - <%= link_to l(:button_cancel), "javascript:void(0)", :onclick => 'canel_message_replay();', :class => " grey_btn fr c_white mt10 mr5" %> + <%= link_to l(:button_cancel), "javascript:void(0)", :onclick => 'message_content_editor.html("");', :class => " grey_btn fr c_white mt10 mr5" %> <%= link_to l(:button_submit), "javascript:void(0)", :onclick => 'submit_message_replay();', :class => "blue_btn fr c_white mt10", :style => "margin-right: 5px;" %> <% end %>
    From 0e42554ef9b706fbabbb8fae68543f2886327cf9 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Mon, 9 Nov 2015 14:58:01 +0800 Subject: [PATCH 07/22] =?UTF-8?q?=E5=BC=95=E7=94=A8=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E5=92=8C=20=E7=9B=B4=E6=8E=A5=E4=B8=8A=E4=BC=A0=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E7=9A=84=E5=88=A0=E9=99=A4=E6=8C=89=E9=92=AE=E5=BA=94?= =?UTF-8?q?=E8=AF=A5=E5=9C=A8=E5=90=8C=E4=B8=80=E5=88=97=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/import_resources_to_homework.js.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/import_resources_to_homework.js.erb b/app/views/users/import_resources_to_homework.js.erb index c929f48e5..804b4ec44 100644 --- a/app/views/users/import_resources_to_homework.js.erb +++ b/app/views/users/import_resources_to_homework.js.erb @@ -2,7 +2,7 @@ <% @attachments.each do |attachment| %> $("#attachments_fields").append( ''+ - '<%= text_field_tag("attachments[p#{attachment.id}][filename]", attachment.filename, :class => "filename link_file", :readonly=>"readonly")%>'+ + '<%= text_field_tag("attachments[p#{attachment.id}][filename]", attachment.filename, :class => "upload_filename link_file", :readonly=>"readonly")%>'+ '<%= text_field_tag("attachments[p#{attachment.id}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => "description", :style=>"display: inline-block;") %>'+ '<%= l(:field_is_public)%>:'+ '<%= check_box_tag("attachments[p#{attachment.id}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => "is_public")%>'+ From 20b49385de29a421d0ea8b6ce7cd0d6b238c7933 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Mon, 9 Nov 2015 15:36:32 +0800 Subject: [PATCH 08/22] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E6=97=B6=E5=8C=BA?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=20=E4=BD=9C=E4=B8=9A=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=B7=BB=E5=8A=A0=E5=8F=91=E5=B8=83=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_user_message_course.html.erb | 1 + config/application.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/users/_user_message_course.html.erb b/app/views/users/_user_message_course.html.erb index 41c7c1eee..eb15fa717 100644 --- a/app/views/users/_user_message_course.html.erb +++ b/app/views/users/_user_message_course.html.erb @@ -66,6 +66,7 @@
  • 课程名称:<%= 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:%S').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
  • diff --git a/config/application.rb b/config/application.rb index 90cc299c6..6e4a2983a 100644 --- a/config/application.rb +++ b/config/application.rb @@ -41,7 +41,7 @@ module RedmineApp config.active_record.store_full_sti_class = true config.active_record.default_timezone = :local - + config.time_zone = 'Beijing' # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. # config.time_zone = 'Central Time (US & Canada)' From 7bd9c5b65cf0f1b05f34d1c1913cd52ee6ba0dad Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Mon, 9 Nov 2015 15:55:55 +0800 Subject: [PATCH 09/22] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E6=97=B6=E5=8C=BA?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=20=E4=BD=9C=E4=B8=9A=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=B7=BB=E5=8A=A0=E5=8F=91=E5=B8=83=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_user_message_course.html.erb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/users/_user_message_course.html.erb b/app/views/users/_user_message_course.html.erb index eb15fa717..384a91e54 100644 --- a/app/views/users/_user_message_course.html.erb +++ b/app/views/users/_user_message_course.html.erb @@ -66,10 +66,10 @@
  • 课程名称:<%= 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:%S').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
  • +
  • 发布时间:<%= 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 %>分
  • @@ -382,7 +382,7 @@
  • <%= link_to image_tag(url_to_avatar(ma.course_message.homework_common.user), :width => "30", :height => "30"), user_path(ma.course_message.homework_common.user) %>
  • <%=link_to ma.course_message.homework_common.user.show_name, user_path(ma.course_message.homework_common.user), :class => "newsBlue homepageNewsPublisher" %> - ">发布的作业: + ">老师发布的作业:
  • <%= link_to "作业题目:" + ma.course_message.homework_common.name, student_work_index_path(:homework => ma.course_message.homework_common_id), From 3c93103bc75755f97c62806f6a9f95cf939476ff Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Mon, 9 Nov 2015 15:59:24 +0800 Subject: [PATCH 10/22] =?UTF-8?q?=E8=BF=9F=E4=BA=A4=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=EF=BC=8C=E8=80=81=E5=B8=88=E5=90=8D=E7=A7=B0=E8=A6=81=E7=BB=99?= =?UTF-8?q?=E7=A7=B0=E5=91=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_user_message_course.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/users/_user_message_course.html.erb b/app/views/users/_user_message_course.html.erb index 384a91e54..da649663d 100644 --- a/app/views/users/_user_message_course.html.erb +++ b/app/views/users/_user_message_course.html.erb @@ -381,8 +381,8 @@
  • -
    \ No newline at end of file +
    + \ No newline at end of file diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 8b5e2fba3..85d2e3334 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -492,6 +492,13 @@ a:hover.tijiao{ background:#0f99a9;} .ni_con_work p{ color:#808181; } a.xls{ margin-left:5px; color:#136b3b;} .grey_c{ color:#808181;} + +.disable_btn { height:46px; display:block; width:90px; color:#fff; background:#d0d2d0; text-align:center; padding-top:4px; margin-right:15px;} +a.term_btn{ height:38px; display:block; width:90px; color:#fff; background:#269ac9; text-align:center; padding-top:12px; margin-right:15px;} +a:hover.term_btn{ background:#297fb8;} +p.c_black{ color:#000000;} +a.exit { height:24px; display:block; width:80px; color:#000000; background:#c3c3c3; text-align:center; padding-top:4px;} +.lh22{ line-height: 22px;} /* 学生列表*/ .st_list{ width:670px;} .st_search{ } From 8d94f57ec33fd3a37eb47be8f9dc0bebf4aa2361 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 10 Nov 2015 14:33:46 +0800 Subject: [PATCH 12/22] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E8=BF=9B=E5=BA=A6=E6=9D=A1=E4=B8=8D=E8=A7=81=E4=BA=86?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/courses.css | 2 ++ public/stylesheets/new_user.css | 2 ++ public/stylesheets/project.css | 2 ++ 3 files changed, 6 insertions(+) diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 8b5e2fba3..da4c03398 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -893,6 +893,8 @@ a.work_list_tit{width:580px; display:block; overflow:hidden; font-size:14px; f .c_w{ color:#fff;} .filename { background: url(../images/pic_file.png) 0 -25px no-repeat;color: #3ca5c6;max-width: 150px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} +#attachments_fields .ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} +#attachments_fields .ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;} .upload_filename{ background: url(../images/pic_file.png) 0 -20px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} .evaluation{position: relative;} .evaluation_submit{position: absolute;right: 0px;bottom: 0px;} diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index a4b8da25f..2ba5a7374 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -1153,6 +1153,8 @@ img.ui-datepicker-trigger { text-overflow: ellipsis; margin-bottom: 3px; } +#attachments_fields .ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} +#attachments_fields .ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;} .upload_filename{ background: url(../images/pic_file.png) 0 -25px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} .message_title{border: 1px solid #9C9C9C;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff; max-width:400px;word-wrap:break-word; word-break:break-all;} .message_title_red{border: 1px solid #484848;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff;background-image: -moz-linear-gradient(top, #fff, #E0E0E0);} diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index 4594d0c51..6a4254046 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -369,6 +369,8 @@ span.add_attachment {font-size: 80%;line-height: 2.5em;} #attachments_fields .ajax-loading input.filename {background:url(../images/loading.gif) no-repeat 0px 50%;} .reply_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #ccc; color:#999; border-radius:3px; padding:2px 10px; margin-bottom:10px;display: block;margin-left: 470px;} .reply_btn:hover{ background:#999; color:#fff; } +#attachments_fields .ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} +#attachments_fields .ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;} .upload_filename{ background: url(../images/pic_file.png) 0 -22px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} .attachments_fields input.description {margin-left:4px; width:100px; } .attachments_fields span .boldSpan{display:block; white-space:nowrap; font-family:'微软雅黑';} From dcdffe5d04782f3e8dd4d0ba01fe0685e31e190b Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 10 Nov 2015 14:37:16 +0800 Subject: [PATCH 13/22] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E8=BF=9B=E5=BA=A6=E6=9D=A1=E4=B8=8D=E8=A7=81=E4=BA=86?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/courses.css | 2 ++ public/stylesheets/new_user.css | 2 ++ public/stylesheets/project.css | 2 ++ 3 files changed, 6 insertions(+) diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 2fd06bf69..054dd5ffc 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -903,6 +903,8 @@ a.work_list_tit{width:580px; display:block; overflow:hidden; font-size:14px; f .c_w{ color:#fff;} .filename { background: url(../images/pic_file.png) 0 -25px no-repeat;color: #3ca5c6;max-width: 150px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} +#attachments_fields .ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} +#attachments_fields .ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;} .upload_filename{ background: url(../images/pic_file.png) 0 -20px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} .evaluation{position: relative;} .evaluation_submit{position: absolute;right: 0px;bottom: 0px;} diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 7263c2f58..2fbf79c30 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -1152,6 +1152,8 @@ img.ui-datepicker-trigger { text-overflow: ellipsis; margin-bottom: 3px; } +#attachments_fields .ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} +#attachments_fields .ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;} .upload_filename{ background: url(../images/pic_file.png) 0 -25px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} .message_title{border: 1px solid #9C9C9C;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff; max-width:400px;word-wrap:break-word; word-break:break-all;} .message_title_red{border: 1px solid #484848;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff;background-image: -moz-linear-gradient(top, #fff, #E0E0E0);} diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index 4594d0c51..6a4254046 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -369,6 +369,8 @@ span.add_attachment {font-size: 80%;line-height: 2.5em;} #attachments_fields .ajax-loading input.filename {background:url(../images/loading.gif) no-repeat 0px 50%;} .reply_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #ccc; color:#999; border-radius:3px; padding:2px 10px; margin-bottom:10px;display: block;margin-left: 470px;} .reply_btn:hover{ background:#999; color:#fff; } +#attachments_fields .ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} +#attachments_fields .ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;} .upload_filename{ background: url(../images/pic_file.png) 0 -22px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} .attachments_fields input.description {margin-left:4px; width:100px; } .attachments_fields span .boldSpan{display:block; white-space:nowrap; font-family:'微软雅黑';} From 4be3b16b60f4d4acfca25b115dab9be49d8eac86 Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 10 Nov 2015 14:51:44 +0800 Subject: [PATCH 14/22] =?UTF-8?q?=E9=9A=90=E8=97=8F=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/student_work/_evaluation_un_work.html.erb | 2 +- app/views/student_work/_evaluation_work.html.erb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/student_work/_evaluation_un_work.html.erb b/app/views/student_work/_evaluation_un_work.html.erb index 0d55cb130..ebe3d4cc6 100644 --- a/app/views/student_work/_evaluation_un_work.html.erb +++ b/app/views/student_work/_evaluation_un_work.html.erb @@ -80,6 +80,6 @@ <% end%> -
  • 点击查看详情
  • + diff --git a/app/views/student_work/_evaluation_work.html.erb b/app/views/student_work/_evaluation_work.html.erb index aa6009466..81d868a50 100644 --- a/app/views/student_work/_evaluation_work.html.erb +++ b/app/views/student_work/_evaluation_work.html.erb @@ -48,7 +48,7 @@
  • <%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>  - <% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(format_time(student_work.created_at)).strftime("%Y-%m-%d") %> + <% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(format_time(student_work.created_at)).strftime("%Y-%m-%d") %> [迟交] <% end %>
  • @@ -58,6 +58,6 @@
  • <%= my_score.nil? ? "--" : format("%.1f",my_score.score)%>
  • -
  • 点击查看详情
  • + From 82c377a60aa1988a562073bb088163e378f617f3 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 10 Nov 2015 15:18:13 +0800 Subject: [PATCH 15/22] =?UTF-8?q?=E5=9C=A8=E5=AF=BC=E8=88=AA=E5=A4=84?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E4=B8=8D=E5=8F=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../files/_new_style_attachment_list.html.erb | 82 +++++-------------- app/views/files/_upload_course_files.erb | 2 +- app/views/layouts/base_projects.html.erb | 2 +- .../_upload_project_files_list.html.erb | 35 ++++++++ .../_upload_project_files_on_navbar.html.erb | 30 +++++++ public/stylesheets/courses.css | 4 +- public/stylesheets/new_user.css | 4 +- public/stylesheets/project.css | 4 +- 8 files changed, 95 insertions(+), 68 deletions(-) create mode 100644 app/views/projects/_upload_project_files_list.html.erb create mode 100644 app/views/projects/_upload_project_files_on_navbar.html.erb diff --git a/app/views/files/_new_style_attachment_list.html.erb b/app/views/files/_new_style_attachment_list.html.erb index 022486413..af679c4d3 100644 --- a/app/views/files/_new_style_attachment_list.html.erb +++ b/app/views/files/_new_style_attachment_list.html.erb @@ -1,71 +1,33 @@ + <% checkBox = (@course.present? && @course.is_public?) ? 'public' : 'private'%> - -<% if @course %> - <%= file_field_tag 'attachments[dummy][file]', - :id => '_file', - :class => ie8? ? '':'file_selector', - :multiple => true, - :onchange => 'addInputFilesCourseSource(this,"'+ checkBox.to_s+'");', - :style => ie8? ? '': '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) - } %> -<% else %> - <%= file_field_tag 'attachments[dummy][file]', - :id => '_file', - :class => ie8? ? '':'file_selector', - :multiple => true, - :onchange => 'addInputFiles(this);', - :style => ie8? ? '': '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) - } %> -<% end %> - + + <%= file_field_tag 'attachments[dummy][file]', + :id => "_file#{container.id}", + :class => ie8? ? '':'file_selector', + :multiple => true, + :onchange => "addInputFiles_board(this, '#{container.id}');", + :style => ie8? ? '': '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) + } %> + - + <%= l(:label_no_file_uploaded)%> (<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
    - -<% if defined?(container) && container && container.saved_attachments %> - <% container.attachments.each_with_index do |attachment, i| %> - - <%= 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;") %> - <%= l(:field_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? - #待补充代码 - else - link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') - end - %> - <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> - - <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> - - <% end %> -<% end %> +
    \ No newline at end of file diff --git a/app/views/files/_upload_course_files.erb b/app/views/files/_upload_course_files.erb index 3578d4eb9..9c7021383 100644 --- a/app/views/files/_upload_course_files.erb +++ b/app/views/files/_upload_course_files.erb @@ -19,7 +19,7 @@
    - <%= render :partial => 'files/new_style_attachment_list',:locals => {:course => course} %> + <%= render :partial => 'files/new_style_attachment_list',:locals => {:container => course} %>
    <%= l(:button_cancel)%> diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index e06db1d0f..d2186118d 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -226,7 +226,7 @@ function project_files_upload() { - $('#ajax-modal').html('<%= escape_javascript(render :partial => 'files/upload_show_project',:locals => {:project => @project}) %>'); + $('#ajax-modal').html('<%= escape_javascript(render :partial => 'projects/upload_project_files_on_navbar',:locals => {:container => @project}) %>'); showModal('ajax-modal', '513px'); $('#ajax-modal').siblings().remove(); $('#ajax-modal').before(""); diff --git a/app/views/projects/_upload_project_files_list.html.erb b/app/views/projects/_upload_project_files_list.html.erb new file mode 100644 index 000000000..59da30012 --- /dev/null +++ b/app/views/projects/_upload_project_files_list.html.erb @@ -0,0 +1,35 @@ + +<% checkBox = (@course.present? && @course.is_public?) ? 'public' : 'private'%> + + <%= file_field_tag 'attachments[dummy][file]', + :id => "_file#{container.id}", + :class => ie8? ? '':'file_selector', + :multiple => true, + :onchange => "addInputFiles_board(this, '#{container.id}');", + :style => ie8? ? '': '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) + } %> + + + + + <%= l(:label_no_file_uploaded)%> + +(<%= l(:label_max_size) %>: +<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) +
    + +
    + + +
    +
    \ No newline at end of file diff --git a/app/views/projects/_upload_project_files_on_navbar.html.erb b/app/views/projects/_upload_project_files_on_navbar.html.erb new file mode 100644 index 000000000..591e159f1 --- /dev/null +++ b/app/views/projects/_upload_project_files_on_navbar.html.erb @@ -0,0 +1,30 @@ + +
    +
    +

    <%= l(:label_upload_files)%>

    +
    + <%= error_messages_for 'attachment' %> + + + <%= form_tag(project_files_path(container), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %> + + + <%= render :partial => 'projects/upload_project_files_list',:locals => {:container => container} %> +
    + <%= l(:button_cancel)%> + <%= l(:button_confirm)%> + <% end %> +
    + +
    + <% content_for :header_tags do %> + <%= javascript_include_tag 'attachments' %> + <% end %> +
    + + \ No newline at end of file diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index da4c03398..342833981 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -893,8 +893,8 @@ a.work_list_tit{width:580px; display:block; overflow:hidden; font-size:14px; f .c_w{ color:#fff;} .filename { background: url(../images/pic_file.png) 0 -25px no-repeat;color: #3ca5c6;max-width: 150px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} -#attachments_fields .ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} -#attachments_fields .ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;} + .ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} + .ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;} .upload_filename{ background: url(../images/pic_file.png) 0 -20px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} .evaluation{position: relative;} .evaluation_submit{position: absolute;right: 0px;bottom: 0px;} diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 2ba5a7374..f21a4b1fd 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -1153,8 +1153,8 @@ img.ui-datepicker-trigger { text-overflow: ellipsis; margin-bottom: 3px; } -#attachments_fields .ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} -#attachments_fields .ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;} + .ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} + .ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;} .upload_filename{ background: url(../images/pic_file.png) 0 -25px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} .message_title{border: 1px solid #9C9C9C;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff; max-width:400px;word-wrap:break-word; word-break:break-all;} .message_title_red{border: 1px solid #484848;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff;background-image: -moz-linear-gradient(top, #fff, #E0E0E0);} diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index 6a4254046..e7a24b151 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -369,8 +369,8 @@ span.add_attachment {font-size: 80%;line-height: 2.5em;} #attachments_fields .ajax-loading input.filename {background:url(../images/loading.gif) no-repeat 0px 50%;} .reply_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #ccc; color:#999; border-radius:3px; padding:2px 10px; margin-bottom:10px;display: block;margin-left: 470px;} .reply_btn:hover{ background:#999; color:#fff; } -#attachments_fields .ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} -#attachments_fields .ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;} + .ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} + .ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;} .upload_filename{ background: url(../images/pic_file.png) 0 -22px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} .attachments_fields input.description {margin-left:4px; width:100px; } .attachments_fields span .boldSpan{display:block; white-space:nowrap; font-family:'微软雅黑';} From c20ff6980bd3aba176ec265608b08eb53d778560 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 10 Nov 2015 15:22:10 +0800 Subject: [PATCH 16/22] =?UTF-8?q?=E8=BF=9B=E5=BA=A6=E6=9D=A1=E4=B8=8D?= =?UTF-8?q?=E8=A7=81=E4=BA=86bug=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/courses.css | 4 ++-- public/stylesheets/new_user.css | 4 ++-- public/stylesheets/project.css | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 054dd5ffc..48c6a2d88 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -903,8 +903,8 @@ a.work_list_tit{width:580px; display:block; overflow:hidden; font-size:14px; f .c_w{ color:#fff;} .filename { background: url(../images/pic_file.png) 0 -25px no-repeat;color: #3ca5c6;max-width: 150px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} -#attachments_fields .ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} -#attachments_fields .ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;} + .ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} + .ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;} .upload_filename{ background: url(../images/pic_file.png) 0 -20px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} .evaluation{position: relative;} .evaluation_submit{position: absolute;right: 0px;bottom: 0px;} diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 2fbf79c30..11ce8e613 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -1152,8 +1152,8 @@ img.ui-datepicker-trigger { text-overflow: ellipsis; margin-bottom: 3px; } -#attachments_fields .ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} -#attachments_fields .ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;} + .ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} + .ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;} .upload_filename{ background: url(../images/pic_file.png) 0 -25px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} .message_title{border: 1px solid #9C9C9C;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff; max-width:400px;word-wrap:break-word; word-break:break-all;} .message_title_red{border: 1px solid #484848;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff;background-image: -moz-linear-gradient(top, #fff, #E0E0E0);} diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index 6a4254046..e7a24b151 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -369,8 +369,8 @@ span.add_attachment {font-size: 80%;line-height: 2.5em;} #attachments_fields .ajax-loading input.filename {background:url(../images/loading.gif) no-repeat 0px 50%;} .reply_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #ccc; color:#999; border-radius:3px; padding:2px 10px; margin-bottom:10px;display: block;margin-left: 470px;} .reply_btn:hover{ background:#999; color:#fff; } -#attachments_fields .ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} -#attachments_fields .ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;} + .ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} + .ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;} .upload_filename{ background: url(../images/pic_file.png) 0 -22px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} .attachments_fields input.description {margin-left:4px; width:100px; } .attachments_fields span .boldSpan{display:block; white-space:nowrap; font-family:'微软雅黑';} From ef74d8d95693e50f4f69444c16c1680f27a5c119 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 10 Nov 2015 15:31:24 +0800 Subject: [PATCH 17/22] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BB=BB=E5=8A=A1--?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=94=A8=E6=88=B7=E5=90=8C=E6=AD=A5=E4=B8=8D?= =?UTF-8?q?=E6=88=90=E5=8A=9F=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/gitlab_to_git.rake | 22 ----------- lib/tasks/sync_gitlab_user.rake | 39 +++++++++++++++++++ lib/trustie/gitlab/helper.rb | 68 ++++++++++++++++----------------- 3 files changed, 73 insertions(+), 56 deletions(-) delete mode 100644 lib/tasks/gitlab_to_git.rake create mode 100644 lib/tasks/sync_gitlab_user.rake diff --git a/lib/tasks/gitlab_to_git.rake b/lib/tasks/gitlab_to_git.rake deleted file mode 100644 index c7b97e00d..000000000 --- a/lib/tasks/gitlab_to_git.rake +++ /dev/null @@ -1,22 +0,0 @@ -#coding=utf-8 - -namespace :rep_fault do - desc "set ossean's type value" - task :rep_update => :environment do - rep = Repository.find(400) - rep.type = "Repository::Git" - rep.save - end - - desc "forge and ossean's members" - task :sync_members => :environment do - projects = [] - projects << Project.where("id =? ",2) - projects << Project.where("id =? ",299) - puts projects - s = Trustie::Gitlab::Sync.new - projects.each do |project| - s.only_members(project.first) - end - end -end \ No newline at end of file diff --git a/lib/tasks/sync_gitlab_user.rake b/lib/tasks/sync_gitlab_user.rake new file mode 100644 index 000000000..c932ca36c --- /dev/null +++ b/lib/tasks/sync_gitlab_user.rake @@ -0,0 +1,39 @@ +#coding=utf-8 + +namespace :gitlab do + desc "sync gitlab's users which lost in last sync" + task :add_gid => :environment do + users = User.find_by_sql("select * from users where gid is null") + s = Trustie::Gitlab::Sync.new + g = Gitlab.client + users.each do |user| + us = g.get("/users?search=#{user.mail}") + puts user.mail + if us.blank? + puts "55555555555555555" + s.sync_user(user) + else + # 解决查询的时候出现多值的情况,比如:123@163.com和g123@163.com + puts "66666666666666666666" + puts user.id + if Array === us + us.each do |u| + if u.email == user.mail + user.gid = u.id + user.save + end + end + end + end + end + end + + task :sync_members => :environment do + projects = Project.all + s = Trustie::Gitlab::Sync.new + projects.each do |project| + puts project.id + s.only_members(project.first) + end + end +end \ No newline at end of file diff --git a/lib/trustie/gitlab/helper.rb b/lib/trustie/gitlab/helper.rb index 57c333875..61c1fbd17 100644 --- a/lib/trustie/gitlab/helper.rb +++ b/lib/trustie/gitlab/helper.rb @@ -3,46 +3,46 @@ module Trustie module Gitlab module Helper - def change_password(uid, en_pwd, salt) - return unless uid - options = {:encrypted_password=>en_pwd, :password_salt=>salt} - self.g.put("/users/ext/#{uid}", :body => options) - # g.edit_user(uid, :encrypted_password=>en_pwd, :password_salt=>salt) - end + def change_password(uid, en_pwd, salt) + return unless uid + options = {:encrypted_password=>en_pwd, :password_salt=>salt} + self.g.put("/users/ext/#{uid}", :body => options) + # g.edit_user(uid, :encrypted_password=>en_pwd, :password_salt=>salt) + end - def find_user(user) - us = self.g.get("/users?search=#{user.mail}") - if Array === us - us.each do |u| - return u if u.email == user.mail - end + def find_user(user) + us = self.g.get("/users?search=#{user.mail}") + if Array === us + us.each do |u| + return u if u.email == user.mail end - return nil end + return nil + end - def add_user(user) - u = nil - begin - u = find_user(user) - unless u - u = self.g.create_user(user.mail, - user.hashed_password, - name: user.show_name, - username: user.login, - confirm: "true") - user.gid = u.id - end - change_password(u.id, user.hashed_password, user.salt) - rescue => e - puts e - end - return u + def add_user(user) + u = nil + begin + u = find_user(user) + unless u + u = self.g.create_user(user.mail, + user.hashed_password, + name: user.show_name, + username: user.login, + confirm: "true") + user.gid = u.id + end + change_password(u.id, user.hashed_password, user.salt) + rescue => e + puts e end + return u + end - def del_user(user) - return unless user.gid - self.g.delete_user(user.gid) - end + def del_user(user) + return unless user.gid + self.g.delete_user(user.gid) + end end end From 463b6e91f5e5ebbf38ab0911fac13989eddb1685 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 10 Nov 2015 16:03:06 +0800 Subject: [PATCH 18/22] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=82=AE=E7=AE=B1?= =?UTF-8?q?=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/account/login.html.erb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/views/account/login.html.erb b/app/views/account/login.html.erb index fadf5e465..b316aa406 100644 --- a/app/views/account/login.html.erb +++ b/app/views/account/login.html.erb @@ -128,6 +128,11 @@ }); $mail.blur(function (event) { + if (/^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/.test(this.value) == false){ + $('#mail_req').html( '邮件格式不对').show(); + $mail_correct = false; + return ; + } if ($(this).is('#user_mail')) { $.get('<%=account_valid_ajax_path%>', { valid: "mail", From db0978c6571e5645fc5cc931d911e145b8fcc68a Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 10 Nov 2015 17:07:37 +0800 Subject: [PATCH 19/22] =?UTF-8?q?=E7=BC=96=E8=BE=91=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=E6=8A=A5500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/forums/show.html.erb | 118 +++++++++++++++++---------------- app/views/memos/edit.html.erb | 9 +-- public/javascripts/feedback.js | 38 ++++++++++- 3 files changed, 102 insertions(+), 63 deletions(-) diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index 523ab1300..5bbc52db2 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -1,4 +1,56 @@ <%= javascript_include_tag 'new_user','/assets/kindeditor/pasteimg','/assets/kindeditor/kindeditor' %> + +
    + + +
    + <%= render :partial => 'show_topics',:locals => {:memos=>@memos}%> +
    +
      + <%= pagination_links_full @topic_pages, @topic_count ,:per_page_links => true, :remote => true, :flag => true %> +
    + + + + + + + + + + + +
    + -
    - - -
    - <%= render :partial => 'show_topics',:locals => {:memos=>@memos}%> -
    -
      - <%= pagination_links_full @topic_pages, @topic_count ,:per_page_links => true, :remote => true, :flag => true %> -
    - - - - - - - - - - - -
    - \ No newline at end of file + \ No newline at end of file diff --git a/app/views/memos/edit.html.erb b/app/views/memos/edit.html.erb index d26ebdbf8..b2b7d73f0 100644 --- a/app/views/memos/edit.html.erb +++ b/app/views/memos/edit.html.erb @@ -7,10 +7,11 @@ $("#error").html('主题不能超过50个字符').show(); return; } -// if(memo_content.html().trim().length > 5000 ){ -// $("#error").html('内容不能超过5000个字符').show(); -// return; -// } + if(memo_content.html().length > 30000){ + $("#error").html("内容 过长(最长为 30000 个字符)").show(); + $("html,body").animate({scrollTop:$("#error").offset().top},1000) + return false; + } memo_content.sync(); $("#edit_memo").submit(); }else if($("textarea[name='memo[subject]']").val().trim() == "" && !memo_content.isEmpty() ){ diff --git a/public/javascripts/feedback.js b/public/javascripts/feedback.js index b30c8f91d..97209131e 100644 --- a/public/javascripts/feedback.js +++ b/public/javascripts/feedback.js @@ -1,5 +1,10 @@ (function($){ $.fn.fix = function(options){ + var u = navigator.userAgent; + if((u.indexOf('Android') > -1 || u.indexOf('Linux') > -1 ||u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1)){ + $("#scrollsidebar").css("display","none"); + return; + } var defaults = { float : 'right', minStatue : true, @@ -73,6 +78,11 @@ function cookieget(n) $(function(){ + var u = navigator.userAgent; + if((u.indexOf('Android') > -1 || u.indexOf('Linux') > -1 ||u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1)){ + $("#scrollsidebar").css("display","none"); + return; + } $(".closeSidebar").click(function(){ $(".show_btn").css("display","none"); $("#scrollsidebar").css("display","none"); @@ -109,4 +119,30 @@ $(function(){ $("#textCount").text(50-$("#subject").val().length) } }); -}); \ No newline at end of file +}); + +//var browser={ +// versions:function(){ +// var u = navigator.userAgent, app = navigator.appVersion; +// return {//移动终端浏览器版本信息 +// trident: u.indexOf('Trident') > -1, //IE内核 +// presto: u.indexOf('Presto') > -1, //opera内核 +// webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核 +// gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核 +// mobile: !!u.match(/AppleWebKit.*Mobile.*/)||!!u.match(/AppleWebKit/), //是否为移动终端 +// ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端 +// android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或者uc浏览器 +// iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1, //是否为iPhone或者QQHD浏览器 +// iPad: u.indexOf('iPad') > -1, //是否iPad +// webApp: u.indexOf('Safari') == -1 //是否web应该程序,没有头部与底部 +// }; +// }(), +// language:(navigator.browserLanguage || navigator.language).toLowerCase() +//} +//document.writeln("语言版本: "+browser.language); +//document.writeln(" 是否为移动终端: "+browser.versions.mobile); +//document.writeln(" ios终端: "+browser.versions.ios); +//document.writeln(" android终端: "+browser.versions.android); +//document.writeln(" 是否为iPhone: "+browser.versions.iPhone); +//document.writeln(" 是否iPad: "+browser.versions.iPad); +//document.writeln(navigator.userAgent); \ No newline at end of file From 2cf61ad74f9eb6a0f05cd5645bc805107b15a3fe Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 10 Nov 2015 17:34:18 +0800 Subject: [PATCH 20/22] =?UTF-8?q?=E7=BC=96=E8=BE=91=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=E6=8A=A5500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/forums/show.html.erb | 4 ++-- app/views/memos/edit.html.erb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index 5bbc52db2..05c086ed4 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -128,8 +128,8 @@ $("#error").html("主题 过长(最长为 50 个字符)").show(); return false; } - if(memo_content.html().length > 30000){ - $("#error").html("内容 过长(最长为 30000 个字符)").show(); + if(memo_content.html().length > 20000){ + $("#error").html("内容 过长(最长为 20000 个字符)").show(); $("html,body").animate({scrollTop:$("#error").offset().top},1000) return false; } diff --git a/app/views/memos/edit.html.erb b/app/views/memos/edit.html.erb index b2b7d73f0..cace5bcc8 100644 --- a/app/views/memos/edit.html.erb +++ b/app/views/memos/edit.html.erb @@ -7,8 +7,8 @@ $("#error").html('主题不能超过50个字符').show(); return; } - if(memo_content.html().length > 30000){ - $("#error").html("内容 过长(最长为 30000 个字符)").show(); + if(memo_content.html().length > 20000){ + $("#error").html("内容 过长(最长为 20000 个字符)").show(); $("html,body").animate({scrollTop:$("#error").offset().top},1000) return false; } From 508ca7f823c474d756d002b437557633b3648a3e Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Wed, 11 Nov 2015 11:19:10 +0800 Subject: [PATCH 21/22] =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E8=BF=9B=E5=BA=A6=E6=9D=A1=20=E6=96=87=E4=BB=B6=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/attachments/_form_course.html.erb | 3 ++- .../files/_new_style_attachment_list.html.erb | 3 ++- .../_upload_project_files_list.html.erb | 3 ++- public/javascripts/attachments.js | 17 ++++++++++++++--- public/stylesheets/courses.css | 3 ++- public/stylesheets/new_user.css | 3 ++- public/stylesheets/project.css | 4 ++-- 7 files changed, 26 insertions(+), 10 deletions(-) diff --git a/app/views/attachments/_form_course.html.erb b/app/views/attachments/_form_course.html.erb index b66632c7f..dddd0209e 100644 --- a/app/views/attachments/_form_course.html.erb +++ b/app/views/attachments/_form_course.html.erb @@ -60,7 +60,8 @@ :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) + :delete_all_files => l(:text_are_you_sure_all), + :containerid => "#{container.id}" } %> <% if container.nil? %> <%= l(:label_no_file_uploaded)%> diff --git a/app/views/files/_new_style_attachment_list.html.erb b/app/views/files/_new_style_attachment_list.html.erb index af679c4d3..7147769da 100644 --- a/app/views/files/_new_style_attachment_list.html.erb +++ b/app/views/files/_new_style_attachment_list.html.erb @@ -16,7 +16,8 @@ :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) + :delete_all_files => l(:text_are_you_sure_all), + :containerid => "#{container.id}" } %>
    diff --git a/app/views/projects/_upload_project_files_list.html.erb b/app/views/projects/_upload_project_files_list.html.erb index 59da30012..b072faa24 100644 --- a/app/views/projects/_upload_project_files_list.html.erb +++ b/app/views/projects/_upload_project_files_list.html.erb @@ -16,7 +16,8 @@ :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) + :delete_all_files => l(:text_are_you_sure_all), + :containerid => "#{container.id}" } %> diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js index 813c10dee..424e0e572 100644 --- a/public/javascripts/attachments.js +++ b/public/javascripts/attachments.js @@ -178,6 +178,17 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) { }) .done(function(result) { progressSpan.progressbar('value', 100).remove(); + var containerid = $(inputEl).data('containerid'); + console.log($(inputEl)) + if(containerid == undefined ){ + var count = $('#attachments_fields>span').length; + $('#upload_file_count').html("" + count + "" + $(inputEl).data('fileCount')); + } + else{ + var count = $('#attachments_fields' + containerid + '>span').length; + $('#upload_file_count' + containerid).html("" + count + "" + $(inputEl).data('fileCount')); + } + fileSpan.find('input.description, a').css('display', 'inline-block'); fileSpan.find('input.is_public_checkbox, a').css('display', 'inline-block'); }) @@ -202,7 +213,7 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) { var containerid = $(inputEl).data('containerid'); if (containerid == undefined) { var count = $('#attachments_fields>span').length; - $('#upload_file_count').html("" + count + "" + $(inputEl).data('fileCount')); + //$('#upload_file_count').html("" + count + "" + $(inputEl).data('fileCount')); if (count >= 1) { var add_attachs = $('.add_attachment'); var delete_all = $('.remove_all'); @@ -216,7 +227,7 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) { } } else { var count = $('#attachments_fields' + containerid + '>span').length; - $('#upload_file_count' + containerid).html("" + count + "" + $(inputEl).data('fileCount')); + //$('#upload_file_count' + containerid).html("" + count + "" + $(inputEl).data('fileCount')); if (count >= 1) { var add_attachs = $('.add_attachment').filter(function(index) { return $(this).data('containerid') == containerid; @@ -240,7 +251,7 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) { } - var progressSpan = $('
    ').insertAfter(fileSpan.find('input.filename')); + var progressSpan = $('
    ').insertAfter(fileSpan.find('input.upload_filename')); progressSpan.progressbar(); fileSpan.addClass('ajax-waiting'); diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 48c6a2d88..71b473abe 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -905,7 +905,8 @@ a.work_list_tit{width:580px; display:block; overflow:hidden; font-size:14px; f .filename { background: url(../images/pic_file.png) 0 -25px no-repeat;color: #3ca5c6;max-width: 150px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} .ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} .ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;} -.upload_filename{ background: url(../images/pic_file.png) 0 -20px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} +div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; } +.upload_filename{ background: url(../images/pic_file.png) 0 -20px no-repeat;color: #7f7f7f;width: 270px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} .evaluation{position: relative;} .evaluation_submit{position: absolute;right: 0px;bottom: 0px;} .student_work_search{background-color: #64bdd9;color: white !important;padding: 2px 7px;margin-left: 10px;cursor: pointer; } diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index f21a4b1fd..b9e7bf227 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -1155,7 +1155,8 @@ img.ui-datepicker-trigger { } .ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} .ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;} -.upload_filename{ background: url(../images/pic_file.png) 0 -25px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} +div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; } +.upload_filename{ background: url(../images/pic_file.png) 0 -25px no-repeat;color: #7f7f7f;width: 270px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} .message_title{border: 1px solid #9C9C9C;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff; max-width:400px;word-wrap:break-word; word-break:break-all;} .message_title_red{border: 1px solid #484848;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff;background-image: -moz-linear-gradient(top, #fff, #E0E0E0);} diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index e7a24b151..3dedf1396 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -371,10 +371,10 @@ span.add_attachment {font-size: 80%;line-height: 2.5em;} .reply_btn:hover{ background:#999; color:#fff; } .ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} .ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;} -.upload_filename{ background: url(../images/pic_file.png) 0 -22px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} +.upload_filename{ background: url(../images/pic_file.png) 0 -22px no-repeat;color: #7f7f7f;width: 270px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} .attachments_fields input.description {margin-left:4px; width:100px; } .attachments_fields span .boldSpan{display:block; white-space:nowrap; font-family:'微软雅黑';} -.attachments_fields div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; } +div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; } a.remove-upload:hover {text-decoration:none !important;} .attachments_fields input.is_public_checkbox {width:20px;} From d13205bd3de9e40c0a35d0eb2e545e69dedda452 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Wed, 11 Nov 2015 11:39:02 +0800 Subject: [PATCH 22/22] =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=AD=A3=E5=9C=A8?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/attachments/_form.html.erb | 1 + app/views/attachments/_form_course.html.erb | 1 + app/views/attachments/_form_project.html.erb | 2 ++ app/views/attachments/_new_form.html.erb | 1 + app/views/blog_comments/_blog_attachments.erb | 1 + app/views/files/_attachement_list.html.erb | 2 ++ app/views/files/_new_style_attachment_list.html.erb | 1 + app/views/forums/_file_form.html.erb | 1 + app/views/projects/_upload_project_files_list.html.erb | 1 + app/views/student_work/_student_work_attachment_form.html.erb | 1 + app/views/users/_attachment_list.html.erb | 1 + app/views/users/_user_homework_attachment.html.erb | 1 + config/locales/projects/zh.yml | 1 + public/javascripts/attachments.js | 4 ++-- 14 files changed, 17 insertions(+), 2 deletions(-) diff --git a/app/views/attachments/_form.html.erb b/app/views/attachments/_form.html.erb index 3dbc8d8ba..ab8b80dcb 100644 --- a/app/views/attachments/_form.html.erb +++ b/app/views/attachments/_form.html.erb @@ -62,6 +62,7 @@ :field_is_public => l(:field_is_public), :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), + :lebel_file_uploding => l(:lebel_file_uploding), :delete_all_files => l(:text_are_you_sure_all) } %> diff --git a/app/views/attachments/_form_course.html.erb b/app/views/attachments/_form_course.html.erb index dddd0209e..ef5385647 100644 --- a/app/views/attachments/_form_course.html.erb +++ b/app/views/attachments/_form_course.html.erb @@ -61,6 +61,7 @@ :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), :delete_all_files => l(:text_are_you_sure_all), + :lebel_file_uploding => l(:lebel_file_uploding), :containerid => "#{container.id}" } %> <% if container.nil? %> diff --git a/app/views/attachments/_form_project.html.erb b/app/views/attachments/_form_project.html.erb index d1cdf8cc9..a9cb068ad 100644 --- a/app/views/attachments/_form_project.html.erb +++ b/app/views/attachments/_form_project.html.erb @@ -60,7 +60,9 @@ :field_is_public => l(:field_is_public), :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), + :lebel_file_uploding => l(:lebel_file_uploding), :delete_all_files => l(:text_are_you_sure_all), + :lebel_file_uploding => l(:lebel_file_uploding), :containerid => "#{container.id}" } %> <%= l(:label_no_file_uploaded)%> diff --git a/app/views/attachments/_new_form.html.erb b/app/views/attachments/_new_form.html.erb index 47f6fd202..75efb448e 100644 --- a/app/views/attachments/_new_form.html.erb +++ b/app/views/attachments/_new_form.html.erb @@ -42,6 +42,7 @@ :field_is_public => l(:field_is_public), :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), + :lebel_file_uploding => l(:lebel_file_uploding), :delete_all_files => l(:text_are_you_sure_all) } %> diff --git a/app/views/blog_comments/_blog_attachments.erb b/app/views/blog_comments/_blog_attachments.erb index 48fe91099..dd8be659b 100644 --- a/app/views/blog_comments/_blog_attachments.erb +++ b/app/views/blog_comments/_blog_attachments.erb @@ -62,6 +62,7 @@ :field_is_public => l(:field_is_public), :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), + :lebel_file_uploding => l(:lebel_file_uploding), :delete_all_files => l(:text_are_you_sure_all) } %> diff --git a/app/views/files/_attachement_list.html.erb b/app/views/files/_attachement_list.html.erb index 01e5dca5f..c5a3b9af0 100644 --- a/app/views/files/_attachement_list.html.erb +++ b/app/views/files/_attachement_list.html.erb @@ -17,6 +17,7 @@ :field_is_public => l(:field_is_public), :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), + :lebel_file_uploding => l(:lebel_file_uploding), :delete_all_files => l(:text_are_you_sure_all) } %> <% else %> @@ -35,6 +36,7 @@ :field_is_public => l(:field_is_public), :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), + :lebel_file_uploding => l(:lebel_file_uploding), :delete_all_files => l(:text_are_you_sure_all) } %> <% end %> diff --git a/app/views/files/_new_style_attachment_list.html.erb b/app/views/files/_new_style_attachment_list.html.erb index 7147769da..174a05047 100644 --- a/app/views/files/_new_style_attachment_list.html.erb +++ b/app/views/files/_new_style_attachment_list.html.erb @@ -17,6 +17,7 @@ :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), :delete_all_files => l(:text_are_you_sure_all), + :lebel_file_uploding => l(:lebel_file_uploding), :containerid => "#{container.id}" } %> diff --git a/app/views/forums/_file_form.html.erb b/app/views/forums/_file_form.html.erb index 560afc6d9..2510952f1 100644 --- a/app/views/forums/_file_form.html.erb +++ b/app/views/forums/_file_form.html.erb @@ -63,6 +63,7 @@ :field_is_public => l(:field_is_public), :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), + :lebel_file_uploding => l(:lebel_file_uploding), :delete_all_files => l(:text_are_you_sure_all) } %> diff --git a/app/views/projects/_upload_project_files_list.html.erb b/app/views/projects/_upload_project_files_list.html.erb index b072faa24..c399bf210 100644 --- a/app/views/projects/_upload_project_files_list.html.erb +++ b/app/views/projects/_upload_project_files_list.html.erb @@ -16,6 +16,7 @@ :field_is_public => l(:field_is_public), :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), + :lebel_file_uploding => l(:lebel_file_uploding), :delete_all_files => l(:text_are_you_sure_all), :containerid => "#{container.id}" } %> diff --git a/app/views/student_work/_student_work_attachment_form.html.erb b/app/views/student_work/_student_work_attachment_form.html.erb index 265ff9be7..d82aea7f9 100644 --- a/app/views/student_work/_student_work_attachment_form.html.erb +++ b/app/views/student_work/_student_work_attachment_form.html.erb @@ -19,6 +19,7 @@ :field_is_public => l(:field_is_public), :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), + :lebel_file_uploding => l(:lebel_file_uploding), :delete_all_files => l(:text_are_you_sure_all), :containerid => "#{work.id}" } %> diff --git a/app/views/users/_attachment_list.html.erb b/app/views/users/_attachment_list.html.erb index 33e944498..3d44fa267 100644 --- a/app/views/users/_attachment_list.html.erb +++ b/app/views/users/_attachment_list.html.erb @@ -18,6 +18,7 @@ :field_is_public => l(:field_is_public), :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), + :lebel_file_uploding => l(:lebel_file_uploding), :delete_all_files => l(:text_are_you_sure_all) } %> diff --git a/app/views/users/_user_homework_attachment.html.erb b/app/views/users/_user_homework_attachment.html.erb index 9b7c6c06a..24d37ae63 100644 --- a/app/views/users/_user_homework_attachment.html.erb +++ b/app/views/users/_user_homework_attachment.html.erb @@ -40,6 +40,7 @@ :field_is_public => l(:field_is_public), :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), + :lebel_file_uploding => l(:lebel_file_uploding), :delete_all_files => l(:text_are_you_sure_all) } %>
    diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml index 88a710633..1a18e5a14 100644 --- a/config/locales/projects/zh.yml +++ b/config/locales/projects/zh.yml @@ -183,6 +183,7 @@ zh: label_optional_description: 可选的描述 label_file_count: "个文件已上传" + lebel_file_uploding: "个文件正在上传" # diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js index 424e0e572..5718983fa 100644 --- a/public/javascripts/attachments.js +++ b/public/javascripts/attachments.js @@ -213,7 +213,7 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) { var containerid = $(inputEl).data('containerid'); if (containerid == undefined) { var count = $('#attachments_fields>span').length; - //$('#upload_file_count').html("" + count + "" + $(inputEl).data('fileCount')); + $('#upload_file_count').html("" + count + "" + $(inputEl).data('lebelFileUploding')); if (count >= 1) { var add_attachs = $('.add_attachment'); var delete_all = $('.remove_all'); @@ -227,7 +227,7 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) { } } else { var count = $('#attachments_fields' + containerid + '>span').length; - //$('#upload_file_count' + containerid).html("" + count + "" + $(inputEl).data('fileCount')); + $('#upload_file_count' + containerid).html("" + count + "" + $(inputEl).data('lebelFileUploding')); if (count >= 1) { var add_attachs = $('.add_attachment').filter(function(index) { return $(this).data('containerid') == containerid;