mirror of
				https://github.com/searxng/searxng
				synced 2024-01-01 19:24:07 +01:00 
			
		
		
		
	Merge pull request #1979 from kvch/feature-toggle-all-buttons
Add "Allow all" and "Disable all" to engines tab of Oscar preferences
This commit is contained in:
		
						commit
						da02e0b8d8
					
				
					 4 changed files with 30 additions and 2 deletions
				
			
		|  | @ -357,3 +357,13 @@ $(document).ready(function(){ | ||||||
|         $( this ).off( event ); |         $( this ).off( event ); | ||||||
|     }); |     }); | ||||||
| }); | }); | ||||||
|  | ;$(document).ready(function(){ | ||||||
|  |     $("#allow-all-engines").click(function() { | ||||||
|  |         $(".onoffswitch-checkbox").each(function() { this.checked = false;}); | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     $("#disable-all-engines").click(function() { | ||||||
|  |         $(".onoffswitch-checkbox").each(function() { this.checked = true;}); | ||||||
|  |     }); | ||||||
|  | }); | ||||||
|  | 
 | ||||||
|  |  | ||||||
							
								
								
									
										4
									
								
								searx/static/themes/oscar/js/searx.min.js
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								searx/static/themes/oscar/js/searx.min.js
									
										
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										10
									
								
								searx/static/themes/oscar/js/searx_src/toggleall.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								searx/static/themes/oscar/js/searx_src/toggleall.js
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,10 @@ | ||||||
|  | $(document).ready(function(){ | ||||||
|  |     $("#allow-all-engines").click(function() { | ||||||
|  |         $(".onoffswitch-checkbox").each(function() { this.checked = false;}); | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     $("#disable-all-engines").click(function() { | ||||||
|  |         $(".onoffswitch-checkbox").each(function() { this.checked = true;}); | ||||||
|  |     }); | ||||||
|  | }); | ||||||
|  | 
 | ||||||
|  | @ -155,6 +155,14 @@ | ||||||
| 
 | 
 | ||||||
|                 <!-- Tab panes --> |                 <!-- Tab panes --> | ||||||
|                 <div class="tab-content"> |                 <div class="tab-content"> | ||||||
|  | 
 | ||||||
|  |                     <div class="hide_if_nojs"> | ||||||
|  |                         <p class="text-{% if rtl %}left{% else %}right{% endif %}"> | ||||||
|  |                             <button type="button" class="btn btn-default btn-success" id="allow-all-engines">{{ _("Allow all") }}</button> | ||||||
|  |                             <button type="button" class="btn btn-default btn-danger" id="disable-all-engines">{{ _("Disable all") }}</button> | ||||||
|  |                         </p> | ||||||
|  |                     </div> | ||||||
|  | 
 | ||||||
|                     {% for categ in all_categories %} |                     {% for categ in all_categories %} | ||||||
|                     <noscript><label>{{ _(categ) }}</label> |                     <noscript><label>{{ _(categ) }}</label> | ||||||
|                     </noscript> |                     </noscript> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Adam Tauber
						Adam Tauber