element['sortable'] != 'false'); $view = $this->form->getView(); $model = $this->form->getModel(); $hasAjaxOrderingSupport = $view->hasAjaxOrderingSupport(); if (!$sortable) { // Non sortable?! I'm not sure why you'd want that, but if you insist... return JText::_('JGRID_HEADING_ORDERING'); } if (!$hasAjaxOrderingSupport) { // Ye olde Joomla! 2.5 method $html = JHTML::_('grid.sort', 'JFIELD_ORDERING_LABEL', 'ordering', $view->getLists()->order_Dir, $view->getLists()->order, 'browse'); $html .= JHTML::_('grid.order', $model->getList()); return $html; } else { // The new, drag'n'drop ordering support WITH a save order button $html = JHtml::_( 'grid.sort', '', 'ordering', $view->getLists()->order_Dir, $view->getLists()->order, null, 'asc', 'JGRID_HEADING_ORDERING' ); $ordering = $view->getLists()->order == 'ordering'; if ($ordering) { $html .= '' . ''; } return $html; } } }