diff options
author | Phil Hughes <me@iamphill.com> | 2017-12-11 12:28:11 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-12-11 12:28:11 +0000 |
commit | 6bb4442054a3804224f84c63fa7c5657508c4ec6 (patch) | |
tree | 87e7806344b74e7954e7284c045a1789873f7280 /app | |
parent | a5d2732ce91e24fbb7ea8c9b087ba3c7476edc09 (diff) | |
download | gitlab-ce-6bb4442054a3804224f84c63fa7c5657508c4ec6.tar.gz |
updated importsurl-utility-es-module
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/filtered_search/filtered_search_manager.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/gl_dropdown.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/groups/components/app.vue | 4 | ||||
-rw-r--r-- | app/assets/javascripts/groups/components/group_item.vue | 4 | ||||
-rw-r--r-- | app/assets/javascripts/issue_show/components/app.vue | 6 | ||||
-rw-r--r-- | app/assets/javascripts/job.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/merge_request_tabs.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/notes.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/pager.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/repo/stores/actions.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/repo/stores/actions/tree.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/sidebar/sidebar_mediator.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/todos.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/vue_merge_request_widget/components/mr_widget_deployment.js | 4 |
14 files changed, 29 insertions, 29 deletions
diff --git a/app/assets/javascripts/filtered_search/filtered_search_manager.js b/app/assets/javascripts/filtered_search/filtered_search_manager.js index b10ca38be21..2ba85c7da97 100644 --- a/app/assets/javascripts/filtered_search/filtered_search_manager.js +++ b/app/assets/javascripts/filtered_search/filtered_search_manager.js @@ -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); } } diff --git a/app/assets/javascripts/gl_dropdown.js b/app/assets/javascripts/gl_dropdown.js index 381353c4031..cf4a70e321e 100644 --- a/app/assets/javascripts/gl_dropdown.js +++ b/app/assets/javascripts/gl_dropdown.js @@ -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'); } diff --git a/app/assets/javascripts/groups/components/app.vue b/app/assets/javascripts/groups/components/app.vue index 17bcced944d..241e026b84c 100644 --- a/app/assets/javascripts/groups/components/app.vue +++ b/app/assets/javascripts/groups/components/app.vue @@ -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); diff --git a/app/assets/javascripts/groups/components/group_item.vue b/app/assets/javascripts/groups/components/group_item.vue index 7a8d5b2c483..6421547bbde 100644 --- a/app/assets/javascripts/groups/components/group_item.vue +++ b/app/assets/javascripts/groups/components/group_item.vue @@ -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); } } }, diff --git a/app/assets/javascripts/issue_show/components/app.vue b/app/assets/javascripts/issue_show/components/app.vue index eac15ed5aac..fd1a50dd533 100644 --- a/app/assets/javascripts/issue_show/components/app.vue +++ b/app/assets/javascripts/issue_show/components/app.vue @@ -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'); diff --git a/app/assets/javascripts/job.js b/app/assets/javascripts/job.js index a41ea875570..06b0e02a870 100644 --- a/app/assets/javascripts/job.js +++ b/app/assets/javascripts/job.js @@ -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(() => { diff --git a/app/assets/javascripts/merge_request_tabs.js b/app/assets/javascripts/merge_request_tabs.js index 54f4e33437d..589e65647ac 100644 --- a/app/assets/javascripts/merge_request_tabs.js +++ b/app/assets/javascripts/merge_request_tabs.js @@ -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'); diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index 4abbe6049b1..2a570ac705e 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -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); diff --git a/app/assets/javascripts/pager.js b/app/assets/javascripts/pager.js index 3aa7be070d8..6792b984cc5 100644 --- a/app/assets/javascripts/pager.js +++ b/app/assets/javascripts/pager.js @@ -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; diff --git a/app/assets/javascripts/repo/stores/actions.js b/app/assets/javascripts/repo/stores/actions.js index 357f30dd1a2..af5dcf054ef 100644 --- a/app/assets/javascripts/repo/stores/actions.js +++ b/app/assets/javascripts/repo/stores/actions.js @@ -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); diff --git a/app/assets/javascripts/repo/stores/actions/tree.js b/app/assets/javascripts/repo/stores/actions/tree.js index 1c558ab6f12..7c251e26bed 100644 --- a/app/assets/javascripts/repo/stores/actions/tree.js +++ b/app/assets/javascripts/repo/stores/actions/tree.js @@ -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 { diff --git a/app/assets/javascripts/sidebar/sidebar_mediator.js b/app/assets/javascripts/sidebar/sidebar_mediator.js index 7d7c7cb9464..ed7ab09be06 100644 --- a/app/assets/javascripts/sidebar/sidebar_mediator.js +++ b/app/assets/javascripts/sidebar/sidebar_mediator.js @@ -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); } }); } diff --git a/app/assets/javascripts/todos.js b/app/assets/javascripts/todos.js index d0afe981494..748caecf153 100644 --- a/app/assets/javascripts/todos.js +++ b/app/assets/javascripts/todos.js @@ -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); } } } diff --git a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_deployment.js b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_deployment.js index 72cf92b8938..32028a4a609 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_deployment.js +++ b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_deployment.js @@ -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(() => { |