From 80a5e0a735c76a031dda0dade59c2076154b5267 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Mon, 1 May 2017 00:45:41 -0300 Subject: [PATCH] Use dot notation for array access - JSLint recommendation Signed-off-by: Morris Jobke --- core/js/files/client.js | 2 +- core/js/files/iedavclient.js | 2 +- core/js/js.js | 4 ++-- core/js/lostpassword.js | 4 ++-- core/js/public/appconfig.js | 4 ++-- core/js/share.js | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/js/files/client.js b/core/js/files/client.js index e8cf5b9bdb..da8a1205e4 100644 --- a/core/js/files/client.js +++ b/core/js/files/client.js @@ -725,7 +725,7 @@ }; if (!allowOverwrite) { - headers['Overwrite'] = 'F'; + headers.Overwrite = 'F'; } this._client.request( diff --git a/core/js/files/iedavclient.js b/core/js/files/iedavclient.js index a0185fb3be..4e2c17abc5 100644 --- a/core/js/files/iedavclient.js +++ b/core/js/files/iedavclient.js @@ -32,7 +32,7 @@ headers = headers || {}; if (this.userName) { - headers['Authorization'] = 'Basic ' + btoa(this.userName + ':' + this.password); + headers.Authorization = 'Basic ' + btoa(this.userName + ':' + this.password); // xhr.open(method, this.resolveUrl(url), true, this.userName, this.password); } xhr.open(method, this.resolveUrl(url), true); diff --git a/core/js/js.js b/core/js/js.js index d601f79033..7878ac671f 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -2366,10 +2366,10 @@ jQuery.fn.tipsy = function(argument) { options.trigger = argument.trigger; } if(argument.delayIn) { - options.delay["show"] = argument.delayIn; + options.delay.show = argument.delayIn; } if(argument.delayOut) { - options.delay["hide"] = argument.delayOut; + options.delay.hide = argument.delayOut; } if(argument.html) { options.html = true; diff --git a/core/js/lostpassword.js b/core/js/lostpassword.js index 4690b86f99..2f96911f16 100644 --- a/core/js/lostpassword.js +++ b/core/js/lostpassword.js @@ -22,8 +22,8 @@ OC.Lostpassword = { if (!$('#user').val().length){ $('#submit').trigger('click'); } else { - if (OC.config['lost_password_link']) { - window.location = OC.config['lost_password_link']; + if (OC.config.lost_password_link) { + window.location = OC.config.lost_password_link; } else { $.post( OC.generateUrl('/lostpassword/email'), diff --git a/core/js/public/appconfig.js b/core/js/public/appconfig.js index bba39c8b80..7f00f03861 100644 --- a/core/js/public/appconfig.js +++ b/core/js/public/appconfig.js @@ -79,7 +79,7 @@ OCP.AppConfig = { */ getValue: function(app, key, defaultValue, options) { options = options || {}; - options['data'] = { + options.data = { defaultValue: defaultValue }; @@ -97,7 +97,7 @@ OCP.AppConfig = { */ setValue: function(app, key, value, options) { options = options || {}; - options['data'] = { + options.data = { value: value }; diff --git a/core/js/share.js b/core/js/share.js index 194eba5fbd..87f40c419f 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -192,7 +192,7 @@ OC.Share = _.extend(OC.Share || {}, { } if (shares) { OC.Share.statuses[itemSource] = OC.Share.statuses[itemSource] || {}; - OC.Share.statuses[itemSource]['link'] = link; + OC.Share.statuses[itemSource].link = link; } else { delete OC.Share.statuses[itemSource]; }