IssueNotesRefactor: Show Cmd+Enter to comment tooltip.
This commit is contained in:
parent
adc73379f3
commit
48acfb5c05
|
@ -237,7 +237,7 @@ class AwardsHandler {
|
|||
addAward(votesBlock, awardUrl, emoji, checkMutuality, callback) {
|
||||
const isMainAwardsBlock = votesBlock.closest('.js-issue-note-awards').length;
|
||||
|
||||
if (this.isInIssuePage() && !isMainAwardsBlock) {
|
||||
if (gl.utils.isInIssuePage() && !isMainAwardsBlock) {
|
||||
const id = votesBlock.attr('id').replace('note_', '');
|
||||
|
||||
$('.emoji-menu').removeClass('is-visible');
|
||||
|
@ -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() {
|
||||
if (this.isInIssuePage()) {
|
||||
if (gl.utils.isInIssuePage()) {
|
||||
const $el = $('.js-add-award.is-active').closest('.note.timeline-entry');
|
||||
|
||||
if ($el.length) {
|
||||
|
|
|
@ -44,7 +44,10 @@ $(document).on('keydown.quick_submit', '.js-quick-submit', (e) => {
|
|||
|
||||
if (!$submitButton.attr('disabled')) {
|
||||
$submitButton.trigger('click', [e]);
|
||||
$submitButton.disable();
|
||||
|
||||
if (!gl.utils.isInIssuePage) {
|
||||
$submitButton.disable();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -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) {
|
||||
return $.ajax({
|
||||
type: "GET",
|
||||
|
|
|
@ -258,10 +258,10 @@
|
|||
<div class="note-form-actions">
|
||||
<div class="pull-left btn-group append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown">
|
||||
<button
|
||||
@click="handleSave()"
|
||||
@click.prevent="handleSave()"
|
||||
:disabled="isSubmitButtonDisabled"
|
||||
class="btn btn-create comment-btn js-comment-button js-comment-submit-button"
|
||||
type="button">
|
||||
type="submit">
|
||||
{{commentButtonTitle}}
|
||||
</button>
|
||||
<button
|
||||
|
|
Loading…
Reference in New Issue