fcfinder-en 1.0.0.en

Sign up to get free protection for your applications and to get access to all the features.
Files changed (199) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.travis.yml +3 -0
  4. data/CODE_OF_CONDUCT.md +13 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE.txt +21 -0
  7. data/README-tr.md +356 -0
  8. data/README.md +362 -0
  9. data/Rakefile +1 -0
  10. data/app/assets/images/fcfinder/about.png +0 -0
  11. data/app/assets/images/fcfinder/copy.png +0 -0
  12. data/app/assets/images/fcfinder/cut.png +0 -0
  13. data/app/assets/images/fcfinder/date_sorter.png +0 -0
  14. data/app/assets/images/fcfinder/delete.png +0 -0
  15. data/app/assets/images/fcfinder/directory-max.png +0 -0
  16. data/app/assets/images/fcfinder/directory.png +0 -0
  17. data/app/assets/images/fcfinder/directory_mini.png +0 -0
  18. data/app/assets/images/fcfinder/download.png +0 -0
  19. data/app/assets/images/fcfinder/duplicate.png +0 -0
  20. data/app/assets/images/fcfinder/edit.png +0 -0
  21. data/app/assets/images/fcfinder/files/7z.png +0 -0
  22. data/app/assets/images/fcfinder/files/Untitled-24.png +0 -0
  23. data/app/assets/images/fcfinder/files/avi.png +0 -0
  24. data/app/assets/images/fcfinder/files/bmp.png +0 -0
  25. data/app/assets/images/fcfinder/files/bz.png +0 -0
  26. data/app/assets/images/fcfinder/files/bz2.png +0 -0
  27. data/app/assets/images/fcfinder/files/css.png +0 -0
  28. data/app/assets/images/fcfinder/files/doc.png +0 -0
  29. data/app/assets/images/fcfinder/files/docx.png +0 -0
  30. data/app/assets/images/fcfinder/files/dv.png +0 -0
  31. data/app/assets/images/fcfinder/files/flv.png +0 -0
  32. data/app/assets/images/fcfinder/files/gif.png +0 -0
  33. data/app/assets/images/fcfinder/files/gz.png +0 -0
  34. data/app/assets/images/fcfinder/files/htm.png +0 -0
  35. data/app/assets/images/fcfinder/files/html.png +0 -0
  36. data/app/assets/images/fcfinder/files/ico.png +0 -0
  37. data/app/assets/images/fcfinder/files/jpeg.png +0 -0
  38. data/app/assets/images/fcfinder/files/jpg.png +0 -0
  39. data/app/assets/images/fcfinder/files/js.png +0 -0
  40. data/app/assets/images/fcfinder/files/mid.png +0 -0
  41. data/app/assets/images/fcfinder/files/mkv.png +0 -0
  42. data/app/assets/images/fcfinder/files/mov.png +0 -0
  43. data/app/assets/images/fcfinder/files/mp3.png +0 -0
  44. data/app/assets/images/fcfinder/files/mp4.png +0 -0
  45. data/app/assets/images/fcfinder/files/mp4a.png +0 -0
  46. data/app/assets/images/fcfinder/files/mpg.png +0 -0
  47. data/app/assets/images/fcfinder/files/ogg.png +0 -0
  48. data/app/assets/images/fcfinder/files/other.png +0 -0
  49. data/app/assets/images/fcfinder/files/pdf.png +0 -0
  50. data/app/assets/images/fcfinder/files/php.png +0 -0
  51. data/app/assets/images/fcfinder/files/png.png +0 -0
  52. data/app/assets/images/fcfinder/files/pps.png +0 -0
  53. data/app/assets/images/fcfinder/files/ppt.png +0 -0
  54. data/app/assets/images/fcfinder/files/pptx.png +0 -0
  55. data/app/assets/images/fcfinder/files/psd.png +0 -0
  56. data/app/assets/images/fcfinder/files/rar.png +0 -0
  57. data/app/assets/images/fcfinder/files/rb.png +0 -0
  58. data/app/assets/images/fcfinder/files/swf.png +0 -0
  59. data/app/assets/images/fcfinder/files/tar.png +0 -0
  60. data/app/assets/images/fcfinder/files/tbz.png +0 -0
  61. data/app/assets/images/fcfinder/files/tga.png +0 -0
  62. data/app/assets/images/fcfinder/files/tgz.png +0 -0
  63. data/app/assets/images/fcfinder/files/tif.png +0 -0
  64. data/app/assets/images/fcfinder/files/tiff.png +0 -0
  65. data/app/assets/images/fcfinder/files/txt.png +0 -0
  66. data/app/assets/images/fcfinder/files/wav.png +0 -0
  67. data/app/assets/images/fcfinder/files/wm.png +0 -0
  68. data/app/assets/images/fcfinder/files/wma.png +0 -0
  69. data/app/assets/images/fcfinder/files/xls.png +0 -0
  70. data/app/assets/images/fcfinder/files/xlsx.png +0 -0
  71. data/app/assets/images/fcfinder/files/xml.png +0 -0
  72. data/app/assets/images/fcfinder/files/zip.png +0 -0
  73. data/app/assets/images/fcfinder/finder.png +0 -0
  74. data/app/assets/images/fcfinder/icon_view.png +0 -0
  75. data/app/assets/images/fcfinder/info.png +0 -0
  76. data/app/assets/images/fcfinder/info2.png +0 -0
  77. data/app/assets/images/fcfinder/kind_sorter.png +0 -0
  78. data/app/assets/images/fcfinder/list_view.png +0 -0
  79. data/app/assets/images/fcfinder/name_sorter.png +0 -0
  80. data/app/assets/images/fcfinder/new_folder.png +0 -0
  81. data/app/assets/images/fcfinder/paste.png +0 -0
  82. data/app/assets/images/fcfinder/preview.png +0 -0
  83. data/app/assets/images/fcfinder/refresh.png +0 -0
  84. data/app/assets/images/fcfinder/rename.png +0 -0
  85. data/app/assets/images/fcfinder/settings.png +0 -0
  86. data/app/assets/images/fcfinder/show_date.png +0 -0
  87. data/app/assets/images/fcfinder/show_size.png +0 -0
  88. data/app/assets/images/fcfinder/size_sorter.png +0 -0
  89. data/app/assets/images/fcfinder/sort.png +0 -0
  90. data/app/assets/images/fcfinder/tree/folder.png +0 -0
  91. data/app/assets/images/fcfinder/tree/loader.gif +0 -0
  92. data/app/assets/images/fcfinder/tree/minus.png +0 -0
  93. data/app/assets/images/fcfinder/tree/plus.png +0 -0
  94. data/app/assets/images/fcfinder/up_folder.png +0 -0
  95. data/app/assets/images/fcfinder/upload.png +0 -0
  96. data/app/assets/javascripts/fcfinder.js +1697 -0
  97. data/app/assets/stylesheets/fcfinder.css +347 -0
  98. data/app/assets/stylesheets/fcfinder.css.scss +347 -0
  99. data/bin/console +14 -0
  100. data/bin/setup +7 -0
  101. data/fcfinder-0.1.0.gem +0 -0
  102. data/fcfinder-0.1.1.gem +0 -0
  103. data/fcfinder.gemspec +31 -0
  104. data/lib/fcfinder/connector.rb +612 -0
  105. data/lib/fcfinder/engine.rb +12 -0
  106. data/lib/fcfinder/version.rb +3 -0
  107. data/lib/fcfinder/zip_file_generator.rb +47 -0
  108. data/lib/fcfinder.rb +7 -0
  109. data/screenshots/fcfinder_interface.png +0 -0
  110. data/vendor/assets/images/fcfinder/about.png +0 -0
  111. data/vendor/assets/images/fcfinder/copy.png +0 -0
  112. data/vendor/assets/images/fcfinder/cut.png +0 -0
  113. data/vendor/assets/images/fcfinder/date_sorter.png +0 -0
  114. data/vendor/assets/images/fcfinder/delete.png +0 -0
  115. data/vendor/assets/images/fcfinder/directory-max.png +0 -0
  116. data/vendor/assets/images/fcfinder/directory.png +0 -0
  117. data/vendor/assets/images/fcfinder/directory_mini.png +0 -0
  118. data/vendor/assets/images/fcfinder/download.png +0 -0
  119. data/vendor/assets/images/fcfinder/duplicate.png +0 -0
  120. data/vendor/assets/images/fcfinder/edit.png +0 -0
  121. data/vendor/assets/images/fcfinder/files/7z.png +0 -0
  122. data/vendor/assets/images/fcfinder/files/Untitled-24.png +0 -0
  123. data/vendor/assets/images/fcfinder/files/avi.png +0 -0
  124. data/vendor/assets/images/fcfinder/files/bmp.png +0 -0
  125. data/vendor/assets/images/fcfinder/files/bz.png +0 -0
  126. data/vendor/assets/images/fcfinder/files/bz2.png +0 -0
  127. data/vendor/assets/images/fcfinder/files/css.png +0 -0
  128. data/vendor/assets/images/fcfinder/files/doc.png +0 -0
  129. data/vendor/assets/images/fcfinder/files/docx.png +0 -0
  130. data/vendor/assets/images/fcfinder/files/dv.png +0 -0
  131. data/vendor/assets/images/fcfinder/files/flv.png +0 -0
  132. data/vendor/assets/images/fcfinder/files/gif.png +0 -0
  133. data/vendor/assets/images/fcfinder/files/gz.png +0 -0
  134. data/vendor/assets/images/fcfinder/files/htm.png +0 -0
  135. data/vendor/assets/images/fcfinder/files/html.png +0 -0
  136. data/vendor/assets/images/fcfinder/files/ico.png +0 -0
  137. data/vendor/assets/images/fcfinder/files/jpeg.png +0 -0
  138. data/vendor/assets/images/fcfinder/files/jpg.png +0 -0
  139. data/vendor/assets/images/fcfinder/files/js.png +0 -0
  140. data/vendor/assets/images/fcfinder/files/mid.png +0 -0
  141. data/vendor/assets/images/fcfinder/files/mkv.png +0 -0
  142. data/vendor/assets/images/fcfinder/files/mov.png +0 -0
  143. data/vendor/assets/images/fcfinder/files/mp3.png +0 -0
  144. data/vendor/assets/images/fcfinder/files/mp4.png +0 -0
  145. data/vendor/assets/images/fcfinder/files/mp4a.png +0 -0
  146. data/vendor/assets/images/fcfinder/files/mpg.png +0 -0
  147. data/vendor/assets/images/fcfinder/files/ogg.png +0 -0
  148. data/vendor/assets/images/fcfinder/files/other.png +0 -0
  149. data/vendor/assets/images/fcfinder/files/pdf.png +0 -0
  150. data/vendor/assets/images/fcfinder/files/php.png +0 -0
  151. data/vendor/assets/images/fcfinder/files/png.png +0 -0
  152. data/vendor/assets/images/fcfinder/files/pps.png +0 -0
  153. data/vendor/assets/images/fcfinder/files/ppt.png +0 -0
  154. data/vendor/assets/images/fcfinder/files/pptx.png +0 -0
  155. data/vendor/assets/images/fcfinder/files/psd.png +0 -0
  156. data/vendor/assets/images/fcfinder/files/rar.png +0 -0
  157. data/vendor/assets/images/fcfinder/files/rb.png +0 -0
  158. data/vendor/assets/images/fcfinder/files/swf.png +0 -0
  159. data/vendor/assets/images/fcfinder/files/tar.png +0 -0
  160. data/vendor/assets/images/fcfinder/files/tbz.png +0 -0
  161. data/vendor/assets/images/fcfinder/files/tga.png +0 -0
  162. data/vendor/assets/images/fcfinder/files/tgz.png +0 -0
  163. data/vendor/assets/images/fcfinder/files/tif.png +0 -0
  164. data/vendor/assets/images/fcfinder/files/tiff.png +0 -0
  165. data/vendor/assets/images/fcfinder/files/txt.png +0 -0
  166. data/vendor/assets/images/fcfinder/files/wav.png +0 -0
  167. data/vendor/assets/images/fcfinder/files/wm.png +0 -0
  168. data/vendor/assets/images/fcfinder/files/wma.png +0 -0
  169. data/vendor/assets/images/fcfinder/files/xls.png +0 -0
  170. data/vendor/assets/images/fcfinder/files/xlsx.png +0 -0
  171. data/vendor/assets/images/fcfinder/files/xml.png +0 -0
  172. data/vendor/assets/images/fcfinder/files/zip.png +0 -0
  173. data/vendor/assets/images/fcfinder/finder.png +0 -0
  174. data/vendor/assets/images/fcfinder/icon_view.png +0 -0
  175. data/vendor/assets/images/fcfinder/info.png +0 -0
  176. data/vendor/assets/images/fcfinder/info2.png +0 -0
  177. data/vendor/assets/images/fcfinder/kind_sorter.png +0 -0
  178. data/vendor/assets/images/fcfinder/list_view.png +0 -0
  179. data/vendor/assets/images/fcfinder/name_sorter.png +0 -0
  180. data/vendor/assets/images/fcfinder/new_folder.png +0 -0
  181. data/vendor/assets/images/fcfinder/paste.png +0 -0
  182. data/vendor/assets/images/fcfinder/preview.png +0 -0
  183. data/vendor/assets/images/fcfinder/refresh.png +0 -0
  184. data/vendor/assets/images/fcfinder/rename.png +0 -0
  185. data/vendor/assets/images/fcfinder/settings.png +0 -0
  186. data/vendor/assets/images/fcfinder/show_date.png +0 -0
  187. data/vendor/assets/images/fcfinder/show_size.png +0 -0
  188. data/vendor/assets/images/fcfinder/size_sorter.png +0 -0
  189. data/vendor/assets/images/fcfinder/sort.png +0 -0
  190. data/vendor/assets/images/fcfinder/tree/folder.png +0 -0
  191. data/vendor/assets/images/fcfinder/tree/loader.gif +0 -0
  192. data/vendor/assets/images/fcfinder/tree/minus.png +0 -0
  193. data/vendor/assets/images/fcfinder/tree/plus.png +0 -0
  194. data/vendor/assets/images/fcfinder/up_folder.png +0 -0
  195. data/vendor/assets/images/fcfinder/upload.png +0 -0
  196. data/vendor/assets/javascripts/fcfinder.js +1698 -0
  197. data/vendor/assets/stylesheets/fcfinder.css +347 -0
  198. data/vendor/assets/stylesheets/fcfinder.css.erb +347 -0
  199. metadata +300 -0
data/README.md ADDED
@@ -0,0 +1,362 @@
1
+ # Fcfinder
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/fcfinder.svg)](http://badge.fury.io/rb/fcfinder)
4
+
5
+ Web File Manager For The Rails
6
+ Integrated in ckeditor and TinyMCE with File Explorer you can use as a quick and simple way.
7
+
8
+ ![Arayuzu](https://raw.githubusercontent.com/furkancelik/fcfinder/master/screenshots/fcfinder_interface.png)
9
+
10
+ ## Requirements
11
+
12
+ ###ImageMagick
13
+
14
+ [imagemagick](http://github.com)'in kurulu olması gerekmektedir.
15
+
16
+ For A Windows Installation;
17
+ [imagemagick](http://github.com) from the address the Download button
18
+ Windows binary from the release area **compatible with ruby** (same as installed x86 x64)
19
+ ImageMagick -******-dll.exe download the file and you can install it in the installation process, make sure that is added to the PATH environment variable.
20
+
21
+ To The Command Line
22
+
23
+ `convert -version`
24
+
25
+ when you write in this way, you can see that you have successfully installed.
26
+
27
+ ```
28
+ Version: ImageMagick 6.9.1-4 Q16 x86 2015-05-31 http://www.imagemagick.org
29
+ Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
30
+ License: http://www.imagemagick.org/script/license.php
31
+ Features: Cipher DPC Modules OpenMP
32
+ ...
33
+ ```
34
+
35
+ ### Puma Server (Optional)
36
+ Requirement requirement but not Webrick large files can give a problem in the installation process.
37
+ the Puma for Windows installation [Here](https://github.com/hicknhack-software/rails-disco/wiki/Installing-puma-on-windows) you can look at.
38
+
39
+
40
+
41
+ ## Setup
42
+
43
+ Gemfile for rails applications, you must add the following line to your file.
44
+
45
+ ```ruby
46
+ gem 'fcfinder'
47
+ ```
48
+
49
+ ```
50
+ $ bundle install
51
+ ```
52
+
53
+ with rails you can perform the installation process.
54
+
55
+
56
+ ## Use
57
+
58
+
59
+ ###Setting The Controller
60
+
61
+ ```ruby
62
+ class YourController < ApplicationController
63
+
64
+ def index
65
+ if request.post?
66
+ # The bottom line is that only the logged in user (admin) can access the Finder
67
+ # The Session Name Must Be The Same As The Name You Use On Your System
68
+ # The Logon Process Will Be If You Can Remove This Line
69
+ if session[:user_id]
70
+ # example file with the name you want under the terms you can create the public folder, 'uploads' was created in the form of
71
+ # File.join(Rails.public_path, 'uploads', "/*")
72
+ # Files you want to be listed as a parameter
73
+ # server address,
74
+ # post parameters,
75
+ # Parameter Hash in the hash
76
+ # :max_file_size = indicates the size of the file to be loaded (byte)
77
+ # :allowed_mime = the file types that you want to allow extra
78
+ # :disallowed_mime = disallowed file types
79
+ render text: Fcfinder::Connector.new(File.join(Rails.public_path, 'uploads', "/*"), request.env["HTTP_HOST"], params[:fcfinder],
80
+ {
81
+ :max_file_size => 1_000_000,
82
+ :allowed_mime => {'pdf' => 'application/pdf'},
83
+ :disallowed_mime => {}
84
+ }).run, :layout => false
85
+ # If Not Logged On
86
+ #( session[:user_id] if you must remove the else part of the if statement block is removed)
87
+ else
88
+ # if the value is null is blocking access session_id, keep your files safe.
89
+ render :text => "Access not allowed!".to_json, :layout => false
90
+ end
91
+ else
92
+ render :layout => false
93
+ end
94
+ end
95
+
96
+
97
+ #to download the file
98
+ def download
99
+ # 'uploads' folder under the public folder part again.
100
+ send_file File.join(Rails.public_path,'uploads',params[:path].split(":").join("/")+"."+params[:format])
101
+ end
102
+ end
103
+ ```
104
+
105
+ ###Route Setting
106
+
107
+ ```ruby
108
+ scope '/fcfinder' do
109
+ match '/', to: 'your_controller#index', via: [:get, :post]
110
+ get '/download/:path', to: 'your_controller#download'
111
+ end
112
+ ```
113
+
114
+ **This way if you can use a namespace if you want to use under**
115
+
116
+ ```ruby
117
+ namespace :admin do
118
+ scope '/fcfinder' do
119
+ match '/', to: 'your_controller#index', via: [:get, :post]
120
+ get '/download/:path', to: 'your_controller#download'
121
+ end
122
+ end
123
+ ```
124
+
125
+ ###View Setting
126
+
127
+ ####1.Method
128
+ **app/assets/javascripts/application.js in your file**
129
+
130
+ ```js
131
+ //= require jquery
132
+ //= require jquery_ujs
133
+ ```
134
+
135
+ these lines must be attached ***(make sure jQuery is loaded!!)***
136
+
137
+
138
+ **config/initializers/assets.rb** in the file to the bottom
139
+
140
+ ```ruby
141
+ Rails.application.config.assets.precompile += %w( fcfinder.js )
142
+ Rails.application.config.assets.precompile += %w( fcfinder.css )
143
+ ```
144
+
145
+ you must add the lines
146
+
147
+ **View the content of your file should be like this**
148
+
149
+ ```html
150
+ <!DOCTYPE html>
151
+ <html>
152
+ <head>
153
+ <title>FcFinder</title>
154
+
155
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
156
+ <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
157
+
158
+ <%= javascript_include_tag 'fcfinder', 'data-turbolinks-track' => true %>
159
+ <%= stylesheet_link_tag 'fcfinder', media: 'all', 'data-turbolinks-track' => true %>
160
+ <%= csrf_meta_tags %>
161
+ </head>
162
+ <body>
163
+ <div id="fcfinder"></div>
164
+
165
+ <script type="text/javascript">
166
+ $(function(){
167
+ $("#fcfinder").fcFinder({
168
+ // this value must be the address that you set in the route
169
+ url:"/fcfinder",
170
+ getFileCallback: function(url) {
171
+ /**
172
+ Integrated Editor For The First Stage Of The Process, You Can Leave This Value Blank
173
+ By default CKEditor is working in an integrated manner with
174
+ */
175
+ }
176
+ });
177
+ });
178
+ </script>
179
+ </body>
180
+ </html>
181
+ ```
182
+
183
+ ####2.Method
184
+
185
+ **app/assets/javascripts/application.js in your file**
186
+ make sure that the jQuery files are installed
187
+
188
+ ```js
189
+ //= require jquery
190
+ //= require jquery_ujs
191
+ ```
192
+ under
193
+
194
+ ```js
195
+ //= require fcfinder
196
+ ```
197
+ add the line
198
+
199
+
200
+ **app/assets/stylesheets/application.css in file**
201
+
202
+ ```css
203
+ *= require fcfinder
204
+ ```
205
+
206
+ add the line
207
+
208
+
209
+
210
+ **View the content of your file should be like this**
211
+
212
+ ```html
213
+ <!DOCTYPE html>
214
+ <html>
215
+ <head>
216
+ <title>FcFinder</title>
217
+
218
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
219
+ <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
220
+ <%= csrf_meta_tags %>
221
+
222
+ </head>
223
+ <body>
224
+ <div id="fcfinder"></div>
225
+
226
+ <script type="text/javascript">
227
+ $(function(){
228
+ $("#fcfinder").fcFinder({
229
+ // this value must be the address that you set in the route
230
+ url:"/fcfinder",
231
+ getFileCallback: function(url) {
232
+ /**
233
+ Integrated Editor For The First Stage Of The Process, You Can Leave This Value Blank
234
+ By default CKEditor is working in an integrated manner with
235
+ */
236
+ }
237
+ });
238
+ });
239
+ </script>
240
+ </body>
241
+ </html>
242
+ ```
243
+
244
+
245
+ **You Can Now Start Your Server And Test It :)**
246
+
247
+ ## Integrated Operations
248
+ ### CKEditor
249
+
250
+ Comes integrated with ckeditor by default.
251
+ Ckeditor In A Page That Contains Flour
252
+
253
+ ```js
254
+ CKEDITOR.replace( 'editor1',{
255
+ /* In this way, you will specify the path to the Ckeditor in the Finder. */
256
+ filebrowserBrowseUrl : 'http://localhost:3000/fcfinder'
257
+ });
258
+ ```
259
+
260
+ ### Tinymce
261
+
262
+ On the page that contains the TinyMCE editor
263
+
264
+ ```js
265
+ function fcFinderBrowser (field_name, url, type, win) {
266
+ tinymce.activeEditor.windowManager.open({
267
+ /* URL Finder */
268
+ file: "http://localhost:3000/admin/fcfinder",
269
+ title: 'FCFinder File Manager',
270
+ width: 900,
271
+ height: 450,
272
+ resizable: 'yes'
273
+ }, {
274
+ setUrl: function (url) {
275
+ win.document.getElementById(field_name).value = url;
276
+ }
277
+ });
278
+ return false;
279
+ }
280
+
281
+ tinymce.init({
282
+ selector: "textarea#elm1",
283
+ theme: "modern",
284
+ file_browser_callback : fcFinderBrowser,
285
+ ....
286
+ ...
287
+ ..
288
+ .
289
+ });
290
+ ```
291
+
292
+ **Resides on the page where fcfinder**
293
+
294
+ ```js
295
+ $("#fcfinder").fcFinder({
296
+ url:"/admin/fcfinder",
297
+ getFileCallback: function(url) {
298
+
299
+ if (typeof(window.opener) !== 'undefined' && window.opener !== null) {
300
+ window.opener.FCFinder.callBack(url);
301
+ window.close();
302
+ }
303
+
304
+ if (typeof(top.tinymce) !== 'undefined' && typeof(top.tinymce) !== null) {
305
+ top.tinymce.activeEditor.windowManager.getParams().setUrl(url);
306
+ top.tinymce.activeEditor.windowManager.close();
307
+ }
308
+
309
+ }
310
+ });
311
+ ```
312
+
313
+ ### Integrated process for the input
314
+
315
+ **the page where input is needed**
316
+
317
+ ```html
318
+ <html>
319
+ <head>
320
+ <script type="text/javascript">
321
+ function openFCFinder(field) {
322
+ window.FCFinder = {
323
+ callBack: function(url) {
324
+ field.value = url;
325
+ }
326
+ };
327
+
328
+ window.open('http://localhost:3000/admin/fcfinder', 'kcfinder_textbox',
329
+ 'status=0, toolbar=0, location=0, menubar=0, directories=0, ' +
330
+ 'resizable=1, scrollbars=0, width=950, height=400'
331
+ );
332
+ }
333
+ </script>
334
+ </head>
335
+ <body>
336
+ <input type="text" readonly="readonly" onclick="openFCFinder(this)"
337
+ value="Click here and select a file double clicking on it" style="width:600px;cursor:pointer" />
338
+ </body>
339
+ </html>
340
+ ```
341
+
342
+ **The page where is located the Finder (the Finder parameter setting)**
343
+
344
+
345
+ ```js
346
+ $("#fcfinders").fcFinder({
347
+ url:"/admin/fcfinder",
348
+ getFileCallback: function(url) {
349
+
350
+ if (typeof(window.opener) !== 'undefined' && window.opener !== null) {
351
+ window.opener.FCFinder.callBack(url);
352
+ window.close();
353
+ }
354
+
355
+ if (typeof(top.tinymce) !== 'undefined' && typeof(top.tinymce) !== null) {
356
+ top.tinymce.activeEditor.windowManager.getParams().setUrl(url);
357
+ top.tinymce.activeEditor.windowManager.close();
358
+ }
359
+ }
360
+ });
361
+ ```
362
+
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
Binary file
Binary file
Binary file
Binary file
Binary file