<script src="/.Templates/RWD/RWDComponents/RWDCal_GScr/js/gfc.js"></script><noscript>Your browser does not support JavaScript!</noscript>
<script type="text/javascript">
var a = <X-FC-URL-PARAMETER Url_js_Var>;
var b = "<X-FC-URL-PARAMETER cell_id>";
var c="<!--#if expr="<X-FC-FIELD SITEPREF.6252 DEFAULT=0 NUMBER>==1 && <X-FC-FIELD SITEPREF.6253 LENGTH> > 0" --><!--#echo expr="@URLescape(`<X-FC-FIELD
SITEPREF.6253 DEFAULT="" STRING>`, ' ')" --><!--#endif -->";
var d = "<X-FC-URL-PARAMETER panelheight>";
var e = dateToTag(new Date());
<!--#if expr="<X-FC-URL-PARAMETER amp;panelstyle EXISTS> && <X-FC-URL-PARAMETER amp;panelstyle LENGTH> > 0" --><!--#set var="panelstyle" value="<X-FC-URL-PARAMETER amp;panelstyle>" --><!--#elif expr="<X-FC-URL-PARAMETER panelstyle EXISTS> && <X-FC-URL-PARAMETER panelstyle LENGTH> > 0" --><!--#set var="panelstyle" value="<X-FC-URL-PARAMETER panelstyle>" --><!--#else --><!--#set
var="panelstyle" value="" --><!--#endif -->
<!--#set var="p_bgcolor" expr="@list($panelstyle, 1)" --><!--#set var="p_bgcolor" value="#${p_bgcolor}" -->
<!--#set var="p_fontcolor" expr="@list($panelstyle, 2)" --><!--#set var="p_fontcolor" value="#${p_fontcolor}" -->
<!--#set var="p_fontsize" expr="@list($panelstyle, 3)" -->
<!--#set var="p_fontfamily" expr="@list($panelstyle, 4)" -->
//console.log("<X-FC-URL-PARAMETER>");
//console.log('p_bgcolor=<!--#echo var="p_bgcolor" -->');
//console.log('p_fontcolor=<!--#echo var="p_fontcolor" -->');
//console.log('p_fontsize=<!--#echo var="p_fontsize" -->');
//console.log('p_fontfamily=<!--#echo var="p_fontfamily" -->');
//console.log("MashUp Link Field "+ a);
//console.log("Panel ID " + b);
//console.log("Sitepref Default Config " + c);
//IE Restricted - http://support.microsoft.com/kb/175500#FixItForMeAlways
function IsIE8Browser()
{
var rv,rc = -1;
var ua = navigator.userAgent;
var re = new RegExp("Trident\/([0-9]{1,}[\.0-9]{0,})");
var rm = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
//Trident 4 Version Check
if (re.exec(ua) != null)
{
rv = parseFloat(RegExp.$1);
}
//IE7 Version Check
if (rm.exec(ua) != null)
{
rc = parseFloat(RegExp.$1);
}
return (rv == 4 || rc==7);
}
var ldr = function(rawLink,objectID,c,d,e){
var self = this;
self.rawLink = rawLink;
self.objectID = objectID;
d=(d==0)?375:d;
String.prototype.hashCode = function(){
var hash = 0;
if (this.length == 0) return hash;
for (i = 0; i < this.length; i++) {
char = this.charCodeAt(i);
hash = ((hash<<5)-hash)+char;
hash = hash & hash; // Convert to 32bit integer
}
return hash;
}
String.prototype.format = function() {
var args = arguments;
return this.replace(/{(\d+)}/g, function(match, number) {
return typeof args[number] != 'undefined'
?args[number]
: match
;
});
};
//CSS Template
//TODO: remove old default.css from RWD Header Template
var obj_css = "<style> .{0}_gfc_content { font-family: Tahoma,sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: small; line-height:auto; word-spacing: normal; letter-spacing: normal; text-decoration: none; text-transform: none; text-align: left; text-indent: 0ex; } .{0}_gfc_content .{0}_event-details-label {clear:left; display:block; float:left; font-weight:bold; margin:0; padding:3px 0; width:7em; }.{0}_gfc_content .{0}_event-when { display:block; margin-left:7em; padding:3px 0; }.{0}_gfc_content .{0}_event { margin-left:20px; }.{0}_gfc_content .{0}_date-label { padding: 0.2em 1em; font-weight: bold; position: relative; width:100%; line-height:50%; } .{0}_gfc_content .{0}_date-label a:link, .{0}_gfc_content .{0}_date-label a:hover, .{0}_gfc_content .{0}_date-label a:active,.gfc_content
.{0}_date-label a:visited { text-decoration:none; cursor:default; outline:none; -moz-outline-style:none; }.{0}_gfc_content .{0}_event-title { margin-left:20px; cursor: pointer; }.{0}_gfc_content .{0}_event-head { border-top:1px solid #CCDDEE; clear:both; margin-left:20px; }.{0}_gfc_content { height:100%; width:100%; /*width:400px; height:300px;*/ -webkit-border-radius: 7px; -moz-border-radius: 7px; border-radius: 7px; background-color:#e3e9ff; -webkit-box-shadow: #090A0A 2px 2px 2px; -moz-box-shadow: #090A0A 2px 2px 2px; box-shadow: #090A0A 2px 2px 2px; }.{0}_gfc_navbutton { -moz-user-select: none; cursor: pointer; /*height: 17px;*/ margin-top:3px; /*width: 29px;*/ }.{0}_gfc_menulist .{0}_spaced_li { padding: 0px 5px 0px 0px; }.{0}_gfc_menulist li { list-style: none !important; float: left; }.{0}_gfc_menulist img { vertical-align: bottom; }.{0}_gfc_menulist { margin: 0px; padding: 0px; line-height: 0px; list-style-type:none !important;}
</style>".format("<X-FC-URL-PARAMETER cell_id>");
$("head").append(obj_css);
//HTML Template NEW
var obj_html = ' <div id = "{0}_gfc_wrapper" style="position:relative; width:100%; height:auto; display:none;"><div id="{0}_navigation_bar" style="position:relative; margin: 2px 0;"><img id="{0}_gfc_today" style="margin-left:3px;" src="/.templates/RWD/RWDimages/pixel.gif" alt="an image" /><img id="{0}_gfc_back" style="margin-left:3px;" src="/.templates/RWD/RWDimages/pixel.gif" alt="an image" /><img id="{0}_gfc_forward" style="margin-left:3px;" src="/.templates/RWD/RWDimages/pixel.gif" alt="an image" /> <input type="text" id="{0}_datepicker" style="position:absolute; width:95px; margin-left:6px; height:75%;"
value="{2}" /> </div> <div id="{0}_cfull" style="position:relative; width:100%; overflow:hidden;" > <div id ="{0}_ntop" align="center" style="display:block; position:absolute; z-index:999; top:0; right:16px; height:20px; width:auto;"> </div> <div id ="{0}_gfc_content" class="{0}_gfc_content" style="overflow-x:hidden; overflow-y:scroll; position:relative; height:{1}px; width:auto; background-color:#e5ecf9;"></div> <div id ="{0}_nbot" align="center" style="display:block; position:absolute; z-index:999; bottom:0; right:16px; height:20px; width:auto; "> </div> </div> <div id ="{0}_notice" align="center" style="display:none; position:relative; height:20px; width:auto; background-color:#000000;font-weight:bold;"> GFC Calendar Agenda Viewer </div> </div>'.format("<X-FC-URL-PARAMETER cell_id>",d,e);
document.write(obj_html);
//HTML Template
/*
var obj_html = " <div id = \"{0}_gfc_wrapper\" style=\"position:relative; width:100%; height:auto; display:none;\"> <div id=\"{0}_navigation_bar\" style=\"position:relative; width:300px;\"> <ul id=\"{0}_menulist_bar\" class=\"{0}_gfc_menulist\" style=\"height: 24px;\"> <li class=\"{0}_spaced_li\"><img width=\"55\" height=\"17\" id=\"{0}_gfc_today\" class=\"{0}_gfc_navbutton {0}_gfc_navToday\" style=\"width:55px !important; margin-left:3px;\" src=\"https://calendar.google.com/googlecalendar/images/blank.gif\" title=\"Today\" alt=\"Today\" tabindex=\"0\" role=\"button\"> </li> <li class=\"{0}_spaced_li\">
<img width=\"22\" height=\"17\" id=\"{0}_gfc_back\" class=\"{0}_gfc_navbutton {0}_gfc_navBack\" src=\"https://calendar.google.com/googlecalendar/images/blank.gif\" title=\"Previous period\" alt=\"Previous period\" tabindex=\"0\" role=\"button\"> </li> <li class=\"{0}_spaced_li\"> <img width=\"22\" height=\"17\" id=\"{0}_gfc_forward\" class=\"{0}_gfc_navbutton {0}_gfc_navForward\" src=\"https://calendar.google.com/googlecalendar/images/bllank.gif\" title=\"Next period\" alt=\"Next period\" tabindex=\"0\" role=\"button\"> </li> <li class=\"{0}_spaced_li\"> <input type=\"text\" id=\"{0}_datepicker\" style=\"width:90px; margin-top:1px; height: 18px; padding: 0px; \" > </li> </ul> </div> <div
id=\"{0}_cfull\" style=\"position:relative; width:100%; overflow:hidden;\" > <div id =\"{0}_ntop\" align=\"center\" style=\"display:block; position:absolute; z-index:999; top:0; right:16px; height:20px; width:auto;\"> </div> <div id =\"{0}_gfc_content\" class=\"{0}_gfc_content\" style=\"overflow-x:hidden; overflow-y:scroll; position:relative; height:375px; width:auto; background-color:#e5ecf9;\"> <!--<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" class=\"{0}_footer\" id=\"{0}_footer1\"><tbody><tr><td valign=\"bottom\" id=\"{0}_timezone\">Events shown in your timezone.</td></tr></tbody></table>--> </div> <div id =\"{0}_nbot\" align=\"center\" style=\"display:block; position:absolute; z-index:999; bottom:0; right:16px;
height:20px; width:auto; \"> </div> </div> <div id =\"{0}_notice\" align=\"center\" style=\"display:none; position:relative; height:20px; width:auto; background-color:#000000;font-weight:bold; \">GFC Calendar Agenda Viewer</div> </div>".format("<X-FC-URL-PARAMETER cell_id>");
document.write(obj_html);
*/
if(IsIE8Browser())
{
//Uncomment this so that IE7&8 do not display the calendar
//$("#"+self.objectID+"_menulist_bar> li").last().css("display","none");
}
self.s = self.rawLink.indexOf('config=');
self.config = (self.s==-1)?"none": self.rawLink.substring(self.s+7) + "?plugin=RWDconfig&templates=GscrollingConfig&formid=2089&"+Math.floor(Math.random()*1001) ;
self.s= (self.s==-1)?self.rawLink.length+1:self.s;
self.sitepref = (c!="")?c+"?plugin=RWDconfig&templates=GscrollingConfig&formid=2089&"+Math.floor(Math.random()*1001) : "";
self.calendar = self.rawLink.substring(0,self.s-1);
self.mode = (self.calendar.indexOf("google.com") >=0)?0: ( ( self.calendar.indexOf(".ics") >=0)?1:2 );
self.calendar += (self.mode==2)?"?FormID=2089&Templates=GscrollingCal&Plugin=RWDConfig":"";
//console.log("RAW URL :" + self.rawLink);
//console.log("OBJ ID :" + self.objectID);
//console.log("Config: " + self.config);
//console.log("Site Pref: " + self.sitepref);
//console.log("Site Calendar: " + self.calendar);
//console.log("Mode: " + self.mode);
self.json = {};
self.json.gfc = {};
self.json.gfc.mode = self.mode;
self.json.gfc.calendar_url = self.calendar;
/*Default if the config XHR fails*/
self.json.gfc.background_color= "<!--#echo var="p_bgcolor" -->";
self.json.gfc.background_image = "";
self.json.gfc.font_face = "<!--#echo var="p_fontfamily" -->";
self.json.gfc.font_color ="<!--#echo var="p_fontcolor" -->";
self.json.gfc.font_size = "<!--#echo var="p_fontsize" -->"+"px";
self.json.gfc.text_decoration = 1;
self.json.gfc.navprev_img = "/.Templates/RWD/RWDComponents/RWDCal_GScr/img/left.png"
self.json.gfc.navnext_img = "/.Templates/RWD/RWDComponents/RWDCal_GScr/img/right.png";
self.json.gfc.navtoday_img = "/.Templates/RWD/RWDComponents/RWDCal_GScr/img/today.png";
if (self.config == "none"){ /* there is a config file*/
$.ajax({
url:self.sitepref,
dataType:"json",
success:function(data) {
self.json.gfc.background_color= data['background_color'];
self.json.gfc.background_image = data['background_image'];
self.json.gfc.font_face = data['font_face'];
self.json.gfc.font_color = data['font_color'];
self.json.gfc.font_size =data['font_size'];
self.json.gfc.text_decoration = data['text_decoration'];
/* config below added after Rob left for event list styles */
self.json.gfc.event_font_face = data['event_font_face'];
self.json.gfc.event_font_color = data['event_font_color'];
self.json.gfc.event_font_size =data['event_font_size'];
self.json.gfc.event_text_decoration = data['event_text_decoration'];
self.json.gfc.navprev_img = data['NavPrev_img'];
self.json.gfc.navnext_img = data['NavNext_img'];
self.json.gfc.navtoday_img = data['NavToday_img'];
new gTime(self.json,"<X-FC-URL-PARAMETER cell_id>").init();
},
error:function(){
//console.log("NO CONFIG OR SITEPREF FOUND .. HARD DEFAULT");
//console.log("instancing ..");
new gTime(self.json,"<X-FC-URL-PARAMETER cell_id>").init();
}
});
}else{ /* no config file*/
$.ajax({
url:self.config,
dataType:"json",
success:function(data) {
//console.log("CONFIG FOUND OK");
//console.log("instancing ..");
self.json.gfc.background_color= data['background_color'];
self.json.gfc.background_image = data['background_image'];
self.json.gfc.font_face = data['font_face'];
self.json.gfc.font_color = data['font_color'];
self.json.gfc.font_size =data['font_size'];
self.json.gfc.text_decoration = data['text_decoration'];
/* config below added after Rob left for event list styles */
self.json.gfc.event_font_face = data['event_font_face'];
self.json.gfc.event_font_color = data['event_font_color'];
self.json.gfc.event_font_size =data['event_font_size'];
self.json.gfc.event_text_decoration = data['event_text_decoration'];
self.json.gfc.navprev_img = data['NavPrev_img'];
self.json.gfc.navnext_img = data['NavNext_img'];
self.json.gfc.navtoday_img = data['NavToday_img'];
new gTime(self.json,"<X-FC-URL-PARAMETER cell_id>").init();
},
error:function(){
$.ajax({
url:self.sitepref,
dataType:"json",
success:function(data) {
self.json.gfc.background_color= data['background_color'];
self.json.gfc.background_image = data['background_image'];
self.json.gfc.font_face = data['font_face'];
self.json.gfc.font_color = data['font_color'];
self.json.gfc.font_size =data['font_size'];
self.json.gfc.text_decoration = data['text_decoration'];
/* config below added after Rob left for event list styles */
self.json.gfc.event_font_face = data['event_font_face'];
self.json.gfc.event_font_color = data['event_font_color'];
self.json.gfc.event_font_size =data['event_font_size'];
self.json.gfc.event_text_decoration = data['event_text_decoration'];
self.json.gfc.navprev_img = data['NavPrev_img'];
self.json.gfc.navnext_img = data['NavNext_img'];
self.json.gfc.navtoday_img = data['NavToday_img'];
new gTime(self.json,"<X-FC-URL-PARAMETER cell_id>").init();
},
error:function(){
//console.log("NO CONFIG OR SITEPREF FOUND .. HARD DEFAULT");
//console.log("instancing ..");
new gTime(self.json,"<X-FC-URL-PARAMETER cell_id>").init();
}
});
}
});
}
};
new ldr(a,b,c,d,e);
</script><noscript>Your browser does not support JavaScript!</noscript>
|