diff --git a/searx/static/js/require-2.1.15.min.js b/searx/static/js/require-2.1.15.min.js deleted file mode 100644 index be103a74e..000000000 --- a/searx/static/js/require-2.1.15.min.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - RequireJS 2.1.15 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved. - Available via the MIT or new BSD license. - see: http://github.com/jrburke/requirejs for details -*/ -var requirejs,require,define; -(function(ba){function G(b){return"[object Function]"===K.call(b)}function H(b){return"[object Array]"===K.call(b)}function v(b,c){if(b){var d;for(d=0;dthis.depCount&&!this.defined){if(G(l)){if(this.events.error&&this.map.isDefine||g.onError!==ca)try{f=i.execCb(c,l,b,f)}catch(d){a=d}else f=i.execCb(c,l,b,f);this.map.isDefine&&void 0===f&&((b=this.module)?f=b.exports:this.usingExports&& -(f=this.exports));if(a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",w(this.error=a)}else f=l;this.exports=f;if(this.map.isDefine&&!this.ignore&&(r[c]=f,g.onResourceLoad))g.onResourceLoad(i,this.map,this.depMaps);y(c);this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a= -this.map,b=a.id,d=p(a.prefix);this.depMaps.push(d);q(d,"defined",u(this,function(f){var l,d;d=m(aa,this.map.id);var e=this.map.name,P=this.map.parentMap?this.map.parentMap.name:null,n=i.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(f.normalize&&(e=f.normalize(e,function(a){return c(a,P,!0)})||""),f=p(a.prefix+"!"+e,this.map.parentMap),q(f,"defined",u(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),d=m(h,f.id)){this.depMaps.push(f); -if(this.events.error)d.on("error",u(this,function(a){this.emit("error",a)}));d.enable()}}else d?(this.map.url=i.nameToUrl(d),this.load()):(l=u(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),l.error=u(this,function(a){this.inited=!0;this.error=a;a.requireModules=[b];B(h,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&y(a.map.id)});w(a)}),l.fromText=u(this,function(f,c){var d=a.name,e=p(d),P=M;c&&(f=c);P&&(M=!1);s(e);t(j.config,b)&&(j.config[d]=j.config[b]);try{g.exec(f)}catch(h){return w(C("fromtexteval", -"fromText eval for "+b+" failed: "+h,h,[b]))}P&&(M=!0);this.depMaps.push(e);i.completeLoad(d);n([d],l)}),f.load(a.name,n,l,j))}));i.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){V[this.map.id]=this;this.enabling=this.enabled=!0;v(this.depMaps,u(this,function(a,b){var c,f;if("string"===typeof a){a=p(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=m(L,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;q(a,"defined",u(this,function(a){this.defineDep(b, -a);this.check()}));this.errback&&q(a,"error",u(this,this.errback))}c=a.id;f=h[c];!t(L,c)&&(f&&!f.enabled)&&i.enable(a,this)}));B(this.pluginMaps,u(this,function(a){var b=m(h,a.id);b&&!b.enabled&&i.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){v(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};i={config:j,contextName:b,registry:h,defined:r,urlFetched:S,defQueue:A,Module:Z,makeModuleMap:p, -nextTick:g.nextTick,onError:w,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=j.shim,c={paths:!0,bundles:!0,config:!0,map:!0};B(a,function(a,b){c[b]?(j[b]||(j[b]={}),U(j[b],a,!0,!0)):j[b]=a});a.bundles&&B(a.bundles,function(a,b){v(a,function(a){a!==b&&(aa[a]=b)})});a.shim&&(B(a.shim,function(a,c){H(a)&&(a={deps:a});if((a.exports||a.init)&&!a.exportsFn)a.exportsFn=i.makeShimExports(a);b[c]=a}),j.shim=b);a.packages&&v(a.packages,function(a){var b, -a="string"===typeof a?{name:a}:a;b=a.name;a.location&&(j.paths[b]=a.location);j.pkgs[b]=a.name+"/"+(a.main||"main").replace(ia,"").replace(Q,"")});B(h,function(a,b){!a.inited&&!a.map.unnormalized&&(a.map=p(b))});if(a.deps||a.callback)i.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(ba,arguments));return b||a.exports&&da(a.exports)}},makeRequire:function(a,e){function j(c,d,m){var n,q;e.enableBuildCallback&&(d&&G(d))&&(d.__requireJsBuild= -!0);if("string"===typeof c){if(G(d))return w(C("requireargs","Invalid require call"),m);if(a&&t(L,c))return L[c](h[a.id]);if(g.get)return g.get(i,c,a,j);n=p(c,a,!1,!0);n=n.id;return!t(r,n)?w(C("notloaded",'Module name "'+n+'" has not been loaded yet for context: '+b+(a?"":". Use require([])"))):r[n]}J();i.nextTick(function(){J();q=s(p(null,a));q.skipMap=e.skipMap;q.init(c,d,m,{enabled:!0});D()});return j}e=e||{};U(j,{isBrowser:z,toUrl:function(b){var d,e=b.lastIndexOf("."),k=b.split("/")[0];if(-1!== -e&&(!("."===k||".."===k)||1e.attachEvent.toString().indexOf("[native code"))&&!Y?(M=!0,e.attachEvent("onreadystatechange",b.onScriptLoad)): -(e.addEventListener("load",b.onScriptLoad,!1),e.addEventListener("error",b.onScriptError,!1)),e.src=d,J=e,D?y.insertBefore(e,D):y.appendChild(e),J=null,e;if(ea)try{importScripts(d),b.completeLoad(c)}catch(m){b.onError(C("importscripts","importScripts failed for "+c+" at "+d,m,[c]))}};z&&!q.skipDataMain&&T(document.getElementsByTagName("script"),function(b){y||(y=b.parentNode);if(I=b.getAttribute("data-main"))return s=I,q.baseUrl||(E=s.split("/"),s=E.pop(),O=E.length?E.join("/")+"/":"./",q.baseUrl= -O),s=s.replace(Q,""),g.jsExtRegExp.test(s)&&(s=I),q.deps=q.deps?q.deps.concat(s):[s],!0});define=function(b,c,d){var e,g;"string"!==typeof b&&(d=c,c=b,b=null);H(c)||(d=c,c=null);!c&&G(d)&&(c=[],d.length&&(d.toString().replace(ka,"").replace(la,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c)));if(M){if(!(e=J))N&&"interactive"===N.readyState||T(document.getElementsByTagName("script"),function(b){if("interactive"===b.readyState)return N=b}),e=N;e&&(b|| -(b=e.getAttribute("data-requiremodule")),g=F[e.getAttribute("data-requirecontext")])}(g?g.defQueue:R).push([b,c,d])};define.amd={jQuery:!0};g.exec=function(b){return eval(b)};g(q)}})(this); diff --git a/searx/static/themes/oscar/js/searx.js b/searx/static/themes/oscar/js/searx.js index 8208ce461..53b1c1696 100644 --- a/searx/static/themes/oscar/js/searx.js +++ b/searx/static/themes/oscar/js/searx.js @@ -1,27 +1,4 @@ /** - * searx is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * searx is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with searx. If not, see < http://www.gnu.org/licenses/ >. - * - * (C) 2014 by Thomas Pointhuber, - */ - -requirejs.config({ - baseUrl: './static/themes/oscar/js', - paths: { - app: '../app' - } -}); -;/** * searx is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -331,59 +308,54 @@ $(document).ready(function(){ var map_boundingbox = $(this).data('map-boundingbox'); var map_geojson = $(this).data('map-geojson'); - require(['leaflet-0.7.3.min'], function(leaflet) { - if(map_boundingbox) { - southWest = L.latLng(map_boundingbox[0], map_boundingbox[2]); - northEast = L.latLng(map_boundingbox[1], map_boundingbox[3]); - map_bounds = L.latLngBounds(southWest, northEast); - } + if(map_boundingbox) { + southWest = L.latLng(map_boundingbox[0], map_boundingbox[2]); + northEast = L.latLng(map_boundingbox[1], map_boundingbox[3]); + map_bounds = L.latLngBounds(southWest, northEast); + } - // TODO hack - // change default imagePath - L.Icon.Default.imagePath = "./static/themes/oscar/img/map"; + // change default imagePath + L.Icon.Default.imagePath = "./static/themes/oscar/img/map"; - // init map - var map = L.map(leaflet_target); + // init map + var map = L.map(leaflet_target); - // create the tile layer with correct attribution - var osmMapnikUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'; - var osmMapnikAttrib='Map data © OpenStreetMap contributors'; - var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib}); + // create the tile layer with correct attribution + var osmMapnikUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'; + var osmMapnikAttrib='Map data © OpenStreetMap contributors'; + var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib}); - var osmWikimediaUrl='https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png'; - var osmWikimediaAttrib = 'Wikimedia maps beta | Maps data © OpenStreetMap contributors'; - var osmWikimedia = new L.TileLayer(osmWikimediaUrl, {minZoom: 1, maxZoom: 19, attribution: osmWikimediaAttrib}); + var osmWikimediaUrl='https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png'; + var osmWikimediaAttrib = 'Wikimedia maps beta | Maps data © OpenStreetMap contributors'; + var osmWikimedia = new L.TileLayer(osmWikimediaUrl, {minZoom: 1, maxZoom: 19, attribution: osmWikimediaAttrib}); - // init map view + // init map view + setTimeout(function() { if(map_bounds) { - // TODO hack: https://github.com/Leaflet/Leaflet/issues/2021 - setTimeout(function () { - map.fitBounds(map_bounds, { - maxZoom:17 - }); - }, 0); + map.fitBounds(map_bounds, { + maxZoom:17 + }); } else if (map_lon && map_lat) { if(map_zoom) map.setView(new L.LatLng(map_lat, map_lon),map_zoom); else map.setView(new L.LatLng(map_lat, map_lon),8); - } + } + }, 0); - map.addLayer(osmMapnik); + map.addLayer(osmMapnik); - var baseLayers = { - "OSM Mapnik": osmMapnik/*, - "OSM Wikimedia": osmWikimedia*/ - }; + var baseLayers = { + "OSM Mapnik": osmMapnik/*, + "OSM Wikimedia": osmWikimedia*/ + }; - L.control.layers(baseLayers).addTo(map); + L.control.layers(baseLayers).addTo(map); - - if(map_geojson) - L.geoJson(map_geojson).addTo(map); - /*else if(map_bounds) - L.rectangle(map_bounds, {color: "#ff7800", weight: 3, fill:false}).addTo(map);*/ - }); + if(map_geojson) + L.geoJson(map_geojson).addTo(map); + /*else if(map_bounds) + L.rectangle(map_bounds, {color: "#ff7800", weight: 3, fill:false}).addTo(map);*/ // this event occour only once per element $( this ).off( event ); diff --git a/searx/static/themes/oscar/js/searx.min.js b/searx/static/themes/oscar/js/searx.min.js index ad96c5c12..e3716b6d7 100644 --- a/searx/static/themes/oscar/js/searx.min.js +++ b/searx/static/themes/oscar/js/searx.min.js @@ -1,4 +1,4 @@ /*! oscar/searx.min.js | 10-03-2021 | */ -requirejs.config({baseUrl:"./static/themes/oscar/js",paths:{app:"../app"}}),window.searx=function(t){"use strict";var e,e=t.currentScript||(e=t.getElementsByTagName("script"))[e.length-1];return{autocompleter:"true"===e.getAttribute("data-autocompleter"),method:e.getAttribute("data-method")}}(document),searx.autocompleter&&(searx.searchResults=new Bloodhound({datumTokenizer:Bloodhound.tokenizers.obj.whitespace("value"),queryTokenizer:Bloodhound.tokenizers.whitespace,remote:"./autocompleter?q=%QUERY"}),searx.searchResults.initialize()),$(document).ready(function(){var a="";searx.autocompleter&&($("#q").on("keydown",function(t){13==t.which&&(a=$("#q").val())}),$("#q").typeahead(null,{name:"search-results",displayKey:function(t){return t},source:searx.searchResults.ttAdapter()}),$("#q").bind("typeahead:selected",function(t,e){a&&$("#q").val(a),$("#search_form").submit()}))}),$(document).ready(function(){$("#q.autofocus").focus(),$("#clear_search").click(function(){document.getElementById("q").value=""}),$(".select-all-on-click").click(function(){$(this).select()}),$(".btn-collapse").click(function(){var t=$(this).data("btn-text-collapsed"),e=$(this).data("btn-text-not-collapsed");""!==t&&""!==e&&(new_html=$(this).hasClass("collapsed")?$(this).html().replace(t,e):$(this).html().replace(e,t),$(this).html(new_html))}),$(".btn-toggle .btn").click(function(){var t="btn-"+$(this).data("btn-class"),e=$(this).data("btn-label-default"),a=$(this).data("btn-label-toggled");""!==a&&(new_html=$(this).hasClass("btn-default")?$(this).html().replace(e,a):$(this).html().replace(a,e),$(this).html(new_html)),$(this).toggleClass(t),$(this).toggleClass("btn-default")}),$(".media-loader").click(function(){var t=$(this).data("target"),e=$(t+" > iframe"),t=e.attr("src");void 0!==t&&!1!==t||e.attr("src",e.data("src"))}),$(".btn-sm").dblclick(function(){var t="btn-"+$(this).data("btn-class");$(this).hasClass("btn-default")?($(".btn-sm > input").attr("checked","checked"),$(".btn-sm > input").prop("checked",!0),$(".btn-sm").addClass(t),$(".btn-sm").addClass("active"),$(".btn-sm").removeClass("btn-default")):($(".btn-sm > input").attr("checked",""),$(".btn-sm > input").removeAttr("checked"),$(".btn-sm > input").checked=!1,$(".btn-sm").removeClass(t),$(".btn-sm").removeClass("active"),$(".btn-sm").addClass("btn-default"))}),$(".nav-tabs").click(function(t){$(t.target).parents("ul").children().attr("aria-selected","false"),$(t.target).parent().attr("aria-selected","true")})}),window.addEventListener("load",function(){$(".infobox").each(function(){var t=$(this).find(".infobox_body");t.prop("scrollHeight")+t.find("img.infobox_part").height()<=t.css("max-height").replace("px","")&&$(this).find(".infobox_toggle").hide()})}),$(document).ready(function(){$(".searx_overpass_request").on("click",function(t){var e="https://overpass-api.de/api/interpreter?data=[out:json][timeout:25];(",a=");out meta;",s=$(this).data("osm-id"),n=$(this).data("osm-type"),i=$(this).data("result-table"),o="#"+$(this).data("result-table-loadicon"),r=["addr:city","addr:country","addr:housenumber","addr:postcode","addr:street"];if(s&&n&&i){var i="#"+i,c=null;switch(n){case"node":c=e+"node("+s+");"+a;break;case"way":c=e+"way("+s+");"+a;break;case"relation":c=e+"relation("+s+");"+a}c&&$.ajax(c).done(function(t){if(t&&t.elements&&t.elements[0]){var e,a=t.elements[0],s=$(i).html();for(e in a.tags)if(null===a.tags.name||-1==r.indexOf(e)){switch(s+=""+e+"",e){case"phone":case"fax":s+=''+a.tags[e]+"";break;case"email":s+=''+a.tags[e]+"";break;case"website":case"url":s+=''+a.tags[e]+"";break;case"wikidata":s+=''+a.tags[e]+"";break;case"wikipedia":if(-1!=a.tags[e].indexOf(":")){s+=''+a.tags[e]+"";break}default:s+=a.tags[e]}s+=""}$(i).html(s),$(i).removeClass("hidden"),$(o).addClass("hidden")}}).fail(function(){$(o).html($(o).html()+'

'+could_not_load+"

")})}$(this).off(t)}),$(".searx_init_map").on("click",function(t){var s=$(this).data("leaflet-target"),n=$(this).data("map-lon"),i=$(this).data("map-lat"),o=$(this).data("map-zoom"),r=$(this).data("map-boundingbox"),c=$(this).data("map-geojson");require(["leaflet-0.7.3.min"],function(t){r&&(southWest=L.latLng(r[0],r[2]),northEast=L.latLng(r[1],r[3]),map_bounds=L.latLngBounds(southWest,northEast)),L.Icon.Default.imagePath="./static/themes/oscar/img/map";var e=L.map(s),a=new L.TileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{minZoom:1,maxZoom:19,attribution:'Map data © OpenStreetMap contributors'});new L.TileLayer("https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png",{minZoom:1,maxZoom:19,attribution:'Wikimedia maps beta | Maps data © OpenStreetMap contributors'});map_bounds?setTimeout(function(){e.fitBounds(map_bounds,{maxZoom:17})},0):n&&i&&(o?e.setView(new L.LatLng(i,n),o):e.setView(new L.LatLng(i,n),8)),e.addLayer(a);a={"OSM Mapnik":a};L.control.layers(a).addTo(e),c&&L.geoJson(c).addTo(e)}),$(this).off(t)})}),$(document).ready(function(){$("#allow-all-engines").click(function(){$(".onoffswitch-checkbox").each(function(){this.checked=!1})}),$("#disable-all-engines").click(function(){$(".onoffswitch-checkbox").each(function(){this.checked=!0})})}); +window.searx=function(t){"use strict";var e,e=t.currentScript||(e=t.getElementsByTagName("script"))[e.length-1];return{autocompleter:"true"===e.getAttribute("data-autocompleter"),method:e.getAttribute("data-method")}}(document),searx.autocompleter&&(searx.searchResults=new Bloodhound({datumTokenizer:Bloodhound.tokenizers.obj.whitespace("value"),queryTokenizer:Bloodhound.tokenizers.whitespace,remote:"./autocompleter?q=%QUERY"}),searx.searchResults.initialize()),$(document).ready(function(){var a="";searx.autocompleter&&($("#q").on("keydown",function(t){13==t.which&&(a=$("#q").val())}),$("#q").typeahead(null,{name:"search-results",displayKey:function(t){return t},source:searx.searchResults.ttAdapter()}),$("#q").bind("typeahead:selected",function(t,e){a&&$("#q").val(a),$("#search_form").submit()}))}),$(document).ready(function(){$("#q.autofocus").focus(),$("#clear_search").click(function(){document.getElementById("q").value=""}),$(".select-all-on-click").click(function(){$(this).select()}),$(".btn-collapse").click(function(){var t=$(this).data("btn-text-collapsed"),e=$(this).data("btn-text-not-collapsed");""!==t&&""!==e&&(new_html=$(this).hasClass("collapsed")?$(this).html().replace(t,e):$(this).html().replace(e,t),$(this).html(new_html))}),$(".btn-toggle .btn").click(function(){var t="btn-"+$(this).data("btn-class"),e=$(this).data("btn-label-default"),a=$(this).data("btn-label-toggled");""!==a&&(new_html=$(this).hasClass("btn-default")?$(this).html().replace(e,a):$(this).html().replace(a,e),$(this).html(new_html)),$(this).toggleClass(t),$(this).toggleClass("btn-default")}),$(".media-loader").click(function(){var t=$(this).data("target"),e=$(t+" > iframe"),t=e.attr("src");void 0!==t&&!1!==t||e.attr("src",e.data("src"))}),$(".btn-sm").dblclick(function(){var t="btn-"+$(this).data("btn-class");$(this).hasClass("btn-default")?($(".btn-sm > input").attr("checked","checked"),$(".btn-sm > input").prop("checked",!0),$(".btn-sm").addClass(t),$(".btn-sm").addClass("active"),$(".btn-sm").removeClass("btn-default")):($(".btn-sm > input").attr("checked",""),$(".btn-sm > input").removeAttr("checked"),$(".btn-sm > input").checked=!1,$(".btn-sm").removeClass(t),$(".btn-sm").removeClass("active"),$(".btn-sm").addClass("btn-default"))}),$(".nav-tabs").click(function(t){$(t.target).parents("ul").children().attr("aria-selected","false"),$(t.target).parent().attr("aria-selected","true")})}),window.addEventListener("load",function(){$(".infobox").each(function(){var t=$(this).find(".infobox_body");t.prop("scrollHeight")+t.find("img.infobox_part").height()<=t.css("max-height").replace("px","")&&$(this).find(".infobox_toggle").hide()})}),$(document).ready(function(){$(".searx_overpass_request").on("click",function(t){var e="https://overpass-api.de/api/interpreter?data=[out:json][timeout:25];(",a=");out meta;",s=$(this).data("osm-id"),n=$(this).data("osm-type"),i=$(this).data("result-table"),o="#"+$(this).data("result-table-loadicon"),r=["addr:city","addr:country","addr:housenumber","addr:postcode","addr:street"];if(s&&n&&i){var i="#"+i,l=null;switch(n){case"node":l=e+"node("+s+");"+a;break;case"way":l=e+"way("+s+");"+a;break;case"relation":l=e+"relation("+s+");"+a}l&&$.ajax(l).done(function(t){if(t&&t.elements&&t.elements[0]){var e,a=t.elements[0],s=$(i).html();for(e in a.tags)if(null===a.tags.name||-1==r.indexOf(e)){switch(s+=""+e+"",e){case"phone":case"fax":s+=''+a.tags[e]+"";break;case"email":s+=''+a.tags[e]+"";break;case"website":case"url":s+=''+a.tags[e]+"";break;case"wikidata":s+=''+a.tags[e]+"";break;case"wikipedia":if(-1!=a.tags[e].indexOf(":")){s+=''+a.tags[e]+"";break}default:s+=a.tags[e]}s+=""}$(i).html(s),$(i).removeClass("hidden"),$(o).addClass("hidden")}}).fail(function(){$(o).html($(o).html()+'

'+could_not_load+"

")})}$(this).off(t)}),$(".searx_init_map").on("click",function(t){var e=$(this).data("leaflet-target"),a=$(this).data("map-lon"),s=$(this).data("map-lat"),n=$(this).data("map-zoom"),i=$(this).data("map-boundingbox"),o=$(this).data("map-geojson");i&&(southWest=L.latLng(i[0],i[2]),northEast=L.latLng(i[1],i[3]),map_bounds=L.latLngBounds(southWest,northEast)),L.Icon.Default.imagePath="./static/themes/oscar/img/map";var r=L.map(e),e=new L.TileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{minZoom:1,maxZoom:19,attribution:'Map data © OpenStreetMap contributors'});new L.TileLayer("https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png",{minZoom:1,maxZoom:19,attribution:'Wikimedia maps beta | Maps data © OpenStreetMap contributors'});setTimeout(function(){map_bounds?r.fitBounds(map_bounds,{maxZoom:17}):a&&s&&(n?r.setView(new L.LatLng(s,a),n):r.setView(new L.LatLng(s,a),8))},0),r.addLayer(e);e={"OSM Mapnik":e};L.control.layers(e).addTo(r),o&&L.geoJson(o).addTo(r),$(this).off(t)})}),$(document).ready(function(){$("#allow-all-engines").click(function(){$(".onoffswitch-checkbox").each(function(){this.checked=!1})}),$("#disable-all-engines").click(function(){$(".onoffswitch-checkbox").each(function(){this.checked=!0})})}); //# sourceMappingURL=searx.min.js.map \ No newline at end of file diff --git a/searx/static/themes/oscar/js/searx.min.js.map b/searx/static/themes/oscar/js/searx.min.js.map index 90bd35e3f..8def39456 100644 --- a/searx/static/themes/oscar/js/searx.min.js.map +++ b/searx/static/themes/oscar/js/searx.min.js.map @@ -1 +1 @@ -{"version":3,"file":"searx.min.js","sources":["searx.js"],"names":["requirejs","config","baseUrl","paths","app","window","searx","d","scripts","script","currentScript","getElementsByTagName","length","autocompleter","getAttribute","method","document","searchResults","Bloodhound","datumTokenizer","tokenizers","obj","whitespace","queryTokenizer","remote","initialize","$","ready","original_search_value","on","e","which","val","typeahead","name","displayKey","result","source","ttAdapter","bind","ev","suggestion","submit","focus","click","getElementById","value","this","select","btnTextCollapsed","data","btnTextNotCollapsed","new_html","hasClass","html","replace","btnClass","btnLabelDefault","btnLabelToggled","toggleClass","target","iframe_load","srctest","attr","undefined","dblclick","prop","addClass","removeClass","removeAttr","checked","a","parents","children","parent","addEventListener","each","infobox_body","find","height","css","hide","event","query_start","overpass_url","query_end","osm_id","osm_type","result_table","result_table_loadicon","osm_ignore_tags","query","ajax","done","elements","row","element","newHtml","tags","indexOf","substring","fail","could_not_load","off","leaflet_target","map_lon","map_lat","map_zoom","map_boundingbox","map_geojson","require","leaflet","southWest","L","latLng","northEast","map_bounds","latLngBounds","Icon","Default","imagePath","map","osmMapnik","TileLayer","minZoom","maxZoom","attribution","setTimeout","fitBounds","setView","LatLng","addLayer","baseLayers","OSM Mapnik","control","layers","addTo","geoJson"],"mappings":";;AAiBAA,UAAUC,OAAO,CACbC,QAAS,2BACTC,MAAO,CACHC,IAAK,YAmBbC,OAAOC,MAAQ,SAAUC,gBAIrB,IACQC,EADJC,EAASF,EAAEG,gBACPF,EAAUD,EAAEI,qBAAqB,WACtBH,EAAQI,OAAS,GAGpC,MAAO,CACHC,cAA6D,SAA9CJ,EAAOK,aAAa,sBACnCC,OAAQN,EAAOK,aAAa,gBAXrB,CAaZE,UAkBAV,MAAMO,gBACLP,MAAMW,cAAgB,IAAIC,WAAW,CACjCC,eAAgBD,WAAWE,WAAWC,IAAIC,WAAW,SACrDC,eAAgBL,WAAWE,WAAWE,WACtCE,OAAQ,6BAEZlB,MAAMW,cAAcQ,cAGxBC,EAAEV,UAAUW,MAAM,WACd,IAAIC,EAAwB,GACzBtB,MAAMO,gBACXa,EAAE,MAAMG,GAAG,UAAW,SAASC,GAChB,IAAXA,EAAEC,QACQH,EAAwBF,EAAE,MAAMM,SAGxCN,EAAE,MAAMO,UAAU,KAAM,CACpBC,KAAM,iBACNC,WAAY,SAASC,GACjB,OAAOA,GAEXC,OAAQ/B,MAAMW,cAAcqB,cAEhCZ,EAAE,MAAMa,KAAK,qBAAsB,SAASC,EAAIC,GACzCb,GACCF,EAAE,MAAMM,IAAIJ,GAEhBF,EAAE,gBAAgBgB,cAqB9BhB,EAAEV,UAAUW,MAAM,WAIdD,EAAE,gBAAgBiB,QAKlBjB,EAAE,iBAAiBkB,MAAM,WAC5B5B,SAAS6B,eAAe,KAAKC,MAAQ,KAM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,WAC5BlB,EAAE,yBAAyBkD,KAAK,WAAa7B,KAAKuB,SAAU"} \ No newline at end of file +{"version":3,"file":"searx.min.js","sources":["searx.js"],"names":["window","searx","d","scripts","script","currentScript","getElementsByTagName","length","autocompleter","getAttribute","method","document","searchResults","Bloodhound","datumTokenizer","tokenizers","obj","whitespace","queryTokenizer","remote","initialize","$","ready","original_search_value","on","e","which","val","typeahead","name","displayKey","result","source","ttAdapter","bind","ev","suggestion","submit","focus","click","getElementById","value","this","select","btnTextCollapsed","data","btnTextNotCollapsed","new_html","hasClass","html","replace","btnClass","btnLabelDefault","btnLabelToggled","toggleClass","target","iframe_load","srctest","attr","undefined","dblclick","prop","addClass","removeClass","removeAttr","checked","a","parents","children","parent","addEventListener","each","infobox_body","find","height","css","hide","event","query_start","overpass_url","query_end","osm_id","osm_type","result_table","result_table_loadicon","osm_ignore_tags","query","ajax","done","elements","row","element","newHtml","tags","indexOf","substring","fail","could_not_load","off","leaflet_target","map_lon","map_lat","map_zoom","map_boundingbox","map_geojson","southWest","L","latLng","northEast","map_bounds","latLngBounds","Icon","Default","imagePath","map","osmMapnik","TileLayer","minZoom","maxZoom","attribution","setTimeout","fitBounds","setView","LatLng","addLayer","baseLayers","OSM Mapnik","control","layers","addTo","geoJson"],"mappings":";;AAgBAA,OAAOC,MAAQ,SAAUC,gBAIrB,IACQC,EADJC,EAASF,EAAEG,gBACPF,EAAUD,EAAEI,qBAAqB,WACtBH,EAAQI,OAAS,GAGpC,MAAO,CACHC,cAA6D,SAA9CJ,EAAOK,aAAa,sBACnCC,OAAQN,EAAOK,aAAa,gBAXrB,CAaZE,UAkBAV,MAAMO,gBACLP,MAAMW,cAAgB,IAAIC,WAAW,CACjCC,eAAgBD,WAAWE,WAAWC,IAAIC,WAAW,SACrDC,eAAgBL,WAAWE,WAAWE,WACtCE,OAAQ,6BAEZlB,MAAMW,cAAcQ,cAGxBC,EAAEV,UAAUW,MAAM,WACd,IAAIC,EAAwB,GACzBtB,MAAMO,gBAC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EAASD,GAASE,GAE3CY,EAAIQ,QAAQ,IAAIhB,EAAEiB,OAAOtB,EAASD,GAAS,KAEpD,GAEHc,EAAIU,SAAST,GAETU,EAAa,CACbC,aAAcX,GAIlBT,EAAEqB,QAAQC,OAAOH,GAAYI,MAAMf,GAEhCV,GACCE,EAAEwB,QAAQ1B,GAAayB,MAAMf,GAKjC7F,EAAGqB,MAAOwD,IAAKrB,OAGtBxD,EAAEV,UAAUW,MAAM,WACfD,EAAE,sBAAsBkB,MAAM,WAC1BlB,EAAE,yBAAyBkD,KAAK,WAAa7B,KAAKuB,SAAU,MAGhE5C,EAAE,wBAAwBkB,MAAM,WAC5BlB,EAAE,yBAAyBkD,KAAK,WAAa7B,KAAKuB,SAAU"} \ No newline at end of file diff --git a/searx/static/themes/oscar/js/searx_src/00_requirejs_config.js b/searx/static/themes/oscar/js/searx_src/00_requirejs_config.js deleted file mode 100644 index e7c2abdac..000000000 --- a/searx/static/themes/oscar/js/searx_src/00_requirejs_config.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * searx is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * searx is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with searx. If not, see < http://www.gnu.org/licenses/ >. - * - * (C) 2014 by Thomas Pointhuber, - */ - -requirejs.config({ - baseUrl: './static/themes/oscar/js', - paths: { - app: '../app' - } -}); diff --git a/searx/static/themes/oscar/js/searx_src/leaflet_map.js b/searx/static/themes/oscar/js/searx_src/leaflet_map.js index 06931b474..60bf836ce 100644 --- a/searx/static/themes/oscar/js/searx_src/leaflet_map.js +++ b/searx/static/themes/oscar/js/searx_src/leaflet_map.js @@ -107,59 +107,54 @@ $(document).ready(function(){ var map_boundingbox = $(this).data('map-boundingbox'); var map_geojson = $(this).data('map-geojson'); - require(['leaflet-0.7.3.min'], function(leaflet) { - if(map_boundingbox) { - southWest = L.latLng(map_boundingbox[0], map_boundingbox[2]); - northEast = L.latLng(map_boundingbox[1], map_boundingbox[3]); - map_bounds = L.latLngBounds(southWest, northEast); - } + if(map_boundingbox) { + southWest = L.latLng(map_boundingbox[0], map_boundingbox[2]); + northEast = L.latLng(map_boundingbox[1], map_boundingbox[3]); + map_bounds = L.latLngBounds(southWest, northEast); + } - // TODO hack - // change default imagePath - L.Icon.Default.imagePath = "./static/themes/oscar/img/map"; + // change default imagePath + L.Icon.Default.imagePath = "./static/themes/oscar/img/map"; - // init map - var map = L.map(leaflet_target); + // init map + var map = L.map(leaflet_target); - // create the tile layer with correct attribution - var osmMapnikUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'; - var osmMapnikAttrib='Map data © OpenStreetMap contributors'; - var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib}); + // create the tile layer with correct attribution + var osmMapnikUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'; + var osmMapnikAttrib='Map data © OpenStreetMap contributors'; + var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib}); - var osmWikimediaUrl='https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png'; - var osmWikimediaAttrib = 'Wikimedia maps beta | Maps data © OpenStreetMap contributors'; - var osmWikimedia = new L.TileLayer(osmWikimediaUrl, {minZoom: 1, maxZoom: 19, attribution: osmWikimediaAttrib}); + var osmWikimediaUrl='https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png'; + var osmWikimediaAttrib = 'Wikimedia maps beta | Maps data © OpenStreetMap contributors'; + var osmWikimedia = new L.TileLayer(osmWikimediaUrl, {minZoom: 1, maxZoom: 19, attribution: osmWikimediaAttrib}); - // init map view + // init map view + setTimeout(function() { if(map_bounds) { - // TODO hack: https://github.com/Leaflet/Leaflet/issues/2021 - setTimeout(function () { - map.fitBounds(map_bounds, { - maxZoom:17 - }); - }, 0); + map.fitBounds(map_bounds, { + maxZoom:17 + }); } else if (map_lon && map_lat) { if(map_zoom) map.setView(new L.LatLng(map_lat, map_lon),map_zoom); else map.setView(new L.LatLng(map_lat, map_lon),8); - } + } + }, 0); - map.addLayer(osmMapnik); + map.addLayer(osmMapnik); - var baseLayers = { - "OSM Mapnik": osmMapnik/*, - "OSM Wikimedia": osmWikimedia*/ - }; + var baseLayers = { + "OSM Mapnik": osmMapnik/*, + "OSM Wikimedia": osmWikimedia*/ + }; - L.control.layers(baseLayers).addTo(map); + L.control.layers(baseLayers).addTo(map); - - if(map_geojson) - L.geoJson(map_geojson).addTo(map); - /*else if(map_bounds) - L.rectangle(map_bounds, {color: "#ff7800", weight: 3, fill:false}).addTo(map);*/ - }); + if(map_geojson) + L.geoJson(map_geojson).addTo(map); + /*else if(map_bounds) + L.rectangle(map_bounds, {color: "#ff7800", weight: 3, fill:false}).addTo(map);*/ // this event occour only once per element $( this ).off( event ); diff --git a/searx/templates/oscar/base.html b/searx/templates/oscar/base.html index 2205eb952..033be89b8 100644 --- a/searx/templates/oscar/base.html +++ b/searx/templates/oscar/base.html @@ -19,7 +19,12 @@ {{' '}} {%- endif %} - + {% set templates = results|map(attribute='template')|unique|list -%} + {%- set load_leaflet = 'map.html' in templates -%} + {%- if load_leaflet -%} + {{' '}} + {%- endif %} + {%- for css in styles %} {% endfor %} @@ -96,9 +101,9 @@ - {% if autocomplete %} {% endif %} + {% if load_leaflet %}{{" "}}{{ "\n" }}{% endif %} + {% if autocomplete %}{{" "}}{{ "\n" }}{% endif %} -