fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [14915] add tabletools for documents


From: Sigurd Nes
Subject: [Fmsystem-commits] [14915] add tabletools for documents
Date: Tue, 12 Apr 2016 10:30:12 +0000

Revision: 14915
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14915
Author:   sigurdne
Date:     2016-04-12 10:30:11 +0000 (Tue, 12 Apr 2016)
Log Message:
-----------
add tabletools for documents

Modified Paths:
--------------
    trunk/rental/inc/class.uicontract.inc.php
    trunk/rental/inc/class.uiparty.inc.php

Modified: trunk/rental/inc/class.uicontract.inc.php
===================================================================
--- trunk/rental/inc/class.uicontract.inc.php   2016-04-11 12:47:32 UTC (rev 
14914)
+++ trunk/rental/inc/class.uicontract.inc.php   2016-04-12 10:30:11 UTC (rev 
14915)
@@ -658,6 +658,7 @@
 
                private function _get_tableDef_document( $mode, $contract_id, 
$permission = false )
                {
+                       $tabletools_documents = array();
                        $tabletools_documents[] = array
                                (
                                'my_name' => 'view',

Modified: trunk/rental/inc/class.uiparty.inc.php
===================================================================
--- trunk/rental/inc/class.uiparty.inc.php      2016-04-11 12:47:32 UTC (rev 
14914)
+++ trunk/rental/inc/class.uiparty.inc.php      2016-04-12 10:30:11 UTC (rev 
14915)
@@ -730,6 +730,36 @@
                                );
 
                                $tabs['documents'] = array('label' => 
lang('Documents'), 'link' => '#documents');
+                               $tabletools_documents = array();
+                               $tabletools_documents[] = array
+                               (
+                               'my_name' => 'view',
+                               'text' => lang('show'),
+                               'action' => self::link(array(
+                                       'menuaction' => 'rental.uidocument.view'
+                               )),
+                               'parameters' => json_encode(array('parameter' 
=> array(array('name' => 'id',
+                                                       'source' => 'id'))))
+                               );
+                               if ($mode == 'edit')
+                               {
+                                       $tabletools_documents[] = array
+                                               (
+                                               'my_name' => 'delete',
+                                               'text' => lang('remove'),
+                                               'type' => 'custom',
+                                               'custom_code' => "
+                                                       var oArgs = " . 
json_encode(array(
+                                                       'menuaction' => 
'rental.uidocument.delete',
+                                                       'phpgw_return_as' => 
'json'
+                                               )) . ";
+                                                       var parameters = " . 
json_encode(array('parameter' => array(array('name' => 'id',
+                                                                       
'source' => 'id')))) . ";
+                                                       removeDocument(oArgs, 
parameters);
+                                               "
+                                       );
+                               }
+
                                $datatable_def[] = array
                                        (
                                        'container' => 'datatable-container_1',
@@ -741,6 +771,7 @@
                                                array('key' => 'type', 'label' 
=> lang('type'), 'sortable' => true),
                                                array('key' => 'name', 'label' 
=> lang('name'), 'sortable' => true)
                                        ),
+                                       'tabletools' => $tabletools_documents,
                                        'config' => array(
                                                array('disableFilter' => true),
                                                array('disablePagination' => 
true)




reply via email to

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