summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Ho <ClemMakesApps@gmail.com>2018-02-05 13:04:32 -0600
committerClement Ho <ClemMakesApps@gmail.com>2018-02-05 13:04:32 -0600
commitb43b13498d75e8d23028325197762803d0c2992b (patch)
tree48b0de2ceef7d7692dfcf19732423b919a431e64
parenta00aed74af67dd72a2aa7bf7e485ff7bdb949ea4 (diff)
downloadgitlab-ce-axios-diff-file-editor-test.tar.gz
-rw-r--r--app/assets/javascripts/merge_conflicts/components/diff_file_editor.js42
1 files changed, 21 insertions, 21 deletions
diff --git a/app/assets/javascripts/merge_conflicts/components/diff_file_editor.js b/app/assets/javascripts/merge_conflicts/components/diff_file_editor.js
index 93f8f6ee926..c32cf90c795 100644
--- a/app/assets/javascripts/merge_conflicts/components/diff_file_editor.js
+++ b/app/assets/javascripts/merge_conflicts/components/diff_file_editor.js
@@ -49,29 +49,29 @@ import Flash from '../../flash';
loadEditor() {
this.loading = true;
- $.get(this.file.content_path)
- .done((file) => {
- const content = this.$el.querySelector('pre');
- const fileContent = document.createTextNode(file.content);
+ // $.get(this.file.content_path)
+ // .done((file) => {
+ // const content = this.$el.querySelector('pre');
+ // const fileContent = document.createTextNode(file.content);
- content.textContent = fileContent.textContent;
+ // content.textContent = fileContent.textContent;
- this.originalContent = file.content;
- this.fileLoaded = true;
- this.editor = ace.edit(content);
- this.editor.$blockScrolling = Infinity; // Turn off annoying warning
- this.editor.getSession().setMode(`ace/mode/${file.blob_ace_mode}`);
- this.editor.on('change', () => {
- this.saveDiffResolution();
- });
- this.saveDiffResolution();
- })
- .fail(() => {
- new Flash('Failed to load the file, please try again.');
- })
- .always(() => {
- this.loading = false;
- });
+ // this.originalContent = file.content;
+ // this.fileLoaded = true;
+ // this.editor = ace.edit(content);
+ // this.editor.$blockScrolling = Infinity; // Turn off annoying warning
+ // this.editor.getSession().setMode(`ace/mode/${file.blob_ace_mode}`);
+ // this.editor.on('change', () => {
+ // this.saveDiffResolution();
+ // });
+ // this.saveDiffResolution();
+ // })
+ // .fail(() => {
+ // new Flash('Failed to load the file, please try again.');
+ // })
+ // .always(() => {
+ // this.loading = false;
+ // });
},
saveDiffResolution() {
this.saved = true;