Commit c0d05aba authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Fixes: #2172 Improved divSelectBox height setting

Showing with 15 additions and 11 deletions
+15 -11
......@@ -36,13 +36,13 @@ class divSelectBox {
var $cols;
// Members for page managment
var $height=200;
var $height = '200px';
// Added php 4 constructor
/*!
* \brief Default divSelectBox constructor
*/
function divSelectBox(){
function divSelectBox() {
$this->s_summary = "";
$this->a_entries = array();
$this->cols = 0;
......@@ -53,8 +53,12 @@ class divSelectBox {
*
* \param integer $h Height
*/
function setHeight($h){
$this->height=$h;
function setHeight($h) {
if (is_numeric($h)) {
$this->height = $h.'px';
} else {
$this->height = $h;
}
}
/*!
......@@ -72,19 +76,19 @@ class divSelectBox {
function DrawList(){
$s_return = "";
$s_return .= "<div style=\"padding-right:1px;padding-bottom:2px;height:".$this->height.";width:100%\">\n";
$s_return .= "<div style=\"overflow: auto;width:100%;height:".($this->height)."px;\">\n";
$s_return .= "<div style=\"overflow: auto;width:100%;height:100%;\">\n";
$s_return .= "<table ".
"summary='".$this->s_summary."' ".
"width='100%' ".
"class='listingTable'".
"style='overflow:scroll; ".
"height:".($this->height-2)."px;".
"padding-right:1px; ".
"padding-bottom:2px;'".
"height:98%;".
"padding-right:1px; ".
"padding-bottom:2px;'".
">\n";
$s_return.=$this->_generatePage();
$s_return.= "</table></div></div>";
return ($s_return);
$s_return .= $this->_generatePage();
$s_return .= "</table></div></div>";
return $s_return;
}
/*!
......
  • bmortier @bmortier

    mentioned in issue #749

    By agallavardin on 2017-09-02T14:57:44 (imported from GitLab)

    ·

    mentioned in issue #749

    By agallavardin on 2017-09-02T14:57:44 (imported from GitLab)

    Toggle commit list
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment