Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/OacsAttach/oacs-attach.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/OacsAttach/oacs-attach.js,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/OacsAttach/oacs-attach.js 18 Aug 2006 18:38:51 -0000 1.2 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/OacsAttach/oacs-attach.js 31 Aug 2006 14:15:19 -0000 1.3 @@ -123,7 +123,10 @@ // "/acs-templating/scripts/xinha/insert-image.tcl?fs_package_id=" + // fs_package_id; - var PopupUrl = "/acs-templating/scripts/xinha/insert-ilink?"; + var PopupUrl = "/acs-templating/scripts/xinha/attach-file?"; + if (typeof OacsAttach.attach_parent_id != "undefined") { + PopupUrl = PopupUrl + "&parent_id=" + OacsAttach.attach_parent_id; + } if (typeof OacsAttach.fs_package_id != "undefined") { PopupUrl = PopupUrl + "&fs_package_id=" + OacsAttach.fs_package_id; } @@ -144,7 +147,6 @@ ilink.title = param.f_title.trim(); ilink.setAttribute("target", param.f_target.trim()); //ilink.setAttribute("use_target",param.f_usetarget.trim()); - if (!link || link == null) { if (HTMLArea.is_ie) { editor.insertHTML(ilink.outerHTML); @@ -186,15 +188,16 @@ }; } - - var PopupUrl = "/acs-templating/scripts/xinha/insert-ilink?"; + var PopupUrl = "/acs-templating/scripts/xinha/attach-file?"; + if (typeof OacsAttach.attach_parent_id != "undefined") { + PopupUrl = PopupUrl + "&parent_id=" + OacsAttach.attach_parent_id; + } if (typeof OacsAttach.fs_package_id != "undefined") { PopupUrl = PopupUrl + "&fs_package_id=" + OacsAttach.fs_package_id; } if (typeof OacsAttach.folder_id != "undefined") { PopupUrl = PopupUrl + "&folder_id=" + OacsAttach.folder_id; } - Dialog(PopupUrl, function(param) { if (!param) return false; @@ -259,14 +262,13 @@ // "/acs-templating/scripts/xinha/insert-image.tcl?fs_package_id=" + // fs_package_id; - var PopupUrl = "/acs-templating/scripts/xinha/attach-file?"; + var PopupUrl = "/acs-templating/scripts/xinha/attach-image?"; if (typeof OacsAttach.attach_parent_id != "undefined") { PopupUrl = PopupUrl + "&parent_id=" + OacsAttach.attach_parent_id; } if (typeof OacsAttach.folder_id != "undefined") { PopupUrl = PopupUrl + "&folder_id=" + OacsAttach.folder_id; } - Dialog(PopupUrl, function(param) { if (!param) { // user must have pressed Cancel return false;