Module: WysihatFilesHelper
- Defined in:
- app/helpers/wysihat_files_helper.rb
Instance Method Summary collapse
Instance Method Details
#editor_id ⇒ Object
14 15 16 17 |
# File 'app/helpers/wysihat_files_helper.rb', line 14 def editor_id return params[:wysihat_file][:editor] if params[:wysihat_file] && params[:wysihat_file][:editor] params[:editor] end |
#include_link(file) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 |
# File 'app/helpers/wysihat_files_helper.rb', line 2 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##{editor_id}')[0]#{function}facebox.close();", :href => file.file.url ) end |