From c275b0817813b981857c662946cf848e1688e64e Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Fri, 11 Dec 2015 23:33:55 +0100 Subject: [PATCH] Fixed some template bugs (#1727) - Fixed z-index of messages and countdowns. - Sidebar: Live view open by default. Improve section style. - Set default value for open_posts in assignments create form. - Redefine default values in motions create form. --- .../assignments/static/js/assignments/site.js | 3 +++ openslides/core/static/css/app.css | 6 +++++- openslides/core/static/css/projector.css | 4 ++-- .../static/templates/core/projector-controls.html | 10 +++++----- openslides/motions/static/js/motions/site.js | 15 ++++++--------- 5 files changed, 21 insertions(+), 17 deletions(-) diff --git a/openslides/assignments/static/js/assignments/site.js b/openslides/assignments/static/js/assignments/site.js index 67d22f165..90618ddeb 100644 --- a/openslides/assignments/static/js/assignments/site.js +++ b/openslides/assignments/static/js/assignments/site.js @@ -358,6 +358,9 @@ angular.module('OpenSlidesApp.assignments.site', ['OpenSlidesApp.assignments']) 'Assignment', 'AssignmentFormFieldFactory', function($scope, $state, Assignment, AssignmentFormFieldFactory) { + $scope.model = {}; + // set default value for open posts form field + $scope.model.open_posts = 1; // get all form fields $scope.formFields = AssignmentFormFieldFactory.getFormFields(); diff --git a/openslides/core/static/css/app.css b/openslides/core/static/css/app.css index 9cf3ced12..c3e8fbd51 100644 --- a/openslides/core/static/css/app.css +++ b/openslides/core/static/css/app.css @@ -396,10 +396,13 @@ img { } .col2 .projector_full .details .section { - padding: 10px 20px; + padding: 1px 20px; width: auto; border-bottom: 1px solid #c2c2c2; } +.col2 .projector_full .details .section div.in.collapse { + padding-bottom: 15px; +} #content .col2 .section a:hover { text-decoration: none; @@ -409,6 +412,7 @@ img { #content .toggle-icon { font-size: 20px; float: right; + margin-top: 10px; } /* countdown and message controls */ diff --git a/openslides/core/static/css/projector.css b/openslides/core/static/css/projector.css index 31aebe511..8a7a6e90f 100644 --- a/openslides/core/static/css/projector.css +++ b/openslides/core/static/css/projector.css @@ -159,7 +159,7 @@ hr { left: 0; width: 100%; height: 100%; - z-index: 200; + z-index: 300; } .message { position: fixed; @@ -172,7 +172,7 @@ hr { font-size: 2.75em; padding: 0.2em 0; line-height: normal !important; - z-index: 201; + z-index: 301; } diff --git a/openslides/core/static/templates/core/projector-controls.html b/openslides/core/static/templates/core/projector-controls.html index 5bf56e0f8..a66876d24 100644 --- a/openslides/core/static/templates/core/projector-controls.html +++ b/openslides/core/static/templates/core/projector-controls.html @@ -4,11 +4,11 @@
- - + +

Live view

-
+
@@ -16,7 +16,7 @@
-

+

@@ -51,7 +51,7 @@ {{ scrollLevel }} -

+
diff --git a/openslides/motions/static/js/motions/site.js b/openslides/motions/static/js/motions/site.js index e81d88df0..6a2d2f625 100644 --- a/openslides/motions/static/js/motions/site.js +++ b/openslides/motions/static/js/motions/site.js @@ -485,21 +485,18 @@ angular.module('OpenSlidesApp.motions.site', ['OpenSlidesApp.motions']) User.bindAll({}, $scope, 'users'); Workflow.bindAll({}, $scope, 'workflows'); + $scope.model = {}; + // set default values for create form + // ... set preamble config value as text + $scope.model.text = Config.get('motions_preamble').value; + // ... preselect default workflow + $scope.model.workflow_id = Config.get('motions_workflow').value; // get all form fields $scope.formFields = MotionFormFieldFactory.getFormFields(); - // override default values for create form for (var i = 0; i < $scope.formFields.length; i++) { if ($scope.formFields[i].key == "identifier") { $scope.formFields[i].hide = true; } - if ($scope.formFields[i].key == "text") { - // set preamble config value as default text - $scope.formFields[i].defaultValue = Config.get('motions_preamble').value; - } - if ($scope.formFields[i].key == "workflow_id") { - // preselect default workflow - $scope.formFields[i].defaultValue = Config.get('motions_workflow').value; - } } // save motion $scope.save = function (motion) {