[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [15533]
From: |
saul . huanay |
Subject: |
[Fmsystem-commits] [15533] |
Date: |
Mon, 29 Aug 2016 23:38:28 +0000 (UTC) |
Revision: 15533
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15533
Author: psaul
Date: 2016-08-29 23:38:28 +0000 (Mon, 29 Aug 2016)
Log Message:
-----------
Modified Paths:
--------------
branches/dev-syncromind-2/rental/inc/class.socomposite.inc.php
branches/dev-syncromind-2/rental/inc/class.uicomposite.inc.php
branches/dev-syncromind-2/rental/js/rental/schedule.js
branches/dev-syncromind-2/rental/templates/base/schedule.xsl
Modified: branches/dev-syncromind-2/rental/inc/class.socomposite.inc.php
===================================================================
--- branches/dev-syncromind-2/rental/inc/class.socomposite.inc.php
2016-08-29 23:36:51 UTC (rev 15532)
+++ branches/dev-syncromind-2/rental/inc/class.socomposite.inc.php
2016-08-29 23:38:28 UTC (rev 15533)
@@ -547,10 +547,6 @@
}
/*----------------------------------------------------------------*/
-// $filters = array(
-// rental_socomposite::get_id_field_name() =>
$composite_id
-// );
-
$contracts =
rental_socontract::get_instance()->get($options['start_index'],
$options['num_of_objects'], $options['sort_field'], $options['ascending'],
$options['search_for'], $options['search_type'], $filters);
$data_contracts = array();
Modified: branches/dev-syncromind-2/rental/inc/class.uicomposite.inc.php
===================================================================
--- branches/dev-syncromind-2/rental/inc/class.uicomposite.inc.php
2016-08-29 23:36:51 UTC (rev 15532)
+++ branches/dev-syncromind-2/rental/inc/class.uicomposite.inc.php
2016-08-29 23:38:28 UTC (rev 15533)
@@ -1105,65 +1105,62 @@
$GLOBALS['phpgw']->preferences->save_repository();
}
}
-
- public function schedule () {
- $composite_id = (int)phpgw::get_var('id');
- $date = new DateTime(phpgw::get_var('date'));
- if ($date->format('w') != 1) {
- $date->modify('last monday');
- }
- $schedule['datasource_url'] = self::link(array(
- 'menuaction' => 'rental.uicomposite.get_schedule',
- 'composite_id' => $composite_id,
- 'phpgw_return_as' => 'json'
- ));
- $schedule['composite_id'] = $composite_id;
- $schedule['date'] = $date;
- $schedule['picker_img'] =
$GLOBALS['phpgw']->common->image('phpgwapi', 'cal');
+ public function schedule () {
+ $composite_id = (int)phpgw::get_var('id');
+ $date = new DateTime(phpgw::get_var('date'));
+ if ($date->format('w') != 1) {
+ $date->modify('last monday');
+ }
-// self::add_javascript('booking','booking','common.js');
- self::add_javascript('rental','rental','schedule.js');
+ $schedule['datasource_url'] = self::link(array(
+ 'menuaction' =>
'rental.uicomposite.get_schedule',
+ 'composite_id' => $composite_id,
+ 'phpgw_return_as' => 'json'
+ ));
+ $schedule['composite_id'] = $composite_id;
+ $schedule['date'] = $date;
+ $schedule['picker_img'] =
$GLOBALS['phpgw']->common->image('phpgwapi', 'cal');
- phpgwapi_jquery::load_widget("datepicker");
+ self::add_javascript('rental','rental','schedule.js');
- self::render_template_xsl(array('schedule'), array('schedule' =>
$schedule));
- }
-
- public function get_schedule () {
- $composite_id = (int)phpgw::get_var('id');
- $date = new DateTime(phpgw::get_var('date'));
-
- $filters = array();
- $options = array();
-
- if (phpgw::get_var('composite_id'))
- $filters['composite_id'] = phpgw::get_var('composite_id');
-
- if (phpgw::get_var('contract_status'))
- $filters['contract_status'] =
phpgw::get_var('contract_status');
-
- if (phpgw::get_var('contract_type'))
- $filters['contract_type'] = phpgw::get_var('contract_type');
+ phpgwapi_jquery::load_widget("datepicker");
- $options['start_index'] = 0;
- $options['num_of_objects'] = (phpgw::get_var('n_objects')) ?
phpgw::get_var('n_objects') : 30;
- $options['sort_field'] = '';
- $options['ascending'] = false;
- $options['search_for'] = (phpgw::get_var('search')) ?
phpgw::get_var('search') : '' ;
- $options['search_type'] = (phpgw::get_var('search_option')) ?
phpgw::get_var('search_option') : 'all';
+ self::render_template_xsl(array('schedule'),
array('schedule' => $schedule));
+ }
- //$filter['location_id'] = phpgw::get_var('location_id');
+ public function get_schedule () {
+ $composite_id = (int)phpgw::get_var('id');
+ $date = new DateTime(phpgw::get_var('date'));
- $schedule =
rental_socomposite::get_instance()->get_schedule($date, $filters, $options);
-
- $data = array(
- 'ResultSet' => array(
- "totalResultsAvailable" => $schedule['total_records'],
+ $filters = array();
+ $options = array();
+
+ if (phpgw::get_var('composite_id'))
+ $filters['composite_id'] =
phpgw::get_var('composite_id');
+
+ if (phpgw::get_var('contract_status'))
+ $filters['contract_status'] =
phpgw::get_var('contract_status');
+
+ if (phpgw::get_var('contract_type'))
+ $filters['contract_type'] =
phpgw::get_var('contract_type');
+
+ $options['start_index'] = 0;
+ $options['num_of_objects'] =
(phpgw::get_var('n_objects')) ? phpgw::get_var('n_objects') : 30;
+ $options['sort_field'] = '';
+ $options['ascending'] = false;
+ $options['search_for'] = (phpgw::get_var('search')) ?
phpgw::get_var('search') : '' ;
+ $options['search_type'] =
(phpgw::get_var('search_option')) ? phpgw::get_var('search_option') : 'all';
+
+ $schedule =
rental_socomposite::get_instance()->get_schedule($date, $filters, $options);
+
+ $data = array(
+ 'ResultSet' => array(
+ "totalResultsAvailable" =>
$schedule['total_records'],
"Result" => $schedule['results']
- )
- );
+ )
+ );
- return $data;
- }
+ return $data;
+ }
}
\ No newline at end of file
Modified: branches/dev-syncromind-2/rental/js/rental/schedule.js
===================================================================
--- branches/dev-syncromind-2/rental/js/rental/schedule.js 2016-08-29
23:36:51 UTC (rev 15532)
+++ branches/dev-syncromind-2/rental/js/rental/schedule.js 2016-08-29
23:38:28 UTC (rev 15533)
@@ -103,7 +103,7 @@
});
schedule.updateSchedule = function (date)
-{
+{
schedule.week = $.datepicker.iso8601Week(date);
$('#cal_container #numberWeek').text(schedule.week);
$("#cal_container #datepicker").datepicker("setDate", date);
@@ -156,13 +156,9 @@
n_objects: n_objects
}
- var new_url = phpGWLink('index.php', args, true);
+ schedule.datasourceUrl = phpGWLink('index.php', args, true);
- schedule.renderSchedule('schedule_container', new_url, schedule.date,
schedule.colFormatter, schedule.includeResource);
-
- //console.log(new_url);
-
- //console.log(location_id + ' / ' + search_option + ' / ' +
contract_status + ' / ' + contract_type + ' / ' + txtSearchSchedule);
+ schedule.renderSchedule('schedule_container', schedule.datasourceUrl,
schedule.date, schedule.colFormatter, schedule.includeResource);
}
$('select.searchSchedule').on('change', function() {
Modified: branches/dev-syncromind-2/rental/templates/base/schedule.xsl
===================================================================
--- branches/dev-syncromind-2/rental/templates/base/schedule.xsl
2016-08-29 23:36:51 UTC (rev 15532)
+++ branches/dev-syncromind-2/rental/templates/base/schedule.xsl
2016-08-29 23:38:28 UTC (rev 15533)
@@ -49,7 +49,7 @@
<option
value="838">!contract_type_eksternleie</option>
</select>
</td>
- </tr>
+ </tr>
<tr>
<td><label
for="search_option">!search_where</label></td>
<td valign="top">
@@ -62,7 +62,7 @@
<option
value="location_code">!object_number</option>
</select>
</td>
- </tr>
+ </tr>
<tr>
<td><label
for="contract_status">Status</label></td>
<td valign="top">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [15533],
saul . huanay <=