function Presentation(&$base, $what, $typ = 0) { global ${"gorum{$what}template"}, $gorumroll; $this->base =& $base; if ($typ) { $this->typ =& $typ; } else { $this->typ =& $base->getTypeInfo(TRUE); } if (isset($this->typ["{$gorumroll->list}: {$what}Template"])) { $this->template = $this->typ["{$gorumroll->list}: {$what}Template"]; } if (isset($this->typ["{$gorumroll->method}: {$what}Template"])) { $this->template = $this->typ["{$gorumroll->method}: {$what}Template"]; } elseif (isset($this->typ["{$what}Template"])) { $this->template = $this->typ["{$what}Template"]; } else { $this->template = ${"gorum{$what}template"}; } $this->innerBordersOnly = G::getSetting($this->typ, "innerBordersOnly"); if ($this->innerBordersOnly) { // a szelso td-k kulso bordereit toroljuk: JavaScript::addOnload("\n \$('.template > table').find('tbody tr:not(.noapply), tfoot tr').find('td:first, th:first').css('border-left', 'none').end().\n find('td:last, th:last').css('border-right', 'none').end().\n find('td.groupsep_v + td').css('border-left', 'none').end().\n find('td.groupsep_v').prev().css('border-right', 'none').end().end().\n slice(-1).find('td').css('border-bottom', 'none');\n ", "innerBordersOnly"); } }
function Filter(&$typ) { foreach (array('width', 'filterText', 'resetOnClick', 'enable') as $a) { $v = G::getSetting($typ, Filter::settingName, $a); if ($v !== NULL) { $this->{$a} = $v; } } }
function ListPresentation(&$base, $typ = 0) { global $gorumroll, $jQueryLib; $this->Presentation($base, "list", $typ); $this->tableSort = G::getSetting($this->typ, "clientSideTableSort"); $this->tableFilter = G::getSetting($this->typ, "clientSideTableFilter", "enable"); $this->tableRowHighlight = G::getSetting($this->typ, "tableRowHighlight"); $this->zebraList = G::getSetting($this->typ, "zebraList"); if ($this->tableSort || $this->tableFilter || $this->tableRowHighlight) { JavaScript::addInclude(GORUM_JS_DIR . $jQueryLib); } if ($this->tableSort || $this->tableFilter) { JavaScript::addInclude(GORUM_JS_DIR . "/jquery/tablesort.js"); if ($this->tableFilter) { require_once GORUM_DIR . "/presentation/filter.php"; $this->tableFilter =& new Filter($this->typ); } } if ($this->tableRowHighlight) { JavaScript::addInclude(GORUM_JS_DIR . "/jquery/tablehover.js"); } }
function FormPresentation(&$base) { $this->Presentation($base, "form"); $this->zebraForm = G::getSetting($this->typ, "zebraForm"); }
function showDetails($whereFields = "", $withLoad = TRUE, $elementName = "") { global $gorumroll; if ($withLoad) { //A gorumroll->rollid-bol,vagy id, vagy name jon attol fuggoen, //hogy egyszeru showDetailsrol, vagy showUserLinkrol van-e szo: $this->{$whereFields} = $gorumroll->rollid; $ret = $this->load(array($whereFields)); if ($ret == not_found_in_db) { return Roll::setInfoText("not_found_deleted"); } } $detailsPresentationClassName = G::getSetting($this->getTypeInfo(TRUE), "detailsPresentationClassName"); $temp =& new $detailsPresentationClassName($this); $view =& View::getContentView(); return $temp->gener($view->addElement($elementName)); }
function DetailsPresentation(&$base) { $this->Presentation($base, "details"); $this->zebraDetails = G::getSetting($this->typ, "zebraDetails"); }