From cc936c34f85f308cea9769cfda4752548fd12077 Mon Sep 17 00:00:00 2001 From: Daniel Preussker Date: Thu, 10 Sep 2015 19:24:44 +0100 Subject: [PATCH] Re-arranged dashboard bar --- html/pages/front/tiles.php | 98 +++++++++++++++++++++++++++----------- 1 file changed, 69 insertions(+), 29 deletions(-) diff --git a/html/pages/front/tiles.php b/html/pages/front/tiles.php index a4d8674ca8..670a6bb583 100644 --- a/html/pages/front/tiles.php +++ b/html/pages/front/tiles.php @@ -40,31 +40,48 @@ $dash_config = unserialize(stripslashes($data)); $dashboards = dbFetchRows("SELECT * FROM `dashboards` WHERE `user_id` = ?",array($_SESSION['user_id'])); ?> -
- Dashboards +
+
+
+ +
+ + +
+ + + +
+
-
- -
-
-
+
+
+
- New Dashboard + New Dashboard - + @@ -75,18 +92,17 @@ foreach ($dashboards as $dash) {
-
+
-
-
+
+
-
+
- Dashboard Name - + Dashboard Name - + @@ -94,18 +110,30 @@ foreach ($dashboards as $dash) {
-
- +
+
+
+
+ '. $widgets['widget_title'] .' '; + echo ' '. $widgets['widget_title'] .' '; } - ?> +
+
+
+
+
+ +
+
+
+
+
@@ -154,6 +182,7 @@ foreach (dbFetchRows("SELECT * FROM `widgets` ORDER BY `widget_title`") as $widg } $(function(){ + dashboard_collapse(); gridster = $(".gridster ul").gridster({ widget_base_dimensions: [100, 100], widget_margins: [5, 5], @@ -264,6 +293,17 @@ foreach (dbFetchRows("SELECT * FROM `widgets` ORDER BY `widget_title`") as $widg }); + function dashboard_collapse(target) { + if (target !== undefined) { + $('.dash-collapse:not('+target+')').each(function() { + $(this).fadeOut(150); + }); + $(target).fadeToggle(150); + } else { + $('.dash-collapse').fadeOut(0); + } + } + function dashboard_delete(data) { $.ajax({ type: 'POST',