Merge pull request #4611 from nextcloud/js-use-dot-notation

Use dot notation for array access - JSLint recommendation
This commit is contained in:
Roeland Jago Douma 2017-05-02 21:44:44 +02:00 committed by GitHub
commit 6d9cb62f79
6 changed files with 9 additions and 9 deletions

View File

@ -725,7 +725,7 @@
};
if (!allowOverwrite) {
headers['Overwrite'] = 'F';
headers.Overwrite = 'F';
}
this._client.request(

View File

@ -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);

View File

@ -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;

View File

@ -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'),

View File

@ -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
};

View File

@ -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];
}