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
Boxiang Sun
gitlab-ce
Commits
6becf288
Commit
6becf288
authored
May 26, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use formState to update loading of save button
[ci skip]
parent
3ce6658d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
15 deletions
+7
-15
app/assets/javascripts/issue_show/components/app.vue
app/assets/javascripts/issue_show/components/app.vue
+2
-1
app/assets/javascripts/issue_show/components/edit_actions.vue
...assets/javascripts/issue_show/components/edit_actions.vue
+4
-14
app/assets/javascripts/issue_show/stores/index.js
app/assets/javascripts/issue_show/stores/index.js
+1
-0
No files found.
app/assets/javascripts/issue_show/components/app.vue
View file @
6becf288
...
...
@@ -114,6 +114,7 @@ export default {
description
:
this
.
state
.
descriptionText
,
lockedWarningVisible
:
false
,
move_to_project_id
:
0
,
updateLoading
:
false
,
});
}
},
...
...
@@ -125,7 +126,7 @@ export default {
confirm
(
'
Are you sure you want to move this issue to another project?
'
)
:
true
;
// eslint-disable-line no-alert
if
(
!
canPostUpdate
)
{
eventHub
.
$emit
(
'
enable.submit.btn
'
)
;
this
.
store
.
formState
.
updateLoading
=
false
;
return
;
}
...
...
app/assets/javascripts/issue_show/components/edit_actions.vue
View file @
6becf288
...
...
@@ -15,7 +15,6 @@
data
()
{
return
{
deleteLoading
:
false
,
updateLoading
:
false
,
};
},
computed
:
{
...
...
@@ -24,11 +23,8 @@
},
},
methods
:
{
enableSubmit
()
{
this
.
updateLoading
=
false
;
},
updateIssuable
()
{
this
.
updateLoading
=
true
;
this
.
formState
.
updateLoading
=
true
;
eventHub
.
$emit
(
'
update.issuable
'
);
},
closeForm
()
{
...
...
@@ -43,12 +39,6 @@
}
},
},
created
()
{
eventHub
.
$on
(
'
enable.submit.btn
'
,
this
.
enableSubmit
);
},
beforeDestroy
()
{
eventHub
.
$off
(
'
enable.submit.btn
'
,
this
.
enableSubmit
);
},
};
</
script
>
...
...
@@ -56,15 +46,15 @@
<div
class=
"prepend-top-default append-bottom-default clearfix"
>
<button
class=
"btn btn-save pull-left"
:class=
"
{ disabled: updateLoading || !isSubmitEnabled }"
:class=
"
{ disabled:
formState.
updateLoading || !isSubmitEnabled }"
type="submit"
:disabled="updateLoading || !isSubmitEnabled"
:disabled="
formState.
updateLoading || !isSubmitEnabled"
@click.prevent="updateIssuable">
Save changes
<i
class=
"fa fa-spinner fa-spin"
aria-hidden=
"true"
v-if=
"updateLoading"
>
v-if=
"
formState.
updateLoading"
>
</i>
</button>
<button
...
...
app/assets/javascripts/issue_show/stores/index.js
View file @
6becf288
...
...
@@ -19,6 +19,7 @@ export default class Store {
description
:
''
,
lockedWarningVisible
:
false
,
move_to_project_id
:
0
,
updateLoading
:
false
,
};
}
...
...
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