fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [14701] more on buttons


From: Sigurd Nes
Subject: [Fmsystem-commits] [14701] more on buttons
Date: Fri, 05 Feb 2016 14:56:50 +0000

Revision: 14701
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14701
Author:   sigurdne
Date:     2016-02-05 14:56:50 +0000 (Fri, 05 Feb 2016)
Log Message:
-----------
more on buttons

Modified Paths:
--------------
    branches/dev-syncromind/phpgwapi/js/jquery/common.js
    branches/dev-syncromind/phpgwapi/templates/base/datatable_inline.xsl
    branches/dev-syncromind/phpgwapi/templates/base/datatable_jquery.xsl
    branches/dev-syncromind/property/inc/class.uiadmin_entity.inc.php
    branches/dev-syncromind/property/inc/class.uiinvoice.inc.php
    branches/dev-syncromind/property/js/portico/invoice.index.js
    branches/dev-syncromind/property/templates/base/invoice_list_sub.xsl

Modified: branches/dev-syncromind/phpgwapi/js/jquery/common.js
===================================================================
--- branches/dev-syncromind/phpgwapi/js/jquery/common.js        2016-02-05 
11:52:58 UTC (rev 14700)
+++ branches/dev-syncromind/phpgwapi/js/jquery/common.js        2016-02-05 
14:56:50 UTC (rev 14701)
@@ -217,6 +217,7 @@
        var disableFilter = options['disableFilter'] || false;
        var buttons_def = options['TableTools'] || false;
        var select = false;
+       var singleSelect = options['singleSelect'] || false;
        var order = options['order'] || [0, 'desc'];
        var responsive = options['responsive'] || false;
 
@@ -247,8 +248,14 @@
                var sDom_def = 'B<"clear">lfrtip';
 //             var sDom_def = 'Bfrtlip';
                var sDom_def = '<lfB<t>ip>'
-               select = true;
-               select = {style:'multi'};
+               if(singleSelect == true)
+               {
+                       select = true;
+               }
+               else
+               {
+                       select = {style:'multi'};
+               }
        }
        else
        {
@@ -324,7 +331,7 @@
                        var row = $(this);
                        var checkbox = row.find('input[type="checkbox"]');
 
-                       if(checkbox)
+                       if(checkbox && checkbox.hasClass('mychecks'))
                        {
                                if($(this).hasClass('selected'))
                                {

Modified: branches/dev-syncromind/phpgwapi/templates/base/datatable_inline.xsl
===================================================================
--- branches/dev-syncromind/phpgwapi/templates/base/datatable_inline.xsl        
2016-02-05 11:52:58 UTC (rev 14700)
+++ branches/dev-syncromind/phpgwapi/templates/base/datatable_inline.xsl        
2016-02-05 14:56:50 UTC (rev 14701)
@@ -144,8 +144,15 @@
                                                                                
        <xsl:when test="type = 'custom'">
                                                                                
                {
                                                                                
                        text: "<xsl:value-of select="text"/>",
-                                                                               
                        enabled: false,
-                                                                               
                        className: 'record',
+                                                                               
                        <xsl:choose>
+                                                                               
                                <xsl:when test="className">
+                                                                               
                                        className: "<xsl:value-of 
select="className"/>",
+                                                                               
                                </xsl:when>
+                                                                               
                                <xsl:otherwise>
+                                                                               
                                        enabled: false,
+                                                                               
                                        className: 'record',
+                                                                               
                                </xsl:otherwise>
+                                                                               
                        </xsl:choose>
                                                                                
                        action: function (e, dt, node, config) {
                                                                                
                                <xsl:if test="confirm_msg">
                                                                                
                                        var confirm_msg = "<xsl:value-of 
select="confirm_msg"/>";
@@ -162,8 +169,15 @@
                                                                                
        <xsl:otherwise>
                                                                                
                {
                                                                                
                        text: "<xsl:value-of select="text"/>",
-                                                                               
                        className: 'record',
-                                                                               
                        enabled: false,
+                                                                               
                        <xsl:choose>
+                                                                               
                                <xsl:when test="className">
+                                                                               
                                        className: "<xsl:value-of 
select="className"/>",
+                                                                               
                                </xsl:when>
+                                                                               
                                <xsl:otherwise>
+                                                                               
                                        enabled: false,
+                                                                               
                                        className: 'record',
+                                                                               
                                </xsl:otherwise>
+                                                                               
                        </xsl:choose>
                                                                                
                        action: function (e, dt, node, config) {
                                                                                
                                                        var receiptmsg = [];
                                                                                
                                                        var selected = 
JqueryPortico.fnGetSelected(oTable<xsl:number value="($num - 1)"/>);
@@ -315,6 +329,9 @@
 
                var options<xsl:number value="($num - 1)"/> = {};
                <xsl:for-each select="$config">
+                       <xsl:if test="singleSelect">
+                               options<xsl:number value="($num - 
1)"/>.singleSelect = true;
+                       </xsl:if>
                        <xsl:if test="disableFilter">
                                options<xsl:number value="($num - 
1)"/>.disableFilter = true;
                        </xsl:if>
@@ -325,7 +342,7 @@
                                options<xsl:number value="($num - 1)"/>.order = 
<xsl:value-of select="order" />;
                        </xsl:if>
                        <xsl:if test="responsive">
-                               options<xsl:number value="($num - 
1)"/>.responsive = <xsl:value-of select="responsive" />;
+                               options<xsl:number value="($num - 
1)"/>.responsive = true;
                        </xsl:if>
                </xsl:for-each>
                if (JqueryPortico.buttons<xsl:number value="($num - 1)"/>)

Modified: branches/dev-syncromind/phpgwapi/templates/base/datatable_jquery.xsl
===================================================================
--- branches/dev-syncromind/phpgwapi/templates/base/datatable_jquery.xsl        
2016-02-05 11:52:58 UTC (rev 14700)
+++ branches/dev-syncromind/phpgwapi/templates/base/datatable_jquery.xsl        
2016-02-05 14:56:50 UTC (rev 14701)
@@ -569,6 +569,7 @@
                var editor_cols = [];
                var editor_action = '<xsl:value-of select="editor_action"/>';
                var disablePagination = '<xsl:value-of 
select="disablePagination"/>';
+               var select_all = '<xsl:value-of select="select_all"/>';
 
                <xsl:choose>
                        <xsl:when test="//datatable/actions">
@@ -679,8 +680,15 @@
                                                                <xsl:when 
test="type = 'custom'">
                                                                        ,{
                                                                        text: 
"<xsl:value-of select="text"/>",
-                                                                       
enabled: false,
-                                                                       
className: 'record',
+                                                                       
<xsl:choose>
+                                                                               
<xsl:when test="className">
+                                                                               
        className: "<xsl:value-of select="className"/>",
+                                                                               
</xsl:when>
+                                                                               
<xsl:otherwise>
+                                                                               
        enabled: false,
+                                                                               
        className: 'record',
+                                                                               
</xsl:otherwise>
+                                                                       
</xsl:choose>
                                                                        action: 
function (e, dt, node, config) {
                                                                        <xsl:if 
test="confirm_msg">
                                                                                
var confirm_msg = "<xsl:value-of select="confirm_msg"/>";
@@ -698,8 +706,15 @@
                                                                <xsl:otherwise>
                                                                        ,{
                                                                        text: 
"<xsl:value-of select="text"/>",
-                                                                       
enabled: false,
-                                                                       
className: 'record',
+                                                                       
<xsl:choose>
+                                                                               
<xsl:when test="className">
+                                                                               
        className: "<xsl:value-of select="className"/>",
+                                                                               
</xsl:when>
+                                                                               
<xsl:otherwise>
+                                                                               
        enabled: false,
+                                                                               
        className: 'record',
+                                                                               
</xsl:otherwise>
+                                                                       
</xsl:choose>
                                                                        action: 
function (e, dt, node, config) {
                                                                        var 
receiptmsg = [];
                                                                        var 
selected = fnGetSelected();
@@ -856,7 +871,7 @@
                                                processing: true,
                                                serverSide: true,
                                                responsive: true,
-                                               select: { style: 'multi' },
+                                               select: select_all ? { style: 
'multi' } : true,
                                                deferRender: true,
                                                ajax: {
                                                        url: ajax_url,
@@ -936,7 +951,8 @@
                                                        var row = $(this);
                                                        var checkbox = 
row.find('input[type="checkbox"]');
 
-                                                       if(checkbox)
+                                                       if(checkbox && 
checkbox.hasClass('mychecks'))
+//                                                     if(select_all && 
checkbox)
                                                        {
                                                                
if($(this).hasClass('selected'))
                                                                {

Modified: branches/dev-syncromind/property/inc/class.uiadmin_entity.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uiadmin_entity.inc.php   
2016-02-05 11:52:58 UTC (rev 14700)
+++ branches/dev-syncromind/property/inc/class.uiadmin_entity.inc.php   
2016-02-05 14:56:50 UTC (rev 14701)
@@ -977,8 +977,6 @@
                        $data = array
                                (
                                'datatable_def' => $datatable_def,
-                               'td_count' => 3,
-                               'base_java_url' => 
"{menuaction:'property.uiadmin_entity.get_template_attributes',type:'{$this->type}'}",
                                'lang_entity' => lang('entity'),
                                'entity_name' => $id ? $entity['name'] . ' :: ' 
. implode(' >> ', $this->bo->get_path($entity_id, $id)) : $entity['name'],
                                'msgbox_data' => 
$GLOBALS['phpgw']->common->msgbox($msgbox_data),
@@ -1031,8 +1029,7 @@
                                'category_list' => $category_list,
                                'parent_list' => $parent_list,
                                'tabs' => 
phpgwapi_jquery::tabview_generate($tabs, $active_tab),
-                               'validator' => 
phpgwapi_jquery::formvalidator_generate(array('location',
-                                       'date', 'security', 'file'))
+                               'validator' => 
phpgwapi_jquery::formvalidator_generate()
                        );
 
                        $appname = lang('entity');
@@ -1042,19 +1039,10 @@
                        phpgwapi_jquery::load_widget('core');
                        phpgwapi_jquery::load_widget('numberformat');
 
-//                     $GLOBALS['phpgw']->xslttpl->set_var('phpgw', 
array('edit_custom_function' => $data));
+                       $GLOBALS['phpgw']->js->validate_file('portico', 
'admin_entity.edit_category', 'property');
 
                        self::render_template_xsl(array('admin_entity', 
'datatable_inline', 'nextmatchs'), array(
                                'edit' => $data));
-
-//                     $GLOBALS['phpgw']->xslttpl->set_var('phpgw', 
array('edit' => $data));
-                       //---datatable settings--------------------
-//
-//                     $GLOBALS['phpgw']->css->validate_file('datatable');
-//                     $GLOBALS['phpgw']->css->validate_file('property');
-//                     
$GLOBALS['phpgw']->css->add_external_file('property/templates/base/css/property.css');
-//
-//                     $GLOBALS['phpgw']->js->validate_file('portico', 
'admin_entity.edit_category', 'property');
                }
 
                function get_template_attributes()

Modified: branches/dev-syncromind/property/inc/class.uiinvoice.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uiinvoice.inc.php        
2016-02-05 11:52:58 UTC (rev 14700)
+++ branches/dev-syncromind/property/inc/class.uiinvoice.inc.php        
2016-02-05 14:56:50 UTC (rev 14701)
@@ -764,14 +764,26 @@
                                        'target' => '_blank',
                                        'parameters' => json_encode($parameters)
                                );
-                               /*
+                               $data['datatable']['actions'][] = array
+                                       (
+                                       'my_name' => 'list_sub',
+                                       'text' => lang('details'),
+                                       'action' => 
$GLOBALS['phpgw']->link('/index.php', array
+                                               (
+                                               'menuaction' => 
'property.uiinvoice.list_sub',
+                                               'user_lid' => 'all'
+                                       )),
+                                       'parameters' => json_encode($parameters)
+                               );
+                               
                                  $data['datatable']['actions'][] = array
                                  (
-                                 'my_name'     => 'save',
-                                 'text'                => lang('save'),
-                                 'type'                => 'custom',
-                                 'custom_code' => "onSave();"
-                                 ); */
+                                       'my_name'       => 'save',
+                                       'text'          => lang('save'),
+                                       'className'     => 'save',
+                                       'type'          => 'custom',
+                                       'custom_code' => "onSave();"
+                                 );
 
                                unset($parameters);
                        }
@@ -1571,6 +1583,7 @@
                                'my_name' => 'save',
                                'text' => lang('save'),
                                'type' => 'custom',
+                               'className'     => 'save',
                                'custom_code' => "onSave();"
                        );
 
@@ -1636,6 +1649,7 @@
                                'data' => json_encode(array()),
                                'tabletools' => $tabletools,
                                'config' => array(
+                                       array('singleSelect' => true),
                                        array('disableFilter' => true),
                                        array('disablePagination' => true)
                                )

Modified: branches/dev-syncromind/property/js/portico/invoice.index.js
===================================================================
--- branches/dev-syncromind/property/js/portico/invoice.index.js        
2016-02-05 11:52:58 UTC (rev 14700)
+++ branches/dev-syncromind/property/js/portico/invoice.index.js        
2016-02-05 14:56:50 UTC (rev 14701)
@@ -17,8 +17,21 @@
                                break;
                }
        }
+
+       var newTD = JqueryPortico.CreateRowChecked("signClass");
+       $(api.column(12).footer()).html(newTD);
+       var newTD = JqueryPortico.CreateRowChecked("janitorClass");
+       $(api.column(13).footer()).html(newTD);
+       var newTD = JqueryPortico.CreateRowChecked("supervisorClass");
+       $(api.column(14).footer()).html(newTD);
+       var newTD = JqueryPortico.CreateRowChecked("budget_responsibleClass");
+       $(api.column(15).footer()).html(newTD);
+       var newTD = JqueryPortico.CreateRowChecked("transfer_idClass");
+       $(api.column(16).footer()).html(newTD);
+
 };
 
+
 
/********************************************************************************
  * Format column PERIOD
  */

Modified: branches/dev-syncromind/property/templates/base/invoice_list_sub.xsl
===================================================================
--- branches/dev-syncromind/property/templates/base/invoice_list_sub.xsl        
2016-02-05 11:52:58 UTC (rev 14700)
+++ branches/dev-syncromind/property/templates/base/invoice_list_sub.xsl        
2016-02-05 14:56:50 UTC (rev 14701)
@@ -8,6 +8,7 @@
 </xsl:template>
 
 <xsl:template match="list_sub">
+       <div id="message"></div>
        <xsl:call-template name="top-toolbar" />
        <div>
                <xsl:choose>




reply via email to

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