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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
df7c9011
Commit
df7c9011
authored
May 30, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed issuable shortcuts not working
moved setstate method into store
parent
3465e1e5
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
32 additions
and
8 deletions
+32
-8
app/assets/javascripts/issue_show/components/app.vue
app/assets/javascripts/issue_show/components/app.vue
+4
-2
app/assets/javascripts/issue_show/mixins/animate.js
app/assets/javascripts/issue_show/mixins/animate.js
+1
-1
app/assets/javascripts/issue_show/stores/index.js
app/assets/javascripts/issue_show/stores/index.js
+4
-0
app/assets/javascripts/shortcuts_issuable.js
app/assets/javascripts/shortcuts_issuable.js
+3
-1
app/assets/javascripts/vue_shared/components/markdown/field.vue
...sets/javascripts/vue_shared/components/markdown/field.vue
+1
-1
app/assets/javascripts/vue_shared/components/markdown/header.vue
...ets/javascripts/vue_shared/components/markdown/header.vue
+14
-2
changelogs/unreleased/issue-edit-inline.yml
changelogs/unreleased/issue-edit-inline.yml
+4
-0
spec/javascripts/issue_show/components/app_spec.js
spec/javascripts/issue_show/components/app_spec.js
+1
-1
No files found.
app/assets/javascripts/issue_show/components/app.vue
View file @
df7c9011
...
...
@@ -108,7 +108,7 @@ export default {
openForm
()
{
if
(
!
this
.
showForm
)
{
this
.
showForm
=
true
;
this
.
store
.
formState
=
Object
.
assign
(
this
.
store
.
formState
,
{
this
.
store
.
setFormState
(
{
title
:
this
.
state
.
titleText
,
confidential
:
this
.
isConfidential
,
description
:
this
.
state
.
descriptionText
,
...
...
@@ -126,7 +126,9 @@ export default {
confirm
(
'
Are you sure you want to move this issue to another project?
'
)
:
true
;
// eslint-disable-line no-alert
if
(
!
canPostUpdate
)
{
this
.
store
.
formState
.
updateLoading
=
false
;
this
.
store
.
setFormState
({
updateLoading
:
false
,
});
return
;
}
...
...
app/assets/javascripts/issue_show/mixins/animate.js
View file @
df7c9011
...
...
@@ -4,7 +4,7 @@ export default {
this
.
preAnimation
=
true
;
this
.
pulseAnimation
=
false
;
this
.
$nextTick
(()
=>
{
setTimeout
(()
=>
{
this
.
preAnimation
=
false
;
this
.
pulseAnimation
=
true
;
});
...
...
app/assets/javascripts/issue_show/stores/index.js
View file @
df7c9011
...
...
@@ -38,4 +38,8 @@ export default class Store {
description
:
this
.
state
.
descriptionText
!==
data
.
description_text
,
};
}
setFormState
(
state
)
{
this
.
formState
=
Object
.
assign
(
this
.
formState
,
state
);
}
}
app/assets/javascripts/shortcuts_issuable.js
View file @
df7c9011
...
...
@@ -77,7 +77,9 @@ import './shortcuts_navigation';
ShortcutsIssuable
.
prototype
.
editIssue
=
function
()
{
var
$editBtn
;
$editBtn
=
$
(
'
.issuable-edit
'
);
return
gl
.
utils
.
visitUrl
(
$editBtn
.
attr
(
'
href
'
));
// Need to click the element as on issues, editing is inline
// on merge request, editing is on a different page
$editBtn
.
get
(
0
).
click
();
};
ShortcutsIssuable
.
prototype
.
openSidebarDropdown
=
function
(
name
)
{
...
...
app/assets/javascripts/vue_shared/components/markdown/field.vue
View file @
df7c9011
...
...
@@ -69,7 +69,7 @@
<
template
>
<div
class=
"md-area prepend-top-default append-bottom-default"
class=
"md-area prepend-top-default append-bottom-default
js-vue-markdown-field
"
ref=
"gl-form"
>
<markdown-header
:preview-markdown=
"previewMarkdown"
...
...
app/assets/javascripts/vue_shared/components/markdown/header.vue
View file @
df7c9011
...
...
@@ -16,12 +16,24 @@
toolbarButton
,
},
methods
:
{
toggleMarkdownPreview
(
e
)
{
toggleMarkdownPreview
(
e
,
form
)
{
if
(
form
&&
!
form
.
find
(
'
.js-vue-markdown-field
'
).
length
)
{
return
;
}
else
if
(
e
.
target
.
blur
)
{
e
.
target
.
blur
();
}
this
.
$emit
(
'
toggle-markdown
'
);
},
},
mounted
()
{
$
(
document
).
on
(
'
markdown-preview:show.vue
'
,
this
.
toggleMarkdownPreview
);
$
(
document
).
on
(
'
markdown-preview:hide.vue
'
,
this
.
toggleMarkdownPreview
);
},
beforeDestroy
()
{
$
(
document
).
on
(
'
markdown-preview:show.vue
'
,
this
.
toggleMarkdownPreview
);
$
(
document
).
off
(
'
markdown-preview:hide.vue
'
,
this
.
toggleMarkdownPreview
);
},
};
</
script
>
...
...
changelogs/unreleased/issue-edit-inline.yml
0 → 100644
View file @
df7c9011
---
title
:
Enables inline editing for an issues title & description
merge_request
:
author
:
spec/javascripts/issue_show/components/app_spec.js
View file @
df7c9011
...
...
@@ -287,7 +287,7 @@ describe('Issuable output', () => {
});
});
it
(
'
stops polling when delet
e
ing
'
,
(
done
)
=>
{
it
(
'
stops polling when deleting
'
,
(
done
)
=>
{
spyOn
(
gl
.
utils
,
'
visitUrl
'
);
spyOn
(
vm
.
poll
,
'
stop
'
);
spyOn
(
vm
.
service
,
'
deleteIssuable
'
).
and
.
callFake
(()
=>
new
Promise
((
resolve
)
=>
{
...
...
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