Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Drop use of deprecated jquery load #3469

Merged
merged 1 commit into from
Feb 16, 2024
Merged
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
2 changes: 1 addition & 1 deletion src/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
const checkProxyStatus = () => {
checkingProxyStatus = true
const url = Config.get('urlsrc').slice(0, Config.get('urlsrc').indexOf('proxy.php') + 'proxy.php'.length)
$.get(url + '?status').done(function(val) {

Check warning on line 38 in src/document.js

View workflow job for this annotation

GitHub Actions / NPM lint

The global property or function $ was deprecated in Nextcloud 19.0.0
if (val && val.status && val.status !== 'OK') {
if (val.status === 'starting' || val.status === 'stopped') {
document.getElementById('proxyLoadingIcon').classList.add('icon-loading-small')
Expand Down Expand Up @@ -94,7 +94,7 @@

showLoadingIndicator()

$.widget('oc.guestNamePicker', {

Check warning on line 97 in src/document.js

View workflow job for this annotation

GitHub Actions / NPM lint

The global property or function $ was deprecated in Nextcloud 19.0.0
_create() {
hideLoadingIndicator()

Expand All @@ -108,25 +108,25 @@
const btn = '<input style="border-left:none; border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -3px" type="button" id="btn" type="button" value="' + t('richdocuments', 'Set') + '">'
div.innerHTML = nick + btn

$('#documents-content').prepend(div)

Check warning on line 111 in src/document.js

View workflow job for this annotation

GitHub Actions / NPM lint

The global property or function $ was deprecated in Nextcloud 19.0.0
$('#documents-content').prepend(text)

Check warning on line 112 in src/document.js

View workflow job for this annotation

GitHub Actions / NPM lint

The global property or function $ was deprecated in Nextcloud 19.0.0
const setGuestNameSubmit = () => {
const username = $('#nickname').val()

Check warning on line 114 in src/document.js

View workflow job for this annotation

GitHub Actions / NPM lint

The global property or function $ was deprecated in Nextcloud 19.0.0
div.remove()
text.innerText = ''
text.classList.add('icon-loading')
setGuestName(username).then(() => {
$('#documents-content').remove()

Check warning on line 119 in src/document.js

View workflow job for this annotation

GitHub Actions / NPM lint

The global property or function $ was deprecated in Nextcloud 19.0.0
documentsMain.initSession()
})
}

$('#nickname').keyup(function(event) {

Check warning on line 124 in src/document.js

View workflow job for this annotation

GitHub Actions / NPM lint

The global property or function $ was deprecated in Nextcloud 19.0.0
if (event.which === 13) {
setGuestNameSubmit()
}
})
$('#btn').click(() => setGuestNameSubmit())

Check warning on line 129 in src/document.js

View workflow job for this annotation

GitHub Actions / NPM lint

The global property or function $ was deprecated in Nextcloud 19.0.0
},
})

Expand Down Expand Up @@ -184,7 +184,7 @@
showViewer(fileId, title) {
// remove previous viewer, if open, and set a new one
if (documentsMain.isViewerMode) {
$('#revViewer').remove()

Check warning on line 187 in src/document.js

View workflow job for this annotation

GitHub Actions / NPM lint

The global property or function $ was deprecated in Nextcloud 19.0.0
$('#revViewerContainer').prepend($('<div id="revViewer">'))
}

Expand Down Expand Up @@ -365,7 +365,7 @@
}, 45000)
})

$('#loleafletframe').load(function() {
$('#loleafletframe').on('load', function() {
const ViewerToLool = [
'Action_FollowUser',
'Host_VersionRestore',
Expand Down
Loading