summaryrefslogtreecommitdiffstats
path: root/web_src/js/index.js
diff options
context:
space:
mode:
authorSorien <Sorien@users.noreply.github.com>2020-05-14 21:15:21 +0200
committerGitHub <noreply@github.com>2020-05-14 15:15:21 -0400
commit1982194dc5abe1b400245414bac09f83957b4fe5 (patch)
tree75cc6ee186a3cf4fc5958055b1f48dcf0bfe5018 /web_src/js/index.js
parenta552af8f0d6c2d91bb2a14bdc0ad4ebdefbbe314 (diff)
downloadgitea-1982194dc5abe1b400245414bac09f83957b4fe5.tar.gz
gitea-1982194dc5abe1b400245414bac09f83957b4fe5.zip
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 <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'web_src/js/index.js')
-rw-r--r--web_src/js/index.js16
1 files changed, 8 insertions, 8 deletions
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);