[Yanel-dev] Uploading files with TinyMCE
Guillaume Déflache
guillaume.deflache at wyona.com
Fri May 21 10:57:02 CEST 2010
Michael Wechner schrieb:
> Hi
>
> I have just noticed that the upload URL for the TinyMCE is kind of
> hardcoded within
>
> src/contributions/resources/lookup/htdocs/tinymce-lookup.jelly
>
> "lookup-upload-action-url": "${yanel.back2realm}create-new-page.html",
>
> whereas one could overwrite this jelly and re-configure/customize within
> the corresponding resource config, e.g.
>
> src/realms/from-scratch-realm-template/res-configs/usecases/tinymce-lookup.html.yanel-rc
You mean as in:
> --- RC/usecases/tinymce-lookup.html.yanel-rc (Revision 49758)
> +++ RC/usecases/tinymce-lookup.html.yanel-rc (Arbeitskopie)
> @@ -12,7 +12,7 @@
> <yanel:custom-config>
> <views xmlns="http://www.wyona.org/yanel/rti/1.0">
> <view id="default" type="jelly">
> - <template>rthtdocs:/tinymce-lookup.jelly</template>
> + <template>yanelrepo:zwischengas:app:/commons/tinymce-lookup.jelly</template>
> <mime-type>text/html</mime-type>
> </view>
>
...for example?
I though we should rather fix the 'lookup' resource-type's jelly file
once and for all and do:
---8<---
--- src/contributions/resources/lookup/htdocs/tinymce-lookup.jelly
(Revision 49745)
+++ src/contributions/resources/lookup/htdocs/tinymce-lookup.jelly
(Arbeitskopie)
@@ -15,7 +15,7 @@
"lookup-root-node-label": "Root",
"lookup-hook": "lookupHook",
"lookup-request-paramter-type":
'${resource.getParameterAsString("type")}',
- "lookup-upload-action-url":
"${yanel.back2realm}create-new-page.html",
+ "lookup-upload-action-url":
"${yanel.back2realm}create-new-page.html?yanel.toolbar=suppress",
"lookup-upload-submit-button-label": "Upload",
"lookup-upload-enabled": "true",
"lookup-create-folder-name-default": "Folder Name",
---8<---
It tried this and it did not work, it looks like in the end
http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/user/client/ui/FormPanel.html#setAction(java.lang.String)
gets called with this URL and this function seems not to "forward" the
parameters on the URL ( I did a `grep -r -- "lookup-upload-action-url"
~/yanel-contributions.VCWC/ajax-components/ | grep -v "\/\.svn\/"` and
then "followed the Java trail" in Eclipse).
So also for this case AFAICS we do need the set-to-"suppress"
"yanel.toolbar" RC property or request attribute suggested in
http://lists.wyona.org/pipermail/yanel-development/2010-May/004792.html
More information about the Yanel-development
mailing list