Fix some linter warning

Part of my ongoing battle against deprecation messages.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
This commit is contained in:
Roeland Jago Douma 2020-06-02 14:00:55 +02:00
parent 1c7d089434
commit 3bca70999a
No known key found for this signature in database
GPG Key ID: F941078878347C0C
20 changed files with 101 additions and 159 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

61
core/js/dist/login.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

81
core/js/dist/main.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -14,6 +14,7 @@ import DOMPurify from 'dompurify'
import Handlebars from 'handlebars'
import identity from 'lodash/fp/identity'
import escapeHTML from 'escape-html'
import { generateFilePath } from '@nextcloud/router'
import OC from './index'
import {
@ -49,7 +50,7 @@ const L10n = {
}
const self = this
const url = OC.filePath(appName, 'l10n', OC.getLocale() + '.json')
const url = generateFilePath(appName, 'l10n', OC.getLocale() + '.json')
// load JSON translation bundle per AJAX
return $.get(url)

View File

@ -20,6 +20,7 @@
*/
import $ from 'jquery'
import { generateFilePath } from '@nextcloud/router'
const loadedScripts = {}
const loadedStyles = []
@ -37,7 +38,7 @@ export const addScript = (app, script, ready) => {
console.warn('OC.addScript is deprecated, use OCP.Loader.loadScript instead')
let deferred
const path = OC.filePath(app, 'js', script + '.js')
const path = generateFilePath(app, 'js', script + '.js')
if (!loadedScripts[path]) {
deferred = $.Deferred()
$.getScript(path, () => deferred.resolve())
@ -59,7 +60,7 @@ export const addScript = (app, script, ready) => {
export const addStyle = (app, style) => {
console.warn('OC.addStyle is deprecated, use OCP.Loader.loadStylesheet instead')
const path = OC.filePath(app, 'css', style + '.css')
const path = generateFilePath(app, 'css', style + '.css')
if (loadedStyles.indexOf(path) === -1) {
loadedStyles.push(path)
if (document.createStyleSheet) {

View File

@ -22,6 +22,7 @@
import _ from 'underscore'
import $ from 'jquery'
import moment from 'moment'
import { generateUrl } from '@nextcloud/router'
import OC from './index'
@ -105,7 +106,7 @@ export default {
const self = this
$.ajax({
url: OC.generateUrl('/login/confirm'),
url: generateUrl('/login/confirm'),
data: {
password: password,
},

View File

@ -19,6 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import $ from 'jquery'
/**
* Parses a URL query string into a JS map
* @param {string} queryString query string in the format param1=1234&param2=abcde&param3=xyz