From: Michael Tremer Date: Mon, 15 Oct 2018 13:54:55 +0000 (+0100) Subject: Drop site.js X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=38a7e948236afa47a86f915d84a94fbe3758987d;p=ipfire.org.git Drop site.js We don't have any custom JS any more Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index 2937ac28..64034e9d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -278,8 +278,7 @@ static_js_DATA = \ src/bootstrap/dist/js/bootstrap.min.js.map \ \ src/static/js/jquery-3.3.1.min.js \ - src/static/js/popper.min.js \ - src/static/js/site.js + src/static/js/popper.min.js static_jsdir = $(staticdir)/js diff --git a/src/static/js/site.js b/src/static/js/site.js deleted file mode 100644 index ad94ee07..00000000 --- a/src/static/js/site.js +++ /dev/null @@ -1,28 +0,0 @@ -$.query = function(name){ - var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href); - return results[1] || 0; -} - -/* $(".planet-search-autocomplete").typeahead({ - source: function(query, process) { - $.get("/api/planet/search/autocomplete", { q: query }, function(data) { - if (data.query == query) { - process(data.results); - } - }); - }, -}); */ - -function getCookie(name) { - var r = document.cookie.match("\\b" + name + "=([^;]*)\\b"); - return r ? r[1] : undefined; -} - -jQuery.postJSON = function(url, args, callback) { - args._xsrf = getCookie("_xsrf"); - $.ajax({url: url, data: $.param(args), dataType: "text", type: "POST", - success: function(response) { - callback(eval("(" + response + ")")); - } - }); -}; diff --git a/src/templates/base.html b/src/templates/base.html index 129c4f4b..48fbbf05 100644 --- a/src/templates/base.html +++ b/src/templates/base.html @@ -147,7 +147,6 @@ - {% block javascript %}{% end block %}