Commit cf8bd388 authored by Miguel Rincon's avatar Miguel Rincon

Merge branch 'cngo-move-milestones-code' into 'master'

Move JS milestones code to ~/milestones [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!75363
parents 0b310388 b87a5107
......@@ -5,7 +5,7 @@ import { property } from 'lodash';
import issueableEventHub from '~/issues_list/eventhub';
import LabelsSelect from '~/labels_select';
import MilestoneSelect from '~/milestone_select';
import MilestoneSelect from '~/milestones/milestone_select';
import initIssueStatusSelect from './init_issue_status_select';
import IssuableBulkUpdateActions from './issuable_bulk_update_actions';
import subscriptionSelect from './subscription_select';
......
import $ from 'jquery';
import initDatePicker from '~/behaviors/date_picker';
import GLForm from '../../gl_form';
import ZenMode from '../../zen_mode';
import GLForm from '~/gl_form';
import ZenMode from '~/zen_mode';
export default (initGFM = true) => {
new ZenMode(); // eslint-disable-line no-new
......
/* eslint-disable no-new */
import Milestone from '~/milestone';
import Milestone from '~/milestones/milestone';
import Sidebar from '~/right_sidebar';
import MountMilestoneSidebar from '~/sidebar/mount_milestone_sidebar';
......
import $ from 'jquery';
import createFlash from './flash';
import axios from './lib/utils/axios_utils';
import { __ } from './locale';
import createFlash from '~/flash';
import axios from '~/lib/utils/axios_utils';
import { __ } from '~/locale';
export default class Milestone {
constructor() {
......
......@@ -7,8 +7,8 @@ import Api from '~/api';
import initDeprecatedJQueryDropdown from '~/deprecated_jquery_dropdown';
import { __, sprintf } from '~/locale';
import { sortMilestonesByDueDate } from '~/milestones/milestone_utils';
import axios from './lib/utils/axios_utils';
import { timeFor, parsePikadayDate, dateInWords } from './lib/utils/datetime_utility';
import axios from '~/lib/utils/axios_utils';
import { timeFor, parsePikadayDate, dateInWords } from '~/lib/utils/datetime_utility';
export default class MilestoneSelect {
constructor(currentProject, els, options = {}) {
......
import Milestone from '~/milestone';
import Milestone from '~/milestones/milestone';
import Sidebar from '~/right_sidebar';
import MountMilestoneSidebar from '~/sidebar/mount_milestone_sidebar';
......
import initForm from '~/shared/milestones/form';
import initForm from '~/milestones/form';
initForm();
import initForm from '~/shared/milestones/form';
import initForm from '~/milestones/form';
initForm();
import initDeleteMilestoneModal from '~/pages/milestones/shared/delete_milestone_modal_init';
import initMilestonesShow from '~/pages/milestones/shared/init_milestones_show';
import initDeleteMilestoneModal from '~/milestones/delete_milestone_modal_init';
import initMilestonesShow from '~/milestones/init_milestones_show';
initMilestonesShow();
initDeleteMilestoneModal();
import initDeleteMilestoneModal from './delete_milestone_modal_init';
import initPromoteMilestoneModal from './promote_milestone_modal_init';
export default () => {
initDeleteMilestoneModal();
initPromoteMilestoneModal();
};
......@@ -7,7 +7,7 @@ import GLForm from '~/gl_form';
import initSuggestions from '~/issuable_suggestions';
import initIssuableTypeSelector from '~/issuable_type_selector';
import LabelsSelect from '~/labels_select';
import MilestoneSelect from '~/milestone_select';
import MilestoneSelect from '~/milestones/milestone_select';
import IssuableTemplateSelectors from '~/templates/issuable_template_selectors';
export default () => {
......
......@@ -6,7 +6,7 @@ import ShortcutsNavigation from '~/behaviors/shortcuts/shortcuts_navigation';
import Diff from '~/diff';
import GLForm from '~/gl_form';
import LabelsSelect from '~/labels_select';
import MilestoneSelect from '~/milestone_select';
import MilestoneSelect from '~/milestones/milestone_select';
import IssuableTemplateSelectors from '~/templates/issuable_template_selectors';
export default () => {
......
import initForm from '~/shared/milestones/form';
import initForm from '~/milestones/form';
initForm();
import milestones from '~/pages/milestones/shared';
import initDeleteMilestoneModal from '~/milestones/delete_milestone_modal_init';
import initPromoteMilestoneModal from '~/milestones/promote_milestone_modal_init';
milestones();
initDeleteMilestoneModal();
initPromoteMilestoneModal();
import initForm from '~/shared/milestones/form';
import initForm from '~/milestones/form';
initForm();
import milestones from '~/pages/milestones/shared';
import initMilestonesShow from '~/pages/milestones/shared/init_milestones_show';
import initMilestonesShow from '~/milestones/init_milestones_show';
import initDeleteMilestoneModal from '~/milestones/delete_milestone_modal_init';
import initPromoteMilestoneModal from '~/milestones/promote_milestone_modal_init';
initMilestonesShow();
milestones();
initDeleteMilestoneModal();
initPromoteMilestoneModal();
......@@ -3,8 +3,8 @@ import { TEST_HOST } from 'helpers/test_constants';
import mountComponent from 'helpers/vue_mount_component_helper';
import axios from '~/lib/utils/axios_utils';
import { redirectTo } from '~/lib/utils/url_utility';
import deleteMilestoneModal from '~/pages/milestones/shared/components/delete_milestone_modal.vue';
import eventHub from '~/pages/milestones/shared/event_hub';
import deleteMilestoneModal from '~/milestones/components/delete_milestone_modal.vue';
import eventHub from '~/milestones/event_hub';
jest.mock('~/lib/utils/url_utility', () => ({
...jest.requireActual('~/lib/utils/url_utility'),
......
......@@ -6,7 +6,7 @@ import waitForPromises from 'helpers/wait_for_promises';
import createFlash from '~/flash';
import axios from '~/lib/utils/axios_utils';
import * as urlUtils from '~/lib/utils/url_utility';
import PromoteMilestoneModal from '~/pages/milestones/shared/components/promote_milestone_modal.vue';
import PromoteMilestoneModal from '~/milestones/components/promote_milestone_modal.vue';
jest.mock('~/lib/utils/url_utility');
jest.mock('~/flash');
......
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