-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use double quotes in CoffeeScript files #1900
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
We use it in Ruby, and it will make it easier to change all quotes to double quotes in CoffeeScript files.
As we do in the rest of the application. Note we cannot add a rule enforcing double quotes because CoffeeScript Lint does not have such rule.
384de2b
to
9a1ebdb
Compare
@@ -21,10 +21,10 @@ App.WatchFormChanges = | |||
if App.WatchFormChanges.forms().length == 0 || App.WatchFormChanges.msg() == undefined | |||
return | |||
|
|||
$(document).off('page:before-change').on('page:before-change', (e) -> App.WatchFormChanges.checkChanges(e)) | |||
$(document).off("page:before-change").on("page:before-change", (e) -> App.WatchFormChanges.checkChanges(e)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line exceeds maximum allowed length. Length is 111, max is 100.
success: (data) -> | ||
e.target.bindPopup(getPopupContent(data)).openPopup() | ||
|
||
getPopupContent = (data) -> | ||
content = "<a href='/budgets/#{data['budget_id']}/investments/#{data['investment_id']}'>#{data['investment_title']}</a>" | ||
content = "<a href='/budgets/#{data["budget_id"]}/investments/#{data["investment_id"]}'>#{data["investment_title"]}</a>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line exceeds maximum allowed length. Length is 126, max is 100.
_paq.push(['setCustomDimension', customDimensionId = 5, customDimensionValue = district]) | ||
_paq.push(["setUserId", current_user_id]) | ||
_paq.push(["setCustomDimension", customDimensionId = 1, customDimensionValue = verification_level]) | ||
_paq.push(["setCustomDimension", customDimensionId = 2, customDimensionValue = current_user_id]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line exceeds maximum allowed length. Length is 102, max is 100.
_paq.push(['setCustomDimension', customDimensionId = 4, customDimensionValue = age]) | ||
_paq.push(['setCustomDimension', customDimensionId = 5, customDimensionValue = district]) | ||
_paq.push(["setUserId", current_user_id]) | ||
_paq.push(["setCustomDimension", customDimensionId = 1, customDimensionValue = verification_level]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line exceeds maximum allowed length. Length is 105, max is 100.
$(document).off('click', '[data-annotation-id]').on('click', '[data-annotation-id]', App.LegislationAnnotatable.onClick) | ||
$(document).off('click', '[data-cancel-annotation]').on('click', '[data-cancel-annotation]', (e) -> | ||
$(document).off("click", "[data-annotation-id]").on("click", "[data-annotation-id]", App.LegislationAnnotatable.onClick) | ||
$(document).off("click", "[data-cancel-annotation]").on("click", "[data-cancel-annotation]", (e) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line exceeds maximum allowed length. Length is 103, max is 100.
$(data.wrapper).find(".attachment-actions").addClass('small-12').removeClass('small-6 float-right') | ||
$(data.wrapper).find(".attachment-actions .action-remove").addClass('small-3').removeClass('small-12') | ||
$(data.wrapper).find(".attachment-actions").addClass("small-12").removeClass("small-6 float-right") | ||
$(data.wrapper).find(".attachment-actions .action-remove").addClass("small-3").removeClass("small-12") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line exceeds maximum allowed length. Length is 110, max is 100.
|
||
$(data.wrapper).find(".attachment-actions").addClass('small-12').removeClass('small-6 float-right') | ||
$(data.wrapper).find(".attachment-actions .action-remove").addClass('small-3').removeClass('small-12') | ||
$(data.wrapper).find(".attachment-actions").addClass("small-12").removeClass("small-6 float-right") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line exceeds maximum allowed length. Length is 107, max is 100.
$(data.errorContainer).append(errors) | ||
|
||
setPreview: (data) -> | ||
image_preview = '<div class="small-12 column text-center image-preview"><figure><img src="' + data.result.attachment_url + '" class="cached-image"/></figure></div>' | ||
image_preview = "<div class='small-12 column text-center image-preview'><figure><img src='#{data.result.attachment_url}' class='cached-image'></figure></div>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line exceeds maximum allowed length. Length is 162, max is 100.
|
||
clearProgressBar: (data) -> | ||
$(data.progressBar).find('.loading-bar').removeClass('complete errors uploading').css('width', "0px") | ||
$(data.progressBar).find(".loading-bar").removeClass("complete errors uploading").css("width", "0px") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line exceeds maximum allowed length. Length is 105, max is 100.
$(data.wrapper).find(".attachment-actions").removeClass('small-12').addClass('small-6 float-right') | ||
$(data.wrapper).find(".attachment-actions .action-remove").removeClass('small-3').addClass('small-12') | ||
$(data.wrapper).find(".attachment-actions").removeClass("small-12").addClass("small-6 float-right") | ||
$(data.wrapper).find(".attachment-actions .action-remove").removeClass("small-3").addClass("small-12") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line exceeds maximum allowed length. Length is 110, max is 100.
App.Imageable.setFilename(data, data.result.filename) | ||
App.Imageable.clearInputErrors(data) | ||
$(data.addAttachmentLabel).hide() | ||
$(data.wrapper).find(".attachment-actions").removeClass('small-12').addClass('small-6 float-right') | ||
$(data.wrapper).find(".attachment-actions .action-remove").removeClass('small-3').addClass('small-12') | ||
$(data.wrapper).find(".attachment-actions").removeClass("small-12").addClass("small-6 float-right") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line exceeds maximum allowed length. Length is 107, max is 100.
$(data.wrapper).find(".attachment-actions").addClass('small-12').removeClass('small-6 float-right') | ||
$(data.wrapper).find(".attachment-actions .action-remove").addClass('small-3').removeClass('small-12') | ||
$(data.wrapper).find(".attachment-actions").addClass("small-12").removeClass("small-6 float-right") | ||
$(data.wrapper).find(".attachment-actions .action-remove").addClass("small-3").removeClass("small-12") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line exceeds maximum allowed length. Length is 110, max is 100.
@@ -140,21 +140,21 @@ App.Documentable = | |||
App.Documentable.clearProgressBar(data) | |||
|
|||
App.Documentable.unlockUploads() | |||
$(data.wrapper).find(".attachment-actions").addClass('small-12').removeClass('small-6 float-right') | |||
$(data.wrapper).find(".attachment-actions .action-remove").addClass('small-3').removeClass('small-12') | |||
$(data.wrapper).find(".attachment-actions").addClass("small-12").removeClass("small-6 float-right") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line exceeds maximum allowed length. Length is 107, max is 100.
|
||
clearProgressBar: (data) -> | ||
$(data.progressBar).find('.loading-bar').removeClass('complete errors uploading').css('width', "0px") | ||
$(data.progressBar).find(".loading-bar").removeClass("complete errors uploading").css("width", "0px") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line exceeds maximum allowed length. Length is 105, max is 100.
$(data.wrapper).find(".attachment-actions").removeClass('small-12').addClass('small-6 float-right') | ||
$(data.wrapper).find(".attachment-actions .action-remove").removeClass('small-3').addClass('small-12') | ||
$(data.wrapper).find(".attachment-actions").removeClass("small-12").addClass("small-6 float-right") | ||
$(data.wrapper).find(".attachment-actions .action-remove").removeClass("small-3").addClass("small-12") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line exceeds maximum allowed length. Length is 110, max is 100.
App.Documentable.setFilename(data, data.result.filename) | ||
App.Documentable.clearInputErrors(data) | ||
$(data.addAttachmentLabel).hide() | ||
$(data.wrapper).find(".attachment-actions").removeClass('small-12').addClass('small-6 float-right') | ||
$(data.wrapper).find(".attachment-actions .action-remove").removeClass('small-3').addClass('small-12') | ||
$(data.wrapper).find(".attachment-actions").removeClass("small-12").addClass("small-6 float-right") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line exceeds maximum allowed length. Length is 107, max is 100.
input["lockUpload"] = $(nested_document).closest('#nested-documents').find('.document:visible').length >= $('#nested-documents').data('max-documents-allowed') | ||
$("#nested-documents").on "cocoon:after-insert", (e, nested_document) -> | ||
input = $(nested_document).find(".js-document-attachment") | ||
input["lockUpload"] = $(nested_document).closest("#nested-documents").find(".document:visible").length >= $("#nested-documents").data("max-documents-allowed") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line exceeds maximum allowed length. Length is 164, max is 100.
References
Objectives
Use double quotes instead of single quotes in CoffeeScript files, just like we do in the rest of the application, in order to make the code more consistent and easier to read.
Does this PR need a Backport to CONSUL?
Yes.
Notes