diff --git a/themes/baggy/_head.twig b/themes/baggy/_head.twig index 144bcaa..acc9fa3 100755 --- a/themes/baggy/_head.twig +++ b/themes/baggy/_head.twig @@ -11,4 +11,5 @@ + diff --git a/themes/baggy/js/init.js b/themes/baggy/js/init.js index da644fb..00470fb 100755 --- a/themes/baggy/js/init.js +++ b/themes/baggy/js/init.js @@ -1,10 +1,7 @@ $.fn.ready(function() { var $listmode = $('#listmode'), - $listentries = $("#list-entries"), - $bagit = $('#bagit'), - $bagitForm = $('#bagit-form'); - $bagitFormForm = $('#bagit-form-form'); + $listentries = $("#list-entries"); /* ========================================================================== Menu @@ -48,79 +45,4 @@ $.fn.ready(function() { $listmode.addClass("tablemode"); } - /* ========================================================================== - bag it link and close button - ========================================================================== */ - - function toggleSaveLinkForm(url) { - $bagit.toggleClass("active-current"); - $bagitForm.toggle(); - $('#content').toggleClass("opacity03"); - if (url !== 'undefined' && url) { - $('#plainurl').val(url); - } - $('#plainurl').focus(); - } - - $bagit.click(function(){ - toggleSaveLinkForm(); - }); - - $("#bagit-form-close").click(function(){ - toggleSaveLinkForm(); - }); - - - //send "bag it link" form request via ajax - $bagitFormForm.submit( function(event) { - $bagitFormForm.css("cursor", "wait"); - $("#add-link-result").empty(); - - $.ajax({ - type: $bagitFormForm.attr('method'), - url: $bagitFormForm.attr('action'), - data: $bagitFormForm.serialize(), - success: function(data) { - $('#add-link-result').html("Done!"); - $('#plainurl').val(''); - $('#plainurl').blur(''); - $bagitFormForm.css("cursor", "auto"); - //setTimeout( function() { toggleSaveLinkForm(); }, 1000); //close form after 1000 delay - }, - error: function(data) { - $('#add-link-result').html("Failed!"); - $bagitFormForm.css("cursor", "auto"); - } - }); - - event.preventDefault(); - }); - - /* ========================================================================== - Keyboard gestion - ========================================================================== */ - - $(window).keydown(function(e){ - if ( ( e.target.tagName.toLowerCase() !== 'input' && e.keyCode == 83 ) || e.keyCode == 27 ) { - toggleSaveLinkForm(); - return false; - } - }); - - /* ========================================================================== - Process all links inside an article - ========================================================================== */ - - $("article a[href^='http']").after(function() { - return " w "; - }); - - $(".add-to-wallabag-link-after").click(function(event){ - toggleSaveLinkForm($(this).attr('href')); - event.preventDefault(); - }); - - - - }); diff --git a/themes/default/_head.twig b/themes/default/_head.twig index f310e42..96a6ab3 100644 --- a/themes/default/_head.twig +++ b/themes/default/_head.twig @@ -9,4 +9,5 @@ - \ No newline at end of file + + diff --git a/themes/default/_menu.twig b/themes/default/_menu.twig index 0e7dd0a..0daa0b0 100644 --- a/themes/default/_menu.twig +++ b/themes/default/_menu.twig @@ -3,11 +3,11 @@