diff options
author | Fatih Acet <acetfatih@gmail.com> | 2016-11-03 15:53:54 +0300 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2016-11-10 17:53:34 +0300 |
commit | a1fc04dfad84822d0e26e60ac109f83d42d5403a (patch) | |
tree | b7e15ba732bd074baeb5aa425e3efe5394033d7d | |
parent | 0eb21fd840378d54967fad055cafd1a1a6ecf55d (diff) |
VueJSMigration: Remove parallel-conflict-line component.
It's because Vue says: "Component template should contain exactly one root element".
3 files changed, 11 insertions, 20 deletions
diff --git a/app/assets/javascripts/merge_conflicts/components/parallel_conflict_line.js.es6 b/app/assets/javascripts/merge_conflicts/components/parallel_conflict_line.js.es6 deleted file mode 100644 index 797850262cc..00000000000 --- a/app/assets/javascripts/merge_conflicts/components/parallel_conflict_line.js.es6 +++ /dev/null @@ -1,15 +0,0 @@ -/* eslint-disable */ -((global) => { - - global.mergeConflicts = global.mergeConflicts || {}; - - global.mergeConflicts.parallelConflictLine = Vue.extend({ - props: { - file: Object, - line: Object - }, - mixins: [global.mergeConflicts.utils, global.mergeConflicts.actions], - template: '#parallel-conflict-line' - }); - -})(window.gl || (window.gl = {})); diff --git a/app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js.es6 b/app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js.es6 index 1b3e9901f1e..083a836f92f 100644 --- a/app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js.es6 +++ b/app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js.es6 @@ -7,10 +7,7 @@ props: { file: Object }, - mixins: [global.mergeConflicts.utils], - components: { - 'parallel-conflict-line': gl.mergeConflicts.parallelConflictLine - } + mixins: [global.mergeConflicts.utils, global.mergeConflicts.actions] }); })(window.gl || (window.gl = {})); diff --git a/app/views/projects/merge_requests/conflicts/components/_parallel_conflict_lines.html.haml b/app/views/projects/merge_requests/conflicts/components/_parallel_conflict_lines.html.haml index a8ecdf59393..0fd7095683c 100644 --- a/app/views/projects/merge_requests/conflicts/components/_parallel_conflict_lines.html.haml +++ b/app/views/projects/merge_requests/conflicts/components/_parallel_conflict_lines.html.haml @@ -1,4 +1,13 @@ %parallel-conflict-lines{"inline-template" => "true", ":file" => "file"} %table %tr.line_holder.parallel{"v-for" => "section in file.parallelLines"} - %td{"is"=>"parallel-conflict-line", "v-for" => "line in section", ":line" => "line", ":file" => "file"} + %template{"is"=>"parallel-conflict-line", "v-for" => "line in section", ":line" => "line", ":file" => "file"} + %td.diff-line-num.header{":class" => "lineCssClass(line)", "v-if" => "line.isHeader"} + %td.line_content.header{":class" => "lineCssClass(line)", "v-if" => "line.isHeader"} + %strong {{line.richText}} + %button.btn{"@click" => "handleSelected(file, line.id, line.section)"} + {{line.buttonTitle}} + %td.diff-line-num.old_line{":class" => "lineCssClass(line)", "v-if" => "!line.isHeader"} + {{line.lineNumber}} + %td.line_content.parallel{":class" => "lineCssClass(line)", "v-if" => "!line.isHeader", "v-html" => "line.richText"} + |