@@ -21,8 +21,7 @@ initMaps = function() {
21
21
else {
22
22
$ ( '#map-start' ) . remove ( ) ;
23
23
$ ( '#start-col' ) . addClass ( 'no-section-content' ) ;
24
- $ ( '#start-col' ) . append ( '<div class="text-center font-italic d-flex align-items-center"><div><p>The Start Location could not be found:</p><p>' +
25
- $ ( '#start-location' ) . text ( ) + '</p></div></div>' ) ;
24
+ $ ( '#start-col' ) . append ( '<div class="no-map"><div><p>Looks like the Start Location could not be found...</p></div></div>' ) ;
26
25
}
27
26
if ( ! isNaN ( end_location . lat ( ) ) && ! isNaN ( end_location . lng ( ) ) ) {
28
27
new google . maps . Marker ( {
@@ -36,8 +35,7 @@ initMaps = function() {
36
35
else {
37
36
$ ( '#map-end' ) . remove ( ) ;
38
37
$ ( '#end-col' ) . addClass ( 'no-section-content' ) ;
39
- $ ( '#end-col' ) . append ( '<div class="text-center font-italic d-flex align-items-center"><div><p>The End Location could not be found:</p><p>' +
40
- $ ( '#end-location' ) . text ( ) + '</p></div></div>' ) ;
38
+ $ ( '#end-col' ) . append ( '<div class="no-map"><div><p>Looks like the End Location could not be found...</p></div></div>' ) ;
41
39
}
42
40
}
43
41
@@ -57,6 +55,21 @@ preventFontInjection = function() {
57
55
} ;
58
56
}
59
57
58
+ // Allow the user to search available rentals for a specific tag
59
+ tagSearch = function ( ) {
60
+ $ ( '.tag-search-btn' ) . click ( function ( ) {
61
+ var link = $ ( '.tag-search-btn a' ) ;
62
+ var input = $ ( '.tag-search' ) ;
63
+ var re = / ^ [ a - z A - Z 0 - 9 \s \- ] + $ / ;
64
+ if ( re . test ( input . val ( ) ) ) {
65
+ link . attr ( 'href' , link . attr ( 'href' ) + '?tag=' + input . val ( ) ) ;
66
+ }
67
+ else {
68
+ link . attr ( 'href' , link . attr ( 'href' ) + '?tag=*' ) ;
69
+ }
70
+ } ) ;
71
+ }
72
+
60
73
// Randomize rental card header gradient angle
61
74
rentalHeaderColor = function ( ) {
62
75
if ( $ ( '#users-overview' ) . length == 0 &&
0 commit comments