This commit is contained in:
Joshua Sangmeister 2019-08-06 09:56:38 +02:00
parent 30c93f3990
commit b7c9b3f2ae
11 changed files with 82 additions and 57 deletions

View File

@ -24,7 +24,8 @@
"po2json-tempfix": "./node_modules/.bin/po2json -f mf src/assets/i18n/de.po /dev/stdout | sed -f sed_replacements > src/assets/i18n/de.json && ./node_modules/.bin/po2json -f mf src/assets/i18n/cs.po /dev/stdout | sed -f sed_replacements > src/assets/i18n/cs.json", "po2json-tempfix": "./node_modules/.bin/po2json -f mf src/assets/i18n/de.po /dev/stdout | sed -f sed_replacements > src/assets/i18n/de.json && ./node_modules/.bin/po2json -f mf src/assets/i18n/cs.po /dev/stdout | sed -f sed_replacements > src/assets/i18n/cs.json",
"prettify-check": "prettier --config ./.prettierrc --list-different \"src/{app,environments}/**/*{.ts,.js,.json,.css,.scss}\"", "prettify-check": "prettier --config ./.prettierrc --list-different \"src/{app,environments}/**/*{.ts,.js,.json,.css,.scss}\"",
"prettify-write": "prettier --config ./.prettierrc --write \"src/{app,environments}/**/*{.ts,.js,.json,.css,.scss}\"", "prettify-write": "prettier --config ./.prettierrc --write \"src/{app,environments}/**/*{.ts,.js,.json,.css,.scss}\"",
"cleanup": "npm run lint-write; npm run prettify-write" "cleanup": "npm run lint-write; npm run prettify-write",
"cleanup-win": "npm run lint-write & npm run prettify-write"
}, },
"dependencies": { "dependencies": {
"@angular/animations": "^8.0.3", "@angular/animations": "^8.0.3",

View File

@ -38,7 +38,7 @@
<!-- Template for new motion block dialog --> <!-- Template for new motion block dialog -->
<ng-template #newMotionBlockDialog> <ng-template #newMotionBlockDialog>
<h1 mat-dialog-title> <h1 mat-dialog-title>
<span>{{ "New motion block" | translate }}</span> <span translate>New motion block</span>
</h1> </h1>
<form [formGroup]="createBlockForm" (keydown)="onKeyDown($event)"> <form [formGroup]="createBlockForm" (keydown)="onKeyDown($event)">
<div mat-dialog-content> <div mat-dialog-content>

View File

@ -13,11 +13,11 @@ import { StorageService } from 'app/core/core-services/storage.service';
import { ItemRepositoryService } from 'app/core/repositories/agenda/item-repository.service'; import { ItemRepositoryService } from 'app/core/repositories/agenda/item-repository.service';
import { MotionBlockRepositoryService } from 'app/core/repositories/motions/motion-block-repository.service'; import { MotionBlockRepositoryService } from 'app/core/repositories/motions/motion-block-repository.service';
import { MotionBlock } from 'app/shared/models/motions/motion-block'; import { MotionBlock } from 'app/shared/models/motions/motion-block';
import { infoDialogSettings } from 'app/shared/utils/dialog-settings';
import { ViewItem } from 'app/site/agenda/models/view-item'; import { ViewItem } from 'app/site/agenda/models/view-item';
import { BaseListViewComponent } from 'app/site/base/base-list-view'; import { BaseListViewComponent } from 'app/site/base/base-list-view';
import { ViewMotionBlock } from 'app/site/motions/models/view-motion-block'; import { ViewMotionBlock } from 'app/site/motions/models/view-motion-block';
import { MotionBlockSortService } from 'app/site/motions/services/motion-block-sort.service'; import { MotionBlockSortService } from 'app/site/motions/services/motion-block-sort.service';
import { infoDialogSettings } from 'app/shared/utils/dialog-settings';
/** /**
* Table for the motion blocks * Table for the motion blocks
@ -147,11 +147,11 @@ export class MotionBlockListComponent extends BaseListViewComponent<ViewMotionBl
public onPlusButton(): void { public onPlusButton(): void {
this.resetForm(); this.resetForm();
const dialogRef = this.dialog.open(this.newMotionBlockDialog, infoDialogSettings); const dialogRef = this.dialog.open(this.newMotionBlockDialog, infoDialogSettings);
dialogRef.afterClosed().subscribe((res) => { dialogRef.afterClosed().subscribe(res => {
if (res) { if (res) {
this.save(); this.save();
} }
}) });
} }
/** /**
@ -163,13 +163,8 @@ export class MotionBlockListComponent extends BaseListViewComponent<ViewMotionBl
if (!block.agenda_parent_id) { if (!block.agenda_parent_id) {
delete block.agenda_parent_id; delete block.agenda_parent_id;
} }
this.repo.create(block).catch(this.raiseError);
try {
this.repo.create(block);
this.resetForm(); this.resetForm();
} catch (e) {
this.raiseError(e);
}
} }
} }

View File

@ -79,7 +79,8 @@
<!-- Template for motion comment dialog --> <!-- Template for motion comment dialog -->
<ng-template #motionCommentDialog> <ng-template #motionCommentDialog>
<h1 mat-dialog-title> <h1 mat-dialog-title>
<span>{{ (currentComment ? "Edit comment field" : "New comment field") | translate }}</span> <span *ngIf="currentComment" translate>Edit comment field</span>
<span *ngIf="!currentComment" translate>New comment field</span>
</h1> </h1>
<div class="os-form-card-mobile" mat-dialog-content> <div class="os-form-card-mobile" mat-dialog-content>
<form [formGroup]="commentFieldForm" (keydown)="onKeyDown($event)"> <form [formGroup]="commentFieldForm" (keydown)="onKeyDown($event)">

View File

@ -11,10 +11,10 @@ import { MotionCommentSectionRepositoryService } from 'app/core/repositories/mot
import { GroupRepositoryService } from 'app/core/repositories/users/group-repository.service'; import { GroupRepositoryService } from 'app/core/repositories/users/group-repository.service';
import { PromptService } from 'app/core/ui-services/prompt.service'; import { PromptService } from 'app/core/ui-services/prompt.service';
import { MotionCommentSection } from 'app/shared/models/motions/motion-comment-section'; import { MotionCommentSection } from 'app/shared/models/motions/motion-comment-section';
import { infoDialogSettings } from 'app/shared/utils/dialog-settings';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponent } from 'app/site/base/base-view';
import { ViewMotionCommentSection } from 'app/site/motions/models/view-motion-comment-section'; import { ViewMotionCommentSection } from 'app/site/motions/models/view-motion-comment-section';
import { ViewGroup } from 'app/site/users/models/view-group'; import { ViewGroup } from 'app/site/users/models/view-group';
import { infoDialogSettings } from 'app/shared/utils/dialog-settings';
/** /**
* List view for the comment sections. * List view for the comment sections.
@ -110,7 +110,7 @@ export class MotionCommentSectionListComponent extends BaseViewComponent impleme
write_groups_id: commentSection ? commentSection.write_groups_id : [] write_groups_id: commentSection ? commentSection.write_groups_id : []
}); });
const dialogRef = this.dialog.open(this.motionCommentDialog, infoDialogSettings); const dialogRef = this.dialog.open(this.motionCommentDialog, infoDialogSettings);
dialogRef.afterClosed().subscribe((res) => { dialogRef.afterClosed().subscribe(res => {
if (res) { if (res) {
this.save(); this.save();
} }
@ -124,10 +124,12 @@ export class MotionCommentSectionListComponent extends BaseViewComponent impleme
if (this.commentFieldForm.valid) { if (this.commentFieldForm.valid) {
// eiher update or create // eiher update or create
if (this.currentComment) { if (this.currentComment) {
this.repo.update(this.commentFieldForm.value as Partial<MotionCommentSection>, this.currentComment).catch(this.raiseError); this.repo
.update(this.commentFieldForm.value as Partial<MotionCommentSection>, this.currentComment)
.catch(this.raiseError);
} else { } else {
const c = new MotionCommentSection(this.commentFieldForm.value); const comment = new MotionCommentSection(this.commentFieldForm.value);
this.repo.create(c).catch(this.raiseError); this.repo.create(comment).catch(this.raiseError);
} }
this.commentFieldForm.reset(); this.commentFieldForm.reset();
} }

View File

@ -64,7 +64,8 @@
<!-- Template for statute paragraph dialog --> <!-- Template for statute paragraph dialog -->
<ng-template #statuteParagraphDialog> <ng-template #statuteParagraphDialog>
<h1 mat-dialog-title> <h1 mat-dialog-title>
<span>{{ ((currentStatuteParagraph ? "Edit" : "New") + "statute paragraph") | translate }}</span> <span *ngIf="currentStatuteParagraph" translate>Edit statute paragraph</span>
<span *ngIf="!currentStatuteParagraph" translate>New statute paragraph</span>
</h1> </h1>
<div class="os-form-card-mobile" mat-dialog-content> <div class="os-form-card-mobile" mat-dialog-content>
<form [formGroup]="statuteParagraphForm" (keydown)="onKeyDown($event)"> <form [formGroup]="statuteParagraphForm" (keydown)="onKeyDown($event)">

View File

@ -9,10 +9,10 @@ import { TranslateService } from '@ngx-translate/core';
import { StatuteParagraphRepositoryService } from 'app/core/repositories/motions/statute-paragraph-repository.service'; import { StatuteParagraphRepositoryService } from 'app/core/repositories/motions/statute-paragraph-repository.service';
import { PromptService } from 'app/core/ui-services/prompt.service'; import { PromptService } from 'app/core/ui-services/prompt.service';
import { StatuteParagraph } from 'app/shared/models/motions/statute-paragraph'; import { StatuteParagraph } from 'app/shared/models/motions/statute-paragraph';
import { largeDialogSettings } from 'app/shared/utils/dialog-settings';
import { BaseViewComponent } from 'app/site/base/base-view'; import { BaseViewComponent } from 'app/site/base/base-view';
import { ViewStatuteParagraph } from 'app/site/motions/models/view-statute-paragraph'; import { ViewStatuteParagraph } from 'app/site/motions/models/view-statute-paragraph';
import { StatuteCsvExportService } from 'app/site/motions/services/statute-csv-export.service'; import { StatuteCsvExportService } from 'app/site/motions/services/statute-csv-export.service';
import { largeDialogSettings } from 'app/shared/utils/dialog-settings';
/** /**
* List view for the statute paragraphs. * List view for the statute paragraphs.
@ -95,7 +95,7 @@ export class StatuteParagraphListComponent extends BaseViewComponent implements
}); });
} }
const dialogRef = this.dialog.open(this.statuteParagraphDialog, largeDialogSettings); const dialogRef = this.dialog.open(this.statuteParagraphDialog, largeDialogSettings);
dialogRef.afterClosed().subscribe((res) => { dialogRef.afterClosed().subscribe(res => {
if (res) { if (res) {
this.save(); this.save();
} }
@ -109,10 +109,12 @@ export class StatuteParagraphListComponent extends BaseViewComponent implements
if (this.statuteParagraphForm.valid) { if (this.statuteParagraphForm.valid) {
// eiher update or create // eiher update or create
if (this.currentStatuteParagraph) { if (this.currentStatuteParagraph) {
this.repo.update(this.statuteParagraphForm.value as Partial<StatuteParagraph>, this.currentStatuteParagraph).catch(this.raiseError); this.repo
.update(this.statuteParagraphForm.value as Partial<StatuteParagraph>, this.currentStatuteParagraph)
.catch(this.raiseError);
} else { } else {
const p = new StatuteParagraph(this.statuteParagraphForm.value); const paragraph = new StatuteParagraph(this.statuteParagraphForm.value);
this.repo.create(p).catch(this.raiseError); this.repo.create(paragraph).catch(this.raiseError);
} }
this.statuteParagraphForm.reset(); this.statuteParagraphForm.reset();
} }

View File

@ -37,7 +37,8 @@
<!-- Template for dialog for quick editing --> <!-- Template for dialog for quick editing -->
<ng-template #tagDialog> <ng-template #tagDialog>
<h1 mat-dialog-title> <h1 mat-dialog-title>
<span>{{ (currentTag ? 'Edit tag' : 'New tag') | translate }}</span> <span *ngIf="currentTag" translate>Edit tag</span>
<span *ngIf="!currentTag" translate>New tag</span>
</h1> </h1>
<div class="os-form-card-mobile" mat-dialog-content> <div class="os-form-card-mobile" mat-dialog-content>
<form [formGroup]="tagForm" (keydown)="onKeyDown($event)"> <form [formGroup]="tagForm" (keydown)="onKeyDown($event)">

View File

@ -10,9 +10,9 @@ import { PblColumnDefinition } from '@pebula/ngrid';
import { TagRepositoryService } from 'app/core/repositories/tags/tag-repository.service'; import { TagRepositoryService } from 'app/core/repositories/tags/tag-repository.service';
import { PromptService } from 'app/core/ui-services/prompt.service'; import { PromptService } from 'app/core/ui-services/prompt.service';
import { Tag } from 'app/shared/models/core/tag'; import { Tag } from 'app/shared/models/core/tag';
import { infoDialogSettings } from 'app/shared/utils/dialog-settings';
import { BaseListViewComponent } from 'app/site/base/base-list-view'; import { BaseListViewComponent } from 'app/site/base/base-list-view';
import { ViewTag } from '../../models/view-tag'; import { ViewTag } from '../../models/view-tag';
import { infoDialogSettings } from 'app/shared/utils/dialog-settings';
/** /**
* Listview for the complete list of available Tags * Listview for the complete list of available Tags
@ -94,11 +94,11 @@ export class TagListComponent extends BaseListViewComponent<ViewTag> implements
this.tagForm.reset(); this.tagForm.reset();
this.tagForm.get('name').setValue(this.currentTag ? this.currentTag.name : ''); this.tagForm.get('name').setValue(this.currentTag ? this.currentTag.name : '');
const dialogRef = this.dialog.open(this.tagDialog, infoDialogSettings); const dialogRef = this.dialog.open(this.tagDialog, infoDialogSettings);
dialogRef.afterClosed().subscribe((res) => { dialogRef.afterClosed().subscribe(res => {
if (res) { if (res) {
this.save(); this.save();
} }
}) });
} }
/** /**

View File

@ -174,9 +174,6 @@ msgstr ""
msgid "Amendments can change multiple paragraphs" msgid "Amendments can change multiple paragraphs"
msgstr "" msgstr ""
msgid "An email with a password reset link was send!"
msgstr ""
msgid "An unknown error occurred." msgid "An unknown error occurred."
msgstr "" msgstr ""
@ -252,6 +249,11 @@ msgstr ""
msgid "Are you sure you want to delete this workflow?" msgid "Are you sure you want to delete this workflow?"
msgstr "" msgstr ""
msgid ""
"Are you sure you want to generate new passwords for all selected "
"participants?"
msgstr ""
msgid "Are you sure you want to number all agenda items?" msgid "Are you sure you want to number all agenda items?"
msgstr "" msgstr ""
@ -272,6 +274,9 @@ msgstr ""
msgid "Are you sure you want to renumber all motions of this category?" msgid "Are you sure you want to renumber all motions of this category?"
msgstr "" msgstr ""
msgid "Are you sure you want to reset all passwords to the default ones?"
msgstr ""
msgid "Are you sure you want to send an invitation email to the user?" msgid "Are you sure you want to send an invitation email to the user?"
msgstr "" msgstr ""
@ -737,18 +742,12 @@ msgstr ""
msgid "Edit" msgid "Edit"
msgstr "" msgstr ""
msgid "Edit comment field:"
msgstr ""
msgid "Edit details" msgid "Edit details"
msgstr "" msgstr ""
msgid "Edit details for" msgid "Edit details for"
msgstr "" msgstr ""
msgid "Edit statute paragraph:"
msgstr ""
msgid "Edit the whole motion text" msgid "Edit the whole motion text"
msgstr "" msgstr ""
@ -927,6 +926,9 @@ msgid ""
"candidate the sum of all votes is 100 %." "candidate the sum of all votes is 100 %."
msgstr "" msgstr ""
msgid "Foreground color"
msgstr ""
msgid "Forgot Password?" msgid "Forgot Password?"
msgstr "" msgstr ""
@ -1043,6 +1045,9 @@ msgstr ""
msgid "Import topics" msgid "Import topics"
msgstr "" msgstr ""
msgid "Inactive"
msgstr ""
msgid "Initial password" msgid "Initial password"
msgstr "" msgstr ""
@ -1301,9 +1306,6 @@ msgstr ""
msgid "New change recommendation" msgid "New change recommendation"
msgstr "" msgstr ""
msgid "New comment field"
msgstr ""
msgid "New directory" msgid "New directory"
msgstr "" msgstr ""
@ -1331,12 +1333,6 @@ msgstr ""
msgid "New state" msgid "New state"
msgstr "" msgstr ""
msgid "New statute paragraph"
msgstr ""
msgid "New tag name"
msgstr ""
msgid "New topic" msgid "New topic"
msgstr "" msgstr ""
@ -1421,6 +1417,12 @@ msgstr ""
msgid "None" msgid "None"
msgstr "" msgstr ""
msgid "Noone"
msgstr ""
msgid "Note, that the default password will be changed to the new generated one."
msgstr ""
msgid "" msgid ""
"Note: Your own password was not changed. Please use the password change " "Note: Your own password was not changed. Please use the password change "
"dialog instead." "dialog instead."
@ -1823,6 +1825,9 @@ msgstr ""
msgid "Reset password" msgid "Reset password"
msgstr "" msgstr ""
msgid "Reset passwords to the default ones"
msgstr ""
msgid "Reset recommendation" msgid "Reset recommendation"
msgstr "" msgstr ""
@ -1910,9 +1915,6 @@ msgstr ""
msgid "Serially numbered" msgid "Serially numbered"
msgstr "" msgstr ""
msgid "Set active status for selected participants:"
msgstr ""
msgid "Set as favorite" msgid "Set as favorite"
msgstr "" msgstr ""
@ -1928,9 +1930,6 @@ msgstr ""
msgid "Set committee ..." msgid "Set committee ..."
msgstr "" msgstr ""
msgid "Set committee status for selected participants:"
msgstr ""
msgid "Set favorite" msgid "Set favorite"
msgstr "" msgstr ""
@ -1952,9 +1951,6 @@ msgstr ""
msgid "Set presence ..." msgid "Set presence ..."
msgstr "" msgstr ""
msgid "Set presence status for selected participants:"
msgstr ""
msgid "Set public" msgid "Set public"
msgstr "" msgstr ""
@ -2042,6 +2038,9 @@ msgstr ""
msgid "Sort" msgid "Sort"
msgstr "" msgstr ""
msgid "Sort Comments"
msgstr ""
msgid "Sort agenda" msgid "Sort agenda"
msgstr "" msgstr ""
@ -2108,6 +2107,9 @@ msgstr ""
msgid "Structure level" msgid "Structure level"
msgstr "" msgstr ""
msgid "Subcategory"
msgstr ""
msgid "Submitters" msgid "Submitters"
msgstr "" msgstr ""
@ -2162,6 +2164,9 @@ msgstr ""
msgid "The assembly may decide:" msgid "The assembly may decide:"
msgstr "" msgstr ""
msgid "The event manager hasn't set up a legal notice yet."
msgstr ""
msgid "The event manager hasn't set up a privacy policy yet." msgid "The event manager hasn't set up a privacy policy yet."
msgstr "" msgstr ""
@ -2177,11 +2182,17 @@ msgstr ""
msgid "The link is broken. Please contact your system administrator." msgid "The link is broken. Please contact your system administrator."
msgstr "" msgstr ""
msgid "The list of speakers is closed"
msgstr ""
msgid "" msgid ""
"The maximum number of characters per line. Relevant when line numbering is " "The maximum number of characters per line. Relevant when line numbering is "
"enabled. Min: 40" "enabled. Min: 40"
msgstr "" msgstr ""
msgid "The number has to be greater than \"0\" "
msgstr ""
msgid "The reason field may not be blank." msgid "The reason field may not be blank."
msgstr "" msgstr ""
@ -2204,6 +2215,9 @@ msgstr ""
msgid "The text field may not be blank." msgid "The text field may not be blank."
msgstr "" msgstr ""
msgid "The title is required"
msgstr ""
msgid "The title of the motion is always applied." msgid "The title of the motion is always applied."
msgstr "" msgstr ""
@ -2222,6 +2236,9 @@ msgstr ""
msgid "This element does not exist at this time." msgid "This element does not exist at this time."
msgstr "" msgstr ""
msgid "This field is required"
msgstr ""
msgid "This field is required." msgid "This field is required."
msgstr "" msgstr ""
@ -2408,6 +2425,9 @@ msgstr ""
msgid "Web interface header logo" msgid "Web interface header logo"
msgstr "" msgstr ""
msgid "Web workers are not supported on your browser."
msgstr ""
msgid "Welcome to OpenSlides" msgid "Welcome to OpenSlides"
msgstr "" msgstr ""
@ -2693,3 +2713,6 @@ msgstr ""
msgid "withdrawed" msgid "withdrawed"
msgstr "" msgstr ""
msgid "{{ option.label }}"
msgstr ""

View File

@ -186,7 +186,6 @@ class ProjectorViewSet(ModelViewSet):
If `reset_scroll` is True, the scoll of the projector will reset. If `reset_scroll` is True, the scoll of the projector will reset.
""" """
projector = self.get_object() projector = self.get_object()
projector.scroll = 0
elements = request.data.get("elements") elements = request.data.get("elements")
preview = request.data.get("preview") preview = request.data.get("preview")
history_element = request.data.get("append_to_history") history_element = request.data.get("append_to_history")