Set focus to navbar search on initial login or when changing to home (closes #24)
This commit is contained in:
		| @@ -46,6 +46,8 @@ | ||||
|           <input type="hidden" name="path" value="[% vars.requested_path %]"/> | ||||
|           [% END %] | ||||
|         </form> | ||||
|         [% ELSE %] | ||||
|         <script type="text/javascript"> $('#nq').focus(); // set focus to navbar search </script> | ||||
|         [% END %] | ||||
|       </div> | ||||
|     </div> | ||||
|   | ||||
| @@ -8,13 +8,4 @@ | ||||
|     [% IF params.tab %] | ||||
|     $('#[% params.tab %]_form').trigger("submit"); | ||||
|     [% END %] | ||||
|  | ||||
|     // enable typeahead on the main search box, for device names only | ||||
|     $('#nq').typeahead({ | ||||
|       source: function (query, process) { | ||||
|         return $.get('/ajax/data/device/typeahead', { query: query }, function (data) { | ||||
|           return process(data); | ||||
|         }); | ||||
|       } | ||||
|     }); | ||||
|   }); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user