return;
li = li.parentNode;
case 'LI':
- // click on the current selected row
- if (currentColumn == li.parentNode && currentColumn.currentRow == li)
- return;
-
+ // click on the current selected row
+ if (currentColumn == li.parentNode && currentColumn.currentRow == li)
+ return;
+
currentColumn = li.parentNode;
// hightlight row
if (currentColumn.currentRow) {
}
function onDblClickHandler(evt) {
- var li = getTargetedObject(evt);
+ var li = getTargetedObject(evt);
- if(li.tagName != 'LI') {
- if (li.tagName == 'IMG' && li.parentNode.tagName == 'LI')
- li = t.parentNode;
- else
- return;
- }
- switch(window.parent.name) {
- case 'PlinnImageDialog' :
- if (li.className == 'contentish-selected') {
- window.parent.updateOrInsertImage(li.link);
- window.close();
- }
- break;
- case '' :
- case '_blank' :
- var funcNum = GetUrlParam('CKEditorFuncNum');
- window.opener.CKEDITOR.tools.callFunction(funcNum, li.link);
- window.close();
- break;
- }
+ if(li.tagName != 'LI') {
+ if (li.tagName == 'IMG' && li.parentNode.tagName == 'LI')
+ li = t.parentNode;
+ else
+ return;
+ }
+ console.log('dblclick !', li, window.parent);
+ switch(window.parent.name) {
+ case 'PlinnImageDialog' :
+ if (li.className == 'contentish-selected') {
+ window.parent.updateOrInsertImage(li.link);
+ window.close();
+ }
+ break;
+ case 'StandaloneBrowser' :
+ if (li.className == 'contentish-selected') {
+ window.opener.SetUrl(li.link);
+ window.close();
+ }
+ break;
+ default :
+ var funcNum = GetUrlParam('CKEditorFuncNum');
+ window.opener.CKEDITOR.tools.callFunction(funcNum, li.link);
+ window.close();
+ break;
+ }
}
function onKeydownHandler(evt) {
createLinkBtn.appendChild(document.createTextNode(text));
createLinkBtn.onclick = function(){
- var url = respDom.lastChild.firstChild.nodeValue;
- switch(window.parent.name) {
- case 'PlinnImageDialog' :
- window.parent.updateOrInsertImage(url);
- break;
- default:
- var funcNum = GetUrlParam('CKEditorFuncNum');
- window.opener.CKEDITOR.tools.callFunction(funcNum, url);
- break;
- }
- window.close();
+ var url = respDom.lastChild.firstChild.nodeValue;
+ switch(window.parent.name) {
+ case 'PlinnImageDialog' :
+ window.parent.updateOrInsertImage(url);
+ break;
+ case 'StandaloneBrowser' :
+ window.opener.SetUrl(url);
+ break;
+ default:
+ var funcNum = GetUrlParam('CKEditorFuncNum');
+ window.opener.CKEDITOR.tools.callFunction(funcNum, url);
+ break;
+ }
+ window.close();
};
list.appendChild(li);
</script>
</head>
<body>
- <table id="finder" cellspacing="0">
+ <table id="finder" cellspacing="0">
<tr id="finderContent">
<td id="level-0"><ul>
<li class="folderish">Folder</li>