Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
308 lines (274 sloc) 9.13 KB
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>gpFinder 2.x source version with PHP connector</title>
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="jquery/ui-themes/smoothness/jquery-ui-1.10.0.custom.css">
<link rel="stylesheet" href="css/common.css" type="text/css">
<link rel="stylesheet" href="css/dialog.css" type="text/css">
<link rel="stylesheet" href="css/toolbar.css" type="text/css">
<link rel="stylesheet" href="css/navbar.css" type="text/css">
<link rel="stylesheet" href="css/statusbar.css" type="text/css">
<link rel="stylesheet" href="css/contextmenu.css" type="text/css">
<link rel="stylesheet" href="css/cwd.css" type="text/css">
<link rel="stylesheet" href="css/quicklook.css" type="text/css">
<link rel="stylesheet" href="css/commands.css" type="text/css">
<link rel="stylesheet" href="css/fonts.css" type="text/css">
<!-- <link rel="stylesheet" href="themes/MacOS.css" type="text/css"> -->
<!-- JS -->
<!--
<script type="text/javascript" src="https://getfirebug.com/firebug-lite.js"></script>
<script src="jquery/jquery-1.7.2.min.js"></script>
<script src="jquery/jquery-ui-1.8.21.custom.min.js"></script>
-->
<script src="jquery/jquery-1.9.0.min.js"></script>
<script src="jquery/jquery-ui-1.10.0.custom.min.js"></script>
<!-- finder core -->
<script src="js/Finder.js"></script>
<script src="js/Finder.version.js"></script>
<script src="js/jquery.finder.js"></script>
<script src="js/Finder.resources.js"></script>
<script src="js/Finder.options.js"></script>
<script src="js/Finder.history.js"></script>
<script src="js/Finder.command.js"></script>
<script src="js/Finder.mime.js"></script>
<!-- finder ui -->
<script src="js/ui/overlay.js"></script>
<script src="js/ui/workzone.js"></script>
<script src="js/ui/navbar.js"></script>
<script src="js/ui/dialog.js"></script>
<script src="js/ui/tree.js"></script>
<script src="js/ui/cwd.js"></script>
<script src="js/ui/toolbar.js"></script>
<script src="js/ui/button.js"></script>
<script src="js/ui/uploadButton.js"></script>
<script src="js/ui/viewbutton.js"></script>
<script src="js/ui/searchbutton.js"></script>
<script src="js/ui/sortbutton.js"></script>
<script src="js/ui/panel.js"></script>
<script src="js/ui/contextmenu.js"></script>
<script src="js/ui/path.js"></script>
<script src="js/ui/stat.js"></script>
<script src="js/ui/places.js"></script>
<!-- Finder commands -->
<script src="js/commands/back.js"></script>
<script src="js/commands/forward.js"></script>
<script src="js/commands/reload.js"></script>
<script src="js/commands/up.js"></script>
<script src="js/commands/home.js"></script>
<script src="js/commands/copy.js"></script>
<script src="js/commands/cut.js"></script>
<script src="js/commands/paste.js"></script>
<script src="js/commands/open.js"></script>
<script src="js/commands/rm.js"></script>
<script src="js/commands/info.js"></script>
<script src="js/commands/duplicate.js"></script>
<script src="js/commands/rename.js"></script>
<script src="js/commands/help.js"></script>
<script src="js/commands/getfile.js"></script>
<script src="js/commands/mkdir.js"></script>
<script src="js/commands/mkfile.js"></script>
<script src="js/commands/upload.js"></script>
<script src="js/commands/download.js"></script>
<script src="js/commands/edit.js"></script>
<script src="js/commands/quicklook.js"></script>
<script src="js/commands/quicklook.plugins.js"></script>
<script src="js/commands/extract.js"></script>
<script src="js/commands/archive.js"></script>
<script src="js/commands/search.js"></script>
<script src="js/commands/view.js"></script>
<script src="js/commands/resize.js"></script>
<script src="js/commands/sort.js"></script>
<script src="js/commands/netmount.js"></script>
<script src="js/commands/unmount.js"></script>
<!-- Finder languages -->
<script src="js/i18n/ar.js"></script>
<script src="js/i18n/bg.js"></script>
<script src="js/i18n/ca.js"></script>
<script src="js/i18n/cs.js"></script>
<script src="js/i18n/de.js"></script>
<script src="js/i18n/en.js"></script>
<script src="js/i18n/el.js"></script>
<script src="js/i18n/es.js"></script>
<script src="js/i18n/fa.js"></script>
<script src="js/i18n/fr.js"></script>
<script src="js/i18n/hu.js"></script>
<script src="js/i18n/it.js"></script>
<script src="js/i18n/jp.js"></script>
<script src="js/i18n/ko.js"></script>
<script src="js/i18n/nl.js"></script>
<script src="js/i18n/no.js"></script>
<script src="js/i18n/pl.js"></script>
<script src="js/i18n/pt_BR.js"></script>
<script src="js/i18n/ru.js"></script>
<script src="js/i18n/tr.js"></script>
<script src="js/i18n/zh_CN.js"></script>
<!-- Finder dialog -->
<script src="js/jquery.dialogfinder.js"></script>
<!-- Finder custom extenstions
<script src="extensions/jplayer/elfinder.quicklook.jplayer.js"></script>
-->
<style type="text/css">
body { font-family:arial, verdana, sans-serif;}
.button {
width: 100px;
position:relative;
display: -moz-inline-stack;
display: inline-block;
vertical-align: top;
zoom: 1;
*display: inline;
margin:0 3px 3px 0;
padding:1px 0;
text-align:center;
border:1px solid #ccc;
background-color:#eee;
margin:1em .5em;
padding:.3em .7em;
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
cursor:pointer;
}
/*
#dialog {
position:absolute;
left:50%;
top:1000px;
}
*/
</style>
<script>
$().ready(function() {
$('#finder').finder({
requestType : 'post',
// url : 'php/connector.src.php',
url : 'php/connector.src.php',
debug : true, //['error', 'warning', 'event-destroy'],
handlers : {
select : function(event, FinderInstance) {
var selected = event.data.selected;
if (selected.length) {
// console.log(FinderInstance.file(selected[0]))
}
}
},
// handlers : {
// select : function(e) {
// console.log(e.data)
// }
// },
// onlyMimes : ['image', 'text/plain']
// sync : 20000,
lang : 'en',
customData : {answer : 42},
// requestType : 'POST',
// rememberLastDir : false,
// ui : ['tree', 'toolbar'],
// ui : ['toolbar', 'path', 'stat'],
// commands : [],
// commandsOptions : {
// edit : {
// mimes : ['text/plain', 'text/html', 'text/javascript'],
// editors : [
// {
// mimes : ['text/html'],
// load : function(textarea) {
// tinyMCE.execCommand("mceAddControl", true, textarea.id);
// },
// close : function(textarea, instance) {
// tinyMCE.execCommand('mceRemoveControl', false, textarea.id);
// },
// save : function(textarea, editor) {
// textarea.value = tinyMCE.get(textarea.id).selection.getContent({format : 'html'});
// tinyMCE.execCommand('mceRemoveControl', false, textarea.id);
// }
//
// }
// ]
// }
// }
// uiOptions : {
// toolbar : [['help']]
// }
})
// $('#finder2').finder({
// url : 'connectors/php/connector.php',
// width:650,
// lang : 'ru'
// })
// console.log(f1)
//
// setTimeout(function() {
// console.log($('#finder').finder('instance'))
// }, 2000)
// new Finder($('<div/>'))
// var f2 = $('#asd').finder({
// url : 'connectors/php/connector.php',
// lang : 'ru'
// }).finder('instance')
$('#back').click(function(e) {
f1.exec('back')
})
$('#fwd').click(function(e) {
f1.exec('forward')
})
$('#dialog').click(function() {
var fm = $('<div/>').dialogfinder({
url : 'php/connector.src.php',
lang : 'en',
width : 840,
destroyOnClose : true,
getFileCallback : function(files, fm) {
console.log(files);
},
commandsOptions : {
getfile : {
oncomplete : 'close',
folders : true
}
}
}).dialogfinder('instance');
});
});
var logi = 0;
function debug(obj){
var a = '';
for(var i in obj){
try{
try{
a += '<br/><b>'+i+ "</b> = " + obj[i].toString().replace(/</g,'&lt;') + "\n";
}catch(m){
a += '<br/><b>'+i+ "</b> = " + obj[i] + "\n";
}
}catch(m){
a += '<br/><b>'+i+"</b> -- not allowed -- \n";
}
}
$('<div style="padding:20px;padding:5px;font-size:12px;max-width:400px;background:#fff;border:1px solid #ccc;"/>').html(logi+' :: '+ a).appendTo('body');
logi++;
}
</script>
</head>
<body>
<div id="back" class="button">back</div>
<div id="fwd" class="button">forward</div>
<div id="dialog" class="button">dialog</div>
<!-- <div id="close" class="button">close</div>
<div id="dock" class="button">dock</div>
<div id="undock" class="button">undock</div>-->
<!-- <div style="width:670px; float:left"> -->
<div id="finder">finder <span>here</span></div>
<!-- </div> -->
<!-- <div style="width:670px; float:left">
<div id="finder2">finder</div>
</div> -->
<br clear="all"/>
<div id="debug_area"></div>
<input type="text" value="123" />
<input type="text" value="456" />
<!-- <div><input type="text" id="i1"></div> -->
<!-- <div><input type="text" id="i2"></div> -->
</body>
</html>