File tree 3 files changed +32
-3
lines changed
3 files changed +32
-3
lines changed Original file line number Diff line number Diff line change 53
53
font-size : .75em ;
54
54
}
55
55
56
+ .todo-source-link : hover {
57
+ text-decoration : underline;
58
+ }
59
+
56
60
.todo-source-link a : link , .todo-source-link a : visited {
57
61
color : grey !important ;
58
62
}
77
81
text-align : center;
78
82
}
79
83
84
+ .todo-item : hover {
85
+ cursor : pointer;
86
+ }
87
+
80
88
.todo-item-body {
81
89
word-wrap : break-word;
82
90
}
Original file line number Diff line number Diff line change 37
37
</ span >
38
38
< span > Delete</ span >
39
39
</ div >
40
- < div class ="select-all navbar-item " v-on:click ="selectAll ">
40
+ < div class ="navbar-item deselect-all " v-on:click ="deselectAll " v-show ="todos.length && todos.every(t => t.selected) ">
41
+ < span class ="icon ">
42
+ < i class ="fa fa-square "> </ i >
43
+ </ span >
44
+ < span > Deselect All</ span >
45
+ </ div >
46
+ < div class ="select-all navbar-item " v-on:click ="selectAll " v-show ="todos.some(t => !t.selected) ">
41
47
< span class ="icon ">
42
48
< i class ="fa fa-check-square "> </ i >
43
49
</ span >
130
136
< th > Tags</ th >
131
137
</ tr >
132
138
</ thead >
133
- < tr class ="todo-item " v-for ="todo in todos " v-if ="todo.body.indexOf(todoSearch) !== -1 || (todo.assignee || '').indexOf(todoSearch) !== -1 || (todo.tags || []).toString().indexOf(todoSearch) !== -1 || (todo.flag || '').indexOf(todoSearch) !== -1 " @change ="updateTodo('top level') ">
139
+ < tr class ="todo-item " v-for ="todo in todos " v-if ="todo.body.indexOf(todoSearch) !== -1 || (todo.assignee || '').indexOf(todoSearch) !== -1 || (todo.tags || []).toString().indexOf(todoSearch) !== -1 || (todo.flag || '').indexOf(todoSearch) !== -1 " @change ="updateTodo('top level') " @click =" toggleTodo(todo) " >
134
140
< td > < input type ="checkbox " v-model ="todo.selected "> </ td >
135
141
< td class ="todo-item-priority " >
136
142
< div v-show ="todo.priority !== undefined "> {{ todo.priority }}</ div >
137
143
</ td >
138
144
< td class ="todo-item-flag " > {{ todo.flag }}</ td >
139
145
< td class ='todo-item-body '>
140
- < div class ="todo-source-link "> < a :href ="'/source_file/' + todo.id + '#line-' + todo.lineNumber " target ="_blank "> {{ todo.sourceFile }}:{{ todo.lineNumber}}</ a > </ div >
146
+ < div class ="todo-source-link " @click =" stopPropagation " > < a :href ="'/source_file/' + todo.id + '#line-' + todo.lineNumber " target ="_blank "> {{ todo.sourceFile }}:{{ todo.lineNumber}}</ a > </ div >
141
147
< div > {{ todo.body }}</ div >
142
148
</ td >
143
149
< td class ="todo-item-assignee " > {{ todo.assignee }}</ td >
Original file line number Diff line number Diff line change @@ -120,6 +120,14 @@ $(document).ready(function() {
120
120
console . log ( name )
121
121
}
122
122
} ,
123
+
124
+ toggleTodo : function ( todo ) {
125
+ todo . selected = ! todo . selected
126
+ } ,
127
+
128
+ stopPropagation : function ( e ) {
129
+ e . stopPropagation ( )
130
+ } ,
123
131
124
132
editSeletedTodos : function ( ) {
125
133
$ ( ".modal" ) . addClass ( "is-active" )
@@ -159,6 +167,13 @@ $(document).ready(function() {
159
167
this . hideDropdown ( )
160
168
} ,
161
169
170
+ deselectAll : function ( ) {
171
+ this . todos . map ( function ( t ) {
172
+ t . selected = false
173
+ } )
174
+ this . hideDropdown ( )
175
+ } ,
176
+
162
177
toggleMenuBurger : function ( ev ) {
163
178
$ ( ".navbar-burger" ) . toggleClass ( "is-active" )
164
179
$ ( ".navbar-menu" ) . toggleClass ( "is-active" )
You can’t perform that action at this time.
0 commit comments