app/helpers/wysihat_files_helper.rb in wysihat-engine-0.1.11 vs app/helpers/wysihat_files_helper.rb in wysihat-engine-0.1.12

- old
+ new

@@ -1,11 +1,22 @@ module WysihatFilesHelper + def include_link(file) + function = file.file_content_type.starts_with?('image') ? + ".insertImage(this.href);" : + ".insertHTML('<a href=\"' + this.href + '\">#{file.file_file_name}</a>');" + + link_to_function( + file.file_file_name, + "$$('iframe##{params[:editor]}')[0]#{function}facebox.close();", + :href => file.file.url + ) + end end