fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [17134] api/preferences: configurable csv download bu


From: sigurdne
Subject: [Fmsystem-commits] [17134] api/preferences: configurable csv download button for tables
Date: Wed, 4 Oct 2017 05:07:12 -0400 (EDT)

Revision: 17134
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17134
Author:   sigurdne
Date:     2017-10-04 05:07:11 -0400 (Wed, 04 Oct 2017)
Log Message:
-----------
api/preferences: configurable csv download button for tables

Modified Paths:
--------------
    trunk/phpgwapi/inc/class.uicommon_jquery.inc.php
    trunk/phpgwapi/templates/base/datatable_jquery.xsl
    trunk/preferences/inc/hook_settings.inc.php
    trunk/preferences/setup/phpgw_no.lang

Modified: trunk/phpgwapi/inc/class.uicommon_jquery.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.uicommon_jquery.inc.php    2017-10-03 18:12:06 UTC 
(rev 17133)
+++ trunk/phpgwapi/inc/class.uicommon_jquery.inc.php    2017-10-04 09:07:11 UTC 
(rev 17134)
@@ -380,7 +380,13 @@
                                        )),
                                ),
                                'lengthmenu' => array('_' => 
json_encode($lengthmenu)),
-                               'lengthmenu_allrows' => array('_' => 
json_encode(array(-1, lang('all'))))
+                               'lengthmenu_allrows' => array('_' => 
json_encode(array(-1, lang('all')))),
+                               'csv_download' => array('_' => 
json_encode(array(
+                                               'show_button' => 
!!$GLOBALS['phpgw_info']['user']['preferences']['common']['csv_download'],
+                                               'title'                 => 
lang('download visible data')
+                                               )
+                                       ))
+
                        );
 //                     _debug_array($data['jquery_phpgw_i18n']);die();
                }

Modified: trunk/phpgwapi/templates/base/datatable_jquery.xsl
===================================================================
--- trunk/phpgwapi/templates/base/datatable_jquery.xsl  2017-10-03 18:12:06 UTC 
(rev 17133)
+++ trunk/phpgwapi/templates/base/datatable_jquery.xsl  2017-10-04 09:07:11 UTC 
(rev 17134)
@@ -674,13 +674,16 @@
                                                });
                                        </xsl:when>
                                </xsl:choose>
- /*              button_def.push({
-                                       extend:    'csvHtml5',
-                                       titleAttr: "<xsl:value-of 
select="php:function('lang', 'download visible data')"/>",
-                                       fieldSeparator: ';',
-                                       bom:true
-                               });
-*/
+                               var csv_download = 
JqueryPortico.i18n.csv_download();
+                               if(csv_download.show_button == 1)
+                               {
+                                       button_def.push({
+                                         extend:    'csvHtml5',
+                                         titleAttr: csv_download.title,
+                                         fieldSeparator: ';',
+                                         bom:true
+                                 });
+                               }
                                <xsl:choose>
                                        <xsl:when test="download">
                                                button_def.push({

Modified: trunk/preferences/inc/hook_settings.inc.php
===================================================================
--- trunk/preferences/inc/hook_settings.inc.php 2017-10-03 18:12:06 UTC (rev 
17133)
+++ trunk/preferences/inc/hook_settings.inc.php 2017-10-04 09:07:11 UTC (rev 
17134)
@@ -158,6 +158,9 @@
        create_select_box('Rich text (WYSIWYG) editor', 'rteditor', $rteditors,
                'Which editor would you like to use for editing html and other 
rich content?');
 
+       create_check_box('CSV download button','csv_download',
+               'Do you want av CSV download button for main tables?');
+
        create_check_box('Show helpmessages by default','show_help',
                'Should this help messages shown up always, when you enter the 
preferences or only on request.');
 

Modified: trunk/preferences/setup/phpgw_no.lang
===================================================================
--- trunk/preferences/setup/phpgw_no.lang       2017-10-03 18:12:06 UTC (rev 
17133)
+++ trunk/preferences/setup/phpgw_no.lang       2017-10-04 09:07:11 UTC (rev 
17134)
@@ -185,4 +185,6 @@
 as in "." or ","       preferences     no      Velg "." eller ","
 number of planned controls on home page        preferences     no      Antall 
planlagte kontroller på hjemmeskjerm
 number of assigned controls on home page       preferences     no      Antall 
tildelte kontroller på hjemmeskjerm
-filter tickets on assigned to me       preferences     no      Filtrer 
meldinger på tildelt til meg.
\ No newline at end of file
+filter tickets on assigned to me       preferences     no      Filtrer 
meldinger på tildelt til meg.
+Do you want av CSV download button for main tables?    preferences     no      
Ønsker du en CSV nedlastingsknapp for hovedtabeller?
+CSV download button    preferences     no      CSV nedlastingsknapp
\ No newline at end of file




reply via email to

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