]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
[fix] somes fixes on old default theme
authorNicolas Lœuillet <nicolas.loeuillet@gmail.com>
Wed, 12 Feb 2014 20:51:11 +0000 (21:51 +0100)
committerNicolas Lœuillet <nicolas.loeuillet@gmail.com>
Wed, 12 Feb 2014 20:51:11 +0000 (21:51 +0100)
themes/default/_footer.twig
themes/default/_head.twig
themes/default/js/closeMessage.js [new file with mode: 0644]

index f837ae38e5c82887ced9d480ed6ec36c1b49f4ec..3057cb755972b0c9d440f6df138f1eb39c3096c9 100644 (file)
@@ -1,4 +1,4 @@
         <footer class="w600p center mt3 mb3 smaller txtright">
             <p>{% trans "powered by" %} <a href="http://wallabag.org">wallabag</a></p>
-            {% if constant('DEBUG_POCHE') == 1 %}<p><strong>{% trans "debug mode is on so cache is off." %} {% trans "your poche version:" %}{{constant('POCHE')}}. {% trans "storage:" %} {{constant('STORAGE')}}</strong></p>{% endif %}
+            {% if constant('DEBUG_POCHE') == 1 %}<p><strong>{% trans "debug mode is on so cache is off." %} {% trans "your wallabag version:" %}{{constant('POCHE')}}. {% trans "storage:" %} {{constant('STORAGE')}}</strong></p>{% endif %}
         </footer>
\ No newline at end of file
index 577cc693ca348eb07398d01c89ca29662c3e67eb..f310e42089a62e0af6952a52082a2fc4006af629 100644 (file)
@@ -1,11 +1,12 @@
-        <link rel="shortcut icon" type="image/x-icon" href="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/img/favicon.ico" />
-        <link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/img/apple-touch-icon-144x144-precomposed.png">
-        <link rel="apple-touch-icon-precomposed" sizes="72x72" href="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/img/apple-touch-icon-72x72-precomposed.png">
-        <link rel="apple-touch-icon-precomposed" href="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/img/apple-touch-icon-precomposed.png">
-        <link rel="stylesheet" href="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/css/knacss.css" media="all">
-        <link rel="stylesheet" href="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/css/style.css" media="all">
+        <link rel="shortcut icon" type="image/x-icon" href="{{ poche_url }}/themes/default/img/favicon.ico" />
+        <link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ poche_url }}/themes/default/img/apple-touch-icon-144x144-precomposed.png">
+        <link rel="apple-touch-icon-precomposed" sizes="72x72" href="{{ poche_url }}/themes/default/img/apple-touch-icon-72x72-precomposed.png">
+        <link rel="apple-touch-icon-precomposed" href="{{ poche_url }}/themes/default/img/apple-touch-icon-precomposed.png">
+        <link rel="stylesheet" href="{{ poche_url }}/themes/default/css/knacss.css" media="all">
+        <link rel="stylesheet" href="{{ poche_url }}/themes/default/css/style.css" media="all">
         <link rel="stylesheet" href="{{ poche_url }}/themes/{{ theme }}/css/style-{{ theme }}.css" media="all" title="{{ theme }} theme">
-        <link rel="stylesheet" href="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/css/messages.css" media="all">
-        <link rel="stylesheet" href="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/css/print.css" media="print">
-        <script src="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/js/jquery-2.0.3.min.js"></script>
-        <script src="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/js/autoClose.js"></script>
\ No newline at end of file
+        <link rel="stylesheet" href="{{ poche_url }}/themes/default/css/messages.css" media="all">
+        <link rel="stylesheet" href="{{ poche_url }}/themes/default/css/print.css" media="print">
+        <script src="{{ poche_url }}/themes/default/js/jquery-2.0.3.min.js"></script>
+        <script src="{{ poche_url }}/themes/default/js/autoClose.js"></script>
+        <script src="{{ poche_url }}/themes/default/js/closeMessage.js"></script>
\ No newline at end of file
diff --git a/themes/default/js/closeMessage.js b/themes/default/js/closeMessage.js
new file mode 100644 (file)
index 0000000..b57fe4a
--- /dev/null
@@ -0,0 +1,17 @@
+$(function(){
+     //---------------------------------------------------------------------------
+     // Show the close icon when the user hover over a message 
+     //---------------------------------------------------------------------------
+     $('.messages').on('mouseenter', function(){
+          $(this).find('a.closeMessage').stop(true, true).show();
+     }).on('mouseleave', function(){
+          $(this).find('a.closeMessage').stop(true, true).hide();
+     });
+     //---------------------------------------------------------------------------
+     // Close the message box when the user clicks the close icon
+     //---------------------------------------------------------------------------
+     $('a.closeMessage').on('click', function(){
+          $(this).parents('div.messages').slideUp(300, function(){ $(this).remove(); });
+          return false;
+     });
+});
\ No newline at end of file