From ef2a22fefe4935ae156a7ef0d82d69e1f6e1c389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Sch=C3=BCtze?= Date: Sun, 22 Apr 2018 12:14:28 +0200 Subject: [PATCH] Template improvements - Show item duration and done for normal users correctly. - Fixed CSS class for countdown warning time. - Improved projector manage button layout. - Updated fontawsome icons to 4.7. - Fixed iframe width/height to show border correctly. - Improved 'close list of speakers' button. - Improved 'clear all filter' icons. - Fixed election pdf if candidate was deleted. - Moved ban icon for internal icons. - Improved edit projector form. Show simple scaling steps instead of width/height resolution. - Consolidated both agenda item filters. - Used better sort icon. - Installed colordialog plugin for ckeditor to select more colors. - Several css improvements. --- bower.json | 2 +- gulpfile.js | 1 + .../static/templates/agenda/item-list.html | 95 +++++++++++-------- .../list-of-speakers-partial-management.html | 22 ++--- .../assignments/static/js/assignments/pdf.js | 22 +++-- .../assignments/assignment-list.html | 10 +- openslides/core/static/css/_helper.scss | 10 ++ .../core/static/css/core/_countdown.scss | 4 +- .../core/static/css/core/_goto-top.scss | 2 +- .../static/css/core/_manage-projectors.scss | 14 +-- .../static/css/core/_projector-sidebar.scss | 1 + .../core/static/css/core/_projector.scss | 8 -- openslides/core/static/css/core/_site.scss | 12 ++- openslides/core/static/css/projector.scss | 1 + openslides/core/static/js/core/base.js | 2 +- openslides/core/static/js/core/site.js | 1 + .../templates/core/countdown-detail.html | 2 +- .../templates/core/manage-projectors.html | 90 +++++++++--------- .../templates/core/projector-controls.html | 18 +--- .../templates/core/slide_countdown.html | 2 +- openslides/core/static/templates/index.html | 2 +- .../templates/mediafiles/mediafile-list.html | 8 +- openslides/motions/static/js/motions/pdf.js | 8 +- .../motions/motion-detail/toolbar.html | 4 +- .../static/templates/motions/motion-list.html | 16 ++-- .../static/templates/topics/topic-detail.html | 2 +- .../static/templates/users/user-list.html | 12 ++- 27 files changed, 199 insertions(+), 172 deletions(-) diff --git a/bower.json b/bower.json index 15bcf66fc..a6b407969 100644 --- a/bower.json +++ b/bower.json @@ -26,7 +26,7 @@ "bootstrap-ui-datetime-picker": "~2.4.0", "ckeditor": "~4.7.2", "docxtemplater": "~2.1.5", - "font-awesome-bower": "~4.5.0", + "font-awesome-bower": "~4.7.0", "jquery.cookie": "~1.4.1", "js-data": "~2.9.0", "js-data-angular": "~3.2.1", diff --git a/gulpfile.js b/gulpfile.js index 12432640a..7ff236751 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -181,6 +181,7 @@ gulp.task('ckeditor-plugins', function () { [ path.join('bower_components', 'ckeditor', 'plugins', 'clipboard', '**', '*'), path.join('bower_components', 'ckeditor', 'plugins', 'colorbutton', '**', '*'), + path.join('bower_components', 'ckeditor', 'plugins', 'colordialog', '**', '*'), path.join('bower_components', 'ckeditor', 'plugins', 'dialog', '**', '*'), path.join('bower_components', 'ckeditor', 'plugins', 'find', '**', '*'), path.join('bower_components', 'ckeditor', 'plugins', 'image', '**', '*'), diff --git a/openslides/agenda/static/templates/agenda/item-list.html b/openslides/agenda/static/templates/agenda/item-list.html index f965f4209..ba4be73ed 100644 --- a/openslides/agenda/static/templates/agenda/item-list.html +++ b/openslides/agenda/static/templates/agenda/item-list.html @@ -19,7 +19,7 @@ - + Current list of speakers @@ -199,33 +199,47 @@ - + Filter - - - - {{ booleanFilter.displayName | translate }} - - - - + + + + Items + + + + @@ -311,10 +325,6 @@
-
- -
- - {{ item.duration | osMinutesToTime }} - +
+ + {{ item.duration | osMinutesToTime }} + h + +
@@ -390,20 +403,26 @@
-
+
- Internal item + Internal
Done
-
- - Done +
+
+ + Internal +
+
+ + Done +
diff --git a/openslides/agenda/static/templates/agenda/list-of-speakers-partial-management.html b/openslides/agenda/static/templates/agenda/list-of-speakers-partial-management.html index ecfaf7b7b..8effcedcd 100644 --- a/openslides/agenda/static/templates/agenda/list-of-speakers-partial-management.html +++ b/openslides/agenda/static/templates/agenda/list-of-speakers-partial-management.html @@ -1,6 +1,16 @@
+ + + + - - - -
diff --git a/openslides/assignments/static/js/assignments/pdf.js b/openslides/assignments/static/js/assignments/pdf.js index 26bfb979c..8768e2dfd 100644 --- a/openslides/assignments/static/js/assignments/pdf.js +++ b/openslides/assignments/static/js/assignments/pdf.js @@ -115,17 +115,16 @@ angular.module('OpenSlidesApp.assignments.pdf', ['OpenSlidesApp.core.pdf']) //creates the voting string for the result table and differentiates between special values var parseVoteValue = function(voteObject, printLabel) { var voteVal = ""; + if (voteObject) { + if (printLabel) { + voteVal += voteObject.label + ": "; + } + voteVal += voteObject.value; - if (printLabel) { - voteVal += voteObject.label + ": "; + if (voteObject.percentStr) { + voteVal += " " + voteObject.percentStr; + } } - - voteVal += voteObject.value; - - if (voteObject.percentStr) { - voteVal += " " + voteObject.percentStr; - } - voteVal += "\n"; return voteVal; }; @@ -373,7 +372,10 @@ angular.module('OpenSlidesApp.assignments.pdf', ['OpenSlidesApp.core.pdf']) }); } else { angular.forEach(candidates, function(option) { - var candidate = option.candidate.get_full_name(); + var candidate; + if (option.candidate) { + candidate = option.candidate.get_full_name(); + } candidateBallotList.push(createYNBallotEntry(candidate)); }); } diff --git a/openslides/assignments/static/templates/assignments/assignment-list.html b/openslides/assignments/static/templates/assignments/assignment-list.html index 773d25a31..b23668a8e 100644 --- a/openslides/assignments/static/templates/assignments/assignment-list.html +++ b/openslides/assignments/static/templates/assignments/assignment-list.html @@ -94,7 +94,7 @@ - + Filter @@ -152,11 +152,13 @@
  • - {{ option.display_name | translate }} - + + {{ option.display_name | translate }} + + + ng-class="sort.reverse ? 'fa-sort-amount-desc' : 'fa-sort-amount-asc'">
  • diff --git a/openslides/core/static/css/_helper.scss b/openslides/core/static/css/_helper.scss index 401412745..61a5a41dd 100644 --- a/openslides/core/static/css/_helper.scss +++ b/openslides/core/static/css/_helper.scss @@ -131,6 +131,10 @@ display: auto; } +.inline { + display: inline; +} + .login-logo { width: 250px; } @@ -243,3 +247,9 @@ tr.selected td { background-color: #fcf8e3; border-color: #faebcc; } +.close { + opacity: 0.3 !important; +} +.close:hover { + opacity: 0.6 !important; +} diff --git a/openslides/core/static/css/core/_countdown.scss b/openslides/core/static/css/core/_countdown.scss index 4b035e87d..4528805ee 100644 --- a/openslides/core/static/css/core/_countdown.scss +++ b/openslides/core/static/css/core/_countdown.scss @@ -24,9 +24,9 @@ font-weight: normal; font-size: 5vw; } -#countdown.warning { +.warning_time { color: #ed940d; } -#countdown.negative { +.negative { color: #CC0000; } diff --git a/openslides/core/static/css/core/_goto-top.scss b/openslides/core/static/css/core/_goto-top.scss index 2d982010c..b50fe0c9d 100644 --- a/openslides/core/static/css/core/_goto-top.scss +++ b/openslides/core/static/css/core/_goto-top.scss @@ -5,7 +5,7 @@ right: 30px; padding: 10px 30px; background: white; - opacity: 0.6; + opacity: 0.8; transition: opacity 250ms ease-out; z-index: 100; diff --git a/openslides/core/static/css/core/_manage-projectors.scss b/openslides/core/static/css/core/_manage-projectors.scss index 58ec23442..7fd497698 100644 --- a/openslides/core/static/css/core/_manage-projectors.scss +++ b/openslides/core/static/css/core/_manage-projectors.scss @@ -20,18 +20,8 @@ } } - .dropdown { - width: 65%; - padding-right: 5px; - float: left; - - button { - width: 100%; - } - } - - .btn-danger { - width: 35%; + .dropdown button { + width: 100%; } .resolution { diff --git a/openslides/core/static/css/core/_projector-sidebar.scss b/openslides/core/static/css/core/_projector-sidebar.scss index 9983f6182..7ed81d270 100644 --- a/openslides/core/static/css/core/_projector-sidebar.scss +++ b/openslides/core/static/css/core/_projector-sidebar.scss @@ -14,6 +14,7 @@ & > button { width: 100%; + overflow: hidden; } } } diff --git a/openslides/core/static/css/core/_projector.scss b/openslides/core/static/css/core/_projector.scss index 0f332c5ed..d3834ae54 100644 --- a/openslides/core/static/css/core/_projector.scss +++ b/openslides/core/static/css/core/_projector.scss @@ -191,14 +191,6 @@ hr { margin-top: 20px; padding-right: 6px; } - - &.warning { - color: #ed940d; - } - - &.negative { - color: #CC0000; - } } .message_background { diff --git a/openslides/core/static/css/core/_site.scss b/openslides/core/static/css/core/_site.scss index 363dcd3af..124eb6d17 100644 --- a/openslides/core/static/css/core/_site.scss +++ b/openslides/core/static/css/core/_site.scss @@ -561,7 +561,7 @@ strong, b, th { } .iframewrapper { - width: 256px; + width: 258px; position: relative; overflow: hidden; border: 1px solid #D5D5D5; @@ -597,3 +597,13 @@ strong, b, th { font-size: 16px; color: #000; } + +/** Config **/ +#config .panel-body { + padding-top: 0; +} +#config.details h3 { + font-size: 22px; + padding-top: 30px; + margin-top: 0; +} diff --git a/openslides/core/static/css/projector.scss b/openslides/core/static/css/projector.scss index 82fc04756..3090e8bc6 100644 --- a/openslides/core/static/css/projector.scss +++ b/openslides/core/static/css/projector.scss @@ -4,6 +4,7 @@ @import "variables"; @import "helper"; @import "ui-override"; +@import "core/countdown"; /* Apps */ @import "core/projector"; diff --git a/openslides/core/static/js/core/base.js b/openslides/core/static/js/core/base.js index 5732f7a92..00ad112aa 100644 --- a/openslides/core/static/js/core/base.js +++ b/openslides/core/static/js/core/base.js @@ -1070,7 +1070,7 @@ angular.module('OpenSlidesApp.core', [ * - YOffset: move the editor toolbar 40px up */ getOptions: function () { - var extraPluginsString = 'colorbutton,find,sourcedialog,justify,showblocks'; + var extraPluginsString = 'colorbutton,colordialog,find,sourcedialog,justify,showblocks'; var registeredPluginsString = extraPlugins.join(','); if (registeredPluginsString) { extraPluginsString += ',' + registeredPluginsString; diff --git a/openslides/core/static/js/core/site.js b/openslides/core/static/js/core/site.js index c918b18e2..04aa5167d 100644 --- a/openslides/core/static/js/core/site.js +++ b/openslides/core/static/js/core/site.js @@ -1626,6 +1626,7 @@ angular.module('OpenSlidesApp.core.site', [ id: projector.id, floor: 800, ceil: 3840, + step: 10, translate: function (value) { return value + 'px'; }, diff --git a/openslides/core/static/templates/core/countdown-detail.html b/openslides/core/static/templates/core/countdown-detail.html index 7f17563b8..c73252506 100644 --- a/openslides/core/static/templates/core/countdown-detail.html +++ b/openslides/core/static/templates/core/countdown-detail.html @@ -2,7 +2,7 @@
    + 'warning_time': countdown.seconds <= config('agenda_countdown_warning_time') && countdown.seconds > 0 }">
    {{ countdown.seconds | osSecondsToTime}}
    diff --git a/openslides/core/static/templates/core/manage-projectors.html b/openslides/core/static/templates/core/manage-projectors.html index 7beb27c06..f9b3829ee 100644 --- a/openslides/core/static/templates/core/manage-projectors.html +++ b/openslides/core/static/templates/core/manage-projectors.html @@ -45,14 +45,31 @@ {{ projector.id }}: {{ projector.name | translate }} - + + + + + +
    -
    +
    + + +
    + +
    + - -
    -
    - - + +
    + +
    + +
    -
    - + +
    +
    -
    - - {{ resolutions[projector.id].width }}×{{ resolutions[projector.id].height }} - - -
    -
    -

    {{ resolutions[projector.id].error }} @@ -127,7 +129,7 @@ } #iframewrapper_{{ projector.id }} { - height: {{ projector.iframeHeight }}px; + height: {{ projector.iframeHeight + 2 }}px; } #iframeoverlay_{{ projector.id }} { @@ -195,15 +197,15 @@

    - -
    @@ -59,20 +59,6 @@ Manage
    - -
    - - -
    @@ -187,7 +173,7 @@ + 'warning_time': countdown.seconds <= config('agenda_countdown_warning_time') && countdown.seconds > 0 }"> {{ countdown.seconds | osSecondsToTime }} diff --git a/openslides/core/static/templates/core/slide_countdown.html b/openslides/core/static/templates/core/slide_countdown.html index 4f6e106c5..47d519abd 100644 --- a/openslides/core/static/templates/core/slide_countdown.html +++ b/openslides/core/static/templates/core/slide_countdown.html @@ -2,7 +2,7 @@
    + 'warning_time': countdown.seconds <= config('agenda_countdown_warning_time') && countdown.seconds > 0 }"> {{ countdown.seconds | osSecondsToTime}}
    {{ countdown.description }}
    diff --git a/openslides/core/static/templates/index.html b/openslides/core/static/templates/index.html index f2db6ff50..0f0c9b254 100644 --- a/openslides/core/static/templates/index.html +++ b/openslides/core/static/templates/index.html @@ -124,7 +124,7 @@ |
    - + {{ selectedLanguage[0].name | translate }}
    -
    -
    +
    Set structure level ... @@ -425,7 +427,7 @@
    -
    +
    Set comment ...