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
iv
gitlab-ce
Commits
1f5b8e88
Commit
1f5b8e88
authored
Dec 21, 2015
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes `data-url` to `href` for javascript url grabbing
parent
3e7e7ae0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
app/assets/javascripts/issue.js.coffee
app/assets/javascripts/issue.js.coffee
+2
-1
app/views/projects/issues/show.html.haml
app/views/projects/issues/show.html.haml
+2
-2
No files found.
app/assets/javascripts/issue.js.coffee
View file @
1f5b8e88
...
@@ -16,12 +16,13 @@ class @Issue
...
@@ -16,12 +16,13 @@ class @Issue
initIssueBtnEventListeners
:
->
initIssueBtnEventListeners
:
->
$
(
"a.btn-close, a.btn-reopen"
).
on
"click"
,
(
e
)
->
$
(
"a.btn-close, a.btn-reopen"
).
on
"click"
,
(
e
)
->
console
.
log
(
'closing'
)
e
.
preventDefault
()
e
.
preventDefault
()
e
.
stopImmediatePropagation
()
e
.
stopImmediatePropagation
()
$this
=
$
(
this
)
$this
=
$
(
this
)
isClose
=
$this
.
hasClass
(
'btn-close'
)
isClose
=
$this
.
hasClass
(
'btn-close'
)
$this
.
prop
(
"disabled"
,
true
)
$this
.
prop
(
"disabled"
,
true
)
url
=
$this
.
data
(
'url
'
)
url
=
$this
.
attr
(
'href
'
)
$
.
ajax
$
.
ajax
type
:
'PUT'
type
:
'PUT'
url
:
url
,
url
:
url
,
...
...
app/views/projects/issues/show.html.haml
View file @
1f5b8e88
...
@@ -24,8 +24,8 @@
...
@@ -24,8 +24,8 @@
=
icon
(
'plus'
)
=
icon
(
'plus'
)
New Issue
New Issue
-
if
can?
(
current_user
,
:update_issue
,
@issue
)
-
if
can?
(
current_user
,
:update_issue
,
@issue
)
=
link_to
'Reopen'
,
'#'
,
data:
{
no_turbolink:
true
,
url:
issue_path
(
@issue
,
issue:
{
state_event: :reopen
},
status_only:
true
,
format:
'json'
)
},
class:
"btn btn-grouped btn-reopen
#{
issue_button_visibility
(
@issue
,
false
)
}
"
,
title:
'Reopen Issue'
=
link_to
'Reopen'
,
issue_path
(
@issue
,
issue:
{
state_event: :reopen
},
status_only:
true
,
format:
'json'
),
data:
{
no_turbolink:
true
},
class:
"btn btn-grouped btn-reopen
#{
issue_button_visibility
(
@issue
,
false
)
}
"
,
title:
'Reopen Issue'
=
link_to
'Close'
,
'#'
,
data:
{
no_turbolink:
true
,
url:
issue_path
(
@issue
,
issue:
{
state_event: :close
},
status_only:
true
,
format:
'json'
)
},
class:
"btn btn-grouped btn-close
#{
issue_button_visibility
(
@issue
,
true
)
}
"
,
title:
'Close Issue'
=
link_to
'Close'
,
issue_path
(
@issue
,
issue:
{
state_event: :close
},
status_only:
true
,
format:
'json'
),
data:
{
no_turbolink:
true
},
class:
"btn btn-grouped btn-close
#{
issue_button_visibility
(
@issue
,
true
)
}
"
,
title:
'Close Issue'
=
link_to
edit_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
@issue
),
class:
'btn btn-grouped issuable-edit'
do
=
link_to
edit_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
@issue
),
class:
'btn btn-grouped issuable-edit'
do
=
icon
(
'pencil-square-o'
)
=
icon
(
'pencil-square-o'
)
...
...
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