Created
May 2, 2012 05:42
-
-
Save jbroadway/2574180 to your computer and use it in GitHub Desktop.
Calling the jwysiwyg file manager in Elefant without the editor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- apps/test/views/fm.html --> | |
<script> | |
function filemanager () { | |
$.wysiwyg.fileManager.init (function (file) { | |
$('#file').val (file); | |
}); | |
return false; | |
} | |
$(function () { | |
$.wysiwyg.fileManager.setAjaxHandler ('http://{{ $_SERVER.HTTP_HOST }}/filemanager/embed'); | |
}); | |
</script> | |
<p> | |
<input type="text" id="file" /> | |
<a href="#" onclick="return filemanager ()">Browse</a> | |
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// apps/test/handlers/fm.php | |
$this->require_admin (); | |
$page->layout = 'admin'; | |
$page->add_style ('/css/wysiwyg/jquery.wysiwyg.css'); | |
$page->add_style ('/css/files/wysiwyg.fileManager.css'); | |
$page->add_script ('/js/wysiwyg/jquery.wysiwyg.js'); | |
$page->add_script ('/js/wysiwyg/plugins/wysiwyg.fileManager.js'); | |
$page->title = i18n_get ('FileManager Test'); | |
echo $tpl->render ('test/fm'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment