Commit 49d16fd2 authored by Coung Ngo's avatar Coung Ngo Committed by Jacques Erasmus

Move labels code to ~/labels

parent f8382631
......@@ -4,7 +4,7 @@ import $ from 'jquery';
import { property } from 'lodash';
import issueableEventHub from '~/issues_list/eventhub';
import LabelsSelect from '~/labels_select';
import LabelsSelect from '~/labels/labels_select';
import MilestoneSelect from '~/milestones/milestone_select';
import initIssueStatusSelect from './init_issue_status_select';
import IssuableBulkUpdateActions from './issuable_bulk_update_actions';
......
/* eslint-disable func-names */
import $ from 'jquery';
import Api from './api';
import { humanize } from './lib/utils/text_utility';
import Api from '~/api';
import { humanize } from '~/lib/utils/text_utility';
export default class CreateLabelDropdown {
constructor($el, namespacePath, projectPath) {
......
import $ from 'jquery';
import { __ } from '~/locale';
import { fixTitle, hide } from '~/tooltips';
import createFlash from './flash';
import axios from './lib/utils/axios_utils';
import createFlash from '~/flash';
import axios from '~/lib/utils/axios_utils';
const tooltipTitles = {
group: __('Unsubscribe at group level'),
......
......@@ -3,9 +3,9 @@
import $ from 'jquery';
import Sortable from 'sortablejs';
import { dispose } from '~/tooltips';
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 LabelManager {
constructor({ togglePriorityButton, prioritizedLabels, otherLabels } = {}) {
......
......@@ -6,10 +6,10 @@ import { difference, isEqual, escape, sortBy, template, union } from 'lodash';
import initDeprecatedJQueryDropdown from '~/deprecated_jquery_dropdown';
import IssuableBulkUpdateActions from '~/issuable_bulk_update_sidebar/issuable_bulk_update_actions';
import { isScopedLabel } from '~/lib/utils/common_utils';
import createFlash from '~/flash';
import axios from '~/lib/utils/axios_utils';
import { sprintf, __ } from '~/locale';
import CreateLabelDropdown from './create_label';
import createFlash from './flash';
import axios from './lib/utils/axios_utils';
import { sprintf, __ } from './locale';
export default class LabelsSelect {
constructor(els, options = {}) {
......
import $ from 'jquery';
import { fixTitle } from '~/tooltips';
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';
const tooltipTitles = {
group: {
......
import Labels from '../../../../labels';
import Labels from '~/labels/labels';
new Labels(); // eslint-disable-line no-new
import Labels from '../../../../labels';
import Labels from '~/labels/labels';
new Labels(); // eslint-disable-line no-new
import Labels from 'ee_else_ce/labels';
import Labels from 'ee_else_ce/labels/labels';
// eslint-disable-next-line no-new
new Labels();
import initDeleteLabelModal from '~/delete_label_modal';
import initLabels from '~/init_labels';
import initDeleteLabelModal from '~/labels/delete_label_modal';
import initLabels from '~/labels/init_labels';
initLabels();
initDeleteLabelModal();
import Labels from 'ee_else_ce/labels';
import Labels from 'ee_else_ce/labels/labels';
// eslint-disable-next-line no-new
new Labels();
......@@ -6,7 +6,7 @@ import ShortcutsNavigation from '~/behaviors/shortcuts/shortcuts_navigation';
import GLForm from '~/gl_form';
import initSuggestions from '~/issues/suggestions';
import initIssuableTypeSelector from '~/issues/type_selector';
import LabelsSelect from '~/labels_select';
import LabelsSelect from '~/labels/labels_select';
import MilestoneSelect from '~/milestones/milestone_select';
import IssuableTemplateSelectors from '~/templates/issuable_template_selectors';
......
import Labels from 'ee_else_ce/labels';
import Labels from 'ee_else_ce/labels/labels';
new Labels(); // eslint-disable-line no-new
import Vue from 'vue';
import initDeleteLabelModal from '~/delete_label_modal';
import initLabels from '~/init_labels';
import initDeleteLabelModal from '~/labels/delete_label_modal';
import initLabels from '~/labels/init_labels';
import { BV_SHOW_MODAL } from '~/lib/utils/constants';
import Translate from '~/vue_shared/translate';
import PromoteLabelModal from '../components/promote_label_modal.vue';
......
import Labels from 'ee_else_ce/labels';
import Labels from 'ee_else_ce/labels/labels';
// eslint-disable-next-line no-new
new Labels();
......@@ -5,7 +5,7 @@ import IssuableForm from 'ee_else_ce/issuable_form';
import ShortcutsNavigation from '~/behaviors/shortcuts/shortcuts_navigation';
import Diff from '~/diff';
import GLForm from '~/gl_form';
import LabelsSelect from '~/labels_select';
import LabelsSelect from '~/labels/labels_select';
import MilestoneSelect from '~/milestones/milestone_select';
import IssuableTemplateSelectors from '~/templates/issuable_template_selectors';
......
import $ from 'jquery';
import Labels from '~/labels';
import Labels from '~/labels/labels';
import { isScopedLabel } from '~/lib/utils/common_utils';
class LabelsEE extends Labels {
......
import { TEST_HOST } from 'helpers/test_constants';
import initDeleteLabelModal from '~/delete_label_modal';
import initDeleteLabelModal from '~/labels/delete_label_modal';
describe('DeleteLabelModal', () => {
const buttons = [
......
import $ from 'jquery';
import LabelsSelect from '~/labels_select';
import LabelsSelect from '~/labels/labels_select';
const mockUrl = '/foo/bar/url';
......
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