6868 @reset-id =" resetID(...arguments)"
6969 @allow-cookies =" allowCookies"
7070 @set-sem =" setSemester"
71- >
72- </auth >
71+ />
7372
7473 <v-layout justify-end >
7574 <v-text-field
76- id = " searchInputTF"
77- autocomplete = " false"
78- class = " expanded-search"
75+ id =" searchInputTF"
76+ v-model =" searchInput"
77+ autocomplete =" false"
78+ class =" expanded-search"
7979 prepend-icon =" search"
80- v-model = " searchInput"
81- placeholder = " Add classes"
80+ placeholder =" Add classes"
8281 autofocus
83- @click.native = " clickSearch "
84- @input = " typeSearch "
85- style = " width : 100 % ; "
82+ style = " width : 100 % ; "
83+ @click.native = " clickSearch "
84+ @input = " typeSearch "
8685 />
8786 </v-layout >
8887
8988 <v-menu
89+ v-model =" searchOpen"
9090 :close-on-content-click =" false"
91- v-model = " searchOpen"
92- :position-x = " searchX"
93- :position-y = " searchY"
91+ :position-x =" searchX"
92+ :position-y =" searchY"
9493 >
9594 <class-search
9695 id =" searchMenu"
106105 @drag-start-class =" dragStartClass"
107106 />
108107 </v-menu >
109-
110108 </v-toolbar >
111109
112110 <v-navigation-drawer
@@ -274,7 +272,6 @@ import RoadTabs from './../components/RoadTabs.vue';
274272import ConflictDialog from ' ./../components/ConflictDialog.vue' ;
275273import Auth from ' ./../components/Auth.vue' ;
276274import axios from ' axios' ;
277- import $ from ' jquery' ;
278275import moment from ' moment' ;
279276import UAParser from ' ua-parser-js' ;
280277import Vue from ' vue' ;
@@ -393,23 +390,6 @@ export default {
393390 }
394391 },
395392 mounted () {
396- const borders = $ (' .v-navigation-drawer__border' );
397- const scrollers = $ (' .scroller' );
398- const scrollWidth = scrollers .width ();
399-
400- // moves nav drawer border with scroll
401- // if the effect proves too annoying we can remove the borders instead
402- // (commented out below)
403-
404- scrollers .scroll (function () {
405- const scrollPosition = scrollers .scrollLeft ();
406- borders .css ({ top: 0 , left: scrollWidth - 1 + scrollPosition });
407- });
408-
409- $ (window ).on (' hashchange' , function () {
410- this .setActiveRoad ();
411- }.bind (this ));
412-
413393 this .setActiveRoad ();
414394
415395 axios .get (process .env .FIREROAD_URL + ` /requirements/list_reqs/` )
@@ -423,19 +403,23 @@ export default {
423403
424404 this .updateFulfillment ();
425405
426- this .searchX = $ (" #searchInputTF" ).offset ().left ;
427- this .searchY = $ (" #searchInputTF" ).offset ().top + $ (" #searchInputTF" ).outerHeight ();
406+ const searchInput = document .getElementById (' searchInputTF' );
407+ const rect = searchInput .getBoundingClientRect ();
408+ this .searchX = rect .left + document .body .scrollLeft ;
409+ this .searchY = rect .top + document .body .scrollTop + searchInput .offsetHeight ;
428410
429- $ (window ).on (" resize" , function () {
430- this .searchX = $ (" #searchInputTF" ).offset ().left ;
431- this .searchY = $ (" #searchInputTF" ).offset ().top + $ (" #searchInputTF" ).outerHeight ();
411+ window .addEventListener (' resize' , function () {
412+ const searchInput = document .getElementById (' searchInputTF' );
413+ const rect = searchInput .getBoundingClientRect ();
414+ this .searchX = rect .left + document .body .scrollLeft ;
415+ this .searchY = rect .top + document .body .scrollTop + searchInput .offsetHeight ;
432416 }.bind (this ));
433417
434418 document .body .addEventListener (' click' , function (e ) {
435419 this .showSearch = false ;
436420 }.bind (this ));
437421
438- if (this .$cookies .isKey (' dismissedOld' )) {
422+ if (this .$cookies .isKey (' dismissedOld' )) {
439423 this .dismissedOld = JSON .parse (this .$cookies .get (' dismissedOld' ));
440424 this .cookiesAllowed = true ;
441425 }
@@ -710,22 +694,22 @@ export default {
710694 Vue .set (this .roads [this .activeRoad ].contents .progressOverrides , newProgress .listID , newProgress .progress );
711695 Vue .set (this .roads [this .activeRoad ], ' changed' , moment ().format (DATE_FORMAT ));
712696 },
713- dismissOld : function () {
697+ dismissOld : function () {
714698 this .dismissedOld = true ;
715- if (this .cookiesAllowed ) {
699+ if (this .cookiesAllowed ) {
716700 this .$cookies .set (' dismissedOld' , true );
717701 }
718702 },
719703 dismissCookies : function () {
720704 this .dismissedCookies = true ;
721- if (this .cookiesAllowed ) {
705+ if (this .cookiesAllowed ) {
722706 this .$cookies .set (' dismissedCookies' , true );
723707 }
724708 },
725709 clickSearch : function (event ) {
726710 this .searchOpen = ! this .searchOpen ;
727711 },
728- typeSearch : function (searchString ) {
712+ typeSearch : function (searchString ) {
729713 this .searchOpen = searchString .length > 0 ;
730714 }
731715 }
0 commit comments