mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 08:57:10 -06:00
Removed unnecessary @.'s
Since CoffeeScript automatically converts @ to this. when immediately followed by a character.
This commit is contained in:
parent
21b5628528
commit
87ff4373f5
@ -7,20 +7,20 @@ window.Discourse.SiteCustomization = Discourse.Model.extend
|
||||
trackedProperties: ['enabled','name', 'stylesheet', 'header', 'override_default_style']
|
||||
|
||||
description: (->
|
||||
"#{@.name}#{if @.enabled then ' (*)' else ''}"
|
||||
"#{@name}#{if @enabled then ' (*)' else ''}"
|
||||
).property('selected', 'name')
|
||||
|
||||
changed: (->
|
||||
return false unless @.originals
|
||||
return false unless @originals
|
||||
@trackedProperties.any (p)=>
|
||||
@.originals[p] != @get(p)
|
||||
@originals[p] != @get(p)
|
||||
).property('override_default_style','enabled','name', 'stylesheet', 'header', 'originals') # TODO figure out how to call with apply
|
||||
|
||||
startTrackingChanges: ->
|
||||
@set('originals',{})
|
||||
|
||||
@trackedProperties.each (p)=>
|
||||
@.originals[p] = @get(p)
|
||||
@originals[p] = @get(p)
|
||||
true
|
||||
|
||||
previewUrl: (->
|
||||
|
@ -256,9 +256,9 @@ window.Discourse = Ember.Application.createWithMixins
|
||||
@rerender()
|
||||
else
|
||||
$('link').each ->
|
||||
if @.href.match(me.name) and me.hash
|
||||
$(@).data('orig', @.href) unless $(@).data('orig')
|
||||
@.href = $(@).data('orig') + "&hash=" + me.hash
|
||||
if @href.match(me.name) and me.hash
|
||||
$(@).data('orig', @href) unless $(@).data('orig')
|
||||
@href = $(@).data('orig') + "&hash=" + me.hash
|
||||
|
||||
window.Discourse.Router = Discourse.Router.reopen(location: 'discourse_location')
|
||||
|
||||
|
@ -3,14 +3,14 @@
|
||||
template = null
|
||||
|
||||
$.fn.autocomplete = (options)->
|
||||
|
||||
return if @.length == 0
|
||||
|
||||
if options && options.cancel && @.data("closeAutocomplete")
|
||||
@.data("closeAutocomplete")()
|
||||
|
||||
return if @length == 0
|
||||
|
||||
if options && options.cancel && @data("closeAutocomplete")
|
||||
@data("closeAutocomplete")()
|
||||
return this
|
||||
|
||||
alert "only supporting one matcher at the moment" unless @.length == 1
|
||||
alert "only supporting one matcher at the moment" unless @length == 1
|
||||
|
||||
autocompleteOptions = null
|
||||
selectedOption = null
|
||||
@ -47,27 +47,27 @@
|
||||
|
||||
if isInput
|
||||
|
||||
width = @.width()
|
||||
height = @.height()
|
||||
width = @width()
|
||||
height = @height()
|
||||
|
||||
wrap = @wrap("<div class='ac-wrap clearfix'/>").parent()
|
||||
|
||||
wrap = @.wrap("<div class='ac-wrap clearfix'/>").parent()
|
||||
|
||||
wrap.width(width)
|
||||
|
||||
@.width(80)
|
||||
@.attr('name', @.attr('name') + "-renamed")
|
||||
@width(80)
|
||||
@attr('name', @attr('name') + "-renamed")
|
||||
|
||||
vals = @val().split(",")
|
||||
|
||||
vals = @.val().split(",")
|
||||
|
||||
vals.each (x)->
|
||||
unless x == ""
|
||||
x = options.reverseTransform(x) if options.reverseTransform
|
||||
addInputSelectedItem(x)
|
||||
|
||||
@.val("")
|
||||
@val("")
|
||||
completeStart = 0
|
||||
wrap.click =>
|
||||
@.focus()
|
||||
@focus()
|
||||
true
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user