Commit d88843f3 authored by GitLab Bot's avatar GitLab Bot

Add latest changes from gitlab-org/gitlab@master

parent d8c06be4
......@@ -50,8 +50,8 @@ GEM
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
acts-as-taggable-on (6.0.0)
activerecord (~> 5.0)
acts-as-taggable-on (6.5.0)
activerecord (>= 5.0, < 6.1)
adamantium (0.2.0)
ice_nine (~> 0.11.0)
memoizable (~> 0.4.0)
......
/* eslint-disable func-names, no-var */
/* eslint-disable func-names */
import $ from 'jquery';
import axios from '~/lib/utils/axios_utils';
......@@ -12,11 +12,8 @@ import { __ } from '~/locale';
// more than `x` users are referenced.
//
var lastTextareaPreviewed;
var lastTextareaHeight = null;
var markdownPreview;
var previewButtonSelector;
var writeButtonSelector;
let lastTextareaHeight;
let lastTextareaPreviewed;
function MarkdownPreview() {}
......@@ -27,14 +24,13 @@ MarkdownPreview.prototype.emptyMessage = __('Nothing to preview.');
MarkdownPreview.prototype.ajaxCache = {};
MarkdownPreview.prototype.showPreview = function($form) {
var mdText;
var preview = $form.find('.js-md-preview');
var url = preview.data('url');
const preview = $form.find('.js-md-preview');
const url = preview.data('url');
if (preview.hasClass('md-preview-loading')) {
return;
}
mdText = $form.find('textarea.markdown-area').val();
const mdText = $form.find('textarea.markdown-area').val();
if (mdText === undefined) {
return;
......@@ -46,7 +42,7 @@ MarkdownPreview.prototype.showPreview = function($form) {
} else {
preview.addClass('md-preview-loading').text(__('Loading...'));
this.fetchMarkdownPreview(mdText, url, response => {
var body;
let body;
if (response.body.length > 0) {
({ body } = response);
} else {
......@@ -91,8 +87,7 @@ MarkdownPreview.prototype.hideReferencedUsers = function($form) {
};
MarkdownPreview.prototype.renderReferencedUsers = function(users, $form) {
var referencedUsers;
referencedUsers = $form.find('.referenced-users');
const referencedUsers = $form.find('.referenced-users');
if (referencedUsers.length) {
if (users.length >= this.referenceThreshold) {
referencedUsers.show();
......@@ -108,8 +103,7 @@ MarkdownPreview.prototype.hideReferencedCommands = function($form) {
};
MarkdownPreview.prototype.renderReferencedCommands = function(commands, $form) {
var referencedCommands;
referencedCommands = $form.find('.referenced-commands');
const referencedCommands = $form.find('.referenced-commands');
if (commands.length > 0) {
referencedCommands.html(commands);
referencedCommands.show();
......@@ -119,15 +113,15 @@ MarkdownPreview.prototype.renderReferencedCommands = function(commands, $form) {
}
};
markdownPreview = new MarkdownPreview();
const markdownPreview = new MarkdownPreview();
previewButtonSelector = '.js-md-preview-button';
writeButtonSelector = '.js-md-write-button';
const previewButtonSelector = '.js-md-preview-button';
const writeButtonSelector = '.js-md-write-button';
lastTextareaPreviewed = null;
const markdownToolbar = $('.md-header-toolbar');
$.fn.setupMarkdownPreview = function() {
var $form = $(this);
const $form = $(this);
$form.find('textarea.markdown-area').on('input', () => {
markdownPreview.hideReferencedUsers($form);
});
......@@ -188,7 +182,7 @@ $(document).on('markdown-preview:hide', (e, $form) => {
});
$(document).on('markdown-preview:toggle', (e, keyboardEvent) => {
var $target;
let $target;
$target = $(keyboardEvent.target);
if ($target.is('textarea.markdown-area')) {
$(document).triggerHandler('markdown-preview:show', [$target.closest('form')]);
......@@ -201,16 +195,14 @@ $(document).on('markdown-preview:toggle', (e, keyboardEvent) => {
});
$(document).on('click', previewButtonSelector, function(e) {
var $form;
e.preventDefault();
$form = $(this).closest('form');
const $form = $(this).closest('form');
$(document).triggerHandler('markdown-preview:show', [$form]);
});
$(document).on('click', writeButtonSelector, function(e) {
var $form;
e.preventDefault();
$form = $(this).closest('form');
const $form = $(this).closest('form');
$(document).triggerHandler('markdown-preview:hide', [$form]);
});
......
/* eslint-disable func-names, one-var, no-var, no-else-return */
/* eslint-disable func-names, no-else-return */
import $ from 'jquery';
import { __ } from './locale';
......@@ -8,9 +8,8 @@ import { capitalizeFirstCharacter } from './lib/utils/text_utility';
export default function initCompareAutocomplete(limitTo = null, clickHandler = () => {}) {
$('.js-compare-dropdown').each(function() {
var $dropdown, selected;
$dropdown = $(this);
selected = $dropdown.data('selected');
const $dropdown = $(this);
const selected = $dropdown.data('selected');
const $dropdownContainer = $dropdown.closest('.dropdown');
const $fieldInput = $(`input[name="${$dropdown.data('fieldName')}"]`, $dropdownContainer);
const $filterInput = $('input[type="search"]', $dropdownContainer);
......@@ -44,17 +43,16 @@ export default function initCompareAutocomplete(limitTo = null, clickHandler = (
fieldName: $dropdown.data('fieldName'),
filterInput: 'input[type="search"]',
renderRow(ref) {
var link;
const link = $('<a />')
.attr('href', '#')
.addClass(ref === selected ? 'is-active' : '')
.text(ref)
.attr('data-ref', ref);
if (ref.header != null) {
return $('<li />')
.addClass('dropdown-header')
.text(ref.header);
} else {
link = $('<a />')
.attr('href', '#')
.addClass(ref === selected ? 'is-active' : '')
.text(ref)
.attr('data-ref', ref);
return $('<li />').append(link);
}
},
......
/* eslint-disable no-var, no-return-assign */
/* eslint-disable no-return-assign */
export default class NewCommitForm {
constructor(form) {
this.form = form;
......@@ -11,8 +11,7 @@ export default class NewCommitForm {
this.renderDestination();
}
renderDestination() {
var different;
different = this.branchName.val() !== this.originalBranch.val();
const different = this.branchName.val() !== this.originalBranch.val();
if (different) {
this.createMergeRequestContainer.show();
if (!this.wasDifferent) {
......
---
title: Remove var from new_commit_form.js
merge_request: 20095
author: Lee Tickett
type: other
---
title: Remove var from preview_markdown.js
merge_request: 20115
author: Lee Tickett
type: other
......@@ -559,6 +559,9 @@ a few things that you need to do:
including [incremental logging](../job_logs.md#new-incremental-logging-architecture).
1. Configure [object storage for LFS objects](../lfs/lfs_administration.md#storing-lfs-objects-in-remote-object-storage).
1. Configure [object storage for uploads](../uploads.md#using-object-storage-core-only).
1. Configure [object storage for Merge Request Diffs](../merge_request_diffs.md#using-object-storage).
1. Configure [object storage for Packages](../packages/index.md#using-object-storage) (Optional Feature).
1. Configure [object storage for Dependency Proxy](../packages/dependency_proxy.md#using-object-storage) (Optional Feature).
NOTE: **Note:**
One current feature of GitLab that still requires a shared directory (NFS) is
......
......@@ -66,24 +66,22 @@ module QA
expect(page).to have_content(commit_message_of_second_branch)
expect(page).to have_content(commit_message_of_third_branch)
Page::Project::Branches::Show.perform do |branches|
expect(branches).to have_branch_with_badge(second_branch, 'merged')
end
Page::Project::Branches::Show.perform do |branches_page|
expect(branches_page).to have_branch_with_badge(second_branch, 'merged')
Page::Project::Branches::Show.perform do |branches_view|
branches_view.delete_branch(third_branch)
expect(branches_view).to have_no_branch(third_branch)
end
branches_page.delete_branch(third_branch)
expect(branches_page).to have_no_branch(third_branch)
branches_page.delete_merged_branches
Page::Project::Branches::Show.perform(&:delete_merged_branches)
expect(branches_page).to have_content(
'Merged branches are being deleted. This can take some time depending on the number of branches. Please refresh the page to see changes.'
)
expect(page).to have_content(
'Merged branches are being deleted. This can take some time depending on the number of branches. Please refresh the page to see changes.'
)
branches_page.refresh
page.refresh
Page::Project::Branches::Show.perform do |branches_view|
expect(branches_view).to have_no_branch(second_branch, reload: true)
expect(branches_page).to have_no_branch(second_branch, reload: true)
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment