Commit a38a8ee7 authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'issuable-ee-differences' into 'master'

Refactor some issuable JS code to move EE code out of CE files

Closes #10089 and #10020

See merge request gitlab-org/gitlab-ee!9795
parents 8d0d4fc5 b0722b7b
......@@ -6,7 +6,6 @@ import GfmAutoComplete from './gfm_auto_complete';
import ZenMode from './zen_mode';
import AutoWidthDropdownSelect from './issuable/auto_width_dropdown_select';
import { parsePikadayDate, pikadayToString } from './lib/utils/datetime_utility';
import groupsSelect from './groups_select';
export default class IssuableForm {
constructor(form) {
......@@ -21,7 +20,6 @@ export default class IssuableForm {
gl.GfmAutoComplete && gl.GfmAutoComplete.dataSources,
).setup();
this.usersSelect = new UsersSelect();
groupsSelect();
this.zenMode = new ZenMode();
this.titleField = this.form.find('input[name*="[title]"]');
......
import initForm from '../form';
import initForm from 'ee_else_ce/pages/projects/issues/form';
document.addEventListener('DOMContentLoaded', initForm);
......@@ -2,13 +2,12 @@
import $ from 'jquery';
import GLForm from '~/gl_form';
import IssuableForm from '~/issuable_form';
import IssuableForm from 'ee_else_ce/issuable_form';
import LabelsSelect from '~/labels_select';
import MilestoneSelect from '~/milestone_select';
import ShortcutsNavigation from '~/behaviors/shortcuts/shortcuts_navigation';
import IssuableTemplateSelectors from '~/templates/issuable_template_selectors';
import initSuggestions from '~/issuable_suggestions';
import WeightSelect from 'ee/weight_select';
export default () => {
new ShortcutsNavigation();
......@@ -21,6 +20,4 @@ export default () => {
if (gon.features.graphql) {
initSuggestions();
}
new WeightSelect();
};
import initForm from '../form';
import initForm from 'ee_else_ce/pages/projects/issues/form';
document.addEventListener('DOMContentLoaded', initForm);
......@@ -4,7 +4,7 @@ import $ from 'jquery';
import Diff from '~/diff';
import ShortcutsNavigation from '~/behaviors/shortcuts/shortcuts_navigation';
import GLForm from '~/gl_form';
import IssuableForm from '~/issuable_form';
import IssuableForm from 'ee_else_ce/issuable_form';
import LabelsSelect from '~/labels_select';
import MilestoneSelect from '~/milestone_select';
import IssuableTemplateSelectors from '~/templates/issuable_template_selectors';
......
import IssuableForm from '~/issuable_form';
import groupsSelect from '~/groups_select';
export default class IssuableFormEE extends IssuableForm {
constructor(form) {
super(form);
groupsSelect();
}
}
import initForm from '~/pages/projects/issues/form';
import WeightSelect from 'ee/weight_select';
export default () => {
// eslint-disable-next-line no-new
new WeightSelect();
initForm();
};
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