BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
7a98970b
Commit
7a98970b
authored
Aug 01, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ci skip] Removes Vue from awards handler code
parent
335d4a53
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
6 deletions
+10
-6
awards_handler.js
app/assets/javascripts/awards_handler.js
+7
-2
dispatcher.js
app/assets/javascripts/dispatcher.js
+0
-1
issue_notes_app.vue
app/assets/javascripts/notes/components/issue_notes_app.vue
+2
-2
_discussion.html.haml
app/views/projects/issues/_discussion.html.haml
+1
-1
No files found.
app/assets/javascripts/awards_handler.js
View file @
7a98970b
...
...
@@ -2,7 +2,6 @@
/* global Flash */
import
Cookies
from
'js-cookie'
;
import
issueNotesEventHub
from
'./notes/event_hub'
;
const
animationEndEventString
=
'animationend webkitAnimationEnd MSAnimationEnd oAnimationEnd'
;
const
transitionEndEventString
=
'transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd'
;
...
...
@@ -242,8 +241,14 @@ class AwardsHandler {
$
(
'.emoji-menu'
).
removeClass
(
'is-visible'
);
$
(
'.js-add-award.is-active'
).
removeClass
(
'is-active'
);
const
toggleAwardEvent
=
new
CustomEvent
(
'toggleAward'
,
{
detail
:
{
awardName
:
emoji
,
noteId
:
id
,
},
});
return
issueNotesEventHub
.
$emit
(
'toggleAward'
,
{
awardName
:
emoji
,
noteId
:
id
}
);
document
.
querySelector
(
'.js-vue-notes-event'
).
dispatchEvent
(
toggleAwardEvent
);
}
const
normalizedEmoji
=
this
.
emoji
.
normalizeEmojiName
(
emoji
);
...
...
app/assets/javascripts/dispatcher.js
View file @
7a98970b
...
...
@@ -170,7 +170,6 @@ import GpgBadges from './gpg_badges';
shortcut_handler
=
new
ShortcutsIssuable
();
new
ZenMode
();
initIssuableSidebar
();
initNotes
();
break
;
case
'dashboard:milestones:index'
:
new
ProjectSelect
();
...
...
app/assets/javascripts/notes/components/issue_notes_app.vue
View file @
7a98970b
...
...
@@ -110,8 +110,8 @@
},
15000
);
},
bindEventHubListeners
()
{
eventHub
.
$on
(
'toggleAward'
,
(
data
)
=>
{
const
{
awardName
,
noteId
}
=
data
;
this
.
$el
.
parentElement
.
addEventListener
(
'toggleAward'
,
(
event
)
=>
{
const
{
awardName
,
noteId
}
=
event
.
detail
;
const
endpoint
=
this
.
notesById
[
noteId
].
toggle_award_path
;
this
.
actionToggleAward
({
endpoint
,
awardName
,
noteId
})
...
...
app/views/projects/issues/_discussion.html.haml
View file @
7a98970b
...
...
@@ -3,7 +3,7 @@
=
link_to
'Reopen issue'
,
issue_path
(
@issue
,
issue:
{
state_event: :reopen
},
format:
'json'
),
data:
{
original_text:
"Reopen issue"
,
alternative_text:
"Comment & reopen issue"
},
class:
"btn btn-nr btn-reopen btn-comment js-note-target-reopen
#{
issue_button_visibility
(
@issue
,
false
)
}
"
,
title:
'Reopen issue'
=
link_to
'Close issue'
,
issue_path
(
@issue
,
issue:
{
state_event: :close
},
format:
'json'
),
data:
{
original_text:
"Close issue"
,
alternative_text:
"Comment & close issue"
},
class:
"btn btn-nr btn-close btn-comment js-note-target-close
#{
issue_button_visibility
(
@issue
,
true
)
}
"
,
title:
'Close issue'
%section
%section
.js-vue-notes-event
#js-vue-notes
{
data:
{
discussions_path:
discussions_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
@issue
,
format: :json
),
register_path:
"#{new_session_path(:user, redirect_to_referer: 'yes')}#register-pane"
,
new_session_path:
new_session_path
(
:user
,
redirect_to_referer:
'yes'
),
...
...
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