From 99bf979597627eb8ae6b0d65731f106b359ac85d Mon Sep 17 00:00:00 2001 From: dignajar Date: Fri, 26 Jun 2015 01:31:53 -0300 Subject: [PATCH] Bug fixes --- admin/controllers/dashboard.php | 19 +++++-- admin/controllers/settings.php | 9 ++++ admin/themes/default/css/default.css | 78 +++++++++++++++++++++++++-- admin/views/dashboard.php | 55 ++++++++++++++++++- admin/views/edit-page.php | 2 +- admin/views/edit-post.php | 2 +- admin/views/users.php | 2 +- kernel/abstract/dbjson.class.php | 8 ++- kernel/abstract/filecontent.class.php | 11 ++-- kernel/boot/init.php | 6 ++- kernel/dblanguage.class.php | 8 +-- kernel/dbpages.class.php | 14 ++--- kernel/dbposts.class.php | 17 ++++-- kernel/dbsite.class.php | 2 +- kernel/helpers/sanitize.class.php | 2 +- kernel/helpers/text.class.php | 17 ++++++ kernel/language.class.php | 36 ------------- 17 files changed, 211 insertions(+), 77 deletions(-) delete mode 100644 kernel/language.class.php diff --git a/admin/controllers/dashboard.php b/admin/controllers/dashboard.php index 7bc1095a..e8fd8e7d 100644 --- a/admin/controllers/dashboard.php +++ b/admin/controllers/dashboard.php @@ -1,7 +1,16 @@ -regenerate(); -$dbPages->regenerate(); +// ============================================================================ +// Functions +// ============================================================================ -?> +// ============================================================================ +// POST Method +// ============================================================================ + +// ============================================================================ +// Main +// ============================================================================ + +$_newPosts = $dbPosts->regenerate(); +$_newPages = $dbPages->regenerate(); diff --git a/admin/controllers/settings.php b/admin/controllers/settings.php index 3b9d3bff..c6285dfa 100644 --- a/admin/controllers/settings.php +++ b/admin/controllers/settings.php @@ -21,6 +21,15 @@ function setSettings($args) $args['advancedOptions'] = 'false'; } + // Add slash at the begin and end. + // This fields are in the settings->advanced mode + if(isset($args['advanced'])) { + $args['url'] = Text::addSlashes($args['url'],false,true); + $args['uriPost'] = Text::addSlashes($args['uriPost']); + $args['uriPage'] = Text::addSlashes($args['uriPage']); + $args['uriTag'] = Text::addSlashes($args['uriTag']); + } + if( $Site->set($args) ) { Alert::set('Settings has been saved successfully'); } diff --git a/admin/themes/default/css/default.css b/admin/themes/default/css/default.css index 2e1a9984..6656a014 100644 --- a/admin/themes/default/css/default.css +++ b/admin/themes/default/css/default.css @@ -8,6 +8,10 @@ a:hover { text-decoration: none !important; } +body { + background-color: #f9f9f9; +} + /* ----------- FONTS AWESOME ----------- */ .fa-right { margin-right: 5px; @@ -55,7 +59,7 @@ a:hover { } #sidebar li { - border-bottom: 1px solid #eee; + } /* ----------- ALERT ----------- */ @@ -78,6 +82,70 @@ h2.title { font-weight: normal; } +/* ----------- TABLE ----------- */ +table { + background-color: #fff; +} +table thead { + border-bottom: 2px solid #ccc; +} + +/* ----------- DASHBOARD ----------- */ +div.dashboardBox { + box-shadow: 0 1px 2px rgba(0,0,0,.26); + background-color: #fff; + border-radius: 2px; + box-sizing: border-box; + margin-bottom: 20px; +} + +div.dashboardBox div.content { + border-top: 1px solid #ddd; + padding: 10px 20px; +} + +div.dashboardBox div.contentBlue { + background-color: #64b5f6 !important; + color: #e3f2fd !important; + position: relative; + overflow: hidden; +} + +div.dashboardBox div.contentGreen { + background-color: #81c784 !important; + color: #e8f5e9 !important; + position: relative; + overflow: hidden; +} + +div.dashboardBox .nav { + margin: 0 !important; +} + + + +div.dashboardBox i.iconContent { + bottom: -1rem; + position: absolute; + right: 0; + font-size: 4em; +} + +div.dashboardBox div.bigContent { + font-size: 1.8em; + font-weight: bold; +} + +div.dashboardBox h2 { + color: #666; + font-size: 1.1em; + font-weight: normal; + margin: 0; + padding: 10px 20px; +} + + + /* ----------- FORMS ----------- */ form h4 { @@ -99,12 +167,12 @@ p.advOptions { /* ----------- PLUGINS ----------- */ div.pluginBox { - background: rgba(234, 234, 234, 0.18) none repeat scroll 0 0; + box-shadow: 0 1px 2px rgba(0,0,0,.26); + background-color: #fff; border-radius: 2px; - padding: 10px; + box-sizing: border-box; + padding: 20px; width: 70%; - box-shadow: 0 2px 5px 0 rgba(183, 183, 183, 0.26); - margin-bottom: 20px; } div.pluginBox p { diff --git a/admin/views/dashboard.php b/admin/views/dashboard.php index bfb28c1c..355a96be 100644 --- a/admin/views/dashboard.php +++ b/admin/views/dashboard.php @@ -1,2 +1,55 @@

Dashboard

-

Not implemented...

+ +
+ +
+ +
+
+
count() ?>
+
posts
+ +
+
+ +
+
+
count() ?>
+
Users
+ +
+
+ +
+ +
+ +
+
+
Database regenerated
+
New posts and pages synchronized.
+ +
+
+ +
+

Notifications

+
+ +
+
+ + +
+ +
\ No newline at end of file diff --git a/admin/views/edit-page.php b/admin/views/edit-page.php index da8d346f..18bfcea5 100644 --- a/admin/views/edit-page.php +++ b/admin/views/edit-page.php @@ -11,7 +11,7 @@ - +title()); ?>