Index: branches/RC/admin/tag_listing.php =================================================================== diff -u -r8929 -r9389 --- branches/RC/admin/tag_listing.php (.../tag_listing.php) (revision 8929) +++ branches/RC/admin/tag_listing.php (.../tag_listing.php) (revision 9389) @@ -11,28 +11,28 @@ include_once($pathtoroot."kernel/include/tag-class.php"); $pathtolocal = $pathtoroot."kernel/"; -require_once ($pathtoroot."admin/include/elements.php"); +require_once ($pathtoroot.$admin."/include/elements.php"); require_once ($pathtoroot."kernel/admin/include/navmenu.php"); require_once ($pathtolocal."admin/include/navmenu.php"); -require_once($pathtoroot."admin/toolbar.php"); +require_once($pathtoroot.$admin."/toolbar.php"); //Set Section $section = "in-portal:tag_library"; //Set Environment Variable $envar = "env=" . BuildEnv(); $sec = $objSections->GetSection($section); $objCatToolBar = new clsToolBar(); -$objCatToolBar->Add("img_save", +$objCatToolBar->Add("img_save", "la_Save", "#", "swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');", "javascript:history.back();", "tool_select.gif"); -$objCatToolBar->Add("img_cancel", +$objCatToolBar->Add("img_cancel", "la_Cancel", "#", - "swap('img_cancel','toolbar/tool_cancel_f2.gif');", + "swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');", "javascript:history.back();", "tool_cancel.gif"); @@ -72,44 +72,44 @@ { $i->LoadAttribs(); //echo " ".$i->attribs->NumItems()." Attributes
\n"; if( $i->Get("name") ) - { - ?> + { + ?> Get("scope") != "global") ? $i->Get("scope").'.'.$i->Get("name") : $i->Get("name"); ?> - + Get("description"); ?> Attributes: Source example: - + attribs->NumItems() > 0 ) { // has attributes ?> attribs->Items as $a) - { + { ?> + ?>
Get("Name").'['.$a->Get("AttrType").']'; ?> Get("Description"); ?>
  - Get('example'); echo $example ? $example : ' '; ?> @@ -119,6 +119,6 @@ } } } -?> - +?> + \ No newline at end of file Index: branches/RC/admin/listview/listview.php =================================================================== diff -u -r8929 -r9389 --- branches/RC/admin/listview/listview.php (.../listview.php) (revision 8929) +++ branches/RC/admin/listview/listview.php (.../listview.php) (revision 9389) @@ -1,15 +1,15 @@ SetToolBar($ToolBar); $this->SetListItems($ListItems); - $this->ColumnHeaders = new clsColumnHeaderList(); + $this->ColumnHeaders = new clsColumnHeaderList(); $this->CurrentPage=1; $this->CheckboxName = "itemlist[]"; $this->SelectorType="checkbox"; @@ -50,10 +50,10 @@ $this->extra_env=""; $this->PriorityField="Priority"; $this->TotalItemCount = 0; - + if (!is_null($ToolBar)) $this->JSCheckboxName = $ToolBar->Get("CheckClass"); - $this->SetFormatters(); // for setting custom formatters + $this->SetFormatters(); // for setting custom formatters } function SetToolbar($ToolBar) @@ -62,22 +62,22 @@ if(is_object($this->ToolBar)) $this->CheckArray=$this->ToolBar->Get("CheckClass"); } - + function GetPage() { // get current page $this->RefreshPageVar(); return $this->CurrentPage; } - + function GetLimitSQL() { return GetLimitSQL($this->GetPage(), $this->GetPerPage() ); } - + function SetListItems(&$ListItems) { - $this->ListItems =& $ListItems; + $this->ListItems =& $ListItems; } function SetIDfield($field) @@ -98,14 +98,14 @@ function ConfigureViewMenu($SortFieldVar,$SortOrderVar,$DefaultSort,$FilterVar,$FilterValue,$FilterMax) { global $objConfig; - + //$FilterVal = $this->CurrentFilter; //$fMax = $this->Filtermax; //$sOrder = $this->CurrentSortOrder; //$sOrderVar = $this->OrderVar; //$sField = $this->CurrentSortField; - //$sDefault = $this->DefaultSortField; - + //$sDefault = $this->DefaultSortField; + $this->ViewMenu = new clsViewMenu(); $this->ViewMenu->PerPageVar = $this->PerPageVar; $this->ViewMenu->PerPageValue = (int)$objConfig->Get($this->PerPageVar); @@ -115,38 +115,38 @@ $this->ViewMenu->CurrentSortOrder = $objConfig->get($SortOrderVar); $this->ViewMenu->SortVar = $SortFieldVar; $this->ViewMenu->OrderVar = $SortOrderVar; - $this->ViewMenu->CurrentFilter= $FilterValue; + $this->ViewMenu->CurrentFilter= $FilterValue; $this->ViewMenu->FilterVar = $FilterVar; $this->ViewMenu->FilterMax = $FilterMax; foreach($this->ColumnHeaders->Columns as $col) { - $this->ViewMenu->AddSortField($col->field,$col->label,$DefaultSort==$col->field); + $this->ViewMenu->AddSortField($col->field,$col->label,$DefaultSort==$col->field); } } - + function AddViewMenuFilter($Label,$Bit) { if(is_object($this->ViewMenu)) - $this->ViewMenu->AddFilterField($Label,$Bit); + $this->ViewMenu->AddFilterField($Label,$Bit); } - + function GetViewMenu($imagesURL) - { - if(is_object($this->ViewMenu)) + { + if(is_object($this->ViewMenu)) { $this->ViewMenu->CheckboxName = $this->JSCheckboxName; - return $this->ViewMenu->GetViewMenuJS($imagesURL); + return $this->ViewMenu->GetViewMenuJS($imagesURL); } else return ""; } - + function SetFormatters() { - // for setting custom formatters + // for setting custom formatters // abstract } - + function SetFormatter($field, $type, $params) { // by Alex @@ -156,24 +156,24 @@ { case FT_OPTION: $this->Formatters[$field]['options'] = $params; - break; + break; } } - + function PrintItem($index) { if( !isset($this->ListItems->Items[$index]) ) return ''; $li = $this->ListItems->Items[$index]; - + $o = ""; - $first=1; + $first=1; if(is_object($li)) - { + { // ==== new by Alex: begin ==== $li->Formatters =& $this->Formatters; // ==== new by Alex: end ==== - + $id_field = $this->IdField; $row_id = $li->Get($id_field); if(is_numeric($li->Get($this->PriorityField))) @@ -185,31 +185,31 @@ $o = "\n"; foreach($this->ColumnHeaders->Columns as $col) { - $width=""; + $width=""; $ColId = $row_id."_col_".$col->field; if($first==1) - { + { if(strlen($col->width)) { $width = $col->width; } $o .= ""; if($this->checkboxes) - { + { $onclick = "onclick=\"if (this.checked) {".$this->CheckArray.".addCheck('$row_id');} else {".$this->CheckArray.".removeCheck('$row_id');}\""; $onclicksrc = "onclicksrc=\"if (this.checked) {".$this->CheckArray.".addCheck('$row_id');} else {".$this->CheckArray.".removeCheck('$row_id');}\""; $o .= "SelectorType."\" name=\"".$this->CheckboxName."\" value=\"$row_id\" $onclick $onclicksrc>"; } if(isset($this->RowIcons[$index])) - { + { $url = $this->RowIcons[$index]; if(strlen($url)) $o .= " "; } $first=0; } else - { + { if(strlen($col->width)) { $o .= "width.">"; @@ -218,7 +218,7 @@ $o .= ""; } if($Priority!=0) - { + { $o .= "$Priority"; $Priority=0; } @@ -252,7 +252,7 @@ return $ret; } - + function GetPerPage() { global $objConfig; @@ -266,13 +266,13 @@ } return $PerPage; } - + function GetAdminPageLinkList($url) { global $objConfig; - + $PerPage = $this->GetPerPage(); - + if($this->TotalItemCount>0) { $NumPages = ceil($this->TotalItemCount / $PerPage); @@ -293,25 +293,25 @@ $StartPage=1; $EndPage = $StartPage+9; if($EndPage>$NumPages) - { + { $EndPage = $NumPages; $StartPage = $EndPage-10; if($StartPage<1) $StartPage=1; } - + $o .= "".admin_language("la_Page")." "; if($StartPage>1) { - $target = $this->CurrentPage-10; + $target = $this->CurrentPage-10; $prev_url = str_replace("{TargetPage}",$target,$url); $o .= "<<"; } - + for($p=$StartPage;$p<=$EndPage;$p++) { if($p!=$this->CurrentPage) - { + { $href = str_replace("{TargetPage}",$p,$url); $o .= " $p "; } @@ -326,7 +326,7 @@ $next_url = str_replace("{TargetPage}",$target,$url); $o .= " >>"; } - return $o; + return $o; } function SliceItems() @@ -338,40 +338,40 @@ $PerPage=20; $NumPages = ceil($this->ListItems->NumItems() / $PerPage); if($NumPages>1) - { + { $Start = ($this->CurrentPage-1)*$PerPage; $this->ListItems->Items = array_slice($this->ListItems->Items,$Start,$PerPage); } } - + function RefreshPageVar() { global $objSession; if( (int)GetVar('lpn') > 0) - { + { $this->CurrentPage = $_GET["lpn"]; $objSession->SetVariable($this->CurrentPageVar,$this->CurrentPage); } else $this->CurrentPage = $objSession->GetVariable($this->CurrentPageVar); - + $this->ListItems->Page = $this->CurrentPage; } - + function PrintPageLinks($add_search = '') { global $imagesURL, $objSession, $lvErrorString; - + if(strlen($this->PageLinks)>0) { return $this->PageLinks; } $this->RefreshPageVar(); - + if($this->CurrentPage<1) $this->CurrentPage = 1; if(!strlen($this->PageURL)) - { + { $this->PageURL = $_SERVER["PHP_SELF"]."?env=".BuildEnv(); if(strlen($this->extra_env)) { @@ -380,19 +380,19 @@ elseif (GetVar('en') !== false) { $this->PageURL .= '&en='.(int)GetVar('en'); } - + $this->PageURL .= "&lpn={TargetPage}"; } $cols = $this->ColumnHeaders->Count(); $o = "\n"; - + if(strlen($lvErrorString)) { $o .= ""; - + } if($this->SearchBar==FALSE) - { + { $o .= '\n"; @@ -401,23 +401,23 @@ { $val = inp_htmlize(str_replace(","," ", $this->SearchKeywords),1); $o .= ""; + $o .= $this->GetAdminPageLinkList($this->PageURL).""; $o .= ""; } @@ -429,7 +429,7 @@ { $o = ''; if($this->checkboxes) - { + { $o = "
$lvErrorString
'; $o .= $this->GetAdminPageLinkList($this->PageURL); $o .= ""; - $o .= $this->GetAdminPageLinkList($this->PageURL)."$add_search".admin_language("la_prompt_Search"); $o .= " "; $o .= " SearchAction."');\">"; + $o .= " onClick=\"Submit_ListSearch('".$this->SearchAction."');\">"; $o .= " SearchAction."_reset');\">"; + $o .= " onClick=\"Submit_ListSearch('".$this->SearchAction."_reset');\">"; if(strlen($this->SearchDropdownId)>0) { $o .= " SearchDropdownId."');\">"; + $o .= " onClick=\"ListSearch_PopUp('".$this->SearchDropdownId."');\">"; } $o .= "