diff --git a/messages/uniworx/de.msg b/messages/uniworx/de.msg index 08f096088..0616590e1 100644 --- a/messages/uniworx/de.msg +++ b/messages/uniworx/de.msg @@ -87,6 +87,7 @@ CourseRegisterToTip: Anmeldung darf auch unbegrenzt offen bleiben CourseDeregisterUntilTip: Abmeldung darf auch unbegrenzt erlaubt bleiben CourseFilterSearch: Volltext-Suche CourseFilterRegistered: Registriert +CourseFilterNone: Egal CourseDeleteQuestion: Wollen Sie den unten aufgeführten Kurs wirklich löschen? CourseDeleted: Kurs gelöscht CourseUserNote: Notiz diff --git a/static/css/utils/radio.scss b/static/css/utils/radio.scss index 3a8a87d85..e30894013 100644 --- a/static/css/utils/radio.scss +++ b/static/css/utils/radio.scss @@ -24,18 +24,21 @@ label { display: block; - height: 48px; - min-width: 48px; + height: 34px; + min-width: 42px; + line-height: 34px; + text-align: center; padding: 0 7px; background-color: #f3f3f3; - box-shadow: inset 0 1px 2px 1px rgba(50, 50, 50, 0.05); - border: 2px solid var(--color-primary); + box-shadow: inset 2px 1px 2px 1px rgba(50, 50, 50, 0.05); color: var(--color-font); cursor: pointer; } :checked + label { - background-color: #dedede; + background-color: #818181; + color: var(--color-lightwhite); + box-shadow: inset -2px -1px 2px 1px rgba(255, 255, 255, 0.15); } :focus + label { @@ -51,3 +54,23 @@ filter: grayscale(1); } } + +.radio:first-child { + label { + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + } +} + +.radio:last-child { + label { + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + } +} + +@media (max-width: 768px) { + .radio + .radio { + margin-left: 10px; + } +} diff --git a/static/js/utils/asyncTable.js b/static/js/utils/asyncTable.js index 7e7e88855..0eeb7528d 100644 --- a/static/js/utils/asyncTable.js +++ b/static/js/utils/asyncTable.js @@ -51,6 +51,9 @@ // check all utilInstances.push(window.utils.setup('checkAll', wrapper)); + // showhide + utilInstances.push(window.utils.setup('showHide', wrapper)); + // filter var filterForm = wrapper.querySelector('.' + TABLE_FILTER_FORM_CLASS); if (filterForm) { diff --git a/static/js/utils/showHide.js b/static/js/utils/showHide.js index a2bb2edc0..094ff1d5c 100644 --- a/static/js/utils/showHide.js +++ b/static/js/utils/showHide.js @@ -4,6 +4,10 @@ window.utils = window.utils || {}; var LOCAL_STORAGE_SHOW_HIDE = 'SHOW_HIDE'; + var SHOW_HIDE_TOGGLE_CLASS = 'js-show-hide__toggle'; + var SHOW_HIDE_COLLAPSED_CLASS = 'js-show-hide--collapsed'; + var SHOW_HIDE_TARGET_CLASS = 'js-show-hide__target'; + /** * div * div.js-show-hide__toggle @@ -12,9 +16,13 @@ * content here */ window.utils.showHide = function(wrapper, options) { + + options = options || {}; + // make + function addEventHandler(el) { el.addEventListener('click', function elClickListener() { - var newState = el.parentElement.classList.toggle('js-show-hide--collapsed'); + var newState = el.parentElement.classList.toggle(SHOW_HIDE_COLLAPSED_CLASS); updateLSState(el.dataset.shIndex || null, newState); }); } @@ -37,16 +45,16 @@ } Array - .from(wrapper.querySelectorAll('.js-show-hide__toggle')) + .from(wrapper.querySelectorAll('.' + SHOW_HIDE_TOGGLE_CLASS)) .forEach(function(el) { var index = el.dataset.shIndex || null; el.parentElement.classList.toggle( - 'js-show-hide--collapsed', + SHOW_HIDE_COLLAPSED_CLASS, collapsedStateInLocalStorage(index) || el.dataset.collapsed === 'true' ); Array.from(el.parentElement.children).forEach(function(el) { - if (!el.classList.contains('js-show-hide__toggle')) { - el.classList.add('js-show-hide__target'); + if (!el.classList.contains('' + SHOW_HIDE_TOGGLE_CLASS)) { + el.classList.add(SHOW_HIDE_TARGET_CLASS); } }); addEventHandler(el); diff --git a/templates/table/layout-filter-default.hamlet b/templates/table/layout-filter-default.hamlet index dae7cd085..d09a586af 100644 --- a/templates/table/layout-filter-default.hamlet +++ b/templates/table/layout-filter-default.hamlet @@ -1,8 +1,9 @@ $newline never -
-
- ^{filterWgdt} -