updated imports

This commit is contained in:
Phil Hughes 2017-12-11 12:28:11 +00:00
parent a5d2732ce9
commit 6bb4442054
No known key found for this signature in database
GPG key ID: 32245528C52E0F9F
14 changed files with 29 additions and 29 deletions

View file

@ -1,4 +1,4 @@
import * as urlUtils from '../lib/utils/url_utility';
import { visitUrl } from '../lib/utils/url_utility';
import Flash from '../flash';
import FilteredSearchContainer from './container';
import RecentSearchesRoot from './recent_searches_root';
@ -567,7 +567,7 @@ class FilteredSearchManager {
if (this.updateObject) {
this.updateObject(parameterizedUrl);
} else {
urlUtils.visitUrl(parameterizedUrl);
visitUrl(parameterizedUrl);
}
}

View file

@ -2,7 +2,7 @@
/* global fuzzaldrinPlus */
import _ from 'underscore';
import fuzzaldrinPlus from 'fuzzaldrin-plus';
import * as urlUtils from './lib/utils/url_utility';
import { visitUrl } from './lib/utils/url_utility';
import { isObject } from './lib/utils/type_utility';
var GitLabDropdown, GitLabDropdownFilter, GitLabDropdownRemote, GitLabDropdownInput;
@ -853,7 +853,7 @@ GitLabDropdown = (function() {
if ($el.length) {
var href = $el.attr('href');
if (href && href !== '#') {
urlUtils.visitUrl(href);
visitUrl(href);
} else {
$el.trigger('click');
}

View file

@ -5,7 +5,7 @@ import eventHub from '../event_hub';
import { getParameterByName } from '../../lib/utils/common_utils';
import loadingIcon from '../../vue_shared/components/loading_icon.vue';
import { COMMON_STR } from '../constants';
import * as utils from '../../lib/utils/url_utility';
import { mergeUrlParams } from '../../lib/utils/url_utility';
import groupsComponent from './groups.vue';
export default {
@ -93,7 +93,7 @@ export default {
this.isLoading = false;
$.scrollTo(0);
const currentPath = utils.mergeUrlParams({ page }, window.location.href);
const currentPath = mergeUrlParams({ page }, window.location.href);
window.history.replaceState({
page: currentPath,
}, document.title, currentPath);

View file

@ -1,5 +1,5 @@
<script>
import * as urlUtils from '../../lib/utils/url_utility';
import { visitUrl } from '../../lib/utils/url_utility';
import tooltip from '../../vue_shared/directives/tooltip';
import identicon from '../../vue_shared/components/identicon.vue';
import eventHub from '../event_hub';
@ -61,7 +61,7 @@ export default {
if (this.hasChildren) {
eventHub.$emit('toggleChildren', this.group);
} else {
urlUtils.visitUrl(this.group.relativePath);
visitUrl(this.group.relativePath);
}
}
},

View file

@ -1,6 +1,6 @@
<script>
import Visibility from 'visibilityjs';
import * as urlUtils from '../../lib/utils/url_utility';
import { visitUrl } from '../../lib/utils/url_utility';
import Poll from '../../lib/utils/poll';
import eventHub from '../event_hub';
import Service from '../services/index';
@ -177,7 +177,7 @@ export default {
.then(data => this.checkForSpam(data))
.then((data) => {
if (location.pathname !== data.web_url) {
urlUtils.visitUrl(data.web_url);
visitUrl(data.web_url);
}
return this.service.getData();
@ -212,7 +212,7 @@ export default {
// Stop the poll so we don't get 404's with the issuable not existing
this.poll.stop();
urlUtils.visitUrl(data.web_url);
visitUrl(data.web_url);
})
.catch(() => {
eventHub.$emit('close.form');

View file

@ -1,5 +1,5 @@
import _ from 'underscore';
import * as urlUtils from './lib/utils/url_utility';
import { visitUrl } from './lib/utils/url_utility';
import bp from './breakpoints';
import { bytesToKiB } from './lib/utils/number_utils';
import { setCiStatusFavicon } from './lib/utils/common_utils';
@ -210,7 +210,7 @@ export default class Job {
}
if (log.status !== this.buildStatus) {
urlUtils.visitUrl(this.pagePath);
visitUrl(this.pagePath);
}
})
.fail(() => {

View file

@ -11,7 +11,7 @@ import {
handleLocationHash,
isMetaClick,
} from './lib/utils/common_utils';
import * as urlUtils from './lib/utils/url_utility';
import { getLocationHash } from './lib/utils/url_utility';
import initDiscussionTab from './image_diff/init_discussion_tab';
import Diff from './diff';
@ -318,7 +318,7 @@ import Diff from './diff';
// Scroll any linked note into view
// Similar to `toggler_behavior` in the discussion tab
const hash = urlUtils.getLocationHash();
const hash = getLocationHash();
const anchor = hash && $container.find(`.note[id="${hash}"]`);
if (anchor && anchor.length > 0) {
const notesContent = anchor.closest('.notes_content');

View file

@ -16,7 +16,7 @@ import Autosize from 'autosize';
import 'vendor/jquery.caret'; // required by jquery.atwho
import 'vendor/jquery.atwho';
import AjaxCache from '~/lib/utils/ajax_cache';
import * as urlUtils from './lib/utils/url_utility';
import { getLocationHash } from './lib/utils/url_utility';
import Flash from './flash';
import CommentTypeToggle from './comment_type_toggle';
import GLForm from './gl_form';
@ -331,7 +331,7 @@ export default class Notes {
}
static updateNoteTargetSelector($note) {
const hash = urlUtils.getLocationHash();
const hash = getLocationHash();
// Needs to be an explicit true/false for the jQuery `toggleClass(force)`
const addTargetClass = Boolean(hash && $note.filter(`#${hash}`).length > 0);
$note.toggleClass('target', addTargetClass);

View file

@ -1,5 +1,5 @@
import { getParameterByName } from '~/lib/utils/common_utils';
import * as utils from './lib/utils/url_utility';
import { removeParams } from './lib/utils/url_utility';
(() => {
const ENDLESS_SCROLL_BOTTOM_PX = 400;
@ -7,7 +7,7 @@ import * as utils from './lib/utils/url_utility';
const Pager = {
init(limit = 0, preload = false, disable = false, prepareData = $.noop, callback = $.noop) {
this.url = $('.content_list').data('href') || utils.removeParams(['limit', 'offset']);
this.url = $('.content_list').data('href') || removeParams(['limit', 'offset']);
this.limit = limit;
this.offset = parseInt(getParameterByName('offset'), 10) || this.limit;
this.disable = disable;

View file

@ -1,10 +1,10 @@
import Vue from 'vue';
import * as urlUtils from '../../lib/utils/url_utility';
import { visitUrl } from '../../lib/utils/url_utility';
import flash from '../../flash';
import service from '../services';
import * as types from './mutation_types';
export const redirectToUrl = (_, url) => urlUtils.visitUrl(url);
export const redirectToUrl = (_, url) => visitUrl(url);
export const setInitialData = ({ commit }, data) => commit(types.SET_INITIAL_DATA, data);

View file

@ -1,4 +1,4 @@
import * as urlUtils from '../../../lib/utils/url_utility';
import { visitUrl } from '../../../lib/utils/url_utility';
import { normalizeHeaders } from '../../../lib/utils/common_utils';
import flash from '../../../flash';
import service from '../../services';
@ -74,7 +74,7 @@ export const clickedTreeRow = ({ commit, dispatch }, row) => {
} else if (row.type === 'submodule') {
commit(types.TOGGLE_LOADING, row);
urlUtils.visitUrl(row.url);
visitUrl(row.url);
} else if (row.type === 'blob' && row.opened) {
dispatch('setFileActive', row);
} else {

View file

@ -1,4 +1,4 @@
import * as urlUtils from '../lib/utils/url_utility';
import { visitUrl } from '../lib/utils/url_utility';
import Flash from '../flash';
import Service from './services/sidebar_service';
import Store from './stores/sidebar_store';
@ -82,7 +82,7 @@ export default class SidebarMediator {
.then(response => response.json())
.then((data) => {
if (location.pathname !== data.web_url) {
urlUtils.visitUrl(data.web_url);
visitUrl(data.web_url);
}
});
}

View file

@ -1,5 +1,5 @@
/* eslint-disable class-methods-use-this, no-unneeded-ternary, quote-props */
import * as urlUtils from './lib/utils/url_utility';
import { visitUrl } from './lib/utils/url_utility';
import UsersSelect from './users_select';
import { isMetaClick } from './lib/utils/common_utils';
@ -150,7 +150,7 @@ export default class Todos {
window.open(todoLink, windowTarget);
} else {
urlUtils.visitUrl(todoLink);
visitUrl(todoLink);
}
}
}

View file

@ -1,5 +1,5 @@
import '~/lib/utils/datetime_utility';
import * as urlUtils from '../../lib/utils/url_utility';
import { visitUrl } from '../../lib/utils/url_utility';
import Flash from '../../flash';
import MemoryUsage from './mr_widget_memory_usage';
import StatusIcon from './mr_widget_status_icon';
@ -37,7 +37,7 @@ export default {
.then(res => res.json())
.then((res) => {
if (res.redirect_url) {
urlUtils.visitUrl(res.redirect_url);
visitUrl(res.redirect_url);
}
})
.catch(() => {