I worked out a way to hide the form in a way so that the user doesn't have to
go to another page to fill it out. It hides the div and provides a link to
reveal it, so I guess it could be used for anything. I thought I'd just
share it for future reference.

Go to XWiki.CalendarSheet and Edit>Objects then add a JavaScriptExtension
object with the following properties:

Name: 
(blank)
Code:
function toggle() {
        var ele = document.getElementById("toggleText");
        var text = document.getElementById("displayText");
        if(ele.style.display == "block") {
                ele.style.display = "none";
                text.innerHTML = "Click to view and create events...";
        }
        else {
                ele.style.display = "block";
                text.innerHTML = "Hide form";
        }
} 
Use this extension:
Always on this wiki
Parse content:
No
Caching policy:
Default

Then edit CalendarSheet in Source mode (Note: I converted mine from 1.0
syntax to 2.0 previously) and add these lines straight after
$cview.getHTMLCalendar($cparams, ""):

Click to view events and make events... 
<div id="toggleText" style="display: none">

Remove the ? from href above. Don't forget the </div> tag at the end:
#end
</div>
{{/html}}
{{/velocity}}
And I think that ends my questions about the calendar 

Cheers,
Lockie.
-- 
View this message in context: 
http://xwiki.475771.n2.nabble.com/Calendar-Application-on-XE-2-4-not-working-properly-tp5420827p5459543.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to