blue-mouse
Member
Doesn't work code in:
/components/com_fabrik/helpers/pagination.php
Is not set $selected when JText::_('COM_FABRIK_ALL) = all (PL = wszystkie)
when choose: 5,10,15,20,25,30,50 is OK ---- after selection is displayed the same what i have selected 5,10,15,20,25,30,50
when selection is "all/wszystkie", than is displayed -after selection- first value that exist in dropdown for selection -- it was "5", but i have test this and add $vals[] = 1 and now is displayed "1" after selection "all/wszystkie".
Is possible to modify this code to get displayed value "all/wszystkie" after selection "all/wszystkie" ?
/components/com_fabrik/helpers/pagination.php
PHP:
public function getLimitBox()
{
// Initialize variables
$limits = array();
$vals = array();
$vals[] = 1;
$vals[] = 2;
for ($i = 5; $i <= 30; $i += 5)
{
$vals[] = $i;
}
$vals[] = 50;
$vals[] = 100;
$vals[] = 200;
$vals[] = 500;
if (!in_array($this->startLimit, $vals))
{
$vals[] = $this->startLimit;
}
asort($vals);
foreach ($vals as $v)
{
$limits[] = JHTML::_('select.option', $v);
}
if ($this->showAllOption == true)
{
$limits[] = JHTML::_('select.option', '-1', JText::_('COM_FABRIK_ALL'));
/* add dankam no result $selected = '-1'; */
}
$selected = $this->_viewall ? '-1' : $this->limit;
$js = '';
$attribs = 'class="inputbox input-mini" size="1" onchange="' . $js . '"';
$html = JHTML::_('select.genericlist', $limits, 'limit' . $this->id, $attribs, 'value', 'text', $selected);
return $html;
}
/**
* Method to create an active pagination link to the item
Is not set $selected when JText::_('COM_FABRIK_ALL) = all (PL = wszystkie)
when choose: 5,10,15,20,25,30,50 is OK ---- after selection is displayed the same what i have selected 5,10,15,20,25,30,50
when selection is "all/wszystkie", than is displayed -after selection- first value that exist in dropdown for selection -- it was "5", but i have test this and add $vals[] = 1 and now is displayed "1" after selection "all/wszystkie".
Is possible to modify this code to get displayed value "all/wszystkie" after selection "all/wszystkie" ?