Merge pull request #7 from mutewinter/fix_at_dot
Removed unnecessary @.'s
This commit is contained in:
commit
c77dea41b8
3 changed files with 23 additions and 23 deletions
app/assets/javascripts
|
@ -7,20 +7,20 @@ window.Discourse.SiteCustomization = Discourse.Model.extend
|
||||||
trackedProperties: ['enabled','name', 'stylesheet', 'header', 'override_default_style']
|
trackedProperties: ['enabled','name', 'stylesheet', 'header', 'override_default_style']
|
||||||
|
|
||||||
description: (->
|
description: (->
|
||||||
"#{@.name}#{if @.enabled then ' (*)' else ''}"
|
"#{@name}#{if @enabled then ' (*)' else ''}"
|
||||||
).property('selected', 'name')
|
).property('selected', 'name')
|
||||||
|
|
||||||
changed: (->
|
changed: (->
|
||||||
return false unless @.originals
|
return false unless @originals
|
||||||
@trackedProperties.any (p)=>
|
@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
|
).property('override_default_style','enabled','name', 'stylesheet', 'header', 'originals') # TODO figure out how to call with apply
|
||||||
|
|
||||||
startTrackingChanges: ->
|
startTrackingChanges: ->
|
||||||
@set('originals',{})
|
@set('originals',{})
|
||||||
|
|
||||||
@trackedProperties.each (p)=>
|
@trackedProperties.each (p)=>
|
||||||
@.originals[p] = @get(p)
|
@originals[p] = @get(p)
|
||||||
true
|
true
|
||||||
|
|
||||||
previewUrl: (->
|
previewUrl: (->
|
||||||
|
|
|
@ -256,9 +256,9 @@ window.Discourse = Ember.Application.createWithMixins
|
||||||
@rerender()
|
@rerender()
|
||||||
else
|
else
|
||||||
$('link').each ->
|
$('link').each ->
|
||||||
if @.href.match(me.name) and me.hash
|
if @href.match(me.name) and me.hash
|
||||||
$(@).data('orig', @.href) unless $(@).data('orig')
|
$(@).data('orig', @href) unless $(@).data('orig')
|
||||||
@.href = $(@).data('orig') + "&hash=" + me.hash
|
@href = $(@).data('orig') + "&hash=" + me.hash
|
||||||
|
|
||||||
window.Discourse.Router = Discourse.Router.reopen(location: 'discourse_location')
|
window.Discourse.Router = Discourse.Router.reopen(location: 'discourse_location')
|
||||||
|
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
template = null
|
template = null
|
||||||
|
|
||||||
$.fn.autocomplete = (options)->
|
$.fn.autocomplete = (options)->
|
||||||
|
|
||||||
return if @.length == 0
|
return if @length == 0
|
||||||
|
|
||||||
if options && options.cancel && @.data("closeAutocomplete")
|
if options && options.cancel && @data("closeAutocomplete")
|
||||||
@.data("closeAutocomplete")()
|
@data("closeAutocomplete")()
|
||||||
return this
|
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
|
autocompleteOptions = null
|
||||||
selectedOption = null
|
selectedOption = null
|
||||||
|
@ -47,27 +47,27 @@
|
||||||
|
|
||||||
if isInput
|
if isInput
|
||||||
|
|
||||||
width = @.width()
|
width = @width()
|
||||||
height = @.height()
|
height = @height()
|
||||||
|
|
||||||
|
wrap = @wrap("<div class='ac-wrap clearfix'/>").parent()
|
||||||
|
|
||||||
wrap = @.wrap("<div class='ac-wrap clearfix'/>").parent()
|
|
||||||
|
|
||||||
wrap.width(width)
|
wrap.width(width)
|
||||||
|
|
||||||
@.width(80)
|
@width(80)
|
||||||
@.attr('name', @.attr('name') + "-renamed")
|
@attr('name', @attr('name') + "-renamed")
|
||||||
|
|
||||||
|
vals = @val().split(",")
|
||||||
|
|
||||||
vals = @.val().split(",")
|
|
||||||
|
|
||||||
vals.each (x)->
|
vals.each (x)->
|
||||||
unless x == ""
|
unless x == ""
|
||||||
x = options.reverseTransform(x) if options.reverseTransform
|
x = options.reverseTransform(x) if options.reverseTransform
|
||||||
addInputSelectedItem(x)
|
addInputSelectedItem(x)
|
||||||
|
|
||||||
@.val("")
|
@val("")
|
||||||
completeStart = 0
|
completeStart = 0
|
||||||
wrap.click =>
|
wrap.click =>
|
||||||
@.focus()
|
@focus()
|
||||||
true
|
true
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in a new issue