]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
can't close search popup with the cross picture #613 621/head
authorNicolas Lœuillet <nicolas@loeuillet.org>
Tue, 8 Apr 2014 19:58:44 +0000 (21:58 +0200)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Tue, 8 Apr 2014 19:58:44 +0000 (21:58 +0200)
themes/baggy/_head.twig
themes/baggy/_search-form.twig
themes/default/_head.twig
themes/default/js/popupForm.js [new file with mode: 0644]

index 04898d850dc281aa02f8eb136fc4f293778fbbf4..be11673fef40d425d56efd84e84601200dc4e586 100755 (executable)
@@ -12,4 +12,5 @@
         <script src="{{ poche_url }}themes/{{theme}}/js/jquery.cookie.js"></script>
         <script src="{{ poche_url }}themes/{{theme}}/js/init.js"></script>
         <script src="{{ poche_url }}themes/default/js/saveLink.js"></script>
+        <script src="{{ poche_url }}themes/default/js/popupForm.js"></script>
         <script src="{{ poche_url }}themes/{{theme}}/js/closeMessage.js"></script>
index 1fd4154e6765962870bc2dc272bdce1e1d4d0a66..b8ac3bfa6576db0efba9ceaf9fba262e148c1be9 100644 (file)
@@ -1,21 +1,7 @@
-<div id="search-form" class="messages info">                   
+<div id="search-form" class="messages info">
 <form method="get" action="index.php">
-               <input type="hidden" name="view" value="search"></input>
+        <input type="hidden" name="view" value="search"></input>
         <label><a href="javascript: void(null);" id="search-form-close">X</a>{% trans "Search" %}</label> : <input type="text" name="search" />
-               <input id="submit-search" type="submit" value="{% trans "Search" %} !"></input>
+        <input id="submit-search" type="submit" value="{% trans "Search" %} !"></input>
 </form>
-</div>
-<script type="text/javascript">
-    $(document).ready(function() {
-
-        $("#search-form").hide();
-
-        $("#search").click(function(){
-            $("#search-form").toggle();
-            $("#search").toggleClass("current");
-            $("#search-arrow").toggleClass("arrow-down");
-        });
-
-
-    });
-</script>
\ No newline at end of file
+</div>
\ No newline at end of file
index ffbfc22e84db20b3d6a5a21458a675a0364a816b..8c939e307a47657d5d4faa0d3f12d691c4fc8886 100755 (executable)
@@ -11,3 +11,4 @@
         <script src="{{ poche_url }}themes/default/js/autoClose.js"></script>
         <script src="{{ poche_url }}themes/default/js/closeMessage.js"></script>
         <script src="{{ poche_url }}themes/default/js/saveLink.js"></script>
+        <script src="{{ poche_url }}themes/default/js/popupForm.js"></script>
\ No newline at end of file
diff --git a/themes/default/js/popupForm.js b/themes/default/js/popupForm.js
new file mode 100644 (file)
index 0000000..06be3f0
--- /dev/null
@@ -0,0 +1,20 @@
+$(document).ready(function() {
+
+    $("#search-form").hide();
+
+    function closeSearch() {
+        $("#search-form").toggle();
+        $("#search").toggleClass("current");
+        $("#search-arrow").toggleClass("arrow-down");
+    }
+
+    $("#search").click(function(){
+        closeSearch();
+    });
+
+    $("#search-form-close").click(function(){
+        closeSearch();
+    });
+
+
+});
\ No newline at end of file