Sha256: cbba7358ab643ecfc17266d9e29f714fa4a11fbcd8b570b712ca5e026fbb4c6e

Contents?: true

Size: 405 Bytes

Versions: 1

Compression:

Stored size: 405 Bytes

Contents

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wysihat-engine-0.1.12 app/helpers/wysihat_files_helper.rb