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.basePath = '../';
finder.selectActionFunction = SetFileField; finder.selectActionFunction = SetFileField;
finder.popup ();
window.input_image = input_image;
}
function getCKeditorValue (id) { finder.selectActionData = input_image;
return CKEDITOR.instances[id].getData (); if($.isFunction(fun)){
} window.fun = fun;
}
function SetFileField (fileUrl) { finder.popup();
/*console.log(fileUrl); }
$port = window.location.port; function getCKeditorValue(id){
$port = $port ? ':' : '' + $port; return CKEDITOR.instances[id].getData();
$host = window.location.host;*/ }
function setCKeditorValue(id,content){
return CKEDITOR.instances[id].setData(content);
}
function SetFileField( fileUrl , data )
{
split = '\/Attachments\/'; split = '\/Attachments\/';
fileUrl = fileUrl.split (split); pic = fileUrl.split(split);
if (!!fileUrl[1]) { if(!!pic[1]){
document.getElementById (window.input_image).value = fileUrl[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