[+] BO : New AdminController system, including smarty backoffice, thanks to Raphael and Thomas

This commit is contained in:
mMarinetti
2011-09-23 15:01:49 +00:00
parent 230ed9d5ee
commit 6191e868f1
13 changed files with 833 additions and 220 deletions
+9 -8
View File
@@ -47,16 +47,13 @@ class ChartCore
if (!self::$poolId)
{
++self::$poolId;
echo '
<!--[if IE]><script type="text/javascript" src="'.PS_BASE_URI.'js/jquery/excanvas.min.js"></script><![endif]-->
<script type="text/javascript" src="'.PS_BASE_URI.'js/jquery/jquery.flot.min.js"></script>';
return true;
}
}
/** @prototype void public function __construct() */
public function __construct()
{
self::init();
++self::$poolId;
}
@@ -101,7 +98,11 @@ class ChartCore
/** @prototype void public function display() */
public function display()
{
$options = '';
echo $this->fetch();
}
public function fetch()
{
if ($this->timeMode)
{
$options = 'xaxis:{mode:"time",timeformat:\''.addslashes($this->format).'\',min:'.$this->from.'000,max:'.$this->to.'000}';
@@ -117,7 +118,7 @@ class ChartCore
$jsCurves[] = $curve->getValues($this->timeMode);
if (count($jsCurves))
echo '
return '
<div id="flot'.self::$poolId.'" style="width:'.$this->width.'px;height:'.$this->height.'px"></div>
<script type="text/javascript">
$(function () {
@@ -125,7 +126,7 @@ class ChartCore
});
</script>';
else
echo ErrorFacade::Display(PS_ERROR_UNDEFINED, 'No values for this chart.');
return ErrorFacade::Display(PS_ERROR_UNDEFINED, 'No values for this chart.');
}
}
@@ -175,4 +176,4 @@ class Curve
if (array_key_exists((string)$x, $this->values))
return $this->values[(string)$x];
}
}
}