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