mirror of
https://github.com/e107inc/e107.git
synced 2025-08-07 07:06:30 +02:00
Option added to set unique IDs for each tablerender() instance.
This commit is contained in:
26
class2.php
26
class2.php
@@ -908,7 +908,8 @@ if (!class_exists('e107table', false))
|
||||
private $themeClass = '';
|
||||
private $adminThemeClass = '';
|
||||
public $frontend = null;
|
||||
|
||||
private $uniqueId = null;
|
||||
|
||||
|
||||
function __construct()
|
||||
{
|
||||
@@ -918,13 +919,23 @@ if (!class_exists('e107table', false))
|
||||
|
||||
|
||||
/**
|
||||
* @param $style
|
||||
* Set the style mode for use in tablestyle() method/function
|
||||
* @param string $style
|
||||
*/
|
||||
function setStyle($style)
|
||||
public function setStyle($style)
|
||||
{
|
||||
$this->eSetStyle = $style;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a unique id for use in tablestyle() method/function
|
||||
* @param string $id
|
||||
*/
|
||||
public function setUniqueId($id)
|
||||
{
|
||||
$this->uniqueId = $id;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $caption string caption text
|
||||
@@ -948,6 +959,10 @@ if (!class_exists('e107table', false))
|
||||
extract($result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if ($return)
|
||||
{
|
||||
if(!empty($text) && $this->eMenuArea)
|
||||
@@ -998,13 +1013,14 @@ if (!class_exists('e107table', false))
|
||||
|
||||
if(is_object(vartrue($thm)))
|
||||
{
|
||||
$thm->tablestyle($caption, $text, $mode, array('menuArea'=>$this->eMenuArea, 'menuCount'=>$this->eMenuCount, 'menuTotal'=>varset($this->eMenuTotal[$this->eMenuArea]), 'setStyle'=>$this->eSetStyle));
|
||||
$thm->tablestyle($caption, $text, $mode, array('uniqueId'=>$this->uniqueId, 'menuArea'=>$this->eMenuArea, 'menuCount'=>$this->eMenuCount, 'menuTotal'=>varset($this->eMenuTotal[$this->eMenuArea]), 'setStyle'=>$this->eSetStyle));
|
||||
}
|
||||
else
|
||||
{
|
||||
tablestyle($caption, $text, $mode, array('menuArea'=>$this->eMenuArea,'menuCount'=>$this->eMenuCount,'menuTotal'=>varset($this->eMenuTotal[$this->eMenuArea]),'setStyle'=>$this->eSetStyle));
|
||||
tablestyle($caption, $text, $mode, array('uniqueId'=>$this->uniqueId, 'menuArea'=>$this->eMenuArea,'menuCount'=>$this->eMenuCount,'menuTotal'=>varset($this->eMenuTotal[$this->eMenuArea]),'setStyle'=>$this->eSetStyle));
|
||||
}
|
||||
|
||||
$this->uniqueId = null;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user