Skip to content
Snippets Groups Projects
Unverified Commit 2e0199a0 authored by Morris Jobke's avatar Morris Jobke Committed by GitHub
Browse files

Merge pull request #15292 from nextcloud/refactor/oc-navigation-methods-bundle

Move OC navigation methods to the bundle
parents e727e017 1ee03bd6
No related branches found
No related tags found
No related merge requests found
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -206,21 +206,6 @@ Object.assign(window.OC, { ...@@ -206,21 +206,6 @@ Object.assign(window.OC, {
return !!(file.match(oc_config.blacklist_files_regex)); return !!(file.match(oc_config.blacklist_files_regex));
}, },
/**
* Redirect to the target URL, can also be used for downloads.
* @param {string} targetURL URL to redirect to
*/
redirect: function(targetURL) {
window.location = targetURL;
},
/**
* Reloads the current page
*/
reload: function() {
window.location.reload();
},
/** /**
* Protocol that is used to access this Nextcloud instance * Protocol that is used to access this Nextcloud instance
* @return {string} Used protocol * @return {string} Used protocol
......
...@@ -31,6 +31,7 @@ import PasswordConfirmation from './password-confirmation' ...@@ -31,6 +31,7 @@ import PasswordConfirmation from './password-confirmation'
import Plugins from './plugins' import Plugins from './plugins'
import search from './search' import search from './search'
import Util from './util' import Util from './util'
import {redirect, reload} from './navigation'
/** @namespace OC */ /** @namespace OC */
export default { export default {
...@@ -46,4 +47,6 @@ export default { ...@@ -46,4 +47,6 @@ export default {
Plugins, Plugins,
search, search,
Util, Util,
redirect,
reload,
} }
/*
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
*
* @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Redirect to the target URL, can also be used for downloads.
* @param {string} targetURL URL to redirect to
*/
export const redirect = targetURL => window.location = targetURL
/**
* Reloads the current page
*/
export const reload = () => window.location.reload()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment