engine/app/assets/javascripts/locomotive/views/theme_assets/edit_view.js.coffee

17 lines
515 B
CoffeeScript
Raw Normal View History

2011-12-07 01:09:13 +00:00
Locomotive.Views.ThemeAssets ||= {}
class Locomotive.Views.ThemeAssets.EditView extends Locomotive.Views.ThemeAssets.FormView
save: (event) ->
@save_in_ajax event, on_success: (response, xhr) =>
2012-02-28 10:25:51 +00:00
window.response = response
window.xhr = xhr
2011-12-07 01:09:13 +00:00
help = @$('.inner > p.help')
help.find('b').html(response.dimensions)
2012-02-28 10:25:51 +00:00
help.find('a').html(response.url).attr('href', response.url)
window.editor = @editor
if response.plain_text?
@editor.setValue response.plain_text