/** *@package AppList *@since v0.2 *@method Render() * */ public function Render($getCurrentUrl) { $this->currentUrl = $getCurrentUrl; // Parent CurrentUrl $rs = ''; $this->formaLimit(); // Reasignar op si viene tbl_op $op_2 = fk_post_get($this->tableId . '_op'); if (trim($op_2) != '') { $this->operation = decode($op_2); } switch ($this->operation) { case 'add-lines': $this->processNewLineHtml(); $rs .= $this->new_line_html; break; case 'save-lines': if ($this->save_function != NULL) { // Custom function call_user_func_array($this->save_function['function'], $this->save_function['parrameters']); $rs .= $this->PrintList(); } else { // Default save function $this->saveLines(); $rs .= fk_ok_message('Información guardada'); $rs .= $this->PrintList(); } break; case 'delete-line': $this->deleteLine(); break; default: $rs .= $this->PrintList(); break; } // End switch return $rs; }
/** *@package sort_column *@since v0.3.2 *@method sort_column() * */ public static function sort_column($val, $label, $formId) { if (fk_post_get('sorttyp') == 1) { $ty = '↑'; $nxty = '0'; } else { $ty = '↓'; $nxty = '1'; } if (fk_post_get('sort') == $val) { $h = $ty . '<a title="Ordenar" alt="Ordenar" href="javascript:void(0)" onclick="$(\'#sort' . $formId . '\').val(\'' . $val . '\');$(\'#sorttyp' . $formId . '\').val(\'' . $nxty . '\');$(\'#' . $formId . '\').submit();">' . $label . '</a>'; } else { $h = '<a title="Ordenar" alt="Ordenar" href="javascript:void(0)" onclick="$(\'#sort' . $formId . '\').val(\'' . $val . '\');$(\'#sorttyp' . $formId . '\').val(\'0\');$(\'#' . $formId . '\').submit();">' . $label . '</a>'; } return $h; }