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
Jérome Perrin
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
Hide 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 {
...
@@ -108,7 +108,7 @@ export default {
openForm
()
{
openForm
()
{
if
(
!
this
.
showForm
)
{
if
(
!
this
.
showForm
)
{
this
.
showForm
=
true
;
this
.
showForm
=
true
;
this
.
store
.
formState
=
Object
.
assign
(
this
.
store
.
formState
,
{
this
.
store
.
setFormState
(
{
title
:
this
.
state
.
titleText
,
title
:
this
.
state
.
titleText
,
confidential
:
this
.
isConfidential
,
confidential
:
this
.
isConfidential
,
description
:
this
.
state
.
descriptionText
,
description
:
this
.
state
.
descriptionText
,
...
@@ -126,7 +126,9 @@ export default {
...
@@ -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
confirm
(
'
Are you sure you want to move this issue to another project?
'
)
:
true
;
// eslint-disable-line no-alert
if
(
!
canPostUpdate
)
{
if
(
!
canPostUpdate
)
{
this
.
store
.
formState
.
updateLoading
=
false
;
this
.
store
.
setFormState
({
updateLoading
:
false
,
});
return
;
return
;
}
}
...
...
app/assets/javascripts/issue_show/mixins/animate.js
View file @
df7c9011
...
@@ -4,7 +4,7 @@ export default {
...
@@ -4,7 +4,7 @@ export default {
this
.
preAnimation
=
true
;
this
.
preAnimation
=
true
;
this
.
pulseAnimation
=
false
;
this
.
pulseAnimation
=
false
;
this
.
$nextTick
(()
=>
{
setTimeout
(()
=>
{
this
.
preAnimation
=
false
;
this
.
preAnimation
=
false
;
this
.
pulseAnimation
=
true
;
this
.
pulseAnimation
=
true
;
});
});
...
...
app/assets/javascripts/issue_show/stores/index.js
View file @
df7c9011
...
@@ -38,4 +38,8 @@ export default class Store {
...
@@ -38,4 +38,8 @@ export default class Store {
description
:
this
.
state
.
descriptionText
!==
data
.
description_text
,
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';
...
@@ -77,7 +77,9 @@ import './shortcuts_navigation';
ShortcutsIssuable
.
prototype
.
editIssue
=
function
()
{
ShortcutsIssuable
.
prototype
.
editIssue
=
function
()
{
var
$editBtn
;
var
$editBtn
;
$editBtn
=
$
(
'
.issuable-edit
'
);
$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
)
{
ShortcutsIssuable
.
prototype
.
openSidebarDropdown
=
function
(
name
)
{
...
...
app/assets/javascripts/vue_shared/components/markdown/field.vue
View file @
df7c9011
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
<
template
>
<
template
>
<div
<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"
>
ref=
"gl-form"
>
<markdown-header
<markdown-header
:preview-markdown=
"previewMarkdown"
:preview-markdown=
"previewMarkdown"
...
...
app/assets/javascripts/vue_shared/components/markdown/header.vue
View file @
df7c9011
...
@@ -16,12 +16,24 @@
...
@@ -16,12 +16,24 @@
toolbarButton
,
toolbarButton
,
},
},
methods
:
{
methods
:
{
toggleMarkdownPreview
(
e
)
{
toggleMarkdownPreview
(
e
,
form
)
{
e
.
target
.
blur
();
if
(
form
&&
!
form
.
find
(
'
.js-vue-markdown-field
'
).
length
)
{
return
;
}
else
if
(
e
.
target
.
blur
)
{
e
.
target
.
blur
();
}
this
.
$emit
(
'
toggle-markdown
'
);
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
>
</
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', () => {
...
@@ -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
(
gl
.
utils
,
'
visitUrl
'
);
spyOn
(
vm
.
poll
,
'
stop
'
);
spyOn
(
vm
.
poll
,
'
stop
'
);
spyOn
(
vm
.
service
,
'
deleteIssuable
'
).
and
.
callFake
(()
=>
new
Promise
((
resolve
)
=>
{
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