Skip to content

Commit

Permalink
Merge pull request #683 from midoks/dev
Browse files Browse the repository at this point in the history
修复计划任务-每星期修改
  • Loading branch information
midoks authored Jan 6, 2025
2 parents 67d8abf + 8f05e47 commit 666ee1a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions web/static/app/crontab.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,11 @@ function planAdd(){
var where1 = $("#ptime input[name='where1']").val();
$("#cronConfig input[name='where1']").val(where1);
}

if (type == 'week'){
var where1 = $("#ptime input[name='where1']").val();
$("#cronConfig input[name='where1']").val(where1);
}


layer.msg('正在添加,请稍候...!',{icon:16,time:0,shade: [0.3, '#000']});
Expand Down Expand Up @@ -836,8 +841,6 @@ function editTaskInfo(id){
$('.site_list').show();
}



obj.from.minute = $('.minute_create').val();
obj.from.hour = $('.hour_create').val();
obj.from.where1 = $('.where1_create').val();
Expand Down Expand Up @@ -963,6 +966,8 @@ function editTaskInfo(id){
} else if(obj.from.type == 'minute-n') {
obj.from.where1 = obj.from.minute;
obj.from.minute = '';
} else if(obj.from.type == 'week') {
obj.from.where1 = obj.from.week;
}
var loadT = layer.msg('正在保存编辑内容,请稍后...',{icon:16,time:0,shade: [0.3, '#000']});
$.post('/crontab/modify_crond',obj.from,function(rdata){
Expand Down
2 changes: 1 addition & 1 deletion web/templates/default/crontab.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ <h3 class="f16">添加计划任务</h3>
<b val="1">周一</b>
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu" aria-labelledby="excode">
<ul class="dropdown-menu" role="menu" aria-labelledby="week">
<li><a role="menuitem" tabindex="-1" href="javascript:;" value="1">周一</a></li>
<li><a role="menuitem" tabindex="-1" href="javascript:;" value="2">周二</a></li>
<li><a role="menuitem" tabindex="-1" href="javascript:;" value="3">周三</a></li>
Expand Down

0 comments on commit 666ee1a

Please sign in to comment.