Project:Schedule
From SpinetiX Support Wiki
Specifications
- Category: Feeds
- Author: SpinetiX S.A.
- License: GPL Version 3
- Target: HMD
Description
This is an advanced HMD project consisting of some custom JavaScript which retrieves schedule data from an ICS file, and display the currently active event on the screen.
This script is based on the concept of ID, and will replace the text content of the SVG document with the information returned by the schedule.
- For textArea the content of the element will be replaced by the content of the news.
- For image and animation tag the
xlink:href
attribute will be modified.
The script will use the caching mechanism of the HMP to see if the source document has been modified. If this is the case the data will be reloaded and the display updated as soon as the modification has been detected.
Controlling the parameters
- Open the JavaScript file with a text editor.
- The line
var uri = "MozillaCalEvents.ics";
controls the the source of the data - The line
var day = new Date("September 22, 2011");
controls the day for which the data should be displayed- use
var day = null;
to display scheduling for the current day.
- use
- The line
var check_dur = 60;
controls the refresh frequency. - Save the JavaScript file
Controlling the layout
The layout is controlled in the SVG file calling the script. The SVG file can be edited by HMD for the layout. However it is necessary to use the XML Tree View to modify the Id of the elements that will be modified by the script.
- Open the XML Tree View
- Find the element you want to be modified by the script
- If the element already has an id or an xml:id, modify this id to match the element name of the source, otherwise add an new attribute called id.
- The following IDs are used by the script: title, description, startDate, endDate, enclosure, location