FullCalendar - Scheduler plugin

Forum to discuss the new web client version of Servoy.

FullCalendar - Scheduler plugin

Postby cp » Wed Aug 28, 2019 7:59 pm

Hi,

Having viewed the Servoy Webinar #52 on Calendaring and Scheduling I have been trying to install the Scheduler plugin into my solution. With no luck.

Seems the current Servoy version of FullCalendar is 2.9.1 of 2016.
So I have found that the Scheduler plugin version 1.3 should be compatible?

I imported the scheduler.min.css and scheduler.min.js to my media folder, and try to load the plugin from my startup method:

Code: Select all
addJSFileDependancy('scheduler.min.js');

/**
* @param {String} mediafilename
*/
function addJSFileDependancy(mediafilename) {
   /** @type {ngclientutils.tag} */
   var tag = {
      tagname: "script",
      attrs: [{
         name: "src",
         value: "resources/fs/" + application.getSolutionName() + "/" + mediafilename
      }]
   };
   plugins.ngclientutils.contributedTags.push(tag);
   return true;
}


I get True returned on the plugins.ngclientutils.contributedTags.push(tag) but using the timeline view in the calendar displays nothing.

Does anybody have experience with this and can give advise to make it work? Please! :)

Using: OSX, NGClient - Svy 2019.6.2.

/Claus
cp
 
Posts: 11
Joined: Wed Nov 14, 2018 2:43 pm

Re: FullCalendar - Scheduler plugin

Postby sean » Thu Aug 29, 2019 5:19 pm

Hi Claus,

Thanks for watching the webinar series!

I believe that you have the correct version but you also need to import the CSS file as well.
So adding the following to somewhere in your css/less hierarchy:
Code: Select all
@import url("scheduler.min.css");

Hope this helps.
Software Engineer
Servoy USA
sean
 
Posts: 370
Joined: Mon May 21, 2007 6:26 pm
Location: USA

Re: FullCalendar - Scheduler plugin

Postby cp » Sun Sep 01, 2019 10:55 pm

Hi Sean,

Thanks for your reply - yes, I already imported the CSS into my solution as described.
Just cannot make any view from scheduler to show, and have no idea if the Scheduler is actually loaded...

/Claus
cp
 
Posts: 11
Joined: Wed Nov 14, 2018 2:43 pm

Re: FullCalendar - Scheduler plugin

Postby swingman » Tue Sep 03, 2019 12:48 pm

Hi Claus,

I think I may be having a similar problem with Servoy 2019.03.1. When I inspect my page in the browser I notice that the script tag is not inserted properly:
Code: Select all
<script type="text/javascript" src="js/angular_i18n/angular-locale_en.js"></script>
<script type="text/javascript" src="js/angular_i18n/angular-locale_en.js"></script>
<undefined src="resources/fs/myprojectname/scheduler.min.js" hhsmanagedtag=""></undefined>

instead of inserting a <script> tag it seems ngclientutils inserts a <undefined>....
it looks the same in safari and in firefox.
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1472
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Re: FullCalendar - Scheduler plugin

Postby cp » Wed Sep 04, 2019 5:21 pm

Hi Christian,

I see now that I have the same issue with 'undefined':
<undefined src="resources/fs/myproject/scheduler.min.js" hhsmanagedtag=""></undefined>

Hence the container/div for the scheduler is completely empty:
<div class="fc-view-container"></div>

Solution suggestions?

/Claus
cp
 
Posts: 11
Joined: Wed Nov 14, 2018 2:43 pm

Re: FullCalendar - Scheduler plugin

Postby swingman » Wed Sep 04, 2019 9:59 pm

There is either something wrong in the definition of the tag or the code in ngclientutils to insert the tag.
I'm wondering it is easier to add the source for the Servoy fullcalendar component to the project and simply modify it by adding the extra files and imports this way...
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1472
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Re: FullCalendar - Scheduler plugin -- SOLVED

Postby cp » Thu Sep 05, 2019 7:33 pm

SOLVED

A little fiddling with the tag object and it came around when using tagName instead of tagname.


Code: Select all
function addJSFileDependancy(mediafilename) {
   /** @type {ngclientutils.tag} */
   var tag = {
      tagName: "script",
      attrs: [{
         name: "src",
         value: "resources/fs/" + application.getSolutionName() + "/" + mediafilename
      }]
   };
   plugins.ngclientutils.contributedTags.push(tag);
   return true;
}
cp
 
Posts: 11
Joined: Wed Nov 14, 2018 2:43 pm

Re: FullCalendar - Scheduler plugin

Postby swingman » Fri Sep 06, 2019 11:26 am

Thank you for spotting that!
I can now see the .js file is loaded, but I still don't get something that resembles a scheduler view...
investigating...
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1472
Joined: Wed Oct 01, 2003 10:20 am
Location: London


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 11 guests

cron