fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [14850] excel button, allrows on inline tables


From: Sigurd Nes
Subject: [Fmsystem-commits] [14850] excel button, allrows on inline tables
Date: Fri, 18 Mar 2016 07:55:47 +0000

Revision: 14850
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14850
Author:   sigurdne
Date:     2016-03-18 07:55:05 +0000 (Fri, 18 Mar 2016)
Log Message:
-----------
excel button, allrows on inline tables

Modified Paths:
--------------
    trunk/phpgwapi/js/jquery/common.js
    trunk/phpgwapi/templates/base/datatable_inline.xsl
    trunk/rental/inc/class.uicontract.inc.php
    trunk/rental/inc/class.uifrontpage.inc.php

Modified: trunk/phpgwapi/js/jquery/common.js
===================================================================
--- trunk/phpgwapi/js/jquery/common.js  2016-03-17 14:14:58 UTC (rev 14849)
+++ trunk/phpgwapi/js/jquery/common.js  2016-03-18 07:55:05 UTC (rev 14850)
@@ -294,7 +294,7 @@
        }
        catch (err)
        {
-               lengthMenu = [10, 25, 50, 100];
+               lengthMenu = [[10, 25, 50, 100],[10, 25, 50, 100]];
        }
 
        if (allrows == true)
@@ -305,15 +305,17 @@
                {
                        lengthmenu_allrows = 
JqueryPortico.i18n.lengthmenu_allrows();
 
-                       if (lengthMenu.length == 2)
-                       {
-                               lengthMenu[0].push(lengthmenu_allrows[0]);
-                               lengthMenu[1].push(lengthmenu_allrows[1]);
-                       }
                }
                catch (err)
                {
+                       lengthmenu_allrows = [-1, 'All'];
                }
+
+               if (lengthMenu.length == 2)
+               {
+                       lengthMenu[0].push(lengthmenu_allrows[0]);
+                       lengthMenu[1].push(lengthmenu_allrows[1]);
+               }
        }
 
        var language = null;

Modified: trunk/phpgwapi/templates/base/datatable_inline.xsl
===================================================================
--- trunk/phpgwapi/templates/base/datatable_inline.xsl  2016-03-17 14:14:58 UTC 
(rev 14849)
+++ trunk/phpgwapi/templates/base/datatable_inline.xsl  2016-03-18 07:55:05 UTC 
(rev 14850)
@@ -95,8 +95,12 @@
                                                                                
                                var selectedRows = api.rows( { selected: true } 
).count();
                                                                                
                                api.buttons( '.record' ).enable( selectedRows > 
0 );
                                                                                
                        }
-                                                                               
                }<xsl:value-of select="phpgw:conditional(not(position() = 
last()), ',', '')"/>                                                            
                              
+                                                                               
                }<xsl:value-of select="phpgw:conditional(not(position() = 
last()), ',', '')"/>
                                                                                
        </xsl:when>
+                                                                               
        <xsl:when test="my_name = 'excelHtml5'">
+                                                                               
                'excelHtml5'
+                                                                               
                <xsl:value-of select="phpgw:conditional(not(position() = 
last()), ',', '')"/>
+                                                                               
        </xsl:when>
                                                                                
        <xsl:when test="my_name = 'select_none'">
                                                                                
                {
                                                                                
                        text: "<xsl:value-of select="php:function('lang', 
'select none')"/>",

Modified: trunk/rental/inc/class.uicontract.inc.php
===================================================================
--- trunk/rental/inc/class.uicontract.inc.php   2016-03-17 14:14:58 UTC (rev 
14849)
+++ trunk/rental/inc/class.uicontract.inc.php   2016-03-18 07:55:05 UTC (rev 
14850)
@@ -773,22 +773,18 @@
 
                public function query()
                {
-                       if 
($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] > 0)
-                       {
-                               $user_rows_per_page = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
-                       }
-                       else
-                       {
-                               $user_rows_per_page = 10;
-                       }
+                       $length = phpgw::get_var('length', 'int');
 
+                       $user_rows_per_page = $length > 0 ? $length : 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
+
                        $search = phpgw::get_var('search');
                        $order = phpgw::get_var('order');
                        $draw = phpgw::get_var('draw', 'int');
                        $columns = phpgw::get_var('columns');
 
                        $start_index = phpgw::get_var('start', 'int', 
'REQUEST', 0);
-                       $num_of_objects = (phpgw::get_var('length', 'int') <= 
0) ? $user_rows_per_page : phpgw::get_var('length', 'int');
+                       $num_of_objects = $length == -1 ? null : 
$user_rows_per_page;
+
                        $sort_field = ($columns[$order[0]['column']]['data']) ? 
$columns[$order[0]['column']]['data'] : 'old_contract_id';
                        $sort_ascending = ($order[0]['dir'] == 'desc') ? false 
: true;
                        // Form variables

Modified: trunk/rental/inc/class.uifrontpage.inc.php
===================================================================
--- trunk/rental/inc/class.uifrontpage.inc.php  2016-03-17 14:14:58 UTC (rev 
14849)
+++ trunk/rental/inc/class.uifrontpage.inc.php  2016-03-18 07:55:05 UTC (rev 
14850)
@@ -38,6 +38,11 @@
 
                        $tabletools[] = array
                                (
+                               'my_name' => 'excelHtml5',
+                       );
+
+                       $tabletools[] = array
+                               (
                                'my_name' => 'edit',
                                'text' => lang('edit'),
                                'action' => self::link(array(
@@ -87,7 +92,9 @@
                                'ColumnDefs' => $columns_def,
                                'tabletools' => $tabletools,
                                'config' => array(
-                                       array('disableFilter' => true)
+                                       array('disableFilter' => true),
+//                                     array('allrows' => true),
+
                                )
                        );
 
@@ -116,6 +123,11 @@
 
                        $tabletools[] = array
                                (
+                               'my_name' => 'excelHtml5',
+                       );
+
+                       $tabletools[] = array
+                               (
                                'my_name' => 'edit',
                                'text' => lang('edit'),
                                'action' => self::link(array(
@@ -153,7 +165,8 @@
                                'ColumnDefs' => $columns_def,
                                'tabletools' => $tabletools,
                                'config' => array(
-                                       array('disableFilter' => true)
+                                       array('disableFilter' => true),
+                                       array('allrows' => true),
                                )
                        );
 
@@ -181,6 +194,11 @@
 
                        $tabletools[] = array
                                (
+                               'my_name' => 'excelHtml5',
+                       );
+
+                       $tabletools[] = array
+                               (
                                'my_name' => 'edit',
                                'text' => lang('edit'),
                                'action' => self::link(array(
@@ -207,7 +225,8 @@
                                'ColumnDefs' => $columns_def,
                                'tabletools' => $tabletools,
                                'config' => array(
-                                       array('disableFilter' => true)
+                                       array('disableFilter' => true),
+                                       array('allrows' => true),
                                )
                        );
 
@@ -235,6 +254,11 @@
 
                        $tabletools[] = array
                                (
+                               'my_name' => 'excelHtml5',
+                       );
+
+                       $tabletools[] = array
+                               (
                                'my_name' => 'edit',
                                'text' => lang('edit'),
                                'action' => self::link(array(
@@ -261,7 +285,8 @@
                                'ColumnDefs' => $columns_def,
                                'tabletools' => $tabletools,
                                'config' => array(
-                                       array('disableFilter' => true)
+                                       array('disableFilter' => true),
+                                       array('allrows' => true),
                                )
                        );
 
@@ -285,6 +310,11 @@
 
                        $tabletools[] = array
                                (
+                               'my_name' => 'excelHtml5',
+                       );
+
+                       $tabletools[] = array
+                               (
                                'my_name' => 'edit',
                                'text' => lang('edit'),
                                'action' => self::link(array(
@@ -311,7 +341,8 @@
                                'ColumnDefs' => $columns_def,
                                'tabletools' => $tabletools,
                                'config' => array(
-                                       array('disableFilter' => true)
+                                       array('disableFilter' => true),
+                                       array('allrows' => true),
                                )
                        );
 
@@ -343,6 +374,11 @@
 
                        $tabletools[] = array
                                (
+                               'my_name' => 'excelHtml5',
+                       );
+
+                       $tabletools[] = array
+                               (
                                'my_name' => 'edit',
                                'text' => lang('edit_contract'),
                                'action' => self::link(array(
@@ -394,7 +430,8 @@
                                'ColumnDefs' => $columns_def,
                                'tabletools' => $tabletools,
                                'config' => array(
-                                       array('disableFilter' => true)
+                                       array('disableFilter' => true),
+                                       array('allrows' => true),
                                )
                        );
 




reply via email to

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