Merge remote-tracking branch 'origin/szzh' into szzh

This commit is contained in:
lizanle 2015-04-24 16:05:40 +08:00
commit aff7a97c4b
9 changed files with 40 additions and 16 deletions

View File

@ -51,7 +51,7 @@ class BoardsController < ApplicationController
@boards = @course.boards.includes(:last_message => :author).all @boards = @course.boards.includes(:last_message => :author).all
end end
end end
if @boards.size == 1 unless @course.boards.empty?
@board = @course.boards.first @board = @course.boards.first
end end
show and return show and return

View File

@ -329,7 +329,7 @@ module ApplicationHelper
imagesize = attachment.thumbnail(:size => "50*50") imagesize = attachment.thumbnail(:size => "50*50")
imagepath = named_attachment_path(attachment, attachment.filename) imagepath = named_attachment_path(attachment, attachment.filename)
if imagesize if imagesize
link_to image_tag(imagesize), link_to image_tag(thumbnail_path(attachment,"50")),
imagepath, imagepath,
:title => attachment.filename :title => attachment.filename
else else

View File

@ -18,7 +18,11 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
module RepositoriesHelper 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 PROJECT_PATH_CUT = 40
REPO_IP_ADDRESS = Setting.repository_domain REPO_IP_ADDRESS = Setting.repository_domain

View File

@ -38,8 +38,7 @@
<!--Added by young--> <!--Added by young-->
<%= javascript_tag do %> <%= javascript_tag do %>
observeAutocompleteField('issue_subject', 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) { { select: function(event, ui) {
$('input#issue_subject').val(ui.item.value); $('input#issue_subject').val(ui.item.value);
} }

View File

@ -141,15 +141,26 @@ function cookieget(n)
$(document).ready(function(){ $(document).ready(function(){
$("#subject").keydown(function(){ $("#subject").keydown(function(){
var curLength=$("#subject").val().length; var curLength=$("#subject").val().length;
if(curLength>=50){ if(curLength>50){
var num=$("#subject").val().substr(0,49); var num=$("#subject").val().substr(0,50);
$("#subject").val(num); $("#subject").val(num);
} }
else{ 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,50);
$("#subject").val(num);
}
else{
$("#textCount").text(50-$("#subject").val().length)
} }
}) })
}) })
</script> </script>
<div class="scrollsidebar" id="scrollsidebar" style="float: right"> <div class="scrollsidebar" id="scrollsidebar" style="float: right">
<div class="side_content"> <div class="side_content">

View File

@ -41,7 +41,7 @@
:class => 'talk_edit fr' :class => 'talk_edit fr'
) if @message.course_destroyable_by?(User.current) %> ) if @message.course_destroyable_by?(User.current) %>
<div class="cl"></div> <div class="cl"></div>
<div class="talk_info mb10 upload_img"><%= @topic.content.html_safe %></div> <div class="talk_info mb10 upload_img break_word"><%= @topic.content.html_safe %></div>
<div class="talk_info mb10"><%= link_to_attachments_course @topic, :author => false %></div> <div class="talk_info mb10"><%= link_to_attachments_course @topic, :author => false %></div>
<!-- <a href="#" class=" link_file ml60">附件爱覅俄方if.zip(27.5kB)</a>--> <!-- <a href="#" class=" link_file ml60">附件爱覅俄方if.zip(27.5kB)</a>-->
<div class="cl"></div> <div class="cl"></div>
@ -65,7 +65,7 @@
<div class="ping_C mb10 ml50" id="<%= "message-#{message.id}" %>"> <div class="ping_C mb10 ml50" id="<%= "message-#{message.id}" %>">
<div class="ping_dispic"><%= link_to image_tag(url_to_avatar(message.author), :width => '46',:height => '46'), user_path(message.author) %></div> <div class="ping_dispic"><%= link_to image_tag(url_to_avatar(message.author), :width => '46',:height => '46'), user_path(message.author) %></div>
<div class="ping_discon"> <div class="ping_discon">
<div class="ping_distop upload_img"> <div class="ping_distop upload_img break_word">
<%= link_to_user_header message.author,false,:class => 'c_blue fb fl mb10 ' %> <%= link_to_user_header message.author,false,:class => 'c_blue fb fl mb10 ' %>
<span class="c_grey fr"><%= format_time(message.created_on) %></span> <span class="c_grey fr"><%= format_time(message.created_on) %></span>
<div class="cl"></div> <div class="cl"></div>

View File

@ -68,7 +68,7 @@
<div class="ping_C mb10"> <div class="ping_C mb10">
<div class="ping_dispic"><%= link_to image_tag(url_to_avatar(comment.author),:width => 42,:height => 42), user_path(comment.author)%></div> <div class="ping_dispic"><%= link_to image_tag(url_to_avatar(comment.author),:width => 42,:height => 42), user_path(comment.author)%></div>
<div class="ping_discon"> <div class="ping_discon">
<div class="ping_distop upload_img"> <div class="ping_distop upload_img break_word">
<%= link_to_user_header(comment.author,false,:class => 'c_blue fb fl mb10 ') if comment.respond_to?(:author) %> <%= link_to_user_header(comment.author,false,:class => 'c_blue fb fl mb10 ') if comment.respond_to?(:author) %>
<span class="c_grey fr"> <span class="c_grey fr">
<%= format_time(comment.created_on) %> <%= format_time(comment.created_on) %>

View File

@ -116,12 +116,22 @@ $(document).ready(function () {
$(document).ready(function(){ $(document).ready(function(){
$("#subject").keydown(function(){ $("#subject").keydown(function(){
var curLength=$("#subject").val().length; var curLength=$("#subject").val().length;
if(curLength>=50){ if(curLength>50){
var num=$("#subject").val().substr(0,49); var num=$("#subject").val().substr(0,50);
$("#subject").val(num); $("#subject").val(num);
} }
else{ 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,50);
$("#subject").val(num);
}
else{
$("#textCount").text(50-$("#subject").val().length)
} }
}) })
}) })

View File

@ -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;} 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;} .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;} .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;} .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;}