|
|
|
@ -425,4 +425,35 @@ $(function(){
|
|
|
|
|
|
|
|
|
|
personalized_init();
|
|
|
|
|
});
|
|
|
|
|
//cookie记忆html区块 显示/隐藏 的代码 end
|
|
|
|
|
//cookie记忆html区块 显示/隐藏 的代码 end
|
|
|
|
|
|
|
|
|
|
// 新建项目的时候判断是否与我已有的项目重复
|
|
|
|
|
function judgeprojectname(){
|
|
|
|
|
$('#new_project').validate({
|
|
|
|
|
errorPlacement: function(error, element){
|
|
|
|
|
alert('error')
|
|
|
|
|
},
|
|
|
|
|
success: function(label){
|
|
|
|
|
alert('ok')
|
|
|
|
|
},
|
|
|
|
|
onkeyup: false,
|
|
|
|
|
rules : {
|
|
|
|
|
name:{required : true,
|
|
|
|
|
remote : {
|
|
|
|
|
url : 'projects/judge_same_projectname',
|
|
|
|
|
type:'get',
|
|
|
|
|
dataType:'text',
|
|
|
|
|
data:{
|
|
|
|
|
name : function(){ return $.trim( $("#name").val() ); }
|
|
|
|
|
},
|
|
|
|
|
dataFilter:function( data ){
|
|
|
|
|
if( data=='true')return false; else return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
messages : {
|
|
|
|
|
name:{required : "请填写项目名称!",remote:'您已新建过同名项目,请修改项目名称!'}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|