Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
da122992
Verified
Commit
da122992
authored
5 years ago
by
Alex ORLUC
Browse files
Options
Downloads
Patches
Plain Diff
add disable add note when note adding
parent
2d040900
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/frontend/app/notes/note-editor.component.html
+1
-1
1 addition, 1 deletion
src/frontend/app/notes/note-editor.component.html
src/frontend/app/notes/note-editor.component.ts
+3
-1
3 additions, 1 deletion
src/frontend/app/notes/note-editor.component.ts
with
4 additions
and
2 deletions
src/frontend/app/notes/note-editor.component.html
+
1
−
1
View file @
da122992
<mat-form-field
appearance=
"outline"
class=
"noteEditorContent"
>
<mat-form-field
appearance=
"outline"
class=
"noteEditorContent"
>
<textarea
matInput
placeholder=
"{{lang.addNote}}"
[(ngModel)]=
"content"
></textarea>
<textarea
matInput
placeholder=
"{{lang.addNote}}"
[(ngModel)]=
"content"
></textarea>
<button
*ngIf=
"addMode"
matSuffix
mat-icon-button
title=
"{{lang.send}}"
(click)=
"addNote()"
<button
*ngIf=
"addMode"
matSuffix
mat-icon-button
title=
"{{lang.send}}"
(click)=
"addNote()"
[disabled]=
"content.trim() == ''"
>
[disabled]=
"content.trim() == ''
|| loading
"
>
<mat-icon
fontSet=
"far"
fontIcon=
"fa-paper-plane fa-2x"
style=
"color: #666;"
></mat-icon>
<mat-icon
fontSet=
"far"
fontIcon=
"fa-paper-plane fa-2x"
style=
"color: #666;"
></mat-icon>
</button>
</button>
<button
matSuffix
color=
"primary"
mat-icon-button
title=
"{{lang.noteTemplates}}"
[matMenuTriggerFor]=
"menu"
<button
matSuffix
color=
"primary"
mat-icon-button
title=
"{{lang.noteTemplates}}"
[matMenuTriggerFor]=
"menu"
...
...
This diff is collapsed.
Click to expand it.
src/frontend/app/notes/note-editor.component.ts
+
3
−
1
View file @
da122992
...
@@ -13,7 +13,7 @@ export class NoteEditorComponent implements AfterViewInit {
...
@@ -13,7 +13,7 @@ export class NoteEditorComponent implements AfterViewInit {
lang
:
any
=
LANG
;
lang
:
any
=
LANG
;
notes
:
any
;
notes
:
any
;
loading
:
boolean
=
tru
e
;
loading
:
boolean
=
fals
e
;
templatesNote
:
any
=
[];
templatesNote
:
any
=
[];
content
:
string
=
''
;
content
:
string
=
''
;
...
@@ -29,9 +29,11 @@ export class NoteEditorComponent implements AfterViewInit {
...
@@ -29,9 +29,11 @@ export class NoteEditorComponent implements AfterViewInit {
}
}
addNote
()
{
addNote
()
{
this
.
loading
=
true
this
.
http
.
post
(
"
../../rest/res/
"
+
this
.
resIds
[
0
]
+
"
/notes
"
,
{
note_text
:
this
.
content
})
this
.
http
.
post
(
"
../../rest/res/
"
+
this
.
resIds
[
0
]
+
"
/notes
"
,
{
note_text
:
this
.
content
})
.
subscribe
((
data
:
any
)
=>
{
.
subscribe
((
data
:
any
)
=>
{
this
.
refreshNotes
.
emit
(
this
.
resIds
[
0
]);
this
.
refreshNotes
.
emit
(
this
.
resIds
[
0
]);
this
.
loading
=
false
;
});
});
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment