diff --git a/CHANGELOG b/CHANGELOG index 546960291..e72beb753 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -51,6 +51,8 @@ Motions: - Show the number of next speakers in motion list view [#3470]. - Reference to motions by id in state and recommendation special field [#3498]. - Added new change recommendation type "other" [#3495]. +- Combined all boolean filters into one dropdown menu and added a filter + for amendments [#3501]. Elections: - Added pagination for list view [#3393]. diff --git a/openslides/core/static/css/app.css b/openslides/core/static/css/app.css index 4eea6b0d6..a831578f0 100644 --- a/openslides/core/static/css/app.css +++ b/openslides/core/static/css/app.css @@ -1118,6 +1118,7 @@ img { .os-table .main-header .form-inline { margin-left: 15px; + width: 100%; } .os-table .content > div { /* horizontal blocks */ diff --git a/openslides/mediafiles/static/js/mediafiles/image-plugin.js b/openslides/mediafiles/static/js/mediafiles/image-plugin.js index c7e84a2f5..b8aec8e2b 100644 --- a/openslides/mediafiles/static/js/mediafiles/image-plugin.js +++ b/openslides/mediafiles/static/js/mediafiles/image-plugin.js @@ -81,7 +81,7 @@ angular.module('OpenSlidesApp.mediafiles.image-plugin', [ }); // Set the toolbar icon to the default image icon. CKEDITOR.on('instanceReady', function () { - var toolbarIcon = $('span.cke_button_icon.cke_button__image.browser_icon'); + var toolbarIcon = $('span.cke_button_icon.cke_button__bildbrowser_icon'); toolbarIcon.removeClass('cke_button__image browser_icon'); toolbarIcon.addClass('cke_button__image_icon'); }); diff --git a/openslides/motions/static/js/motions/base.js b/openslides/motions/static/js/motions/base.js index 263517841..bb513a6c6 100644 --- a/openslides/motions/static/js/motions/base.js +++ b/openslides/motions/static/js/motions/base.js @@ -240,6 +240,11 @@ angular.module('OpenSlidesApp.motions', [ MotionComment.populateFieldsReverse(data); callback(null, data); }, + computed: { + isAmendment: function () { + return this.parent_id !== null; + }, + }, methods: { getResourceName: function () { return name; @@ -505,9 +510,6 @@ angular.module('OpenSlidesApp.motions', [ ] }); }, - isAmendment: function () { - return this.parent_id !== null; - }, hasAmendments: function () { return DS.filter('motions/motion', {parent_id: this.id}).length > 0; }, @@ -591,8 +593,8 @@ angular.module('OpenSlidesApp.motions', [ return ( operator.hasPerms('motions.can_create') && Config.get('motions_amendments_enabled').value && - ( !this.isAmendment() || - (this.isAmendment() && OpenSlidesSettings.MOTIONS_ALLOW_AMENDMENTS_OF_AMENDMENTS)) + ( !this.isAmendment || + (this.isAmendment && OpenSlidesSettings.MOTIONS_ALLOW_AMENDMENTS_OF_AMENDMENTS)) ); default: return false; diff --git a/openslides/motions/static/js/motions/site.js b/openslides/motions/static/js/motions/site.js index f1cf52341..ae7514ca3 100644 --- a/openslides/motions/static/js/motions/site.js +++ b/openslides/motions/static/js/motions/site.js @@ -1024,6 +1024,9 @@ angular.module('OpenSlidesApp.motions.site', [ // collect all states and all recommendations of all workflows $scope.collectStatesAndRecommendations = function () { + // Special case: If it is the first time updated, update the state filter. + // This causes to set the done/undone states correct on page load. + var doStateFilterUpdate = !$scope.states; $scope.states = []; $scope.recommendations = []; var workflows = $scope.collectAllUsedWorkflows(); @@ -1049,6 +1052,9 @@ angular.module('OpenSlidesApp.motions.site', [ } }); }); + if (doStateFilterUpdate) { + updateStateFilter(); + } }; $scope.collectAllUsedWorkflows = function () { return _.filter(Workflow.getAll(), function (workflow) { @@ -1101,6 +1107,11 @@ angular.module('OpenSlidesApp.motions.site', [ comment: [], }; $scope.filter.booleanFilters = { + isAmendment: { + value: undefined, + choiceYes: gettext('Is an amendment'), + choiceNo: gettext('Is not an amendment'), + }, isFavorite: { value: undefined, choiceYes: gettext('Marked as favorite'), @@ -1113,7 +1124,6 @@ angular.module('OpenSlidesApp.motions.site', [ }, }; } - updateStateFilter(); $scope.filter.propertyList = ['identifier', 'origin']; $scope.filter.propertyFunctionList = [ function (motion) {return motion.getTitle();}, diff --git a/openslides/motions/static/templates/motions/motion-list.html b/openslides/motions/static/templates/motions/motion-list.html index 8d32b56a8..e7ef28a84 100644 --- a/openslides/motions/static/templates/motions/motion-list.html +++ b/openslides/motions/static/templates/motions/motion-list.html @@ -135,19 +135,12 @@
-