diff --git a/app/assets/javascripts/admin/models/site_customization.js.coffee b/app/assets/javascripts/admin/models/site_customization.js.coffee index 46a8622d11d..fe8780d7e4e 100644 --- a/app/assets/javascripts/admin/models/site_customization.js.coffee +++ b/app/assets/javascripts/admin/models/site_customization.js.coffee @@ -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: (-> diff --git a/app/assets/javascripts/discourse.js.coffee b/app/assets/javascripts/discourse.js.coffee index aad1f9cb47a..4e167c1494b 100644 --- a/app/assets/javascripts/discourse.js.coffee +++ b/app/assets/javascripts/discourse.js.coffee @@ -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') diff --git a/app/assets/javascripts/discourse/components/autocomplete.js.coffee b/app/assets/javascripts/discourse/components/autocomplete.js.coffee index 412e5eb4455..26d89d441ca 100644 --- a/app/assets/javascripts/discourse/components/autocomplete.js.coffee +++ b/app/assets/javascripts/discourse/components/autocomplete.js.coffee @@ -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("
").parent() - wrap = @.wrap("
").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