Module: TinymceFm::Filemanager

Defined in:
lib/tinymce_fm/filemanager.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



5
6
7
8
9
# File 'lib/tinymce_fm/filemanager.rb', line 5

def self.included(base)
  base.extend ClassMethods
  base.send :class_attribute, :tinymce_fm_settings
  base.tinymce_fm_settings = {}
end

Instance Method Details

#tinymce_filemanager_create_images_folderObject



97
98
99
# File 'lib/tinymce_fm/filemanager.rb', line 97

def tinymce_filemanager_create_images_folder()
  create_folder_base(images_folder ,"tinymce_filemanager/list_images")
end

#tinymce_filemanager_create_media_folderObject



114
115
116
# File 'lib/tinymce_fm/filemanager.rb', line 114

def tinymce_filemanager_create_media_folder()
  create_folder_base(media_folder ,"tinymce_filemanager/list_media")
end

#tinymce_filemanager_destroy_imageObject



93
94
95
# File 'lib/tinymce_fm/filemanager.rb', line 93

def tinymce_filemanager_destroy_image()
  destroy_base(images_folder, "tinymce_filemanager/list_images")
end

#tinymce_filemanager_destroy_mediaObject



110
111
112
# File 'lib/tinymce_fm/filemanager.rb', line 110

def tinymce_filemanager_destroy_media()
  destroy_base(media_folder, "tinymce_filemanager/list_media")
end

#tinymce_filemanager_list_imagesObject



85
86
87
# File 'lib/tinymce_fm/filemanager.rb', line 85

def tinymce_filemanager_list_images
  list_base(images_folder, "tinymce_filemanager/list_images", 'tinymce_filemanager/upload_image', 'tinymce_filemanager/destroy_image', 'tinymce_filemanager/create_images_folder')
end


118
119
120
121
122
123
124
# File 'lib/tinymce_fm/filemanager.rb', line 118

def tinymce_filemanager_list_links
  params[:search_form] ||= {}
  @available_classes = link_classes
  @links = tinymece_filemanager_find_links

  render :template => 'tinymce_fm/filemanager/links', :layout => 'tinymce_fm/application'
end

#tinymce_filemanager_list_mediaObject



102
103
104
# File 'lib/tinymce_fm/filemanager.rb', line 102

def tinymce_filemanager_list_media
  list_base(media_folder, "tinymce_filemanager/list_media", 'tinymce_filemanager/upload_media', 'tinymce_filemanager/destroy_media', 'tinymce_filemanager/create_media_folder')
end

#tinymce_filemanager_upload_imageObject



89
90
91
# File 'lib/tinymce_fm/filemanager.rb', line 89

def tinymce_filemanager_upload_image
  upload_base(images_folder, "tinymce_filemanager/list_images", accept_image_mime, image_size_limit)
end

#tinymce_filemanager_upload_mediaObject



106
107
108
# File 'lib/tinymce_fm/filemanager.rb', line 106

def tinymce_filemanager_upload_media
  upload_base(media_folder, "tinymce_filemanager/list_media", accept_media_mime, media_size_limit, true)
end