Commit 3a53dd99 authored by clone's avatar clone

ckfinder

parent e1b839fa
function BrowseServer(input_image,fun )
{
function BrowseServer (input_image) {
var finder = new CKFinder ();
var finder = new CKFinder();
finder.basePath = '../';
finder.selectActionFunction = SetFileField;
finder.popup ();
window.input_image = input_image;
}
function getCKeditorValue (id) {
return CKEDITOR.instances[id].getData ();
}
finder.selectActionData = input_image;
if($.isFunction(fun)){
window.fun = fun;
}
function SetFileField (fileUrl) {
/*console.log(fileUrl);
$port = window.location.port;
$port = $port ? ':' : '' + $port;
$host = window.location.host;*/
finder.popup();
}
function getCKeditorValue(id){
return CKEDITOR.instances[id].getData();
}
function setCKeditorValue(id,content){
return CKEDITOR.instances[id].setData(content);
}
function SetFileField( fileUrl , data )
{
split = '\/Attachments\/';
fileUrl = fileUrl.split (split);
if (!!fileUrl[1]) {
document.getElementById (window.input_image).value = fileUrl[1];
pic = fileUrl.split(split);
if(!!pic[1]){
document.getElementById( (data["selectActionData"] )).value = pic[1];
}
if($.isFunction(window.fun)){
window.fun(fileUrl);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment