AjaxLogNavBar Class Reference

Inheritance diagram for AjaxLogNavBar:

Inheritance graph
[legend]
Collaboration diagram for AjaxLogNavBar:

Collaboration graph
[legend]

Public Member Functions

 AjaxLogNavBar ($itemcount, $filter, $maxperpage, $jsfunc="updateSearchParam", $extra="")
 The AjaxNavBar start/end item are get from $_GET["start"] and $_GET["end"].
 display ()
 hasBeenPopped ()
 HtmlElement ()
 setOptions ($options)
 SimpleNavBar ($curstart, $curend, $itemcount, $extra="")

Data Fields

 $options

Detailed Description

Definition at line 69 of file AjaxFilterLog.inc.php.


Member Function Documentation

AjaxLogNavBar::AjaxLogNavBar ( itemcount,
filter,
maxperpage,
jsfunc = "updateSearchParam",
extra = "" 
)

The AjaxNavBar start/end item are get from $_GET["start"] and $_GET["end"].

Parameters:
$itemcount,: total number of item
$filter,: the current list filter
$extra,: extra URL parameter to pass the next/list button
$jsfunc,: the name of the javascript function that applies the AJAX filter for the ListInfos widget

Definition at line 80 of file AjaxFilterLog.inc.php.

00080                                                                                                        {
00081         global $conf;
00082         $this->itemcount = $itemcount;
00083         $this->extra = $extra;        
00084         $this->max = $maxperpage;
00085         if (isset($_GET["start"])) {
00086             $this->curstart = $_GET["start"];
00087             $this->curend = $_GET["end"];
00088         } else {
00089             $this->curstart = 0;            
00090             if ($itemcount > 0)
00091                 $this->curend = $maxperpage - 1;
00092             else 
00093                 $this->curend = 0;
00094         }
00095         $this->filter = $filter;
00096         $this->jsfunc = $jsfunc;
00097     }

AjaxLogNavBar::display (  ) 

Reimplemented from SimpleNavBar.

Definition at line 99 of file AjaxFilterLog.inc.php.

00099                        {
00100         echo '<form method="post">';
00101         echo "<ul class=\"navList\">\n";
00102         if ($this->curstart == 0)
00103             echo "<li class=\"previousListInactive\">" . _("Previous") . "</li>\n";
00104         else {
00105             $start = $this->curstart - $this->max;
00106             $end = $this->curstart - 1;
00107             echo "<li class=\"previousList\"><a href=\"#\" onClick=\"" . $this->jsfunc . "('" . $this->filter . "','$start','$end'); return false;\">" . _("Previous") . "</a></li>\n";
00108         }
00109 
00110         if (($this->curend + 1) >= $this->itemcount)
00111             echo "<li class=\"nextListInactive\">"._("Next")."</li>\n";
00112         else {
00113             $start = $this->curend + 1;
00114             $end = $this->curend + $this->max;
00115             echo "<li class=\"nextList\"><a href=\"#\" onClick=\"" . $this->jsfunc . "('" . $this->filter . "','$start','$end'); return false;\">" . _("Next") . "</a></li>\n";
00116         }
00117 
00118         echo "</ul>\n";
00119     }

HtmlElement::hasBeenPopped (  )  [inherited]

Definition at line 1912 of file PageGenerator.php.

01912                              {
01913         return True;
01914     }

HtmlElement::HtmlElement (  )  [inherited]

Definition at line 1904 of file PageGenerator.php.

01904                            {
01905         $this->options = array();
01906     }

HtmlElement::setOptions ( options  )  [inherited]

Definition at line 1908 of file PageGenerator.php.

01908                                   {
01909         $this->options = $options;
01910     }

SimpleNavBar::SimpleNavBar ( curstart,
curend,
itemcount,
extra = "" 
) [inherited]

Parameters:
$curstart,: the first item index to display
$curent,: the last item index
$itemcount,: total number of item
$filter,: the current list filter

Definition at line 737 of file PageGenerator.php.

00737                                                                        {
00738         global $conf;
00739         $this->max = $conf["global"]["maxperpage"];
00740         $this->curstart = $curstart;
00741         $this->curend = $curend;
00742         $this->itemcount = $itemcount;
00743         $this->extra = $extra;
00744     }


Field Documentation

HtmlElement::$options [inherited]

Definition at line 1902 of file PageGenerator.php.

Referenced by getSubnetOptions().


The documentation for this class was generated from the following file:

Generated on Tue May 4 11:48:04 2010 for MMC web interface by  doxygen 1.5.8