Skip to content
Snippets Groups Projects
Commit 3f5bf8d7 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Code cleanup; Fix selectbox width

parent 6ca666f1
No related branches found
No related tags found
No related merge requests found
...@@ -67,25 +67,9 @@ class VirtuemartControllerEuRecap extends VmController { ...@@ -67,25 +67,9 @@ class VirtuemartControllerEuRecap extends VmController {
vRequest::setVar('task', $layout); vRequest::setVar('task', $layout);
// vRequest::setVar('format', 'raw'); // vRequest::setVar('format', 'raw');
// $japp = &JApplication::getInstance("site"); // fetches the current application
// $japp->setTemplate("", null); // sets an empty template, disables the default one
// $document = &JFactory::getDocument(); // gets the document, that the user wants
// $document->setType("raw"); // sets its type to raw
// JRequest::setVar("format", "raw"); // this one is not obligatory, but my component uses this in the view later
// $document = JDocument::getInstance('raw'); //this new instance is a raw document object
// $viewType = $document->getType();
// // $viewname below is set in jinput or as you named it
// $view = $this->getView($viewName, $viewType);
// // $this->input->set('view', $viewName);
// $this->input->set('view', $viewName);
$document = JFactory::getDocument(); $document = JFactory::getDocument();
// $document->setType('raw');
$viewType = $document->getType(); $viewType = $document->getType();
$view = $this->getView($viewName, $viewType); $view = $this->getView($viewName, $viewType);
JFactory::getApplication()->enqueueMessage("Export function in controller", 'warning');
$view->setLayout($layout); $view->setLayout($layout);
$this->display(); $this->display();
......
...@@ -235,7 +235,7 @@ class VirtuemartModelEuRecap extends VmModel { ...@@ -235,7 +235,7 @@ class VirtuemartModelEuRecap extends VmModel {
foreach ($vals as $month=>$label) { foreach ($vals as $month=>$label) {
$options[] = JHtml::_ ('select.option', $label, $month); $options[] = JHtml::_ ('select.option', $label, $month);
} }
$listHTML = JHtml::_ ('select.genericlist', $options, 'month', 'size="7" class="inputbox" onchange="this.form.submit();" ', 'text', 'value', $selected); $listHTML = JHtml::_ ('select.genericlist', $options, 'month', 'class="inputbox" style="width: inherit" onchange="this.form.submit();" ', 'text', 'value', $selected);
return $listHTML; return $listHTML;
} }
...@@ -245,7 +245,7 @@ class VirtuemartModelEuRecap extends VmModel { ...@@ -245,7 +245,7 @@ class VirtuemartModelEuRecap extends VmModel {
foreach (range(2010, 2020) as $year) { foreach (range(2010, 2020) as $year) {
$options[] = JHtml::_ ('select.option', $year, $year); $options[] = JHtml::_ ('select.option', $year, $year);
} }
$listHTML = JHtml::_ ('select.genericlist', $options, 'year', 'size="7" class="inputbox" onchange="this.form.submit();" ', 'text', 'value', $selected); $listHTML = JHtml::_ ('select.genericlist', $options, 'year', 'class="inputbox" style="width: inherit" onchange="this.form.submit();" ', 'text', 'value', $selected);
return $listHTML; return $listHTML;
} }
...@@ -263,7 +263,7 @@ class VirtuemartModelEuRecap extends VmModel { ...@@ -263,7 +263,7 @@ class VirtuemartModelEuRecap extends VmModel {
$value = substr($tmpl, 7, -4); // Cut off export_ and .php $value = substr($tmpl, 7, -4); // Cut off export_ and .php
$options[] = JHtml::_('select.option', vmText::_('VMEXT_EU_RECAP_EXPORT_' . strtoupper($value)), $value); $options[] = JHtml::_('select.option', vmText::_('VMEXT_EU_RECAP_EXPORT_' . strtoupper($value)), $value);
} }
$listHTML = JHtml::_ ('select.genericlist', $options, 'export_format', 'size="7" class="inputbox" ', 'text', 'value', $selected); $listHTML = JHtml::_ ('select.genericlist', $options, 'export_format', 'size="7" class="inputbox"', 'text', 'value', $selected);
return $listHTML; return $listHTML;
} }
......
...@@ -26,7 +26,7 @@ $myCurrencyDisplay = CurrencyDisplay::getInstance(); ...@@ -26,7 +26,7 @@ $myCurrencyDisplay = CurrencyDisplay::getInstance();
?> ?>
<pre><?php print_r(vRequest::getRequest()); ?></pre>
<form action="index.php" method="post" name="adminForm" id="adminForm"> <form action="index.php" method="post" name="adminForm" id="adminForm">
<?php echo $this->addStandardHiddenToForm(); ?> <?php echo $this->addStandardHiddenToForm(); ?>
...@@ -37,6 +37,7 @@ $myCurrencyDisplay = CurrencyDisplay::getInstance(); ...@@ -37,6 +37,7 @@ $myCurrencyDisplay = CurrencyDisplay::getInstance();
<table width="100%"> <table width="100%">
<tr width="100%"> <tr width="100%">
<td align="left"> <td align="left">
<div style="float: left">
<?php <?php
echo vmText::_('VMEXT_EU_RECAP_LIST_PERIOD'); echo vmText::_('VMEXT_EU_RECAP_LIST_PERIOD');
if ($this->frequency<12) { if ($this->frequency<12) {
...@@ -48,17 +49,14 @@ $myCurrencyDisplay = CurrencyDisplay::getInstance(); ...@@ -48,17 +49,14 @@ $myCurrencyDisplay = CurrencyDisplay::getInstance();
$vendorId = vRequest::getInt('virtuemart_vendor_id',1); $vendorId = vRequest::getInt('virtuemart_vendor_id',1);
echo ShopFunctions::renderVendorList($vendorId,false); echo ShopFunctions::renderVendorList($vendorId,false);
} ?><br> } ?><br>
<label><input type="checkbox" <?php if ($this->include_taxed_orders) { ?>checked <?php } ?> name="include_taxed_orders" value="true" style=" vertical-align: middle; position: relative; bottom: 1px;">&nbsp;&nbsp;&nbsp;<?php echo vmText::_('VMEXT_EU_RECAP_INCLUDE_TAXED'); ?></label> <label><input type="checkbox" <?php if ($this->include_taxed_orders) { ?>checked <?php } ?> name="include_taxed_orders" value="true" style="vertical-align: top; position: relative; bottom: 1px;">&nbsp;<?php echo vmText::_('VMEXT_EU_RECAP_INCLUDE_TAXED'); ?></label>
</div>
</td> <span><button class="btn btn-small" name="Go" onclick="this.form.task.value=''; this.form.submit();"><?php echo vmText::_('COM_VIRTUEMART_GO'); ?></button></span>
<td align="left" width="5%">
<button class="btn btn-small" name="Go" onclick="this.form.task.value=''; this.form.submit();"><?php echo vmText::_('COM_VIRTUEMART_GO'); ?></button>
</td> </td>
<td width="30%"></td> <td align="right" style="vertical-align: top">
<td align="right" width> <div style="float: right"><?php echo $this->export_format_list; ?>
<?php echo $this->export_format_list; ?> <button class="btn btn-small" name="format" value="raw" onclick="this.form.task.value='export'; this.form.submit();" style="vertical-align: top;"><?php echo vmText::_('VMEXT_EU_RECAP_EXPORT'); ?>
<button class="btn btn-small" name="format" value="raw" onclick="this.form.task.value='export'; this.form.submit();"><?php echo vmText::_('VMEXT_EU_RECAP_EXPORT'); ?> </button></div>
</button>
</td> </td>
</tr> </tr>
</table> </table>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment