diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2020-07-31 09:26:43 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2020-07-31 09:26:43 +0200 |
commit | 0f8aca9d87db9022fe942a3d3fbb11433e152676 (patch) | |
tree | 5b36724719611ebb87b3d9290a51475f32b48e64 /core/src/OC | |
parent | fc31cb8bf2d6cf7ee7af46af38e1b06002f7fb26 (diff) | |
download | nextcloud-server-0f8aca9d87db9022fe942a3d3fbb11433e152676.tar.gz nextcloud-server-0f8aca9d87db9022fe942a3d3fbb11433e152676.zip |
Bump compiled files
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'core/src/OC')
-rw-r--r-- | core/src/OC/apps.js | 2 | ||||
-rw-r--r-- | core/src/OC/l10n.js | 10 | ||||
-rw-r--r-- | core/src/OC/msg.js | 12 | ||||
-rw-r--r-- | core/src/OC/notification.js | 14 | ||||
-rw-r--r-- | core/src/OC/password-confirmation.js | 14 | ||||
-rw-r--r-- | core/src/OC/plugins.js | 8 | ||||
-rw-r--r-- | core/src/OC/util-history.js | 16 | ||||
-rw-r--r-- | core/src/OC/util.js | 18 |
8 files changed, 47 insertions, 47 deletions
diff --git a/core/src/OC/apps.js b/core/src/OC/apps.js index f55a5d03dcc..c7b2c4f5e17 100644 --- a/core/src/OC/apps.js +++ b/core/src/OC/apps.js @@ -13,7 +13,7 @@ import $ from 'jquery' let dynamicSlideToggleEnabled = false const Apps = { - enableDynamicSlideToggle: function() { + enableDynamicSlideToggle() { dynamicSlideToggleEnabled = true }, } diff --git a/core/src/OC/l10n.js b/core/src/OC/l10n.js index 2d4c96d61d0..22bb94e4e1b 100644 --- a/core/src/OC/l10n.js +++ b/core/src/OC/l10n.js @@ -39,7 +39,7 @@ const L10n = { * the translations are loaded * @returns {Promise} promise */ - load: function(appName, callback) { + load(appName, callback) { // already available ? if (hasAppTranslations(appName) || OC.getLocale() === 'en') { const deferred = $.Deferred() @@ -69,7 +69,7 @@ const L10n = { * @param {String} appName name of the app * @param {Object<String,String>} bundle bundle */ - register: function(appName, bundle) { + register(appName, bundle) { registerAppTranslations(appName, bundle, this._getPlural) }, @@ -89,7 +89,7 @@ const L10n = { * @param {bool} [options.sanitize=true] enable/disable sanitization (by default enabled) * @returns {string} */ - translate: function(app, text, vars, count, options) { + translate(app, text, vars, count, options) { const defaultOptions = { escape: true, sanitize: true, @@ -140,7 +140,7 @@ const L10n = { * @param {bool} [options.escape=true] enable/disable auto escape of placeholders (by default enabled) * @returns {string} Translated string */ - translatePlural: function(app, textSingular, textPlural, count, vars, options) { + translatePlural(app, textSingular, textPlural, count, vars, options) { const identifier = '_' + textSingular + '_::_' + textPlural + '_' const bundle = getAppTranslations(app) const value = bundle.translations[identifier] @@ -166,7 +166,7 @@ const L10n = { * @returns {number} * @private */ - _getPlural: function(number) { + _getPlural(number) { let language = OC.getLanguage() if (language === 'pt-BR') { // temporary set a locale for brazilian diff --git a/core/src/OC/msg.js b/core/src/OC/msg.js index d84d0503cb3..9be2b7fd322 100644 --- a/core/src/OC/msg.js +++ b/core/src/OC/msg.js @@ -34,7 +34,7 @@ export default { * * @param {Object} selector Placeholder to display the message in */ - startSaving: function(selector) { + startSaving(selector) { this.startAction(selector, t('core', 'Saving …')) }, @@ -44,7 +44,7 @@ export default { * @param {Object} selector Placeholder to display the message in * @param {string} message Plain text message to display (no HTML allowed) */ - startAction: function(selector, message) { + startAction(selector, message) { $(selector).text(message) .removeClass('success') .removeClass('error') @@ -62,7 +62,7 @@ export default { * @param {string} response.status is being used to decide whether the message * is displayed as an error/success */ - finishedSaving: function(selector, response) { + finishedSaving(selector, response) { this.finishedAction(selector, response) }, @@ -76,7 +76,7 @@ export default { * @param {string} response.status is being used to decide whether the message * is displayed as an error/success */ - finishedAction: function(selector, response) { + finishedAction(selector, response) { if (response.status === 'success') { this.finishedSuccess(selector, response.data.message) } else { @@ -90,7 +90,7 @@ export default { * @param {Object} selector Placeholder to display the message in * @param {string} message Plain text success message to display (no HTML allowed) */ - finishedSuccess: function(selector, message) { + finishedSuccess(selector, message) { $(selector).text(message) .addClass('success') .removeClass('error') @@ -106,7 +106,7 @@ export default { * @param {Object} selector Placeholder to display the message in * @param {string} message Plain text error message to display (no HTML allowed) */ - finishedError: function(selector, message) { + finishedError(selector, message) { $(selector).text(message) .addClass('error') .removeClass('success') diff --git a/core/src/OC/notification.js b/core/src/OC/notification.js index 725aa9d2a15..6207331150f 100644 --- a/core/src/OC/notification.js +++ b/core/src/OC/notification.js @@ -38,7 +38,7 @@ export default { * @param {Function} callback callback function * @deprecated 17.0.0 use the `@nextcloud/dialogs` package */ - setDefault: function(callback) { + setDefault(callback) { this.getDefaultNotificationFunction = callback }, @@ -52,7 +52,7 @@ export default { * @param {Function} [callback] callback * @deprecated 17.0.0 use the `@nextcloud/dialogs` package */ - hide: function($row, callback) { + hide($row, callback) { if (_.isFunction($row)) { // first arg is the callback callback = $row @@ -95,7 +95,7 @@ export default { * @returns {jQuery} jQuery element for notification row * @deprecated 17.0.0 use the `@nextcloud/dialogs` package */ - showHtml: function(html, options) { + showHtml(html, options) { options = options || {} options.isHTML = true options.timeout = (!options.timeout) ? -1 : options.timeout @@ -114,7 +114,7 @@ export default { * @returns {jQuery} jQuery element for notification row * @deprecated 17.0.0 use the `@nextcloud/dialogs` package */ - show: function(text, options) { + show(text, options) { options = options || {} options.timeout = (!options.timeout) ? -1 : options.timeout const toast = showMessage(text, options) @@ -129,7 +129,7 @@ export default { * @returns {jQuery} JQuery element for notificaiton row * @deprecated 17.0.0 use the `@nextcloud/dialogs` package */ - showUpdate: function(text) { + showUpdate(text) { if (this.updatableNotification) { this.updatableNotification.hideToast() } @@ -150,7 +150,7 @@ export default { * @returns {JQuery<any>} the toast element * @deprecated 17.0.0 use the `@nextcloud/dialogs` package */ - showTemporary: function(text, options) { + showTemporary(text, options) { options = options || {} options.timeout = options.timeout || 7 const toast = showMessage(text, options) @@ -163,7 +163,7 @@ export default { * @returns {boolean} * @deprecated 17.0.0 use the `@nextcloud/dialogs` package */ - isHidden: function() { + isHidden() { return !$('#content').find('.toastify').length }, } diff --git a/core/src/OC/password-confirmation.js b/core/src/OC/password-confirmation.js index c74a8df9e97..77977f1efbd 100644 --- a/core/src/OC/password-confirmation.js +++ b/core/src/OC/password-confirmation.js @@ -34,12 +34,12 @@ export default { pageLoadTime: null, - init: function() { + init() { $('.password-confirm-required').on('click', _.bind(this.requirePasswordConfirmation, this)) this.pageLoadTime = moment.now() }, - requiresPasswordConfirmation: function() { + requiresPasswordConfirmation() { const serverTimeDiff = this.pageLoadTime - (window.nc_pageLoad * 1000) const timeSinceLogin = moment.now() - (serverTimeDiff + (window.nc_lastLogin * 1000)) @@ -52,7 +52,7 @@ export default { * @param {Object} options options * @param {Function} rejectCallback error callback function */ - requirePasswordConfirmation: function(callback, options, rejectCallback) { + requirePasswordConfirmation(callback, options, rejectCallback) { options = typeof options !== 'undefined' ? options : {} const defaults = { title: t('core', 'Authentication required'), @@ -102,23 +102,23 @@ export default { this.callback = callback }, - _confirmPassword: function(password, config) { + _confirmPassword(password, config) { const self = this $.ajax({ url: generateUrl('/login/confirm'), data: { - password: password, + password, }, type: 'POST', - success: function(response) { + success(response) { window.nc_lastLogin = response.lastLogin if (_.isFunction(self.callback)) { self.callback() } }, - error: function() { + error() { config.error = t('core', 'Failed to authenticate, try again') OC.PasswordConfirmation.requirePasswordConfirmation(self.callback, config) }, diff --git a/core/src/OC/plugins.js b/core/src/OC/plugins.js index 1c9b59c7419..27c5e6acb2c 100644 --- a/core/src/OC/plugins.js +++ b/core/src/OC/plugins.js @@ -35,7 +35,7 @@ export default { * @param {String} targetName app name / class name to hook into * @param {OC.Plugin} plugin plugin */ - register: function(targetName, plugin) { + register(targetName, plugin) { let plugins = this._plugins[targetName] if (!plugins) { plugins = this._plugins[targetName] = [] @@ -50,7 +50,7 @@ export default { * @param {String} targetName app name / class name to hook into * @returns {Array.<OC.Plugin>} array of plugins */ - getPlugins: function(targetName) { + getPlugins(targetName) { return this._plugins[targetName] || [] }, @@ -61,7 +61,7 @@ export default { * @param {Object} targetObject to be extended * @param {Object} [options] options */ - attach: function(targetName, targetObject, options) { + attach(targetName, targetObject, options) { const plugins = this.getPlugins(targetName) for (let i = 0; i < plugins.length; i++) { if (plugins[i].attach) { @@ -77,7 +77,7 @@ export default { * @param {Object} targetObject to be extended * @param {Object} [options] options */ - detach: function(targetName, targetObject, options) { + detach(targetName, targetObject, options) { const plugins = this.getPlugins(targetName) for (let i = 0; i < plugins.length; i++) { if (plugins[i].detach) { diff --git a/core/src/OC/util-history.js b/core/src/OC/util-history.js index 61fe3fec098..54019b804c2 100644 --- a/core/src/OC/util-history.js +++ b/core/src/OC/util-history.js @@ -45,7 +45,7 @@ export default { * using the params as query string * @param {boolean} [replace=false] whether to replace instead of pushing */ - _pushState: function(params, url, replace) { + _pushState(params, url, replace) { let strParams if (typeof (params) === 'string') { strParams = params @@ -93,7 +93,7 @@ export default { * @param {Object|string} params to append to the URL, can be either a string or a map * @param {string} [url] URL to be used, otherwise the current URL will be used, using the params as query string */ - pushState: function(params, url) { + pushState(params, url) { this._pushState(params, url, false) }, @@ -108,7 +108,7 @@ export default { * @param {string} [url] URL to be used, otherwise the current URL will be used, * using the params as query string */ - replaceState: function(params, url) { + replaceState(params, url) { this._pushState(params, url, true) }, @@ -117,7 +117,7 @@ export default { * * @param {Function} handler handler */ - addOnPopStateHandler: function(handler) { + addOnPopStateHandler(handler) { this._handlers.push(handler) }, @@ -126,7 +126,7 @@ export default { * (workaround for IE8 / IE9) * @returns {string} */ - _parseHashQuery: function() { + _parseHashQuery() { const hash = window.location.hash const pos = hash.indexOf('?') if (pos >= 0) { @@ -139,7 +139,7 @@ export default { return '' }, - _decodeQuery: function(query) { + _decodeQuery(query) { return query.replace(/\+/g, ' ') }, @@ -149,7 +149,7 @@ export default { * * @returns {Object} map of parameters */ - parseUrlQuery: function() { + parseUrlQuery() { const query = this._parseHashQuery() let params // try and parse from URL hash first @@ -161,7 +161,7 @@ export default { return params || {} }, - _onPopState: function(e) { + _onPopState(e) { if (this._cancelPop) { this._cancelPop = false return diff --git a/core/src/OC/util.js b/core/src/OC/util.js index a8666808083..aba47065e54 100644 --- a/core/src/OC/util.js +++ b/core/src/OC/util.js @@ -72,7 +72,7 @@ export default { * * */ - computerFileSize: function(string) { + computerFileSize(string) { if (typeof string !== 'string') { return null } @@ -116,7 +116,7 @@ export default { * @param {string} format date format, see momentjs docs * @returns {string} timestamp formatted as requested */ - formatDate: function(timestamp, format) { + formatDate(timestamp, format) { console.warn('OC.Util.formatDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment') format = format || 'LLL' return moment(timestamp).format(format) @@ -126,7 +126,7 @@ export default { * @param {string|number} timestamp timestamp * @returns {string} human readable difference from now */ - relativeModifiedDate: function(timestamp) { + relativeModifiedDate(timestamp) { console.warn('OC.Util.relativeModifiedDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment') const diff = moment().diff(moment(timestamp)) if (diff >= 0 && diff < 45000) { @@ -140,7 +140,7 @@ export default { * * @returns {bool} true if this is IE, false otherwise */ - isIE: function() { + isIE() { return $('html').hasClass('ie') }, @@ -149,7 +149,7 @@ export default { * * @returns {int} width of scrollbar */ - getScrollBarWidth: function() { + getScrollBarWidth() { if (this._scrollBarWidth) { return this._scrollBarWidth } @@ -189,7 +189,7 @@ export default { * @param {Date} date date * @returns {Date} date with stripped time */ - stripTime: function(date) { + stripTime(date) { // FIXME: likely to break when crossing DST // would be better to use a library like momentJS return new Date(date.getFullYear(), date.getMonth(), date.getDate()) @@ -202,7 +202,7 @@ export default { * @returns {number} -1 if b comes before a, 1 if a comes before b * or 0 if the strings are identical */ - naturalSortCompare: function(a, b) { + naturalSortCompare(a, b) { let x const aa = chunkify(a) const bb = chunkify(b) @@ -229,7 +229,7 @@ export default { * @param {function} callback function to call on success * @param {integer} interval in milliseconds */ - waitFor: function(callback, interval) { + waitFor(callback, interval) { const internalCallback = function() { if (callback() !== true) { setTimeout(internalCallback, interval) @@ -245,7 +245,7 @@ export default { * @param {string} value value of the cookie * @returns {boolean} true if the cookie with the given name has the given value */ - isCookieSetToValue: function(name, value) { + isCookieSetToValue(name, value) { const cookies = document.cookie.split(';') for (let i = 0; i < cookies.length; i++) { const cookie = cookies[i].split('=') |