diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2018-01-15 15:26:34 +0100 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2018-01-15 15:26:34 +0100 |
commit | ef25732a1b215fa23fee1cf1d49860b99aee0289 (patch) | |
tree | a10a8e8e28e408e10620ca6dfd442b63010ab0ef | |
parent | 5ebd20edc411b04f3bebc1d04b28fbf600dd7967 (diff) | |
download | gitlab-ce-ef25732a1b215fa23fee1cf1d49860b99aee0289.tar.gz |
After commit actions
4 files changed, 5 insertions, 6 deletions
diff --git a/app/assets/javascripts/ide/components/repo_commit_section.vue b/app/assets/javascripts/ide/components/repo_commit_section.vue index 60661018b23..4706aaf6f37 100644 --- a/app/assets/javascripts/ide/components/repo_commit_section.vue +++ b/app/assets/javascripts/ide/components/repo_commit_section.vue @@ -71,6 +71,8 @@ export default { this.commitChanges({ payload, newMr: this.startNewMR }) .then(() => { this.submitCommitsLoading = false; + this.commitMessage = ''; + this.startNewMR = false; this.$store.dispatch('getTreeData', { projectId: this.currentProjectId, branch: this.currentBranchId, diff --git a/app/assets/javascripts/ide/stores/actions.js b/app/assets/javascripts/ide/stores/actions.js index b9a13e6630e..2af842757cd 100644 --- a/app/assets/javascripts/ide/stores/actions.js +++ b/app/assets/javascripts/ide/stores/actions.js @@ -119,9 +119,7 @@ export const commitChanges = ( if (newMr) { dispatch( 'redirectToUrl', - `${ - selectedProject.web_url - }/merge_requests/new?merge_request%5Bsource_branch%5D=${branch}`, + `${selectedProject.web_url}/merge_requests/new?merge_request%5Bsource_branch%5D=${branch}`, ); } else { commit(types.SET_BRANCH_WORKING_REFERENCE, { @@ -138,7 +136,6 @@ export const commitChanges = ( }); dispatch('discardAllChanges'); - dispatch('closeAllFiles'); window.scrollTo(0, 0); } diff --git a/app/assets/javascripts/ide/stores/mutations/file.js b/app/assets/javascripts/ide/stores/mutations/file.js index 5f3655b0092..72db1c180c9 100644 --- a/app/assets/javascripts/ide/stores/mutations/file.js +++ b/app/assets/javascripts/ide/stores/mutations/file.js @@ -64,7 +64,7 @@ export default { }, [types.DISCARD_FILE_CHANGES](state, file) { Object.assign(file, { - content: '', + content: file.raw, changed: false, }); }, diff --git a/app/assets/stylesheets/pages/repo.scss b/app/assets/stylesheets/pages/repo.scss index 6b88394b1c4..87dceeac2df 100644 --- a/app/assets/stylesheets/pages/repo.scss +++ b/app/assets/stylesheets/pages/repo.scss @@ -502,7 +502,7 @@ table.table tr td.multi-file-table-name { margin-bottom: 0; } - .alert-wrapper .flash-container .flash-alert:last-child { + .alert-wrapper .flash-container .flash-alert:last-child, .alert-wrapper .flash-container .flash-notice:last-child { margin-bottom: 0; } |