[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [14713] more fixes
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [14713] more fixes |
Date: |
Tue, 09 Feb 2016 14:39:48 +0000 |
Revision: 14713
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14713
Author: sigurdne
Date: 2016-02-09 14:39:47 +0000 (Tue, 09 Feb 2016)
Log Message:
-----------
more fixes
Modified Paths:
--------------
branches/dev-syncromind/phpgwapi/templates/base/datatable_jquery.xsl
branches/dev-syncromind/rental/inc/class.uicontract.inc.php
branches/dev-syncromind/rental/js/rental/contract.index.js
Modified: branches/dev-syncromind/phpgwapi/templates/base/datatable_jquery.xsl
===================================================================
--- branches/dev-syncromind/phpgwapi/templates/base/datatable_jquery.xsl
2016-02-09 12:48:10 UTC (rev 14712)
+++ branches/dev-syncromind/phpgwapi/templates/base/datatable_jquery.xsl
2016-02-09 14:39:47 UTC (rev 14713)
@@ -668,7 +668,8 @@
var iframe =
document.createElement('iframe');
iframe.style.height = "0px";
iframe.style.width = "0px";
- iframe.src =
sUrl+"&"+$.param(oParams) + "&export=1";
+ iframe.src =
sUrl+"&"+$.param(oParams) + "&export=1" + "&query=" + $('div.dataTables_filter
input').val();
+
if(confirm("This will take some time..."))
{
document.body.appendChild( iframe );
Modified: branches/dev-syncromind/rental/inc/class.uicontract.inc.php
===================================================================
--- branches/dev-syncromind/rental/inc/class.uicontract.inc.php 2016-02-09
12:48:10 UTC (rev 14712)
+++ branches/dev-syncromind/rental/inc/class.uicontract.inc.php 2016-02-09
14:39:47 UTC (rev 14713)
@@ -1052,6 +1052,9 @@
$appname = lang('contracts');
$type = 'all_contracts';
+
$GLOBALS['phpgw']->jqcal->add_listener('filter_start_date_report');
+
$GLOBALS['phpgw']->jqcal->add_listener('filter_end_date_report');
+
$function_msg = lang('list %1', $appname);
$data = array(
@@ -1064,6 +1067,34 @@
'value' =>
lang('new'),
'onclick' =>
'onNew_contract()',
'class' =>
'new_item'
+ ),
+ array
+ (
+ 'type' =>
'date-picker',
+ 'id' =>
'start_date_report',
+ 'name' =>
'start_date_report',
+ 'value' => '',
+ 'text' =>
'Export ' . lang('from')
+ ),
+ array
+ (
+ 'type' =>
'date-picker',
+ 'id' =>
'end_date_report',
+ 'name' =>
'end_date_report',
+ 'value' => '',
+ 'text' =>
'Export ' . lang('to')
+ ),
+ array(
+ 'type' =>
'link',
+ 'value' =>
lang('export_contracts'),
+ 'onclick' =>
'contract_export("all_contracts")',
+ 'class' =>
'new_item'
+ ),
+ array(
+ 'type' =>
'link',
+ 'value' =>
lang('export_contract_price_items'),
+ 'onclick' =>
'contract_export_price_items("all_contracts")',
+ 'class' =>
'new_item'
)
)
)
Modified: branches/dev-syncromind/rental/js/rental/contract.index.js
===================================================================
--- branches/dev-syncromind/rental/js/rental/contract.index.js 2016-02-09
12:48:10 UTC (rev 14712)
+++ branches/dev-syncromind/rental/js/rental/contract.index.js 2016-02-09
14:39:47 UTC (rev 14713)
@@ -15,4 +15,75 @@
{
var amount = $.number(oData[key], decimalPlaces, decimalSeparator,
thousandsSeparator) + ' ' + currency_suffix;
return amount;
-}
\ No newline at end of file
+}
+
+
+function contract_export(ctype) {
+ var typeselect = document.getElementById('contract_type');
+ var typeoption = typeselect.options[typeselect.selectedIndex].value;
+
+ var statusselect = document.getElementById('contract_status');
+ var statusoption =
statusselect.options[statusselect.selectedIndex].value;
+
+ var sSelect = document.getElementById('search_option');
+ var sOption = sSelect.options[sSelect.selectedIndex].value;
+
+ var query = $('div.dataTables_filter input').val();
+
+ var startDate =
document.getElementById('filter_start_date_report').value;
+ var endDate = document.getElementById('filter_end_date_report').value;
+
+ var oArgs = {menuaction: 'rental.uicontract.download',
+ type : ctype,
+ contract_type : typeoption,
+ contract_status : statusoption,
+ type :
'all_contracts',
+ query : query,
+ search_option : sOption,
+ start_date_report : startDate,
+ end_date_report : endDate,
+ export :true
+ };
+
+ var sUrl = phpGWLink('index.php', oArgs);
+ alert(sUrl);
+return;
+ var dl = window.open(sUrl);
+}
+
+
+function contract_export_price_items(ctype) {
+ var typeselect = document.getElementById('contract_type');
+ var typeoption = typeselect.options[typeselect.selectedIndex].value;
+
+ var statusselect = document.getElementById('contract_status');
+ var statusoption =
statusselect.options[statusselect.selectedIndex].value;
+
+ var sSelect = document.getElementById('search_option');
+ var sOption = sSelect.options[sSelect.selectedIndex].value;
+
+ var query = $('div.dataTables_filter input').val();
+
+ var startDate =
document.getElementById('filter_start_date_report').value;
+ var endDate = document.getElementById('filter_end_date_report').value;
+
+ var oArgs = {menuaction: 'rental.uicontract.download',
+ type : ctype,
+ contract_type : typeoption,
+ contract_status : statusoption,
+ type :
'all_contracts',
+ query : query,
+ search_option : sOption,
+ start_date_report : startDate,
+ end_date_report : endDate,
+ price_items : true,
+ export : true
+ };
+
+ var sUrl = phpGWLink('index.php', oArgs);
+ alert(sUrl);
+return;
+
+ var dl = window.open(sUrl);
+}
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [14713] more fixes,
Sigurd Nes <=