pre标签换行;contest主页样式调整

memcached_alan
whimlex 10 years ago
parent 76d7bd267c
commit cf4451e998

@ -27,7 +27,7 @@ class Comment < ActiveRecord::Base
def send_mail def send_mail
if self.commented.is_a?(News) && Setting.notified_events.include?('news_comment_added') if self.commented.is_a?(News) && Setting.notified_events.include?('news_comment_added')
Mailer.news_comment_added(self) Mailer.run.news_comment_added(self)
end end
end end
after_destroy :delete_kindeditor_assets after_destroy :delete_kindeditor_assets

@ -257,48 +257,6 @@
</ul> </ul>
</div> </div>
<div id="J_Slide" class="d-p-index-box d-p-index-Dynamic">
<h3 style="margin-left: 5px; color: #e8770d;">
<strong><%=l(:label_issue_feedback_activities)%></strong>
<%= link_to l(:label_my_question), newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
<%= link_to l(:label_my_feedback), suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
</h3>
<span style="margin-top: -20px;float: right; display: block;"><%= link_to l(:label_more_information), forums_path %></span>
<div class="d-p-projectlist-box">
<ul class="d-p-projectlist">
<% find_new_forum_topics(9 - @contest_notifications.count).each do |topic|%>
<li class="message-brief-intro" style="height: auto; line-height:2em; padding-bottom: 1px; border-bottom: 1px dashed ">
<div style="display: inline-block; width: 100%;">
<span class="memo_activity text_nowrap" style="color:gray; display: inline-block; margin-bottom:6px; background: url('/images/list-icon.png') no-repeat scroll ;background-position: left center;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %>
<%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;" %>
</span>
<div class='memo_activity memo_attr'>
<span class='memo_timestamp'>
<%= "#{l(:label_updated_time, value: time_tag_welcome(topic_last_time topic))}".html_safe %>
</span>
<span class="memo_author">
<%=l(:label_question_sponsor)%>&nbsp;<%= link_to topic.author.login.truncate(10, omission: '...'),user_path(topic.author),title: topic.author.login %>
</span>
<span class="memo_last_person">
<% unless (topic.last_reply.nil? || topic.last_reply.author.nil?) %>
<%=l(:label_final_reply)%>&nbsp;
<%=link_to topic.last_reply.author.login.truncate(10, omission: '...'),user_path(topic.last_reply.author),title: topic.last_reply.author.login%>
<% end %>
</span>
<span class="memo_reply">
<%=l(:label_reply)%>
(<%= link_to topic.try(:replies_count), topic.event_url %>)
</span>
</div>
</div>
</li>
<% end %>
</ul>
</div>
</div>
<div id="J_Slide" class="d-p-index-box d-p-index-left"> <div id="J_Slide" class="d-p-index-box d-p-index-left">
<h3 style="margin-left: 5px; color: #e8770d;"><strong><%=l(:label_current_attendingcontest_work)%></strong></h3> <h3 style="margin-left: 5px; color: #e8770d;"><strong><%=l(:label_current_attendingcontest_work)%></strong></h3>
@ -340,6 +298,46 @@
</div> </div>
</div> </div>
<div id="J_Slide" class="d-p-index-box d-p-index-Dynamic">
<h3 style="margin-left: 5px; color: #e8770d;">
<strong><%=l(:label_issue_feedback_activities)%></strong>
<%= link_to l(:label_my_question), newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
<%= link_to l(:label_my_feedback), suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
</h3>
<span style="margin-top: -20px;float: right; display: block;"><%= link_to l(:label_more_information), forums_path %></span>
<div class="d-p-projectlist-box">
<ul class="d-p-projectlist">
<% find_new_forum_topics(9 - @contest_notifications.count).each do |topic|%>
<li class="message-brief-intro" style="height: auto; line-height:2em; padding-bottom: 1px; border-bottom: 1px dashed ">
<div style="display: inline-block; width: 100%;">
<span class="memo_activity text_nowrap" style="color:gray; display: inline-block; margin-bottom:6px; background: url('/images/list-icon.png') no-repeat scroll ;background-position: left center;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %>
<%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;" %>
</span>
<div class='memo_activity memo_attr'>
<span class='memo_timestamp'>
<%= "#{l(:label_updated_time, value: time_tag_welcome(topic_last_time topic))}".html_safe %>
</span>
<span class="memo_author">
<%=l(:label_question_sponsor)%>&nbsp;<%= link_to topic.author.login.truncate(10, omission: '...'),user_path(topic.author),title: topic.author.login %>
</span>
<span class="memo_last_person">
<% unless (topic.last_reply.nil? || topic.last_reply.author.nil?) %>
<%=l(:label_final_reply)%>&nbsp;
<%=link_to topic.last_reply.author.login.truncate(10, omission: '...'),user_path(topic.last_reply.author),title: topic.last_reply.author.login%>
<% end %>
</span>
<span class="memo_reply">
<%=l(:label_reply)%>
(<%= link_to topic.try(:replies_count), topic.event_url %>)
</span>
</div>
</div>
</li>
<% end %>
</ul>
</div>
</div>
<div class="clearfix"></div> <div class="clearfix"></div>

@ -41,8 +41,18 @@
<div class="course welcome_left" id="welcome_left"> <div class="course welcome_left" id="welcome_left">
<span class="font_welcome_school"> <span class="font_welcome_school">
<% if @school_id.nil? and (User.current.user_extensions.nil? || User.current.user_extensions.school.nil?) %> <% if @school_id.nil? and (User.current.user_extensions.nil? || User.current.user_extensions.school.nil?) %>
<span class="font_welcome_tdescription">,
<!--
edit by meng
@course_page.description存储在first_page表中的description字段
原本代码
<%= @course_page.description %>
!-->
<%= l(:label_welcome_trustie_course_description) %>
</span>
<% else %> <% else %>
<% if @school_id == "0" %> <% if @school_id == "0" %>
<% else %> <% else %>
<% if @school_id.nil? %> <% if @school_id.nil? %>
<%= link_to School.find(User.current.user_extensions.school.id).name, options={:action => 'course', :school_id => User.current.user_extensions.school.id}, html_options={:class => 'font_welcome_school', :method => 'get'} %> <%= link_to School.find(User.current.user_extensions.school.id).name, options={:action => 'course', :school_id => User.current.user_extensions.school.id}, html_options={:class => 'font_welcome_school', :method => 'get'} %>
@ -65,23 +75,6 @@
<%= l(:label_welcome_trustie_course) %> <%= l(:label_welcome_trustie_course) %>
</span> </span>
<% if @school_id.nil? and (User.current.user_extensions.nil? || User.current.user_extensions.school.nil?) %>
<span class="font_welcome_tdescription">,
<!--
edit by meng
@course_page.description存储在first_page表中的description字段
原本代码
<%= @course_page.description %>
!-->
<%= l(:label_welcome_trustie_course_description) %>
</span>
<% else %>
<% if @school_id == "0" %>
<span class="font_welcome_tdescription">,
<%= @course_page.description %>
</span>
<% end %>
<% end %>
<% end %> <% end %>
</div> </div>
<div class="search-bar" id="search-bar"> <div class="search-bar" id="search-bar">

@ -1169,15 +1169,6 @@ en:
#end #end
# label_welcome_trustie: Trustie
# label_welcome_trustie_project: Online projects hosting platform
# label_welcome_trustie_course: Online Courses practice platform
# label_welcome_trustie_contest: Online Contests practice platform
# label_welcome_trustie_project_description: Software for Chinese college students and practitioners to provide social-oriented project management, code hosting, resource sharing, cooperation and exchange.
# label_welcome_trustie_course_description: Teachers and Students for Chinese universities to provide social-oriented curriculum management, resource sharing, cooperation achieved, collaborative research.
# label_welcome_trustie_contest_description: Software for Chinese college students and practitioners to provide social-oriented contest management, code hosting, resource sharing, cooperation and exchange.
# label_welcome_trustie_description: a socialized collaboration platform for project management, collaborative research, software development and software crowdsourcing for creative university students and entrepreneurs.
label_bid_if_agreement: If you like me, please press me #bai label_bid_if_agreement: If you like me, please press me #bai

@ -81,7 +81,7 @@ zh:
label_brief_introduction: 个性签名 label_brief_introduction: 个性签名
label_my_brief_introduction: 今天的心情如何?留下你的脚印吧~ label_my_brief_introduction: 今天的心情如何?留下你的脚印吧~
label_user_joinin: 加入时间 label_user_join: 加入时间
label_user_login: 最后登录 label_user_login: 最后登录
label_technical_title: 职称 label_technical_title: 职称
@ -213,6 +213,7 @@ zh:
# #
# Followers & Fans # Followers & Fans
# #
label_user_joinin: 加入时间
label_x_contribute_to: label_x_contribute_to:
zero: "参与了 %{count} 个项目" zero: "参与了 %{count} 个项目"
one: "参与了 %{count} 个项目——" one: "参与了 %{count} 个项目——"

@ -763,7 +763,7 @@ zh:
label_feedback_fail: "留言失败" label_feedback_fail: "留言失败"
label_user_login: "最后登录" label_user_login: "最后登录"
label_user_mail: "邮件地址" label_user_mail: "邮件地址"
label_user_joinin: "加入时间"
label_overview: "概述" label_overview: "概述"
@ -1411,13 +1411,7 @@ zh:
label_project_sort: 排序方式 label_project_sort: 排序方式
label_welcome_trustie: Trustie
label_welcome_trustie_project: 在线项目托管平台
label_welcome_trustie_course: 在线课程实践平台
label_welcome_trustie_contest: 在线竞赛实战平台
label_welcome_trustie_project_description: 面向中国大学生与软件从业者,提供社交化的项目管理、代码托管、资源共享、合作交流。
label_welcome_trustie_course_description: 面向中国高校教师与大学生,提供社交化的课程管理、资源共享、合作实验、协同研究。
label_welcome_trustie_contest_description: 面向中国大学生与编程爱好者,提供社交化的竞赛管理、应用管理、代码托管、合作交流。
label_user_project: 项目 label_user_project: 项目
label_user_course: 课程 label_user_course: 课程
label_user_homework: 作业 label_user_homework: 作业

@ -893,3 +893,22 @@ $(function(){
}) })
}); });
//firefox的pre标签换行
$(document).ready(function () {
var userAgent = navigator.userAgent.toLowerCase();
var browser = {
version: (userAgent.match(/.+(?:rv|it|ra|ie)[/: ]([d.]+)/) || [])[1],
safari: /webkit/.test(userAgent),
opera: /opera/.test(userAgent),
msie: /msie/.test(userAgent) && !/opera/.test(userAgent),
mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent)
};
if (browser.mozilla || browser.opera){
$("pre").addClass("break_word_firefox");
}
else{
$("pre").addClass("break_word");
}
});

@ -407,8 +407,23 @@ $(function(){
}); });
//将右侧的最小高度设置成左侧高度,美化界面 //将右侧的最小高度设置成左侧高度,美化界面
// firefox pre标签换行
$(document).ready(function () { $(document).ready(function () {
$("#RSide").css("min-height",$("#LSide").height()-30); $("#RSide").css("min-height",$("#LSide").height()-30);
var userAgent = navigator.userAgent.toLowerCase();
var browser = {
version: (userAgent.match(/.+(?:rv|it|ra|ie)[/: ]([d.]+)/) || [])[1],
safari: /webkit/.test(userAgent),
opera: /opera/.test(userAgent),
msie: /msie/.test(userAgent) && !/opera/.test(userAgent),
mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent)
};
if (browser.mozilla || browser.opera){
$("pre").addClass("break_word_firefox");
}
else{
$("pre").addClass("break_word");
}
}); });
// 日历选择日期后关闭 // 日历选择日期后关闭

@ -3150,6 +3150,11 @@ input[class~='m3p10'], .m3p10 {
cursor:pointer; cursor:pointer;
} }
/*pre标签换行*/
.break_word{word-break: break-all;word-wrap: break-word;}
.break_word_firefox{white-space: pre-wrap;word-break: break-all;}
/*lizanle 日誌搜索結果樣式*/ /*lizanle 日誌搜索結果樣式*/
.search_results { .search_results {
color: red; color: red;

@ -212,6 +212,7 @@ a:hover.close_btn {background-position:-66px 0;}
.show_btn {background-position:-119px 0;} .show_btn {background-position:-119px 0;}
.msgserver a:hover { color: #0fa9bb; } .msgserver a:hover { color: #0fa9bb; }
.break_word{word-break: break-all;word-wrap: break-word;} .break_word{word-break: break-all;word-wrap: break-word;}
.break_word_firefox{white-space: pre-wrap;word-break: break-all;}
/***** Ajax indicator ******/ /***** Ajax indicator ******/
#ajax-indicator { #ajax-indicator {
position: absolute; /* fixed not supported by IE */ position: absolute; /* fixed not supported by IE */

Loading…
Cancel
Save