Remove trailing semicolons in CoffeeScript files
This commit is contained in:
@@ -8,12 +8,12 @@ App.Banners =
|
||||
.addClass(style, true)
|
||||
|
||||
update_background_color: (selector, text_selector, background_color) ->
|
||||
$(selector).css('background-color', background_color);
|
||||
$(text_selector).val(background_color);
|
||||
$(selector).css('background-color', background_color)
|
||||
$(text_selector).val(background_color)
|
||||
|
||||
update_font_color: (selector, text_selector, font_color) ->
|
||||
$(selector).css('color', font_color);
|
||||
$(text_selector).val(font_color);
|
||||
$(selector).css('color', font_color)
|
||||
$(text_selector).val(font_color)
|
||||
|
||||
initialize: ->
|
||||
$('[data-js-banner-title]').on
|
||||
@@ -26,18 +26,18 @@ App.Banners =
|
||||
|
||||
$("#banner_background_color_picker").on
|
||||
change: ->
|
||||
App.Banners.update_background_color("#js-banner-background", "#banner_background_color", $(this).val());
|
||||
App.Banners.update_background_color("#js-banner-background", "#banner_background_color", $(this).val())
|
||||
|
||||
$("#banner_background_color").on
|
||||
change: ->
|
||||
App.Banners.update_background_color("#js-banner-background", "#banner_background_color_picker", $(this).val());
|
||||
App.Banners.update_background_color("#js-banner-background", "#banner_background_color_picker", $(this).val())
|
||||
|
||||
$("#banner_font_color_picker").on
|
||||
change: ->
|
||||
App.Banners.update_font_color("#js-banner-title", "#banner_font_color", $(this).val());
|
||||
App.Banners.update_font_color("#js-banner-description", "#banner_font_color", $(this).val());
|
||||
App.Banners.update_font_color("#js-banner-title", "#banner_font_color", $(this).val())
|
||||
App.Banners.update_font_color("#js-banner-description", "#banner_font_color", $(this).val())
|
||||
|
||||
$("#banner_font_color").on
|
||||
change: ->
|
||||
App.Banners.update_font_color("#js-banner-title", "#banner_font_color_picker", $(this).val());
|
||||
App.Banners.update_font_color("#js-banner-description", "#banner_font_color_picker", $(this).val());
|
||||
App.Banners.update_font_color("#js-banner-title", "#banner_font_color_picker", $(this).val())
|
||||
App.Banners.update_font_color("#js-banner-description", "#banner_font_color_picker", $(this).val())
|
||||
|
||||
@@ -6,7 +6,7 @@ App.Globalize =
|
||||
if $(this).data("locale") == locale
|
||||
$(this).show()
|
||||
App.Globalize.highlight_locale($(this))
|
||||
$(".js-globalize-locale option:selected").removeAttr("selected");
|
||||
$(".js-globalize-locale option:selected").removeAttr("selected")
|
||||
return
|
||||
|
||||
display_translations: (locale) ->
|
||||
@@ -19,8 +19,8 @@ App.Globalize =
|
||||
$('#js_delete_' + locale).show()
|
||||
|
||||
highlight_locale: (element) ->
|
||||
$('.js-globalize-locale-link').removeClass('is-active');
|
||||
element.addClass('is-active');
|
||||
$('.js-globalize-locale-link').removeClass('is-active')
|
||||
element.addClass('is-active')
|
||||
|
||||
remove_language: (locale) ->
|
||||
$(".js-globalize-attribute[data-locale=" + locale + "]").each ->
|
||||
|
||||
@@ -2,6 +2,6 @@ App.InvestmentReportAlert =
|
||||
initialize: ->
|
||||
$('#js-investment-report-alert').on 'click', ->
|
||||
if this.checked && $('#budget_investment_feasibility_unfeasible').is(':checked')
|
||||
confirm(this.dataset.alert + "\n" + this.dataset.notFeasibleAlert);
|
||||
confirm(this.dataset.alert + "\n" + this.dataset.notFeasibleAlert)
|
||||
else if this.checked
|
||||
confirm(this.dataset.alert);
|
||||
confirm(this.dataset.alert)
|
||||
|
||||
@@ -27,7 +27,7 @@ App.Map =
|
||||
removeMarkerSelector = $(element).data('marker-remove-selector')
|
||||
addMarkerInvestments = $(element).data('marker-investments-coordinates')
|
||||
editable = $(element).data('marker-editable')
|
||||
marker = null;
|
||||
marker = null
|
||||
markerIcon = L.divIcon(
|
||||
className: 'map-marker'
|
||||
iconSize: [30, 30]
|
||||
@@ -46,7 +46,7 @@ App.Map =
|
||||
e.preventDefault()
|
||||
if marker
|
||||
map.removeLayer(marker)
|
||||
marker = null;
|
||||
marker = null
|
||||
clearFormfields()
|
||||
return
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ App.Polls =
|
||||
rand = ''
|
||||
for n in [0..5]
|
||||
rand = Math.random().toString(36).substr(2) # remove `0.`
|
||||
token = token + rand;
|
||||
token = token + rand
|
||||
|
||||
token = token.substring(0, 64)
|
||||
return token
|
||||
@@ -23,7 +23,7 @@ App.Polls =
|
||||
click: =>
|
||||
token_message = $(".js-token-message")
|
||||
if !token_message.is(':visible')
|
||||
token_message.html(token_message.html() + "<br><strong>" + @token + "</strong>");
|
||||
token_message.html(token_message.html() + "<br><strong>" + @token + "</strong>")
|
||||
token_message.show()
|
||||
false
|
||||
|
||||
@@ -32,13 +32,13 @@ App.Polls =
|
||||
answer = $(element).closest('div.answer')
|
||||
|
||||
if $(answer).hasClass('medium-6')
|
||||
$(answer).removeClass("medium-6");
|
||||
$(answer).addClass("answer-divider");
|
||||
$(answer).removeClass("medium-6")
|
||||
$(answer).addClass("answer-divider")
|
||||
unless $(answer).hasClass('first')
|
||||
$(answer).insertBefore($(answer).prev('div.answer'));
|
||||
$(answer).insertBefore($(answer).prev('div.answer'))
|
||||
else
|
||||
$(answer).addClass("medium-6");
|
||||
$(answer).removeClass("answer-divider");
|
||||
$(answer).addClass("medium-6")
|
||||
$(answer).removeClass("answer-divider")
|
||||
unless $(answer).hasClass('first')
|
||||
$(answer).insertAfter($(answer).next('div.answer'));
|
||||
$(answer).insertAfter($(answer).next('div.answer'))
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ App.PollsAdmin =
|
||||
change: ->
|
||||
switch ($(this).val())
|
||||
when 'vote_collection'
|
||||
$("select[class='js-shift-vote-collection-dates']").show();
|
||||
$("select[class='js-shift-recount-scrutiny-dates']").hide();
|
||||
$("select[class='js-shift-vote-collection-dates']").show()
|
||||
$("select[class='js-shift-recount-scrutiny-dates']").hide()
|
||||
when 'recount_scrutiny'
|
||||
$("select[class='js-shift-recount-scrutiny-dates']").show();
|
||||
$("select[class='js-shift-vote-collection-dates']").hide();
|
||||
$("select[class='js-shift-recount-scrutiny-dates']").show()
|
||||
$("select[class='js-shift-vote-collection-dates']").hide()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
App.SendAdminNotificationAlert =
|
||||
initialize: ->
|
||||
$('#js-send-admin_notification-alert').on 'click', ->
|
||||
confirm(this.dataset.alert);
|
||||
confirm(this.dataset.alert)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
App.SendNewsletterAlert =
|
||||
initialize: ->
|
||||
$('#js-send-newsletter-alert').on 'click', ->
|
||||
confirm(this.dataset.alert);
|
||||
confirm(this.dataset.alert)
|
||||
|
||||
@@ -2,7 +2,7 @@ App.Sortable =
|
||||
initialize: ->
|
||||
$(".sortable").sortable
|
||||
update: (event, ui) ->
|
||||
new_order = $(this).sortable('toArray', { attribute: 'data-answer-id' });
|
||||
new_order = $(this).sortable('toArray', { attribute: 'data-answer-id' })
|
||||
$.ajax
|
||||
url: $('.sortable').data('js-url'),
|
||||
data: { ordered_list: new_order },
|
||||
|
||||
@@ -15,20 +15,20 @@ App.TagAutocomplete =
|
||||
type: 'GET',
|
||||
dataType: 'json'
|
||||
success: ( data ) ->
|
||||
response( data );
|
||||
response( data )
|
||||
|
||||
minLength: 0,
|
||||
search: ->
|
||||
App.TagAutocomplete.extractLast( this.value );
|
||||
App.TagAutocomplete.extractLast( this.value )
|
||||
focus: ->
|
||||
return false;
|
||||
return false
|
||||
select: ( event, ui ) -> (
|
||||
terms = App.TagAutocomplete.split( this.value );
|
||||
terms.pop();
|
||||
terms.push( ui.item.value );
|
||||
terms.push( "" );
|
||||
this.value = terms.join( ", " );
|
||||
return false;);
|
||||
terms = App.TagAutocomplete.split( this.value )
|
||||
terms.pop()
|
||||
terms.push( ui.item.value )
|
||||
terms.push( "" )
|
||||
this.value = terms.join( ", " )
|
||||
return false;)
|
||||
|
||||
initialize: ->
|
||||
App.TagAutocomplete.init_autocomplete();
|
||||
App.TagAutocomplete.init_autocomplete()
|
||||
Reference in New Issue
Block a user