bcms_kcfinder 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYRIGHT.txt +23 -0
- data/GPL.txt +674 -0
- data/Gemfile +5 -0
- data/LICENSE.txt +165 -0
- data/app/assets/javascripts/bcms_kcfinder/application.js +20 -0
- data/app/assets/javascripts/bcms_kcfinder/browse.js +32 -0
- data/app/assets/javascripts/bcms_kcfinder/config.js +2 -0
- data/app/assets/javascripts/bcms_kcfinder/enable_kcfinder.js +10 -0
- data/app/assets/javascripts/bcms_kcfinder/files.js +613 -0
- data/app/assets/stylesheets/bcms_kcfinder/application.css +14 -0
- data/app/assets/stylesheets/bcms_kcfinder/browse.css +235 -0
- data/app/controllers/bcms_kcfinder/application_controller.rb +4 -0
- data/app/controllers/bcms_kcfinder/browse_controller.rb +121 -0
- data/app/helpers/bcms_kcfinder/application_helper.rb +4 -0
- data/app/helpers/bcms_kcfinder/browse_helper.rb +4 -0
- data/app/views/bcms_kcfinder/browse/index.html.erb +83 -0
- data/app/views/bcms_kcfinder/init.json +226 -0
- data/app/views/layouts/bcms_kcfinder/application.html.erb +45 -0
- data/config/routes.rb +7 -0
- data/lib/bcms_kcfinder.rb +4 -0
- data/lib/bcms_kcfinder/engine.rb +73 -0
- data/lib/bcms_kcfinder/version.rb +3 -0
- data/lib/generators/bcms_kcfinder/install/USAGE +3 -0
- data/lib/generators/bcms_kcfinder/install/install_generator.rb +23 -0
- data/lib/tasks/bcms_kcfinder_tasks.rake +4 -0
- data/lib/tasks/module_tasks.rake +10 -0
- data/test/bcms_kcfinder_test.rb +7 -0
- data/test/functional/bcms_kcfinder/browse_controller_test.rb +11 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/test_helper.rb +15 -0
- data/test/unit/helpers/bcms_kcfinder/browse_helper_test.rb +6 -0
- data/vendor/assets/javascript/kcfinder/doc/Changelog +141 -0
- data/vendor/assets/javascript/kcfinder/doc/LICENSE.GPL +340 -0
- data/vendor/assets/javascript/kcfinder/doc/LICENSE.LGPL +167 -0
- data/vendor/assets/javascript/kcfinder/doc/README +78 -0
- data/vendor/assets/javascript/kcfinder/js/browser/0bject.js +22 -0
- data/vendor/assets/javascript/kcfinder/js/browser/clipboard.js +297 -0
- data/vendor/assets/javascript/kcfinder/js/browser/dropUpload.js +229 -0
- data/vendor/assets/javascript/kcfinder/js/browser/folders.js +368 -0
- data/vendor/assets/javascript/kcfinder/js/browser/init.js +186 -0
- data/vendor/assets/javascript/kcfinder/js/browser/joiner.php +35 -0
- data/vendor/assets/javascript/kcfinder/js/browser/misc.js +383 -0
- data/vendor/assets/javascript/kcfinder/js/browser/settings.js +101 -0
- data/vendor/assets/javascript/kcfinder/js/browser/toolbar.js +328 -0
- data/vendor/assets/javascript/kcfinder/js/helper.js +412 -0
- data/vendor/assets/javascript/kcfinder/js/jquery.drag.js +6 -0
- data/vendor/assets/javascript/kcfinder/js/jquery.js +18 -0
- data/vendor/assets/javascript/kcfinder/js/jquery.rightClick.js +16 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/about.txt +15 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/bg_transparent.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/cross.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/avi.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/bat.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/bmp.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/bz2.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/ccd.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/cgi.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/com.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/csh.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/cue.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/deb.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/dll.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/doc.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/docx.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/exe.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/fla.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/flv.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/fon.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/gif.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/gz.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/htm.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/html.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/ini.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/iso.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/jar.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/java.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/jpeg.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/jpg.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/js.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/mds.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/mdx.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/mid.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/midi.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/mkv.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/mov.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/mp3.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/mpeg.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/mpg.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/nfo.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/nrg.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/ogg.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/pdf.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/php.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/phps.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/pl.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/pm.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/png.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/ppt.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/pptx.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/qt.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/rpm.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/rtf.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/sh.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/srt.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/sub.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/swf.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/tgz.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/tif.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/tiff.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/torrent.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/ttf.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/txt.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/wav.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/wma.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/xls.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/xlsx.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/zip.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/avi.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/bat.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/bmp.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/bz2.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/ccd.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/cgi.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/com.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/csh.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/cue.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/deb.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/dll.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/doc.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/docx.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/exe.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/fla.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/flv.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/fon.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/gif.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/gz.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/htm.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/html.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/ini.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/iso.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/jar.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/java.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/jpeg.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/jpg.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/js.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/mds.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/mdx.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/mid.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/midi.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/mkv.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/mov.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/mp3.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/mpeg.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/mpg.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/nfo.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/nrg.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/ogg.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/pdf.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/php.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/phps.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/pl.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/pm.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/png.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/ppt.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/pptx.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/qt.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/rpm.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/rtf.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/sh.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/srt.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/sub.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/swf.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/tgz.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/tif.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/tiff.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/torrent.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/ttf.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/txt.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/wav.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/wma.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/xls.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/xlsx.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/zip.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/about.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/clipboard-add.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/clipboard-clear.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/clipboard.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/close-clicked.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/close-hover.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/close.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/copy.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/delete.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/download.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/folder-new.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/maximize.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/move.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/refresh.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/rename.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/select.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/settings.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/upload.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/view.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/kcf_logo.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/loading.gif +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/question.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/tree/denied.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/tree/folder.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/tree/folder_current.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/tree/minus.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/img/tree/plus.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/init.js +4 -0
- data/vendor/assets/javascript/kcfinder/themes/dark/style.css +560 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/about.txt +11 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/alert.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/bg_transparent.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/confirm.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/avi.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/bat.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/bmp.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/bz2.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/ccd.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/cgi.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/com.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/csh.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/cue.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/deb.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/dll.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/doc.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/docx.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/exe.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/fla.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/flv.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/fon.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/gif.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/gz.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/htm.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/html.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/ini.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/iso.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/jar.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/java.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/jpeg.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/jpg.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/js.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/mds.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/mdx.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/mid.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/midi.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/mkv.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/mov.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/mp3.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/mpeg.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/mpg.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/nfo.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/nrg.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/ogg.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/pdf.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/php.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/phps.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/pl.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/pm.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/png.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/ppt.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/pptx.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/psd.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/qt.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/rar.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/rpm.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/rtf.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/sh.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/srt.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/sub.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/swf.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/tgz.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/tif.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/tiff.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/torrent.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/ttf.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/txt.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/wav.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/wma.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/xls.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/xlsx.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/zip.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/avi.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/bat.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/bmp.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/bz2.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/ccd.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/cgi.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/com.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/csh.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/cue.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/deb.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/dll.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/doc.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/docx.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/exe.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/fla.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/flv.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/fon.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/gif.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/gz.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/htm.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/html.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/ini.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/iso.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/jar.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/java.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/jpeg.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/jpg.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/js.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/mds.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/mdx.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/mid.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/midi.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/mkv.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/mov.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/mp3.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/mpeg.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/mpg.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/nfo.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/nrg.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/ogg.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/pdf.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/php.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/phps.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/pl.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/pm.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/png.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/ppt.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/pptx.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/psd.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/qt.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/rar.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/rpm.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/rtf.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/sh.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/srt.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/sub.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/swf.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/tgz.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/tif.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/tiff.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/torrent.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/ttf.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/txt.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/wav.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/wma.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/xls.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/xlsx.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/zip.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/about.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/clipboard-add.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/clipboard-clear.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/clipboard.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/close-clicked.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/close-hover.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/close.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/copy.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/delete.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/download.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/folder-new.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/maximize.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/move.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/refresh.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/rename.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/select.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/settings.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/upload.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/view.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/kcf_logo.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/loading.gif +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/tree/denied.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/tree/folder.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/tree/folder_current.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/tree/minus.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/img/tree/plus.png +0 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/init.js +4 -0
- data/vendor/assets/javascript/kcfinder/themes/oxygen/style.css +566 -0
- metadata +453 -0
@@ -0,0 +1,186 @@
|
|
1
|
+
|
2
|
+
/** This file is part of KCFinder project
|
3
|
+
*
|
4
|
+
* @desc Object initializations
|
5
|
+
* @package KCFinder
|
6
|
+
* @version 2.51
|
7
|
+
* @author Pavel Tzonkov <pavelc@users.sourceforge.net>
|
8
|
+
* @copyright 2010, 2011 KCFinder Project
|
9
|
+
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
|
10
|
+
* @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2
|
11
|
+
* @link http://kcfinder.sunhater.com
|
12
|
+
*/
|
13
|
+
|
14
|
+
browser.init = function() {
|
15
|
+
if (!this.checkAgent()) return;
|
16
|
+
|
17
|
+
$('body').click(function() {
|
18
|
+
browser.hideDialog();
|
19
|
+
});
|
20
|
+
$('#shadow').click(function() {
|
21
|
+
return false;
|
22
|
+
});
|
23
|
+
$('#dialog').unbind();
|
24
|
+
$('#dialog').click(function() {
|
25
|
+
return false;
|
26
|
+
});
|
27
|
+
$('#alert').unbind();
|
28
|
+
$('#alert').click(function() {
|
29
|
+
return false;
|
30
|
+
});
|
31
|
+
this.initOpeners();
|
32
|
+
this.initSettings();
|
33
|
+
this.initContent();
|
34
|
+
this.initToolbar();
|
35
|
+
this.initResizer();
|
36
|
+
this.initDropUpload();
|
37
|
+
};
|
38
|
+
|
39
|
+
browser.checkAgent = function() {
|
40
|
+
if (!$.browser.version ||
|
41
|
+
($.browser.msie && (parseInt($.browser.version) < 7) && !this.support.chromeFrame) ||
|
42
|
+
($.browser.opera && (parseInt($.browser.version) < 10)) ||
|
43
|
+
($.browser.mozilla && (parseFloat($.browser.version.replace(/^(\d+(\.\d+)?)([^\d].*)?$/, "$1")) < 1.8))
|
44
|
+
) {
|
45
|
+
var html = '<div style="padding:10px">Your browser is not capable to display KCFinder. Please update your browser or install another one: <a href="http://www.mozilla.com/firefox/" target="_blank">Mozilla Firefox</a>, <a href="http://www.apple.com/safari" target="_blank">Apple Safari</a>, <a href="http://www.google.com/chrome" target="_blank">Google Chrome</a>, <a href="http://www.opera.com/browser" target="_blank">Opera</a>.';
|
46
|
+
if ($.browser.msie)
|
47
|
+
html += ' You may also install <a href="http://www.google.com/chromeframe" target="_blank">Google Chrome Frame ActiveX plugin</a> to get Internet Explorer 6 working.';
|
48
|
+
html += '</div>';
|
49
|
+
$('body').html(html);
|
50
|
+
return false;
|
51
|
+
}
|
52
|
+
return true;
|
53
|
+
};
|
54
|
+
|
55
|
+
browser.initOpeners = function() {
|
56
|
+
if (this.opener.TinyMCE && (typeof(tinyMCEPopup) == 'undefined'))
|
57
|
+
this.opener.TinyMCE = null;
|
58
|
+
|
59
|
+
if (this.opener.TinyMCE)
|
60
|
+
this.opener.callBack = true;
|
61
|
+
|
62
|
+
if ((!this.opener.name || (this.opener.name == 'fckeditor')) &&
|
63
|
+
window.opener && window.opener.SetUrl
|
64
|
+
) {
|
65
|
+
this.opener.FCKeditor = true;
|
66
|
+
this.opener.callBack = true;
|
67
|
+
}
|
68
|
+
|
69
|
+
if (this.opener.CKEditor) {
|
70
|
+
if (window.parent && window.parent.CKEDITOR)
|
71
|
+
this.opener.CKEditor.object = window.parent.CKEDITOR;
|
72
|
+
else if (window.opener && window.opener.CKEDITOR) {
|
73
|
+
this.opener.CKEditor.object = window.opener.CKEDITOR;
|
74
|
+
this.opener.callBack = true;
|
75
|
+
} else
|
76
|
+
this.opener.CKEditor = null;
|
77
|
+
}
|
78
|
+
|
79
|
+
if (!this.opener.CKEditor && !this.opener.FCKEditor && !this.TinyMCE) {
|
80
|
+
if ((window.opener && window.opener.KCFinder && window.opener.KCFinder.callBack) ||
|
81
|
+
(window.parent && window.parent.KCFinder && window.parent.KCFinder.callBack)
|
82
|
+
)
|
83
|
+
this.opener.callBack = window.opener
|
84
|
+
? window.opener.KCFinder.callBack
|
85
|
+
: window.parent.KCFinder.callBack;
|
86
|
+
|
87
|
+
if ((
|
88
|
+
window.opener &&
|
89
|
+
window.opener.KCFinder &&
|
90
|
+
window.opener.KCFinder.callBackMultiple
|
91
|
+
) || (
|
92
|
+
window.parent &&
|
93
|
+
window.parent.KCFinder &&
|
94
|
+
window.parent.KCFinder.callBackMultiple
|
95
|
+
)
|
96
|
+
)
|
97
|
+
this.opener.callBackMultiple = window.opener
|
98
|
+
? window.opener.KCFinder.callBackMultiple
|
99
|
+
: window.parent.KCFinder.callBackMultiple;
|
100
|
+
}
|
101
|
+
};
|
102
|
+
|
103
|
+
browser.initContent = function() {
|
104
|
+
$('div#folders').html(this.label("Loading folders..."));
|
105
|
+
$('div#files').html(this.label("Loading files..."));
|
106
|
+
$.ajax({
|
107
|
+
type: 'GET',
|
108
|
+
dataType: 'json',
|
109
|
+
url: browser.baseGetData('init'),
|
110
|
+
async: false,
|
111
|
+
success: function(data) {
|
112
|
+
if (browser.check4errors(data))
|
113
|
+
return;
|
114
|
+
browser.dirWritable = data.dirWritable;
|
115
|
+
$('#folders').html(browser.buildTree(data.tree));
|
116
|
+
browser.setTreeData(data.tree);
|
117
|
+
browser.initFolders();
|
118
|
+
browser.files = data.files ? data.files : [];
|
119
|
+
browser.orderFiles();
|
120
|
+
},
|
121
|
+
error: function() {
|
122
|
+
$('div#folders').html(browser.label("Unknown error."));
|
123
|
+
$('div#files').html(browser.label("Unknown error."));
|
124
|
+
}
|
125
|
+
});
|
126
|
+
};
|
127
|
+
|
128
|
+
browser.initResizer = function() {
|
129
|
+
var cursor = ($.browser.opera) ? 'move' : 'col-resize';
|
130
|
+
$('#resizer').css('cursor', cursor);
|
131
|
+
$('#resizer').drag('start', function() {
|
132
|
+
$(this).css({opacity:'0.4', filter:'alpha(opacity:40)'});
|
133
|
+
$('#all').css('cursor', cursor);
|
134
|
+
});
|
135
|
+
$('#resizer').drag(function(e) {
|
136
|
+
var left = e.pageX - parseInt(_.nopx($(this).css('width')) / 2);
|
137
|
+
left = (left >= 0) ? left : 0;
|
138
|
+
left = (left + _.nopx($(this).css('width')) < $(window).width())
|
139
|
+
? left : $(window).width() - _.nopx($(this).css('width'));
|
140
|
+
$(this).css('left', left);
|
141
|
+
});
|
142
|
+
var end = function() {
|
143
|
+
$(this).css({opacity:'0', filter:'alpha(opacity:0)'});
|
144
|
+
$('#all').css('cursor', '');
|
145
|
+
var left = _.nopx($(this).css('left')) + _.nopx($(this).css('width'));
|
146
|
+
var right = $(window).width() - left;
|
147
|
+
$('#left').css('width', left + 'px');
|
148
|
+
$('#right').css('width', right + 'px');
|
149
|
+
_('files').style.width = $('#right').innerWidth() - _.outerHSpace('#files') + 'px';
|
150
|
+
_('resizer').style.left = $('#left').outerWidth() - _.outerRightSpace('#folders', 'm') + 'px';
|
151
|
+
_('resizer').style.width = _.outerRightSpace('#folders', 'm') + _.outerLeftSpace('#files', 'm') + 'px';
|
152
|
+
browser.fixFilesHeight();
|
153
|
+
};
|
154
|
+
$('#resizer').drag('end', end);
|
155
|
+
$('#resizer').mouseup(end);
|
156
|
+
};
|
157
|
+
|
158
|
+
browser.resize = function() {
|
159
|
+
_('left').style.width = '25%';
|
160
|
+
_('right').style.width = '75%';
|
161
|
+
_('toolbar').style.height = $('#toolbar a').outerHeight() + "px";
|
162
|
+
_('shadow').style.width = $(window).width() + 'px';
|
163
|
+
_('shadow').style.height = _('resizer').style.height = $(window).height() + 'px';
|
164
|
+
_('left').style.height = _('right').style.height =
|
165
|
+
$(window).height() - $('#status').outerHeight() + 'px';
|
166
|
+
_('folders').style.height =
|
167
|
+
$('#left').outerHeight() - _.outerVSpace('#folders') + 'px';
|
168
|
+
browser.fixFilesHeight();
|
169
|
+
var width = $('#left').outerWidth() + $('#right').outerWidth();
|
170
|
+
_('status').style.width = width + 'px';
|
171
|
+
while ($('#status').outerWidth() > width)
|
172
|
+
_('status').style.width = _.nopx(_('status').style.width) - 1 + 'px';
|
173
|
+
while ($('#status').outerWidth() < width)
|
174
|
+
_('status').style.width = _.nopx(_('status').style.width) + 1 + 'px';
|
175
|
+
if ($.browser.msie && ($.browser.version.substr(0, 1) < 8))
|
176
|
+
_('right').style.width = $(window).width() - $('#left').outerWidth() + 'px';
|
177
|
+
_('files').style.width = $('#right').innerWidth() - _.outerHSpace('#files') + 'px';
|
178
|
+
_('resizer').style.left = $('#left').outerWidth() - _.outerRightSpace('#folders', 'm') + 'px';
|
179
|
+
_('resizer').style.width = _.outerRightSpace('#folders', 'm') + _.outerLeftSpace('#files', 'm') + 'px';
|
180
|
+
};
|
181
|
+
|
182
|
+
browser.fixFilesHeight = function() {
|
183
|
+
_('files').style.height =
|
184
|
+
$('#left').outerHeight() - $('#toolbar').outerHeight() - _.outerVSpace('#files') -
|
185
|
+
(($('#settings').css('display') != "none") ? $('#settings').outerHeight() : 0) + 'px';
|
186
|
+
};
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
/** This file is part of KCFinder project
|
4
|
+
*
|
5
|
+
* @desc Join all JavaScript files in current directory
|
6
|
+
* @package KCFinder
|
7
|
+
* @version 2.51
|
8
|
+
* @author Pavel Tzonkov <pavelc@users.sourceforge.net>
|
9
|
+
* @copyright 2010, 2011 KCFinder Project
|
10
|
+
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
|
11
|
+
* @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2
|
12
|
+
* @link http://kcfinder.sunhater.com
|
13
|
+
*/
|
14
|
+
|
15
|
+
chdir(".."); // For compatibality
|
16
|
+
chdir("..");
|
17
|
+
require "lib/helper_httpCache.php";
|
18
|
+
require "lib/helper_dir.php";
|
19
|
+
$files = dir::content("js/browser", array(
|
20
|
+
'types' => "file",
|
21
|
+
'pattern' => '/^.*\.js$/'
|
22
|
+
));
|
23
|
+
|
24
|
+
foreach ($files as $file) {
|
25
|
+
$fmtime = filemtime($file);
|
26
|
+
if (!isset($mtime) || ($fmtime > $mtime))
|
27
|
+
$mtime = $fmtime;
|
28
|
+
}
|
29
|
+
|
30
|
+
httpCache::checkMTime($mtime);
|
31
|
+
header("Content-Type: text/javascript");
|
32
|
+
foreach ($files as $file)
|
33
|
+
require $file;
|
34
|
+
|
35
|
+
?>
|
@@ -0,0 +1,383 @@
|
|
1
|
+
|
2
|
+
/** This file is part of KCFinder project
|
3
|
+
*
|
4
|
+
* @desc Miscellaneous functionality
|
5
|
+
* @package KCFinder
|
6
|
+
* @version 2.51
|
7
|
+
* @author Pavel Tzonkov <pavelc@users.sourceforge.net>
|
8
|
+
* @copyright 2010, 2011 KCFinder Project
|
9
|
+
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
|
10
|
+
* @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2
|
11
|
+
* @link http://kcfinder.sunhater.com
|
12
|
+
*/
|
13
|
+
|
14
|
+
browser.drag = function(ev, dd) {
|
15
|
+
var top = dd.offsetY,
|
16
|
+
left = dd.offsetX;
|
17
|
+
if (top < 0) top = 0;
|
18
|
+
if (left < 0) left = 0;
|
19
|
+
if (top + $(this).outerHeight() > $(window).height())
|
20
|
+
top = $(window).height() - $(this).outerHeight();
|
21
|
+
if (left + $(this).outerWidth() > $(window).width())
|
22
|
+
left = $(window).width() - $(this).outerWidth();
|
23
|
+
$(this).css({
|
24
|
+
top: top,
|
25
|
+
left: left
|
26
|
+
});
|
27
|
+
};
|
28
|
+
|
29
|
+
browser.showDialog = function(e) {
|
30
|
+
$('#dialog').css({left: 0, top: 0});
|
31
|
+
this.shadow();
|
32
|
+
if ($('#dialog div.box') && !$('#dialog div.title').get(0)) {
|
33
|
+
var html = $('#dialog div.box').html();
|
34
|
+
var title = $('#dialog').data('title') ? $('#dialog').data('title') : "";
|
35
|
+
html = '<div class="title"><span class="close"></span>' + title + '</div>' + html;
|
36
|
+
$('#dialog div.box').html(html);
|
37
|
+
$('#dialog div.title span.close').mousedown(function() {
|
38
|
+
$(this).addClass('clicked');
|
39
|
+
});
|
40
|
+
$('#dialog div.title span.close').mouseup(function() {
|
41
|
+
$(this).removeClass('clicked');
|
42
|
+
});
|
43
|
+
$('#dialog div.title span.close').click(function() {
|
44
|
+
browser.hideDialog();
|
45
|
+
browser.hideAlert();
|
46
|
+
});
|
47
|
+
}
|
48
|
+
$('#dialog').drag(browser.drag, {handle: '#dialog div.title'});
|
49
|
+
$('#dialog').css('display', 'block');
|
50
|
+
|
51
|
+
if (e) {
|
52
|
+
var left = e.pageX - parseInt($('#dialog').outerWidth() / 2);
|
53
|
+
var top = e.pageY - parseInt($('#dialog').outerHeight() / 2);
|
54
|
+
if (left < 0) left = 0;
|
55
|
+
if (top < 0) top = 0;
|
56
|
+
if (($('#dialog').outerWidth() + left) > $(window).width())
|
57
|
+
left = $(window).width() - $('#dialog').outerWidth();
|
58
|
+
if (($('#dialog').outerHeight() + top) > $(window).height())
|
59
|
+
top = $(window).height() - $('#dialog').outerHeight();
|
60
|
+
$('#dialog').css({
|
61
|
+
left: left + 'px',
|
62
|
+
top: top + 'px'
|
63
|
+
});
|
64
|
+
} else
|
65
|
+
$('#dialog').css({
|
66
|
+
left: parseInt(($(window).width() - $('#dialog').outerWidth()) / 2) + 'px',
|
67
|
+
top: parseInt(($(window).height() - $('#dialog').outerHeight()) / 2) + 'px'
|
68
|
+
});
|
69
|
+
$(document).unbind('keydown');
|
70
|
+
$(document).keydown(function(e) {
|
71
|
+
if (e.keyCode == 27)
|
72
|
+
browser.hideDialog();
|
73
|
+
});
|
74
|
+
};
|
75
|
+
|
76
|
+
browser.hideDialog = function() {
|
77
|
+
this.unshadow();
|
78
|
+
if ($('#clipboard').hasClass('selected'))
|
79
|
+
$('#clipboard').removeClass('selected');
|
80
|
+
$('#dialog').css('display', 'none');
|
81
|
+
$('div.folder > a > span.folder').removeClass('context');
|
82
|
+
$('#dialog').html('');
|
83
|
+
$('#dialog').data('title', null);
|
84
|
+
$('#dialog').unbind();
|
85
|
+
$('#dialog').click(function() {
|
86
|
+
return false;
|
87
|
+
});
|
88
|
+
$(document).unbind('keydown');
|
89
|
+
$(document).keydown(function(e) {
|
90
|
+
return !browser.selectAll(e);
|
91
|
+
});
|
92
|
+
browser.hideAlert();
|
93
|
+
};
|
94
|
+
|
95
|
+
browser.showAlert = function(shadow) {
|
96
|
+
$('#alert').css({left: 0, top: 0});
|
97
|
+
if (typeof shadow == 'undefined')
|
98
|
+
shadow = true;
|
99
|
+
if (shadow)
|
100
|
+
this.shadow();
|
101
|
+
var left = parseInt(($(window).width() - $('#alert').outerWidth()) / 2),
|
102
|
+
top = parseInt(($(window).height() - $('#alert').outerHeight()) / 2);
|
103
|
+
var wheight = $(window).height();
|
104
|
+
if (top < 0)
|
105
|
+
top = 0;
|
106
|
+
$('#alert').css({
|
107
|
+
left: left + 'px',
|
108
|
+
top: top + 'px',
|
109
|
+
display: 'block'
|
110
|
+
});
|
111
|
+
if ($('#alert').outerHeight() > wheight) {
|
112
|
+
$('#alert div.message').css({
|
113
|
+
height: wheight - $('#alert div.title').outerHeight() - $('#alert div.ok').outerHeight() - 20 + 'px'
|
114
|
+
});
|
115
|
+
}
|
116
|
+
$(document).unbind('keydown');
|
117
|
+
$(document).keydown(function(e) {
|
118
|
+
if (e.keyCode == 27) {
|
119
|
+
browser.hideDialog();
|
120
|
+
browser.hideAlert();
|
121
|
+
$(document).unbind('keydown');
|
122
|
+
$(document).keydown(function(e) {
|
123
|
+
return !browser.selectAll(e);
|
124
|
+
});
|
125
|
+
}
|
126
|
+
});
|
127
|
+
};
|
128
|
+
|
129
|
+
browser.hideAlert = function(shadow) {
|
130
|
+
if (typeof shadow == 'undefined')
|
131
|
+
shadow = true;
|
132
|
+
if (shadow)
|
133
|
+
this.unshadow();
|
134
|
+
$('#alert').css('display', 'none');
|
135
|
+
$('#alert').html('');
|
136
|
+
$('#alert').data('title', null);
|
137
|
+
};
|
138
|
+
|
139
|
+
browser.alert = function(msg, shadow) {
|
140
|
+
msg = msg.replace(/\r?\n/g, "<br />");
|
141
|
+
var title = $('#alert').data('title') ? $('#alert').data('title') : browser.label("Attention");
|
142
|
+
$('#alert').html('<div class="title"><span class="close"></span>' + title + '</div><div class="message">' + msg + '</div><div class="ok"><button>' + browser.label("OK") + '</button></div>');
|
143
|
+
$('#alert div.ok button').click(function() {
|
144
|
+
browser.hideAlert(shadow);
|
145
|
+
});
|
146
|
+
$('#alert div.title span.close').mousedown(function() {
|
147
|
+
$(this).addClass('clicked');
|
148
|
+
});
|
149
|
+
$('#alert div.title span.close').mouseup(function() {
|
150
|
+
$(this).removeClass('clicked');
|
151
|
+
});
|
152
|
+
$('#alert div.title span.close').click(function() {
|
153
|
+
browser.hideAlert(shadow);
|
154
|
+
});
|
155
|
+
$('#alert').drag(browser.drag, {handle: "#alert div.title"});
|
156
|
+
browser.showAlert(shadow);
|
157
|
+
};
|
158
|
+
|
159
|
+
browser.confirm = function(question, callBack) {
|
160
|
+
$('#dialog').data('title', browser.label("Question"));
|
161
|
+
$('#dialog').html('<div class="box"><div class="question">' + browser.label(question) + '<div class="buttons"><button>' + browser.label("No") + '</button> <button>' + browser.label("Yes") + '</button></div></div></div>');
|
162
|
+
browser.showDialog();
|
163
|
+
$('#dialog div.buttons button').first().click(function() {
|
164
|
+
browser.hideDialog();
|
165
|
+
});
|
166
|
+
$('#dialog div.buttons button').last().click(function() {
|
167
|
+
if (callBack)
|
168
|
+
callBack(function() {
|
169
|
+
browser.hideDialog();
|
170
|
+
});
|
171
|
+
else
|
172
|
+
browser.hideDialog();
|
173
|
+
});
|
174
|
+
$('#dialog div.buttons button').get(1).focus();
|
175
|
+
};
|
176
|
+
|
177
|
+
browser.shadow = function() {
|
178
|
+
$('#shadow').css('display', 'block');
|
179
|
+
};
|
180
|
+
|
181
|
+
browser.unshadow = function() {
|
182
|
+
$('#shadow').css('display', 'none');
|
183
|
+
};
|
184
|
+
|
185
|
+
browser.showMenu = function(e) {
|
186
|
+
var left = e.pageX;
|
187
|
+
var top = e.pageY;
|
188
|
+
if (($('#dialog').outerWidth() + left) > $(window).width())
|
189
|
+
left = $(window).width() - $('#dialog').outerWidth();
|
190
|
+
if (($('#dialog').outerHeight() + top) > $(window).height())
|
191
|
+
top = $(window).height() - $('#dialog').outerHeight();
|
192
|
+
$('#dialog').css({
|
193
|
+
left: left + 'px',
|
194
|
+
top: top + 'px',
|
195
|
+
display: 'none'
|
196
|
+
});
|
197
|
+
$('#dialog').fadeIn();
|
198
|
+
};
|
199
|
+
|
200
|
+
browser.fileNameDialog = function(e, post, inputName, inputValue, url, labels, callBack, selectAll) {
|
201
|
+
var html = '<form method="post" action="javascript:;">' +
|
202
|
+
'<div class="box">' +
|
203
|
+
'<input name="' + inputName + '" type="text" /><br />' +
|
204
|
+
'<div style="text-align:right">' +
|
205
|
+
'<input type="submit" value="' + _.htmlValue(this.label("OK")) + '" /> ' +
|
206
|
+
'<input type="button" value="' + _.htmlValue(this.label("Cancel")) + '" onclick="browser.hideDialog(); browser.hideAlert(); return false" />' +
|
207
|
+
'</div></div></form>';
|
208
|
+
$('#dialog').html(html);
|
209
|
+
$('#dialog').data('title', this.label(labels.title));
|
210
|
+
$('#dialog input[name="' + inputName + '"]').attr('value', inputValue);
|
211
|
+
$('#dialog').unbind();
|
212
|
+
$('#dialog').click(function() {
|
213
|
+
return false;
|
214
|
+
});
|
215
|
+
$('#dialog form').submit(function() {
|
216
|
+
var name = this.elements[0];
|
217
|
+
name.value = $.trim(name.value);
|
218
|
+
if (name.value == '') {
|
219
|
+
browser.alert(browser.label(labels.errEmpty), false);
|
220
|
+
name.focus();
|
221
|
+
return;
|
222
|
+
} else if (/[\/\\]/g.test(name.value)) {
|
223
|
+
browser.alert(browser.label(labels.errSlash), false);
|
224
|
+
name.focus();
|
225
|
+
return;
|
226
|
+
} else if (name.value.substr(0, 1) == ".") {
|
227
|
+
browser.alert(browser.label(labels.errDot), false);
|
228
|
+
name.focus();
|
229
|
+
return;
|
230
|
+
}
|
231
|
+
eval('post.' + inputName + ' = name.value;');
|
232
|
+
$.ajax({
|
233
|
+
type: 'POST',
|
234
|
+
dataType: 'json',
|
235
|
+
url: url,
|
236
|
+
data: post,
|
237
|
+
async: false,
|
238
|
+
success: function(data) {
|
239
|
+
if (browser.check4errors(data, false))
|
240
|
+
return;
|
241
|
+
if (callBack) callBack(data);
|
242
|
+
browser.hideDialog();
|
243
|
+
},
|
244
|
+
error: function() {
|
245
|
+
browser.alert(browser.label("Unknown error."), false);
|
246
|
+
}
|
247
|
+
});
|
248
|
+
return false;
|
249
|
+
});
|
250
|
+
browser.showDialog(e);
|
251
|
+
$('#dialog').css('display', 'block');
|
252
|
+
$('#dialog input[type="submit"]').click(function() {
|
253
|
+
return $('#dialog form').submit();
|
254
|
+
});
|
255
|
+
var field = $('#dialog input[type="text"]');
|
256
|
+
var value = field.attr('value');
|
257
|
+
if (!selectAll && /^(.+)\.[^\.]+$/ .test(value)) {
|
258
|
+
value = value.replace(/^(.+)\.[^\.]+$/, "$1");
|
259
|
+
_.selection(field.get(0), 0, value.length);
|
260
|
+
} else {
|
261
|
+
field.get(0).focus();
|
262
|
+
field.get(0).select();
|
263
|
+
}
|
264
|
+
};
|
265
|
+
|
266
|
+
browser.orderFiles = function(callBack, selected) {
|
267
|
+
var order = _.kuki.get('order');
|
268
|
+
var desc = (_.kuki.get('orderDesc') == 'on');
|
269
|
+
|
270
|
+
if (!browser.files || !browser.files.sort)
|
271
|
+
browser.files = [];
|
272
|
+
|
273
|
+
browser.files = browser.files.sort(function(a, b) {
|
274
|
+
var a1, b1, arr;
|
275
|
+
if (!order) order = 'name';
|
276
|
+
|
277
|
+
if (order == 'date') {
|
278
|
+
a1 = a.mtime;
|
279
|
+
b1 = b.mtime;
|
280
|
+
} else if (order == 'type') {
|
281
|
+
a1 = _.getFileExtension(a.name);
|
282
|
+
b1 = _.getFileExtension(b.name);
|
283
|
+
} else if (order == 'size') {
|
284
|
+
a1 = a.size;
|
285
|
+
b1 = b.size;
|
286
|
+
} else
|
287
|
+
eval('a1 = a.' + order + '.toLowerCase(); b1 = b.' + order + '.toLowerCase();');
|
288
|
+
|
289
|
+
if ((order == 'size') || (order == 'date')) {
|
290
|
+
if (a1 < b1) return desc ? 1 : -1;
|
291
|
+
if (a1 > b1) return desc ? -1 : 1;
|
292
|
+
}
|
293
|
+
|
294
|
+
if (a1 == b1) {
|
295
|
+
a1 = a.name.toLowerCase();
|
296
|
+
b1 = b.name.toLowerCase();
|
297
|
+
arr = [a1, b1];
|
298
|
+
arr = arr.sort();
|
299
|
+
return (arr[0] == a1) ? -1 : 1;
|
300
|
+
}
|
301
|
+
|
302
|
+
arr = [a1, b1];
|
303
|
+
arr = arr.sort();
|
304
|
+
if (arr[0] == a1) return desc ? 1 : -1;
|
305
|
+
return desc ? -1 : 1;
|
306
|
+
});
|
307
|
+
|
308
|
+
browser.showFiles(callBack, selected);
|
309
|
+
browser.initFiles();
|
310
|
+
};
|
311
|
+
|
312
|
+
browser.humanSize = function(size) {
|
313
|
+
if (size < 1024) {
|
314
|
+
size = size.toString() + ' B';
|
315
|
+
} else if (size < 1048576) {
|
316
|
+
size /= 1024;
|
317
|
+
size = parseInt(size).toString() + ' KB';
|
318
|
+
} else if (size < 1073741824) {
|
319
|
+
size /= 1048576;
|
320
|
+
size = parseInt(size).toString() + ' MB';
|
321
|
+
} else if (size < 1099511627776) {
|
322
|
+
size /= 1073741824;
|
323
|
+
size = parseInt(size).toString() + ' GB';
|
324
|
+
} else {
|
325
|
+
size /= 1099511627776;
|
326
|
+
size = parseInt(size).toString() + ' TB';
|
327
|
+
}
|
328
|
+
return size;
|
329
|
+
};
|
330
|
+
|
331
|
+
// @forked
|
332
|
+
// This has been altered from the original KCFinder path pattern to be more Rails like:
|
333
|
+
// Original used browse.php?act=COMMAND where as we use browse/COMMAND
|
334
|
+
browser.baseGetData = function(act) {
|
335
|
+
var data = 'browse/'+ act +'?type=' + encodeURIComponent(this.type) + '&lng=' + this.lang;
|
336
|
+
if (this.cms)
|
337
|
+
data += "&cms=" + this.cms;
|
338
|
+
return data;
|
339
|
+
};
|
340
|
+
|
341
|
+
browser.label = function(index, data) {
|
342
|
+
var label = this.labels[index] ? this.labels[index] : index;
|
343
|
+
if (data)
|
344
|
+
$.each(data, function(key, val) {
|
345
|
+
label = label.replace('{' + key + '}', val);
|
346
|
+
});
|
347
|
+
return label;
|
348
|
+
};
|
349
|
+
|
350
|
+
browser.check4errors = function(data, shadow) {
|
351
|
+
if (!data.error)
|
352
|
+
return false;
|
353
|
+
var msg;
|
354
|
+
if (data.error.join)
|
355
|
+
msg = data.error.join("\n");
|
356
|
+
else
|
357
|
+
msg = data.error;
|
358
|
+
browser.alert(msg, shadow);
|
359
|
+
return true;
|
360
|
+
};
|
361
|
+
|
362
|
+
browser.post = function(url, data) {
|
363
|
+
var html = '<form id="postForm" method="POST" action="' + url + '">';
|
364
|
+
$.each(data, function(key, val) {
|
365
|
+
if ($.isArray(val))
|
366
|
+
$.each(val, function(i, aval) {
|
367
|
+
html += '<input type="hidden" name="' + _.htmlValue(key) + '[]" value="' + _.htmlValue(aval) + '" />';
|
368
|
+
});
|
369
|
+
else
|
370
|
+
html += '<input type="hidden" name="' + _.htmlValue(key) + '" value="' + _.htmlValue(val) + '" />';
|
371
|
+
});
|
372
|
+
html += '</form>';
|
373
|
+
$('#dialog').html(html);
|
374
|
+
$('#dialog').css('display', 'block');
|
375
|
+
$('#postForm').get(0).submit();
|
376
|
+
};
|
377
|
+
|
378
|
+
browser.fadeFiles = function() {
|
379
|
+
$('#files > div').css({
|
380
|
+
opacity: '0.4',
|
381
|
+
filter: 'alpha(opacity:40)'
|
382
|
+
});
|
383
|
+
};
|