diff --git a/controllers/main.go b/controllers/main.go index 941a565..ed76b32 100644 --- a/controllers/main.go +++ b/controllers/main.go @@ -169,7 +169,7 @@ func (this *MainController) Login() { if remember == "yes" { this.Ctx.SetCookie("auth", strconv.Itoa(user.Id)+"|"+authkey, 7*86400) } else { - this.Ctx.SetCookie("auth", strconv.Itoa(user.Id)+"|"+authkey) + this.Ctx.SetCookie("auth", strconv.Itoa(user.Id)+"|"+authkey,86400) } this.redirect(beego.URLFor("TaskController.List")) } diff --git a/controllers/task.go b/controllers/task.go index f502fcc..aa87c45 100644 --- a/controllers/task.go +++ b/controllers/task.go @@ -29,6 +29,13 @@ func (this *TaskController) List() { page = 1 } groupId, _ := this.GetInt("groupid") + if groupId>0 { + this.Ctx.SetCookie("groupid", strconv.Itoa(groupId)+"|job") + }else { + arr := strings.Split(this.Ctx.GetCookie("groupid"), "|") + groupId,_= strconv.Atoi(arr[0]) + } + filters := make([]interface{}, 0) if groupId > 0 { filters = append(filters, "group_id", groupId) @@ -51,6 +58,7 @@ func (this *TaskController) List() { row["description"] = v.Description row["group_id"] = v.GroupId row["group_name"] = groups_map[v.GroupId] + row["is_odd"] = k%2 e := jobs.GetEntryById(v.Id) if e != nil { diff --git a/views/group/list.html b/views/group/list.html index 82cd6d7..c2e56e4 100644 --- a/views/group/list.html +++ b/views/group/list.html @@ -105,4 +105,9 @@ function batch(action) { } return false; } + +//点击行换色 +$('tbody tr').click(function(){ + $(this).addClass("warning").siblings().removeClass("warning"); +}); \ No newline at end of file diff --git a/views/public/layout.html b/views/public/layout.html index 18ef83d..b241886 100644 --- a/views/public/layout.html +++ b/views/public/layout.html @@ -32,7 +32,7 @@
@@ -156,6 +156,8 @@ $(function () { return false; }); $("input[name='notify']").click(function () { +// alert("暂不启用"); +// return; if ($(this).val() > 0) { $('.notify_email').removeClass('hide'); } else { diff --git a/views/task/edit.html b/views/task/edit.html index 8350316..b5d5c98 100644 --- a/views/task/edit.html +++ b/views/task/edit.html @@ -117,7 +117,7 @@