From 1982194dc5abe1b400245414bac09f83957b4fe5 Mon Sep 17 00:00:00 2001 From: Sorien Date: Thu, 14 May 2020 21:15:21 +0200 Subject: Prettify timeline 3 (#11139) * Fix timeline comments sections borders * Fix files dropzone right alignment * Update review comment form and controls * Clear segment style from comment form tabs * Remove segment class from pulls tab * Fix Time Tracker - Add Time button border * Fix buttons right alignment * Markdown tab minimal height * Fix DropZone hover effect * Fix Lint + remove unused controls class Co-authored-by: Lunny Xiao Co-authored-by: zeripath --- web_src/js/index.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'web_src/js/index.js') diff --git a/web_src/js/index.js b/web_src/js/index.js index 02189a5f13..c7b8934874 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -43,9 +43,9 @@ function initCommentPreviewTab($form) { _csrf: csrf, mode: 'gfm', context: $this.data('context'), - text: $form.find(`.tab.segment[data-tab="${$tabMenu.data('write')}"] textarea`).val() + text: $form.find(`.tab[data-tab="${$tabMenu.data('write')}"] textarea`).val() }, (data) => { - const $previewPanel = $form.find(`.tab.segment[data-tab="${$tabMenu.data('preview')}"]`); + const $previewPanel = $form.find(`.tab[data-tab="${$tabMenu.data('preview')}"]`); $previewPanel.html(data); $('pre code', $previewPanel[0]).each(function () { highlight(this); @@ -74,9 +74,9 @@ function initEditPreviewTab($form) { _csrf: csrf, mode: 'gfm', context, - text: $form.find(`.tab.segment[data-tab="${$tabMenu.data('write')}"] textarea`).val() + text: $form.find(`.tab[data-tab="${$tabMenu.data('write')}"] textarea`).val() }, (data) => { - const $previewPanel = $form.find(`.tab.segment[data-tab="${$tabMenu.data('preview')}"]`); + const $previewPanel = $form.find(`.tab[data-tab="${$tabMenu.data('preview')}"]`); $previewPanel.html(data); $('pre code', $previewPanel[0]).each(function () { highlight(this); @@ -94,9 +94,9 @@ function initEditDiffTab($form) { $.post($this.data('url'), { _csrf: csrf, context: $this.data('context'), - content: $form.find(`.tab.segment[data-tab="${$tabMenu.data('write')}"] textarea`).val() + content: $form.find(`.tab[data-tab="${$tabMenu.data('write')}"] textarea`).val() }, (data) => { - const $diffPreviewPanel = $form.find(`.tab.segment[data-tab="${$tabMenu.data('diff')}"]`); + const $diffPreviewPanel = $form.find(`.tab[data-tab="${$tabMenu.data('diff')}"]`); $diffPreviewPanel.html(data); }); }); @@ -971,8 +971,8 @@ async function initRepository() { $tabMenu.attr('data-preview', $editContentZone.data('preview')); $tabMenu.find('.write.item').attr('data-tab', $editContentZone.data('write')); $tabMenu.find('.preview.item').attr('data-tab', $editContentZone.data('preview')); - $editContentForm.find('.write.segment').attr('data-tab', $editContentZone.data('write')); - $editContentForm.find('.preview.segment').attr('data-tab', $editContentZone.data('preview')); + $editContentForm.find('.write').attr('data-tab', $editContentZone.data('write')); + $editContentForm.find('.preview').attr('data-tab', $editContentZone.data('preview')); $simplemde = setCommentSimpleMDE($textarea); commentMDEditors[$editContentZone.data('write')] = $simplemde; initCommentPreviewTab($editContentForm); -- cgit v1.2.3