Skip to content

Commit

Permalink
Fixes #99 添加对任务名的限制,不允许任务名为空
Browse files Browse the repository at this point in the history
  • Loading branch information
neargle committed Sep 29, 2017
1 parent d2ee681 commit 578ad9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions views/static/buss/js/result.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ $('#field-search').bind('keyup', function (event) {

$('#savetask').click(function () {
title = $('#field-name').val();
if (!title) {
swal("任务名不可为空!", "", "error");
}
condition = getQueryString('q');
plugin = $('#field-plugin').val().join(",");
plan = $('#field-plan').val();
Expand Down
2 changes: 1 addition & 1 deletion views/templates/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ <h4 class="modal-title">新增任务</h4>
<div class="col-md-12">
<div class="form-group">
<label for="field-name" class="control-label">任务名称</label>
<input type="text" class="form-control" id="field-name" placeholder="任务名称">
<input type="text" class="form-control required" id="field-name" placeholder="任务名称">
</div>
</div>
</div>
Expand Down

0 comments on commit 578ad9f

Please sign in to comment.