Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions core/src/OC/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ import Settings from './settings.js'
import { theme } from './theme.js'
import Util from './util.js'
import webroot from './webroot.js'
import {
ajaxConnectionLostHandler,
processAjaxError,
registerXHRForErrorProcessing,
} from './xhr-error.js'

/** @namespace OC */
export default {
Expand Down Expand Up @@ -125,13 +120,11 @@ export default {
L10N,

/**
* Ajax error handlers
* This is already handled by `interceptRequests` in `core/src/init.js`.
*
* @todo remove from here and keep internally -> requires new tests
* @deprecated 33.0.0 - unused by Nextcloud and only a stub remains. Just remove usage.
*/
_ajaxConnectionLostHandler: ajaxConnectionLostHandler,
_processAjaxError: processAjaxError,
registerXHRForErrorProcessing,
registerXHRForErrorProcessing: () => {},

/**
* Capabilities
Expand Down
102 changes: 0 additions & 102 deletions core/src/OC/xhr-error.js

This file was deleted.

30 changes: 0 additions & 30 deletions core/src/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,36 +67,6 @@ export function initCore() {
interceptRequests()
initFallbackClipboardAPI()

$(window).on('unload.main', () => {
OC._unloadCalled = true
})
$(window).on('beforeunload.main', () => {
// super-trick thanks to http://stackoverflow.com/a/4651049
// in case another handler displays a confirmation dialog (ex: navigating away
// during an upload), there are two possible outcomes: user clicked "ok" or
// "cancel"

// first timeout handler is called after unload dialog is closed
setTimeout(() => {
OC._userIsNavigatingAway = true

// second timeout event is only called if user cancelled (Chrome),
// but in other browsers it might still be triggered, so need to
// set a higher delay...
setTimeout(() => {
if (!OC._unloadCalled) {
OC._userIsNavigatingAway = false
}
}, 10000)
}, 1)
})
$(document).on('ajaxError.main', function(event, request, settings) {
if (settings && settings.allowAuthErrors) {
return
}
OC._processAjaxError(request)
})

initSessionHeartBeat()

OC.registerMenu($('#expand'), $('#expanddiv'), false, true)
Expand Down
4 changes: 2 additions & 2 deletions dist/7883-7883.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/7883-7883.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/core-login.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-login.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/core-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-main.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/core-unsupported-browser-redirect.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/core-unsupported-browser-redirect.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/core-unsupported-browser.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-unsupported-browser.js.map

Large diffs are not rendered by default.

Loading