fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [11247] API: more on ajax menu


From: Sigurd Nes
Subject: [Fmsystem-commits] [11247] API: more on ajax menu
Date: Fri, 02 Aug 2013 11:42:15 +0000

Revision: 11247
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11247
Author:   sigurdne
Date:     2013-08-02 11:42:15 +0000 (Fri, 02 Aug 2013)
Log Message:
-----------
API: more on ajax menu

Modified Paths:
--------------
    trunk/phpgwapi/templates/portico/navbar.inc.php
    trunk/phpgwapi/templates/portico/navbar.tpl

Modified: trunk/phpgwapi/templates/portico/navbar.inc.php
===================================================================
--- trunk/phpgwapi/templates/portico/navbar.inc.php     2013-08-02 11:41:11 UTC 
(rev 11246)
+++ trunk/phpgwapi/templates/portico/navbar.inc.php     2013-08-02 11:42:15 UTC 
(rev 11247)
@@ -97,13 +97,11 @@
                phpgwapi_cache::session_set('phpgwapi','breadcrumbs', 
$breadcrumbs);
                $breadcrumbs = array_reverse($breadcrumbs);
                
-//             $var['breadcrumbs'] = implode(' >> ', $history_url);
-
                $navigation = array();
                if( 
!isset($GLOBALS['phpgw_info']['user']['preferences']['property']['nonavbar']) 
|| $GLOBALS['phpgw_info']['user']['preferences']['property']['nonavbar'] != 
'yes' )
                {
-                       prepare_navbar($navbar);
-                       $navigation = execMethod('phpgwapi.menu.get', 
'navigation');
+//moved..
+//                     prepare_navbar($navbar);
                }
                else
                {
@@ -115,6 +113,7 @@
 
                if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['sidecontent']) 
&& $GLOBALS['phpgw_info']['user']['preferences']['common']['sidecontent'] == 
'ajax_menu')
                {
+                       $exclude = array('logout', 'about', 'preferences');
                        $i = 1;
                        foreach ( $navbar as $app => $app_data )
                        {
@@ -130,7 +129,6 @@
                                                'id'    => $i,
                                                'app'   => $app,
                                                'label' => $app_data['text'],
-                                       //      'href'  => 
str_replace('&','&', $app_data['url']) . '&phpgw_return_as=noframes',
                                                'href'  => 
str_replace('&','&', $app_data['url']),
                                        ),
                                        'children'      => array()
@@ -141,7 +139,7 @@
                                        'id'            => $i,
                                        'name'          => $app,
                                        'expanded'      => false,
-                                       'highlight'     => true,//$app == 
$currentapp ? true : false,
+                                       'highlight'     => $app == $currentapp 
? true : false,
                                        'is_leaf'       => false
                                );
                                
@@ -163,6 +161,8 @@
                }
                else
                {               
+                       prepare_navbar($navbar);
+                       $navigation = execMethod('phpgwapi.menu.get', 
'navigation');
                        $treemenu = '';
                        foreach($navbar as $app => $app_data)
                        {

Modified: trunk/phpgwapi/templates/portico/navbar.tpl
===================================================================
--- trunk/phpgwapi/templates/portico/navbar.tpl 2013-08-02 11:41:11 UTC (rev 
11246)
+++ trunk/phpgwapi/templates/portico/navbar.tpl 2013-08-02 11:42:15 UTC (rev 
11247)
@@ -1,6 +1,20 @@
 <div id="debug-navbar">
 {debug}
 </div>
+       <script type="text/javascript">
+               function logout()
+               {
+                       if(typeof(Storage)!=="undefined")
+                       {
+                               sessionStorage.cached_menu_tree_data = '';
+                               sessionStorage.cached_mapping = '';
+                       }
+
+                       var sUrl = phpGWLink('logout.php');
+                       window.open(sUrl);
+               }
+       </script>
+
                <div id="theme-gray">
                        <div class="border-layout" id="border-layout">
                                <div class="layout-north">
@@ -25,7 +39,7 @@
                                                        <a 
href="{preferences_url}" class="icon icon-preferences">
                                                                
{preferences_text}
                                                        </a>
-                                                       <a href="{logout_url}" 
class="icon icon-logout">
+                                                       <a 
href="javascript:logout();" class="icon icon-logout">
                                                                {logout_text}
                                                        </a>
                                                </div>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]