Calendar Application on XE 2.4 not working properly

classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

Calendar Application on XE 2.4 not working properly

Ramon Gomes Brandão - SERINT
Hi,

 

I've Just installed Calendar Plugin and Calendar Application on my XE 2.4 instance. It works when I point to xwiki/bin/view/Main/EventCalendar/, but its look and feel is far away of that smooth one shown in the Calendar Application home page (http://code.xwiki.org/xwiki/bin/view/Applications/CalendarApplication).

 

The calendar appears as a very simple and rough table, its cells don't have a prefixed size (nothing more than just the length of the two digits number of the day) and it does not show the PDF creation link. It also doesn't mark the "today" day on the calendar. I've checked the source code and it seems that the $cview.getHTMLCalendar($cparams, "") method isn't building a smooth calendar. How can I fix this?

 

Doesn't XE 2.4 contain an event calendar by default? If so, how can I access it?

 

I'm using the colibri skin.

 

Regards,

 

Ramon Gomes Brandão

 

_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Calendar Application on XE 2.4 not working properly

Raluca Stavro
Hello Ramon,

The current calendar application has no custom styles applied on it.
See http://jira.xwiki.org/jira/browse/XACALENDAR-14 .
I added a patch to it and I hope that it will be applied very soon.

Raluca.

2010/8/13 Ramon Gomes Brandão - SERINT <[hidden email]>:

> Hi,
>
>
>
> I've Just installed Calendar Plugin and Calendar Application on my XE 2.4 instance. It works when I point to xwiki/bin/view/Main/EventCalendar/, but its look and feel is far away of that smooth one shown in the Calendar Application home page (http://code.xwiki.org/xwiki/bin/view/Applications/CalendarApplication).
>
>
>
> The calendar appears as a very simple and rough table, its cells don't have a prefixed size (nothing more than just the length of the two digits number of the day) and it does not show the PDF creation link. It also doesn't mark the "today" day on the calendar. I've checked the source code and it seems that the $cview.getHTMLCalendar($cparams, "") method isn't building a smooth calendar. How can I fix this?
>
>
>
> Doesn't XE 2.4 contain an event calendar by default? If so, how can I access it?
>
>
>
> I'm using the colibri skin.
>
>
>
> Regards,
>
>
>
> Ramon Gomes Brandão
>
>
>
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

RES: Calendar Application on XE 2.4 not workingproperly

Ramon Gomes Brandão - SERINT
Raluca,

Is there a way to apply the modifications of this patch on my running calendar application instance? I would like  to test it without the need to build the application.

Maybe editing the source code of xwiki/bin/view/XWiki/CalendarSheet ?

Ramon Gomes Brandão


-----Mensagem original-----
De: [hidden email] [mailto:[hidden email]] Em nome de Raluca Stavro
Enviada em: terça-feira, 17 de agosto de 2010 10:32
Para: XWiki Users
Assunto: Re: [xwiki-users] Calendar Application on XE 2.4 not workingproperly

Hello Ramon,

The current calendar application has no custom styles applied on it.
See http://jira.xwiki.org/jira/browse/XACALENDAR-14 .
I added a patch to it and I hope that it will be applied very soon.

Raluca.

2010/8/13 Ramon Gomes Brandão - SERINT <[hidden email]>:

> Hi,
>
>
>
> I've Just installed Calendar Plugin and Calendar Application on my XE 2.4 instance. It works when I point to xwiki/bin/view/Main/EventCalendar/, but its look and feel is far away of that smooth one shown in the Calendar Application home page (http://code.xwiki.org/xwiki/bin/view/Applications/CalendarApplication).
>
>
>
> The calendar appears as a very simple and rough table, its cells don't have a prefixed size (nothing more than just the length of the two digits number of the day) and it does not show the PDF creation link. It also doesn't mark the "today" day on the calendar. I've checked the source code and it seems that the $cview.getHTMLCalendar($cparams, "") method isn't building a smooth calendar. How can I fix this?
>
>
>
> Doesn't XE 2.4 contain an event calendar by default? If so, how can I access it?
>
>
>
> I'm using the colibri skin.
>
>
>
> Regards,
>
>
>
> Ramon Gomes Brandão
>
>
>
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: RES: Calendar Application on XE 2.4 not workingproperly

Lockie
I am also eagerly awaiting a more functional and better looking calendar, I hope your patch gets through soon. I tried the GWT-Calendar aswell but I get a lot of errors, so either I'm doing something wrong or its not functional yet...

Lockie.
Lockie
Reply | Threaded
Open this post in threaded view
|

Re: RES: Calendar Application on XE 2.4 not workingproperly

Raluca Stavro
In reply to this post by Ramon Gomes Brandão - SERINT
Yes, you have to edit XWiki.CalendarSheet document, add an object of
type 'XWiki.StyleSheetExtension', take the styles from the patch
(don't forget to remove all the '+'-es) and paste them into the
object's content, then set these properties:
Use this extension: 'On demand',
Parse content: 'Yes' .

This is what you have to copy from the patch:
/*
** Calendar
*/

#template('colorThemeInit.vm')
...
...
...
.wiki-calendar-daytitle {
  background-color: $theme.backgroundSecondaryColor;
  padding: 0px 3px;
  text-align: right;
}

Raluca.


2010/8/17 Ramon Gomes Brandão - SERINT <[hidden email]>:

> Raluca,
>
> Is there a way to apply the modifications of this patch on my running calendar application instance? I would like  to test it without the need to build the application.
>
> Maybe editing the source code of xwiki/bin/view/XWiki/CalendarSheet ?
>
> Ramon Gomes Brandão
>
>
> -----Mensagem original-----
> De: [hidden email] [mailto:[hidden email]] Em nome de Raluca Stavro
> Enviada em: terça-feira, 17 de agosto de 2010 10:32
> Para: XWiki Users
> Assunto: Re: [xwiki-users] Calendar Application on XE 2.4 not workingproperly
>
> Hello Ramon,
>
> The current calendar application has no custom styles applied on it.
> See http://jira.xwiki.org/jira/browse/XACALENDAR-14 .
> I added a patch to it and I hope that it will be applied very soon.
>
> Raluca.
>
> 2010/8/13 Ramon Gomes Brandão - SERINT <[hidden email]>:
>> Hi,
>>
>>
>>
>> I've Just installed Calendar Plugin and Calendar Application on my XE 2.4 instance. It works when I point to xwiki/bin/view/Main/EventCalendar/, but its look and feel is far away of that smooth one shown in the Calendar Application home page (http://code.xwiki.org/xwiki/bin/view/Applications/CalendarApplication).
>>
>>
>>
>> The calendar appears as a very simple and rough table, its cells don't have a prefixed size (nothing more than just the length of the two digits number of the day) and it does not show the PDF creation link. It also doesn't mark the "today" day on the calendar. I've checked the source code and it seems that the $cview.getHTMLCalendar($cparams, "") method isn't building a smooth calendar. How can I fix this?
>>
>>
>>
>> Doesn't XE 2.4 contain an event calendar by default? If so, how can I access it?
>>
>>
>>
>> I'm using the colibri skin.
>>
>>
>>
>> Regards,
>>
>>
>>
>> Ramon Gomes Brandão
>>
>>
>>
>> _______________________________________________
>> users mailing list
>> [hidden email]
>> http://lists.xwiki.org/mailman/listinfo/users
>>
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

RES: RES: Calendar Application on XE 2.4 not working properly

Ramon Gomes Brandão - SERINT
Raluca,

I've copied the patch content (the piece you informed) into an XWiki.StyleSheetExtension object, as you mentioned, but it had no effect, even after refreshing the wiki page. The StyleSheetExtension has a name field. Should it be something special? How to refresh/make the new custom style work? I'm using the colibri skin.

Thanks,

Ramon Gomes Brandão


-----Mensagem original-----
De: [hidden email] [mailto:[hidden email]] Em nome de Raluca Stavro
Enviada em: quarta-feira, 18 de agosto de 2010 03:41
Para: XWiki Users
Assunto: Re: [xwiki-users] RES: Calendar Application on XE 2.4 notworkingproperly

Yes, you have to edit XWiki.CalendarSheet document, add an object of
type 'XWiki.StyleSheetExtension', take the styles from the patch
(don't forget to remove all the '+'-es) and paste them into the
object's content, then set these properties:
Use this extension: 'On demand',
Parse content: 'Yes' .

This is what you have to copy from the patch:
/*
** Calendar
*/

#template('colorThemeInit.vm')
...
...
...
.wiki-calendar-daytitle {
  background-color: $theme.backgroundSecondaryColor;
  padding: 0px 3px;
  text-align: right;
}

Raluca.


2010/8/17 Ramon Gomes Brandão - SERINT <[hidden email]>:

> Raluca,
>
> Is there a way to apply the modifications of this patch on my running calendar application instance? I would like  to test it without the need to build the application.
>
> Maybe editing the source code of xwiki/bin/view/XWiki/CalendarSheet ?
>
> Ramon Gomes Brandão
>
>
> -----Mensagem original-----
> De: [hidden email] [mailto:[hidden email]] Em nome de Raluca Stavro
> Enviada em: terça-feira, 17 de agosto de 2010 10:32
> Para: XWiki Users
> Assunto: Re: [xwiki-users] Calendar Application on XE 2.4 not workingproperly
>
> Hello Ramon,
>
> The current calendar application has no custom styles applied on it.
> See http://jira.xwiki.org/jira/browse/XACALENDAR-14 .
> I added a patch to it and I hope that it will be applied very soon.
>
> Raluca.
>
> 2010/8/13 Ramon Gomes Brandão - SERINT <[hidden email]>:
>> Hi,
>>
>>
>>
>> I've Just installed Calendar Plugin and Calendar Application on my XE 2.4 instance. It works when I point to xwiki/bin/view/Main/EventCalendar/, but its look and feel is far away of that smooth one shown in the Calendar Application home page (http://code.xwiki.org/xwiki/bin/view/Applications/CalendarApplication).
>>
>>
>>
>> The calendar appears as a very simple and rough table, its cells don't have a prefixed size (nothing more than just the length of the two digits number of the day) and it does not show the PDF creation link. It also doesn't mark the "today" day on the calendar. I've checked the source code and it seems that the $cview.getHTMLCalendar($cparams, "") method isn't building a smooth calendar. How can I fix this?
>>
>>
>>
>> Doesn't XE 2.4 contain an event calendar by default? If so, how can I access it?
>>
>>
>>
>> I'm using the colibri skin.
>>
>>
>>
>> Regards,
>>
>>
>>
>> Ramon Gomes Brandão
>>
>>
>>
>> _______________________________________________
>> users mailing list
>> [hidden email]
>> http://lists.xwiki.org/mailman/listinfo/users
>>
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: RES: RES: Calendar Application on XE 2.4 not working properly

Lockie
I got it to work, however I had to to put the 'Use This Extension' part to 'Always on this wiki'. I guess the 'Always on this page' part would work as well if thats what you're after. I left the name part blank.

Thanks Raluca it looks much better.

Lockie
Lockie
Reply | Threaded
Open this post in threaded view
|

RES: RES: RES: Calendar Application on XE 2.4 notworking properly

Ramon Gomes Brandão - SERINT
Got It working too.

Thanks so much, Raluca and Lockie.

Ramon Gomes Brandão

-----Mensagem original-----
De: [hidden email] [mailto:[hidden email]] Em nome de Lockie
Enviada em: quarta-feira, 18 de agosto de 2010 21:07
Para: [hidden email]
Assunto: Re: [xwiki-users] RES: RES: Calendar Application on XE 2.4 notworking properly


I got it to work, however I had to to put the 'Use This Extension' part to
'Always on this wiki'. I guess the 'Always on this page' part would work as
well if thats what you're after. I left the name part blank.

Thanks Raluca it looks much better.

Lockie
--
View this message in context: http://xwiki.475771.n2.nabble.com/Calendar-Application-on-XE-2-4-not-working-properly-tp5420827p5438405.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

RES: RES: RES: RES: Calendar Application on XE 2.4notworking properly

Ramon Gomes Brandão - SERINT
Raluca/Lockie,

How can I create a calendar associated to a specific space? I mean: I want that other space than Main has a EventCalendar, let's say, Space1/EventCalendar.

I tried to create a page and add #includeForm("XWiki.CalendarSheet"), but no success. How can I do that?

Regards,

Ramon Gomes Brandão

-----Mensagem original-----
De: [hidden email] [mailto:[hidden email]] Em nome de Ramon Gomes Brandão - SERINT
Enviada em: quinta-feira, 19 de agosto de 2010 18:43
Para: XWiki Users
Assunto: [xwiki-users] RES: RES: RES: Calendar Application on XE 2.4notworking properly

Got It working too.

Thanks so much, Raluca and Lockie.

Ramon Gomes Brandão

-----Mensagem original-----
De: [hidden email] [mailto:[hidden email]] Em nome de Lockie
Enviada em: quarta-feira, 18 de agosto de 2010 21:07
Para: [hidden email]
Assunto: Re: [xwiki-users] RES: RES: Calendar Application on XE 2.4 notworking properly


I got it to work, however I had to to put the 'Use This Extension' part to
'Always on this wiki'. I guess the 'Always on this page' part would work as
well if thats what you're after. I left the name part blank.

Thanks Raluca it looks much better.

Lockie
--
View this message in context: http://xwiki.475771.n2.nabble.com/Calendar-Application-on-XE-2-4-not-working-properly-tp5420827p5438405.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: RES: RES: RES: RES: Calendar Application on XE 2.4notworking properly

Lockie
Not sure if this is what you're after, but I am able to insert a new calendar on pages simply adding the line

{{include document="XWiki.CalendarSheet"/}}

in Edit > WIKI.

Lockie.
Lockie
Reply | Threaded
Open this post in threaded view
|

Re: RES: RES: RES: RES: Calendar Application on XE 2.4notworking properly

Lockie
One other thing, make sure you have the correct syntax selected in the dropdown. So if you have XWiki 1.0 Syntax selected in the dropdown menu then it'd be #includeForm("XWiki.CalendarSheet") and 2.0 is {{include document="XWiki.CalendarSheet"/}}.

It looks like this Calendar had been made with 1.0 syntax so right now I'm attempting to edit it to use with 2.0 syntax so I can display it on the dashboard on the home page without various parts of it breaking.

Lockie.
Lockie
Reply | Threaded
Open this post in threaded view
|

Re: RES: RES: Calendar Application on XE 2.4 not working properly

Raluca Stavro
In reply to this post by Lockie
Ah, sorry, I forgot to tell you that in order to use the stylesheet
extension, you have to add this line in the XWiki.CalendarSheet page:
$xwiki.ssx.use('XWiki.CalendarSheet')
You'll see that there is this line somewhere at the end of the patch .
Using the extension 'Always on this wiki' will load the CSS code on
opening any page of your wiki instance, even where you don't need that
CSS.

Raluca.

On Thu, Aug 19, 2010 at 3:06 AM, Lockie <[hidden email]> wrote:

>
> I got it to work, however I had to to put the 'Use This Extension' part to
> 'Always on this wiki'. I guess the 'Always on this page' part would work as
> well if thats what you're after. I left the name part blank.
>
> Thanks Raluca it looks much better.
>
> Lockie
> --
> View this message in context: http://xwiki.475771.n2.nabble.com/Calendar-Application-on-XE-2-4-not-working-properly-tp5420827p5438405.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: RES: RES: Calendar Application on XE 2.4 not working properly

Lockie
Ah, thanks.

I have a question though - I would like to mirror the calendar on my homepage without having the entry form on it, and instead have a link to a page where you can put events into the calendar. When I use {{include document="XWiki.CalendarSheet"/}} it creates a new instance of the calendar, so if I add events directly to CalendarSheet they don't display on the calendar on the homepage.

So, how can I make the entry form display its user input on a calendar on another page?

Lockie.
Lockie
Reply | Threaded
Open this post in threaded view
|

Re: RES: RES: Calendar Application on XE 2.4 not working properly

Raluca Stavro
Yes, you can do that.
You have to change the parameters for the getHTMLCalendar method.
See http://svn.xwiki.org/svnroot/xwiki/platform/xwiki-plugins/trunk/calendar/src/main/java/com/xpn/xwiki/plugin/calendar/CalendarPluginApi.java
.
So this is what you should do in your homepage:

...
## Set the calendar parameters
...
## Display calendar
$cview.getHTMLCalendar($cparams,
$xwiki.getDocument('MySpace.MyEventCalendarPage'), "")

Where 'MySpace.MyEventsPage' is 'Main.EventCalendar' by default.

Raluca.

On Mon, Aug 23, 2010 at 5:10 AM, Lockie <[hidden email]> wrote:

>
> Ah, thanks.
>
> I have a question though - I would like to mirror the calendar on my
> homepage without having the entry form on it, and instead have a link to a
> page where you can put events into the calendar. When I use {{include
> document="XWiki.CalendarSheet"/}} it creates a new instance of the calendar,
> so if I add events directly to CalendarSheet they don't display on the
> calendar on the homepage.
>
> So, how can I make the entry form display its user input on a calendar on
> another page?
>
> Lockie.
> --
> View this message in context: http://xwiki.475771.n2.nabble.com/Calendar-Application-on-XE-2-4-not-working-properly-tp5420827p5451203.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: RES: RES: Calendar Application on XE 2.4 not working properly

Lockie
Raluca Stavro wrote
Yes, you can do that.
You have to change the parameters for the getHTMLCalendar method.
See http://svn.xwiki.org/svnroot/xwiki/platform/xwiki-plugins/trunk/calendar/src/main/java/com/xpn/xwiki/plugin/calendar/CalendarPluginApi.java
.
So this is what you should do in your homepage:

...
## Set the calendar parameters
...
## Display calendar
$cview.getHTMLCalendar($cparams,
$xwiki.getDocument('MySpace.MyEventCalendarPage'), "")

Where 'MySpace.MyEventsPage' is 'Main.EventCalendar' by default.

Raluca.
Thanks Raluca for all the help I really appreciate it. I don't really understand what I'm meant to do though. I tried putting the code you provided on the homepage and in different places but I can't seem to get it to work. Can you tell me exactly where to put it, and am I meant to edit the calendar parameters java code?

I have made a new page that users will use to fill out the calendar form. It is called Main.Calendar and in it the only code is:
{{include document="XWiki.CalendarSheet"/}}

Then in Main.Home I have the Main.Calendar appearing below the dashboard:
{{include document="Main.Dashboard"/}}
{{include document="Main.Calendar"/}}

But rather than displaying the events made in Main.Calendar it only displays events made on the actual Main.Home page.

All my pages are in 2.0 syntax and I'm using the colibri skin. I hope nothing went wrong when I converted the calendar from 1.0 to 2.0 syntax. The reason I need this is because I don't want the user to have to scroll down on the home page, so if I can get the calendar form on another page, then I can hide it on the home page with an external stylesheet, making everything much more organised and neat. I managed to mirror the blog, recent changes, and other pages on the home page but this one has me baffled.

Thanks again,

Lockie.
Lockie
Reply | Threaded
Open this post in threaded view
|

Re: RES: RES: Calendar Application on XE 2.4 not working properly

Lockie
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, ""):

<a id="displayText" h?ref="javascript:toggle();">Click to view events and make events...</a>
<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.
Lockie
Reply | Threaded
Open this post in threaded view
|

Re: RES: RES: Calendar Application on XE 2.4 not working properly

Raluca Stavro
Hi,

The solution that I told you about is like this:
In a separate page, let's say 'Main.MyCalendar', paste this piece of
code that is copied from 'XWiki.CalendarSheet' (I also added 2.0 wiki
syntax but this is mandatory -> you can keep the 1.0 syntax):

{{velocity}}
$xwiki.ssx.use('XWiki.CalendarSheet')

#set($cview = $xwiki.calendar)
#set($cparams = $cview.calendarParams)
#if($request.month)
$cparams.put("month", $request.get("month"))
#end
#if($request.year)
$cparams.put("year", $request.get("year"))
#end
#set($rqcategories = $util.arrayList)
#foreach($rqcateg in $request.get("category").split(","))
#if(!$rqcateg.trim().equals(""))
#set($discard = $rqcategories.add($rqcateg.trim()))
#end
#end
$cparams.put("categories", $rqcategories)

{{html wiki=true}}
[[Add New Event>>Main.EventCalendar]]
$cview.getHTMLCalendar($cparams, $xwiki.getDocument('Main.EventCalendar'), "")
{{/html}}
{{/velocity}}

Now, in 'XWiki.CalendarSheet' just remove the lines that you've put in
'Main.MyCalendar'. You can also remove the piece of code that lists
the current event (the '#foreach($event in
$doc.getObjects("XWiki.CalendarEvent"))' block), depending on what you
want to display in the form page.

And finally, in 'XWiki.CalendarSheet' change the action of the creation form:
<form action="$xwiki.getDocument('Main.MyCalendar').getURL('objectadd')"
method="get">
(this will allow adding calendar events to the  'Main.MyCalendar' page)

and the redirect url:
<input type="hidden" name="xredirect"
value="${xwiki.getDocument('Main.MyCalendar').getURL('view')}" />
(this will redirect to the 'Main.MyCalendar' page after submitting the
creation form)

This way you don't need extra JavaScript code to hide parts of the
code and your application is modular.

Raluca.



On Wed, Aug 25, 2010 at 5:24 AM, Lockie <[hidden email]> wrote:

>
> 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
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: RES: RES: Calendar Application on XE 2.4 not working properly

Raluca Stavro
On Wed, Aug 25, 2010 at 10:26 AM, Raluca Stavro
<[hidden email]> wrote:

> Hi,
>
> The solution that I told you about is like this:
> In a separate page, let's say 'Main.MyCalendar', paste this piece of
> code that is copied from 'XWiki.CalendarSheet' (I also added 2.0 wiki
> syntax but this is mandatory -> you can keep the 1.0 syntax):
>
> {{velocity}}
> $xwiki.ssx.use('XWiki.CalendarSheet')
>
> #set($cview = $xwiki.calendar)
> #set($cparams = $cview.calendarParams)
> #if($request.month)
> $cparams.put("month", $request.get("month"))
> #end
> #if($request.year)
> $cparams.put("year", $request.get("year"))
> #end
> #set($rqcategories = $util.arrayList)
> #foreach($rqcateg in $request.get("category").split(","))
> #if(!$rqcateg.trim().equals(""))
> #set($discard = $rqcategories.add($rqcateg.trim()))
> #end
> #end
> $cparams.put("categories", $rqcategories)
>
> {{html wiki=true}}
> [[Add New Event>>Main.EventCalendar]]
> $cview.getHTMLCalendar($cparams, $xwiki.getDocument('Main.EventCalendar'), "")
> {{/html}}
> {{/velocity}}
>

For your case ignore all starting from here. The next explanations are
for the case where you want to add events to another page than
'Main.EventCalendar'.

Raluca.

> Now, in 'XWiki.CalendarSheet' just remove the lines that you've put in
> 'Main.MyCalendar'. You can also remove the piece of code that lists
> the current event (the '#foreach($event in
> $doc.getObjects("XWiki.CalendarEvent"))' block), depending on what you
> want to display in the form page.
>
> And finally, in 'XWiki.CalendarSheet' change the action of the creation form:
> <form action="$xwiki.getURL('Main.MyCalendar', 'objectadd')"
> method="get">
> (this will allow adding calendar events to the  'Main.MyCalendar' page)
>
> and the redirect url:
> <input type="hidden" name="xredirect"
> value="${xwiki.getURL('Main.MyCalendar', 'view')}" />
> (this will redirect to the 'Main.MyCalendar' page after submitting the
> creation form)
>
> This way you don't need extra JavaScript code to hide parts of the
> code and your application is modular.
>
> Raluca.
>
>
>
> On Wed, Aug 25, 2010 at 5:24 AM, Lockie <[hidden email]> wrote:
>>
>> 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
>> [hidden email]
>> http://lists.xwiki.org/mailman/listinfo/users
>>
>
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Calendar Application on XE 2.4 - i18n characters and others

Ramon Gomes Brandão - SERINT
Hi Raluca/Lockie/XWiki Users,

I have 3 questions:

1) How can I convert the XWiki.CalendarSheet from XWiki 1.0 to XWiki 2.0 syntax, so I can use Annotations on it?

2) Why international characters (like ç, õ, ã) are not displayed correctly only on the event title, both on the events list as well as on the calendar itself? They display correctly on all the other fields (description, category etc).

3) I would like to have independent Calendars for different Spaces. Only creating a page and including XWiki.CalendarSheet on it (like Main.EventCalendar) is the solution? Can I use Rights Access on this page as well?

Thanks for all the help so far.
Regards,  


Ramon Gomes Brandão

_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Calendar Application on XE 2.4 - i18n characters and others

Lockie
Hey Raluca, I finally got around to adding your code and it works perfectly, thanks!

Ramon, I'm not sure about your first two questions, my attempts at converting the calendar to 2.0 weren't very successful, and I had to re-import the xar files to make Raluca's code work. So I just commented out the parts that weren't working on my 2.0 dashboard, which I wasn't going to use anyway (this being the URL field).
Ramon Gomes Brandão - SERINT wrote
3) I would like to have independent Calendars for different Spaces. Only creating a page and including XWiki.CalendarSheet on it (like Main.EventCalendar) is the solution? Can I use Rights Access on this page as well?
From my experience though you can add the calendarsheet to any page since the entries you make I think are stored locally, because when I add an event, the calendarsheet page doesn't get altered in any way.

Lockie.
Lockie