Browse Source

Merge branch 'master' into filtron

Markus Heiser 5 years ago
parent
commit
2b2a882df0

+ 1 - 1
searx/static/themes/oscar/css/logicodev-dark.css

@@ -172,7 +172,7 @@ input[type=checkbox]:not(:checked) + .label_hide_if_checked + .label_hide_if_not
 .result-videos,
 .result-map {
   clear: both;
-  padding: 2px 4px;
+  padding: 0.5em 4px;
 }
 .result-default:hover,
 .result-code:hover,

File diff suppressed because it is too large
+ 0 - 0
searx/static/themes/oscar/css/logicodev-dark.min.css


+ 1 - 1
searx/static/themes/oscar/css/logicodev.css

@@ -145,7 +145,7 @@ input[type=checkbox]:not(:checked) + .label_hide_if_checked + .label_hide_if_not
 .result-videos,
 .result-map {
   clear: both;
-  padding: 2px 4px;
+  padding: 0.5em 4px;
 }
 .result-default:hover,
 .result-code:hover,

File diff suppressed because it is too large
+ 0 - 0
searx/static/themes/oscar/css/logicodev.min.css


+ 9 - 0
searx/static/themes/oscar/js/searx.js

@@ -78,7 +78,13 @@ if(searx.autocompleter) {
 }
 
 $(document).ready(function(){
+    var original_search_value = '';
     if(searx.autocompleter) {
+		$("#q").on('keydown', function(e) {
+			if(e.which == 13) {
+                original_search_value = $('#q').val();
+			}
+		});
         $('#q').typeahead(null, {
             name: 'search-results',
             displayKey: function(result) {
@@ -87,6 +93,9 @@ $(document).ready(function(){
             source: searx.searchResults.ttAdapter()
         });
         $('#q').bind('typeahead:selected', function(ev, suggestion) {
+            if(original_search_value) {
+                $('#q').val(original_search_value);
+            }
             $("#search_form").submit();
         });
     }

File diff suppressed because it is too large
+ 0 - 1
searx/static/themes/oscar/js/searx.min.js


+ 9 - 0
searx/static/themes/oscar/js/searx_src/autocompleter.js

@@ -25,7 +25,13 @@ if(searx.autocompleter) {
 }
 
 $(document).ready(function(){
+    var original_search_value = '';
     if(searx.autocompleter) {
+		$("#q").on('keydown', function(e) {
+			if(e.which == 13) {
+                original_search_value = $('#q').val();
+			}
+		});
         $('#q').typeahead(null, {
             name: 'search-results',
             displayKey: function(result) {
@@ -34,6 +40,9 @@ $(document).ready(function(){
             source: searx.searchResults.ttAdapter()
         });
         $('#q').bind('typeahead:selected', function(ev, suggestion) {
+            if(original_search_value) {
+                $('#q').val(original_search_value);
+            }
             $("#search_form").submit();
         });
     }

+ 1 - 1
searx/static/themes/oscar/less/logicodev/results.less

@@ -64,7 +64,7 @@
 // default formating of results
 .result-default, .result-code, .result-torrent, .result-videos, .result-map {
     clear: both;
-    padding: 2px 4px;
+    padding: 0.5em 4px;
     &:hover{
         background-color: @dim-gray;
     }

+ 7 - 4
searx/static/themes/oscar/package.json

@@ -1,15 +1,18 @@
 {
     "devDependencies": {
-        "grunt": "~0.4.5",
-        "grunt-contrib-uglify": "~0.6.0",
-        "grunt-contrib-watch": "~0.6.1",
+        "grunt": "^0.4.5",
         "grunt-contrib-concat": "~0.5.0",
         "grunt-contrib-jshint": "~0.10.0",
-        "grunt-contrib-less": "~0.11.0"
+        "grunt-contrib-less": "~0.11.0",
+        "grunt-contrib-uglify": "~0.6.0",
+        "grunt-contrib-watch": "~0.6.1"
     },
     "scripts": {
         "build": "npm install && grunt",
         "start": "grunt watch",
         "test": "grunt"
+    },
+    "dependencies": {
+        "grunt-cli": "^1.3.2"
     }
 }

+ 3 - 1
searx/templates/courgette/preferences.html

@@ -98,6 +98,7 @@
         <table class="engine-table">
             <tr>
                 <th>{{ _('Engine name') }}</th>
+                <th>{{ _('Shortcut') }}</th>
                 <th>{{ _('Category') }}</th>
                 <th>{{ _('Allow') }} / {{ _('Block') }}</th>
             </tr>
@@ -106,7 +107,8 @@
 
                 {% if not search_engine.private %}
                 <tr>
-                    <td>{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})&lrm;</td>
+                    <td>{{ search_engine.name }}</td>
+                    <td>{{ shortcuts[search_engine.name] }}</td>
                     <td>{{ _(categ) }}</td>
                     <td class="engine_checkbox">
                         <input type="checkbox" id="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}" name="engine_{{ search_engine.name }}__{{ categ }}"{% if (search_engine.name, categ) in disabled_engines %} checked="checked"{% endif %} />

+ 3 - 1
searx/templates/legacy/preferences.html

@@ -95,6 +95,7 @@
     <table>
         <tr>
             <th>{{ _('Engine name') }}</th>
+            <th>{{ _('Shortcut') }}</th>
             <th>{{ _('Category') }}</th>
             <th>{{ _('Allow') }} / {{ _('Block') }}</th>
         </tr>
@@ -103,7 +104,8 @@
 
             {% if not search_engine.private %}
             <tr>
-                <td>{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})&lrm;</td>
+                <td>{{ search_engine.name }}</td>
+                <td>{{ shortcuts[search_engine.name] }}</td>
                 <td>{{ _(categ) }}</td>
                 <td class="engine_checkbox">
                     <input type="checkbox" id="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}" name="engine_{{ search_engine.name }}__{{ categ }}"{% if (search_engine.name, categ) in disabled_engines %} checked="checked"{% endif %} />

Some files were not shown because too many files changed in this diff