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
7bf5481f
Commit
7bf5481f
authored
May 07, 2020
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch 'ss-simon/rm-data-from-mount' into 'master'"
This reverts merge request !31143
parent
724d63e8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
38 deletions
+43
-38
app/assets/javascripts/mr_notes/init_notes.js
app/assets/javascripts/mr_notes/init_notes.js
+17
-14
app/assets/javascripts/notes/index.js
app/assets/javascripts/notes/index.js
+26
-24
No files found.
app/assets/javascripts/mr_notes/init_notes.js
View file @
7bf5481f
...
@@ -15,6 +15,19 @@ export default () => {
...
@@ -15,6 +15,19 @@ export default () => {
notesApp
,
notesApp
,
},
},
store
,
store
,
data
()
{
const
notesDataset
=
document
.
getElementById
(
'
js-vue-mr-discussions
'
).
dataset
;
const
noteableData
=
JSON
.
parse
(
notesDataset
.
noteableData
);
noteableData
.
noteableType
=
notesDataset
.
noteableType
;
noteableData
.
targetType
=
notesDataset
.
targetType
;
return
{
noteableData
,
currentUserData
:
JSON
.
parse
(
notesDataset
.
currentUserData
),
notesData
:
JSON
.
parse
(
notesDataset
.
notesData
),
helpPagePath
:
notesDataset
.
helpPagePath
,
};
},
computed
:
{
computed
:
{
...
mapGetters
([
'
discussionTabCounter
'
]),
...
mapGetters
([
'
discussionTabCounter
'
]),
...
mapState
({
...
mapState
({
...
@@ -54,19 +67,6 @@ export default () => {
...
@@ -54,19 +67,6 @@ export default () => {
updateDiscussionTabCounter
()
{
updateDiscussionTabCounter
()
{
this
.
notesCountBadge
.
text
(
this
.
discussionTabCounter
);
this
.
notesCountBadge
.
text
(
this
.
discussionTabCounter
);
},
},
dataset
()
{
const
data
=
this
.
$el
.
dataset
;
const
noteableData
=
JSON
.
parse
(
data
.
noteableData
);
noteableData
.
noteableType
=
data
.
noteableType
;
noteableData
.
targetType
=
data
.
targetType
;
return
{
noteableData
,
notesData
:
JSON
.
parse
(
data
.
notesData
),
userData
:
JSON
.
parse
(
data
.
currentUserData
),
helpPagePath
:
data
.
helpPagePath
,
};
},
},
},
render
(
createElement
)
{
render
(
createElement
)
{
// NOTE: Even though `discussionKeyboardNavigator` is added to the `notes-app`,
// NOTE: Even though `discussionKeyboardNavigator` is added to the `notes-app`,
...
@@ -76,8 +76,11 @@ export default () => {
...
@@ -76,8 +76,11 @@ export default () => {
return
createElement
(
discussionKeyboardNavigator
,
[
return
createElement
(
discussionKeyboardNavigator
,
[
createElement
(
'
notes-app
'
,
{
createElement
(
'
notes-app
'
,
{
props
:
{
props
:
{
...
this
.
dataset
(),
noteableData
:
this
.
noteableData
,
notesData
:
this
.
notesData
,
userData
:
this
.
currentUserData
,
shouldShow
:
this
.
isShowTabActive
,
shouldShow
:
this
.
isShowTabActive
,
helpPagePath
:
this
.
helpPagePath
,
},
},
}),
}),
]);
]);
...
...
app/assets/javascripts/notes/index.js
View file @
7bf5481f
...
@@ -14,9 +14,8 @@ document.addEventListener('DOMContentLoaded', () => {
...
@@ -14,9 +14,8 @@ document.addEventListener('DOMContentLoaded', () => {
notesApp
,
notesApp
,
},
},
store
,
store
,
methods
:
{
data
()
{
setData
()
{
const
notesDataset
=
document
.
getElementById
(
'
js-vue-notes
'
).
dataset
;
const
notesDataset
=
this
.
$el
.
dataset
;
const
parsedUserData
=
JSON
.
parse
(
notesDataset
.
currentUserData
);
const
parsedUserData
=
JSON
.
parse
(
notesDataset
.
currentUserData
);
const
noteableData
=
JSON
.
parse
(
notesDataset
.
noteableData
);
const
noteableData
=
JSON
.
parse
(
notesDataset
.
noteableData
);
let
currentUserData
=
{};
let
currentUserData
=
{};
...
@@ -36,14 +35,17 @@ document.addEventListener('DOMContentLoaded', () => {
...
@@ -36,14 +35,17 @@ document.addEventListener('DOMContentLoaded', () => {
return
{
return
{
noteableData
,
noteableData
,
userData
:
currentUserData
,
currentUserData
,
notesData
:
JSON
.
parse
(
notesDataset
.
notesData
),
notesData
:
JSON
.
parse
(
notesDataset
.
notesData
),
};
};
},
},
},
render
(
createElement
)
{
render
(
createElement
)
{
return
createElement
(
'
notes-app
'
,
{
return
createElement
(
'
notes-app
'
,
{
props
:
{
...
this
.
setData
()
},
props
:
{
noteableData
:
this
.
noteableData
,
notesData
:
this
.
notesData
,
userData
:
this
.
currentUserData
,
},
});
});
},
},
});
});
...
...
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