From ed1edb902fa6aa26ecec5bb3ec4462b71ebfa83b Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Mon, 7 Jun 2021 19:52:26 +0200 Subject: [PATCH] UI improvements, comments refactor for lint --- .../admin/themes/booty/css/01-bludit.css | 6 +++ .../admin/themes/booty/css/99-lightmode.css | 10 ++-- bl-kernel/admin/themes/booty/html/alerts.php | 34 ++++++------- bl-kernel/admin/views/editor.php | 24 +++++----- bl-kernel/admin/views/login.php | 2 +- bl-kernel/boot/rules/69.pages.php | 2 +- bl-languages/en.json | 4 +- bl-plugins/about/plugin.php | 6 +-- bl-plugins/api/plugin.php | 48 +++++++++---------- 9 files changed, 70 insertions(+), 66 deletions(-) diff --git a/bl-kernel/admin/themes/booty/css/01-bludit.css b/bl-kernel/admin/themes/booty/css/01-bludit.css index 97f670a7..d165a2e6 100644 --- a/bl-kernel/admin/themes/booty/css/01-bludit.css +++ b/bl-kernel/admin/themes/booty/css/01-bludit.css @@ -36,5 +36,11 @@ div.sidebar .nav-item h4 { text-decoration: underline; } +/** Tables +*/ +tr.disabled{ + filter: blur(1px); + pointer-events: none; +} diff --git a/bl-kernel/admin/themes/booty/css/99-lightmode.css b/bl-kernel/admin/themes/booty/css/99-lightmode.css index dfd99ed3..29e586d8 100644 --- a/bl-kernel/admin/themes/booty/css/99-lightmode.css +++ b/bl-kernel/admin/themes/booty/css/99-lightmode.css @@ -2,12 +2,16 @@ body { background-color: #f1f1f1; } -a { +a, +a.nav-link, +.link { color: #555; } -a.nav-link { - color: #555; +a:hover, +a.nav-link:hover, +.link:hover { + color: #0a58ca; } .form-control:focus, diff --git a/bl-kernel/admin/themes/booty/html/alerts.php b/bl-kernel/admin/themes/booty/html/alerts.php index 42cc2dad..3a10d0e3 100644 --- a/bl-kernel/admin/themes/booty/html/alerts.php +++ b/bl-kernel/admin/themes/booty/html/alerts.php @@ -7,25 +7,25 @@ \ No newline at end of file diff --git a/bl-kernel/admin/views/editor.php b/bl-kernel/admin/views/editor.php index 3c900240..88776ff2 100644 --- a/bl-kernel/admin/views/editor.php +++ b/bl-kernel/admin/views/editor.php @@ -347,8 +347,8 @@ @@ -367,8 +367,8 @@ @@ -397,8 +397,8 @@ @@ -441,8 +441,8 @@ @@ -474,8 +474,8 @@ @@ -494,8 +494,8 @@ diff --git a/bl-kernel/admin/views/login.php b/bl-kernel/admin/views/login.php index 9518c2a6..82af8701 100644 --- a/bl-kernel/admin/views/login.php +++ b/bl-kernel/admin/views/login.php @@ -66,6 +66,6 @@ echo Bootstrap::formOpen(array('name'=>'login')); echo ''; -echo '

Powered by Bludit

' +echo '

'.$L->g('Powered by Bludit').'

' ?> \ No newline at end of file diff --git a/bl-kernel/boot/rules/69.pages.php b/bl-kernel/boot/rules/69.pages.php index 58651653..bb256590 100644 --- a/bl-kernel/boot/rules/69.pages.php +++ b/bl-kernel/boot/rules/69.pages.php @@ -41,7 +41,7 @@ if ($pages->scheduler()) { execPluginsByHook('afterPageCreate'); reindexTags(); - reindexCategories(); + reindexCategories(); // Add to syslog $syslog->add(array( diff --git a/bl-languages/en.json b/bl-languages/en.json index 76466321..6b7344bc 100644 --- a/bl-languages/en.json +++ b/bl-languages/en.json @@ -215,6 +215,7 @@ "new-user-created": "New user created", "user-edited": "User edited", "user-deleted": "User deleted", + "page-deleted": "Page deleted", "recommended-for-recovery-password-and-notifications": "Recommended for recovery password and notifications.", "authentication-token": "Authentication Token", "token": "Token", @@ -399,5 +400,6 @@ "are-you-sure-you-want-to-delete-this-category?": "Are you sure you want to delete this category?", "are-you-sure-you-want-to-change-the-password?": "Are you sure you want to change the password?", "website-plugins": "Website plugins", - "dashboard-plugins": "Dashboard plugins" + "dashboard-plugins": "Dashboard plugins", + "powered-by-bludit": "Powered by Bludit" } \ No newline at end of file diff --git a/bl-plugins/about/plugin.php b/bl-plugins/about/plugin.php index bc3ed6d4..b1205b1b 100644 --- a/bl-plugins/about/plugin.php +++ b/bl-plugins/about/plugin.php @@ -14,11 +14,7 @@ class pluginAbout extends Plugin { { global $L; - $html = ''; - - $html .= '
'; + $html = '
'; $html .= ''; $html .= ''; $html .= ''.$L->get('This title is almost always used in the sidebar of the site').''; diff --git a/bl-plugins/api/plugin.php b/bl-plugins/api/plugin.php index e7d23c65..9ebd124d 100644 --- a/bl-plugins/api/plugin.php +++ b/bl-plugins/api/plugin.php @@ -152,16 +152,8 @@ class pluginAPI extends Plugin { // /api/pages/:key // /api/pages/:parent/:key - // (GET) /api/pages - if ( ($method==='GET') && ($parmA==='pages') && empty($parmB) ) { - $data = $this->getPages($inputs); - } - // (POST) /api/pages - elseif ( ($method==='POST') && ($parmA==='pages') && empty($parmB) && $writePermissions ) { - $data = $this->createPage($inputs); - } // (GET) /api/pages/files/:key - elseif ( ($method==='GET') && ($parmA==='pages') && ($parmB==='files') && !empty($parmC) ) { + if ( ($method==='GET') && ($parmA==='pages') && ($parmB==='files') && !empty($parmC) ) { $key = $parmC; if (!empty($parmD)) { $key = $parmC.'/'.$parmD; @@ -192,6 +184,10 @@ class pluginAPI extends Plugin { } $data = $this->getPage($key); } + // (POST) /api/pages + elseif ( ($method==='POST') && ($parmA==='pages') && empty($parmB) && $writePermissions ) { + $data = $this->createPage($inputs); + } // (PUT) /api/pages/:key elseif ( ($method==='PUT') && ($parmA==='pages') && !empty($parmB) && $writePermissions ) { $inputs['key'] = $parmB; @@ -554,28 +550,31 @@ class pluginAPI extends Plugin { ); } + /** + * Delete a page + * @param array $args Parameters for the function + * @return array + */ private function deletePage($args) { if (deletePage($args)) { return array( 'status'=>'0', - 'message'=>'Page deleted.' + 'message'=>'Page deleted.', + 'data'=>array('key'=>$args['key']) ); } return array( 'status'=>'1', - 'message'=>'Error trying to delete the page.' + 'message'=>'An error occurred while trying to delete the page.' ); } - /* - | Get the settings - | - | @args array - | - | @return array - */ + /** + * Get settings + * @return array + */ private function getSettings() { global $site; @@ -586,14 +585,11 @@ class pluginAPI extends Plugin { ); } - /* - | Edit the settings - | You can edit any field defined in the class site.class.php variable $dbFields - | - | @args array - | - | @return array - */ + /** + * Edit settings. + * @param array $args Keys defined in the class site.class.php variable $dbFields + * @return array + */ private function editSettings($args) { if (editSettings($args)) {