]> git.mxchange.org Git - friendica.git/commitdiff
add js to hide nav-menus, when clicked outside
authortommy tomson <thomas.bierey@gmx.de>
Fri, 9 Mar 2012 17:15:27 +0000 (18:15 +0100)
committertommy tomson <thomas.bierey@gmx.de>
Fri, 9 Mar 2012 17:15:27 +0000 (18:15 +0100)
view/theme/diabook-blue/icons/starred.png
view/theme/diabook-blue/theme.php [new file with mode: 0755]
view/theme/diabook/icons/starred.png
view/theme/diabook/nav.tpl
view/theme/diabook/theme.php [new file with mode: 0755]

index 72a49c157c8ccf21376e953984ffc30c6fe78b06..2b82dfca319a3a370d8c7e1242b792fbbf963c86 100755 (executable)
Binary files a/view/theme/diabook-blue/icons/starred.png and b/view/theme/diabook-blue/icons/starred.png differ
diff --git a/view/theme/diabook-blue/theme.php b/view/theme/diabook-blue/theme.php
new file mode 100755 (executable)
index 0000000..0a20c9f
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+
+/*
+ * Name: Diabook
+ * Description: Diabook: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu
+ * Version: 
+ * Author: 
+ */
+
+$a->theme_info = array(
+  'extends' => 'diabook',
+);
+
+$a->page['htmlhead'] .= <<< EOT
+<script>
+//contacts
+$('html').click(function() {
+ $('#nav-contacts-linkmenu').removeClass('selected');
+ document.getElementById( "nav-contacts-menu" ).style.display = "none";
+ });
+ $('#nav-contacts-linkmenu').click(function(event){
+     event.stopPropagation();
+ });
+
+//messages
+$('html').click(function() {
+ $('#nav-messages-linkmenu').removeClass('selected');
+ document.getElementById( "nav-messages-menu" ).style.display = "none";
+ });
+
+ $('#nav-messages-linkmenu').click(function(event){
+     event.stopPropagation();
+ });
+
+//notifications
+$('html').click(function() {
+ $('#nav-notifications-linkmenu').removeClass('selected');
+ document.getElementById( "nav-notifications-menu" ).style.display = "none";
+ });
+
+ $('#nav-notifications-linkmenu').click(function(event){
+     event.stopPropagation();
+ });
+
+//usermenu
+$('html').click(function() {
+ $('#nav-user-linkmenu').removeClass('selected');
+ document.getElementById( "nav-user-menu" ).style.display = "none";
+ });
+
+ $('#nav-user-linkmenu').click(function(event){
+     event.stopPropagation();
+ });
+ //settingsmenu
+ $('html').click(function() {
+ $('#nav-site-linkmenu').removeClass('selected');
+ document.getElementById( "nav-site-menu" ).style.display = "none";
+ });
+
+ $('#nav-site-linkmenu').click(function(event){
+     event.stopPropagation();
+ });
+</script>
+EOT;
index 72a49c157c8ccf21376e953984ffc30c6fe78b06..2b82dfca319a3a370d8c7e1242b792fbbf963c86 100755 (executable)
Binary files a/view/theme/diabook/icons/starred.png and b/view/theme/diabook/icons/starred.png differ
index 289581c36a1b642f4f8c7bfb6ac9afe3e4104014..5776b6cf753609a46b9ce314676eb8fb0a3e4468 100644 (file)
@@ -26,6 +26,7 @@
                                        <li id="nav-contacts-all"><a href="contacts">$nav.contacts.1</a></li> 
                                </ul>
                        </li>   
+
                        {{ endif }}
                        
                        {{ if $nav.messages }}
 
 
 
+
 <ul id="nav-notifications-template" style="display:none;" rel="template">
        <li class="{4}"><a href="{0}"><img src="{1}">{2} <span class="notif-when">{3}</span></a></li>
 </ul>
diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php
new file mode 100755 (executable)
index 0000000..0a20c9f
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+
+/*
+ * Name: Diabook
+ * Description: Diabook: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu
+ * Version: 
+ * Author: 
+ */
+
+$a->theme_info = array(
+  'extends' => 'diabook',
+);
+
+$a->page['htmlhead'] .= <<< EOT
+<script>
+//contacts
+$('html').click(function() {
+ $('#nav-contacts-linkmenu').removeClass('selected');
+ document.getElementById( "nav-contacts-menu" ).style.display = "none";
+ });
+ $('#nav-contacts-linkmenu').click(function(event){
+     event.stopPropagation();
+ });
+
+//messages
+$('html').click(function() {
+ $('#nav-messages-linkmenu').removeClass('selected');
+ document.getElementById( "nav-messages-menu" ).style.display = "none";
+ });
+
+ $('#nav-messages-linkmenu').click(function(event){
+     event.stopPropagation();
+ });
+
+//notifications
+$('html').click(function() {
+ $('#nav-notifications-linkmenu').removeClass('selected');
+ document.getElementById( "nav-notifications-menu" ).style.display = "none";
+ });
+
+ $('#nav-notifications-linkmenu').click(function(event){
+     event.stopPropagation();
+ });
+
+//usermenu
+$('html').click(function() {
+ $('#nav-user-linkmenu').removeClass('selected');
+ document.getElementById( "nav-user-menu" ).style.display = "none";
+ });
+
+ $('#nav-user-linkmenu').click(function(event){
+     event.stopPropagation();
+ });
+ //settingsmenu
+ $('html').click(function() {
+ $('#nav-site-linkmenu').removeClass('selected');
+ document.getElementById( "nav-site-menu" ).style.display = "none";
+ });
+
+ $('#nav-site-linkmenu').click(function(event){
+     event.stopPropagation();
+ });
+</script>
+EOT;