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
Boxiang Sun
gitlab-ce
Commits
48acfb5c
Commit
48acfb5c
authored
Aug 21, 2017
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IssueNotesRefactor: Show Cmd+Enter to comment tooltip.
parent
adc73379
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
12 deletions
+15
-12
app/assets/javascripts/awards_handler.js
app/assets/javascripts/awards_handler.js
+2
-9
app/assets/javascripts/behaviors/quick_submit.js
app/assets/javascripts/behaviors/quick_submit.js
+4
-1
app/assets/javascripts/lib/utils/common_utils.js
app/assets/javascripts/lib/utils/common_utils.js
+7
-0
app/assets/javascripts/notes/components/issue_comment_form.vue
...ssets/javascripts/notes/components/issue_comment_form.vue
+2
-2
No files found.
app/assets/javascripts/awards_handler.js
View file @
48acfb5c
...
@@ -237,7 +237,7 @@ class AwardsHandler {
...
@@ -237,7 +237,7 @@ class AwardsHandler {
addAward
(
votesBlock
,
awardUrl
,
emoji
,
checkMutuality
,
callback
)
{
addAward
(
votesBlock
,
awardUrl
,
emoji
,
checkMutuality
,
callback
)
{
const
isMainAwardsBlock
=
votesBlock
.
closest
(
'
.js-issue-note-awards
'
).
length
;
const
isMainAwardsBlock
=
votesBlock
.
closest
(
'
.js-issue-note-awards
'
).
length
;
if
(
thi
s
.
isInIssuePage
()
&&
!
isMainAwardsBlock
)
{
if
(
gl
.
util
s
.
isInIssuePage
()
&&
!
isMainAwardsBlock
)
{
const
id
=
votesBlock
.
attr
(
'
id
'
).
replace
(
'
note_
'
,
''
);
const
id
=
votesBlock
.
attr
(
'
id
'
).
replace
(
'
note_
'
,
''
);
$
(
'
.emoji-menu
'
).
removeClass
(
'
is-visible
'
);
$
(
'
.emoji-menu
'
).
removeClass
(
'
is-visible
'
);
...
@@ -287,15 +287,8 @@ class AwardsHandler {
...
@@ -287,15 +287,8 @@ class AwardsHandler {
}
}
}
}
isInIssuePage
()
{
const
page
=
gl
.
utils
.
getPagePath
(
1
);
const
action
=
gl
.
utils
.
getPagePath
(
2
);
return
page
===
'
issues
'
&&
action
===
'
show
'
;
}
getVotesBlock
()
{
getVotesBlock
()
{
if
(
thi
s
.
isInIssuePage
())
{
if
(
gl
.
util
s
.
isInIssuePage
())
{
const
$el
=
$
(
'
.js-add-award.is-active
'
).
closest
(
'
.note.timeline-entry
'
);
const
$el
=
$
(
'
.js-add-award.is-active
'
).
closest
(
'
.note.timeline-entry
'
);
if
(
$el
.
length
)
{
if
(
$el
.
length
)
{
...
...
app/assets/javascripts/behaviors/quick_submit.js
View file @
48acfb5c
...
@@ -44,8 +44,11 @@ $(document).on('keydown.quick_submit', '.js-quick-submit', (e) => {
...
@@ -44,8 +44,11 @@ $(document).on('keydown.quick_submit', '.js-quick-submit', (e) => {
if
(
!
$submitButton
.
attr
(
'
disabled
'
))
{
if
(
!
$submitButton
.
attr
(
'
disabled
'
))
{
$submitButton
.
trigger
(
'
click
'
,
[
e
]);
$submitButton
.
trigger
(
'
click
'
,
[
e
]);
if
(
!
gl
.
utils
.
isInIssuePage
)
{
$submitButton
.
disable
();
$submitButton
.
disable
();
}
}
}
});
});
// If the user tabs to a submit button on a `js-quick-submit` form, display a
// If the user tabs to a submit button on a `js-quick-submit` form, display a
...
...
app/assets/javascripts/lib/utils/common_utils.js
View file @
48acfb5c
...
@@ -27,6 +27,13 @@
...
@@ -27,6 +27,13 @@
}
}
};
};
w
.
gl
.
utils
.
isInIssuePage
=
()
=>
{
const
page
=
gl
.
utils
.
getPagePath
(
1
);
const
action
=
gl
.
utils
.
getPagePath
(
2
);
return
page
===
'
issues
'
&&
action
===
'
show
'
;
}
w
.
gl
.
utils
.
ajaxGet
=
function
(
url
)
{
w
.
gl
.
utils
.
ajaxGet
=
function
(
url
)
{
return
$
.
ajax
({
return
$
.
ajax
({
type
:
"
GET
"
,
type
:
"
GET
"
,
...
...
app/assets/javascripts/notes/components/issue_comment_form.vue
View file @
48acfb5c
...
@@ -258,10 +258,10 @@
...
@@ -258,10 +258,10 @@
<div
class=
"note-form-actions"
>
<div
class=
"note-form-actions"
>
<div
class=
"pull-left btn-group append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown"
>
<div
class=
"pull-left btn-group append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown"
>
<button
<button
@
click=
"handleSave()"
@
click
.prevent
=
"handleSave()"
:disabled=
"isSubmitButtonDisabled"
:disabled=
"isSubmitButtonDisabled"
class=
"btn btn-create comment-btn js-comment-button js-comment-submit-button"
class=
"btn btn-create comment-btn js-comment-button js-comment-submit-button"
type=
"
button
"
>
type=
"
submit
"
>
{{
commentButtonTitle
}}
{{
commentButtonTitle
}}
</button>
</button>
<button
<button
...
...
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