Module: TinymceFm::Filemanager
- Defined in:
- lib/tinymce_fm/filemanager.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
- #tinymce_filemanager_create_images_folder ⇒ Object
- #tinymce_filemanager_create_media_folder ⇒ Object
- #tinymce_filemanager_destroy_image ⇒ Object
- #tinymce_filemanager_destroy_media ⇒ Object
- #tinymce_filemanager_list_images ⇒ Object
- #tinymce_filemanager_list_links ⇒ Object
- #tinymce_filemanager_list_media ⇒ Object
- #tinymce_filemanager_upload_image ⇒ Object
- #tinymce_filemanager_upload_media ⇒ Object
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_folder ⇒ Object
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_folder ⇒ Object
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_image ⇒ Object
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_media ⇒ Object
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_images ⇒ Object
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 |
#tinymce_filemanager_list_links ⇒ Object
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_media ⇒ Object
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_image ⇒ Object
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_media ⇒ Object
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 |