fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [12493] some js-fixes


From: Sigurd Nes
Subject: [Fmsystem-commits] [12493] some js-fixes
Date: Tue, 23 Dec 2014 11:33:41 +0000

Revision: 12493
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=12493
Author:   sigurdne
Date:     2014-12-23 11:33:40 +0000 (Tue, 23 Dec 2014)
Log Message:
-----------
some js-fixes

Modified Paths:
--------------
    branches/dev-syncromind/phpgwapi/inc/class.jquery.inc.php
    branches/dev-syncromind/phpgwapi/inc/class.uicommon_jquery.inc.php
    branches/dev-syncromind/phpgwapi/js/jquery/common.js

Modified: branches/dev-syncromind/phpgwapi/inc/class.jquery.inc.php
===================================================================
--- branches/dev-syncromind/phpgwapi/inc/class.jquery.inc.php   2014-12-22 
22:32:23 UTC (rev 12492)
+++ branches/dev-syncromind/phpgwapi/inc/class.jquery.inc.php   2014-12-23 
11:33:40 UTC (rev 12493)
@@ -244,7 +244,7 @@
 
                                });
 
-                               $('#tab-content').responsiveTabs('activate', 
{$selected});
+                               $('#{$tab_set}').responsiveTabs('activate', 
{$selected});
 
                        };
 JS;

Modified: branches/dev-syncromind/phpgwapi/inc/class.uicommon_jquery.inc.php
===================================================================
--- branches/dev-syncromind/phpgwapi/inc/class.uicommon_jquery.inc.php  
2014-12-22 22:32:23 UTC (rev 12492)
+++ branches/dev-syncromind/phpgwapi/inc/class.uicommon_jquery.inc.php  
2014-12-23 11:33:40 UTC (rev 12493)
@@ -31,6 +31,7 @@
 
        //phpgw::import_class('phpgwapi.yui');
 
+       phpgw::import_class('phpgwapi.jquery');
 
        abstract class phpgwapi_uicommon_jquery
        {
@@ -96,6 +97,8 @@
                        self::add_javascript('phpgwapi', 'DataTables', 
'extensions/Responsive/js/dataTables.responsive.js');
                        self::add_javascript('phpgwapi', 'DataTables', 
'extensions/ColVis/js/dataTables.colVis.min.js');
                        self::add_javascript('phpgwapi', 'DataTables', 
'extensions/TableTools/js/dataTables.tableTools.js');
+                       self::add_javascript('phpgwapi', 'jquery', 
'editable/jquery.jeditable.js');
+                       self::add_javascript('phpgwapi', 'jquery', 
'editable/jquery.dataTables.editable.js');
 
 
                        
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/DataTables/media/css/jquery.dataTables.css');
@@ -429,7 +432,8 @@
                }
 
                // Add link key to a result array
-               public function _add_links(&$value, $key, $link_data)
+               // Add link key to a result array
+               public function _add_links(&$value, $key, $data)
                {
                        $unset = 0;
                        // FIXME: Fugly workaround
@@ -440,11 +444,20 @@
                                
$GLOBALS['phpgw_info']['server']['webserver_url'] = "/";
                                $unset = 1;
                        }
-                       
-                       $link_data['id'] = $value['id'];
 
-                       $value['link'] = self::link($link_data);
+                       if(is_array($data))
+                       {
+                               $link_array = $data;
+                               $link_array['id'] = $value['id'];
 
+                       }
+                       else
+                       {
+                               $link_array = array('menuaction' => $data, 'id' 
=> $value['id']);
+                       }
+
+                       $value['link'] = self::link($link_array);
+
                        // FIXME: Fugly workaround
                        // I kid you not my friend. There is something very 
wonky going on
                        // in phpgroupware which I cannot figure out.
@@ -493,7 +506,7 @@
 
                        $result['recordsTotal']         = 
$result['total_records'];
                        $result['recordsFiltered']      = 
$result['recordsTotal'];
-                       $result['data']                         = 
$result['results'];
+                       $result['data']                         = 
(array)$result['results'];
                        unset($result['results']);
                        unset($result['total_records']);
 

Modified: branches/dev-syncromind/phpgwapi/js/jquery/common.js
===================================================================
--- branches/dev-syncromind/phpgwapi/js/jquery/common.js        2014-12-22 
22:32:23 UTC (rev 12492)
+++ branches/dev-syncromind/phpgwapi/js/jquery/common.js        2014-12-23 
11:33:40 UTC (rev 12493)
@@ -41,8 +41,21 @@
        {
                return '';
        }
-       var name = 'Link';
-       var link = oData[key];
+       var data = oData[key];
+
+       if ( typeof(data) == 'object')
+       {
+               var link = data['href'];
+               var name = data['label'];
+
+       }
+       else
+       {
+               var name = 'Link';
+               var link = data;
+
+       }
+
        return '<a href="' + link + '">' + name + '</a>';
 };
 




reply via email to

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