Apply JavaScript rule to use the dot notation

We were using the dot notation in most places, but not everywhere.
This commit is contained in:
Javi Martín
2019-07-03 02:32:47 +02:00
parent 25bfd01e69
commit af6a494344
6 changed files with 14 additions and 13 deletions

View File

@@ -11,9 +11,9 @@
$("#nested-documents").on("cocoon:after-insert", function(e, nested_document) {
var input;
input = $(nested_document).find(".js-document-attachment");
input["lockUpload"] = $(nested_document).closest("#nested-documents").find(".document:visible").length >= $("#nested-documents").data("max-documents-allowed");
input.lockUpload = $(nested_document).closest("#nested-documents").find(".document:visible").length >= $("#nested-documents").data("max-documents-allowed");
App.Documentable.initializeDirectUploadInput(input);
if (input["lockUpload"]) {
if (input.lockUpload) {
App.Documentable.lockUploads();
}
});
@@ -64,7 +64,7 @@
event.stopPropagation();
App.Documentable.doDeleteCachedAttachmentRequest(this.href, data);
});
if (input["lockUpload"]) {
if (input.lockUpload) {
App.Documentable.showNotice();
}
},