fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [16230] Stable: Merge 16227:16229 from trunk


From: sigurdne
Subject: [Fmsystem-commits] [16230] Stable: Merge 16227:16229 from trunk
Date: Thu, 2 Feb 2017 04:29:23 -0500 (EST)

Revision: 16230
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16230
Author:   sigurdne
Date:     2017-02-02 04:29:23 -0500 (Thu, 02 Feb 2017)
Log Message:
-----------
Stable: Merge 16227:16229 from trunk

Modified Paths:
--------------
    branches/Version-2_0-branch/phpgwapi/js/jquery/common.js
    branches/Version-2_0-branch/phpgwapi/templates/base/datatable_jquery.xsl
    branches/Version-2_0-branch/property/inc/class.uitts.inc.php

Property Changed:
----------------
    branches/Version-2_0-branch/

Index: branches/Version-2_0-branch
===================================================================
--- branches/Version-2_0-branch 2017-02-02 09:24:28 UTC (rev 16229)
+++ branches/Version-2_0-branch 2017-02-02 09:29:23 UTC (rev 16230)

Property changes on: branches/Version-2_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
## -1,4 +1,4 ##
 /branches/dev-syncromind:13653
 /branches/dev-syncromind-2:14933-16188
 /branches/stavangerkommune:12743-12875,12986
-/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619,15621-15630,15632-15635,15637-15639,15641-15643,15645,15647-15665,15667-15668,15670-15671,15673-15693,15695-15712,15714-15764,15766-15767,15769-15787,15789-15802,15804-15811,15813-15814,15816-15818,15820-15849,15851-15887,15889-15900,15902-16046,16048-16051,16053,16055,16057-16063,16065-16071,16073-16077,16079-16081,16083-16099,16101-16130,16132-16140,16142,16144-16212,16214-16219,16221,16223-16224,16226
\ No newline at end of property
+/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619,15621-15630,15632-15635,15637-15639,15641-15643,15645,15647-15665,15667-15668,15670-15671,15673-15693,15695-15712,15714-15764,15766-15767,15769-15787,15789-15802,15804-15811,15813-15814,15816-15818,15820-15849,15851-15887,15889-15900,15902-16046,16048-16051,16053,16055,16057-16063,16065-16071,16073-16077,16079-16081,16083-16099,16101-16130,16132-16140,16142,16144-16212,16214-16219,16221,16223-16224,16226,16228-16229
\ No newline at end of property
Modified: branches/Version-2_0-branch/phpgwapi/js/jquery/common.js
===================================================================
--- branches/Version-2_0-branch/phpgwapi/js/jquery/common.js    2017-02-02 
09:24:28 UTC (rev 16229)
+++ branches/Version-2_0-branch/phpgwapi/js/jquery/common.js    2017-02-02 
09:29:23 UTC (rev 16230)
@@ -12,7 +12,7 @@
 JqueryPortico.inlineTablesDefined = 0;
 JqueryPortico.inlineTablesRendered = 0;
 
-JqueryPortico.parseURL = function(url)
+JqueryPortico.parseURL = function (url)
 {
        var parser = document.createElement('a'),
                searchObject = {},
@@ -290,13 +290,13 @@
 
        var lengthMenu = null;
 
-       if(pageLength != 10)
+       if (pageLength != 10)
        {
-               lengthMenu = [[],[]];
+               lengthMenu = [[], []];
                for (var i = 1; i < 5; i++)
                {
-                       lengthMenu[0].push( pageLength*i );
-                       lengthMenu[1].push( pageLength*i );
+                       lengthMenu[0].push(pageLength * i);
+                       lengthMenu[1].push(pageLength * i);
                }
        }
        else
@@ -307,10 +307,20 @@
                }
                catch (err)
                {
-                       lengthMenu = [[10, 25, 50, 100],[10, 25, 50, 100]];
+                       lengthMenu = [[10, 25, 50, 100], [10, 25, 50, 100]];
                }
        }
+       var responsive_def = false;
 
+       if (responsive == true)
+       {
+               responsive_def = {details: {
+                               display: 
$.fn.dataTable.Responsive.display.childRowImmediate,
+                               type: ''
+                       }
+               };
+       }
+
        if (allrows == true && data.length == 0)
        {
                lengthmenu_allrows = [];
@@ -392,20 +402,20 @@
                order: order,
                processing: true,
                serverSide: serverSide_def,
-               responsive: responsive,
+               responsive: responsive_def,
                deferRender: true,
                select: select,
                data: data,
                ajax: ajax_def,
                fnServerParams: function (aoData)
-               {                       
+               {
                        try
                        {
-                               if 
($.isNumeric(container.substr(container.length -1, 1)))
+                               if 
($.isNumeric(container.substr(container.length - 1, 1)))
                                {
-                                       if (!$.isEmptyObject(eval('paramsTable' 
+ container.substr(container.length -1, 1))))
+                                       if (!$.isEmptyObject(eval('paramsTable' 
+ container.substr(container.length - 1, 1))))
                                        {
-                                               $.each(eval('paramsTable' + 
container.substr(container.length -1, 1)), function (k, v)
+                                               $.each(eval('paramsTable' + 
container.substr(container.length - 1, 1)), function (k, v)
                                                {
                                                        aoData[k] = v;
                                                });
@@ -653,13 +663,13 @@
        label_attr = (label_attr) ? label_attr : 'name';
        $(document).ready(function ()
        {
-               if(requestGenerator)
+               if (requestGenerator)
                {
                        try
                        {
                                baseUrl = window[requestGenerator](baseUrl);
                        }
-                       catch(err)
+                       catch (err)
                        {
 
                        }
@@ -690,9 +700,9 @@
                                                }
                                                response($.map(data_t, function 
(item)
                                                {
-                                                       if(show_id)
+                                                       if (show_id)
                                                        {
-                                                               label = item.id 
+ ' ' + item[label_attr];                                       
+                                                               label = item.id 
+ ' ' + item[label_attr];
                                                        }
                                                        else
                                                        {
@@ -1283,7 +1293,7 @@
 }
 
 
-function createTableSchedule (d, u, c, r, cl, a, p, t)
+function createTableSchedule(d, u, c, r, cl, a, p, t)
 {
        var container = document.getElementById(d);
        var container_toolbar = document.createElement('div');
@@ -1439,8 +1449,8 @@
                                var res = total % n_objects;
                                var page = (start == 0) ? 1 : (start / 
n_objects) + 1;
 
-                               pages = (res > 0) ? pages+1 : pages;
-                               pages = (pages == 0) ? pages+1 : pages;
+                               pages = (res > 0) ? pages + 1 : pages;
+                               pages = (pages == 0) ? pages + 1 : pages;
 
                                var paginator = createPaginatorSchedule(pages, 
page);
                                container.appendChild(paginator);
@@ -1465,7 +1475,7 @@
 
 // p -> n pages
 // a -> current page
-function createPaginatorSchedule (p, a)
+function createPaginatorSchedule(p, a)
 {
        var max = 7;
        var m = 4;
@@ -1483,15 +1493,15 @@
                {
                        n_button = i;
                }
-               else if ( (a - ini < m ) && (i <= ini + m) )
+               else if ((a - ini < m) && (i <= ini + m))
                {
                        n_button = i;
                }
-               else if ( (i >= a - 1) && (i <= a + 1) )
+               else if ((i >= a - 1) && (i <= a + 1))
                {
                        n_button = i;
                }
-               else if ( (end - a < m ) && (i >= end - m) )
+               else if ((end - a < m) && (i >= end - m))
                {
                        n_button = i;
                }
@@ -1564,12 +1574,12 @@
        return container;
 }
 
-function setFormatter (callFunc, data, col, date)
+function setFormatter(callFunc, data, col, date)
 {
-       return eval(callFunc+'(data,col,date)');
+       return eval(callFunc + '(data,col,date)');
 }
 
-function scheduleResourceColumn (data, col, date)
+function scheduleResourceColumn(data, col, date)
 {
        var text = "";
        var classes = "";
@@ -1580,7 +1590,7 @@
 
        if (data[k])
        {
-               trAttributes.push( {attribute: 'resource', value: 
data['resource_id']} );
+               trAttributes.push({attribute: 'resource', value: 
data['resource_id']});
        }
 
        var resourceLink = (date) ? data['resource_link'] + "#date=" + date : 
data['resource_link'];
@@ -1596,7 +1606,7 @@
        return data_return;
 }
 
-function seasonDateColumn (data, col, date)
+function seasonDateColumn(data, col, date)
 {
        var text = "";
        var classes = "";
@@ -1615,13 +1625,14 @@
                text = name;
                classes = colorCell;
                trFunction.push(
+               {
+                       event: 'click',
+                       callFunction: function ()
                        {
-                               event: 'click',
-                               callFunction: function () {
 //                                     schedule.newAllocationForm({id: 
data[k]['id']});
-                                       schedule.newAllocationForm({id: id});
-                               }
+                               schedule.newAllocationForm({id: id});
                        }
+               }
                );
        }
        else
@@ -1629,12 +1640,13 @@
                text = "free";
                classes = "free";
                trFunction.push(
+               {
+                       event: 'click',
+                       callFunction: function ()
                        {
-                               event: 'click',
-                               callFunction: function () {
-                                       schedule.newAllocationForm({'_from': 
data['_from'], '_to': data['_to'], 'wday': col['key']});
-                               }
+                               schedule.newAllocationForm({'_from': 
data['_from'], '_to': data['_to'], 'wday': col['key']});
                        }
+               }
                );
        }
 
@@ -1648,7 +1660,7 @@
        return data_return;
 }
 
-function scheduleDateColumn (data, col, date)
+function scheduleDateColumn(data, col, date)
 {
        var text = "";
        var classes = "";
@@ -1677,7 +1689,7 @@
        return data_return;
 }
 
-function backendScheduleDateColumn (data, col, date)
+function backendScheduleDateColumn(data, col, date)
 {
        var text = "";
        var classes = "";
@@ -1710,12 +1722,13 @@
                text = "free";
                classes = "free";
                trFunction.push(
+               {
+                       event: 'click',
+                       callFunction: function ()
                        {
-                               event: 'click',
-                               callFunction: function () {
-                                       
schedule.newApplicationForm(col['date'], data['_from'], data['_to'])
-                               }
+                               schedule.newApplicationForm(col['date'], 
data['_from'], data['_to'])
                        }
+               }
                )
        }
 
@@ -1729,7 +1742,7 @@
        return data_return;
 }
 
-function frontendScheduleDateColumn (data, col, date)
+function frontendScheduleDateColumn(data, col, date)
 {
        var text = "";
        var classes = "";
@@ -1750,15 +1763,16 @@
                }
 
                text = name;
-               classes = "cellInfo " + colorCell + " " + type ;
+               classes = "cellInfo " + colorCell + " " + type;
                trFunction.push(
+               {
+                       event: 'click',
+                       callFunction: function ()
                        {
-                               event: 'click',
-                               callFunction: function () {
-                                       var resource = 
$(this).parent().attr('resource');
-                                       schedule.showInfo(data[k]['info_url'], 
resource);
-                               }
+                               var resource = 
$(this).parent().attr('resource');
+                               schedule.showInfo(data[k]['info_url'], 
resource);
                        }
+               }
                );
        }
        else
@@ -1766,13 +1780,14 @@
                text = "free";
                classes = "free";
                trFunction.push(
+               {
+                       event: 'click',
+                       callFunction: function ()
                        {
-                               event: 'click',
-                               callFunction: function () {
-                                       var resource = 
$(this).parent().attr('resource');
-                                       
schedule.newApplicationForm(col['date'], data['_from'], data['_to'], resource);
-                               }
+                               var resource = 
$(this).parent().attr('resource');
+                               schedule.newApplicationForm(col['date'], 
data['_from'], data['_to'], resource);
                        }
+               }
                );
        }
 
@@ -1786,7 +1801,7 @@
        return data_return;
 }
 
-function rentalSchedule (data, col, date)
+function rentalSchedule(data, col, date)
 {
        var text = "";
        var classes = "";
@@ -1810,23 +1825,24 @@
                classes = "free";
        }
 
-       trAttributes.push( {attribute: 'data-id', value: data['id']} );
+       trAttributes.push({attribute: 'data-id', value: data['id']});
        trFunction.push(
+       {
+               event: 'click',
+               callFunction: function ()
                {
-                       event: 'click',
-                       callFunction: function () {
-                               
$(this).parent().parent().find('tr').removeClass("trselected")
-                               $(this).parent().addClass("trselected");
-                               $('#schedule_toolbar button').attr('disabled', 
false);
-                               var b_needFree = eval(needFree);
-                               if (!b_needFree)
-                               {
-                                       $('#schedule_toolbar 
button.need-free').attr('disabled', true);
-                               }
-                               schedule.rental.data = data;
-                               schedule.rental.col = col;
+                       
$(this).parent().parent().find('tr').removeClass("trselected")
+                       $(this).parent().addClass("trselected");
+                       $('#schedule_toolbar button').attr('disabled', false);
+                       var b_needFree = eval(needFree);
+                       if (!b_needFree)
+                       {
+                               $('#schedule_toolbar 
button.need-free').attr('disabled', true);
                        }
+                       schedule.rental.data = data;
+                       schedule.rental.col = col;
                }
+       }
        );
 
        var data_return = {
@@ -1839,21 +1855,23 @@
        return data_return;
 }
 
-function rentalScheduleApplication (data, col, date)
+function rentalScheduleApplication(data, col, date)
 {
        var text = "";
        var classes = "";
        var trAttributes = [];
        var trFunction = [];
-       
+
        var validate = false;
-       
-       if ( (schedule.rental.availability_from) && 
(schedule.rental.availability_to) ){
-               if (col.date >= schedule.rental.availability_from && col.date 
<= schedule.rental.availability_to){
+
+       if ((schedule.rental.availability_from) && 
(schedule.rental.availability_to))
+       {
+               if (col.date >= schedule.rental.availability_from && col.date 
<= schedule.rental.availability_to)
+               {
                        validate = true;
                }
        }
-       
+
        if (validate)
        {
                var k = col.key;
@@ -1873,23 +1891,24 @@
                        classes = "free";
                }
 
-               trAttributes.push( {attribute: 'data-id', value: data['id']} );
+               trAttributes.push({attribute: 'data-id', value: data['id']});
                trFunction.push(
+               {
+                       event: 'click',
+                       callFunction: function ()
                        {
-                               event: 'click',
-                               callFunction: function () {
-                                       
$(this).parent().parent().find('tr').removeClass("trselected")
-                                       $(this).parent().addClass("trselected");
-                                       $('#schedule_toolbar 
button').attr('disabled', false);
-                                       var b_needFree = eval(needFree);
-                                       if (!b_needFree)
-                                       {
-                                               $('#schedule_toolbar 
button.need-free').attr('disabled', true);
-                                       }
-                                       schedule.rental.data = data;
-                                       schedule.rental.col = col;
+                               
$(this).parent().parent().find('tr').removeClass("trselected")
+                               $(this).parent().addClass("trselected");
+                               $('#schedule_toolbar button').attr('disabled', 
false);
+                               var b_needFree = eval(needFree);
+                               if (!b_needFree)
+                               {
+                                       $('#schedule_toolbar 
button.need-free').attr('disabled', true);
                                }
+                               schedule.rental.data = data;
+                               schedule.rental.col = col;
                        }
+               }
                );
        }
 
@@ -1903,7 +1922,7 @@
        return data_return;
 }
 
-function rentalScheduleComposites (data, col, date)
+function rentalScheduleComposites(data, col, date)
 {
        var text = "";
        var classes = "";
@@ -1911,21 +1930,22 @@
        var trFunction = [];
 
        var k = col.key;
-       
+
        text = data[k];
 
-       trAttributes.push( {attribute: 'data-id', value: data['id']} );
+       trAttributes.push({attribute: 'data-id', value: data['id']});
        trFunction.push(
+       {
+               event: 'click',
+               callFunction: function ()
                {
-                       event: 'click',
-                       callFunction: function () {
-                               
$(this).parent().parent().find('tr').removeClass("trselected")
-                               $(this).parent().addClass("trselected");
-                               $('#composites_toolbar 
button').attr('disabled', false);
-                               composites.rental.data = data;
-                               composites.rental.col = col;
-                       }
+                       
$(this).parent().parent().find('tr').removeClass("trselected")
+                       $(this).parent().addClass("trselected");
+                       $('#composites_toolbar button').attr('disabled', false);
+                       composites.rental.data = data;
+                       composites.rental.col = col;
                }
+       }
        );
 
        var data_return = {

Modified: 
branches/Version-2_0-branch/phpgwapi/templates/base/datatable_jquery.xsl
===================================================================
--- branches/Version-2_0-branch/phpgwapi/templates/base/datatable_jquery.xsl    
2017-02-02 09:24:28 UTC (rev 16229)
+++ branches/Version-2_0-branch/phpgwapi/templates/base/datatable_jquery.xsl    
2017-02-02 09:29:23 UTC (rev 16230)
@@ -677,12 +677,12 @@
                                                });
                                        </xsl:when>
                                </xsl:choose>
-//               button_def.push({
-//                                     extend:    'csvHtml5',
-//                                     titleAttr: "<xsl:value-of 
select="php:function('lang', 'download visible data')"/>",
-//                                     fieldSeparator: ';',
-//                                     bom:true
-//                             });
+               button_def.push({
+                                       extend:    'csvHtml5',
+                                       titleAttr: "<xsl:value-of 
select="php:function('lang', 'download visible data')"/>",
+                                       fieldSeparator: ';',
+                                       bom:true
+                               });
                                <xsl:choose>
                                        <xsl:when test="download">
                                                button_def.push({
@@ -1023,7 +1023,12 @@
                                paginate:               disablePagination ? 
false : true,
                                processing:             true,
                                serverSide:             true,
-                               responsive:             true,
+                               responsive:             {
+                                                                       
details: {
+                                                                               
display: $.fn.dataTable.Responsive.display.childRowImmediate,
+                                                                               
type: ''
+                                                                       }
+                                                               },
                                select: select_all ? { style: 'multi' } : true,
                                deferRender:    true,
                                ajax:{

Modified: branches/Version-2_0-branch/property/inc/class.uitts.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uitts.inc.php        
2017-02-02 09:24:28 UTC (rev 16229)
+++ branches/Version-2_0-branch/property/inc/class.uitts.inc.php        
2017-02-02 09:29:23 UTC (rev 16230)
@@ -1315,6 +1315,11 @@
                                        }
                                }
 
+                               if(empty($values['group_id']))
+                               {
+                                       $values['group_id'] = 
(isset($GLOBALS['phpgw_info']['user']['preferences']['property']['groupdefault'])
 ? $GLOBALS['phpgw_info']['user']['preferences']['property']['groupdefault'] : 
'');
+                               }
+
                                if (!$values['assignedto'] && 
!$values['group_id'])
                                {
                                        $_responsible = 
execMethod('property.boresponsible.get_responsible', $values);




reply via email to

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