app/assets/javascripts/effective/snippets/effective_asset.js.coffee.erb in effective_assets-1.6.8 vs app/assets/javascripts/effective/snippets/effective_asset.js.coffee.erb in effective_assets-1.6.9
- old
+ new
@@ -44,11 +44,11 @@
label: 'File Info',
title: 'File Info',
elements: [
{
type: 'html',
- html: "<p>* NOTE: This screen is for non-image files only. Please select 'Image' from the toolbar to work with images.",
+ html: "<p>* NOTE: This screen is for non-image files only. Please select 'Image' from the toolbar to work with images.",
setup: (widget) ->
if widget.data['asset_id']
this.getDialog().selectPage('asset')
else
this.getDialog().selectPage('upload')
@@ -65,10 +65,10 @@
},
{
id: 'link_title',
type: 'text',
label: 'Title',
- setup: (widget) -> this.setValue(widget.data.link_title)
+ setup: (widget) -> this.setValue(widget.data.link_title || widget.editor.getSelection().getSelectedText())
commit: (widget) -> widget.setData('link_title', this.getValue()) if widget
},
{
id: 'html_class',
type: 'text',