This commit is contained in:
Roman Hergenreder
2020-06-14 12:38:35 +02:00
parent 8fc0b4bb05
commit bc2fbbda68
26 changed files with 21488 additions and 12 deletions

View File

@@ -72,7 +72,7 @@ class Fetch extends Request {
$groupId = intval($row["groupId"]);
$groupName = $row["groupName"];
if (!isset($this->result["users"][$userId])) {
$this->result["users"][$userId] = array(
$this->result["users"][] = array(
"uid" => $userId,
"name" => $row["name"],
"email" => $row["email"],

View File

@@ -17,6 +17,10 @@ class Logout extends Request {
return false;
}
$this->lastError = "CUSTOM ERROR MESSAGE";
$this->success = false;
return false;
$this->success = $this->user->logout();
$this->lastError = $this->user->getSQL()->getLastError();
return $this->success;

View File

@@ -29,12 +29,12 @@ namespace Documents\Admin {
}
protected function initSources() {
$this->loadJQuery();
$this->loadFontawesome();
$this->addJS(Script::CORE);
$this->addCSS(Link::CORE);
$this->addJS(Script::ADMIN);
$this->addCSS(Link::ADMIN);
// $this->loadJQuery();
// $this->loadFontawesome();
// $this->addJS(Script::CORE);
// $this->addCSS(Link::CORE);
// $this->addJS(Script::ADMIN);
// $this->addCSS(Link::ADMIN);
}
protected function initMetas() {

View File

@@ -6,4 +6,8 @@ abstract class StaticView {
public abstract function getCode();
public function __toString() {
return $this->getCode();
}
}

View File

@@ -230,10 +230,10 @@ class AdminDashboardBody extends Body {
parent::loadView();
$head = $this->getDocument()->getHead();
$head->addJS(Script::BOOTSTRAP);
$head->loadAdminlte();
// $head->addJS("/js/admin.min.js");
// $head->loadAdminlte();
$this->notifications = $this->getNotifications();
// $this->notifications = $this->getNotifications();
}
private function getContent() {
@@ -253,10 +253,14 @@ class AdminDashboardBody extends Body {
public function getCode() {
$html = parent::getCode();
// $this->getDocument()->getHead()->addJS("/js/admin.min.js");
/*
$header = $this->getHeader();
$sidebar = $this->getSidebar();
$content = $this->getContent();
$html .=
"<!-- LICENSE: /docs/LICENSE_ADMINLTE -->
<body class=\"hold-transition sidebar-mini layout-fixed\">
@@ -266,7 +270,10 @@ class AdminDashboardBody extends Body {
$content
</div>
</body>";
*/
$script = new Script(Script::MIME_TEXT_JAVASCRIPT, "/js/admin.min.js");
$html .= "<body id=\"root\">$script</body>";
return $html;
}
}

View File

@@ -3,6 +3,8 @@
namespace Views;
use Elements\Body;
use Elements\Link;
use Elements\Script;
class LoginBody extends Body {
@@ -12,7 +14,14 @@ class LoginBody extends Body {
public function loadView() {
parent::loadView();
$this->getDocument()->getHead()->loadBootstrap();
$head = $this->getDocument()->getHead();
$head->loadBootstrap();
$head->loadJQuery();
$head->loadFontawesome();
$head->addJS(Script::CORE);
$head->addCSS(Link::CORE);
$head->addJS(Script::ADMIN);
$head->addCSS(Link::ADMIN);
}
public function getCode() {