Browse Source

Change advanced toggle on torrent search form

spaghetti 7 years ago
parent
commit
d4fca326e8
3 changed files with 12 additions and 15 deletions
  1. 3
    6
      sections/torrents/browse.php
  2. 4
    8
      static/functions/browse.js
  3. 5
    1
      static/styles/global.css

+ 3
- 6
sections/torrents/browse.php View File

@@ -152,14 +152,11 @@ View::show_header('Browse Torrents', 'browse');
152 152
   <div class="box filter_torrents">
153 153
     <div class="head">
154 154
       <strong>
155
-        <span id="ft_basic_text" class="<?=$HideBasic?>">Basic /</span>
156
-        <span id="ft_basic_link" class="<?=$HideAdvanced?>"><a href="#" onclick="return toggleTorrentSearch('basic');">Basic</a> /</span>
157
-        <span id="ft_advanced_text" class="<?=$HideAdvanced?>">Advanced</span>
158
-        <span id="ft_advanced_link" class="<?=$HideBasic?>"><a href="#" onclick="return toggleTorrentSearch('advanced');">Advanced</a></span>
159
-        Search
155
+        <span id="ft_basic" class="<?=$HideBasic?>">Basic Search (<a class="clickable" onclick="toggleTorrentSearch('advanced')">Advanced</a>)</span>
156
+        <span id="ft_advanced" class="<?=$HideAdvanced?>">Advanced Search (<a class="clickable" onclick="toggleTorrentSearch('basic')">Basic</a>)</span>
160 157
       </strong>
161 158
       <span class="float_right">
162
-        <a href="#" onclick="return toggleTorrentSearch(0);" id="ft_toggle" class="brackets"><?=$HideFilter ? 'Show' : 'Hide'?></a>
159
+        <a onclick="return toggleTorrentSearch(0);" id="ft_toggle" class="brackets"><?=$HideFilter ? 'Show' : 'Hide'?></a>
163 160
       </span>
164 161
     </div>
165 162
     <div id="ft_container" class="pad<?=$HideFilter ? ' hidden' : ''?>">

+ 4
- 8
static/functions/browse.js View File

@@ -222,20 +222,16 @@ function toggleTorrentSearch(mode) {
222 222
     $('.fti_basic').enable();
223 223
     $('.ftr_advanced').ghide(true);
224 224
     $('.ftr_basic').gshow();
225
-    $('#ft_advanced_link').gshow();
226
-    $('#ft_advanced_text').ghide();
227
-    $('#ft_basic_link').ghide();
228
-    $('#ft_basic_text').gshow();
225
+    $('#ft_advanced').ghide();
226
+    $('#ft_basic').gshow();
229 227
     $('#ft_type').raw().value = 'basic';
230 228
   } else if (mode == 'advanced') {
231 229
     $('.fti_advanced').enable();
232 230
     $('.fti_basic').disable();
233 231
     $('.ftr_advanced').gshow();
234 232
     $('.ftr_basic').ghide();
235
-    $('#ft_advanced_link').ghide();
236
-    $('#ft_advanced_text').gshow();
237
-    $('#ft_basic_link').gshow();
238
-    $('#ft_basic_text').ghide();
233
+    $('#ft_advanced').gshow();
234
+    $('#ft_basic').ghide();
239 235
     $('#ft_type').raw().value = 'advanced';
240 236
   }
241 237
   return false;

+ 5
- 1
static/styles/global.css View File

@@ -111,7 +111,7 @@ div.collage_image {
111 111
   width: 20%;
112 112
 }
113 113
 
114
-[data-toggle-target], [data-quote-jump] {
114
+[data-toggle-target], [data-quote-jump], .clickable {
115 115
   cursor: pointer;
116 116
 }
117 117
 
@@ -927,6 +927,10 @@ input[type="search"] {
927 927
   max-width: 100%;
928 928
 }
929 929
 
930
+.filter_torrents #ft_basic > .clickable, .filter_torrents #ft_advanced > .clickable {
931
+  font-weight: 100;
932
+}
933
+
930 934
 #publickey {
931 935
   width: initial;
932 936
   font-family: monospace;

Loading…
Cancel
Save