<%= h(e.project) if @project.nil? || @project.id != e.project_id %>
<%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %> <%= l(:label_new_activity) %> :
@@ -113,7 +113,7 @@
<% elsif e.forge_act_type == "Attachment" %>
<%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %>
-
+
diff --git a/app/views/wiki/show.html.erb b/app/views/wiki/show.html.erb
index 1d585a571..28fab1243 100644
--- a/app/views/wiki/show.html.erb
+++ b/app/views/wiki/show.html.erb
@@ -45,7 +45,7 @@
<% end %>
<%= render(:partial => "wiki/content", :locals => {:content => @content}) %>
-<%= link_to_attachment_project @page, :author => false %>
+<%= link_to_attachment_project @page, :author => true %>
@@ -73,7 +73,7 @@
<% end %>
-
+
<% other_formats_links do |f| %>
<%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %>
<%= f.link_to 'HTML', :url => {:id => @page.title, :version => params[:version]} %>
diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml
index 8b957d68b..bd09f2538 100644
--- a/config/locales/projects/zh.yml
+++ b/config/locales/projects/zh.yml
@@ -239,6 +239,7 @@ zh:
# 新建问题
field_tracker: 跟踪
+ field_untracker: 取消跟踪
field_subject: 主题
field_quote: 描述
label_change_properties: 修改属性
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 6f1218788..a34ab933e 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -717,6 +717,7 @@ zh:
label_message_plural: 帖子
label_message_last: 最新的帖子
label_message_new: 发布新帖
+ label_message_reply: 回复帖子
label_message_posted: 发帖成功
label_send_information: 给用户发送帐号信息
diff --git a/public/javascripts/project.js b/public/javascripts/project.js
index 6f043c0a3..b5f769723 100644
--- a/public/javascripts/project.js
+++ b/public/javascripts/project.js
@@ -13,9 +13,10 @@ function regexName(content) {
}
}
-function submitSerch(content)
-{
- if(regexName(content)){$("#project_search_form").submit();}
+function submitSerch(content) {
+ if (regexName(content)) {
+ $("#project_search_form").submit();
+ }
}
@@ -25,15 +26,13 @@ function submitSerch(content)
//
// })
//})
-function expand_tools_expand(content)
-{
- if (content=="invit"){
+function expand_tools_expand(content) {
+ if (content == "invit") {
$("#expand_tools_expand_invit").toggleClass("currentDd").siblings(".subNav").removeClass("currentDd");
$("#expand_tools_expand_invit").toggleClass("currentDt").siblings(".subNav").removeClass("currentDt");
$("#expand_tools_expand_invit").next(".navContent").slideToggle(500).siblings(".navContent").slideUp(500);
}
- else
- {
+ else {
$("#expand_tools_expand").toggleClass("currentDd").siblings(".subNav").removeClass("currentDd");
$("#expand_tools_expand").toggleClass("currentDt").siblings(".subNav").removeClass("currentDt");
$("#expand_tools_expand").next(".navContent").slideToggle(500).siblings(".navContent").slideUp(500);
@@ -43,200 +42,226 @@ function expand_tools_expand(content)
}
// 描述显示更多信息
-function show_more_msg(){
- $("#course_description").toggleClass("course_description_none");
- var information = $("#expend_more_information");
- var arrow = $("#arrow");
- var val = information.attr("value");
- if (val=="展开更多信息" )
- {
+function show_more_msg() {
+ $("#course_description").toggleClass("course_description_none");
+ var information = $("#expend_more_information");
+ var arrow = $("#arrow");
+ var val = information.attr("value");
+ if (val == "展开更多信息") {
$("#expend_more_information").text("收起描述信息");
- information.attr("value","收起描述信息");
- arrow.attr("src","/images/jiantouup.jpg")
+ information.attr("value", "收起描述信息");
+ arrow.attr("src", "/images/jiantouup.jpg")
}
- else
- {
+ else {
$("#expend_more_information").text("展开更多信息");
- information.attr("value","展开更多信息");
- arrow.attr("src","/images/jiantou.jpg")
+ information.attr("value", "展开更多信息");
+ arrow.attr("src", "/images/jiantou.jpg")
}
}
///////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////项目讨论区
-function regexSubject()
-{
+function regexSubject() {
var content = $.trim($("#message_subject").val());
- if(content.length ==0)
- {
+ if (content.length == 0) {
$("#subject_span").text("主题不能为空");
- $("#subject_span").css('color','#ff0000');
+ $("#subject_span").css('color', '#ff0000');
return false;
}
- else
- {
+ else {
$("#subject_span").text("填写正确");
- $("#subject_span").css('color','#008000');
+ $("#subject_span").css('color', '#008000');
return true;
}
return false;
}
-function regexContent()
-{
+function regexContent() {
var content = $.trim($("#message_content").val());
- if(content.length ==0)
- {
+ if (content.length == 0) {
$("#message_content_span").text("描述不能为空");
- $("#message_content_span").css('color','#ff0000');
+ $("#message_content_span").css('color', '#ff0000');
return false;
}
- else
- {
+ else {
$("#message_content_span").text("填写正确");
- $("#message_content_span").css('color','#008000');
+ $("#message_content_span").css('color', '#008000');
return true;
}
return false;
}
// 项目编辑和提交
-function submitProjectsBoard()
-{
- if(regexSubject()&®exContent()){$("#message-form").submit();}
+function submitProjectsBoard() {
+ if (regexSubject() && regexContent()) {
+ $("#message-form").submit();
+ }
}
// 提交新闻
-function regexTitle()
-{
+function regexTitle() {
var name = $("#news_title").val();
- if(name.length ==0)
- {
+ if (name.length == 0) {
$("#title_notice_span").text("标题不能为空");
- $("#title_notice_span").css('color','#ff0000');
+ $("#title_notice_span").css('color', '#ff0000');
$("#title_notice_span").focus();
return false;
}
- else if(name.length <= 60)
- {
+ else if (name.length <= 60) {
$("#title_notice_span").text("填写正确");
- $("#title_notice_span").css('color','#008000');
+ $("#title_notice_span").css('color', '#008000');
return true;
}
- else
- {
+ else {
$("#title_notice_span").text("标题超过60个字符");
- $("#title_notice_span").css('color','#ff0000');
+ $("#title_notice_span").css('color', '#ff0000');
$("#title_notice_span").focus();
return false;
}
}
-function regexDescription()
-{
+function regexDescription() {
var name = $("#news_description").val();
- if(name.length ==0)
- {
+ if (name.length == 0) {
$("#description_notice_span").text("描述不能为空");
- $("#description_notice_span").css('color','#ff0000');
+ $("#description_notice_span").css('color', '#ff0000');
$("#description_notice_span").focus();
return false;
}
- else
- {
+ else {
$("#description_notice_span").text("填写正确");
- $("#description_notice_span").css('color','#008000');
+ $("#description_notice_span").css('color', '#008000');
return true;
}
}
-function submitNews()
-{
- if(regexTitle() && regexDescription())
- {
+function submitNews() {
+ if (regexTitle() && regexDescription()) {
$("#news-form").submit();
}
}
-function submitFocus(obj)
-{
+function submitFocus(obj) {
$(obj).focus();
}
//当项目描述长度小于112px时,不显示更多按钮
-$(function(){
+$(function () {
// alert($("#course_description_content").height());
- if($("#course_description_content").height()>112)
- {
+ if ($("#course_description_content").height() > 112) {
$("#lg-foot").show();
}
});
//配置项目信息
-function course_setting(id)
-{
+function course_setting(id) {
//alert(id);
- $('#tb_'+id).removeClass().addClass("hwork_hovertab");
- $('#tbc_0'+id).removeClass().addClass("dis");
- $('#tb_'+(3-id)).removeClass().addClass("hwork_normaltab");
- $('#tbc_0'+(3-id)).removeClass().addClass("undis");
+ $('#tb_' + id).removeClass().addClass("hwork_hovertab");
+ $('#tbc_0' + id).removeClass().addClass("dis");
+ $('#tb_' + (3 - id)).removeClass().addClass("hwork_normaltab");
+ $('#tbc_0' + (3 - id)).removeClass().addClass("undis");
}
//项目类型
-function show_window () {
- $('#light').css('display','block');
- $('#fade').css('display','block');
+function show_window() {
+ $('#light').css('display', 'block');
+ $('#fade').css('display', 'block');
}
-function close_window(type){
- $('#light').css('display','none');
- $('#fade').css('display','none');
+function close_window(type) {
+ $('#light').css('display', 'none');
+ $('#fade').css('display', 'none');
- $("#" + type).attr("checked","checked");
+ $("#" + type).attr("checked", "checked");
}
//弹框l
/////////////////////////////////////////////
//项目配置
-function project_setting(n)
-{
- for(var i = 1;i < 9; i++)
- {
- if(i == n)
- {
- $("#pro_st_tb_"+i).removeClass().addClass("pro_st_hovertab");
- $("#pro_st_tbc_0"+i).removeClass().addClass("pro_st_dis");
+function project_setting(n) {
+ for (var i = 1; i < 9; i++) {
+ if (i == n) {
+ $("#pro_st_tb_" + i).removeClass().addClass("pro_st_hovertab");
+ $("#pro_st_tbc_0" + i).removeClass().addClass("pro_st_dis");
}
- else
- {
- $("#pro_st_tb_"+i).removeClass().addClass("pro_st_normaltab");
- $("#pro_st_tbc_0"+i).removeClass().addClass("pro_st_undis");
+ else {
+ $("#pro_st_tb_" + i).removeClass().addClass("pro_st_normaltab");
+ $("#pro_st_tbc_0" + i).removeClass().addClass("pro_st_undis");
}
}
}
//配置--成员---申请列表--拒绝
-function refusal_applied_member()
-{
+function refusal_applied_member() {
$('#new_membership').append("
");
$('#new_membership').submit();
}
//新闻描述显示更多信息
-function news_show_more_des(id)
-{
+function news_show_more_des(id) {
$('#news_description_' + id).toggleClass("news_description_none");
}
-$(document).ready(function(){
- $("#issue_project_id").css("width","100%");
- $("#issue_project_id").css("overflow ","hidden");
+$(document).ready(function () {
+ $("#issue_project_id").css("width", "100%");
+ $("#issue_project_id").css("overflow ", "hidden");
// $(".jstEditor").css("margin-left ","80px");
//issue_project_id
});
function showAndScrollTo(id, focus) {
- $('#'+id).show();
+ $('#' + id).show();
if (focus !== null) {
- $('#'+focus).focus();
+ $('#' + focus).focus();
+ }
+ $('html, body').animate({scrollTop: $('#' + id).offset().top}, 400);
+
+
+ /*缺陷完成度决定缺陷状态*/
+ function PrecentChange(obj) {
+ var _v = obj;
+ if (_v == 100) {
+ //var select=$("select[id='issue_status_id']");
+ $("select[id='issue_status_id']").find("option[value='3']").attr("selected", "selected");
+ }
+ else if (_v == 0) {
+ //alert(1);
+ $("select[id='issue_status_id']").find("option[value='1']").attr("selected", "selected");
+ }
+ else if (_v != 100 && _v != 0) {
+ // alert(2);
+ $("select[id='issue_status_id']").find("option[value='2']").attr("selected", "selected");
+ }
+ }
+
+// Can't use Rails' remote select because we need the form data
+// 根据缺陷状态值改变完成度状态
+ function updateIssueFrom(url) {
+
+ $.ajax({
+ url: url,
+ type: 'post',
+ data: $('#issue-form').serialize()
+ });
+
}
- $('html, body').animate({scrollTop: $('#'+id).offset().top}, 400);
+
+// 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");
+ }
+
+ });
+
+
}
\ No newline at end of file
diff --git a/public/stylesheets/pleft.css b/public/stylesheets/pleft.css
index a64d3671f..cc7e18465 100644
--- a/public/stylesheets/pleft.css
+++ b/public/stylesheets/pleft.css
@@ -50,7 +50,7 @@ a:hover.subnav_green{ background:#14ad5a;}
.project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;}
.course_description{max-height: 112px;overflow:hidden; word-break: break-all;word-wrap: break-word;}
.course_description_none{max-height: none;}
-.lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;display: none;}
+.lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;}
.lg-foot:hover{ color:#787b7e; border:1px solid #d4d4d4;}
/****标签(和资源库的tag样式一致)***/
.project_Label{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; margin-bottom:10px;}
diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css
index d9bd7bda0..2f08af6d6 100644
--- a/public/stylesheets/project.css
+++ b/public/stylesheets/project.css
@@ -71,7 +71,7 @@ a:hover.problem_pic{border:1px solid #64bdd9;}
.pro_txt_w{width:610px;}
a.problem_name{ color:#ff5722; }
a:hover.problem_name{ color:#d33503;}
-a.problem_tit{ color:#0781b4; width:430px; font-weight:bold; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
+a.problem_tit{ color:#0781b4; max-width:430px; font-weight:bold; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
a.problem_tit02{ color:#0781b4; font-weight:bold;width:400px; }
a:hover.problem_tit,a:hover.problem_tit02{ color:#09658c; }
.problem_main{ border-bottom:1px dashed #d4d4d4; padding-bottom:10px; margin-bottom:10px;}
@@ -213,7 +213,7 @@ a:hover.ping_sub{ background:#14a8b9;}
/*.ping_distop span a{ float:right; width:20px; height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}*/
/*上传资源弹出框样式*/
-.popbox_polls{width:300px;height:100px;position:fixed !important;z-index:100;left:50%;top:50%;margin:-100px 0 0 -150px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
+/*#popbox_polls{width:300px;height:100px;position:fixed !important;z-index:100;left:50%;top:50%;margin:-100px 0 0 -150px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}*/
.upload_con h2{ display:block; background:#eaeaea; font-size:14px; color:#343333; height:31px; width: auto; margin-top:25px; padding-left:20px; padding-top:5px;}
.upload_box{ width:430px; margin:15px auto;}
@@ -378,6 +378,8 @@ blockquote {
.pro_st_dis{display:block; }
.pro_st_undis{display:none;}
+.upbtn { margin: 40px 0px 0px 15px;display: block;padding: 2px 5px;border: 1px solid #EAEAEA;}
+
.upimg{ border:1px solid #eaeaea; display:block; width:60px; height:60px; padding:1px;}
.upimg:hover{ border:1px solid #64bdd9; }
.box{ margin-bottom:10px;}
@@ -464,6 +466,21 @@ img.ui-datepicker-trigger {
.wiki_con_box{ line-height:1.9; color:#2d2d2d;}
.wiki_page_con{ border-bottom:1px dashed #CCC; margin-bottom:10px; padding-bottom:10px;}
#wiki_new_box{ display:none;}
+/*wiki显示附加*/
+.wiki-page {
+ font-size: 14px;
+ color: #09658C !important;
+ font-weight: bold;
+ width: 630px;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ margin-bottom: 10px;
+}
+/*.author{*/
+ /*color: #FF5722;*/
+ /*margin-left:20px;*/
+/*}*/
/*里程碑进度条*/
table.progress {
@@ -499,3 +516,7 @@ a.atom { background: url(../images/feed.png) no-repeat 1px 50%; padding: 2px 0px
p.other-formats { text-align: right; font-size:0.9em; color: #666; }
.other-formats span + span:before { content: "| "; }
+
+/*pre标签换行*/
+.break_word{word-break: break-all;word-wrap: break-word;}
+.break_word_firefox{white-space: pre-wrap;word-break: break-all;}
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index 16d5ccd13..9ff4985cc 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -44,6 +44,7 @@ h4{ font-size:14px; color:#3b3b3b;}
.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden}
.clearfix{clear:both;zoom:1}
.break_word{ word-break:break-all; word-wrap: break-word;}
+.hidden{overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.flow_hidden{ width:300px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
/* Spacing */