|
|
@ -13,9 +13,10 @@ function regexName(content) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function submitSerch(content)
|
|
|
|
function submitSerch(content) {
|
|
|
|
{
|
|
|
|
if (regexName(content)) {
|
|
|
|
if(regexName(content)){$("#project_search_form").submit();}
|
|
|
|
$("#project_search_form").submit();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -25,15 +26,13 @@ function submitSerch(content)
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
//})
|
|
|
|
//})
|
|
|
|
function expand_tools_expand(content)
|
|
|
|
function expand_tools_expand(content) {
|
|
|
|
{
|
|
|
|
|
|
|
|
if (content == "invit") {
|
|
|
|
if (content == "invit") {
|
|
|
|
$("#expand_tools_expand_invit").toggleClass("currentDd").siblings(".subNav").removeClass("currentDd");
|
|
|
|
$("#expand_tools_expand_invit").toggleClass("currentDd").siblings(".subNav").removeClass("currentDd");
|
|
|
|
$("#expand_tools_expand_invit").toggleClass("currentDt").siblings(".subNav").removeClass("currentDt");
|
|
|
|
$("#expand_tools_expand_invit").toggleClass("currentDt").siblings(".subNav").removeClass("currentDt");
|
|
|
|
$("#expand_tools_expand_invit").next(".navContent").slideToggle(500).siblings(".navContent").slideUp(500);
|
|
|
|
$("#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("currentDd").siblings(".subNav").removeClass("currentDd");
|
|
|
|
$("#expand_tools_expand").toggleClass("currentDt").siblings(".subNav").removeClass("currentDt");
|
|
|
|
$("#expand_tools_expand").toggleClass("currentDt").siblings(".subNav").removeClass("currentDt");
|
|
|
|
$("#expand_tools_expand").next(".navContent").slideToggle(500).siblings(".navContent").slideUp(500);
|
|
|
|
$("#expand_tools_expand").next(".navContent").slideToggle(500).siblings(".navContent").slideUp(500);
|
|
|
@ -48,14 +47,12 @@ function show_more_msg(){
|
|
|
|
var information = $("#expend_more_information");
|
|
|
|
var information = $("#expend_more_information");
|
|
|
|
var arrow = $("#arrow");
|
|
|
|
var arrow = $("#arrow");
|
|
|
|
var val = information.attr("value");
|
|
|
|
var val = information.attr("value");
|
|
|
|
if (val=="展开更多信息" )
|
|
|
|
if (val == "展开更多信息") {
|
|
|
|
{
|
|
|
|
|
|
|
|
$("#expend_more_information").text("收起描述信息");
|
|
|
|
$("#expend_more_information").text("收起描述信息");
|
|
|
|
information.attr("value", "收起描述信息");
|
|
|
|
information.attr("value", "收起描述信息");
|
|
|
|
arrow.attr("src", "/images/jiantouup.jpg")
|
|
|
|
arrow.attr("src", "/images/jiantouup.jpg")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else {
|
|
|
|
{
|
|
|
|
|
|
|
|
$("#expend_more_information").text("展开更多信息");
|
|
|
|
$("#expend_more_information").text("展开更多信息");
|
|
|
|
information.attr("value", "展开更多信息");
|
|
|
|
information.attr("value", "展开更多信息");
|
|
|
|
arrow.attr("src", "/images/jiantou.jpg")
|
|
|
|
arrow.attr("src", "/images/jiantou.jpg")
|
|
|
@ -64,34 +61,28 @@ function show_more_msg(){
|
|
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////项目讨论区
|
|
|
|
//////////////////////////////////////////////////////////////项目讨论区
|
|
|
|
function regexSubject()
|
|
|
|
function regexSubject() {
|
|
|
|
{
|
|
|
|
|
|
|
|
var content = $.trim($("#message_subject").val());
|
|
|
|
var content = $.trim($("#message_subject").val());
|
|
|
|
if(content.length ==0)
|
|
|
|
if (content.length == 0) {
|
|
|
|
{
|
|
|
|
|
|
|
|
$("#subject_span").text("主题不能为空");
|
|
|
|
$("#subject_span").text("主题不能为空");
|
|
|
|
$("#subject_span").css('color', '#ff0000');
|
|
|
|
$("#subject_span").css('color', '#ff0000');
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else {
|
|
|
|
{
|
|
|
|
|
|
|
|
$("#subject_span").text("填写正确");
|
|
|
|
$("#subject_span").text("填写正确");
|
|
|
|
$("#subject_span").css('color', '#008000');
|
|
|
|
$("#subject_span").css('color', '#008000');
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function regexContent()
|
|
|
|
function regexContent() {
|
|
|
|
{
|
|
|
|
|
|
|
|
var content = $.trim($("#message_content").val());
|
|
|
|
var content = $.trim($("#message_content").val());
|
|
|
|
if(content.length ==0)
|
|
|
|
if (content.length == 0) {
|
|
|
|
{
|
|
|
|
|
|
|
|
$("#message_content_span").text("描述不能为空");
|
|
|
|
$("#message_content_span").text("描述不能为空");
|
|
|
|
$("#message_content_span").css('color', '#ff0000');
|
|
|
|
$("#message_content_span").css('color', '#ff0000');
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else {
|
|
|
|
{
|
|
|
|
|
|
|
|
$("#message_content_span").text("填写正确");
|
|
|
|
$("#message_content_span").text("填写正确");
|
|
|
|
$("#message_content_span").css('color', '#008000');
|
|
|
|
$("#message_content_span").css('color', '#008000');
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
@ -100,30 +91,27 @@ function regexContent()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 项目编辑和提交
|
|
|
|
// 项目编辑和提交
|
|
|
|
function submitProjectsBoard()
|
|
|
|
function submitProjectsBoard() {
|
|
|
|
{
|
|
|
|
if (regexSubject() && regexContent()) {
|
|
|
|
if(regexSubject()&®exContent()){$("#message-form").submit();}
|
|
|
|
$("#message-form").submit();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 提交新闻
|
|
|
|
// 提交新闻
|
|
|
|
function regexTitle()
|
|
|
|
function regexTitle() {
|
|
|
|
{
|
|
|
|
|
|
|
|
var name = $("#news_title").val();
|
|
|
|
var name = $("#news_title").val();
|
|
|
|
if(name.length ==0)
|
|
|
|
if (name.length == 0) {
|
|
|
|
{
|
|
|
|
|
|
|
|
$("#title_notice_span").text("标题不能为空");
|
|
|
|
$("#title_notice_span").text("标题不能为空");
|
|
|
|
$("#title_notice_span").css('color', '#ff0000');
|
|
|
|
$("#title_notice_span").css('color', '#ff0000');
|
|
|
|
$("#title_notice_span").focus();
|
|
|
|
$("#title_notice_span").focus();
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if(name.length <= 60)
|
|
|
|
else if (name.length <= 60) {
|
|
|
|
{
|
|
|
|
|
|
|
|
$("#title_notice_span").text("填写正确");
|
|
|
|
$("#title_notice_span").text("填写正确");
|
|
|
|
$("#title_notice_span").css('color', '#008000');
|
|
|
|
$("#title_notice_span").css('color', '#008000');
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else {
|
|
|
|
{
|
|
|
|
|
|
|
|
$("#title_notice_span").text("标题超过60个字符");
|
|
|
|
$("#title_notice_span").text("标题超过60个字符");
|
|
|
|
$("#title_notice_span").css('color', '#ff0000');
|
|
|
|
$("#title_notice_span").css('color', '#ff0000');
|
|
|
|
$("#title_notice_span").focus();
|
|
|
|
$("#title_notice_span").focus();
|
|
|
@ -131,49 +119,41 @@ function regexTitle()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function regexDescription()
|
|
|
|
function regexDescription() {
|
|
|
|
{
|
|
|
|
|
|
|
|
var name = $("#news_description").val();
|
|
|
|
var name = $("#news_description").val();
|
|
|
|
if(name.length ==0)
|
|
|
|
if (name.length == 0) {
|
|
|
|
{
|
|
|
|
|
|
|
|
$("#description_notice_span").text("描述不能为空");
|
|
|
|
$("#description_notice_span").text("描述不能为空");
|
|
|
|
$("#description_notice_span").css('color', '#ff0000');
|
|
|
|
$("#description_notice_span").css('color', '#ff0000');
|
|
|
|
$("#description_notice_span").focus();
|
|
|
|
$("#description_notice_span").focus();
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else {
|
|
|
|
{
|
|
|
|
|
|
|
|
$("#description_notice_span").text("填写正确");
|
|
|
|
$("#description_notice_span").text("填写正确");
|
|
|
|
$("#description_notice_span").css('color', '#008000');
|
|
|
|
$("#description_notice_span").css('color', '#008000');
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function submitNews()
|
|
|
|
function submitNews() {
|
|
|
|
{
|
|
|
|
if (regexTitle() && regexDescription()) {
|
|
|
|
if(regexTitle() && regexDescription())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$("#news-form").submit();
|
|
|
|
$("#news-form").submit();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function submitFocus(obj)
|
|
|
|
function submitFocus(obj) {
|
|
|
|
{
|
|
|
|
|
|
|
|
$(obj).focus();
|
|
|
|
$(obj).focus();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//当项目描述长度小于112px时,不显示更多按钮
|
|
|
|
//当项目描述长度小于112px时,不显示更多按钮
|
|
|
|
$(function () {
|
|
|
|
$(function () {
|
|
|
|
// alert($("#course_description_content").height());
|
|
|
|
// alert($("#course_description_content").height());
|
|
|
|
if($("#course_description_content").height()>112)
|
|
|
|
if ($("#course_description_content").height() > 112) {
|
|
|
|
{
|
|
|
|
|
|
|
|
$("#lg-foot").show();
|
|
|
|
$("#lg-foot").show();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
//配置项目信息
|
|
|
|
//配置项目信息
|
|
|
|
function course_setting(id)
|
|
|
|
function course_setting(id) {
|
|
|
|
{
|
|
|
|
|
|
|
|
//alert(id);
|
|
|
|
//alert(id);
|
|
|
|
$('#tb_' + id).removeClass().addClass("hwork_hovertab");
|
|
|
|
$('#tb_' + id).removeClass().addClass("hwork_hovertab");
|
|
|
|
$('#tbc_0' + id).removeClass().addClass("dis");
|
|
|
|
$('#tbc_0' + id).removeClass().addClass("dis");
|
|
|
@ -197,32 +177,26 @@ function close_window(type){
|
|
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
|
|
/////////////////////////////////////////////
|
|
|
|
//项目配置
|
|
|
|
//项目配置
|
|
|
|
function project_setting(n)
|
|
|
|
function project_setting(n) {
|
|
|
|
{
|
|
|
|
for (var i = 1; i < 9; i++) {
|
|
|
|
for(var i = 1;i < 9; i++)
|
|
|
|
if (i == n) {
|
|
|
|
{
|
|
|
|
|
|
|
|
if(i == n)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$("#pro_st_tb_" + i).removeClass().addClass("pro_st_hovertab");
|
|
|
|
$("#pro_st_tb_" + i).removeClass().addClass("pro_st_hovertab");
|
|
|
|
$("#pro_st_tbc_0" + i).removeClass().addClass("pro_st_dis");
|
|
|
|
$("#pro_st_tbc_0" + i).removeClass().addClass("pro_st_dis");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else {
|
|
|
|
{
|
|
|
|
|
|
|
|
$("#pro_st_tb_" + i).removeClass().addClass("pro_st_normaltab");
|
|
|
|
$("#pro_st_tb_" + i).removeClass().addClass("pro_st_normaltab");
|
|
|
|
$("#pro_st_tbc_0" + i).removeClass().addClass("pro_st_undis");
|
|
|
|
$("#pro_st_tbc_0" + i).removeClass().addClass("pro_st_undis");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//配置--成员---申请列表--拒绝
|
|
|
|
//配置--成员---申请列表--拒绝
|
|
|
|
function refusal_applied_member()
|
|
|
|
function refusal_applied_member() {
|
|
|
|
{
|
|
|
|
|
|
|
|
$('#new_membership').append("<input name = 'refusal_button' style='display: none;'>");
|
|
|
|
$('#new_membership').append("<input name = 'refusal_button' style='display: none;'>");
|
|
|
|
$('#new_membership').submit();
|
|
|
|
$('#new_membership').submit();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//新闻描述显示更多信息
|
|
|
|
//新闻描述显示更多信息
|
|
|
|
function news_show_more_des(id)
|
|
|
|
function news_show_more_des(id) {
|
|
|
|
{
|
|
|
|
|
|
|
|
$('#news_description_' + id).toggleClass("news_description_none");
|
|
|
|
$('#news_description_' + id).toggleClass("news_description_none");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -241,22 +215,18 @@ function showAndScrollTo(id, focus) {
|
|
|
|
$('html, body').animate({scrollTop: $('#' + id).offset().top}, 400);
|
|
|
|
$('html, body').animate({scrollTop: $('#' + id).offset().top}, 400);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*缺陷完成度决定缺陷状态*/
|
|
|
|
/*缺陷完成度决定缺陷状态*/
|
|
|
|
function PrecentChange(obj) {
|
|
|
|
function PrecentChange(obj) {
|
|
|
|
var _v = obj;
|
|
|
|
var _v = obj;
|
|
|
|
if(_v==100)
|
|
|
|
if (_v == 100) {
|
|
|
|
{
|
|
|
|
|
|
|
|
//var select=$("select[id='issue_status_id']");
|
|
|
|
//var select=$("select[id='issue_status_id']");
|
|
|
|
$("select[id='issue_status_id']").find("option[value='3']").attr("selected", "selected");
|
|
|
|
$("select[id='issue_status_id']").find("option[value='3']").attr("selected", "selected");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if(_v==0)
|
|
|
|
else if (_v == 0) {
|
|
|
|
{
|
|
|
|
|
|
|
|
//alert(1);
|
|
|
|
//alert(1);
|
|
|
|
$("select[id='issue_status_id']").find("option[value='1']").attr("selected", "selected");
|
|
|
|
$("select[id='issue_status_id']").find("option[value='1']").attr("selected", "selected");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if(_v!=100&&_v!=0)
|
|
|
|
else if (_v != 100 && _v != 0) {
|
|
|
|
{
|
|
|
|
|
|
|
|
// alert(2);
|
|
|
|
// alert(2);
|
|
|
|
$("select[id='issue_status_id']").find("option[value='2']").attr("selected", "selected");
|
|
|
|
$("select[id='issue_status_id']").find("option[value='2']").attr("selected", "selected");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -274,4 +244,24 @@ function updateIssueFrom(url) {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 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");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|