1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

Doesn't work displaying for pagination select value = "all"

Discussion in 'Professional Support' started by blue-mouse, Mar 19, 2016.

  1. blue-mouse

    blue-mouse Member

    Level: Community
    Doesn't work code in:
    /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" ?
     

    Attached Files:

  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    yes, this is an issue, but it's Fabrik3.0...

    The fix is in GitHub (joomla25 branch)
    As always: backup before
     
    Last edited: Mar 21, 2016

Share This Page