Added setting of default order in FileBrowser. Added sort() to gallery view(). Fixes...
[redakcja.git] / platforma / static / filebrowser / js / .svn / text-base / FB_CKEditor.js.svn-base
1 function ProtectPath(path) {
2     path = path.replace( /\\/g,'\\\\');
3     path = path.replace( /'/g,'\\\'');
4     return path ;
5 }
6
7 function gup( name ) {
8   name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
9   var regexS = "[\\?&]"+name+"=([^&#]*)";
10   var regex = new RegExp(regexS);
11   var results = regex.exec(window.location.href);
12   if(results == null)
13     return "";
14   else
15     return results[1];
16 }
17
18 function OpenFile(fileUrl) {
19     var CKEditorFuncNum = gup('CKEditorFuncNum');
20     window.top.opener.CKEDITOR.tools.callFunction(CKEditorFuncNum,encodeURI(fileUrl).replace('#','%23'));
21     window.top.close();
22     window.top.opener.focus();
23 }
24