Index: openacs-4/packages/richtext-xinha/www/resources/xinha-nightly/plugins/OacsAttach/oacs-attach.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/richtext-xinha/www/resources/xinha-nightly/plugins/OacsAttach/Attic/oacs-attach.js,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/richtext-xinha/www/resources/xinha-nightly/plugins/OacsAttach/oacs-attach.js 3 Jan 2016 20:51:56 -0000 1.1.2.1 +++ openacs-4/packages/richtext-xinha/www/resources/xinha-nightly/plugins/OacsAttach/oacs-attach.js 28 Nov 2016 16:26:48 -0000 1.1.2.2 @@ -128,7 +128,8 @@ // "/acs-templating/scripts/xinha/insert-image.tcl?fs_package_id=" + // fs_package_id; - var PopupUrl = "/acs-templating/scripts/xinha/attach-file?package_id=" + OacsAttach.package_id; + // var PopupUrl = "/acs-templating/scripts/xinha/attach-file?package_id=" + OacsAttach.package_id; + var PopupUrl = "/xowiki/xinha/attach-file?package_id=" + OacsAttach.package_id; if (typeof OacsAttach.key != "undefinied") { PopupUrl = PopupUrl + "&parent_id=" + OacsAttach.key; } else if (typeof OacsAttach.attach_parent_id != "undefined") { @@ -195,7 +196,8 @@ }; } - var PopupUrl = "/acs-templating/scripts/xinha/attach-file?package_id=" + OacsAttach.package_id; + // var PopupUrl = "/acs-templating/scripts/xinha/attach-file?package_id=" + OacsAttach.package_id; + var PopupUrl = "/xowiki/xinha/attach-file?package_id=" + OacsAttach.package_id; if (typeof OacsAttach.key != "undefinied") { PopupUrl = PopupUrl + "&parent_id=" + OacsAttach.key; } else if (typeof OacsAttach.attach_parent_id != "undefined") { @@ -272,7 +274,8 @@ // "/acs-templating/scripts/xinha/insert-image.tcl?fs_package_id=" + // fs_package_id; - var PopupUrl = "/acs-templating/scripts/xinha/attach-image?package_id=" + OacsAttach.package_id; + // var PopupUrl = "/acs-templating/scripts/xinha/attach-image?package_id=" + OacsAttach.package_id; + var PopupUrl = "/xowiki/xinha/attach-file?package_id=" + OacsAttach.package_id; if (typeof OacsAttach.key != "undefinied") { PopupUrl = PopupUrl + "&parent_id=" + OacsAttach.key; } else if (typeof OacsAttach.attach_parent_id != "undefined") { Index: openacs-4/packages/xowiki/www/xinha/attach-file.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/xinha/attach-file.adp,v diff -u -r1.3.4.2 -r1.3.4.3 --- openacs-4/packages/xowiki/www/xinha/attach-file.adp 9 Jun 2016 08:54:54 -0000 1.3.4.2 +++ openacs-4/packages/xowiki/www/xinha/attach-file.adp 28 Nov 2016 16:26:48 -0000 1.3.4.3 @@ -1,6 +1,5 @@ - - - #acs-templating.HTMLArea_InsertImageTitle# + + #acs-templating.HTMLArea_InsertImageTitle# @@ -147,90 +153,91 @@ - + -
#acs-templating.HTMLArea_InsertImageTitle# URL click here
+
#acs-templating.HTMLArea_InsertImageTitle# URL click here
-
#acs-templating.HTMLArea_InsertImageTitle# Upload click here
+
#acs-templating.HTMLArea_InsertImageTitle# Upload click here
@@ -264,7 +271,7 @@
-   +  
@@ -280,6 +287,3 @@
- - - Index: openacs-4/packages/xowiki/www/xinha/attach-file.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/xinha/attach-file.tcl,v diff -u -r1.5.2.1 -r1.5.2.2 --- openacs-4/packages/xowiki/www/xinha/attach-file.tcl 10 Sep 2015 08:10:43 -0000 1.5.2.1 +++ openacs-4/packages/xowiki/www/xinha/attach-file.tcl 28 Nov 2016 16:26:48 -0000 1.5.2.2 @@ -21,18 +21,29 @@ set write_p 1 # FIXME DAVEB i18n for share_options - set share_options [list [list "[_ acs-templating.Only_myself]" private] [list "[_ acs-templating.This_Group]" group] [list "[_ acs-templating.Anyone_on_this_system]" site] [list "[_ acs-templating.Anyone_on_the_internet]" public]] + set share_options [list \ + [list "[_ acs-templating.Only_myself]" private] \ + [list "[_ acs-templating.This_Group]" group] \ + [list "[_ acs-templating.Anyone_on_this_system]" site] \ + [list "[_ acs-templating.Anyone_on_the_internet]" public]] ad_form \ -name upload_form \ -mode edit \ -export {selector_type file_types parent_id} \ -html { enctype multipart/form-data } \ -form { item_id:key - {upload_file:file(file) {html {size 30}} } - {share:text(radio),optional {label "[_ acs-templating.This_image_can_be_reused_by]"} {options $share_options} {help_text "[_ acs-templating.This_image_can_be_reused_help]"}} - {ok_btn:text(submit) {label "[_ acs-templating.HTMLArea_SelectUploadBtn]"} + {upload_file:file(file) + {html {size 30}} } + {share:text(radio),optional + {label "[_ acs-templating.This_image_can_be_reused_by]"} + {options $share_options} + {help_text "[_ acs-templating.This_image_can_be_reused_help]"} + } + {ok_btn:text(submit) + {label "[_ acs-templating.HTMLArea_SelectUploadBtn]"} + } } \ -on_request { set share site @@ -136,11 +147,41 @@ set f_url "/image/$item_id/$file_name" } } - + } else { set write_p 0 } + +## Add event handlers + +template::add_event_listener -id "body" -event "load" -script { + Init(); +} +template::add_event_listener -id "ok_button" -script { + onOK(); +} +template::add_event_listener -id "showpreview" -script { + togglePreview() +} +template::add_event_listener -CSSclass "cancel_buttons" -script { + onCancel(); +} +template::add_event_listener -id "resize_window_upload_button" -script { + resizeWindow('upload'); +} +template::add_event_listener -id "resize_window_url_button" -script { + resizeWindow('url'); +} +template::add_event_listener -id "preview_button" -script { + onPreview(); +} +template::add_event_listener -id "f_url" -script { + ChangeImageSrc(); +} + +## + set HTML_Preview "Preview" set HTML_UploadTitle "" # Local variables: