Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Press F11 to view in a full window</title>
- <link rel="stylesheet" href="/mrs/site/styles/screenbase.css" type="text/css" />
- <script type="text/javascript">
- djConfig = {
- isDebug: false
- };
- </script>
- <script type="text/javascript" src="/js/dojo/dojo.js"></script>
- <script type="text/javascript" src="/js/functions.js"></script>
- <script type="text/javascript">
- //loadPanes, which refreshes the screens will be called every reloadTime seconds
- var reloadTime = 60 * 10;
- //reloadTime = 60;
- //doSetup will be called instead of loadPanes(It calls loadPanes) every setupIterations
- var setupIterations = 6;
- var curIteration = 1;
- var divs = new Array();
- var divsHTML = new Array();
- var delay = new Array();
- var events = new Array();
- var schedule = new Array(); //currently 30 minutes -- this is in seconds
- var roomID;
- var nextItem = 0;
- var curItem = 0;
- //initialize screen
- function init()
- {
- roomID = getGetParam("rid");
- doSetup();
- setTimeout("showNextItem()",3000); //give it 3 seconds to initialize
- setupClock();
- }
- //initialize time display, we're only displaying minutes so it'll be off for 15s at most
- function setupClock()
- {
- var clockSpan = dojo.byId("clock");
- var d = new Date();
- var snippet = "";
- snippet = dojo.date.strftime(d, "%b %d, %Y %I:%M %p");
- clockSpan.innerHTML = snippet;
- setTimeout("setupClock()",15000);
- }
- //gather the panes we're going to display
- function doSetup()
- {
- curIteration = 1;
- //build standard url format for architcture
- var theURL = buildURL("scrann.setup","rid="+roomID);
- var kw =
- {
- mimetype: "text/json",
- url: theURL,
- load: function(type, data, evt)
- {
- //parse data, and load the various panels we're showing
- divs = data.screens.names;
- delay = data.screens.times;
- events = data.screens.events;
- schedule = data.schedule;
- loadPanes();
- }
- }
- dojo.io.bind(kw);
- }
- //grab the room id we're desplaying the schedule for, along with any other
- //get parameters on the url
- function getGetParam(param)
- {
- var searchString = document.location.search;
- searchString = searchString.substring(1);
- var nvPairs = searchString.split("&");
- for (i = 0; i < nvPairs.length; i++)
- {
- var nvPair = nvPairs[i].split("=");
- var name = nvPair[0];
- var value = nvPair[1];
- if(name == param)
- return value;
- }
- return "";
- }
- //Grab the core panel info with the schedule and current meeting occupants
- function getData(divName,eventName)
- {
- var theURL = buildURL(eventName,"rid="+roomID);
- var kw =
- {
- mimetype: "text/plain",
- url: theURL,
- load: function(type, data, evt)
- {
- divsHTML[divName] = data;
- },
- error: function(t, e)
- {
- dojo.debug("Error!... " + e.message);
- }
- };
- dojo.io.bind(kw);
- }
- //load the panels and fill in the info. Also switch out the panes based on
- // the db schedule we're passed in We'll reload this every few minutes, it
- // will normally only change daily, but not always. adjust above variable
- // "reloadTime" if this is resource intensive.
- function loadPanes()
- {
- for(i=1; i < divs.length; i++) //yes we're purposefully skipping number 0
- {
- getData(divs[i],events[i]);
- }
- loadPane("minschedule",buildURL("scrann.schedule","rid="+roomID));
- if(curIteration == setupIterations)
- {
- setTimeout("doSetup()",reloadTime * 1000);
- } else {
- curIteration++;
- setTimeout("loadPanes()",reloadTime * 1000);
- }
- }
- //Slide to next pane with a simple animation, showing our county logo
- // between frames
- function showNextItem()
- {
- curItem = schedule[nextItem];
- hidePane("nonlogo");
- if(curItem == 0)
- dojo.lfx.html.fadeIn('logo', 500).play()
- else
- {
- dojo.lfx.html.fadeOut('logo', 500).play()
- setTimeout("showNonLogo(divs[curItem])",500);
- }
- //schedule this item based on the displaytime/delay of the current pane
- setTimeout("showNextItem()",delay[curItem] * 1000);
- nextItem++;
- if(nextItem >= schedule.length)
- nextItem = 0;
- }
- //load the core pane with the stored html we got from the server
- function showNonLogo(divName)
- {
- var c = dojo.widget.byId("content");
- /*var v = dojo.byId(divName);*/
- c.setContent(divsHTML[divName]);
- showPane("nonlogo");
- }
- </script>
- <script language="JavaScript" type="text/javascript">
- dojo.require("dojo.event.*");
- dojo.require("dojo.io.*");
- dojo.require("dojo.lfx.*");
- dojo.require("dojo.date.format");
- dojo.require("dojo.widget.ContentPane");
- dojo.require("dojo.widget.LayoutContainer");
- dojo.addOnLoad(init);
- </script>
- </head>
- <body>
- <div dojoType="ContentPane" class="fullPane" id="logo">
- <div style="color:#0D0;top:0.5in;position:relative;">
- <h1>Employer name</h1>
- <h1> Location</h1>
- <h2>Address</h2>
- <h2 style="color:white" id="clock"></h2>
- <div style="color:#0D0;margin-left:20px"><img src="/mrs/site/images/fc_logo.gif"/></div>
- </div>
- </div>
- <div dojoType="ContentPane" id="nonlogo" class="fullPane" style="height:100%">
- <div dojoType="ContentPane" id="content" style="height:70%">
- </div>
- <div dojoType="ContentPane" href="" id="minschedule" style="height:30%margin-left:3%;" cacheContent="false"></div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement