scroll only account table
This commit is contained in:
parent
c505eba309
commit
75a4d7eb9d
|
@ -162,6 +162,7 @@ class lamList {
|
||||||
}
|
}
|
||||||
// show form
|
// show form
|
||||||
echo "<div class=\"ui-tabs-panel ui-widget-content ui-corner-bottom\">";
|
echo "<div class=\"ui-tabs-panel ui-widget-content ui-corner-bottom\">";
|
||||||
|
echo "<div id=\"listTabContentArea\">\n";
|
||||||
echo ("<form action=\"list.php?type=" . $this->type . "&norefresh=true\" method=\"post\">\n");
|
echo ("<form action=\"list.php?type=" . $this->type . "&norefresh=true\" method=\"post\">\n");
|
||||||
// draw account list if accounts were found
|
// draw account list if accounts were found
|
||||||
if (sizeof($this->entries) > 0) {
|
if (sizeof($this->entries) > 0) {
|
||||||
|
@ -171,10 +172,12 @@ class lamList {
|
||||||
// navigation bar
|
// navigation bar
|
||||||
$this->listDrawNavigationBar(sizeof($this->entries));
|
$this->listDrawNavigationBar(sizeof($this->entries));
|
||||||
echo ("<br>\n");
|
echo ("<br>\n");
|
||||||
|
echo "<div id=\"listScrollArea\" style=\"overflow: auto; padding: 1px;\">";
|
||||||
// account table head
|
// account table head
|
||||||
$this->listPrintTableHeader();
|
$this->listPrintTableHeader();
|
||||||
// account table body
|
// account table body
|
||||||
$this->listPrintTableBody($this->entries);
|
$this->listPrintTableBody($this->entries);
|
||||||
|
echo "</div>";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// buttons
|
// buttons
|
||||||
|
@ -315,7 +318,7 @@ class lamList {
|
||||||
*/
|
*/
|
||||||
protected function listPrintTableHeader() {
|
protected function listPrintTableHeader() {
|
||||||
// print table header
|
// print table header
|
||||||
echo "<table frame=\"box\" rules=\"none\" class=\"" . $this->type . "list\" width=\"100%\">\n";
|
echo "<table id=\"accountTable\" frame=\"box\" rules=\"none\" class=\"" . $this->type . "list\" width=\"100%\"><thead>\n";
|
||||||
echo "<tr class=\"" . $this->type . "list-dark\">\n<th width=22 height=34></th>\n<th></th>\n";
|
echo "<tr class=\"" . $this->type . "list-dark\">\n<th width=22 height=34></th>\n<th></th>\n";
|
||||||
// table header
|
// table header
|
||||||
for ($k = 0; $k < sizeof($this->descArray); $k++) {
|
for ($k = 0; $k < sizeof($this->descArray); $k++) {
|
||||||
|
@ -354,7 +357,7 @@ class lamList {
|
||||||
echo ("<input type=\"text\" size=15 name=\"filter" . strtolower ($this->attrArray[$k]) ."\"" . $value . " onkeypress=\"SubmitForm('apply_filter', event)\">");
|
echo ("<input type=\"text\" size=15 name=\"filter" . strtolower ($this->attrArray[$k]) ."\"" . $value . " onkeypress=\"SubmitForm('apply_filter', event)\">");
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
}
|
}
|
||||||
echo "</tr>\n";
|
echo "</tr></thead>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -363,6 +366,7 @@ class lamList {
|
||||||
* @param array $info entries
|
* @param array $info entries
|
||||||
*/
|
*/
|
||||||
protected function listPrintTableBody(&$info) {
|
protected function listPrintTableBody(&$info) {
|
||||||
|
echo "<tbody>\n";
|
||||||
// calculate which rows to show
|
// calculate which rows to show
|
||||||
$table_begin = ($this->page - 1) * $this->maxPageEntries;
|
$table_begin = ($this->page - 1) * $this->maxPageEntries;
|
||||||
if (($this->page * $this->maxPageEntries) > sizeof($info)) $table_end = sizeof($info);
|
if (($this->page * $this->maxPageEntries) > sizeof($info)) $table_end = sizeof($info);
|
||||||
|
@ -396,11 +400,12 @@ class lamList {
|
||||||
// display select all link
|
// display select all link
|
||||||
$colspan = sizeof($this->attrArray) + 1;
|
$colspan = sizeof($this->attrArray) + 1;
|
||||||
echo "<tr class=\"" . $this->type . "list-bright\">\n";
|
echo "<tr class=\"" . $this->type . "list-bright\">\n";
|
||||||
echo "<td align=\"center\"><img src=\"../../graphics/select.png\" alt=\"select all\"></td>\n";
|
echo "<td align=\"center\"><a href=\"#\" onClick=\"list_switchAccountSelection();\"><img src=\"../../graphics/select.png\" alt=\"select all\"></a></td>\n";
|
||||||
echo "<td colspan=$colspan> <a href=\"#\" onClick=\"list_switchAccountSelection();\">" .
|
echo "<td colspan=$colspan> <a href=\"#\" onClick=\"list_switchAccountSelection();\">" .
|
||||||
"<font color=\"black\">" . _("Select all") . "</font></a></td>\n";
|
"<font color=\"black\">" . _("Select all") . "</font></a></td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo ("</table>");
|
echo "</tbody>\n";
|
||||||
|
echo "</table>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -692,17 +697,19 @@ class lamList {
|
||||||
*/
|
*/
|
||||||
protected function listPrintHeader() {
|
protected function listPrintHeader() {
|
||||||
include '../main_header.php';
|
include '../main_header.php';
|
||||||
echo '<script type="text/javascript">';
|
|
||||||
echo "jQuery('#tab_$this->type').addClass('ui-tabs-selected');";
|
|
||||||
echo "jQuery('#tab_$this->type').addClass('ui-state-active');";
|
|
||||||
echo '</script>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prints the HTML footer.
|
* Prints the HTML footer.
|
||||||
*/
|
*/
|
||||||
protected function listPrintFooter() {
|
protected function listPrintFooter() {
|
||||||
echo ("</form></div>\n");
|
echo ("</form></div></div>\n");
|
||||||
|
echo '<script type="text/javascript">';
|
||||||
|
echo "jQuery('#tab_$this->type').addClass('ui-tabs-selected');";
|
||||||
|
echo "jQuery('#tab_$this->type').addClass('ui-state-active');";
|
||||||
|
echo "window.onload = listResizeITabContentDiv;";
|
||||||
|
echo "window.onresize = listResizeITabContentDiv;";
|
||||||
|
echo '</script>';
|
||||||
include '../main_footer.php';
|
include '../main_footer.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,23 @@ function listOUchanged(type, element) {
|
||||||
location.href='list.php?type=' + type + '&suffix=' + element.options[element.selectedIndex].value;
|
location.href='list.php?type=' + type + '&suffix=' + element.options[element.selectedIndex].value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resizes the content area of the account lists to fit the window size.
|
||||||
|
* This prevents that the whole page is scrolled in the browser. Only the account table has scroll bars.
|
||||||
|
*/
|
||||||
|
function listResizeITabContentDiv() {
|
||||||
|
var myDiv = document.getElementById("listTabContentArea");
|
||||||
|
var height = document.documentElement.clientHeight;
|
||||||
|
height -= myDiv.offsetTop;
|
||||||
|
height -= 90
|
||||||
|
myDiv.style.height = height +"px";
|
||||||
|
|
||||||
|
var myDivScroll = document.getElementById("listScrollArea");
|
||||||
|
var top = myDivScroll.offsetTop;
|
||||||
|
var scrollHeight = height - (top - myDiv.offsetTop);
|
||||||
|
myDivScroll.style.height = scrollHeight + "px";
|
||||||
|
};
|
||||||
|
|
||||||
function SubmitForm(id, e) {
|
function SubmitForm(id, e) {
|
||||||
if (e.keyCode == 13) {
|
if (e.keyCode == 13) {
|
||||||
document.getElementsByName(id)[0].click();
|
document.getElementsByName(id)[0].click();
|
||||||
|
|
Loading…
Reference in New Issue