fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [6958] Api: icons at tree


From: Sigurd Nes
Subject: [Fmsystem-commits] [6958] Api: icons at tree
Date: Wed, 09 Feb 2011 17:42:35 +0000

Revision: 6958
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6958
Author:   sigurdne
Date:     2011-02-09 17:42:35 +0000 (Wed, 09 Feb 2011)
Log Message:
-----------
Api: icons at tree

Modified Paths:
--------------
    trunk/phpgwapi/inc/class.custom_fields.inc.php
    trunk/phpgwapi/templates/portico/js/base.js
    trunk/phpgwapi/templates/portico/navbar.inc.php

Modified: trunk/phpgwapi/inc/class.custom_fields.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.custom_fields.inc.php      2011-02-09 14:00:59 UTC 
(rev 6957)
+++ trunk/phpgwapi/inc/class.custom_fields.inc.php      2011-02-09 17:42:35 UTC 
(rev 6958)
@@ -76,6 +76,8 @@
                */
                protected $_total_records = 0;
 
+               protected $global_lock = false;
+
                /**
                 * Constructor
                 *
@@ -318,7 +320,14 @@
 
                        unset($attrib);
 
-                       $this->_db->transaction_begin();
+                       if ( $this->_db->Transaction )
+                       {
+                               $this->global_lock = true;
+                       }
+                       else
+                       {
+                               $this->_db->transaction_begin();
+                       }
 
                        $sql = "SELECT id FROM phpgw_cust_attribute"
                                . " WHERE location_id = 
{$values['location_id']}"
@@ -385,9 +394,12 @@
 
                        $this->_oProc->AddColumn($attrib_table, 
$values['column_name'], $col_info);
 
-                       if ( $this->_db->transaction_commit() )
+                       if ( !$this->global_lock )
                        {
-                               return $values['id'];
+                               if ( $this->_db->transaction_commit() )
+                               {
+                                       return $values['id'];
+                               }
                        }
 
                        return 0;

Modified: trunk/phpgwapi/templates/portico/js/base.js
===================================================================
--- trunk/phpgwapi/templates/portico/js/base.js 2011-02-09 14:00:59 UTC (rev 
6957)
+++ trunk/phpgwapi/templates/portico/js/base.js 2011-02-09 17:42:35 UTC (rev 
6958)
@@ -180,8 +180,7 @@
                        minHeight: 400,
             units: [
                                { position: 'top', body: layout['north'], 
height: 26 },
-       //                      { position: 'left', header: this.getHeader( 
layout['west'] ), body: layout['west'], width: this.config.unitLeftWidth, 
resize: true, scroll: true, gutter: "5px", collapse: false, maxWidth: 300, 
minWidth: 6 },
-                               { position: 'left', header: this.getHeader( 
layout['west'] ), body: layout['west'], width: this.config.unitLeftWidth, 
resize: true, scroll: true, gutter: "5px", collapse: false , maxWidth: 300, 
minWidth: 6 },
+                               { position: 'left', header: this.getHeader( 
layout['west'] ), body: layout['west'], width: this.config.unitLeftWidth, 
resize: true, scroll: true, gutter: "5px", collapse: false,  maxWidth: 300, 
minWidth: 6 },
                 { position: 'center', header: this.getHeader( layout['center'] 
), body: layout['center'], scroll: true, gutter: "5px 0px" },
        // Uncomment for make use of east-layout
     //           { position: 'right', header: this.getHeader( layout['east']  
), body: layout['east'], width: this.config.unitRightWidth, resize: true, 
scroll: true, gutter: "5px", collapse: false, maxWidth: 300, minWidth: 6 },

Modified: trunk/phpgwapi/templates/portico/navbar.inc.php
===================================================================
--- trunk/phpgwapi/templates/portico/navbar.inc.php     2011-02-09 14:00:59 UTC 
(rev 6957)
+++ trunk/phpgwapi/templates/portico/navbar.inc.php     2011-02-09 17:42:35 UTC 
(rev 6958)
@@ -178,7 +178,12 @@
                {
                        
if(!isset($images[$item['image'][0]][$item['image'][1]]))
                        {
-                               $icon_style = ' style="background-image: url(' 
. $GLOBALS['phpgw']->common->image($item['image'][0], $item['image'][1]) . ')"';
+                               $icon = 
$GLOBALS['phpgw']->common->image($item['image'][0], $item['image'][1]);
+                               if(!$icon)
+                               {
+                                       $icon = 
$GLOBALS['phpgw']->common->image('phpgwapi', 'folder');
+                               }
+                               $icon_style = ' style="background-image: url(' 
. $icon . ')"';
                                $images[$item['image'][0]][$item['image'][1]] = 
$icon_style;
                        }
                        else
@@ -186,6 +191,12 @@
                                $icon_style = 
$images[$item['image'][0]][$item['image'][1]];
                        }
                }
+               else
+               {
+                       $icon = $GLOBALS['phpgw']->common->image('phpgwapi', 
'folder');
+                       $icon_style = ' style="background-image: url(' . $icon 
. ')"';
+                       $images[$item['image'][0]][$item['image'][1]] = 
$icon_style;
+               }
                if ( $children )
                {
                        $expand_class = item_expanded($id) ? ' 
class="expanded"' : ' class="collapsed"';




reply via email to

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