Commit 7302e244 authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'ee-reduce-ce-ee-disrepancies-in-js' into 'master'

[EE] Harmonize CE and EE JS code

See merge request gitlab-org/gitlab-ee!4655
parents c38faf19 94255cdf
/* eslint-disable func-names, comma-dangle, new-cap, no-new, max-len */
/* global ResolveCount */
/* global ResolveServiceClass */
import Vue from 'vue';
import './models/discussion';
......
......@@ -51,16 +51,6 @@ export default class FilteredSearchDropdownManager {
gl: DropdownUser,
element: this.container.querySelector('#js-dropdown-author'),
},
label: {
reference: null,
gl: DropdownNonUser,
extraArguments: {
endpoint: `${this.baseEndpoint}/labels.json${this.groupsOnly ? '?only_group_labels=true' : ''}`,
symbol: '~',
preprocessing: DropdownUtils.duplicateLabelPreprocessing,
},
element: this.container.querySelector('#js-dropdown-label'),
},
assignee: {
reference: null,
gl: DropdownUser,
......@@ -75,6 +65,16 @@ export default class FilteredSearchDropdownManager {
},
element: this.container.querySelector('#js-dropdown-milestone'),
},
label: {
reference: null,
gl: DropdownNonUser,
extraArguments: {
endpoint: `${this.baseEndpoint}/labels.json${this.groupsOnly ? '?only_group_labels=true' : ''}`,
symbol: '~',
preprocessing: DropdownUtils.duplicateLabelPreprocessing,
},
element: this.container.querySelector('#js-dropdown-label'),
},
'my-reaction': {
reference: null,
gl: DropdownEmoji,
......
......@@ -634,7 +634,7 @@ GitLabDropdown = (function() {
html.style.display = 'none';
}
if ((data === 'divider' || data === 'separator')) {
if (data === 'divider' || data === 'separator') {
html.className = data;
return html;
}
......
......@@ -33,4 +33,3 @@
<div v-html="sanitizedOutput"></div>
</div>
</template>
......@@ -325,8 +325,7 @@ js-gfm-input js-autosize markdown-area js-vue-textarea"
<div class="note-form-actions">
<div
class="pull-left btn-group
append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown"
>
append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown">
<button
@click.prevent="handleSave()"
:disabled="isSubmitButtonDisabled"
......
......@@ -30,8 +30,7 @@
rel="noopener noreferrer">
<i
class="fa fa-paperclip"
aria-hidden="true"
>
aria-hidden="true">
</i>
{{ attachment.filename }}
</a>
......
......@@ -116,8 +116,7 @@
<template>
<div
ref="editNoteForm"
class="note-edit-form current-note-edit-form"
>
class="note-edit-form current-note-edit-form">
<div
v-if="conflictWhileEditing"
class="js-conflict-edit-warning alert alert-danger">
......
......@@ -12,6 +12,7 @@
projectFeatureToggle,
projectSettingRow,
},
props: {
currentSettings: {
type: Object,
......@@ -95,6 +96,7 @@
return visibilityLevelDescriptions[this.visibilityLevel];
},
},
watch: {
visibilityLevel(value, oldValue) {
if (value === visibilityOptions.PRIVATE) {
......@@ -151,6 +153,7 @@
else if (oldValue === 0) toggleHiddenClassBySelector('.builds-feature', false);
},
},
methods: {
highlightChanges() {
this.highlightChangesClass = true;
......
......@@ -106,7 +106,7 @@ export default class ProjectNew {
}
}
toggleRepoVisibility () {
toggleRepoVisibility() {
var $repoAccessLevel = $('.js-repo-access-level select');
var $lfsEnabledOption = $('.js-lfs-enabled select');
var containerRegistry = document.querySelectorAll('.js-container-registry')[0];
......@@ -117,7 +117,8 @@ export default class ProjectNew {
.nextAll()
.hide();
$repoAccessLevel.off('change')
$repoAccessLevel
.off('change')
.on('change', function () {
var selectedVal = parseInt($repoAccessLevel.val(), 10);
......
<script>
/* eslint-disable no-alert, vue/require-default-prop */
/* eslint-disable no-alert */
import eventHub from '../event_hub';
import loadingIcon from '../../vue_shared/components/loading_icon.vue';
......@@ -10,7 +10,6 @@
directives: {
tooltip,
},
components: {
loadingIcon,
icon,
......@@ -37,7 +36,6 @@
required: true,
},
},
data() {
return {
isLoading: false,
......
......@@ -62,7 +62,8 @@
:class="{
'left-connector': index === 0 && (!isFirstColumn || hasTriggeredBy)
}"
:id="jobId(job)">
:id="jobId(job)"
>
<div class="curve"></div>
......
......@@ -19,7 +19,6 @@
required: true,
},
},
data() {
return {
actions: this.getActions(),
......
......@@ -85,7 +85,7 @@ export default class ProjectFindFile {
.catch(() => flash(__('An error occurred while loading filenames')));
}
// render result
// render result
renderList(filePaths, searchText) {
var blobItemUrl, filePath, html, i, j, len, matches, results;
this.element.find(".tree-table > tbody").empty();
......
......@@ -12,6 +12,7 @@
mixins: [
issuableMixin,
],
props: {
isLocked: {
required: true,
......@@ -31,6 +32,7 @@
},
},
},
computed: {
lockIcon() {
return this.isLocked ? 'lock' : 'lock-open';
......
......@@ -20,11 +20,9 @@ export default {
store: new Store(),
};
},
created() {
eventHub.$on('toggleSubscription', this.onToggleSubscription);
},
beforeDestroy() {
eventHub.$off('toggleSubscription', this.onToggleSubscription);
},
......
......@@ -80,6 +80,7 @@
>
<ci-icon :status="status" />
</a>
<div class="media-body">
Pipeline
<a
......
......@@ -5,7 +5,6 @@
components: {
icon,
},
props: {
isLocked: {
type: Boolean,
......
......@@ -18,7 +18,7 @@
<template>
<button
type="button"
class="btn btn-blank gutter-toggle"
class="btn btn-blank gutter-toggle btn-sidebar-action"
@click="toggle"
>
<i
......
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