summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2016-09-07 11:55:35 +0200
committerSimon Rettberg2016-09-07 11:55:35 +0200
commit3b224e0ba4166f3f1ffe084cd3a1a7fbae9b927f (patch)
tree926bcc7433ff8b5a2161ae4e4a0863b94596102c
parent[Dashboard] Add option to disable dashboard creation (diff)
downloadslx-admin-3b224e0ba4166f3f1ffe084cd3a1a7fbae9b927f.tar.gz
slx-admin-3b224e0ba4166f3f1ffe084cd3a1a7fbae9b927f.tar.xz
slx-admin-3b224e0ba4166f3f1ffe084cd3a1a7fbae9b927f.zip
[roomplanner] Implement hiding the menu and fullscreen display with CSS rather than JS
-rw-r--r--modules-available/roomplanner/js/init.js5
-rw-r--r--modules-available/roomplanner/page.inc.php1
-rw-r--r--modules-available/roomplanner/style.css27
3 files changed, 20 insertions, 13 deletions
diff --git a/modules-available/roomplanner/js/init.js b/modules-available/roomplanner/js/init.js
index da015711..bf102a91 100644
--- a/modules-available/roomplanner/js/init.js
+++ b/modules-available/roomplanner/js/init.js
@@ -4,11 +4,6 @@ function initRoomplanner() {
console.log('initRoomplanner');
- /* make it fullscreen, otherwise there are too many positioning bugs */
- $('.sidebar-bg, .navbar').hide();
- $('#mainpage').css('position', 'static').css('width', '100%').css('max-width', '100%').css('left', '0px');
-
-
$('#drawarea').css('top',(-roomplanner.settings.scale*10)+'px');
$('#drawarea').css('left',(-roomplanner.settings.scale*10)+'px');
diff --git a/modules-available/roomplanner/page.inc.php b/modules-available/roomplanner/page.inc.php
index 9e01eca3..a937a130 100644
--- a/modules-available/roomplanner/page.inc.php
+++ b/modules-available/roomplanner/page.inc.php
@@ -57,6 +57,7 @@ class Page_Roomplanner extends Page
{
if ($this->action === 'show') {
/* do nothing */
+ Dashboard::disable();
$furniture = $this->getFurniture();
$subnetMachines = $this->getPotentialMachines();
$machinesOnPlan = $this->getMachinesOnPlan();
diff --git a/modules-available/roomplanner/style.css b/modules-available/roomplanner/style.css
index 9fa19e8c..abf47fc4 100644
--- a/modules-available/roomplanner/style.css
+++ b/modules-available/roomplanner/style.css
@@ -1,15 +1,26 @@
@CHARSET "UTF-8";
-body.split #drawpanel {
- width:60%;
- float: right;}
+/* override style to make the room planner full screen */
+body {
+ width: 100%;
+ margin: 0;
+}
-body.full #drawpanel {
- width:90%;
- float: none;
- margin: 0 auto 20px;
- }
+.sidebar-bg, .navbar {
+ display: none;
+}
+
+#mainpage {
+ position: static;
+ width: 100%;
+ max-width: 100%;
+ left: 0px;
+ top: 0px;
+ margin: 0;
+}
+
+/* end full screen changes */
#drawpanel {
position:relative;}