Hoani Cross wrote:
Thanks for the tips but I already tried it. The
problem is that the macro is
an embedded
flash component (the one delivered with freemind-0.9-beta9) which do not
react to the
"force reload" shortcut. I must go through the preference of my browser to
manually
clear the cache. However, using the revision
number in the macro should be a solution but force me to be careful of
updating the
macro call each time I update the mindmap (or when one of my collaborator
update it).
You can use
$doc.getAttachmentRevisionURL($mapname,
$doc.getAttachment($mapname).getVersion())
in your macro as workaround.
Implementing a solution in XWiki to make attachment
max caching period to
the time
of the last update should be the first choice solution : transparent for
everyone... a
valuable proposal for XWiki 1.6 ;) ?
Feel free to fill jira issue on
jira.xwiki.org with your suggestions.
You can look around the macro at the following address
:
http://globotraders-tahiti.com/xwiki/bin/view/Macros/Freemind
and the code is :
#macro(flashmap $mapname)
<script type="text/javascript"
src="$xwiki.getDocument('Macros.Freemind').getAttachmentURL('flashobject.js')">
</script>
<div id="flashcontent_$mapname">
Flash plugin or Javascript are turned off.
Activate both and reload to view the mindmap
</div><script type="text/javascript">
var fo = new
FlashObject("$xwiki.getDocument('Macros.Freemind').getAttachmentURL('visorFreemind.swf')",
"visorFreeMind", "100%", "600", 6, "#9999ff");
fo.addParam("quality", "high");
fo.addParam("bgcolor", "#ffffff");
fo.addVariable("openUrl", "_blank");
fo.addVariable("initLoadFile", "http://globotraders-tahiti.com
$doc.getAttachmentURL($mapname)");
fo.addVariable("startCollapsedToLevel","5");
fo.write("flashcontent_$mapname");
</script>
#end
Some tuning has to be done but it really rocks, you should think about add
it to the next revision of XWiki.
--
Artem Melentyev