fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [14695] datatables: convert from tabletools to button


From: Sigurd Nes
Subject: [Fmsystem-commits] [14695] datatables: convert from tabletools to buttons
Date: Thu, 04 Feb 2016 12:59:08 +0000

Revision: 14695
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14695
Author:   sigurdne
Date:     2016-02-04 12:59:07 +0000 (Thu, 04 Feb 2016)
Log Message:
-----------
datatables: convert from tabletools to buttons

Modified Paths:
--------------
    
branches/dev-syncromind/activitycalendar/js/activitycalendar/activities.index.js
    
branches/dev-syncromind/activitycalendar/js/activitycalendar/dashboard.index.js
    branches/dev-syncromind/bookingfrontend/css/bookingfrontend.css
    branches/dev-syncromind/frontend/js/jquery/entity.list.js
    branches/dev-syncromind/phpgwapi/inc/class.uicommon_jquery.inc.php
    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.notify.inc.php
    branches/dev-syncromind/property/inc/class.uiagreement.inc.php
    branches/dev-syncromind/property/inc/class.uialarm.inc.php
    branches/dev-syncromind/property/inc/class.uievent.inc.php
    branches/dev-syncromind/property/inc/class.uis_agreement.inc.php
    branches/dev-syncromind/property/js/portico/agreement.edit.js
    branches/dev-syncromind/property/js/portico/entity.edit.js
    branches/dev-syncromind/property/js/portico/event.index.js
    branches/dev-syncromind/property/js/portico/s_agreement.edit.js
    branches/dev-syncromind/property/templates/base/lookup.entity.xsl
    branches/dev-syncromind/property/templates/base/wo_hour.index.xsl
    branches/dev-syncromind/rental/js/rental/composite.edit.js
    branches/dev-syncromind/rental/js/rental/contract.edit.js
    branches/dev-syncromind/rental/js/rental/frontpage.index.js
    branches/dev-syncromind/rental/js/rental/price_item.adjust_price.js
    branches/dev-syncromind/rental/js/rental/resultunit.edit.js

Removed Paths:
-------------
    branches/dev-syncromind/bookingfrontend/templates/base/datatable_jquery.xsl

Modified: 
branches/dev-syncromind/activitycalendar/js/activitycalendar/activities.index.js
===================================================================
--- 
branches/dev-syncromind/activitycalendar/js/activitycalendar/activities.index.js
    2016-02-03 21:53:52 UTC (rev 14694)
+++ 
branches/dev-syncromind/activitycalendar/js/activitycalendar/activities.index.js
    2016-02-04 12:59:07 UTC (rev 14695)
@@ -1,8 +1,8 @@
 
 function sendMail(oArgs, parameters)
 {
-       var oTT = TableTools.fnGetInstance('datatable-container');
-       var selected = oTT.fnGetSelectedData();
+       var api =$( '#datatable-container' ).dataTable().api();
+       var selected = api.rows( { selected: true } ).data();
        var nTable = '';
 
        if (selected.length == 0) {

Modified: 
branches/dev-syncromind/activitycalendar/js/activitycalendar/dashboard.index.js
===================================================================
--- 
branches/dev-syncromind/activitycalendar/js/activitycalendar/dashboard.index.js 
    2016-02-03 21:53:52 UTC (rev 14694)
+++ 
branches/dev-syncromind/activitycalendar/js/activitycalendar/dashboard.index.js 
    2016-02-04 12:59:07 UTC (rev 14695)
@@ -1,8 +1,8 @@
 
 function sendMail(oArgs, parameters)
 {
-       var oTT = TableTools.fnGetInstance('datatable-container_1');
-       var selected = oTT.fnGetSelectedData();
+       var api =$( '#datatable-container_1' ).dataTable().api();
+       var selected = api.rows( { selected: true } ).data();
        var nTable = 1;
 
        if (selected.length == 0) {

Modified: branches/dev-syncromind/bookingfrontend/css/bookingfrontend.css
===================================================================
--- branches/dev-syncromind/bookingfrontend/css/bookingfrontend.css     
2016-02-03 21:53:52 UTC (rev 14694)
+++ branches/dev-syncromind/bookingfrontend/css/bookingfrontend.css     
2016-02-04 12:59:07 UTC (rev 14695)
@@ -729,4 +729,10 @@
 select.valid {background-position: right 18px center !important;}
 
 .error,
-.valid {border-width: 1px;border-style: solid;box-shadow: 0 0 0 0 transparent 
inset;}
\ No newline at end of file
+.valid {border-width: 1px;border-style: solid;box-shadow: 0 0 0 0 transparent 
inset;}
+
+.dataTables_wrapper {width: 98%;margin: 0 auto;}
+.dataTable thead,
+.dataTable th,
+.dataTable .th {background-color: transparent;}
+.dataTable {text-align: initial;}

Deleted: 
branches/dev-syncromind/bookingfrontend/templates/base/datatable_jquery.xsl
===================================================================
--- branches/dev-syncromind/bookingfrontend/templates/base/datatable_jquery.xsl 
2016-02-03 21:53:52 UTC (rev 14694)
+++ branches/dev-syncromind/bookingfrontend/templates/base/datatable_jquery.xsl 
2016-02-04 12:59:07 UTC (rev 14695)
@@ -1,949 +0,0 @@
-<func:function name="phpgw:conditional">
-       <xsl:param name="test"/>
-       <xsl:param name="true"/>
-       <xsl:param name="false"/>
-
-       <func:result>
-               <xsl:choose>
-                       <xsl:when test="$test">
-                               <xsl:value-of select="$true"/>
-                       </xsl:when>
-                       <xsl:otherwise>
-                               <xsl:value-of select="$false"/>
-                       </xsl:otherwise>
-               </xsl:choose>
-       </func:result>
-</func:function>
-
-<xsl:template match="data">
-       <xsl:choose>
-               <xsl:when test="datatable_name">
-                       <h3>
-                               <xsl:value-of select="datatable_name"/>
-                       </h3>
-               </xsl:when>
-       </xsl:choose>
-       <xsl:call-template name="datatable" />
-</xsl:template>
-
-
-<xsl:template name="datatable">
-       <xsl:call-template name="jquery_phpgw_i18n"/>
-       <xsl:apply-templates select="form" />
-       <div id="list_flash">
-               <xsl:call-template name="msgbox"/>
-       </div>
-       <div id="message" class='message'/>
-       <xsl:apply-templates select="datatable"/>
-       <xsl:apply-templates select="form/list_actions"/>
-</xsl:template>
-
-
-<xsl:template match="toolbar" xmlns:php="http://php.net/xsl";>
-       <style id='toggle-box-css' type='text/css' scoped='scoped'>
-               .toggle-box {display: none;}
-               #toolbar {width: 98%;margin-left: auto;margin-right: 
auto;background-color: transparent;border: none;}
-               #toolbar table {text-align: left;}
-               #toolbar table input[type="text"] {margin: auto 0;}
-               .toggle-box + label {cursor: pointer;display: 
block;font-weight: bold;line-height: 21px;margin-bottom: 5px;text-align: 
left;width: 98%;margin-left: auto;margin-right: auto;}
-               .toggle-box + label + div {display: none;margin-bottom: 10px;}
-               .toggle-box:checked + label + div {display: block;}
-               .toggle-box + label:before {background-color: 
#4F5150;-webkit-border-radius: 10px;-moz-border-radius: 10px;border-radius: 
10px;color: #FFFFFF;content: "+";display: block;float: left;font-weight: 
bold;height: 20px;line-height: 20px;margin-right: 5px;text-align: center;width: 
20px;}
-               .toggle-box:checked + label:before {content: "\2212";}
-       </style>
-
-       <input class="toggle-box" id="header1" type="checkbox" />
-       <label for="header1">
-               <xsl:value-of select="php:function('lang', 'toolbar')"/>
-       </label>
-
-       <div id="toolbar">
-               <!--xsl:if test="item/text and normalize-space(item/text)"-->
-               <xsl:if test="item">
-                       <table id="toolbar_table" class="pure-table">
-                               <thead>
-                                       <tr>
-                                               <th>
-                                                       <xsl:value-of 
select="php:function('lang', 'name')"/>
-                                               </th>
-                                               <th>
-                                                       <xsl:value-of 
select="php:function('lang', 'item')"/>
-                                               </th>
-                                       </tr>
-                               </thead>
-                               <tbody>
-                                       <xsl:for-each select="item">
-                                               <tr>
-                                                       <xsl:variable 
name="filter_key" select="concat('filter_', name)"/>
-                                                       <xsl:variable 
name="filter_key_name" select="concat(concat('filter_', name), '_name')"/>
-                                                       <xsl:variable 
name="filter_key_id" select="concat(concat('filter_', name), '_id')"/>
-                                                       <td>
-                                                               <xsl:if 
test="name">
-                                                                       <label>
-                                                                               
<xsl:attribute name="for">
-                                                                               
        <xsl:value-of select="phpgw:conditional(not(name), '', name)"/>
-                                                                               
</xsl:attribute>
-                                                                               
<xsl:value-of select="phpgw:conditional(not(text), '', text)"/>
-                                                                       </label>
-                                                               </xsl:if>
-                                                       </td>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="type = 'date-picker'">
-                                                                       <td 
valign="top">
-                                                                               
<div>
-                                                                               
        <input id="filter_{name}" name="filter_{name}" value="{value}" 
type="text"></input>
-                                                                               
</div>
-                                                                       </td>
-                                                               </xsl:when>
-                                                               <xsl:when 
test="type = 'autocomplete'">
-                                                                       <td 
class="auto">
-                                                                               
<div class="auto">
-                                                                               
        <input id="filter_{name}_name" name="filter_{name}_name" type="text">
-                                                                               
                <xsl:attribute name="value">
-                                                                               
                        <xsl:value-of select="../../../filters/*[local-name() = 
$filter_key_name]"/>
-                                                                               
                </xsl:attribute>
-                                                                               
        </input>
-                                                                               
        <input id="filter_{name}_id" name="filter_{name}_id" type="hidden">
-                                                                               
                <xsl:attribute name="value">
-                                                                               
                        <xsl:value-of select="../../../filters/*[local-name() = 
$filter_key_id]"/>
-                                                                               
                </xsl:attribute>
-                                                                               
        </input>
-                                                                               
        <div id="filter_{name}_container"/>
-                                                                               
</div>
-                                                                               
<script type="text/javascript">
-                                                                               
        $(document).ready(function() {
-                                                                               
        var app = "<xsl:value-of select="app"/>";
-                                                                               
        var name = "<xsl:value-of select="name"/>";
-                                                                               
        var ui = "<xsl:value-of select="ui"/>";
-                                                                               
        var depends = false;
-                                                                               
        var filter_depends = "";
-                                                                               
        var filter_selected = "";
-                                                                               
        <xsl:if test="depends">
-                                                                               
                depends = "<xsl:value-of select="depends"/>";
-                                                                               
                //filter_depends = $('#filer_'+depends+'_id').val();
-                                                                               
                $("#filter_"+depends+"_name").on("autocompleteselect", 
function(event, i){
-                                                                               
                var filter_select = i.item.value;
-                                                                               
                filter_depends = i.item.value;
-                                                                               
                if (filter_select != filter_selected){
-                                                                               
                if (filter_depends) {
-                                                            <![CDATA[
-                                                                
JqueryPortico.autocompleteHelper('index.php?menuaction=booking.ui'+ui+'.index&phpgw_return_as=json&filter_'+depends+'_id='+filter_depends+'&',
-                                                                               
                     'filter_'+name+'_name', 'filter_'+name+'_id', 
'filter_'+name+'_container');
-                                                            ]]>
-                                                                               
                }
-                                                                               
                
oTable.dataTableSettings[0]['ajax']['data']['filter_'+name+'_id'] = "";
-                                                                               
                $('#filter_'+name+'_name').val('');
-                                                                               
                $('#filter_'+name+'_id').val('');
-                                                                               
                filter_selected = filter_select;
-                                                                               
                }
-                                                                               
                });
-                                                                               
                $("#filter_"+depends+"_name").on("keyup", function(){
-                                                                               
                if ($(this).val() == ''){
-                                                                               
                filter_depends = false;
-                                                                               
                if (!filter_depends) {
-                                                            <![CDATA[
-                                                                
JqueryPortico.autocompleteHelper('index.php?menuaction=booking.ui'+ui+'.index&phpgw_return_as=json&',
-                                                                               
                     'filter_'+name+'_name', 'filter_'+name+'_id', 
'filter_'+name+'_container');
-                                                            ]]>
-                                                                               
                }
-                                                                               
                filter_selected = "";
-                                                                               
                
oTable.dataTableSettings[0]['ajax']['data']['filter_'+name+'_id'] = "";
-                                                                               
                $('#filter_'+name+'_name').val('');
-                                                                               
                $('#filter_'+name+'_id').val('');
-                                                                               
                }
-                                                                               
                });
-                                                                               
        </xsl:if>
-                                                                               
        if (filter_depends) {
-                                                    <![CDATA[
-                                                        
JqueryPortico.autocompleteHelper('index.php?menuaction=booking.ui'+ui+'.index&phpgw_return_as=json&filter_'+depends+'_id='+filter_depends+'&',
-                                                                               
             'filter_'+name+'_name', 'filter_'+name+'_id', 
'filter_'+name+'_container');
-                                                    ]]>
-                                                                               
        }else{
-                                                    <![CDATA[
-                                                        
JqueryPortico.autocompleteHelper('index.php?menuaction=booking.ui'+ui+'.index&phpgw_return_as=json&',
-                                                                               
             'filter_'+name+'_name', 'filter_'+name+'_id', 
'filter_'+name+'_container');
-                                                    ]]>
-                                                                               
        }
-                                                                               
        });
-                                                                               
</script>
-                                                                       </td>
-                                                               </xsl:when>
-                                                               <xsl:when 
test="type = 'filter'">
-                                                                       <td 
valign="top">
-                                                                               
<xsl:variable name="name">
-                                                                               
        <xsl:value-of select="name"/>
-                                                                               
</xsl:variable>
-                                                                               
<select id="{$name}" name="{$name}">
-                                                                               
        <xsl:for-each select="list">
-                                                                               
                <xsl:variable name="id">
-                                                                               
                        <xsl:value-of select="id"/>
-                                                                               
                </xsl:variable>
-                                                                               
                <xsl:choose>
-                                                                               
                        <xsl:when test="id = 'NEW'">
-                                                                               
                                <option value="{$id}" selected="selected">
-                                                                               
                                        <xsl:value-of select="name"/>
-                                                                               
                                </option>
-                                                                               
                        </xsl:when>
-                                                                               
                        <xsl:otherwise>
-                                                                               
                                <xsl:choose>
-                                                                               
                                        <xsl:when test="selected = 'selected'">
-                                                                               
                                                <option value="{$id}" 
selected="selected">
-                                                                               
                                                        <xsl:value-of 
select="name"/>
-                                                                               
                                                </option>
-                                                                               
                                        </xsl:when>
-                                                                               
                                        <xsl:otherwise>
-                                                                               
                                                <option value="{$id}">
-                                                                               
                                                        <xsl:value-of 
select="name"/>
-                                                                               
                                                </option>
-                                                                               
                                        </xsl:otherwise>
-                                                                               
                                </xsl:choose>
-                                                                               
                        </xsl:otherwise>
-                                                                               
                </xsl:choose>
-                                                                               
        </xsl:for-each>
-                                                                               
</select>
-                                                                       </td>
-                                                               </xsl:when>
-                                                               <xsl:when 
test="type = 'link'">
-                                                                       <td 
valign="top">
-                                                                               
<input type="button" class="pure-button pure-button-primary">
-                                                                               
        <xsl:choose>
-                                                                               
                <xsl:when test="onclick">
-                                                                               
                        <xsl:attribute name="onclick">
-                                                                               
                                <xsl:value-of select="onclick"/>
-                                                                               
                        </xsl:attribute>
-                                                                               
                </xsl:when>
-                                                                               
                <xsl:otherwise>
-                                                                               
                        <xsl:attribute 
name="onclick">javascript:window.open('<xsl:value-of select="href"/>', 
"_self");</xsl:attribute>
-                                                                               
                </xsl:otherwise>
-                                                                               
        </xsl:choose>
-                                                                               
        <xsl:attribute name="value">
-                                                                               
                <xsl:value-of select="value"/>
-                                                                               
        </xsl:attribute>
-                                                                               
</input>
-                                                                               
<!--a href="{href}">
-                                                                               
        <xsl:if test="onclick">
-                                                                               
                <xsl:attribute name="onclick">
-                                                                               
                        <xsl:value-of select="onclick"/>
-                                                                               
                </xsl:attribute>
-                                                                               
        </xsl:if>
-                                                                               
        <xsl:value-of select="value"/>
-                                                                               
</a-->
-                                                                       </td>
-                                                               </xsl:when>
-                                                               <xsl:when 
test="type = 'hidden'">
-                                                                       <td 
valign="top">
-                                                                               
<input>
-                                                                               
        <xsl:attribute name="type">
-                                                                               
                <xsl:value-of select="phpgw:conditional(not(type), '', type)"/>
-                                                                               
        </xsl:attribute>
-                                                                               
        <xsl:attribute name="id">
-                                                                               
                <xsl:value-of select="phpgw:conditional(not(id), '', id)"/>
-                                                                               
        </xsl:attribute>
-                                                                               
        <xsl:attribute name="name">
-                                                                               
                <xsl:value-of select="phpgw:conditional(not(name), '', name)"/>
-                                                                               
        </xsl:attribute>
-                                                                               
        <xsl:attribute name="value">
-                                                                               
                <xsl:value-of select="phpgw:conditional(not(value), '', 
value)"/>
-                                                                               
        </xsl:attribute>
-                                                                               
</input>
-                                                                       </td>
-                                                               </xsl:when>
-                                                               <xsl:when 
test="type = 'label'">
-                                                                       <td 
valign="top">
-                                                                               
<label>
-                                                                               
        <xsl:attribute name="id">
-                                                                               
                <xsl:value-of select="phpgw:conditional(not(id), '', id)"/>
-                                                                               
        </xsl:attribute>
-                                                                               
</label>
-                                                                       </td>
-                                                               </xsl:when>
-                                                               <xsl:otherwise>
-                                                                       <td 
valign="top">
-                                                                               
<input id="innertoolbar">
-                                                                               
        <xsl:attribute name="type">
-                                                                               
                <xsl:value-of select="phpgw:conditional(not(type), '', type)"/>
-                                                                               
        </xsl:attribute>
-                                                                               
        <xsl:attribute name="name">
-                                                                               
                <xsl:value-of select="phpgw:conditional(not(name), '', name)"/>
-                                                                               
        </xsl:attribute>
-                                                                               
        <xsl:attribute name="onclick">
-                                                                               
                <xsl:value-of select="phpgw:conditional(not(onClick), '', 
onClick)"/>
-                                                                               
        </xsl:attribute>
-                                                                               
        <xsl:attribute name="value">
-                                                                               
                <xsl:value-of select="phpgw:conditional(not(value), '', 
value)"/>
-                                                                               
        </xsl:attribute>
-                                                                               
        <xsl:attribute name="href">
-                                                                               
                <xsl:value-of select="phpgw:conditional(not(href), '', href)"/>
-                                                                               
        </xsl:attribute>
-                                                                               
        <xsl:attribute name="class">
-                                                                               
                <xsl:value-of select="phpgw:conditional(not(class), '', 
class)"/>
-                                                                               
        </xsl:attribute>
-                                                                               
</input>
-                                                                       </td>
-                                                               </xsl:otherwise>
-                                                       </xsl:choose>
-                                               </tr>
-                                       </xsl:for-each>
-                               </tbody>
-                       </table>
-               </xsl:if>
-       </div>
-</xsl:template>
-
-<xsl:template match="form/list_actions">
-       <form id="list_actions_form" method="POST">
-               <!-- Form action is set by javascript listener -->
-               <div id="list_actions" class='yui-skin-sam'>
-                       <table cellpadding="0" cellspacing="0">
-                               <tr>
-                                       <xsl:for-each select="item">
-                                               <td valign="top">
-                                                       <input 
id="innertoolbar">
-                                                               <xsl:attribute 
name="type">
-                                                                       
<xsl:value-of select="phpgw:conditional(not(type), '', type)"/>
-                                                               </xsl:attribute>
-                                                               <xsl:attribute 
name="name">
-                                                                       
<xsl:value-of select="phpgw:conditional(not(name), '', name)"/>
-                                                               </xsl:attribute>
-                                                               <xsl:attribute 
name="onclick">
-                                                                       
<xsl:value-of select="phpgw:conditional(not(onClick), '', onClick)"/>
-                                                               </xsl:attribute>
-                                                               <xsl:attribute 
name="value">
-                                                                       
<xsl:value-of select="phpgw:conditional(not(value), '', value)"/>
-                                                               </xsl:attribute>
-                                                               <xsl:attribute 
name="href">
-                                                                       
<xsl:value-of select="phpgw:conditional(not(href), '', href)"/>
-                                                               </xsl:attribute>
-                                                       </input>
-                                               </td>
-                                       </xsl:for-each>
-                               </tr>
-                       </table>
-               </div>
-       </form>
-</xsl:template>
-
-<xsl:template match="form">
-       <div id="queryForm">
-               <!--xsl:attribute name="method">
-                       <xsl:value-of select="phpgw:conditional(not(method), 
'GET', method)"/>
-               </xsl:attribute>
-               <xsl:attribute name="action">
-                       <xsl:value-of select="phpgw:conditional(not(action), 
'', action)"/>
-               </xsl:attribute-->
-               <xsl:apply-templates select="toolbar"/>
-       </div>
-       <!--form id="update_table_dummy" method='POST' action='' >
-       </form-->
-</xsl:template>
-
-<xsl:template match="datatable">
-       <xsl:call-template name="datasource-definition" />
-</xsl:template>
-
-<xsl:template name="datasource-definition">
-       <style type="text/css">
-               .dataTables_wrapper {width: 98%;margin: 0 auto;}
-               .dataTable thead,
-               .dataTable th,
-               .dataTable .th {background-color: transparent;}
-               .dataTable {text-align: initial;}
-       </style>
-       <table id="datatable-container" class="display cell-border compact 
responsive no-wrap" width="100%">
-               <thead>
-                       <xsl:for-each select="//datatable/field">
-                               <xsl:choose>
-                                       <xsl:when test="hidden">
-                                               <xsl:if test="hidden =0">
-                                                       <th>
-                                                               <xsl:value-of 
select="label"/>
-                                                       </th>
-                                               </xsl:if>
-                                       </xsl:when>
-                                       <xsl:otherwise>
-                                               <th>
-                                                       <xsl:value-of 
select="label"/>
-                                               </th>
-                                       </xsl:otherwise>
-                               </xsl:choose>
-                       </xsl:for-each>
-               </thead>
-               <tfoot>
-                       <tr>
-                               <xsl:for-each select="//datatable/field">
-                                       <xsl:choose>
-                                               <xsl:when test="hidden">
-                                                       <xsl:if test="hidden 
=0">
-                                                               <th>
-                                                                       
<xsl:value-of select="value_footer"/>
-                                                               </th>
-                                                       </xsl:if>
-                                               </xsl:when>
-                                               <xsl:otherwise>
-                                                       <th>
-                                                               <xsl:value-of 
select="value_footer"/>
-                                                       </th>
-                                               </xsl:otherwise>
-                                       </xsl:choose>
-                               </xsl:for-each>
-                       </tr>
-               </tfoot>
-       </table>
-       <form id="custom_values_form" name="custom_values_form"></form>
-       <script>
-               var columns = [
-               <xsl:for-each select="//datatable/field">
-                       {
-                       data: "<xsl:value-of select="key"/>",
-                       <xsl:if test="className">
-                               <xsl:choose>
-                                       <xsl:when test="className='right' or 
className='center'">
-                                               <xsl:if test="className 
='right'">
-                                                       class: 'dt-right',
-                                               </xsl:if>
-                                               <xsl:if test="className 
='center'">
-                                                       class: 'dt-center',
-                                               </xsl:if>
-                                       </xsl:when>
-                                       <xsl:otherwise>
-                                               class: "<xsl:value-of 
select="className"/>",
-                                       </xsl:otherwise>
-                               </xsl:choose>
-                       </xsl:if>
-                       orderable: <xsl:value-of 
select="phpgw:conditional(not(sortable = 0), 'true', 'false')"/>,
-                       <xsl:choose>
-                               <xsl:when test="hidden">
-                                       <xsl:if test="hidden =0">
-                                               visible: true,
-                                       </xsl:if>
-                                       <xsl:if test="hidden =1">
-                                               class: 'none', //FIXME - virker 
ikke...'responsive' plukker den fram igjen
-                                               visible: false,
-                                       </xsl:if>
-                               </xsl:when>
-                               <xsl:otherwise>
-                                       visible: true,
-                               </xsl:otherwise>
-                       </xsl:choose>
-                       <xsl:if test="formatter">
-                               render: function (dummy1, dummy2, oData) {
-                               try {
-                               var ret = <xsl:value-of 
select="formatter"/>("<xsl:value-of select="key"/>", oData);
-                               }
-                               catch(err) {
-                               return err.message;
-                               }
-                               return ret;
-                               },
-                       </xsl:if>
-                       <xsl:choose>
-                               <xsl:when test="editor">
-                                       <xsl:if test="editor =0">
-                                               editor: false,
-                                       </xsl:if>
-                                       <xsl:if test="editor =1">
-                                               editor: true,
-                                       </xsl:if>
-                               </xsl:when>
-                               <xsl:otherwise>
-                                       editor: false,
-                               </xsl:otherwise>
-                       </xsl:choose>
-                       defaultContent: "<xsl:value-of 
select="defaultContent"/>"
-                       }<xsl:value-of select="phpgw:conditional(not(position() 
= last()), ',', '')"/>
-               </xsl:for-each>
-               ];
-        <![CDATA[
-            JqueryPortico.columns = [];
-            for(i=0;i < columns.length;i++)
-            {
-                if ( columns[i]['visible'] == true )
-                {
-                    JqueryPortico.columns.push(columns[i]);
-                }
-            }
-            // console.log(JqueryPortico.columns);
-        ]]>
-       </script>
-
-       <script type="text/javascript" class="init">
-               var oTable = null;
-               $(document).ready(function() {
-               var ajax_url = '<xsl:value-of select="source"/>';
-               var download_url = '<xsl:value-of select="download"/>';
-               var exclude_colvis = [];
-               var editor_cols = [];
-               var editor_action = '<xsl:value-of select="editor_action"/>';
-               var disablePagination = '<xsl:value-of 
select="disablePagination"/>';
-
-            <![CDATA[
-                TableTools.BUTTONS.download = {
-                    "sAction": "text",
-                    "sTag": "default",
-                    "sFieldBoundary": "",
-                    "sFieldSeperator": "\t",
-                    "sNewLine": "<br>",
-                    "sToolTip": "",
-                    "sButtonClass": "DTTT_button_text",
-                    "sButtonClassHover": "DTTT_button_text_hover",
-                    "sButtonText": "Download",
-                    "mColumns": "all",
-                    "bHeader": true,
-                    "bFooter": true,
-                    "sDiv": "",
-                    "fnMouseover": null,
-                    "fnMouseout": null,
-                    "fnClick": function( nButton, oConfig ) {
-                        var oParams = this.s.dt.oApi._fnAjaxParameters( 
this.s.dt );
-                        oParams.length = -1;
-                        oParams.columns = null;
-                        oParams.start = null;
-                        oParams.draw = null;
-                        var addtional_filterdata = 
oTable.dataTableSettings[0]['ajax']['data'];
-                        for (var attrname in addtional_filterdata)
-                        {
-                            oParams[attrname] = addtional_filterdata[attrname];
-                        }
-                        var iframe = document.createElement('iframe');
-                        iframe.style.height = "0px";
-                        iframe.style.width = "0px";
-                        iframe.src = oConfig.sUrl+"?"+$.param(oParams) + 
"&export=1";
-                        if(confirm("This will take some time..."))
-                        {
-                            document.body.appendChild( iframe );
-                        }
-                    },
-                    "fnSelect": null,
-                    "fnComplete": null,
-                    "fnInit": null
-                };
-            ]]>
-               <xsl:choose>
-                       <xsl:when test="//datatable/actions">
-                               JqueryPortico.TableTools = {
-                               "sSwfPath": 
"phpgwapi/js/DataTables/extensions/TableTools/swf/copy_csv_xls_pdf.swf",
-                               "sRowSelect": "multi",
-                               "aButtons": [
-                               {
-                               "sExtends": "collection",
-                               "sButtonText": "Operation",
-                               "aButtons": [
-                               'copy',
-                               {
-                               sExtends: 'select_all',
-                               //sButtonText: 'Select All',
-                               fnClick: function (nButton, oConfig, oFlash) {
-                               
TableTools.fnGetInstance('datatable-container').fnSelectAll();
-                               //In case there are checkboxes
-                               $(".mychecks").each(function()
-                               {
-                               $(this).prop("checked", true);
-                               });
-                               }
-                               },
-                               {
-                               sExtends: 'select_none',
-                               //sButtonText: 'Select None',
-                               fnClick: function (nButton, oConfig, oFlash) {
-                               
TableTools.fnGetInstance('datatable-container').fnSelectNone();
-                               //In case there are checkboxes
-                               $(".mychecks").each(function()
-                               {
-                               $(this).prop("checked", false);
-                               });
-                               }
-                               }
-                               <xsl:choose>
-                                       <xsl:when test="download">
-                                               ,{
-                                               "sExtends": "download",
-                                               "sButtonText": "Download",
-                                               "sUrl": '<xsl:value-of 
select="download"/>'
-                                               }
-                                       </xsl:when>
-                               </xsl:choose>
-                               <xsl:choose>
-                                       <xsl:when test="//datatable/actions != 
''">
-                                               ,
-                                               {
-                                               sExtends: "div",
-                                               sButtonText: "Knapper nedenfor 
gjelder pr valgt element "
-                                               },
-                                               <xsl:for-each 
select="//datatable/actions">
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="type = 'custom'">
-                                                                       {
-                                                                       
sExtends: "select",
-                                                                       
sButtonText: "<xsl:value-of select="text"/>",
-                                                                       
fnClick: function (nButton, oConfig, oFlash) {
-                                                                       <xsl:if 
test="confirm_msg">
-                                                                               
var confirm_msg = "<xsl:value-of select="confirm_msg"/>";
-                                                                               
var r = confirm(confirm_msg);
-                                                                               
if (r != true) {
-                                                                               
return false;
-                                                                               
}
-                                                                       
</xsl:if>
-                                                                       
<xsl:value-of select="custom_code"/>
-                                                                       }
-
-                                                                       }
-                                                                       
<xsl:value-of select="phpgw:conditional(not(position() = last()), ',', '')"/>
-                                                               </xsl:when>
-                                                               <xsl:otherwise>
-                                                                       {
-                                                                       
sExtends: "select",
-                                                                       
sButtonText: "<xsl:value-of select="text"/>",
-                                                                       
fnClick: function (nButton, oConfig, oFlash) {
-                                                                       var 
receiptmsg = [];
-                                                                       var 
selected = fnGetSelected();
-                                                                       var 
numSelected = selected.length;
-
-                                                                       if 
(numSelected ==0){
-                                                                       
alert('None selected');
-                                                                       return 
false;
-                                                                       }
-
-                                                                       <xsl:if 
test="confirm_msg">
-                                                                               
var confirm_msg = "<xsl:value-of select="confirm_msg"/>";
-                                                                               
var r = confirm(confirm_msg);
-                                                                               
if (r != true) {
-                                                                               
return false;
-                                                                               
}
-                                                                       
</xsl:if>
-
-                                                                       var 
target = "<xsl:value-of select="target"/>";
-                                                                       
if(!target)
-                                                                       {
-                                                                       target 
= '_self';
-                                                                       }
-
-                                                                       if 
(numSelected &gt; 1){
-                                                                       target 
= '_blank';
-                                                                       }
-
-                                                                       var n = 
0;
-                                                                       for (; 
n &lt; numSelected; ) {
-                                                                       // 
console.log(selected[n]);
-                                                                       var 
aData = oTable.fnGetData( selected[n] ); //complete dataset from json returned 
from server
-                                                                       // 
console.log(aData);
-
-                                                                       
//delete stuff comes here
-                                                                       var 
action = "<xsl:value-of select="action"/>";
-
-                                                                       <xsl:if 
test="parameters">
-                                                                               
var parameters = <xsl:value-of select="parameters"/>;
-                                                                               
// console.log(parameters.parameter);
-                                                                               
var i = 0;
-                                                                               
len = parameters.parameter.length;
-                                                                               
for (; i &lt; len; ) {
-                                                                               
action += '&amp;' + parameters.parameter[i]['name'] + '=' + 
aData[parameters.parameter[i]['source']];
-                                                                               
i++;
-                                                                               
}
-                                                                       
</xsl:if>
-
-                                                                       // look 
for the word "DELETE" in URL
-                                                                       
if(substr_count(action,'delete')>0)
-                                                                       {
-                                                                       action 
+= "&amp;confirm=yes&amp;phpgw_return_as=json";
-                                                                       
execute_ajax(action, function(result){
-                                                                       
document.getElementById("message").innerHTML += '<br/>' + result;
-                                                                       
oTable.fnDraw();
-                                                                       });
-                                                                       }
-                                                                       else if 
(target == 'ajax')
-                                                                       {
-                                                                       action 
+= "&amp;phpgw_return_as=json";
-                                                                       
execute_ajax(action, function(result){
-                                                                       
document.getElementById("message").innerHTML += '<br/>' + result;
-                                                                       
oTable.fnDraw();
-                                                                       });
-                                                                       }
-                                                                       else
-                                                                       {
-                                                                       
window.open(action,target);
-                                                                       }
-                                                                       n++;
-                                                                       }
-                                                                       }
-                                                                       }
-                                                                       
<xsl:value-of select="phpgw:conditional(not(position() = last()), ',', '')"/>
-                                                               </xsl:otherwise>
-                                                       </xsl:choose>
-                                               </xsl:for-each>
-                                       </xsl:when>
-                               </xsl:choose>
-                               ]
-                               }
-                               ]
-                               };
-                       </xsl:when>
-                       <xsl:otherwise>
-                               JqueryPortico.TableTools = false;
-                       </xsl:otherwise>
-               </xsl:choose>
-            <![CDATA[
-                for(i=0;i < JqueryPortico.columns.length;i++)
-                {
-                    if (JqueryPortico.columns[i]['visible'] != 'undefined' && 
JqueryPortico.columns[i]['visible'] == false)
-                    {
-                        exclude_colvis.push(i);
-                    }
-                }
-
-                for(i=0;i < JqueryPortico.columns.length;i++)
-                {
-                    if (JqueryPortico.columns[i]['editor'] === true)
-                    {
-                        editor_cols.push({sUpdateURL:editor_action + 
'&field_name=' + JqueryPortico.columns[i]['data']});
-                    } else {
-                        editor_cols.push(null);
-                    }
-                }
-
-                if(JqueryPortico.TableTools)
-                {
-                    var sDom_def = 
'lCT<"clear">f<"top"ip>rt<"bottom"><"clear">';
-                }
-                else
-                {
-                    var sDom_def = '<"clear">lfrtip';
-                }
-
-                $(document).ready(function() {
-                    oTable = $('#datatable-container').dataTable({
-                        paginate: disablePagination ? false : true,
-                        processing: true,
-                        serverSide: true,
-                        responsive: true,
-                        deferRender: true,
-                        ajax: {
-                            url: ajax_url,
-                            data: {},
-                            type: 'GET'
-                        },
-                        fnServerParams: function ( aoData ) {
-                            if(typeof(aoData.order) != 'undefined')
-                            {
-                                var column = aoData.order[0].column;
-                                var dir = aoData.order[0].dir;
-                                var column_to_keep = aoData.columns[column];
-                                delete aoData.columns;
-                                aoData.columns = {};
-                                aoData.columns[column] = column_to_keep;
-                            }
-                        },
-                        fnRowCallback: function(nRow, aData, iDisplayIndex, 
iDisplayIndexFull) {
-                            if(typeof(aData['priority'])!= undefined && 
aData['priority'] > 0)
-                            {
-                                // nRow.addClass(''),
-                                // console.log(nRow),
-                                $('td', nRow).addClass('priority' + 
aData['priority']);
-                            }
-                        },
-                        fnDrawCallback: function () {
-                            oTable.makeEditable({
-                                sUpdateURL: editor_action,
-                                fnOnEditing: function(input){  
-                                    cell = input.parents("td");
-                                    id = 
input.parents("tr").children("td:first").text();
-                                    return true;
-                                },
-                                fnOnEdited: function(status, sOldValue, 
sNewCellDisplayValue, aPos0, aPos1, aPos2)
-                                {
-                                    
document.getElementById("message").innerHTML += '<br/>' + status;
-                                },
-                                oUpdateParameters: { 
-                                    "id": function(){ return id; }
-                                },
-                                aoColumns: editor_cols,
-                                sSuccessResponse: "IGNORE",
-                                fnShowError: function(){ return; }
-                            });
-                            if(typeof(addFooterDatatable) == 'function')
-                            {
-                                addFooterDatatable(oTable);
-                            }
-                        },
-                        fnFooterCallback: function ( nRow, aaData, iStart, 
iEnd, aiDisplay ) {
-                            if(typeof(addFooterDatatable2) == 'function')
-                            {
-                                addFooterDatatable2(nRow, aaData, iStart, 
iEnd, aiDisplay,oTable);
-                            }
-                        },//alternative
-                        fnInitComplete: function (oSettings, json)
-                        {
-                            if(typeof(initCompleteDatatable) == 'function')
-                            {
-                                initCompleteDatatable(oSettings, json, oTable);
-                            }
-                        },
-                        lengthMenu: JqueryPortico.i18n.lengthmenu(),
-                        language: JqueryPortico.i18n.datatable(),
-                        columns: JqueryPortico.columns,
-                        colVis: {
-                            exclude: exclude_colvis
-                        },
-                        dom: sDom_def,
-                        stateSave: true,
-                        stateDuration: -1, //sessionstorage
-                        tabIndex: 1,
-                        oTableTools: JqueryPortico.TableTools
-                    });
-                });
-            ]]>
-
-               /**
-               * Add left click action..
-               */
-               <xsl:if test="//left_click_action != ''">
-                       $("#datatable-container").on("click", "tbody tr", 
function() {
-                       var iPos = oTable.fnGetPosition( this );
-                       var aData = oTable.fnGetData( iPos ); //complete 
dataset from json returned from server
-                       try {
-                       <xsl:value-of select="//left_click_action"/>
-                       }
-                       catch(err) {
-                       document.getElementById("message").innerHTML = 
err.message;
-                       }
-                       });
-               </xsl:if>
-
-               /**
-               * Add dbl click action..
-               */
-               <xsl:if test="dbl_click_action != ''">
-                       $("#datatable-container").on("dblclick", "tr", 
function() {
-                       var iPos = oTable.fnGetPosition( this );
-                       var aData = oTable.fnGetData( iPos ); //complete 
dataset from json returned from server
-                       try {
-                       <xsl:value-of select="dbl_click_action"/>(aData);
-                       }
-                       catch(err) {
-                       document.getElementById("message").innerHTML = 
err.message;
-                       }
-                       });
-               </xsl:if>
-
-               <xsl:for-each select="//form/toolbar/item">
-                       <xsl:if test="type = 'filter'">
-                               $('select#<xsl:value-of 
select="name"/>').change( function()
-                               {
-                               <xsl:value-of select="extra"/>
-                               filterData('<xsl:value-of select="name"/>', 
$(this).val());
-                               });
-                       </xsl:if>
-                       <xsl:if test="type = 'date-picker'">
-                               var previous_<xsl:value-of select="id"/>;
-                               $("#filter_<xsl:value-of 
select="id"/>").on('keyup change', function ()
-                               {
-                               if ( $.trim($(this).val()) != 
$.trim(previous_<xsl:value-of select="id"/>) )
-                               {
-                               filterData('<xsl:value-of select="id"/>', 
$(this).val());
-                               previous_<xsl:value-of select="id"/> = 
$(this).val();
-                               }
-                               });
-                       </xsl:if>
-                       <xsl:if test="type = 'autocomplete'">
-                               $(document).ready(function() {
-                               
$('input.ui-autocomplete-input#filter_<xsl:value-of 
select="name"/>_name').on('autocompleteselect', function(event, ui){
-                               filterData('filter_<xsl:value-of 
select="name"/>_id', ui.item.value);
-                               });
-                               
$('input.ui-autocomplete-input#filter_<xsl:value-of 
select="name"/>_name').on('keyup', function(){
-                               if ($(this).val() == ''){
-                               $('#filter_<xsl:value-of 
select="name"/>_id').val('');
-                               filterData('filter_<xsl:value-of 
select="name"/>_id', $(this).val());
-                               }
-                               });
-                               });
-                       </xsl:if>
-               </xsl:for-each>
-    <![CDATA[
-            function fnGetSelected( )
-            {
-                var aReturn = new Array();
-                var aTrs = oTable.fnGetNodes();
-                for ( var i=0 ; i < aTrs.length ; i++ )
-                {
-                    if ( $(aTrs[i]).hasClass('selected') )
-                    {
-                        aReturn.push( i );
-                    }
-                }
-                return aReturn;
-            }
-
-            function execute_ajax(requestUrl, callback, data,type, dataType)
-            {
-                type = typeof type !== 'undefined' ? type : 'POST';
-                dataType = typeof dataType !== 'undefined' ? dataType : 'html';
-                data = typeof data !== 'undefined' ? data : {};
-
-                $.ajax({
-                    type: type,
-                    dataType: dataType,
-                    data: data,
-                    url: requestUrl,
-                    success: function(result) {
-                        callback(result);
-                    }
-                });
-            }
-
-            function substr_count( haystack, needle, offset, length )
-            {
-                var pos = 0, cnt = 0;
-
-                haystack += '';
-                needle += '';
-                if(isNaN(offset)) offset = 0;
-                if(isNaN(length)) length = 0;
-                offset--;
-
-                while( (offset = haystack.indexOf(needle, offset+1)) != -1 )
-                {
-                    if(length > 0 && (offset+needle.length) > length)
-                    {
-                        return false;
-                    }
-                    else
-                    {
-                        cnt++;
-                    }
-                }
-                return cnt;
-            }
-        });
-
-        function searchData(query)
-        {
-            var api = oTable.api();
-            api.search( query ).draw();
-        }
-
-        function filterData(param, value)
-        {
-            oTable.dataTableSettings[0]['ajax']['data'][param] = value;
-            oTable.fnDraw();
-        }
-
-        function clearFilterParam(param)
-        {
-            oTable.dataTableSettings[0]['ajax']['data'][param] = '';
-        }
-
-        function reloadData()
-        {
-            var api = oTable.api();
-            api.ajax.reload();
-        }
-    ]]>
-       </script>
-
-       <script>
-               <xsl:choose>
-                       <xsl:when test="//js_lang != ''">
-                               var lang = <xsl:value-of select="//js_lang"/>;
-                       </xsl:when>
-               </xsl:choose>
-       </script>
-</xsl:template>
\ No newline at end of file

Modified: branches/dev-syncromind/frontend/js/jquery/entity.list.js
===================================================================
--- branches/dev-syncromind/frontend/js/jquery/entity.list.js   2016-02-03 
21:53:52 UTC (rev 14694)
+++ branches/dev-syncromind/frontend/js/jquery/entity.list.js   2016-02-04 
12:59:07 UTC (rev 14695)
@@ -11,8 +11,8 @@
 
 var startTicket = function(oArgs, parameters) {
        
-       var oTT = TableTools.fnGetInstance( 'datatable-container_0' );
-       var selected = oTT.fnGetSelectedData();
+       var api =$( '#datatable-container_0' ).dataTable().api();
+       var selected = api.rows( { selected: true } ).data();
 
        if (selected.length == 0){
                alert('None selected');

Modified: branches/dev-syncromind/phpgwapi/inc/class.uicommon_jquery.inc.php
===================================================================
--- branches/dev-syncromind/phpgwapi/inc/class.uicommon_jquery.inc.php  
2016-02-03 21:53:52 UTC (rev 14694)
+++ branches/dev-syncromind/phpgwapi/inc/class.uicommon_jquery.inc.php  
2016-02-04 12:59:07 UTC (rev 14695)
@@ -81,8 +81,8 @@
                        phpgwapi_jquery::load_widget('core');
                        self::add_javascript('phpgwapi', 'DataTables', 
'media/js/jquery.dataTables.min.js');
                        self::add_javascript('phpgwapi', 'DataTables', 
'extensions/Responsive/js/dataTables.responsive.js');
-                       self::add_javascript('phpgwapi', 'DataTables', 
'extensions/ColVis/js/dataTables.colVis.min.js');
-                       self::add_javascript('phpgwapi', 'DataTables', 
'extensions/TableTools/js/dataTables.tableTools.js');
+//                     self::add_javascript('phpgwapi', 'DataTables', 
'extensions/ColVis/js/dataTables.colVis.min.js');
+//                     self::add_javascript('phpgwapi', 'DataTables', 
'extensions/TableTools/js/dataTables.tableTools.js');
 
                        //Buttons
                        self::add_javascript('phpgwapi', 'DataTables', 
'extensions/Buttons/js/dataTables.buttons.min.js');
@@ -96,9 +96,9 @@
 
                        
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/DataTables/media/css/jquery.dataTables.css');
                        
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/DataTables/extensions/Responsive/css/dataTables.responsive.css');
-                       
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/DataTables/extensions/ColVis/css/dataTables.colVis.min.css');
-                       
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/DataTables/extensions/ColVis/css/dataTables.colvis.jqueryui.css');
-                       
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/DataTables/extensions/TableTools/css/dataTables.tableTools.css');
+//                     
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/DataTables/extensions/ColVis/css/dataTables.colVis.min.css');
+//                     
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/DataTables/extensions/ColVis/css/dataTables.colvis.jqueryui.css');
+//                     
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/DataTables/extensions/TableTools/css/dataTables.tableTools.css');
                        
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/DataTables/extensions/Buttons/css/buttons.dataTables.css');
 
                        //pop up script

Modified: branches/dev-syncromind/phpgwapi/js/jquery/common.js
===================================================================
--- branches/dev-syncromind/phpgwapi/js/jquery/common.js        2016-02-03 
21:53:52 UTC (rev 14694)
+++ branches/dev-syncromind/phpgwapi/js/jquery/common.js        2016-02-04 
12:59:07 UTC (rev 14695)
@@ -215,7 +215,8 @@
        options = options || {};
        var disablePagination = options['disablePagination'] || false;
        var disableFilter = options['disableFilter'] || false;
-       var TableTools_def = options['TableTools'] || false;
+       var buttons_def = options['TableTools'] || false;
+       var select = false;
        var order = options['order'] || [0, 'desc'];
        var responsive = options['responsive'] || false;
 
@@ -232,9 +233,11 @@
                var ajax_def = false;
                var serverSide_def = false;
        }
-       if (TableTools_def)
+       if (buttons_def)
        {
-               var sDom_def = 'T<"clear">lfrtip';
+               var sDom_def = 'B<"clear">lfrtip';
+//             var sDom_def = 'Bfrtlip';
+               select = true;
        }
        else
        {
@@ -253,6 +256,7 @@
                serverSide: serverSide_def,
                responsive: responsive,
                deferRender: true,
+               select: select,
                data: data,
                ajax: ajax_def,
                fnServerParams: function (aoData) {
@@ -285,10 +289,6 @@
                //      lengthMenu:             JqueryPortico.i18n.lengthmenu(),
                //      language:               JqueryPortico.i18n.datatable(),
                columns: columns,
-               //      colVis: {
-               //                                      exclude: exclude_colvis
-               //      },
-               //      dom:                    
'lCT<"clear">f<"top"ip>rt<"bottom"><"clear">',
                //      stateSave:              true,
                //      stateDuration: -1, //sessionstorage
                //      tabIndex:               1,
@@ -303,8 +303,13 @@
                        }
                },
                sDom: sDom_def,
-               oTableTools: TableTools_def
+               buttons: buttons_def
        });
+       $("#" + container + ' tbody').on( 'click', 'tr', function () {
+                       var api = oTable.api();
+                       var selectedRows = api.rows( { selected: true } 
).count();
+                       api.buttons( '.record' ).enable( selectedRows > 0 );
+        } );
 
 
 //     });

Modified: branches/dev-syncromind/phpgwapi/templates/base/datatable_inline.xsl
===================================================================
--- branches/dev-syncromind/phpgwapi/templates/base/datatable_inline.xsl        
2016-02-03 21:53:52 UTC (rev 14694)
+++ branches/dev-syncromind/phpgwapi/templates/base/datatable_inline.xsl        
2016-02-04 12:59:07 UTC (rev 14695)
@@ -75,110 +75,91 @@
                
        var oTable<xsl:number value="($num - 1)"/> = null;
                
-<![CDATA[
-                       TableTools.BUTTONS.download = {
-                               "sAction": "text",
-                               "sTag": "default",
-                               "sFieldBoundary": "",
-                               "sFieldSeperator": "\t",
-                               "sNewLine": "<br>",
-                               "sToolTip": "",
-                               "sButtonClass": "DTTT_button_text",
-                               "sButtonClassHover": "DTTT_button_text_hover",
-                               "sButtonText": "Download",
-                               "mColumns": "all",
-                               "bHeader": true,
-                               "bFooter": true,
-                               "sDiv": "",
-                               "fnMouseover": null,
-                               "fnMouseout": null,
-                               "fnClick": function( nButton, oConfig ) {
-                                       var oParams = 
this.s.dt.oApi._fnAjaxParameters( this.s.dt );
-                                       oParams.length = -1;
-                                       oParams.columns = null;
-                                       oParams.start = null;
-                                       oParams.draw = null;
-                                       var iframe = 
document.createElement('iframe');
-                                       iframe.style.height = "0px";
-                                       iframe.style.width = "0px";
-                                       iframe.src = 
oConfig.sUrl+"?"+$.param(oParams) + "&export=1";
-                                       if(confirm("This will take some 
time..."))
-                                       {
-                                               document.body.appendChild( 
iframe );
-                                       }
-                               },
-                               "fnSelect": null,
-                               "fnComplete": null,
-                               "fnInit": null
-                       };
-       ]]>
-       
        <xsl:choose>
                        <xsl:when test="$tabletools">
-                                       JqueryPortico.TableTools<xsl:number 
value="($num - 1)"/> =      {
-                                                       "sSwfPath": 
"phpgwapi/js/DataTables/extensions/TableTools/swf/copy_csv_xls_pdf.swf",
-                                                       "sRowSelect": "multi",
-                                                       "aButtons":
+                                       JqueryPortico.buttons<xsl:number 
value="($num - 1)"/> =         {
+                                                       buttons: 
                                                                [
                                                                        
<xsl:for-each select="$tabletools">
                                                                                
<xsl:choose>
                                                                                
        <xsl:when test="my_name = 'select_all'">
                                                                                
                {
-                                                                               
                        sExtends: 'select_all',
-                                                                               
                        fnClick: function (nButton, oConfig, oFlash) {
-                                                                               
                                TableTools.fnGetInstance('<xsl:value-of 
select="$container"/>').fnSelectAll();
-                                                                               
                                //In case there are checkboxes
+                                                                               
                        text: "<xsl:value-of select="php:function('lang', 
'select all')"/>",
+                                                                               
                        action: function () {
+                                                                               
                                var api = oTable<xsl:number value="($num - 
1)"/>.api();
+                                                                               
                                api.rows().select();
                                                                                
                                $(".mychecks").each(function()
                                                                                
                                {
-                                                                               
                                         $(this).prop("checked", true);
+                                                                               
                                        $(this).prop("checked", true);
                                                                                
                                });
                                                                                
                        }
                                                                                
                }<xsl:value-of select="phpgw:conditional(not(position() = 
last()), ',', '')"/>                                                            
                              
                                                                                
        </xsl:when>
                                                                                
        <xsl:when test="my_name = 'select_none'">
                                                                                
                {
-                                                                               
                        sExtends: 'select_none',
-                                                                               
                        fnClick: function (nButton, oConfig, oFlash) {
-                                                                               
                                TableTools.fnGetInstance('<xsl:value-of 
select="$container"/>').fnSelectNone();
-                                                                               
                                //In case there are checkboxes
+                                                                               
                        text: "<xsl:value-of select="php:function('lang', 
'select none')"/>",
+                                                                               
                        action: function () {
+                                                                               
                                var api = oTable<xsl:number value="($num - 
1)"/>.api();
+                                                                               
                                api.rows().deselect();
                                                                                
                                $(".mychecks").each(function()
                                                                                
                                {
-                                                                               
                                         $(this).prop("checked", false);
+                                                                               
                                        $(this).prop("checked", false);
                                                                                
                                });
                                                                                
                        }
                                                                                
                }<xsl:value-of select="phpgw:conditional(not(position() = 
last()), ',', '')"/>                                                            
                              
                                                                                
        </xsl:when>
                                                                                
        <xsl:when test="my_name = 'download'">
                                                                                
                {
-                                                                               
                        "sExtends": "download",
-                                                                               
                        "sButtonText": "Download",
-                                                                               
                        "sUrl": '<xsl:value-of select="download"/>'
+                                                                               
                        text: "<xsl:value-of select="php:function('lang', 
'download')"/>",
+                                                                               
                        action: function (e, dt, node, config) {
+                                                                               
                        var sUrl = '<xsl:value-of select="download"/>';
+                                                                               
                        var addtional_filterdata = oTable<xsl:number 
value="($num - 1)"/>.dataTableSettings[0]['ajax']['data'];
+                                                                               
                        <![CDATA[
+                                                                               
                                var oParams = {};
+                                                                               
                                oParams.length = -1;
+                                                                               
                                oParams.columns = null;
+                                                                               
                                oParams.start = null;
+                                                                               
                                oParams.draw = null;
+                                                                               
                                for (var attrname in addtional_filterdata)
+                                                                               
                                {
+                                                                               
                                        oParams[attrname] = 
addtional_filterdata[attrname];
+                                                                               
                                }
+                                                                               
                                var iframe = document.createElement('iframe');
+                                                                               
                                iframe.style.height = "0px";
+                                                                               
                                iframe.style.width = "0px";
+                                                                               
                                iframe.src = sUrl+"&"+$.param(oParams) + 
"&export=1";
+                                                                               
                                if(confirm("This will take some time..."))
+                                                                               
                                {
+                                                                               
                                        document.body.appendChild( iframe );
+                                                                               
                                }
+                                                                               
                                ]]>
+                                                                               
                        }
                                                                                
                }<xsl:value-of select="phpgw:conditional(not(position() = 
last()), ',', '')"/>                                                            
                              
                                                                                
        </xsl:when>
                                                                                
        <xsl:when test="type = 'custom'">
                                                                                
                {
-                                                                               
                        sExtends:               "select",
-                                                                               
                        sButtonText:    "<xsl:value-of select="text"/>",
-                                                                               
                        fnClick:                function (nButton, oConfig, 
oFlash) {
-
-                                                                               
                                                        <xsl:if 
test="confirm_msg">
-                                                                               
                                                                var confirm_msg 
= "<xsl:value-of select="confirm_msg"/>";
-                                                                               
                                                                var r = 
confirm(confirm_msg);
-                                                                               
                                                                if (r != true) {
-                                                                               
                                                                        return 
false;
-                                                                               
                                                                }
-                                                                               
                                                        </xsl:if>
-
-                                                                               
                                                        <xsl:value-of 
select="custom_code"/>    
+                                                                               
                        text: "<xsl:value-of select="text"/>",
+                                                                               
                        enabled: false,
+                                                                               
                        className: 'record',
+                                                                               
                        action: function (e, dt, node, config) {
+                                                                               
                                <xsl:if test="confirm_msg">
+                                                                               
                                        var confirm_msg = "<xsl:value-of 
select="confirm_msg"/>";
+                                                                               
                                        var r = confirm(confirm_msg);
+                                                                               
                                        if (r != true) {
+                                                                               
                                                return false;
                                                                                
                                        }
+                                                                               
                                </xsl:if>
+                                                                               
                                <xsl:value-of select="custom_code"/>
+                                                                               
                        }
 
                                                                                
                }<xsl:value-of select="phpgw:conditional(not(position() = 
last()), ',', '')"/>
                                                                                
        </xsl:when>
                                                                                
        <xsl:otherwise>
                                                                                
                {
-                                                                               
                        sExtends:               "select",
-                                                                               
                        sButtonText:    "<xsl:value-of select="text"/>",
-                                                                               
                        fnClick:                function (nButton, oConfig, 
oFlash) {
+                                                                               
                        text: "<xsl:value-of select="text"/>",
+                                                                               
                        className: 'record',
+                                                                               
                        enabled: false,
+                                                                               
                        action: function (e, dt, node, config) {
                                                                                
                                                        var receiptmsg = [];
                                                                                
                                                        var selected = 
JqueryPortico.fnGetSelected(oTable<xsl:number value="($num - 1)"/>);
                                                                                
                                                        var numSelected =       
selected.length;
@@ -342,9 +323,9 @@
                                options<xsl:number value="($num - 
1)"/>.responsive = <xsl:value-of select="responsive" />;
                        </xsl:if>
                </xsl:for-each>
-               if (JqueryPortico.TableTools<xsl:number value="($num - 1)"/>)
+               if (JqueryPortico.buttons<xsl:number value="($num - 1)"/>)
                {
-                       options<xsl:number value="($num - 1)"/>.TableTools = 
JqueryPortico.TableTools<xsl:number value="($num - 1)"/>;
+                       options<xsl:number value="($num - 1)"/>.TableTools = 
JqueryPortico.buttons<xsl:number value="($num - 1)"/>;
                }
 
                <xsl:variable name="dataset">

Modified: branches/dev-syncromind/phpgwapi/templates/base/datatable_jquery.xsl
===================================================================
--- branches/dev-syncromind/phpgwapi/templates/base/datatable_jquery.xsl        
2016-02-03 21:53:52 UTC (rev 14694)
+++ branches/dev-syncromind/phpgwapi/templates/base/datatable_jquery.xsl        
2016-02-04 12:59:07 UTC (rev 14695)
@@ -6,7 +6,7 @@
        <func:result>
                <xsl:choose>
                        <xsl:when test="$test">
-                       <xsl:value-of select="$true"/>
+                               <xsl:value-of select="$true"/>
                        </xsl:when>
                        <xsl:otherwise>
                                <xsl:value-of select="$false"/>
@@ -42,45 +42,45 @@
 <xsl:template match="toolbar" xmlns:php="http://php.net/xsl";>
        <style id='toggle-box-css' type='text/css' scoped='scoped'>
                .toggle-box {
-                 display: none;
+               display: none;
                }
 
                .toggle-box + label {
-                 cursor: pointer;
-                 display: block;
-                 font-weight: bold;
-                 line-height: 21px;
-                 margin-bottom: 5px;
+               cursor: pointer;
+               display: block;
+               font-weight: bold;
+               line-height: 21px;
+               margin-bottom: 5px;
                }
 
                .toggle-box + label + #toolbar {
-                 display: none;
-                 margin-bottom: 10px;
+               display: none;
+               margin-bottom: 10px;
                }
 
                .toggle-box:checked + label + #toolbar {
-                 display: block;
+               display: block;
                }
 
                .toggle-box + label:before {
-                 background-color: #4F5150;
-                 -webkit-border-radius: 10px;
-                 -moz-border-radius: 10px;
-                 border-radius: 10px;
-                 color: #FFFFFF;
-                 content: "+";
-                 display: block;
-                 float: left;
-                 font-weight: bold;
-                 height: 20px;
-                 line-height: 20px;
-                 margin-right: 5px;
-                 text-align: center;
-                 width: 20px;
+               background-color: #4F5150;
+               -webkit-border-radius: 10px;
+               -moz-border-radius: 10px;
+               border-radius: 10px;
+               color: #FFFFFF;
+               content: "+";
+               display: block;
+               float: left;
+               font-weight: bold;
+               height: 20px;
+               line-height: 20px;
+               margin-right: 5px;
+               text-align: center;
+               width: 20px;
                }
 
                .toggle-box:checked + label:before {
-                 content: "\2212";
+               content: "\2212";
                }
        </style>
 
@@ -112,7 +112,9 @@
                                                        <td>
                                                                <xsl:if 
test="name">
                                                                        <label>
-                                                                               
<xsl:attribute name="for"><xsl:value-of select="phpgw:conditional(not(name), 
'', name)"/></xsl:attribute>
+                                                                               
<xsl:attribute name="for">
+                                                                               
        <xsl:value-of select="phpgw:conditional(not(name), '', name)"/>
+                                                                               
</xsl:attribute>
                                                                                
<xsl:value-of select="phpgw:conditional(not(text), '', text)"/>
                                                                        </label>
                                                                </xsl:if>
@@ -129,77 +131,85 @@
                                                                        <td 
class="auto">
                                                                                
<div class="auto">
                                                                                
        <input id="filter_{name}_name" name="filter_{name}_name" type="text">
-                                                                               
                <xsl:attribute name="value"><xsl:value-of 
select="../../../filters/*[local-name() = $filter_key_name]"/></xsl:attribute>
+                                                                               
                <xsl:attribute name="value">
+                                                                               
                        <xsl:value-of select="../../../filters/*[local-name() = 
$filter_key_name]"/>
+                                                                               
                </xsl:attribute>
                                                                                
        </input>
                                                                                
        <input id="filter_{name}_id" name="filter_{name}_id" type="hidden">
-                                                                               
                <xsl:attribute name="value"><xsl:value-of 
select="../../../filters/*[local-name() = $filter_key_id]"/></xsl:attribute>
+                                                                               
                <xsl:attribute name="value">
+                                                                               
                        <xsl:value-of select="../../../filters/*[local-name() = 
$filter_key_id]"/>
+                                                                               
                </xsl:attribute>
                                                                                
        </input>
                                                                                
        <div id="filter_{name}_container"/>
                                                                                
</div>
                                                                                
<script type="text/javascript">
                                                                                
        $(document).ready(function() {
-                                                                               
                var app = "<xsl:value-of select="app"/>";
-                                                                               
                var name = "<xsl:value-of select="name"/>";
-                                                                               
                var ui = "<xsl:value-of select="ui"/>";
-                                                                               
                var depends = false;
-                                                                               
                var filter_depends = "";
-                                                                               
                var filter_selected = "";
+                                                                               
        var app = "<xsl:value-of select="app"/>";
+                                                                               
        var name = "<xsl:value-of select="name"/>";
+                                                                               
        var ui = "<xsl:value-of select="ui"/>";
+                                                                               
        var depends = false;
+                                                                               
        var filter_depends = "";
+                                                                               
        var filter_selected = "";
                                                                                
        <xsl:if test="depends">
                                                                                
                depends = "<xsl:value-of select="depends"/>";
                                                                                
                //filter_depends = $('#filer_'+depends+'_id').val();
                                                                                
                $("#filter_"+depends+"_name").on("autocompleteselect", 
function(event, i){
-                                                                               
                        var filter_select = i.item.value;
-                                                                               
                        filter_depends = i.item.value;
-                                                                               
                        if (filter_select != filter_selected){
-                                                                               
                                if (filter_depends) {
+                                                                               
                var filter_select = i.item.value;
+                                                                               
                filter_depends = i.item.value;
+                                                                               
                if (filter_select != filter_selected){
+                                                                               
                if (filter_depends) {
                                                                                
                                        <![CDATA[
                                                                                
                                                
JqueryPortico.autocompleteHelper('index.php?menuaction=booking.ui'+ui+'.index&phpgw_return_as=json&filter_'+depends+'_id='+filter_depends+'&',
                                                                                
                                                                                
                                        'filter_'+name+'_name', 
'filter_'+name+'_id', 'filter_'+name+'_container');
                                                                                
                                        ]]>
-                                                                               
                                }
-                                                                               
                                
oTable.dataTableSettings[0]['ajax']['data']['filter_'+name+'_id'] = "";
-                                                                               
                                $('#filter_'+name+'_name').val('');
-                                                                               
                                $('#filter_'+name+'_id').val('');
-                                                                               
                                filter_selected = filter_select;
-                                                                               
                        }
+                                                                               
                }
+                                                                               
                
oTable.dataTableSettings[0]['ajax']['data']['filter_'+name+'_id'] = "";
+                                                                               
                $('#filter_'+name+'_name').val('');
+                                                                               
                $('#filter_'+name+'_id').val('');
+                                                                               
                filter_selected = filter_select;
+                                                                               
                }
                                                                                
                });
                                                                                
                $("#filter_"+depends+"_name").on("keyup", function(){
-                                                                               
                        if ($(this).val() == ''){
-                                                                               
                                filter_depends = false;
-                                                                               
                                if (!filter_depends) {
+                                                                               
                if ($(this).val() == ''){
+                                                                               
                filter_depends = false;
+                                                                               
                if (!filter_depends) {
                                                                                
                                        <![CDATA[
                                                                                
                                                
JqueryPortico.autocompleteHelper('index.php?menuaction=booking.ui'+ui+'.index&phpgw_return_as=json&',
                                                                                
                                                                                
                                        'filter_'+name+'_name', 
'filter_'+name+'_id', 'filter_'+name+'_container');
                                                                                
                                        ]]>
-                                                                               
                                }
-                                                                               
                                filter_selected = "";
-                                                                               
                                
oTable.dataTableSettings[0]['ajax']['data']['filter_'+name+'_id'] = "";
-                                                                               
                                $('#filter_'+name+'_name').val('');
-                                                                               
                                $('#filter_'+name+'_id').val('');
-                                                                               
                        }
+                                                                               
                }
+                                                                               
                filter_selected = "";
+                                                                               
                
oTable.dataTableSettings[0]['ajax']['data']['filter_'+name+'_id'] = "";
+                                                                               
                $('#filter_'+name+'_name').val('');
+                                                                               
                $('#filter_'+name+'_id').val('');
+                                                                               
                }
                                                                                
                });
                                                                                
        </xsl:if>
-                                                                               
                if (filter_depends) {
+                                                                               
        if (filter_depends) {
                                                                                
                        <![CDATA[
                                                                                
                                
JqueryPortico.autocompleteHelper('index.php?menuaction=booking.ui'+ui+'.index&phpgw_return_as=json&filter_'+depends+'_id='+filter_depends+'&',
                                                                                
                                                                                
                        'filter_'+name+'_name', 'filter_'+name+'_id', 
'filter_'+name+'_container');
                                                                                
                        ]]>
-                                                                               
                }else{
+                                                                               
        }else{
                                                                                
                        <![CDATA[
                                                                                
                                
JqueryPortico.autocompleteHelper('index.php?menuaction=booking.ui'+ui+'.index&phpgw_return_as=json&',
                                                                                
                                                                                
                        'filter_'+name+'_name', 'filter_'+name+'_id', 
'filter_'+name+'_container');
                                                                                
                        ]]>
-                                                                               
                }
+                                                                               
        }
                                                                                
        });
                                                                                
</script>
                                                                        </td>
                                                                </xsl:when>
                                                                <xsl:when 
test="type = 'filter'">
                                                                        <td 
valign="top">
-                                                                               
<xsl:variable name="name"><xsl:value-of select="name"/></xsl:variable>
+                                                                               
<xsl:variable name="name">
+                                                                               
        <xsl:value-of select="name"/>
+                                                                               
</xsl:variable>
                                                                                
<select id="{$name}" name="{$name}">
                                                                                
        <xsl:for-each select="list">
-                                                                               
                <xsl:variable name="id"><xsl:value-of 
select="id"/></xsl:variable>
+                                                                               
                <xsl:variable name="id">
+                                                                               
                        <xsl:value-of select="id"/>
+                                                                               
                </xsl:variable>
                                                                                
                <xsl:choose>
                                                                                
                        <xsl:when test="id = 'NEW'">
                                                                                
                                <option value="{$id}" selected="selected">
@@ -230,13 +240,17 @@
                                                                                
<input type="button" class="pure-button pure-button-primary">
                                                                                
        <xsl:choose>
                                                                                
                <xsl:when test="onclick">
-                                                                               
                        <xsl:attribute name="onclick"><xsl:value-of 
select="onclick"/></xsl:attribute>
+                                                                               
                        <xsl:attribute name="onclick">
+                                                                               
                                <xsl:value-of select="onclick"/>
+                                                                               
                        </xsl:attribute>
                                                                                
                </xsl:when>
                                                                                
                <xsl:otherwise>
                                                                                
                        <xsl:attribute 
name="onclick">javascript:window.open('<xsl:value-of select="href"/>', 
"_self");</xsl:attribute>
                                                                                
                </xsl:otherwise>
                                                                                
        </xsl:choose>
-                                                                               
        <xsl:attribute name="value"><xsl:value-of 
select="value"/></xsl:attribute>
+                                                                               
        <xsl:attribute name="value">
+                                                                               
                <xsl:value-of select="value"/>
+                                                                               
        </xsl:attribute>
                                                                                
</input>
                                                                                
<!--a href="{href}">
                                                                                
        <xsl:if test="onclick">
@@ -251,27 +265,51 @@
                                                                <xsl:when 
test="type = 'hidden'">
                                                                        <td 
valign="top">
                                                                                
<input>
-                                                                               
        <xsl:attribute name="type"><xsl:value-of 
select="phpgw:conditional(not(type), '', type)"/></xsl:attribute>
-                                                                               
        <xsl:attribute name="id"><xsl:value-of 
select="phpgw:conditional(not(id), '', id)"/></xsl:attribute>
-                                                                               
        <xsl:attribute name="name"><xsl:value-of 
select="phpgw:conditional(not(name), '', name)"/></xsl:attribute>
-                                                                               
        <xsl:attribute name="value"><xsl:value-of 
select="phpgw:conditional(not(value), '', value)"/></xsl:attribute>
+                                                                               
        <xsl:attribute name="type">
+                                                                               
                <xsl:value-of select="phpgw:conditional(not(type), '', type)"/>
+                                                                               
        </xsl:attribute>
+                                                                               
        <xsl:attribute name="id">
+                                                                               
                <xsl:value-of select="phpgw:conditional(not(id), '', id)"/>
+                                                                               
        </xsl:attribute>
+                                                                               
        <xsl:attribute name="name">
+                                                                               
                <xsl:value-of select="phpgw:conditional(not(name), '', name)"/>
+                                                                               
        </xsl:attribute>
+                                                                               
        <xsl:attribute name="value">
+                                                                               
                <xsl:value-of select="phpgw:conditional(not(value), '', 
value)"/>
+                                                                               
        </xsl:attribute>
                                                                                
</input>
                                                                        </td>
                                                                </xsl:when>
                                                                <xsl:when 
test="type = 'label'">
                                                                        <td 
valign="top">
-                                                                               
<label><xsl:attribute name="id"><xsl:value-of 
select="phpgw:conditional(not(id), '', id)"/></xsl:attribute></label>
+                                                                               
<label>
+                                                                               
        <xsl:attribute name="id">
+                                                                               
                <xsl:value-of select="phpgw:conditional(not(id), '', id)"/>
+                                                                               
        </xsl:attribute>
+                                                                               
</label>
                                                                        </td>
                                                                </xsl:when>
                                                                <xsl:otherwise>
                                                                        <td 
valign="top">
                                                                                
<input id="innertoolbar">
-                                                                               
        <xsl:attribute name="type"><xsl:value-of 
select="phpgw:conditional(not(type), '', type)"/></xsl:attribute>
-                                                                               
        <xsl:attribute name="name"><xsl:value-of 
select="phpgw:conditional(not(name), '', name)"/></xsl:attribute>
-                                                                               
        <xsl:attribute name="onclick"><xsl:value-of 
select="phpgw:conditional(not(onClick), '', onClick)"/></xsl:attribute>
-                                                                               
        <xsl:attribute name="value"><xsl:value-of 
select="phpgw:conditional(not(value), '', value)"/></xsl:attribute>
-                                                                               
        <xsl:attribute name="href"><xsl:value-of 
select="phpgw:conditional(not(href), '', href)"/></xsl:attribute>
-                                                                               
        <xsl:attribute name="class"><xsl:value-of 
select="phpgw:conditional(not(class), '', class)"/></xsl:attribute>
+                                                                               
        <xsl:attribute name="type">
+                                                                               
                <xsl:value-of select="phpgw:conditional(not(type), '', type)"/>
+                                                                               
        </xsl:attribute>
+                                                                               
        <xsl:attribute name="name">
+                                                                               
                <xsl:value-of select="phpgw:conditional(not(name), '', name)"/>
+                                                                               
        </xsl:attribute>
+                                                                               
        <xsl:attribute name="onclick">
+                                                                               
                <xsl:value-of select="phpgw:conditional(not(onClick), '', 
onClick)"/>
+                                                                               
        </xsl:attribute>
+                                                                               
        <xsl:attribute name="value">
+                                                                               
                <xsl:value-of select="phpgw:conditional(not(value), '', 
value)"/>
+                                                                               
        </xsl:attribute>
+                                                                               
        <xsl:attribute name="href">
+                                                                               
                <xsl:value-of select="phpgw:conditional(not(href), '', href)"/>
+                                                                               
        </xsl:attribute>
+                                                                               
        <xsl:attribute name="class">
+                                                                               
                <xsl:value-of select="phpgw:conditional(not(class), '', 
class)"/>
+                                                                               
        </xsl:attribute>
                                                                                
</input>
                                                                        </td>
                                                                </xsl:otherwise>
@@ -293,11 +331,21 @@
                                        <xsl:for-each select="item">
                                                <td valign="top">
                                                        <input 
id="innertoolbar">
-                                                               <xsl:attribute 
name="type"><xsl:value-of select="phpgw:conditional(not(type), '', 
type)"/></xsl:attribute>
-                                                               <xsl:attribute 
name="name"><xsl:value-of select="phpgw:conditional(not(name), '', 
name)"/></xsl:attribute>
-                                                               <xsl:attribute 
name="onclick"><xsl:value-of select="phpgw:conditional(not(onClick), '', 
onClick)"/></xsl:attribute>
-                                                               <xsl:attribute 
name="value"><xsl:value-of select="phpgw:conditional(not(value), '', 
value)"/></xsl:attribute>
-                                                               <xsl:attribute 
name="href"><xsl:value-of select="phpgw:conditional(not(href), '', 
href)"/></xsl:attribute>
+                                                               <xsl:attribute 
name="type">
+                                                                       
<xsl:value-of select="phpgw:conditional(not(type), '', type)"/>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="name">
+                                                                       
<xsl:value-of select="phpgw:conditional(not(name), '', name)"/>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="onclick">
+                                                                       
<xsl:value-of select="phpgw:conditional(not(onClick), '', onClick)"/>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="value">
+                                                                       
<xsl:value-of select="phpgw:conditional(not(value), '', value)"/>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="href">
+                                                                       
<xsl:value-of select="phpgw:conditional(not(href), '', href)"/>
+                                                               </xsl:attribute>
                                                        </input>
                                                </td>
                                        </xsl:for-each>
@@ -339,7 +387,9 @@
                                                <xsl:for-each 
select="//top-toolbar/fields/field">
                                                        <xsl:choose>
                                                                <xsl:when 
test="type='button'">
-                                                                       <button 
id="{id}" type="{type}" class="pure-button pure-button-primary"><xsl:value-of 
select="value"/></button>
+                                                                       <button 
id="{id}" type="{type}" class="pure-button pure-button-primary">
+                                                                               
<xsl:value-of select="value"/>
+                                                                       
</button>
                                                                </xsl:when>
                                                        </xsl:choose>
                                                </xsl:for-each>
@@ -433,66 +483,66 @@
        <form id="custom_values_form" name="custom_values_form"></form>
        <script>
                var columns = [
-                       <xsl:for-each select="//datatable/field">
-                               {
-                                       data: "<xsl:value-of select="key"/>",
-                                       <xsl:if test="className">
-                                               <xsl:choose>
-                                                       <xsl:when 
test="className='right' or className='center'">
-                                                               <xsl:if 
test="className ='right'">
-                                                                       class: 
'dt-right',
-                                                               </xsl:if>
-                                                               <xsl:if 
test="className ='center'">
-                                                                       class: 
'dt-center',
-                                                               </xsl:if>
-                                                       </xsl:when>
-                                                       <xsl:otherwise>
-                                                               class: 
"<xsl:value-of select="className"/>",
-                                                       </xsl:otherwise>
-                                               </xsl:choose>
+               <xsl:for-each select="//datatable/field">
+                       {
+                       data: "<xsl:value-of select="key"/>",
+                       <xsl:if test="className">
+                               <xsl:choose>
+                                       <xsl:when test="className='right' or 
className='center'">
+                                               <xsl:if test="className 
='right'">
+                                                       class: 'dt-right',
+                                               </xsl:if>
+                                               <xsl:if test="className 
='center'">
+                                                       class: 'dt-center',
+                                               </xsl:if>
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               class: "<xsl:value-of 
select="className"/>",
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </xsl:if>
+                       orderable: <xsl:value-of 
select="phpgw:conditional(not(sortable = 0), 'true', 'false')"/>,
+                       <xsl:choose>
+                               <xsl:when test="hidden">
+                                       <xsl:if test="hidden =0">
+                                               visible: true,
                                        </xsl:if>
-                                       orderable: <xsl:value-of 
select="phpgw:conditional(not(sortable = 0), 'true', 'false')"/>,
-                                       <xsl:choose>
-                                               <xsl:when test="hidden">
-                                                       <xsl:if test="hidden 
=0">
-                                                               visible: true,
-                                                       </xsl:if>
-                                                       <xsl:if test="hidden 
=1">
-                                                               class: 'none', 
//FIXME - virker ikke...'responsive' plukker den fram igjen
-                                                               visible: false,
-                                                       </xsl:if>
-                                               </xsl:when>
-                                               <xsl:otherwise>
-                                                       visible: true,
-                                               </xsl:otherwise>
-                                       </xsl:choose>
-                                       <xsl:if test="formatter">
-                                               render: function (dummy1, 
dummy2, oData) {
-                                                       try {
-                                                               var ret = 
<xsl:value-of select="formatter"/>("<xsl:value-of select="key"/>", oData);
-                                                       }
-                                                       catch(err) {
-                                                               return 
err.message;
-                                                       }
-                                                       return ret;
-                                               },
+                                       <xsl:if test="hidden =1">
+                                               class: 'none', //FIXME - virker 
ikke...'responsive' plukker den fram igjen
+                                               visible: false,
                                        </xsl:if>
-                                       <xsl:choose>
-                                               <xsl:when test="editor">
-                                                       <xsl:if test="editor 
=0">
-                                                               editor: false,
-                                                       </xsl:if>
-                                                       <xsl:if test="editor 
=1">
-                                                               editor: true,
-                                                       </xsl:if>
-                                               </xsl:when>
-                                               <xsl:otherwise>
-                                                       editor: false,
-                                               </xsl:otherwise>
-                                       </xsl:choose>
-                                       defaultContent: "<xsl:value-of 
select="defaultContent"/>"
-                               }<xsl:value-of 
select="phpgw:conditional(not(position() = last()), ',', '')"/>
-                       </xsl:for-each>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       visible: true,
+                               </xsl:otherwise>
+                       </xsl:choose>
+                       <xsl:if test="formatter">
+                               render: function (dummy1, dummy2, oData) {
+                               try {
+                               var ret = <xsl:value-of 
select="formatter"/>("<xsl:value-of select="key"/>", oData);
+                               }
+                               catch(err) {
+                               return err.message;
+                               }
+                               return ret;
+                               },
+                       </xsl:if>
+                       <xsl:choose>
+                               <xsl:when test="editor">
+                                       <xsl:if test="editor =0">
+                                               editor: false,
+                                       </xsl:if>
+                                       <xsl:if test="editor =1">
+                                               editor: true,
+                                       </xsl:if>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       editor: false,
+                               </xsl:otherwise>
+                       </xsl:choose>
+                       defaultContent: "<xsl:value-of 
select="defaultContent"/>"
+                       }<xsl:value-of select="phpgw:conditional(not(position() 
= last()), ',', '')"/>
+               </xsl:for-each>
                ];
                <![CDATA[
                        JqueryPortico.columns = [];
@@ -513,61 +563,61 @@
 
                var oTable = null;
                $(document).ready(function() {
-                       var ajax_url = '<xsl:value-of select="source"/>';
-                       var download_url = '<xsl:value-of select="download"/>';
-                       var exclude_colvis = [];
-                       var editor_cols = [];
-                       var editor_action = '<xsl:value-of 
select="editor_action"/>';
-                       var disablePagination = '<xsl:value-of 
select="disablePagination"/>';
+               var ajax_url = '<xsl:value-of select="source"/>';
+               var download_url = '<xsl:value-of select="download"/>';
+               var exclude_colvis = [];
+               var editor_cols = [];
+               var editor_action = '<xsl:value-of select="editor_action"/>';
+               var disablePagination = '<xsl:value-of 
select="disablePagination"/>';
 
-                       <xsl:choose>
-                               <xsl:when test="//datatable/actions">
-                                       var button_def = [
-//                                                                     {
-//                                                                             
extend: 'colvis',
-//                                                                             
exclude: exclude_colvis,
-//                                                                             
text: function ( dt, button, config ) {
-//                                                                             
        return dt.i18n( 'buttons.show_hide', 'Show / hide columns' );
-//                                                                             
}
-//                                                                     },
-                                                                       {
-                                                                               
extend: 'copy',
-                                                                               
text: "<xsl:value-of select="php:function('lang', 'copy')"/>"
-                                                                       },
-                                                                       {
-                                                                               
        text: "<xsl:value-of select="php:function('lang', 'select all')"/>",
-                                                                               
        action: function () {
-                                                                               
                var api = oTable.api();
-                                                                               
                api.rows().select();
-                                                                               
                $(".mychecks").each(function()
-                                                                               
                {
-                                                                               
                        $(this).prop("checked", true);
-                                                                               
                });
-                                                                               
        }
-                                                                               
},
-                                                                               
{
-                                                                               
        text: "<xsl:value-of select="php:function('lang', 'select none')"/>",
-                                                                               
        action: function () {
-                                                                               
                var api = oTable.api();
-                                                                               
                api.rows().deselect();
-                                                                               
                $(".mychecks").each(function()
-                                                                               
                {
-                                                                               
                        $(this).prop("checked", false);
-                                                                               
                });
-                                                                               
        }
-                                                                               
},
-                                                                               
'copyFlash',
-                                                                               
'csvFlash',
-                                                                               
'excelFlash',
-                                                                               
'pdfFlash'
+               <xsl:choose>
+                       <xsl:when test="//datatable/actions">
+                               var button_def = [
+                               //                                              
                        {
+                               //                                              
                                extend: 'colvis',
+                               //                                              
                                exclude: exclude_colvis,
+                               //                                              
                                text: function ( dt, button, config ) {
+                               //                                              
                                        return dt.i18n( 'buttons.show_hide', 
'Show / hide columns' );
+                               //                                              
                                }
+                               //                                              
                        },
+                               {
+                               extend: 'copy',
+                               text: "<xsl:value-of 
select="php:function('lang', 'copy')"/>"
+                               },
+                               {
+                               text: "<xsl:value-of 
select="php:function('lang', 'select all')"/>",
+                               action: function () {
+                               var api = oTable.api();
+                               api.rows().select();
+                               $(".mychecks").each(function()
+                               {
+                               $(this).prop("checked", true);
+                               });
+                               }
+                               },
+                               {
+                               text: "<xsl:value-of 
select="php:function('lang', 'select none')"/>",
+                               action: function () {
+                               var api = oTable.api();
+                               api.rows().deselect();
+                               $(".mychecks").each(function()
+                               {
+                               $(this).prop("checked", false);
+                               });
+                               }
+                               },
+                               'copyFlash',
+                               'csvFlash',
+                               'excelFlash',
+                               'pdfFlash'
 
 
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="download">
-                                                                               
,{
-                                                                               
        text: "<xsl:value-of select="php:function('lang', 'download')"/>",
-                                                                               
        action: function (e, dt, node, config) {
-                                                                               
        var sUrl = '<xsl:value-of select="download"/>';
+                               <xsl:choose>
+                                       <xsl:when test="download">
+                                               ,{
+                                               text: "<xsl:value-of 
select="php:function('lang', 'download')"/>",
+                                               action: function (e, dt, node, 
config) {
+                                               var sUrl = '<xsl:value-of 
select="download"/>';
                                                                                
        <![CDATA[
                                                                                
                var oParams = {};
                                                                                
                oParams.length = -1;
@@ -583,171 +633,170 @@
                                                                                
                iframe.style.height = "0px";
                                                                                
                iframe.style.width = "0px";
                                                                                
                iframe.src = sUrl+"&"+$.param(oParams) + "&export=1";
-                                                                               
                alert(iframe.src);
                                                                                
                if(confirm("This will take some time..."))
                                                                                
                {
                                                                                
                        document.body.appendChild( iframe );
                                                                                
                }
                                                                                
                ]]>
-                                                                               
        }
+                                               }
 
+                                               }
+                                       </xsl:when>
+                               </xsl:choose>
+                               <xsl:choose>
+                                       <xsl:when test="//datatable/actions != 
''">
+                                               <xsl:choose>
+                                                       <xsl:when 
test="ungroup_buttons=''">
+                                                               //              
                                                                                
        ,{
+                                                               //              
                                                                                
                extend: "div",
+                                                               //              
                                                                                
                text: "Knapper nedenfor gjelder pr valgt element "
+                                                               //              
                                                                                
        }
+                                                       </xsl:when>
+                                               </xsl:choose>
+                                               <xsl:for-each 
select="//datatable/actions">
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="type = 'custom'">
+                                                                       ,{
+                                                                       text: 
"<xsl:value-of select="text"/>",
+                                                                       
enabled: false,
+                                                                       
className: 'record',
+                                                                       action: 
function (e, dt, node, config) {
+                                                                       <xsl:if 
test="confirm_msg">
+                                                                               
var confirm_msg = "<xsl:value-of select="confirm_msg"/>";
+                                                                               
var r = confirm(confirm_msg);
+                                                                               
if (r != true) {
+                                                                               
return false;
                                                                                
}
-                                                                               
</xsl:when>
-                                                                       
</xsl:choose>
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="//datatable/actions != ''">
-                                                                               
        <xsl:choose>
-                                                                               
                <xsl:when test="ungroup_buttons=''">
-//                                                                             
                        ,{
-//                                                                             
                                extend: "div",
-//                                                                             
                                text: "Knapper nedenfor gjelder pr valgt 
element "
-//                                                                             
                        }
-                                                                               
                </xsl:when>
-                                                                               
        </xsl:choose>
-                                                                               
        <xsl:for-each select="//datatable/actions">
-                                                                               
                <xsl:choose>
-                                                                               
                        <xsl:when test="type = 'custom'">
-                                                                               
                                ,{
-                                                                               
                                        text: "<xsl:value-of select="text"/>",
-                                                                               
                                        enabled: false,
-                                                                               
                                        className: 'record',
-                                                                               
                                        action: function (e, dt, node, config) {
-                                                                               
                                                <xsl:if test="confirm_msg">
-                                                                               
                                                        var confirm_msg = 
"<xsl:value-of select="confirm_msg"/>";
-                                                                               
                                                        var r = 
confirm(confirm_msg);
-                                                                               
                                                        if (r != true) {
-                                                                               
                                                                return false;
-                                                                               
                                                        }
-                                                                               
                                                </xsl:if>
-                                                                               
                                                <xsl:value-of 
select="custom_code"/>
-                                                                               
                                        }
+                                                                       
</xsl:if>
+                                                                       
<xsl:value-of select="custom_code"/>
+                                                                       }
 
-                                                                               
                                }
-                                                                               
                                <!--xsl:value-of 
select="phpgw:conditional(not(position() = last()), ',', '')"/-->
-                                                                               
                        </xsl:when>
-                                                                               
                        <xsl:otherwise>
-                                                                               
                                ,{
-                                                                               
                                        text: "<xsl:value-of select="text"/>",
-                                                                               
                                        enabled: false,
-                                                                               
                                        className: 'record',
-                                                                               
                                        action: function (e, dt, node, config) {
-                                                                               
                                                var receiptmsg = [];
-                                                                               
                                                var selected = fnGetSelected();
-                                                                               
                                                var numSelected = 
selected.length;
+                                                                       }
+                                                                       
<!--xsl:value-of select="phpgw:conditional(not(position() = last()), ',', 
'')"/-->
+                                                               </xsl:when>
+                                                               <xsl:otherwise>
+                                                                       ,{
+                                                                       text: 
"<xsl:value-of select="text"/>",
+                                                                       
enabled: false,
+                                                                       
className: 'record',
+                                                                       action: 
function (e, dt, node, config) {
+                                                                       var 
receiptmsg = [];
+                                                                       var 
selected = fnGetSelected();
+                                                                       var 
numSelected = selected.length;
 
-                                                                               
                                                if (numSelected ==0){
-                                                                               
                                                        alert('None selected');
-                                                                               
                                                        return false;
-                                                                               
                                                }
+                                                                       if 
(numSelected ==0){
+                                                                       
alert('None selected');
+                                                                       return 
false;
+                                                                       }
 
-                                                                               
                                                <xsl:if test="confirm_msg">
-                                                                               
                                                        var confirm_msg = 
"<xsl:value-of select="confirm_msg"/>";
-                                                                               
                                                        var r = 
confirm(confirm_msg);
-                                                                               
                                                        if (r != true) {
-                                                                               
                                                                return false;
-                                                                               
                                                        }
-                                                                               
                                                </xsl:if>
+                                                                       <xsl:if 
test="confirm_msg">
+                                                                               
var confirm_msg = "<xsl:value-of select="confirm_msg"/>";
+                                                                               
var r = confirm(confirm_msg);
+                                                                               
if (r != true) {
+                                                                               
return false;
+                                                                               
}
+                                                                       
</xsl:if>
 
-                                                                               
                                                var target = "<xsl:value-of 
select="target"/>";
-                                                                               
                                                if(!target)
-                                                                               
                                                {
-                                                                               
                                                        target = '_self';
-                                                                               
                                                }
+                                                                       var 
target = "<xsl:value-of select="target"/>";
+                                                                       
if(!target)
+                                                                       {
+                                                                       target 
= '_self';
+                                                                       }
 
-                                                                               
                                                if (numSelected &gt; 1){
-                                                                               
                                                        target = '_blank';
-                                                                               
                                                }
+                                                                       if 
(numSelected &gt; 1){
+                                                                       target 
= '_blank';
+                                                                       }
 
-                                                                               
                                                var n = 0;
-                                                                               
                                                for (; n &lt; numSelected; ) {
-                                                                               
                                                        // 
console.log(selected[n]);
-                                                                               
                                                        var aData = 
oTable.fnGetData( selected[n] ); //complete dataset from json returned from 
server
-                                                                               
                                                        // console.log(aData);
+                                                                       var n = 
0;
+                                                                       for (; 
n &lt; numSelected; ) {
+                                                                       // 
console.log(selected[n]);
+                                                                       var 
aData = oTable.fnGetData( selected[n] ); //complete dataset from json returned 
from server
+                                                                       // 
console.log(aData);
 
-                                                                               
                                                        //delete stuff comes 
here
-                                                                               
                                                        var action = 
"<xsl:value-of select="action"/>";
-                                                                               
                                                        var my_name = 
"<xsl:value-of select="my_name"/>";
+                                                                       
//delete stuff comes here
+                                                                       var 
action = "<xsl:value-of select="action"/>";
+                                                                       var 
my_name = "<xsl:value-of select="my_name"/>";
 
-                                                                               
                                                        <xsl:if 
test="parameters">
-                                                                               
                                                                var parameters 
= <xsl:value-of select="parameters"/>;
-                                                                               
                                                                // 
console.log(parameters.parameter);
-                                                                               
                                                                var i = 0;
-                                                                               
                                                                len = 
parameters.parameter.length;
-                                                                               
                                                                for (; i &lt; 
len; ) {
-                                                                               
                                                                        action 
+= '&amp;' + parameters.parameter[i]['name'] + '=' + 
aData[parameters.parameter[i]['source']];
-                                                                               
                                                                        i++;
-                                                                               
                                                                }
-                                                                               
                                                        </xsl:if>
+                                                                       <xsl:if 
test="parameters">
+                                                                               
var parameters = <xsl:value-of select="parameters"/>;
+                                                                               
// console.log(parameters.parameter);
+                                                                               
var i = 0;
+                                                                               
len = parameters.parameter.length;
+                                                                               
for (; i &lt; len; ) {
+                                                                               
action += '&amp;' + parameters.parameter[i]['name'] + '=' + 
aData[parameters.parameter[i]['source']];
+                                                                               
i++;
+                                                                               
}
+                                                                       
</xsl:if>
 
-                                                                               
                                                        // look for the word 
"DELETE" in URL and my_name
-                                                                               
                                                        
if(substr_count(action,'delete')>0 || substr_count(my_name,'delete')>0)
-                                                                               
                                                        {
-                                                                               
                                                                action += 
"&amp;confirm=yes&amp;phpgw_return_as=json";
-                                                                               
                                                                
execute_ajax(action, function(result){
-                                                                               
                                                                        
document.getElementById("message").innerHTML += '<br/>' + result;
-                                                                               
                                                                        
oTable.fnDraw();
-                                                                               
                                                                });
-                                                                               
                                                        }
-                                                                               
                                                        else if (target == 
'ajax')
-                                                                               
                                                        {
-                                                                               
                                                                action += 
"&amp;phpgw_return_as=json";
-                                                                               
                                                                
execute_ajax(action, function(result){
-                                                                               
                                                                        
document.getElementById("message").innerHTML += '<br/>' + result;
-                                                                               
                                                                        
oTable.fnDraw();
-                                                                               
                                                                });
-                                                                               
                                                        }
-                                                                               
                                                        else
-                                                                               
                                                        {
-                                                                               
                                                                
window.open(action,target);
-                                                                               
                                                        }
-                                                                               
                                                        n++;
-                                                                               
                                                }
-                                                                               
                                        }
-                                                                               
                                }
-                                                                               
                                <!--xsl:value-of 
select="phpgw:conditional(not(position() = last()), ',', '')"/-->
-                                                                               
                        </xsl:otherwise>
-                                                                               
                </xsl:choose>
-                                                                               
        </xsl:for-each>
-                                                                               
</xsl:when>
-                                                                       
</xsl:choose>
-                                                               ];
-                                                               <xsl:choose>
-                                                                       
<xsl:when test="group_buttons = '1'">
-                                                                               
var group_buttons = true;
-                                                                       
</xsl:when>
-                                                                       
<xsl:otherwise>
-                                                                               
var group_buttons = false;
-                                                                       
</xsl:otherwise>
-                                                               </xsl:choose>
+                                                                       // look 
for the word "DELETE" in URL and my_name
+                                                                       
if(substr_count(action,'delete')>0 || substr_count(my_name,'delete')>0)
+                                                                       {
+                                                                       action 
+= "&amp;confirm=yes&amp;phpgw_return_as=json";
+                                                                       
execute_ajax(action, function(result){
+                                                                       
document.getElementById("message").innerHTML += '<br/>' + result;
+                                                                       
oTable.fnDraw();
+                                                                       });
+                                                                       }
+                                                                       else if 
(target == 'ajax')
+                                                                       {
+                                                                       action 
+= "&amp;phpgw_return_as=json";
+                                                                       
execute_ajax(action, function(result){
+                                                                       
document.getElementById("message").innerHTML += '<br/>' + result;
+                                                                       
oTable.fnDraw();
+                                                                       });
+                                                                       }
+                                                                       else
+                                                                       {
+                                                                       
window.open(action,target);
+                                                                       }
+                                                                       n++;
+                                                                       }
+                                                                       }
+                                                                       }
+                                                                       
<!--xsl:value-of select="phpgw:conditional(not(position() = last()), ',', 
'')"/-->
+                                                               </xsl:otherwise>
+                                                       </xsl:choose>
+                                               </xsl:for-each>
+                                       </xsl:when>
+                               </xsl:choose>
+                               ];
+                               <xsl:choose>
+                                       <xsl:when test="group_buttons = '1'">
+                                               var group_buttons = true;
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               var group_buttons = false;
+                                       </xsl:otherwise>
+                               </xsl:choose>
 
-                                                               
if($(document).width() &lt; 1000)
-                                                               {
-                                                                       
group_buttons = true;
-                                                               }
-                                                                       
$.fn.dataTable.Buttons.swfPath = 
"phpgwapi/js/DataTables/extensions/Buttons/swf/flashExport.swf";
+                               if($(document).width() &lt; 1000)
+                               {
+                               group_buttons = true;
+                               }
+                               $.fn.dataTable.Buttons.swfPath = 
"phpgwapi/js/DataTables/extensions/Buttons/swf/flashExport.swf";
 
 
-                                                               
if(group_buttons === true)
-                                                               {
-                                                                       
JqueryPortico.buttons = [
-                                                                               
                                        {
-                                                                               
                                                extend: 'collection',
-                                                                               
                                                text: "<xsl:value-of 
select="php:function('lang', 'collection')"/>",
-                                                                               
                                                collectionLayout: 
'three-column',
-                                                                               
                                                buttons: button_def
-                                                                               
                                        }
-                                                                               
                                ];
+                               if(group_buttons === true)
+                               {
+                               JqueryPortico.buttons = [
+                               {
+                               extend: 'collection',
+                               text: "<xsl:value-of 
select="php:function('lang', 'collection')"/>",
+                               collectionLayout: 'three-column',
+                               buttons: button_def
+                               }
+                               ];
 
-                                                               }
-                                                               else
-                                                               {
-                                                                       
JqueryPortico.buttons = button_def;
-                                                               }
-                               </xsl:when>
-                               <xsl:otherwise>
-                                       JqueryPortico.buttons = false;
-                               </xsl:otherwise>
-                       </xsl:choose>
+                               }
+                               else
+                               {
+                               JqueryPortico.buttons = button_def;
+                               }
+                       </xsl:when>
+                       <xsl:otherwise>
+                               JqueryPortico.buttons = false;
+                       </xsl:otherwise>
+               </xsl:choose>
                        <![CDATA[
                                for(i=0;i < JqueryPortico.columns.length;i++)
                                {
@@ -872,71 +921,71 @@
                                });
                        ]]>
 
-                       /**
-                       * Add left click action..
-                       */
-                       <xsl:if test="//left_click_action != ''">
-                               $("#datatable-container").on("click", "tbody 
tr", function() {
-                                       var iPos = oTable.fnGetPosition( this );
-                                       var aData = oTable.fnGetData( iPos ); 
//complete dataset from json returned from server
-                                       try {
-                                               <xsl:value-of 
select="//left_click_action"/>
-                                       }
-                                       catch(err) {
-                                               
document.getElementById("message").innerHTML = err.message;
-                                       }
+               /**
+               * Add left click action..
+               */
+               <xsl:if test="//left_click_action != ''">
+                       $("#datatable-container").on("click", "tbody tr", 
function() {
+                       var iPos = oTable.fnGetPosition( this );
+                       var aData = oTable.fnGetData( iPos ); //complete 
dataset from json returned from server
+                       try {
+                       <xsl:value-of select="//left_click_action"/>
+                       }
+                       catch(err) {
+                       document.getElementById("message").innerHTML = 
err.message;
+                       }
+                       });
+               </xsl:if>
+
+               /**
+               * Add dbl click action..
+               */
+               <xsl:if test="dbl_click_action != ''">
+                       $("#datatable-container").on("dblclick", "tr", 
function() {
+                       var iPos = oTable.fnGetPosition( this );
+                       var aData = oTable.fnGetData( iPos ); //complete 
dataset from json returned from server
+                       try {
+                       <xsl:value-of select="dbl_click_action"/>(aData);
+                       }
+                       catch(err) {
+                       document.getElementById("message").innerHTML = 
err.message;
+                       }
+                       });
+               </xsl:if>
+
+               <xsl:for-each select="//form/toolbar/item">
+                       <xsl:if test="type = 'filter'">
+                               $('select#<xsl:value-of 
select="name"/>').change( function()
+                               {
+                               <xsl:value-of select="extra"/>
+                               filterData('<xsl:value-of select="name"/>', 
$(this).val());
                                });
                        </xsl:if>
-
-                       /**
-                       * Add dbl click action..
-                       */
-                       <xsl:if test="dbl_click_action != ''">
-                               $("#datatable-container").on("dblclick", "tr", 
function() {
-                                       var iPos = oTable.fnGetPosition( this );
-                                       var aData = oTable.fnGetData( iPos ); 
//complete dataset from json returned from server
-                                       try {
-                                               <xsl:value-of 
select="dbl_click_action"/>(aData);
-                                       }
-                                       catch(err) {
-                                               
document.getElementById("message").innerHTML = err.message;
-                                       }
+                       <xsl:if test="type = 'date-picker'">
+                               var previous_<xsl:value-of select="id"/>;
+                               $("#filter_<xsl:value-of 
select="id"/>").on('keyup change', function ()
+                               {
+                               if ( $.trim($(this).val()) != 
$.trim(previous_<xsl:value-of select="id"/>) )
+                               {
+                               filterData('<xsl:value-of select="id"/>', 
$(this).val());
+                               previous_<xsl:value-of select="id"/> = 
$(this).val();
+                               }
                                });
                        </xsl:if>
-
-                       <xsl:for-each select="//form/toolbar/item">
-                               <xsl:if test="type = 'filter'">
-                                       $('select#<xsl:value-of 
select="name"/>').change( function()
-                                       {
-                                               <xsl:value-of select="extra"/>
-                                               filterData('<xsl:value-of 
select="name"/>', $(this).val());
-                                       });
-                               </xsl:if>
-                               <xsl:if test="type = 'date-picker'">
-                                       var previous_<xsl:value-of 
select="id"/>;
-                                       $("#filter_<xsl:value-of 
select="id"/>").on('keyup change', function ()
-                                       {
-                                               if ( $.trim($(this).val()) != 
$.trim(previous_<xsl:value-of select="id"/>) )
-                                               {
-                                                       
filterData('<xsl:value-of select="id"/>', $(this).val());
-                                                       previous_<xsl:value-of 
select="id"/> = $(this).val();
-                                               }
-                                       });
-                               </xsl:if>
-                               <xsl:if test="type = 'autocomplete'">
-                                       $(document).ready(function() {
-                                               
$('input.ui-autocomplete-input#filter_<xsl:value-of 
select="name"/>_name').on('autocompleteselect', function(event, ui){
-                                                       
filterData('filter_<xsl:value-of select="name"/>_id', ui.item.value);
-                                               });
-                                               
$('input.ui-autocomplete-input#filter_<xsl:value-of 
select="name"/>_name').on('keyup', function(){
-                                                       if ($(this).val() == 
''){
-                                                               
$('#filter_<xsl:value-of select="name"/>_id').val('');
-                                                               
filterData('filter_<xsl:value-of select="name"/>_id', $(this).val());
-                                                       }
-                                               });
-                                       });
-                               </xsl:if>
-                       </xsl:for-each>
+                       <xsl:if test="type = 'autocomplete'">
+                               $(document).ready(function() {
+                               
$('input.ui-autocomplete-input#filter_<xsl:value-of 
select="name"/>_name').on('autocompleteselect', function(event, ui){
+                               filterData('filter_<xsl:value-of 
select="name"/>_id', ui.item.value);
+                               });
+                               
$('input.ui-autocomplete-input#filter_<xsl:value-of 
select="name"/>_name').on('keyup', function(){
+                               if ($(this).val() == ''){
+                               $('#filter_<xsl:value-of 
select="name"/>_id').val('');
+                               filterData('filter_<xsl:value-of 
select="name"/>_id', $(this).val());
+                               }
+                               });
+                               });
+                       </xsl:if>
+               </xsl:for-each>
        <![CDATA[
                        function fnGetSelected( )
                        {

Modified: branches/dev-syncromind/property/inc/class.notify.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.notify.inc.php   2016-02-03 
21:53:52 UTC (rev 14694)
+++ branches/dev-syncromind/property/inc/class.notify.inc.php   2016-02-04 
12:59:07 UTC (rev 14695)
@@ -218,8 +218,8 @@
                                        'text' => lang($entry['value']),
                                        'type' => 'custom',
                                        'custom_code' => "
-                                                                               
var oTT = TableTools.fnGetInstance( 'datatable-container_{$count}' );
-                                                                               
var selected = oTT.fnGetSelectedData();
+                                                                               
var api = oTable{$count}.api();
+                                                                               
var selected = api.rows( { selected: true } ).data();
 
                                                                                
var numSelected =       selected.length;
 

Modified: branches/dev-syncromind/property/inc/class.uiagreement.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uiagreement.inc.php      
2016-02-03 21:53:52 UTC (rev 14694)
+++ branches/dev-syncromind/property/inc/class.uiagreement.inc.php      
2016-02-04 12:59:07 UTC (rev 14695)
@@ -1244,8 +1244,8 @@
                                        'text' => 
lang($alarm_data[alter_alarm][0][lang_enable]),
                                        'type' => 'custom',
                                        'custom_code' => "
-                                                                               
var oTT = TableTools.fnGetInstance( 'datatable-container_0' );
-                                                                               
var selected = oTT.fnGetSelectedData();
+                                                                               
var api = oTable0.api();
+                                                                               
var selected = api.rows( { selected: true } ).data();
                                                                                
var numSelected =       selected.length;
 
                                                                                
if (numSelected ==0){
@@ -1266,8 +1266,8 @@
                                        'text' => 
lang($alarm_data[alter_alarm][0][lang_disable]),
                                        'type' => 'custom',
                                        'custom_code' => "
-                                                                               
var oTT = TableTools.fnGetInstance( 'datatable-container_0' );
-                                                                               
var selected = oTT.fnGetSelectedData();
+                                                                               
var api = oTable0.api();
+                                                                               
var selected = api.rows( { selected: true } ).data();
 
                                                                                
var numSelected =       selected.length;
 
@@ -1289,8 +1289,8 @@
                                        'text' => 
lang($alarm_data[alter_alarm][0][lang_delete]),
                                        'type' => 'custom',
                                        'custom_code' => "
-                                                                               
var oTT = TableTools.fnGetInstance( 'datatable-container_0' );
-                                                                               
var selected = oTT.fnGetSelectedData();
+                                                                               
var api = oTable0.api();
+                                                                               
var selected = api.rows( { selected: true } ).data();
 
                                                                                
var numSelected =       selected.length;
 

Modified: branches/dev-syncromind/property/inc/class.uialarm.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uialarm.inc.php  2016-02-03 
21:53:52 UTC (rev 14694)
+++ branches/dev-syncromind/property/inc/class.uialarm.inc.php  2016-02-04 
12:59:07 UTC (rev 14695)
@@ -269,8 +269,8 @@
                                'text' => lang('Disable'),
                                'type' => 'custom',
                                'custom_code' => "
-                    var oTT = TableTools.fnGetInstance( 'datatable-container' 
);
-                    var selected = oTT.fnGetSelectedData();
+                                       var api = oTable.api();
+                                       var selected = api.rows( { selected: 
true } ).data();
 
                     var numSelected =  selected.length;
 
@@ -294,8 +294,8 @@
                                'text' => lang('Enable'),
                                'type' => 'custom',
                                'custom_code' => "
-                    var oTT = TableTools.fnGetInstance( 'datatable-container' 
);
-                    var selected = oTT.fnGetSelectedData();
+                                       var api = oTable.api();
+                                       var selected = api.rows( { selected: 
true } ).data();
 
                     var numSelected =  selected.length;
 
@@ -319,8 +319,8 @@
                                'text' => lang('test cron'),
                                'type' => 'custom',
                                'custom_code' => "
-                    var oTT = TableTools.fnGetInstance( 'datatable-container' 
);
-                    var selected = oTT.fnGetSelectedData();
+                                       var api = oTable.api();
+                                       var selected = api.rows( { selected: 
true } ).data();
 
                     var numSelected =  selected.length;
 
@@ -344,8 +344,8 @@
                                'text' => lang('Delete'),
                                'type' => 'custom',
                                'custom_code' => "
-                    var oTT = TableTools.fnGetInstance( 'datatable-container' 
);
-                    var selected = oTT.fnGetSelectedData();
+                                       var api = oTable.api();
+                                       var selected = api.rows( { selected: 
true } ).data();
 
                     var numSelected =  selected.length;
 

Modified: branches/dev-syncromind/property/inc/class.uievent.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uievent.inc.php  2016-02-03 
21:53:52 UTC (rev 14694)
+++ branches/dev-syncromind/property/inc/class.uievent.inc.php  2016-02-04 
12:59:07 UTC (rev 14695)
@@ -654,8 +654,8 @@
                                                'text' => lang($entry['value']),
                                                'type' => 'custom',
                                                'custom_code' => "
-                                                                               
        var oTT = TableTools.fnGetInstance( 'datatable-container_0' );
-                                                                               
        var selected = oTT.fnGetSelectedData();
+                                                                               
        var api = oTable0.api();
+                                                                               
        var selected = api.rows( { selected: true } ).data();
 
                                                                                
        var numSelected =       selected.length;
 

Modified: branches/dev-syncromind/property/inc/class.uis_agreement.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uis_agreement.inc.php    
2016-02-03 21:53:52 UTC (rev 14694)
+++ branches/dev-syncromind/property/inc/class.uis_agreement.inc.php    
2016-02-04 12:59:07 UTC (rev 14695)
@@ -1367,8 +1367,8 @@
                                        'text' => 
lang($alarm_data[alter_alarm][0][lang_enable]),
                                        'type' => 'custom',
                                        'custom_code' => "
-                                                                               
var oTT = TableTools.fnGetInstance( 'datatable-container_0' );
-                                        var selected = oTT.fnGetSelectedData();
+                                                                               
var api = oTable0.api();
+                                                                               
var selected = api.rows( { selected: true } ).data();
                                                                                
var numSelected =       selected.length;
 
                                                                                
if (numSelected ==0){
@@ -1389,8 +1389,8 @@
                                        'text' => 
lang($alarm_data[alter_alarm][0][lang_disable]),
                                        'type' => 'custom',
                                        'custom_code' => "
-                                        var oTT = TableTools.fnGetInstance( 
'datatable-container_0' );
-                                        var selected = oTT.fnGetSelectedData();
+                                                                               
var api = oTable0.api();
+                                                                               
var selected = api.rows( { selected: true } ).data();
                                                                                
var numSelected =       selected.length;
 
                                                                                
if (numSelected ==0){
@@ -1411,8 +1411,8 @@
                                        'text' => 
lang($alarm_data[alter_alarm][0][lang_delete]),
                                        'type' => 'custom',
                                        'custom_code' => "
-                                        var oTT = TableTools.fnGetInstance( 
'datatable-container_0' );
-                                        var selected = oTT.fnGetSelectedData();
+                                                                               
var api = oTable0.api();
+                                                                               
var selected = api.rows( { selected: true } ).data();
                                                                                
var numSelected =       selected.length;
 
                                                                                
if (numSelected ==0){

Modified: branches/dev-syncromind/property/js/portico/agreement.edit.js
===================================================================
--- branches/dev-syncromind/property/js/portico/agreement.edit.js       
2016-02-03 21:53:52 UTC (rev 14694)
+++ branches/dev-syncromind/property/js/portico/agreement.edit.js       
2016-02-04 12:59:07 UTC (rev 14695)
@@ -52,8 +52,8 @@
        var oIndex = $('#new_index').val();
        var id = $('#agreementid').val();
 
-       var oTT = TableTools.fnGetInstance('datatable-container_1');
-       var selected = oTT.fnGetSelectedData();
+       var api =$( '#datatable-container_1' ).dataTable().api();
+       var selected = api.rows( { selected: true } ).data();
        var numSelected = selected.length;
 
        if (numSelected == '0') {

Modified: branches/dev-syncromind/property/js/portico/entity.edit.js
===================================================================
--- branches/dev-syncromind/property/js/portico/entity.edit.js  2016-02-03 
21:53:52 UTC (rev 14694)
+++ branches/dev-syncromind/property/js/portico/entity.edit.js  2016-02-04 
12:59:07 UTC (rev 14695)
@@ -77,8 +77,9 @@
                add_control();
        }
 
-       var oTT = TableTools.fnGetInstance('datatable-container_4');
-       var selected = oTT.fnGetSelectedData();
+       var api =$( '#datatable-container_4' ).dataTable().api();
+       var selected = api.rows( { selected: true } ).data();
+
        var numSelected = selected.length;
 
        if (numSelected == 0) {

Modified: branches/dev-syncromind/property/js/portico/event.index.js
===================================================================
--- branches/dev-syncromind/property/js/portico/event.index.js  2016-02-03 
21:53:52 UTC (rev 14694)
+++ branches/dev-syncromind/property/js/portico/event.index.js  2016-02-04 
12:59:07 UTC (rev 14695)
@@ -7,10 +7,8 @@
 
 function onSave()
 {
-       var api = oTable.api();
-//  console.log(api.data().length);
-       var oTT = TableTools.fnGetInstance('datatable-container');
-       var selected = oTT.fnGetSelectedData();
+       var api =$( '#datatable-container' ).dataTable().api();
+       var selected = api.rows( { selected: true } ).data();
        var numSelected = selected.length;
 
        if (numSelected == '0') {

Modified: branches/dev-syncromind/property/js/portico/s_agreement.edit.js
===================================================================
--- branches/dev-syncromind/property/js/portico/s_agreement.edit.js     
2016-02-03 21:53:52 UTC (rev 14694)
+++ branches/dev-syncromind/property/js/portico/s_agreement.edit.js     
2016-02-04 12:59:07 UTC (rev 14695)
@@ -55,8 +55,8 @@
        var oIndex = $('#new_index').val();
        var id = $('#agreementid').val();
 
-       var oTT = TableTools.fnGetInstance('datatable-container_1');
-       var selected = oTT.fnGetSelectedData();
+       var api =$( '#datatable-container_1' ).dataTable().api();
+       var selected = api.rows( { selected: true } ).data();
        var numSelected = selected.length;
 
        if (numSelected == '0') {

Modified: branches/dev-syncromind/property/templates/base/lookup.entity.xsl
===================================================================
--- branches/dev-syncromind/property/templates/base/lookup.entity.xsl   
2016-02-03 21:53:52 UTC (rev 14694)
+++ branches/dev-syncromind/property/templates/base/lookup.entity.xsl   
2016-02-04 12:59:07 UTC (rev 14695)
@@ -358,218 +358,241 @@
                var editor_action = '<xsl:value-of select="editor_action"/>';
                var disablePagination = '<xsl:value-of 
select="disablePagination"/>';
 
-                       <![CDATA[
-                               TableTools.BUTTONS.download = {
-                                       "sAction": "text",
-                                       "sTag": "default",
-                                       "sFieldBoundary": "",
-                                       "sFieldSeperator": "\t",
-                                       "sNewLine": "<br>",
-                                       "sToolTip": "",
-                                       "sButtonClass": "DTTT_button_text",
-                                       "sButtonClassHover": 
"DTTT_button_text_hover",
-                                       "sButtonText": "Download",
-                                       "mColumns": "all",
-                                       "bHeader": true,
-                                       "bFooter": true,
-                                       "sDiv": "",
-                                       "fnMouseover": null,
-                                       "fnMouseout": null,
-                                       "fnClick": function( nButton, oConfig ) 
{
-                                               var oParams = 
this.s.dt.oApi._fnAjaxParameters( this.s.dt );
-                                               oParams.length = -1;
-                                               oParams.columns = null;
-                                               oParams.start = null;
-                                               oParams.draw = null;
-                                               var addtional_filterdata = 
oTable.dataTableSettings[0]['ajax']['data'];
-                                               for (var attrname in 
addtional_filterdata)
-                                               {
-                                                       oParams[attrname] = 
addtional_filterdata[attrname];
-                                               }
-                                               var iframe = 
document.createElement('iframe');
-                                               iframe.style.height = "0px";
-                                               iframe.style.width = "0px";
-                                               iframe.src = 
oConfig.sUrl+"?"+$.param(oParams) + "&export=1";
-                                               if(confirm("This will take some 
time..."))
-                                               {
-                                                       
document.body.appendChild( iframe );
-                                               }
-                                       },
-                                       "fnSelect": null,
-                                       "fnComplete": null,
-                                       "fnInit": null
-                               };
-                       ]]>
-               <xsl:choose>
-                       <xsl:when test="//datatable/actions">
-                               var button_def = [
-                               {
-                               sExtends: 'copy',
-                               sButtonText: "<xsl:value-of 
select="php:function('lang', 'copy')"/>"
-                               },
-                               {
-                               sExtends: 'select_all',
-                               sButtonText: "<xsl:value-of 
select="php:function('lang', 'select all')"/>",
-                               fnClick: function (nButton, oConfig, oFlash) {
-                               
TableTools.fnGetInstance('datatable-container').fnSelectAll();
-                               //In case there are checkboxes
-                               $(".mychecks").each(function()
-                               {
-                               $(this).prop("checked", true);
-                               });
-                               }
-                               },
-                               {
-                               sExtends: 'select_none',
-                               sButtonText: "<xsl:value-of 
select="php:function('lang', 'select none')"/>",
-                               fnClick: function (nButton, oConfig, oFlash) {
-                               
TableTools.fnGetInstance('datatable-container').fnSelectNone();
-                               //In case there are checkboxes
-                               $(".mychecks").each(function()
-                               {
-                               $(this).prop("checked", false);
-                               });
-                               }
-                               }
-                               <xsl:choose>
-                                       <xsl:when test="download">
-                                               ,{
-                                               "sExtends": "download",
-                                               "sButtonText": "<xsl:value-of 
select="php:function('lang', 'download')"/>",
-                                               "sUrl": '<xsl:value-of 
select="download"/>'
-                                               }
-                                       </xsl:when>
-                               </xsl:choose>
-                               <xsl:choose>
-                                       <xsl:when test="//datatable/actions != 
''">
-                                               <xsl:choose>
-                                                       <xsl:when 
test="ungroup_buttons=''">
-                                                               //              
                                                                                
        ,{
-                                                               //              
                                                                                
                sExtends: "div",
-                                                               //              
                                                                                
                sButtonText: "Knapper nedenfor gjelder pr valgt element "
-                                                               //              
                                                                                
        }
-                                                       </xsl:when>
-                                               </xsl:choose>
-                                               <xsl:for-each 
select="//datatable/actions">
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="type = 'custom'">
-                                                                       ,{
-                                                                       
sExtends: "select",
-                                                                       
sButtonText: "<xsl:value-of select="text"/>",
-                                                                       
fnClick: function (nButton, oConfig, oFlash) {
-                                                                       <xsl:if 
test="confirm_msg">
-                                                                               
var confirm_msg = "<xsl:value-of select="confirm_msg"/>";
-                                                                               
var r = confirm(confirm_msg);
-                                                                               
if (r != true) {
-                                                                               
return false;
-                                                                               
}
-                                                                       
</xsl:if>
-                                                                       
<xsl:value-of select="custom_code"/>
-                                                                       }
+                       <xsl:choose>
+                               <xsl:when test="//datatable/actions">
+                                       var button_def = [
+//                                                                     {
+//                                                                             
extend: 'colvis',
+//                                                                             
exclude: exclude_colvis,
+//                                                                             
text: function ( dt, button, config ) {
+//                                                                             
        return dt.i18n( 'buttons.show_hide', 'Show / hide columns' );
+//                                                                             
}
+//                                                                     },
+                                                                       {
+                                                                               
extend: 'copy',
+                                                                               
text: "<xsl:value-of select="php:function('lang', 'copy')"/>"
+                                                                       },
+                                                                       {
+                                                                               
        text: "<xsl:value-of select="php:function('lang', 'select all')"/>",
+                                                                               
        action: function () {
+                                                                               
                var api = oTable.api();
+                                                                               
                api.rows().select();
+                                                                               
                $(".mychecks").each(function()
+                                                                               
                {
+                                                                               
                        $(this).prop("checked", true);
+                                                                               
                });
+                                                                               
        }
+                                                                               
},
+                                                                               
{
+                                                                               
        text: "<xsl:value-of select="php:function('lang', 'select none')"/>",
+                                                                               
        action: function () {
+                                                                               
                var api = oTable.api();
+                                                                               
                api.rows().deselect();
+                                                                               
                $(".mychecks").each(function()
+                                                                               
                {
+                                                                               
                        $(this).prop("checked", false);
+                                                                               
                });
+                                                                               
        }
+                                                                               
},
+                                                                               
'copyFlash',
+                                                                               
'csvFlash',
+                                                                               
'excelFlash',
+                                                                               
'pdfFlash'
 
-                                                                       }
-                                                                       
<!--xsl:value-of select="phpgw:conditional(not(position() = last()), ',', 
'')"/-->
-                                                               </xsl:when>
-                                                               <xsl:otherwise>
-                                                                       ,{
-                                                                       
sExtends: "select",
-                                                                       
sButtonText: "<xsl:value-of select="text"/>",
-                                                                       
fnClick: function (nButton, oConfig, oFlash) {
-                                                                       var 
receiptmsg = [];
-                                                                       var 
selected = fnGetSelected();
-                                                                       var 
numSelected = selected.length;
 
-                                                                       if 
(numSelected ==0){
-                                                                       
alert('None selected');
-                                                                       return 
false;
-                                                                       }
+                                                                       
<xsl:choose>
+                                                                               
<xsl:when test="download">
+                                                                               
,{
+                                                                               
        text: "<xsl:value-of select="php:function('lang', 'download')"/>",
+                                                                               
        action: function (e, dt, node, config) {
+                                                                               
        var sUrl = '<xsl:value-of select="download"/>';
+                                                                               
        <![CDATA[
+                                                                               
                var oParams = {};
+                                                                               
                oParams.length = -1;
+                                                                               
                oParams.columns = null;
+                                                                               
                oParams.start = null;
+                                                                               
                oParams.draw = null;
+                                                                               
                var addtional_filterdata = 
oTable.dataTableSettings[0]['ajax']['data'];
+                                                                               
                for (var attrname in addtional_filterdata)
+                                                                               
                {
+                                                                               
                        oParams[attrname] = addtional_filterdata[attrname];
+                                                                               
                }
+                                                                               
                var iframe = document.createElement('iframe');
+                                                                               
                iframe.style.height = "0px";
+                                                                               
                iframe.style.width = "0px";
+                                                                               
                iframe.src = sUrl+"&"+$.param(oParams) + "&export=1";
+                                                                               
                alert(iframe.src);
+                                                                               
                if(confirm("This will take some time..."))
+                                                                               
                {
+                                                                               
                        document.body.appendChild( iframe );
+                                                                               
                }
+                                                                               
                ]]>
+                                                                               
        }
 
-                                                                       <xsl:if 
test="confirm_msg">
-                                                                               
var confirm_msg = "<xsl:value-of select="confirm_msg"/>";
-                                                                               
var r = confirm(confirm_msg);
-                                                                               
if (r != true) {
-                                                                               
return false;
                                                                                
}
-                                                                       
</xsl:if>
+                                                                               
</xsl:when>
+                                                                       
</xsl:choose>
+                                                                       
<xsl:choose>
+                                                                               
<xsl:when test="//datatable/actions != ''">
+                                                                               
        <xsl:choose>
+                                                                               
                <xsl:when test="ungroup_buttons=''">
+//                                                                             
                        ,{
+//                                                                             
                                extend: "div",
+//                                                                             
                                text: "Knapper nedenfor gjelder pr valgt 
element "
+//                                                                             
                        }
+                                                                               
                </xsl:when>
+                                                                               
        </xsl:choose>
+                                                                               
        <xsl:for-each select="//datatable/actions">
+                                                                               
                <xsl:choose>
+                                                                               
                        <xsl:when test="type = 'custom'">
+                                                                               
                                ,{
+                                                                               
                                        text: "<xsl:value-of select="text"/>",
+                                                                               
                                        enabled: false,
+                                                                               
                                        className: 'record',
+                                                                               
                                        action: function (e, dt, node, config) {
+                                                                               
                                                <xsl:if test="confirm_msg">
+                                                                               
                                                        var confirm_msg = 
"<xsl:value-of select="confirm_msg"/>";
+                                                                               
                                                        var r = 
confirm(confirm_msg);
+                                                                               
                                                        if (r != true) {
+                                                                               
                                                                return false;
+                                                                               
                                                        }
+                                                                               
                                                </xsl:if>
+                                                                               
                                                <xsl:value-of 
select="custom_code"/>
+                                                                               
                                        }
 
-                                                                       var 
target = "<xsl:value-of select="target"/>";
-                                                                       
if(!target)
-                                                                       {
-                                                                       target 
= '_self';
-                                                                       }
+                                                                               
                                }
+                                                                               
                                <!--xsl:value-of 
select="phpgw:conditional(not(position() = last()), ',', '')"/-->
+                                                                               
                        </xsl:when>
+                                                                               
                        <xsl:otherwise>
+                                                                               
                                ,{
+                                                                               
                                        text: "<xsl:value-of select="text"/>",
+                                                                               
                                        enabled: false,
+                                                                               
                                        className: 'record',
+                                                                               
                                        action: function (e, dt, node, config) {
+                                                                               
                                                var receiptmsg = [];
+                                                                               
                                                var selected = fnGetSelected();
+                                                                               
                                                var numSelected = 
selected.length;
 
-                                                                       if 
(numSelected &gt; 1){
-                                                                       target 
= '_blank';
-                                                                       }
+                                                                               
                                                if (numSelected ==0){
+                                                                               
                                                        alert('None selected');
+                                                                               
                                                        return false;
+                                                                               
                                                }
 
-                                                                       var n = 
0;
-                                                                       for (; 
n &lt; numSelected; ) {
-                                                                       // 
console.log(selected[n]);
-                                                                       var 
aData = oTable.fnGetData( selected[n] ); //complete dataset from json returned 
from server
-                                                                       // 
console.log(aData);
+                                                                               
                                                <xsl:if test="confirm_msg">
+                                                                               
                                                        var confirm_msg = 
"<xsl:value-of select="confirm_msg"/>";
+                                                                               
                                                        var r = 
confirm(confirm_msg);
+                                                                               
                                                        if (r != true) {
+                                                                               
                                                                return false;
+                                                                               
                                                        }
+                                                                               
                                                </xsl:if>
 
-                                                                       
//delete stuff comes here
-                                                                       var 
action = "<xsl:value-of select="action"/>";
+                                                                               
                                                var target = "<xsl:value-of 
select="target"/>";
+                                                                               
                                                if(!target)
+                                                                               
                                                {
+                                                                               
                                                        target = '_self';
+                                                                               
                                                }
 
-                                                                       <xsl:if 
test="parameters">
-                                                                               
var parameters = <xsl:value-of select="parameters"/>;
-                                                                               
// console.log(parameters.parameter);
-                                                                               
var i = 0;
-                                                                               
len = parameters.parameter.length;
-                                                                               
for (; i &lt; len; ) {
-                                                                               
action += '&amp;' + parameters.parameter[i]['name'] + '=' + 
aData[parameters.parameter[i]['source']];
-                                                                               
i++;
-                                                                               
}
-                                                                       
</xsl:if>
+                                                                               
                                                if (numSelected &gt; 1){
+                                                                               
                                                        target = '_blank';
+                                                                               
                                                }
 
-                                                                       // look 
for the word "DELETE" in URL
-                                                                       
if(substr_count(action,'delete')>0)
-                                                                       {
-                                                                       action 
+= "&amp;confirm=yes&amp;phpgw_return_as=json";
-                                                                       
execute_ajax(action, function(result){
-                                                                       
document.getElementById("message").innerHTML += '<br/>' + result;
-                                                                       
oTable.fnDraw();
-                                                                       });
-                                                                       }
-                                                                       else if 
(target == 'ajax')
-                                                                       {
-                                                                       action 
+= "&amp;phpgw_return_as=json";
-                                                                       
execute_ajax(action, function(result){
-                                                                       
document.getElementById("message").innerHTML += '<br/>' + result;
-                                                                       
oTable.fnDraw();
-                                                                       });
-                                                                       }
-                                                                       else
-                                                                       {
-                                                                       
window.open(action,target);
-                                                                       }
-                                                                       n++;
-                                                                       }
-                                                                       }
-                                                                       }
-                                                                       
<!--xsl:value-of select="phpgw:conditional(not(position() = last()), ',', 
'')"/-->
-                                                               </xsl:otherwise>
-                                                       </xsl:choose>
-                                               </xsl:for-each>
-                                       </xsl:when>
-                               </xsl:choose>
-                               ];
-                               JqueryPortico.TableTools = {
-                               "sSwfPath": 
"phpgwapi/js/DataTables/extensions/TableTools/swf/copy_csv_xls_pdf.swf",
-                               "sRowSelect": "multi",
-                               "aButtons": button_def
-                               };
-                       </xsl:when>
-                       <xsl:otherwise>
-                               JqueryPortico.TableTools = false;
-                       </xsl:otherwise>
-               </xsl:choose>
+                                                                               
                                                var n = 0;
+                                                                               
                                                for (; n &lt; numSelected; ) {
+                                                                               
                                                        // 
console.log(selected[n]);
+                                                                               
                                                        var aData = 
oTable.fnGetData( selected[n] ); //complete dataset from json returned from 
server
+                                                                               
                                                        // console.log(aData);
+
+                                                                               
                                                        //delete stuff comes 
here
+                                                                               
                                                        var action = 
"<xsl:value-of select="action"/>";
+                                                                               
                                                        var my_name = 
"<xsl:value-of select="my_name"/>";
+
+                                                                               
                                                        <xsl:if 
test="parameters">
+                                                                               
                                                                var parameters 
= <xsl:value-of select="parameters"/>;
+                                                                               
                                                                // 
console.log(parameters.parameter);
+                                                                               
                                                                var i = 0;
+                                                                               
                                                                len = 
parameters.parameter.length;
+                                                                               
                                                                for (; i &lt; 
len; ) {
+                                                                               
                                                                        action 
+= '&amp;' + parameters.parameter[i]['name'] + '=' + 
aData[parameters.parameter[i]['source']];
+                                                                               
                                                                        i++;
+                                                                               
                                                                }
+                                                                               
                                                        </xsl:if>
+
+                                                                               
                                                        // look for the word 
"DELETE" in URL and my_name
+                                                                               
                                                        
if(substr_count(action,'delete')>0 || substr_count(my_name,'delete')>0)
+                                                                               
                                                        {
+                                                                               
                                                                action += 
"&amp;confirm=yes&amp;phpgw_return_as=json";
+                                                                               
                                                                
execute_ajax(action, function(result){
+                                                                               
                                                                        
document.getElementById("message").innerHTML += '<br/>' + result;
+                                                                               
                                                                        
oTable.fnDraw();
+                                                                               
                                                                });
+                                                                               
                                                        }
+                                                                               
                                                        else if (target == 
'ajax')
+                                                                               
                                                        {
+                                                                               
                                                                action += 
"&amp;phpgw_return_as=json";
+                                                                               
                                                                
execute_ajax(action, function(result){
+                                                                               
                                                                        
document.getElementById("message").innerHTML += '<br/>' + result;
+                                                                               
                                                                        
oTable.fnDraw();
+                                                                               
                                                                });
+                                                                               
                                                        }
+                                                                               
                                                        else
+                                                                               
                                                        {
+                                                                               
                                                                
window.open(action,target);
+                                                                               
                                                        }
+                                                                               
                                                        n++;
+                                                                               
                                                }
+                                                                               
                                        }
+                                                                               
                                }
+                                                                               
                                <!--xsl:value-of 
select="phpgw:conditional(not(position() = last()), ',', '')"/-->
+                                                                               
                        </xsl:otherwise>
+                                                                               
                </xsl:choose>
+                                                                               
        </xsl:for-each>
+                                                                               
</xsl:when>
+                                                                       
</xsl:choose>
+                                                               ];
+                                                               <xsl:choose>
+                                                                       
<xsl:when test="group_buttons = '1'">
+                                                                               
var group_buttons = true;
+                                                                       
</xsl:when>
+                                                                       
<xsl:otherwise>
+                                                                               
var group_buttons = false;
+                                                                       
</xsl:otherwise>
+                                                               </xsl:choose>
+
+                                                               
if($(document).width() &lt; 1000)
+                                                               {
+                                                                       
group_buttons = true;
+                                                               }
+
+                                                               
$.fn.dataTable.Buttons.swfPath = 
"phpgwapi/js/DataTables/extensions/Buttons/swf/flashExport.swf";
+
+
+                                                               
if(group_buttons === true)
+                                                               {
+                                                                       
JqueryPortico.buttons = [
+                                                                               
                                        {
+                                                                               
                                                extend: 'collection',
+                                                                               
                                                text: "<xsl:value-of 
select="php:function('lang', 'collection')"/>",
+                                                                               
                                                collectionLayout: 
'three-column',
+                                                                               
                                                buttons: button_def
+                                                                               
                                        }
+                                                                               
                                ];
+
+                                                               }
+                                                               else
+                                                               {
+                                                                       
JqueryPortico.buttons = button_def;
+                                                               }
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       JqueryPortico.buttons = false;
+                               </xsl:otherwise>
+                       </xsl:choose>
 <![CDATA[
                $(document).ready(function() 
                {
                
                        var options ={};
-                       options.TableTools = JqueryPortico.TableTools;
+                       options.TableTools = JqueryPortico.buttons;
                        oTable = 
JqueryPortico.inlineTableHelper("datatable-container", ajax_url, 
JqueryPortico.columns, options);
 ]]>
                /**
@@ -630,20 +653,20 @@
                                        $('#' + 
result.datatable_def.container).empty();
                                        $('#' + 
result.datatable_def.container).append(result.datatable_head);
 
-                                       var TableTools = 
JqueryPortico.TableTools;
+                                       var buttons_def = JqueryPortico.buttons;
                                        var download = 
result.datatable_def.download || false;
                                        if(download)
                                        {
-                                               for 
(i=0;i<TableTools.aButtons.length;i++)
+                                               for 
(i=0;i<buttons_def.length;i++)
                                                {
-                                                       
if(TableTools.aButtons[i].sExtends == "download")
-                                                       {
-                                                               
TableTools.aButtons[i].sUrl = phpGWLink('index.php',download);
-                                                       }
+//                                                     
if(buttons_def.buttons[i].extend == "download")
+//                                                     {
+//                                                             
buttons_def.buttons[i].sUrl = phpGWLink('index.php',download);
+//                                                     }
                                                }
                                        }
                                        options ={};
-                                       options.TableTools = TableTools;
+                                       options.TableTools = buttons_def;
                                        var render;
                                        var columns = [];
                                        var PreColumns = 
result.datatable_def.ColumnDefs;

Modified: branches/dev-syncromind/property/templates/base/wo_hour.index.xsl
===================================================================
--- branches/dev-syncromind/property/templates/base/wo_hour.index.xsl   
2016-02-03 21:53:52 UTC (rev 14694)
+++ branches/dev-syncromind/property/templates/base/wo_hour.index.xsl   
2016-02-04 12:59:07 UTC (rev 14695)
@@ -277,169 +277,234 @@
                var editor_action = '<xsl:value-of select="editor_action"/>';
                        
                        
-               <xsl:choose>
-                       <xsl:when test="//datatable/actions">
-                               JqueryPortico.TableTools =      {
-                               "sSwfPath": 
"phpgwapi/js/DataTables/extensions/TableTools/swf/copy_csv_xls_pdf.swf",
-                               "sRowSelect": "multi",
-                               "aButtons":
-                               [
-                               {
-                               "sExtends":    "collection",
-                               "sButtonText": "Operation",
-                               "aButtons": [
-                               'copy',
-                               "select_all",
-                               "select_none"
-                               <xsl:choose>
-                                       <xsl:when test="download">
-                                               ,{
-                                               "sExtends": "download",
-                                               "sButtonText": "Download",
-                                               "sUrl": '<xsl:value-of 
select="download"/>'
-                                               }
-                                       </xsl:when>
-                               </xsl:choose>
-                               <xsl:choose>
-                                       <xsl:when test="//datatable/actions">
-                                               ,
-                                               {
-                                               sExtends: "div",
-                                               sButtonText: "Knapper nedenfor 
gjelder pr valgt element "
-                                               },
-                                       </xsl:when>
-                               </xsl:choose>
+                       <xsl:choose>
+                               <xsl:when test="//datatable/actions">
+                                       var button_def = [
+//                                                                     {
+//                                                                             
extend: 'colvis',
+//                                                                             
exclude: exclude_colvis,
+//                                                                             
text: function ( dt, button, config ) {
+//                                                                             
        return dt.i18n( 'buttons.show_hide', 'Show / hide columns' );
+//                                                                             
}
+//                                                                     },
+                                                                       {
+                                                                               
extend: 'copy',
+                                                                               
text: "<xsl:value-of select="php:function('lang', 'copy')"/>"
+                                                                       },
+                                                                       {
+                                                                               
        text: "<xsl:value-of select="php:function('lang', 'select all')"/>",
+                                                                               
        action: function () {
+                                                                               
                var api = oTable.api();
+                                                                               
                api.rows().select();
+                                                                               
                $(".mychecks").each(function()
+                                                                               
                {
+                                                                               
                        $(this).prop("checked", true);
+                                                                               
                });
+                                                                               
        }
+                                                                               
},
+                                                                               
{
+                                                                               
        text: "<xsl:value-of select="php:function('lang', 'select none')"/>",
+                                                                               
        action: function () {
+                                                                               
                var api = oTable.api();
+                                                                               
                api.rows().deselect();
+                                                                               
                $(".mychecks").each(function()
+                                                                               
                {
+                                                                               
                        $(this).prop("checked", false);
+                                                                               
                });
+                                                                               
        }
+                                                                               
},
+                                                                               
'copyFlash',
+                                                                               
'csvFlash',
+                                                                               
'excelFlash',
+                                                                               
'pdfFlash'
 
-                               <xsl:for-each select="//datatable/actions">
-                                       <xsl:choose>
-                                               <xsl:when test="type = 
'custom'">
-                                                       {
-                                                       sExtends:               
"select",
-                                                       sButtonText:    
"<xsl:value-of select="text"/>",
-                                                       fnClick:                
function (nButton, oConfig, oFlash) {
 
-                                                       <xsl:if 
test="confirm_msg">
-                                                               var confirm_msg 
= "<xsl:value-of select="confirm_msg"/>";
-                                                               var r = 
confirm(confirm_msg);
-                                                               if (r != true) {
-                                                               return false;
-                                                               }
-                                                       </xsl:if>
+                                                                       
<xsl:choose>
+                                                                               
<xsl:when test="download">
+                                                                               
,{
+                                                                               
        text: "<xsl:value-of select="php:function('lang', 'download')"/>",
+                                                                               
        action: function (e, dt, node, config) {
+                                                                               
        var sUrl = '<xsl:value-of select="download"/>';
+                                                                               
        <![CDATA[
+                                                                               
                var oParams = {};
+                                                                               
                oParams.length = -1;
+                                                                               
                oParams.columns = null;
+                                                                               
                oParams.start = null;
+                                                                               
                oParams.draw = null;
+                                                                               
                var addtional_filterdata = 
oTable.dataTableSettings[0]['ajax']['data'];
+                                                                               
                for (var attrname in addtional_filterdata)
+                                                                               
                {
+                                                                               
                        oParams[attrname] = addtional_filterdata[attrname];
+                                                                               
                }
+                                                                               
                var iframe = document.createElement('iframe');
+                                                                               
                iframe.style.height = "0px";
+                                                                               
                iframe.style.width = "0px";
+                                                                               
                iframe.src = sUrl+"&"+$.param(oParams) + "&export=1";
+                                                                               
                alert(iframe.src);
+                                                                               
                if(confirm("This will take some time..."))
+                                                                               
                {
+                                                                               
                        document.body.appendChild( iframe );
+                                                                               
                }
+                                                                               
                ]]>
+                                                                               
        }
 
-                                                       var action = 
"<xsl:value-of select="action"/>";
+                                                                               
}
+                                                                               
</xsl:when>
+                                                                       
</xsl:choose>
+                                                                       
<xsl:choose>
+                                                                               
<xsl:when test="//datatable/actions != ''">
+                                                                               
        <xsl:choose>
+                                                                               
                <xsl:when test="ungroup_buttons=''">
+//                                                                             
                        ,{
+//                                                                             
                                extend: "div",
+//                                                                             
                                text: "Knapper nedenfor gjelder pr valgt 
element "
+//                                                                             
                        }
+                                                                               
                </xsl:when>
+                                                                               
        </xsl:choose>
+                                                                               
        <xsl:for-each select="//datatable/actions">
+                                                                               
                <xsl:choose>
+                                                                               
                        <xsl:when test="type = 'custom'">
+                                                                               
                                ,{
+                                                                               
                                        text: "<xsl:value-of select="text"/>",
+                                                                               
                                        enabled: false,
+                                                                               
                                        className: 'record',
+                                                                               
                                        action: function (e, dt, node, config) {
+                                                                               
                                                <xsl:if test="confirm_msg">
+                                                                               
                                                        var confirm_msg = 
"<xsl:value-of select="confirm_msg"/>";
+                                                                               
                                                        var r = 
confirm(confirm_msg);
+                                                                               
                                                        if (r != true) {
+                                                                               
                                                                return false;
+                                                                               
                                                        }
+                                                                               
                                                </xsl:if>
+                                                                               
                                                <xsl:value-of 
select="custom_code"/>
+                                                                               
                                        }
 
-                                                       <xsl:if 
test="parameters">
-                                                               var parameters 
= <xsl:value-of select="parameters"/>;
-                                                               var i = 0;
-                                                               len = 
parameters.parameter.length;
-                                                               for (; i &lt; 
len; ) {
-                                                               action += 
'&amp;' + parameters.parameter[i]['name'] + '=' + 
aData[parameters.parameter[i]['source']];
-                                                               i++;
-                                                               }
-                                                       </xsl:if>
+                                                                               
                                }
+                                                                               
                                <!--xsl:value-of 
select="phpgw:conditional(not(position() = last()), ',', '')"/-->
+                                                                               
                        </xsl:when>
+                                                                               
                        <xsl:otherwise>
+                                                                               
                                ,{
+                                                                               
                                        text: "<xsl:value-of select="text"/>",
+                                                                               
                                        enabled: false,
+                                                                               
                                        className: 'record',
+                                                                               
                                        action: function (e, dt, node, config) {
+                                                                               
                                                var receiptmsg = [];
+                                                                               
                                                var selected = fnGetSelected();
+                                                                               
                                                var numSelected = 
selected.length;
 
-                                                       <xsl:value-of 
select="custom_code"/>
-                                                       }
+                                                                               
                                                if (numSelected ==0){
+                                                                               
                                                        alert('None selected');
+                                                                               
                                                        return false;
+                                                                               
                                                }
 
-                                                       }<xsl:value-of 
select="phpgw:conditional(not(position() = last()), ',', '')"/>
-                                               </xsl:when>
-                                               <xsl:otherwise>
-                                                       {
-                                                       sExtends:               
"select",
-                                                       sButtonText:    
"<xsl:value-of select="text"/>",
-                                                       fnClick:                
function (nButton, oConfig, oFlash) {
-                                                       var receiptmsg = [];
-                                                       var selected = 
fnGetSelected();
-                                                       var numSelected =       
selected.length;
+                                                                               
                                                <xsl:if test="confirm_msg">
+                                                                               
                                                        var confirm_msg = 
"<xsl:value-of select="confirm_msg"/>";
+                                                                               
                                                        var r = 
confirm(confirm_msg);
+                                                                               
                                                        if (r != true) {
+                                                                               
                                                                return false;
+                                                                               
                                                        }
+                                                                               
                                                </xsl:if>
 
-                                                       if (numSelected ==0){
-                                                       alert('None selected');
-                                                       return false;
-                                                       }
+                                                                               
                                                var target = "<xsl:value-of 
select="target"/>";
+                                                                               
                                                if(!target)
+                                                                               
                                                {
+                                                                               
                                                        target = '_self';
+                                                                               
                                                }
 
-                                                       <xsl:if 
test="confirm_msg">
-                                                               var confirm_msg 
= "<xsl:value-of select="confirm_msg"/>";
-                                                               var r = 
confirm(confirm_msg);
-                                                               if (r != true) {
-                                                               return false;
-                                                               }
-                                                       </xsl:if>
+                                                                               
                                                if (numSelected &gt; 1){
+                                                                               
                                                        target = '_blank';
+                                                                               
                                                }
 
-                                                       var target = 
"<xsl:value-of select="target"/>";
-                                                       if(!target)
-                                                       {
-                                                       target = '_self';
-                                                       }
+                                                                               
                                                var n = 0;
+                                                                               
                                                for (; n &lt; numSelected; ) {
+                                                                               
                                                        // 
console.log(selected[n]);
+                                                                               
                                                        var aData = 
oTable.fnGetData( selected[n] ); //complete dataset from json returned from 
server
+                                                                               
                                                        // console.log(aData);
 
-                                                       if (numSelected &gt; 1){
-                                                       target = '_blank';
-                                                       }
+                                                                               
                                                        //delete stuff comes 
here
+                                                                               
                                                        var action = 
"<xsl:value-of select="action"/>";
+                                                                               
                                                        var my_name = 
"<xsl:value-of select="my_name"/>";
 
-                                                       var n = 0;
-                                                       for (; n &lt; 
numSelected; ) {
+                                                                               
                                                        <xsl:if 
test="parameters">
+                                                                               
                                                                var parameters 
= <xsl:value-of select="parameters"/>;
+                                                                               
                                                                // 
console.log(parameters.parameter);
+                                                                               
                                                                var i = 0;
+                                                                               
                                                                len = 
parameters.parameter.length;
+                                                                               
                                                                for (; i &lt; 
len; ) {
+                                                                               
                                                                        action 
+= '&amp;' + parameters.parameter[i]['name'] + '=' + 
aData[parameters.parameter[i]['source']];
+                                                                               
                                                                        i++;
+                                                                               
                                                                }
+                                                                               
                                                        </xsl:if>
 
-                                                       //                      
        console.log(selected[n]);
-                                                       var aData = 
oTable.fnGetData( selected[n] ); //complete dataset from json returned from 
server
-                                                       //                      
        console.log(aData);
+                                                                               
                                                        // look for the word 
"DELETE" in URL and my_name
+                                                                               
                                                        
if(substr_count(action,'delete')>0 || substr_count(my_name,'delete')>0)
+                                                                               
                                                        {
+                                                                               
                                                                action += 
"&amp;confirm=yes&amp;phpgw_return_as=json";
+                                                                               
                                                                
execute_ajax(action, function(result){
+                                                                               
                                                                        
document.getElementById("message").innerHTML += '<br/>' + result;
+                                                                               
                                                                        
oTable.fnDraw();
+                                                                               
                                                                });
+                                                                               
                                                        }
+                                                                               
                                                        else if (target == 
'ajax')
+                                                                               
                                                        {
+                                                                               
                                                                action += 
"&amp;phpgw_return_as=json";
+                                                                               
                                                                
execute_ajax(action, function(result){
+                                                                               
                                                                        
document.getElementById("message").innerHTML += '<br/>' + result;
+                                                                               
                                                                        
oTable.fnDraw();
+                                                                               
                                                                });
+                                                                               
                                                        }
+                                                                               
                                                        else
+                                                                               
                                                        {
+                                                                               
                                                                
window.open(action,target);
+                                                                               
                                                        }
+                                                                               
                                                        n++;
+                                                                               
                                                }
+                                                                               
                                        }
+                                                                               
                                }
+                                                                               
                                <!--xsl:value-of 
select="phpgw:conditional(not(position() = last()), ',', '')"/-->
+                                                                               
                        </xsl:otherwise>
+                                                                               
                </xsl:choose>
+                                                                               
        </xsl:for-each>
+                                                                               
</xsl:when>
+                                                                       
</xsl:choose>
+                                                               ];
+                                                               <xsl:choose>
+                                                                       
<xsl:when test="group_buttons = '1'">
+                                                                               
var group_buttons = true;
+                                                                       
</xsl:when>
+                                                                       
<xsl:otherwise>
+                                                                               
var group_buttons = false;
+                                                                       
</xsl:otherwise>
+                                                               </xsl:choose>
 
-                                                       //delete stuff comes 
here
-                                                       var action = 
"<xsl:value-of select="action"/>";
-
-                                                       <xsl:if 
test="parameters">
-                                                               var parameters 
= <xsl:value-of select="parameters"/>;
-                                                               //              
                                console.log(parameters.parameter);
-                                                               var i = 0;
-                                                               len = 
parameters.parameter.length;
-                                                               for (; i &lt; 
len; ) {
-                                                               action += 
'&amp;' + parameters.parameter[i]['name'] + '=' + 
aData[parameters.parameter[i]['source']];
-                                                               i++;
+                                                               
if($(document).width() &lt; 1000)
+                                                               {
+                                                                       
group_buttons = true;
                                                                }
-                                                       </xsl:if>
-                                                                               
                                                                                
        
-                                                       // look for the word 
"DELETE" in URL
-                                                       
if(substr_count(action,'delete')>0)
-                                                       {
-                                                       action += 
"&amp;confirm=yes&amp;phpgw_return_as=json";
-                                                       execute_ajax(action, 
function(result){
-                                                       
document.getElementById("message").innerHTML += '<br/>' + result;
-                                                       });
-                                                       oTable.fnDraw();
-                                                       }
-                                                       else if (target == 
'ajax')
-                                                       {
-                                                       action += 
"&amp;phpgw_return_as=json";
-                                                       execute_ajax(action, 
function(result){
-                                                       
document.getElementById("message").innerHTML += '<br/>' + result;
-                                                       });
-                                                       oTable.fnDraw();
-                                                       }
-                                                       else
-                                                       {
-                                                       
window.open(action,target);
-                                                       }
+                                                                       
$.fn.dataTable.Buttons.swfPath = 
"phpgwapi/js/DataTables/extensions/Buttons/swf/flashExport.swf";
 
-                                                       n++;
-                                                       }
-                                                       }
 
-                                                       }<xsl:value-of 
select="phpgw:conditional(not(position() = last()), ',', '')"/>
-                                               </xsl:otherwise>
-                                       </xsl:choose>
-                               </xsl:for-each>
+                                                               
if(group_buttons === true)
+                                                               {
+                                                                       
JqueryPortico.buttons = [
+                                                                               
                                        {
+                                                                               
                                                extend: 'collection',
+                                                                               
                                                text: "<xsl:value-of 
select="php:function('lang', 'collection')"/>",
+                                                                               
                                                collectionLayout: 
'three-column',
+                                                                               
                                                buttons: button_def
+                                                                               
                                        }
+                                                                               
                                ];
 
-                               ]
-                               }
-                               ]
-                               };
-
-                       </xsl:when>
-                       <xsl:otherwise>
-                               JqueryPortico.TableTools = {
-                               "sSwfPath": 
"phpgwapi/js/DataTables/extensions/TableTools/swf/copy_csv_xls_pdf.swf"
-                               };
-                       </xsl:otherwise>
-               </xsl:choose>
-
+                                                               }
+                                                               else
+                                                               {
+                                                                       
JqueryPortico.buttons = button_def;
+                                                               }
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       JqueryPortico.buttons = false;
+                               </xsl:otherwise>
+                       </xsl:choose>
                /**
                * Add left click action..
                */
@@ -475,7 +540,7 @@
                </xsl:for-each>
                        
                var options = {disablePagination:true, disableFilter:true};
-               options.TableTools = JqueryPortico.TableTools;
+               options.TableTools = JqueryPortico.buttons;
                        
                var source = "<xsl:value-of select="source"/>";
 

Modified: branches/dev-syncromind/rental/js/rental/composite.edit.js
===================================================================
--- branches/dev-syncromind/rental/js/rental/composite.edit.js  2016-02-03 
21:53:52 UTC (rev 14694)
+++ branches/dev-syncromind/rental/js/rental/composite.edit.js  2016-02-04 
12:59:07 UTC (rev 14695)
@@ -120,8 +120,8 @@
 
 addUnit = function (oArgs, parameters) {
 
-       var oTT = TableTools.fnGetInstance('datatable-container_1');
-       var selected = oTT.fnGetSelectedData();
+       var api =$( '#datatable-container_1' ).dataTable().api();
+       var selected = api.rows( { selected: true } ).data();
        var nTable = 0;
 
        if (selected.length == 0) {
@@ -145,8 +145,8 @@
 
 removeUnit = function (oArgs, parameters) {
 
-       var oTT = TableTools.fnGetInstance('datatable-container_0');
-       var selected = oTT.fnGetSelectedData();
+       var api =$( '#datatable-container_0' ).dataTable().api();
+       var selected = api.rows( { selected: true } ).data();
        var nTable = 0;
 
        if (selected.length == 0) {

Modified: branches/dev-syncromind/rental/js/rental/contract.edit.js
===================================================================
--- branches/dev-syncromind/rental/js/rental/contract.edit.js   2016-02-03 
21:53:52 UTC (rev 14694)
+++ branches/dev-syncromind/rental/js/rental/contract.edit.js   2016-02-04 
12:59:07 UTC (rev 14695)
@@ -371,8 +371,8 @@
 
 addComposite = function (oArgs, parameters) {
 
-       var oTT = TableTools.fnGetInstance('datatable-container_2');
-       var selected = oTT.fnGetSelectedData();
+       var api =$( '#datatable-container_2' ).dataTable().api();
+       var selected = api.rows( { selected: true } ).data();
        var nTable = 1;
 
        if (selected.length == 0) {
@@ -395,8 +395,8 @@
 
 removeComposite = function (oArgs, parameters) {
 
-       var oTT = TableTools.fnGetInstance('datatable-container_1');
-       var selected = oTT.fnGetSelectedData();
+       var api =$( '#datatable-container_1' ).dataTable().api();
+       var selected = api.rows( { selected: true } ).data();
        var nTable = 1;
 
        if (selected.length == 0) {
@@ -437,8 +437,9 @@
 
 addParty = function (oArgs, parameters) {
 
-       var oTT = TableTools.fnGetInstance('datatable-container_4');
-       var selected = oTT.fnGetSelectedData();
+       var api =$( '#datatable-container_4' ).dataTable().api();
+       var selected = api.rows( { selected: true } ).data();
+
        var nTable = 3;
 
        if (selected.length == 0) {
@@ -461,8 +462,8 @@
 
 removeParty = function (oArgs, parameters) {
 
-       var oTT = TableTools.fnGetInstance('datatable-container_3');
-       var selected = oTT.fnGetSelectedData();
+       var api =$( '#datatable-container_3' ).dataTable().api();
+       var selected = api.rows( { selected: true } ).data();
        var nTable = 3;
 
        if (selected.length == 0) {
@@ -513,8 +514,8 @@
 
 addPrice = function (oArgs, parameters) {
 
-       var oTT = TableTools.fnGetInstance('datatable-container_6');
-       var selected = oTT.fnGetSelectedData();
+       var api =$( '#datatable-container_6' ).dataTable().api();
+       var selected = api.rows( { selected: true } ).data();
        var nTable = 5;
 
        if (selected.length == 0) {
@@ -538,8 +539,8 @@
 
 removePrice = function (oArgs, parameters) {
 
-       var oTT = TableTools.fnGetInstance('datatable-container_5');
-       var selected = oTT.fnGetSelectedData();
+       var api =$( '#datatable-container_5' ).dataTable().api();
+       var selected = api.rows( { selected: true } ).data();
        var nTable = 5;
 
        if (selected.length == 0) {
@@ -575,8 +576,8 @@
 
 removeDocument = function (oArgs, parameters) {
 
-       var oTT = TableTools.fnGetInstance('datatable-container_8');
-       var selected = oTT.fnGetSelectedData();
+       var api =$( '#datatable-container_8' ).dataTable().api();
+       var selected = api.rows( { selected: true } ).data();
        var nTable = 8;
 
        if (selected.length == 0) {
@@ -597,8 +598,8 @@
 
 deleteNotification = function (oArgs, parameters) {
 
-       var oTT = TableTools.fnGetInstance('datatable-container_9');
-       var selected = oTT.fnGetSelectedData();
+       var api =$( '#datatable-container_9' ).dataTable().api();
+       var selected = api.rows( { selected: true } ).data();
 
        if (selected.length == 0) {
                alert('None selected');

Modified: branches/dev-syncromind/rental/js/rental/frontpage.index.js
===================================================================
--- branches/dev-syncromind/rental/js/rental/frontpage.index.js 2016-02-03 
21:53:52 UTC (rev 14694)
+++ branches/dev-syncromind/rental/js/rental/frontpage.index.js 2016-02-04 
12:59:07 UTC (rev 14695)
@@ -106,8 +106,8 @@
 
 dismissNotification = function (oArgs, parameters) {
 
-       var oTT = TableTools.fnGetInstance('datatable-container_5');
-       var selected = oTT.fnGetSelectedData();
+       var api =$( '#datatable-container_5' ).dataTable().api();
+       var selected = api.rows( { selected: true } ).data();
        var nTable = 5;
 
        if (selected.length == 0) {
@@ -129,8 +129,8 @@
 
 dismissNotificationAll = function (oArgs, parameters) {
 
-       var oTT = TableTools.fnGetInstance('datatable-container_5');
-       var selected = oTT.fnGetSelectedData();
+       var api =$( '#datatable-container_5' ).dataTable().api();
+       var selected = api.rows( { selected: true } ).data();
        var nTable = 5;
 
        if (selected.length == 0) {

Modified: branches/dev-syncromind/rental/js/rental/price_item.adjust_price.js
===================================================================
--- branches/dev-syncromind/rental/js/rental/price_item.adjust_price.js 
2016-02-03 21:53:52 UTC (rev 14694)
+++ branches/dev-syncromind/rental/js/rental/price_item.adjust_price.js 
2016-02-04 12:59:07 UTC (rev 14695)
@@ -49,8 +49,8 @@
 
 function removePrice(oArgs, parameters)
 {
-       var oTT = TableTools.fnGetInstance('datatable-container_0');
-       var selected = oTT.fnGetSelectedData();
+       var api =$( '#datatable-container_0' ).dataTable().api();
+       var selected = api.rows( { selected: true } ).data();
        var nTable = 0;
 
        if (selected.length == 0) {

Modified: branches/dev-syncromind/rental/js/rental/resultunit.edit.js
===================================================================
--- branches/dev-syncromind/rental/js/rental/resultunit.edit.js 2016-02-03 
21:53:52 UTC (rev 14694)
+++ branches/dev-syncromind/rental/js/rental/resultunit.edit.js 2016-02-04 
12:59:07 UTC (rev 14695)
@@ -107,8 +107,8 @@
 
 function removeDelegate(oArgs, parameters) {
 
-       var oTT = TableTools.fnGetInstance('datatable-container_0');
-       var selected = oTT.fnGetSelectedData();
+       var api =$( '#datatable-container_0' ).dataTable().api();
+       var selected = api.rows( { selected: true } ).data();
        var nTable = 0;
 
        if (selected.length == 0) {




reply via email to

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