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