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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
d6e724d9
Commit
d6e724d9
authored
Aug 01, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved method to compile components from window into diffnotesapp
parent
f65d8eb3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
18 deletions
+25
-18
app/assets/javascripts/diff_notes/diff_notes_bundle.js.es6
app/assets/javascripts/diff_notes/diff_notes_bundle.js.es6
+10
-9
app/assets/javascripts/merge_request_tabs.js
app/assets/javascripts/merge_request_tabs.js
+2
-2
app/assets/javascripts/notes.js
app/assets/javascripts/notes.js
+4
-4
app/assets/javascripts/single_file_diff.js
app/assets/javascripts/single_file_diff.js
+9
-3
No files found.
app/assets/javascripts/diff_notes/diff_notes_bundle.js.es6
View file @
d6e724d9
...
@@ -13,6 +13,16 @@ $(() => {
...
@@ -13,6 +13,16 @@ $(() => {
'resolve-btn': ResolveBtn,
'resolve-btn': ResolveBtn,
'resolve-discussion-btn': ResolveDiscussionBtn,
'resolve-discussion-btn': ResolveDiscussionBtn,
'comment-and-resolve-btn': CommentAndResolveBtn
'comment-and-resolve-btn': CommentAndResolveBtn
},
methods: {
compileComponents: function () {
const $components = $('resolve-btn, resolve-discussion-btn, jump-to-discussion');
if ($components.length) {
$components.each(function () {
DiffNotesApp.$compile($(this).get(0));
});
}
}
}
}
});
});
...
@@ -22,13 +32,4 @@ $(() => {
...
@@ -22,13 +32,4 @@ $(() => {
'resolve-count': ResolveCount
'resolve-count': ResolveCount
}
}
});
});
window.compileVueComponentsForDiffNotes = function () {
const $components = $('resolve-btn, resolve-discussion-btn, jump-to-discussion');
if ($components.length) {
$components.each(function () {
DiffNotesApp.$compile($(this).get(0));
});
}
}
});
});
app/assets/javascripts/merge_request_tabs.js
View file @
d6e724d9
...
@@ -120,8 +120,8 @@
...
@@ -120,8 +120,8 @@
return
function
(
data
)
{
return
function
(
data
)
{
$
(
'
#diffs
'
).
html
(
data
.
html
);
$
(
'
#diffs
'
).
html
(
data
.
html
);
if
(
compileVueComponentsForDiffNotes
)
{
if
(
DiffNotesApp
)
{
compileVueComponentsForDiffNote
s
();
DiffNotesApp
.
compileComponent
s
();
}
}
gl
.
utils
.
localTimeAgo
(
$
(
'
.js-timeago
'
,
'
div#diffs
'
));
gl
.
utils
.
localTimeAgo
(
$
(
'
.js-timeago
'
,
'
div#diffs
'
));
...
...
app/assets/javascripts/notes.js
View file @
d6e724d9
...
@@ -300,8 +300,8 @@
...
@@ -300,8 +300,8 @@
discussionContainer
.
append
(
note_html
);
discussionContainer
.
append
(
note_html
);
}
}
if
(
compileVueComponentsForDiffNotes
)
{
if
(
DiffNotesApp
)
{
compileVueComponentsForDiffNote
s
();
DiffNotesApp
.
compileComponent
s
();
}
}
gl
.
utils
.
localTimeAgo
(
$
(
'
.js-timeago
'
,
note_html
),
false
);
gl
.
utils
.
localTimeAgo
(
$
(
'
.js-timeago
'
,
note_html
),
false
);
...
@@ -429,8 +429,8 @@
...
@@ -429,8 +429,8 @@
$note_li
.
replaceWith
(
$html
);
$note_li
.
replaceWith
(
$html
);
if
(
compileVueComponentsForDiffNotes
)
{
if
(
DiffNotesApp
)
{
compileVueComponentsForDiffNote
s
();
DiffNotesApp
.
compileComponent
s
();
}
}
};
};
...
...
app/assets/javascripts/single_file_diff.js
View file @
d6e724d9
...
@@ -36,11 +36,15 @@
...
@@ -36,11 +36,15 @@
if
(
!
this
.
isOpen
&&
!
this
.
hasError
)
{
if
(
!
this
.
isOpen
&&
!
this
.
hasError
)
{
this
.
content
.
hide
();
this
.
content
.
hide
();
this
.
collapsedContent
.
show
();
this
.
collapsedContent
.
show
();
compileVueComponentsForDiffNotes
();
if
(
DiffNotesApp
)
{
DiffNotesApp
.
compileComponents
();
}
}
else
if
(
this
.
content
)
{
}
else
if
(
this
.
content
)
{
this
.
collapsedContent
.
hide
();
this
.
collapsedContent
.
hide
();
this
.
content
.
show
();
this
.
content
.
show
();
compileVueComponentsForDiffNotes
();
if
(
DiffNotesApp
)
{
DiffNotesApp
.
compileComponents
();
}
}
else
{
}
else
{
return
this
.
getContentHTML
();
return
this
.
getContentHTML
();
}
}
...
@@ -55,7 +59,9 @@
...
@@ -55,7 +59,9 @@
if
(
data
.
html
)
{
if
(
data
.
html
)
{
_this
.
content
=
$
(
data
.
html
);
_this
.
content
=
$
(
data
.
html
);
_this
.
content
.
syntaxHighlight
();
_this
.
content
.
syntaxHighlight
();
compileVueComponentsForDiffNotes
();
if
(
DiffNotesApp
)
{
DiffNotesApp
.
compileComponents
();
}
}
else
{
}
else
{
_this
.
hasError
=
true
;
_this
.
hasError
=
true
;
_this
.
content
=
$
(
ERROR_HTML
);
_this
.
content
=
$
(
ERROR_HTML
);
...
...
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