Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
25133a37
Commit
25133a37
authored
Mar 04, 2019
by
Winnie Hellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove autosave logic from NoteableDiscussion component
parent
53e23a29
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
17 deletions
+4
-17
app/assets/javascripts/notes/components/noteable_discussion.vue
...sets/javascripts/notes/components/noteable_discussion.vue
+4
-17
No files found.
app/assets/javascripts/notes/components/noteable_discussion.vue
View file @
25133a37
...
@@ -4,7 +4,7 @@ import { mapActions, mapGetters } from 'vuex';
...
@@ -4,7 +4,7 @@ import { mapActions, mapGetters } from 'vuex';
import
{
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
{
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
{
truncateSha
}
from
'
~/lib/utils/text_utility
'
;
import
{
truncateSha
}
from
'
~/lib/utils/text_utility
'
;
import
{
s__
,
__
,
sprintf
}
from
'
~/locale
'
;
import
{
s__
,
__
,
sprintf
}
from
'
~/locale
'
;
import
{
getDiscussionReplyKey
}
from
'
~/lib/utils/autosave
'
;
import
{
clearDraft
,
getDiscussionReplyKey
}
from
'
~/lib/utils/autosave
'
;
import
systemNote
from
'
~/vue_shared/components/notes/system_note.vue
'
;
import
systemNote
from
'
~/vue_shared/components/notes/system_note.vue
'
;
import
icon
from
'
~/vue_shared/components/icon.vue
'
;
import
icon
from
'
~/vue_shared/components/icon.vue
'
;
import
diffLineNoteFormMixin
from
'
ee_else_ce/notes/mixins/diff_line_note_form
'
;
import
diffLineNoteFormMixin
from
'
ee_else_ce/notes/mixins/diff_line_note_form
'
;
...
@@ -22,7 +22,6 @@ import noteForm from './note_form.vue';
...
@@ -22,7 +22,6 @@ import noteForm from './note_form.vue';
import
diffWithNote
from
'
./diff_with_note.vue
'
;
import
diffWithNote
from
'
./diff_with_note.vue
'
;
import
placeholderNote
from
'
../../vue_shared/components/notes/placeholder_note.vue
'
;
import
placeholderNote
from
'
../../vue_shared/components/notes/placeholder_note.vue
'
;
import
placeholderSystemNote
from
'
../../vue_shared/components/notes/placeholder_system_note.vue
'
;
import
placeholderSystemNote
from
'
../../vue_shared/components/notes/placeholder_system_note.vue
'
;
import
autosave
from
'
../mixins/autosave
'
;
import
noteable
from
'
../mixins/noteable
'
;
import
noteable
from
'
../mixins/noteable
'
;
import
resolvable
from
'
../mixins/resolvable
'
;
import
resolvable
from
'
../mixins/resolvable
'
;
import
discussionNavigation
from
'
../mixins/discussion_navigation
'
;
import
discussionNavigation
from
'
../mixins/discussion_navigation
'
;
...
@@ -55,7 +54,7 @@ export default {
...
@@ -55,7 +54,7 @@ export default {
directives
:
{
directives
:
{
GlTooltip
:
GlTooltipDirective
,
GlTooltip
:
GlTooltipDirective
,
},
},
mixins
:
[
autosave
,
noteable
,
resolvable
,
discussionNavigation
,
diffLineNoteFormMixin
],
mixins
:
[
noteable
,
resolvable
,
discussionNavigation
,
diffLineNoteFormMixin
],
props
:
{
props
:
{
discussion
:
{
discussion
:
{
type
:
Object
,
type
:
Object
,
...
@@ -246,18 +245,6 @@ export default {
...
@@ -246,18 +245,6 @@ export default {
return
!
this
.
discussionResolved
&&
this
.
discussion
.
resolve_with_issue_path
;
return
!
this
.
discussionResolved
&&
this
.
discussion
.
resolve_with_issue_path
;
},
},
},
},
watch
:
{
isReplying
()
{
if
(
this
.
isReplying
)
{
this
.
$nextTick
(()
=>
{
// Pass an extra key to separate reply and note edit forms
this
.
initAutoSave
({
...
this
.
firstNote
,
...
this
.
discussion
},
[
'
Reply
'
]);
});
}
else
{
this
.
disposeAutoSave
();
}
},
},
created
()
{
created
()
{
eventHub
.
$on
(
'
startReplying
'
,
this
.
onStartReplying
);
eventHub
.
$on
(
'
startReplying
'
,
this
.
onStartReplying
);
},
},
...
@@ -316,7 +303,7 @@ export default {
...
@@ -316,7 +303,7 @@ export default {
}
}
this
.
isReplying
=
false
;
this
.
isReplying
=
false
;
this
.
resetAutoSave
(
);
clearDraft
(
this
.
autosaveKey
);
},
},
saveReply
(
noteText
,
form
,
callback
)
{
saveReply
(
noteText
,
form
,
callback
)
{
const
postData
=
{
const
postData
=
{
...
@@ -342,7 +329,7 @@ export default {
...
@@ -342,7 +329,7 @@ export default {
this
.
isReplying
=
false
;
this
.
isReplying
=
false
;
this
.
saveNote
(
replyData
)
this
.
saveNote
(
replyData
)
.
then
(()
=>
{
.
then
(()
=>
{
this
.
resetAutoSave
(
);
clearDraft
(
this
.
autosaveKey
);
callback
();
callback
();
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment