add todos from github

This commit is contained in:
Dennis Eichhorn 2019-12-31 19:54:45 +01:00
parent 25a4a1698a
commit 1958670374
3 changed files with 19 additions and 11 deletions

View File

@ -54,12 +54,6 @@ jsOMS.Modules.Navigation = class {
* @since 1.0.0 * @since 1.0.0
*/ */
bindElement (e) { bindElement (e) {
if (typeof e === 'undefined' || !e) {
// todo: do logging here
return;
}
const extend = e.querySelectorAll('li label'); const extend = e.querySelectorAll('li label');
const self = this; const self = this;
@ -80,7 +74,12 @@ jsOMS.Modules.Navigation = class {
|| document.documentElement.clientWidth || document.documentElement.clientWidth
|| document.body.clientWidth; || document.body.clientWidth;
// todo: still buggy maybe always set true if < 800 and only call this if if >= 800 /**
* @todo Orange-Management/Modules#192
* The sidebar navigation is not working properly in many cases
* 1. if the content is too wide then the side nav becomes smaller (resize window for testing)
* 2. if the device is a handheld device it feels unintuitive to open/hide the navigation
*/
e.nextElementSibling.checked = width < 800; e.nextElementSibling.checked = width < 800;
} }

View File

@ -26,6 +26,11 @@ use phpOMS\Message\ResponseAbstract;
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*
* @todo Orange-Management/Modules#119
* Make navigation modifiable
* Navigation elements should be made modifiable in the module settings.
* In the module settings all navigation elements should be visible and the admin should be able to change them in the database.
*/ */
final class BackendController extends Controller final class BackendController extends Controller
{ {
@ -99,7 +104,10 @@ final class BackendController extends Controller
* @param ResponseAbstract $response Response * @param ResponseAbstract $response Response
* *
* @return void * @return void
* @todo: this is slow maybe cache it per user? or maybe push it into one large language file which is stored in this module? *
* @todo Orange-Management/Modules#190 & Orange-Management/Modules#181
* The loading of the language file is slow since every module is loaded separately.
* This should either get cached per user or maybe put into one large language file per language (like the routes).
* *
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore
@ -109,7 +117,6 @@ final class BackendController extends Controller
$languages = $this->app->moduleManager->getLanguageFiles($request); $languages = $this->app->moduleManager->getLanguageFiles($request);
$langCode = $response->getHeader()->getL11n()->getLanguage(); $langCode = $response->getHeader()->getL11n()->getLanguage();
// @todo: this should be in one file I guess? or will this be worst because getLanguageFiles currently only returns a subset of all files?
foreach ($languages as $path) { foreach ($languages as $path) {
$path = __DIR__ . '/../../..' . $path . '.' . $langCode . '.lang.php'; $path = __DIR__ . '/../../..' . $path . '.' . $langCode . '.lang.php';

View File

@ -99,7 +99,10 @@ final class TimerecordingController extends Controller
* @param ResponseAbstract $response Response * @param ResponseAbstract $response Response
* *
* @return void * @return void
* @todo: this is slow maybe cache it per user? or maybe push it into one large language file which is stored in this module? *
* @todo Orange-Management/Modules#190
* The loading of the language file is slow since every module is loaded separately.
* This should either get cached per user or maybe put into one large language file per language (like the routes).
* *
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore
@ -109,7 +112,6 @@ final class TimerecordingController extends Controller
$languages = $this->app->moduleManager->getLanguageFiles($request); $languages = $this->app->moduleManager->getLanguageFiles($request);
$langCode = $response->getHeader()->getL11n()->getLanguage(); $langCode = $response->getHeader()->getL11n()->getLanguage();
// @todo: this should be in one file I guess? or will this be worst because getLanguageFiles currently only returns a subset of all files?
foreach ($languages as $path) { foreach ($languages as $path) {
$path = __DIR__ . '/../../..' . $path . '.' . $langCode . '.lang.php'; $path = __DIR__ . '/../../..' . $path . '.' . $langCode . '.lang.php';