|
@@ -61,34 +61,35 @@ $(document).ready(function(){
|
|
|
$("#myDialogRoot").remove();
|
|
$("#myDialogRoot").remove();
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
//设置收集规则
|
|
//设置收集规则
|
|
|
$(".sur_collectSet").unbind();
|
|
$(".sur_collectSet").unbind();
|
|
|
$(".sur_collectSet").click(function(){
|
|
$(".sur_collectSet").click(function(){
|
|
|
var url=ctx+"/js/dw/html/collectset.html";
|
|
var url=ctx+"/js/dw/html/collectset.html";
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$.ajax({
|
|
$.ajax({
|
|
|
url:url,
|
|
url:url,
|
|
|
type:"get",
|
|
type:"get",
|
|
|
dataType:"html",
|
|
dataType:"html",
|
|
|
success:function(data){
|
|
success:function(data){
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
//$("body").append("<div id=\"myDialogRoot\"><div class='dialogMessage'></div></div>");
|
|
//$("body").append("<div id=\"myDialogRoot\"><div class='dialogMessage'></div></div>");
|
|
|
$("body").append("<div id=\"myDialogRoot\">"+data+"</div>");
|
|
$("body").append("<div id=\"myDialogRoot\">"+data+"</div>");
|
|
|
$("#myDialogRoot .mailOnlyItem").hide();
|
|
$("#myDialogRoot .mailOnlyItem").hide();
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
url=ctx+"/design/my-survey!attrs.action";
|
|
url=ctx+"/design/my-survey!attrs.action";
|
|
|
var data="id="+$("#id").val();
|
|
var data="id="+$("#id").val();
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$.ajax({
|
|
$.ajax({
|
|
|
url:url,
|
|
url:url,
|
|
|
data:data,
|
|
data:data,
|
|
|
type:'post',
|
|
type:'post',
|
|
|
success:function(msg){
|
|
success:function(msg){
|
|
|
-
|
|
|
|
|
|
|
+ // console.debug(msg);
|
|
|
|
|
+
|
|
|
var survey=eval("("+msg+")");
|
|
var survey=eval("("+msg+")");
|
|
|
$("#myDialogRoot input[name='effective'][value='"+survey.surveyDetail.effective+"']").attr("checked",true);
|
|
$("#myDialogRoot input[name='effective'][value='"+survey.surveyDetail.effective+"']").attr("checked",true);
|
|
|
$("#myDialogRoot input[name='effectiveIp'][value='"+survey.surveyDetail.effectiveIp+"']").attr("checked",true);
|
|
$("#myDialogRoot input[name='effectiveIp'][value='"+survey.surveyDetail.effectiveIp+"']").attr("checked",true);
|
|
@@ -99,16 +100,14 @@ $(document).ready(function(){
|
|
|
$("#myDialogRoot input[name='ynEndNum'][value='"+survey.surveyDetail.ynEndNum+"']").attr("checked",true);
|
|
$("#myDialogRoot input[name='ynEndNum'][value='"+survey.surveyDetail.ynEndNum+"']").attr("checked",true);
|
|
|
$("#myDialogRoot input[name='endNum']").val(survey.surveyDetail.endNum);
|
|
$("#myDialogRoot input[name='endNum']").val(survey.surveyDetail.endNum);
|
|
|
$("#myDialogRoot input[name='ynEndTime'][value='"+survey.surveyDetail.ynEndTime+"']").attr("checked",true);
|
|
$("#myDialogRoot input[name='ynEndTime'][value='"+survey.surveyDetail.ynEndTime+"']").attr("checked",true);
|
|
|
- if(survey.surveyDetail.endTime!="null"){
|
|
|
|
|
- $("#myDialogRoot input[name='endTime']").val(survey.surveyDetail.endTime);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ $("#myDialogRoot input[name='endTime']").val(survey.surveyDetail.endTime);
|
|
|
$("#myDialogRoot input[name='showShareSurvey'][value='"+survey.surveyDetail.showShareSurvey+"']").attr("checked",true);
|
|
$("#myDialogRoot input[name='showShareSurvey'][value='"+survey.surveyDetail.showShareSurvey+"']").attr("checked",true);
|
|
|
$("#myDialogRoot input[name='showAnswerDa'][value='"+survey.surveyDetail.showAnswerDa+"']").attr("checked",true);
|
|
$("#myDialogRoot input[name='showAnswerDa'][value='"+survey.surveyDetail.showAnswerDa+"']").attr("checked",true);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
var myDialog=$( "#myDialogRoot" ).dialog({
|
|
var myDialog=$( "#myDialogRoot" ).dialog({
|
|
|
width:550,
|
|
width:550,
|
|
|
height:490,
|
|
height:490,
|
|
@@ -140,6 +139,10 @@ $(document).ready(function(){
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
open:function(event,ui){
|
|
open:function(event,ui){
|
|
|
|
|
+ laydate.render({
|
|
|
|
|
+ elem: '#surveyEndTime' //指定元素
|
|
|
|
|
+ ,type: 'datetime'
|
|
|
|
|
+ });
|
|
|
$(".ui-dialog-titlebar-close").hide();
|
|
$(".ui-dialog-titlebar-close").hide();
|
|
|
},
|
|
},
|
|
|
close:function(event,ui){
|
|
close:function(event,ui){
|
|
@@ -148,16 +151,16 @@ $(document).ready(function(){
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
function saveAttrs(){
|
|
function saveAttrs(){
|
|
|
|
|
|
|
|
- var url=ctx+"/design/my-survey-style!save.action";
|
|
|
|
|
|
|
+ var url=ctx+"/design/my-survey-design!ajaxSave.action";
|
|
|
var surveyId=$("#id").val();
|
|
var surveyId=$("#id").val();
|
|
|
var data="surveyId="+surveyId;
|
|
var data="surveyId="+surveyId;
|
|
|
- //收集规则
|
|
|
|
|
|
|
+ //收集规则
|
|
|
var effective=$("#myDialogRoot input[name='effective']:checked")[0]?"4":"0";
|
|
var effective=$("#myDialogRoot input[name='effective']:checked")[0]?"4":"0";
|
|
|
var effectiveIp=$("#myDialogRoot input[name='effectiveIp']:checked")[0]?"1":"0";
|
|
var effectiveIp=$("#myDialogRoot input[name='effectiveIp']:checked")[0]?"1":"0";
|
|
|
var rule=$("#myDialogRoot input[name='rule']:checked")[0]?"3":"0";
|
|
var rule=$("#myDialogRoot input[name='rule']:checked")[0]?"3":"0";
|
|
@@ -170,11 +173,11 @@ $(document).ready(function(){
|
|
|
var endNum=$("#myDialogRoot input[name='endNum']").val();
|
|
var endNum=$("#myDialogRoot input[name='endNum']").val();
|
|
|
var showShareSurvey=$("#myDialogRoot input[name='showShareSurvey']:checked")[0]?"1":"0";
|
|
var showShareSurvey=$("#myDialogRoot input[name='showShareSurvey']:checked")[0]?"1":"0";
|
|
|
var showAnswerDa=$("#myDialogRoot input[name='showAnswerDa']:checked")[0]?"1":"0";
|
|
var showAnswerDa=$("#myDialogRoot input[name='showAnswerDa']:checked")[0]?"1":"0";
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
data+="&effective="+effective+"&effectiveIp="+effectiveIp+"&rule="+rule+"&refresh="+refresh+"&ruleCode="+ruleCode+"&mailOnly="+mailOnly;
|
|
data+="&effective="+effective+"&effectiveIp="+effectiveIp+"&rule="+rule+"&refresh="+refresh+"&ruleCode="+ruleCode+"&mailOnly="+mailOnly;
|
|
|
data+="&ynEndNum="+ynEndNum+"&ynEndTime="+ynEndTime+"&endTime="+endTime+"&endNum="+endNum;
|
|
data+="&ynEndNum="+ynEndNum+"&ynEndTime="+ynEndTime+"&endTime="+endTime+"&endNum="+endNum;
|
|
|
data+="&showShareSurvey="+showShareSurvey+"&showAnswerDa="+showAnswerDa;
|
|
data+="&showShareSurvey="+showShareSurvey+"&showAnswerDa="+showAnswerDa;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$.ajax({
|
|
$.ajax({
|
|
|
url : url,
|
|
url : url,
|
|
|
data : data,
|
|
data : data,
|
|
@@ -186,12 +189,12 @@ $(document).ready(function(){
|
|
|
});
|
|
});
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
//
|
|
//
|
|
|
$(".sur_edit").unbind();
|
|
$(".sur_edit").unbind();
|
|
|
$(".sur_edit").click(function(){
|
|
$(".sur_edit").click(function(){
|
|
|
//${ctx }/design/my-survey-design.action?surveyId=${surveyId}
|
|
//${ctx }/design/my-survey-design.action?surveyId=${surveyId}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$("body").append("<div id=\"myDialogRoot\"><div class='dialogMessage'>您问卷已经发布,确认要重新编辑使问卷回到设计状态。<br/>是否确认返回设计状态!</div></div>");
|
|
$("body").append("<div id=\"myDialogRoot\"><div class='dialogMessage'>您问卷已经发布,确认要重新编辑使问卷回到设计状态。<br/>是否确认返回设计状态!</div></div>");
|
|
|
var myDialog=$( "#myDialogRoot" ).dialog({
|
|
var myDialog=$( "#myDialogRoot" ).dialog({
|
|
|
width:500,
|
|
width:500,
|
|
@@ -229,10 +232,10 @@ $(document).ready(function(){
|
|
|
$("#myDialogRoot").remove();
|
|
$("#myDialogRoot").remove();
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
return false;
|
|
return false;
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$(".surveyStateBtn").unbind();
|
|
$(".surveyStateBtn").unbind();
|
|
|
$(".surveyStateBtn").click(function(){
|
|
$(".surveyStateBtn").click(function(){
|
|
|
//var thVal=$("#surveyState").val();
|
|
//var thVal=$("#surveyState").val();
|
|
@@ -272,7 +275,7 @@ $(document).ready(function(){
|
|
|
});
|
|
});
|
|
|
return false;
|
|
return false;
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
function notify(msg,delayHid) {
|
|
function notify(msg,delayHid) {
|
|
@@ -301,4 +304,4 @@ function notify(msg,delayHid) {
|
|
|
}, function() {
|
|
}, function() {
|
|
|
$( this ).remove();
|
|
$( this ).remove();
|
|
|
});
|
|
});
|
|
|
-}
|
|
|
|
|
|
|
+}
|