From f67bdae22a5fb72f23947d209cee06bf8edd53a9 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 24 Apr 2015 09:10:15 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=AE=A8=E8=AE=BA?= =?UTF-8?q?=E5=8E=BB=E5=BC=95=E7=94=A8=E3=80=81=E5=9B=9E=E5=B8=96=E4=B8=8D?= =?UTF-8?q?=E6=8D=A2=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/messages/_course_show.html.erb | 4 ++-- app/views/news/_course_show.html.erb | 2 +- public/stylesheets/courses.css | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/messages/_course_show.html.erb b/app/views/messages/_course_show.html.erb index 018783fbd..579b26d65 100644 --- a/app/views/messages/_course_show.html.erb +++ b/app/views/messages/_course_show.html.erb @@ -41,7 +41,7 @@ :class => 'talk_edit fr' ) if @message.course_destroyable_by?(User.current) %>
-
<%= @topic.content.html_safe %>
+
<%= @topic.content.html_safe %>
<%= link_to_attachments_course @topic, :author => false %>
@@ -65,7 +65,7 @@
">
<%= link_to image_tag(url_to_avatar(message.author), :width => '46',:height => '46'), user_path(message.author) %>
-
+
<%= link_to_user_header message.author,false,:class => 'c_blue fb fl mb10 ' %> <%= format_time(message.created_on) %>
diff --git a/app/views/news/_course_show.html.erb b/app/views/news/_course_show.html.erb index fe73d3d75..63e2ffb85 100644 --- a/app/views/news/_course_show.html.erb +++ b/app/views/news/_course_show.html.erb @@ -68,7 +68,7 @@
<%= link_to image_tag(url_to_avatar(comment.author),:width => 42,:height => 42), user_path(comment.author)%>
-
+
<%= link_to_user_header(comment.author,false,:class => 'c_blue fb fl mb10 ') if comment.respond_to?(:author) %> <%= format_time(comment.created_on) %> diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index b8e23f4be..1e4b4fedf 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -345,7 +345,7 @@ a:hover.st_add{ color:#ff8e15;} a:hover.link_file{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;} .r_txt_tit{width:500px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf; float:left; color:#09658c; font-size:14px;} -blockquote {background: #eeeeee;padding: 10px;margin-bottom: 10px;} +blockquote {background: #eeeeee;padding: 10px;margin-bottom: 10px;word-break: break-all;word-wrap: break-word;} .respond-form{display: none;margin: auto;clear: both;} .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;} From 54ef7e332508c46b16a809a9b5f0e9d1b029706e Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 24 Apr 2015 14:57:44 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E8=AE=A8=E8=AE=BA=E5=8C=BA=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/boards_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index a301d270d..f6ec09b2a 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -51,7 +51,7 @@ class BoardsController < ApplicationController @boards = @course.boards.includes(:last_message => :author).all end end - if @boards.size == 1 + unless @course.boards.empty? @board = @course.boards.first end show and return From 85e1262769d25e58a88176dc5decc44ec1d3de94 Mon Sep 17 00:00:00 2001 From: whimlex Date: Fri, 24 Apr 2015 15:02:32 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E6=84=8F=E8=A7=81=E5=8F=8D=E9=A6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_base_feedback.html.erb | 11 +++++++++++ public/javascripts/feedback.js | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/views/layouts/_base_feedback.html.erb b/app/views/layouts/_base_feedback.html.erb index fb5e8f2ab..8e850b7ed 100644 --- a/app/views/layouts/_base_feedback.html.erb +++ b/app/views/layouts/_base_feedback.html.erb @@ -149,7 +149,18 @@ function cookieget(n) $("#textCount").text(49-$("#subject").val().length) } }) + $("#subject").keyup(function(){ + var curLength=$("#subject").val().length; + if(curLength>=50){ + var num=$("#subject").val().substr(0,49); + $("#subject").val(num); + } + else{ + $("#textCount").text(50-$("#subject").val().length) + } + }) }) +
diff --git a/public/javascripts/feedback.js b/public/javascripts/feedback.js index 5b06be7e6..6ba244d6d 100644 --- a/public/javascripts/feedback.js +++ b/public/javascripts/feedback.js @@ -121,7 +121,7 @@ $(document).ready(function(){ $("#subject").val(num); } else{ - $("#textCount").text(49-$("#subject").val().length); + $("#textCount").text(50-$("#subject").val().length); } }) }) \ No newline at end of file From 481f7ee4ba35743170f37aaf48e94791ff5651b1 Mon Sep 17 00:00:00 2001 From: whimlex Date: Fri, 24 Apr 2015 15:08:09 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E6=84=8F=E8=A7=81=E5=8F=8D=E9=A6=88?= =?UTF-8?q?=E6=8C=89=E5=9B=9E=E9=80=80=E9=94=AE=E9=87=8D=E6=96=B0=E8=AE=A1?= =?UTF-8?q?=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_base_feedback.html.erb | 10 +++++----- public/javascripts/feedback.js | 16 +++++++++++++--- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/app/views/layouts/_base_feedback.html.erb b/app/views/layouts/_base_feedback.html.erb index 8e850b7ed..beaf8d821 100644 --- a/app/views/layouts/_base_feedback.html.erb +++ b/app/views/layouts/_base_feedback.html.erb @@ -141,18 +141,18 @@ function cookieget(n) $(document).ready(function(){ $("#subject").keydown(function(){ var curLength=$("#subject").val().length; - if(curLength>=50){ - var num=$("#subject").val().substr(0,49); + if(curLength>50){ + var num=$("#subject").val().substr(0,50); $("#subject").val(num); } else{ - $("#textCount").text(49-$("#subject").val().length) + $("#textCount").text(50-$("#subject").val().length) } }) $("#subject").keyup(function(){ var curLength=$("#subject").val().length; - if(curLength>=50){ - var num=$("#subject").val().substr(0,49); + if(curLength>50){ + var num=$("#subject").val().substr(0,50); $("#subject").val(num); } else{ diff --git a/public/javascripts/feedback.js b/public/javascripts/feedback.js index 6ba244d6d..1bbab1f45 100644 --- a/public/javascripts/feedback.js +++ b/public/javascripts/feedback.js @@ -116,12 +116,22 @@ $(document).ready(function () { $(document).ready(function(){ $("#subject").keydown(function(){ var curLength=$("#subject").val().length; - if(curLength>=50){ - var num=$("#subject").val().substr(0,49); + if(curLength>50){ + var num=$("#subject").val().substr(0,50); $("#subject").val(num); } else{ - $("#textCount").text(50-$("#subject").val().length); + $("#textCount").text(50-$("#subject").val().length) + } + }) + $("#subject").keyup(function(){ + var curLength=$("#subject").val().length; + if(curLength>50){ + var num=$("#subject").val().substr(0,50); + $("#subject").val(num); + } + else{ + $("#textCount").text(50-$("#subject").val().length) } }) }) \ No newline at end of file From 3299f7e726f7a9b18646de1fc1a05848374ba91b Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 24 Apr 2015 15:20:10 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E6=AD=A3=E5=BC=8F=E5=BA=93issue=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E5=9B=BE=E7=89=87=E6=98=BE=E7=A4=BA=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 484a3189c..fed074bdb 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -329,7 +329,7 @@ module ApplicationHelper imagesize = attachment.thumbnail(:size => "50*50") imagepath = named_attachment_path(attachment, attachment.filename) if imagesize - link_to image_tag(imagesize), + link_to image_tag(thumbnail_path(attachment,"50")), imagepath, :title => attachment.filename else From 449bbc553cfe7a62cdf21ce2e10c1100f48ededa Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 24 Apr 2015 15:20:37 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dissue=E7=95=8C=E9=9D=A2js?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/repositories_helper.rb | 6 +++++- app/views/issues/_form.html.erb | 5 ++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb index 3c7123435..773560932 100644 --- a/app/helpers/repositories_helper.rb +++ b/app/helpers/repositories_helper.rb @@ -18,7 +18,11 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. module RepositoriesHelper - ROOT_PATH="/home/pdl/redmine-2.3.2-0/apache2/" + if Rails.env.development? + ROOT_PATH="/tmp/" if Rails.env.development? + else + ROOT_PATH="/home/pdl/redmine-2.3.2-0/apache2/" + end PROJECT_PATH_CUT = 40 REPO_IP_ADDRESS = Setting.repository_domain diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb index 5679c92d4..f0e28a975 100644 --- a/app/views/issues/_form.html.erb +++ b/app/views/issues/_form.html.erb @@ -38,8 +38,7 @@ <%= javascript_tag do %> observeAutocompleteField('issue_subject', - '<%= escape_javascript auto_complete_issues_path(:project_id => @project, :scope => (Setting.cross_project_issue_relations? ? 'all' : nil)) %> - ', + '<%= escape_javascript auto_complete_issues_path(:project_id => @project, :scope => (Setting.cross_project_issue_relations? ? 'all' : nil)) %>', { select: function(event, ui) { $('input#issue_subject').val(ui.item.value); } @@ -113,4 +112,4 @@ <%= call_hook(:view_issues_form_details_bottom, {:issue => @issue, :form => f}) %> -<% end %> \ No newline at end of file +<% end %>