Permalink
Browse files

Merge branch '9.1'

  • Loading branch information...
michelerota committed Oct 19, 2017
2 parents 6cb9bd0 + c77821e commit 4f0eec6467a9929ea429ff580321abae9e41407b
@@ -315,7 +315,7 @@ public function edit($record, $fieldprefix, $mode)
for ($i = 0; $i < count($values); ++$i) {
$sel = '';
// If the current value is selected or occurs in the record
if ((!is_null($this->m_selected) && $values[$i] === $this->m_selected) || (is_null($this->m_selected) && $values[$i] === $recvalue && $recvalue !== '')) {
if ((!is_null($this->m_selected) && $values[$i] == $this->m_selected) || (is_null($this->m_selected) && $values[$i] == $recvalue && $recvalue !== '')) {
$sel = 'selected';
}
@@ -75,7 +75,7 @@ public function render()
}
$options = $this->getOptions($values);
$call = $this->getGrid()->getUpdateCall(array('atkstartat' => 0), array('atklimit' => '$F(this)'));
$call = $this->getGrid()->getUpdateCall(array('atkstartat' => 0), array('atklimit' => 'this.value'));
$result = $this->getUi()->render('dglimit.tpl', array('options' => $options, 'call' => $call, 'label' => $this->text('datagrid_dglimit', '', false)));
return $result;
@@ -4,6 +4,11 @@ jQuery(function () {
jQuery("form #action-buttons button").removeAttr("clicked");
jQuery(this).attr("clicked", "true");
});
// resize window fix smartmenu rendering
setTimeout(function(){
jQuery(window).trigger('resize');
}, 10);
});
View
@@ -48,6 +48,12 @@ public function export($data, $fileName, $type, $ext = '', $compression = '')
} elseif ($type == 'xml') {
$mime_type = 'text/xml';
$ext = 'xml';
} elseif ($type == 'ics') {
$mime_type = 'text/calendar';
$ext = 'ics';
} elseif ($type == 'txt') {
$mime_type = 'text/plain';
$ext = 'txt';
} else {
$mime_type = 'application/octet-stream';
}
@@ -84,6 +90,8 @@ public function export($data, $fileName, $type, $ext = '', $compression = '')
if ($type == 'csv' || $type == 'excel') {
// in order to output UTF-8 content that Excel both on Windows and OS X will be able to successfully read
echo mb_convert_encoding($data, 'Windows-1252', 'UTF-8');
} else {
echo $data;
}
}
}

0 comments on commit 4f0eec6

Please sign in to comment.