Commit 612b79bb4f2beabc2e2d21f1d479ee2cb85b671d

Authored by Amber Dev
1 parent 1efb208907

made serch auto focus

Showing 46 changed files with 111 additions and 86 deletions   Show diff stats
src/pages/Academic/assignment.vue
... ... @@ -221,13 +221,14 @@
221 221 </v-avatar>
222 222 </v-btn>
223 223 </v-card-title>
224   - <v-flex xs9 sm9 md2 lg2 xl2 v-show="showSearch">
  224 + <v-flex xs9 sm9 md2 lg2 xl2 v-if="showSearch">
225 225 <v-layout>
226 226 <v-text-field
227 227 v-model="search"
228 228 placeholder="Search"
229 229 prepend-inner-icon="search"
230 230 color="primary"
  231 + autofocus
231 232 style="transition: 0.8s cubic-bezier(0.25, 0.8, 0.25, 1); !important"
232 233 ></v-text-field>
233 234 <v-icon @click="closeSearch" color="error">close</v-icon>
... ...
src/pages/Academic/routine.vue
... ... @@ -219,9 +219,10 @@
219 219 </v-avatar>
220 220 </v-btn>
221 221 </v-card-title>
222   - <v-flex xs9 sm9 md2 lg2 xl2 v-show="showSearch">
  222 + <v-flex xs9 sm9 md2 lg2 xl2 v-if="showSearch">
223 223 <v-layout>
224 224 <v-text-field
  225 + autofocus
225 226 v-model="search"
226 227 label="Search"
227 228 prepend-inner-icon="search"
... ...
src/pages/Academic/subject.vue
... ... @@ -278,7 +278,7 @@
278 278 <v-card-title class="body-1" v-show="show">
279 279 <v-btn icon flat @click="displaySearch">
280 280 <v-avatar size="27">
281   - <img src="/static/icon/search.png" alt="icon" />
  281 + <img src="" alt="icon" />
282 282 </v-avatar>
283 283 </v-btn>
284 284 </v-card-title>
... ...
src/pages/Account/expense.vue
... ... @@ -236,9 +236,9 @@
236 236 </v-avatar>
237 237 </v-btn>
238 238 </v-card-title>
239   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  239 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
240 240 <v-layout>
241   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  241 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
242 242 <v-icon @click="closeSearch" color="error">close</v-icon>
243 243 </v-layout>
244 244 </v-flex>
... ...
src/pages/Account/feeTypes.vue
... ... @@ -121,9 +121,9 @@
121 121 </v-avatar>
122 122 </v-btn>
123 123 </v-card-title>
124   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  124 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
125 125 <v-layout>
126   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  126 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
127 127 <v-icon @click="closeSearch" color="error">close</v-icon>
128 128 </v-layout>
129 129 </v-flex>
... ...
src/pages/Account/income.vue
... ... @@ -237,9 +237,9 @@
237 237 </v-avatar>
238 238 </v-btn>
239 239 </v-card-title>
240   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  240 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
241 241 <v-layout>
242   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  242 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
243 243 <v-icon @click="closeSearch" color="error">close</v-icon>
244 244 </v-layout>
245 245 </v-flex>
... ...
src/pages/Account/invoice.vue
... ... @@ -116,9 +116,9 @@
116 116 </v-avatar>
117 117 </v-btn>
118 118 </v-card-title>
119   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  119 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
120 120 <v-layout>
121   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  121 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
122 122 <v-icon @click="closeSearch" color="error">close</v-icon>
123 123 </v-layout>
124 124 </v-flex>
... ...
src/pages/Account/paymentHistory.vue
... ... @@ -63,9 +63,9 @@
63 63 </v-avatar>
64 64 </v-btn>
65 65 </v-card-title>
66   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  66 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
67 67 <v-layout>
68   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  68 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
69 69 <v-icon @click="closeSearch" color="error">close</v-icon>
70 70 </v-layout>
71 71 </v-flex>
... ...
src/pages/Administrator/academicYear.vue
... ... @@ -215,9 +215,9 @@
215 215 </v-avatar>
216 216 </v-btn>
217 217 </v-card-title>
218   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  218 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
219 219 <v-layout>
220   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  220 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
221 221 <v-icon @click="closeSearch" color="error">close</v-icon>
222 222 </v-layout>
223 223 </v-flex>
... ...
src/pages/Administrator/role.vue
... ... @@ -62,9 +62,9 @@
62 62 </v-avatar>
63 63 </v-btn>
64 64 </v-card-title>
65   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  65 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
66 66 <v-layout>
67   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  67 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
68 68 <v-icon @click="closeSearch" color="error">close</v-icon>
69 69 </v-layout>
70 70 </v-flex>
... ...
src/pages/Annoucement/annoucement.vue
... ... @@ -222,9 +222,9 @@
222 222 </v-avatar>
223 223 </v-btn>
224 224 </v-card-title>
225   - <v-flex xs8 sm7 lg2 md3 v-show="showSearch">
  225 + <v-flex xs8 sm7 lg2 md3 v-if="showSearch">
226 226 <v-layout>
227   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  227 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
228 228 <v-icon @click="closeSearch" color="error">close</v-icon>
229 229 </v-layout>
230 230 </v-flex>
... ...
src/pages/Attendence/studentAttendence.vue
... ... @@ -68,9 +68,9 @@
68 68 </v-avatar>
69 69 </v-btn>
70 70 </v-card-title>
71   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  71 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
72 72 <v-layout>
73   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  73 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
74 74 <v-icon @click="closeSearch" color="error">close</v-icon>
75 75 </v-layout>
76 76 </v-flex>
... ...
src/pages/Attendence/teacherAttendence.vue
... ... @@ -28,9 +28,9 @@
28 28 </v-avatar>
29 29 </v-btn>
30 30 </v-card-title>
31   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  31 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
32 32 <v-layout>
33   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  33 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
34 34 <v-icon @click="closeSearch" color="error">close</v-icon>
35 35 </v-layout>
36 36 </v-flex>
... ...
src/pages/Class/addclass.vue
... ... @@ -80,9 +80,9 @@
80 80 </v-avatar>
81 81 </v-btn>
82 82 </v-card-title>
83   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  83 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
84 84 <v-layout>
85   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  85 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
86 86 <v-icon @click="closeSearch" color="error">close</v-icon>
87 87 </v-layout>
88 88 </v-flex>
... ...
src/pages/Course/course.vue
... ... @@ -189,9 +189,9 @@
189 189 </v-avatar>
190 190 </v-btn>
191 191 </v-card-title>
192   - <v-flex xs8 sm7 lg2 md3 v-show="showSearch">
  192 + <v-flex xs8 sm7 lg2 md3 v-if="showSearch">
193 193 <v-layout>
194   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  194 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
195 195 <v-icon @click="closeSearch" color="error">close</v-icon>
196 196 </v-layout>
197 197 </v-flex>
... ...
src/pages/Course/courseDetail.vue
... ... @@ -471,6 +471,7 @@
471 471 <v-flex xs12 sm3 md3 v-if="showSearch">
472 472 <div style="display: inline-block;width: 70%;">
473 473 <v-text-field
  474 + autofocus
474 475 v-model="search"
475 476 label="Search"
476 477 prepend-inner-icon="search"
... ...
src/pages/Course/courseDiscussion.vue
... ... @@ -154,9 +154,9 @@
154 154 </v-avatar>
155 155 </v-btn>
156 156 </v-card-title>
157   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  157 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
158 158 <v-layout>
159   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  159 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
160 160 <v-icon @click="closeSearch" color="error">close</v-icon>
161 161 </v-layout>
162 162 </v-flex>
... ...
src/pages/Course/enrollStudents.vue
... ... @@ -36,9 +36,9 @@
36 36 </v-avatar>
37 37 </v-btn>
38 38 </v-card-title>
39   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  39 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
40 40 <v-layout>
41   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  41 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
42 42 <v-icon @click="closeSearch" color="error">close</v-icon>
43 43 </v-layout>
44 44 </v-flex>
... ...
src/pages/Event/event.vue
... ... @@ -166,9 +166,9 @@
166 166 </v-avatar>
167 167 </v-btn>
168 168 </v-card-title>
169   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  169 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
170 170 <v-layout>
171   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  171 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
172 172 <v-icon @click="closeSearch" color="error">close</v-icon>
173 173 </v-layout>
174 174 </v-flex>
... ...
src/pages/Exam/exam.vue
... ... @@ -164,9 +164,9 @@
164 164 </v-avatar>
165 165 </v-btn>
166 166 </v-card-title>
167   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  167 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
168 168 <v-layout>
169   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  169 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
170 170 <v-icon @click="closeSearch" color="error">close</v-icon>
171 171 </v-layout>
172 172 </v-flex>
... ...
src/pages/Exam/examAttendence.vue
... ... @@ -75,9 +75,9 @@
75 75 </v-avatar>
76 76 </v-btn>
77 77 </v-card-title>
78   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  78 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
79 79 <v-layout>
80   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  80 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
81 81 <v-icon @click="closeSearch" color="error">close</v-icon>
82 82 </v-layout>
83 83 </v-flex>
... ...
src/pages/Exam/examSchedule.vue
... ... @@ -346,9 +346,9 @@
346 346 </v-avatar>
347 347 </v-btn>
348 348 </v-card-title>
349   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  349 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
350 350 <v-layout>
351   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  351 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
352 352 <v-icon @click="closeSearch" color="error">close</v-icon>
353 353 </v-layout>
354 354 </v-flex>
... ...
src/pages/Exam/grade.vue
... ... @@ -198,9 +198,9 @@
198 198 </v-avatar>
199 199 </v-btn>
200 200 </v-card-title>
201   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  201 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
202 202 <v-layout>
203   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  203 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
204 204 <v-icon @click="closeSearch" color="error">close</v-icon>
205 205 </v-layout>
206 206 </v-flex>
... ...
src/pages/Gallery/gallery.vue
... ... @@ -290,9 +290,9 @@
290 290 </v-avatar>
291 291 </v-btn>
292 292 </v-card-title>
293   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  293 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
294 294 <v-layout>
295   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  295 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
296 296 <v-icon @click="closeSearch" color="error">close</v-icon>
297 297 </v-layout>
298 298 </v-flex>
... ...
src/pages/Holiday/holiday.vue
... ... @@ -144,9 +144,9 @@
144 144 </v-avatar>
145 145 </v-btn>
146 146 </v-card-title>
147   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  147 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
148 148 <v-layout>
149   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  149 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
150 150 <v-icon @click="closeSearch" color="error">close</v-icon>
151 151 </v-layout>
152 152 </v-flex>
... ...
src/pages/Library/books.vue
... ... @@ -193,9 +193,9 @@
193 193 </v-avatar>
194 194 </v-btn>
195 195 </v-card-title>
196   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  196 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
197 197 <v-layout>
198   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  198 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
199 199 <v-icon @click="closeSearch" color="error">close</v-icon>
200 200 </v-layout>
201 201 </v-flex>
... ...
src/pages/Library/eBook.vue
... ... @@ -223,9 +223,9 @@
223 223 </v-avatar>
224 224 </v-btn>
225 225 </v-card-title>
226   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  226 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
227 227 <v-layout>
228   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  228 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
229 229 <v-icon @click="closeSearch" color="error">close</v-icon>
230 230 </v-layout>
231 231 </v-flex>
... ...
src/pages/Library/issue.vue
... ... @@ -300,9 +300,9 @@
300 300 </v-avatar>
301 301 </v-btn>
302 302 </v-card-title>
303   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  303 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
304 304 <v-layout>
305   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  305 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
306 306 <v-icon @click="closeSearch" color="error">close</v-icon>
307 307 </v-layout>
308 308 </v-flex>
... ...
src/pages/Mark/mark.vue
... ... @@ -60,9 +60,9 @@
60 60 </v-avatar>
61 61 </v-btn>
62 62 </v-card-title>
63   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  63 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
64 64 <v-layout>
65   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  65 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
66 66 <v-icon @click="closeSearch" color="error">close</v-icon>
67 67 </v-layout>
68 68 </v-flex>
... ...
src/pages/Mark/markDistribution.vue
... ... @@ -73,9 +73,9 @@
73 73 </v-avatar>
74 74 </v-btn>
75 75 </v-card-title>
76   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  76 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
77 77 <v-layout>
78   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  78 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
79 79 <v-icon @click="closeSearch" color="error">close</v-icon>
80 80 </v-layout>
81 81 </v-flex>
... ...
src/pages/News/news.vue
... ... @@ -204,9 +204,9 @@
204 204 </v-avatar>
205 205 </v-btn>
206 206 </v-card-title>
207   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  207 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
208 208 <v-layout>
209   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  209 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
210 210 <v-icon @click="closeSearch" color="error">close</v-icon>
211 211 </v-layout>
212 212 </v-flex>
... ...
src/pages/NoticeBoard/noticeBoard.vue
... ... @@ -176,9 +176,9 @@
176 176 </v-avatar>
177 177 </v-btn>
178 178 </v-card-title>
179   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  179 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
180 180 <v-layout>
181   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  181 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
182 182 <v-icon @click="closeSearch" color="error">close</v-icon>
183 183 </v-layout>
184 184 </v-flex>
... ...
src/pages/Notification/notification.vue
... ... @@ -119,9 +119,9 @@
119 119 </v-avatar>
120 120 </v-btn>
121 121 </v-card-title>
122   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  122 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
123 123 <v-layout>
124   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  124 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
125 125 <v-icon @click="closeSearch" color="error">close</v-icon>
126 126 </v-layout>
127 127 </v-flex>
... ...
src/pages/Parent/parents.vue
... ... @@ -493,13 +493,15 @@
493 493 </v-avatar>
494 494 </v-btn>
495 495 </v-card-title>
496   - <v-flex xs8 sm8 md2 lg2 v-show="showSearch">
  496 + <v-flex xs8 sm8 md2 lg2 v-if="showSearch">
497 497 <v-layout>
498 498 <v-text-field
499 499 v-model="search"
500 500 label="Search"
501 501 prepend-inner-icon="search"
502 502 color="primary"
  503 + ref="searchField"
  504 + autofocus
503 505 style="transition: 0.8s cubic-bezier(0.25, 0.8, 0.25, 1); !important"
504 506 ></v-text-field>
505 507 <v-icon @click="closeSearch" color="error">close</v-icon>
... ... @@ -1123,7 +1125,9 @@ export default {
1123 1125 });
1124 1126 },
1125 1127 displaySearch() {
1126   - (this.show = false), (this.showSearch = true);
  1128 + this.show = false
  1129 + this.showSearch = true;
  1130 + // this.$refs.searchField.focus()
1127 1131 },
1128 1132 closeSearch() {
1129 1133 this.showSearch = false;
... ...
src/pages/Payroll/hourlyTemplate.vue
... ... @@ -78,9 +78,9 @@
78 78 </v-avatar>
79 79 </v-btn>
80 80 </v-card-title>
81   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  81 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
82 82 <v-layout>
83   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  83 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
84 84 <v-icon @click="closeSearch" color="error">close</v-icon>
85 85 </v-layout>
86 86 </v-flex>
... ...
src/pages/Payroll/salaryTemplate.vue
... ... @@ -459,9 +459,9 @@
459 459 </v-avatar>
460 460 </v-btn>
461 461 </v-card-title>
462   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  462 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
463 463 <v-layout>
464   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  464 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
465 465 <v-icon @click="closeSearch" color="error">close</v-icon>
466 466 </v-layout>
467 467 </v-flex>
... ...
src/pages/Section/section.vue
... ... @@ -164,9 +164,10 @@
164 164 </v-avatar>
165 165 </v-btn>
166 166 </v-card-title>
167   - <v-flex xs8 v-show="showSearch">
  167 + <v-flex xs8 v-if="showSearch">
168 168 <v-layout>
169 169 <v-text-field
  170 + autofocus
170 171 v-model="search"
171 172 label="Search"
172 173 prepend-inner-icon="search"
... ...
src/pages/Students/students.vue
... ... @@ -878,9 +878,9 @@
878 878 </v-avatar>
879 879 </v-btn>
880 880 </v-card-title>
881   - <v-flex xs8 sm7 lg2 md3 v-show="showSearch">
  881 + <v-flex xs8 sm7 lg2 md3 v-if="showSearch">
882 882 <v-layout>
883   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  883 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
884 884 <v-icon @click="closeSearch" color="error">close</v-icon>
885 885 </v-layout>
886 886 </v-flex>
... ...
src/pages/Subjects/subjects.vue
... ... @@ -276,9 +276,10 @@
276 276 </v-avatar>
277 277 </v-btn>
278 278 </v-card-title>
279   - <v-flex xs9 sm9 md2 lg2 xl2 v-show="showSearch">
  279 + <v-flex xs9 sm9 md2 lg2 xl2 v-if="showSearch">
280 280 <v-layout>
281 281 <v-text-field
  282 + autofocus
282 283 v-model="search"
283 284 label="Search"
284 285 prepend-inner-icon="search"
... ...
src/pages/Teachers/teachers.vue
... ... @@ -484,9 +484,9 @@
484 484 </v-avatar>
485 485 </v-btn>
486 486 </v-card-title>
487   - <v-flex md2 lg2 sm6 xs8 v-show="showSearch">
  487 + <v-flex md2 lg2 sm6 xs8 v-if="showSearch">
488 488 <v-layout>
489   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  489 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
490 490 <v-icon @click="closeSearch" color="error">close</v-icon>
491 491 </v-layout>
492 492 </v-flex>
... ...
src/pages/TimeTable/timeTable.vue
... ... @@ -551,9 +551,10 @@
551 551 </v-avatar>
552 552 </v-btn>
553 553 </v-card-title>
554   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  554 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
555 555 <v-layout>
556 556 <v-text-field
  557 + autofocus
557 558 v-model="search"
558 559 label="Search"
559 560 prepend-inner-icon="search"
... ...
src/pages/User/user.vue
... ... @@ -404,9 +404,9 @@
404 404 </v-avatar>
405 405 </v-btn>
406 406 </v-card-title>
407   - <v-flex xs8 sm8 lg2 md3 v-show="showSearch">
  407 + <v-flex xs8 sm8 lg2 md3 v-if="showSearch">
408 408 <v-layout>
409   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  409 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
410 410 <v-icon @click="closeSearch" color="error">close</v-icon>
411 411 </v-layout>
412 412 </v-flex>
... ...
src/pages/meetingEvent/meetingEvent.vue
... ... @@ -230,9 +230,9 @@
230 230 </v-avatar>
231 231 </v-btn>
232 232 </v-card-title>
233   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  233 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
234 234 <v-layout>
235   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  235 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
236 236 <v-icon @click="closeSearch" color="error">close</v-icon>
237 237 </v-layout>
238 238 </v-flex>
... ...
src/pages/socialMedia/socialMedia.vue
... ... @@ -114,9 +114,9 @@
114 114 </v-avatar>
115 115 </v-btn>
116 116 </v-card-title>
117   - <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
  117 + <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
118 118 <v-layout>
119   - <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
  119 + <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
120 120 <v-icon @click="closeSearch" color="error">close</v-icon>
121 121 </v-layout>
122 122 </v-flex>
... ...
src/router/index.js
... ... @@ -3,6 +3,7 @@ import Router from &#39;vue-router&#39;;
3 3 import paths from './paths';
4 4 import NProgress from 'nprogress';
5 5 import 'nprogress/nprogress.css';
  6 +import store from '@/store/store'
6 7  
7 8 Vue.use(Router);
8 9 const router = new Router({
... ... @@ -11,7 +12,7 @@ const router = new Router({
11 12 linkActiveClass: 'active',
12 13 routes: paths,
13 14 scrollBehavior() {
14   - window.scrollTo(0,0);
  15 + window.scrollTo(0, 0);
15 16 }
16 17 });
17 18  
... ... @@ -37,14 +38,25 @@ const router = new Router({
37 38 // })
38 39  
39 40 // router gards
40   -router.beforeEach((to, from, next) => {
41   - NProgress.start();
42   - next();
43   -});
  41 +// router.beforeEach((to, from, next) => {
  42 +// NProgress.start();
  43 +// next();
  44 +// });
  45 +
  46 +// router.beforeEach((to, from, next) => {
  47 +// var token = store.getters.GET_TOKEN;
  48 +// if (!token) {
  49 +// console.log("yes yes yes")
  50 +// window.getApp.$emit("APP_LOGOUT");
  51 +// } else {
  52 +// NProgress.start();
  53 +// next();
  54 +// }
  55 +// });
44 56  
45 57 router.afterEach((to, from) => {
46 58 // ...
47 59 NProgress.done();
48 60 });
49 61  
50 62 -export default router;
  63 +export default router;
51 64 \ No newline at end of file
... ...
src/store/store.js
... ... @@ -24,6 +24,9 @@ export default new Vuex.Store({
24 24 GET_STUDENTS_DATA: state => {
25 25 return state.studentsData
26 26 },
  27 + GET_TOKEN: state => {
  28 + return state.token
  29 + },
27 30  
28 31 },
29 32 // serve as the one and only way to change the state of the data in the state object
... ...