Fixed the lost javascript include

This commit is contained in:
mdtrooper 2016-02-09 11:02:41 +01:00
parent 372dd1db1f
commit 230e4071b3
1 changed files with 4 additions and 6 deletions
pandora_console/include/class

View File

@ -37,14 +37,13 @@ abstract class Map {
public function __construct($id) { public function __construct($id) {
$this->id = $id; $this->id = $id;
$this->requires_js = array();
$this->requires_js[] = "include/javascript/d3.3.5.14.js";
$this->requires_js[] = "include/javascript/map/MapController.js";
if (!$this->loadDB()) { if (!$this->loadDB()) {
$this->status = STATUS_ERROR; $this->status = STATUS_ERROR;
} }
else {
$this->requires_js = array();
$this->requires_js[] = "include/javascript/d3.3.5.14.js";
$this->requires_js[] = "include/javascript/map/MapController.js";
}
} }
protected function processDBValues($dbValues) { protected function processDBValues($dbValues) {
@ -78,7 +77,6 @@ abstract class Map {
abstract function printJSInit(); abstract function printJSInit();
public function show() { public function show() {
foreach ($this->requires_js as $js) { foreach ($this->requires_js as $js) {
echo "<script type='text/javascript' src='$js'></script>" . "\n"; echo "<script type='text/javascript' src='$js'></script>" . "\n";
} }