1 /*********************************************************************************
2 * SugarCRM Community Edition is a customer relationship management program developed by
3 * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
5 * This program is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU Affero General Public License version 3 as published by the
7 * Free Software Foundation with the addition of the following permission added
8 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
9 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
10 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
12 * This program is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
17 * You should have received a copy of the GNU Affero General Public License along with
18 * this program; if not, see http://www.gnu.org/licenses or write to the Free
19 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
23 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
25 * The interactive user interfaces in modified source and object code versions
26 * of this program must display Appropriate Legal Notices, as required under
27 * Section 5 of the GNU Affero General Public License version 3.
29 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
30 * these Appropriate Legal Notices must retain the display of the "Powered by
31 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
32 * technical reasons, the Appropriate Legal Notices must display the words
33 * "Powered by SugarCRM".
34 ********************************************************************************/
38 //////////////////////////////////////////////////
39 // class: SugarWidgetListView
40 // widget to display a list view
42 //////////////////////////////////////////////////
44 SugarClass.inherit("SugarWidgetListView","SugarClass");
46 function SugarWidgetListView() {
50 SugarWidgetListView.prototype.init = function() {
54 SugarWidgetListView.prototype.load = function(parentNode) {
55 this.parentNode = parentNode;
59 SugarWidgetListView.prototype.display = function() {
60 if(typeof GLOBAL_REGISTRY['result_list'] == 'undefined') {
61 this.display_loading();
65 var div = document.getElementById('list_div_win');
66 div.style.display = 'block';
67 //div.style.height='125px';
68 var html = '<table width="100%" cellpadding="0" cellspacing="0" border="0" class="list view">';
70 html += '<th width="2%" nowrap="nowrap"> </th>';
71 html += '<th width="20%" nowrap="nowrap">'+GLOBAL_REGISTRY['meeting_strings']['LBL_NAME']+'</th>';
72 html += '<th width="20%" nowrap="nowrap">'+GLOBAL_REGISTRY['meeting_strings']['LBL_EMAIL']+'</th>';
73 html += '<th width="20%" nowrap="nowrap">'+GLOBAL_REGISTRY['meeting_strings']['LBL_PHONE']+'</th>';
74 html += '<th width="18%" nowrap="nowrap"> </th>';
76 //var html = '<table width="100%" cellpadding="0" cellspacing="0">';
77 for(var i=0;i<GLOBAL_REGISTRY['result_list'].length;i++) {
78 var bean = GLOBAL_REGISTRY['result_list'][i];
80 var className='evenListRowS1';
82 if(typeof(GLOBAL_REGISTRY.focus.users_arr_hash[ bean.fields.id]) != 'undefined') {
86 className='oddListRowS1';
88 className='evenListRowS1';
90 if(typeof (bean.fields.first_name) == 'undefined') {
91 bean.fields.first_name = '';
93 if(typeof (bean.fields.email1) == 'undefined' || bean.fields.email1 == "") {
94 bean.fields.email1 = ' ';
96 if(typeof (bean.fields.phone_work) == 'undefined' || bean.fields.phone_work == "") {
97 bean.fields.phone_work = ' ';
100 html += '<tr class="'+className+'">';
101 html += '<td><img src="'+GLOBAL_REGISTRY.config['site_url']+'/index.php?entryPoint=getImage&themeName='+SUGAR.themes.theme_name+'&imageName='+bean.module+'s.gif"/></td>';
102 html += '<td>'+bean.fields.full_name+'</td>';
103 html += '<td>'+bean.fields.email1+'</td>';
104 html += '<td>'+bean.fields.phone_work+'</td>';
105 html += '<td align="right">';
106 // hidden = 'hidden';
109 // hidden = 'visible';
111 html += '<input type="button" class="button" onclick="this.disabled=true;SugarWidgetSchedulerAttendees.form_add_attendee('+i+');" value="'+GLOBAL_REGISTRY['meeting_strings']['LBL_ADD_BUTTON']+'"/ style="visibility: '+hidden+'"/>';
117 this.parentNode.innerHTML = html;
120 SugarWidgetListView.prototype.display_loading = function() {
124 //////////////////////////////////////////////////
125 // class: SugarWidgetSchedulerSearch
126 // widget to display the meeting scheduler search box
128 //////////////////////////////////////////////////
130 SugarClass.inherit("SugarWidgetSchedulerSearch","SugarClass");
132 function SugarWidgetSchedulerSearch() {
136 SugarWidgetSchedulerSearch.prototype.init = function() {
137 this.form_id = 'scheduler_search';
138 GLOBAL_REGISTRY['widget_element_map'] = new Object();
139 GLOBAL_REGISTRY['widget_element_map'][this.form_id] = this;
142 SugarWidgetSchedulerSearch.prototype.load = function(parentNode) {
143 this.parentNode = parentNode;
147 SugarWidgetSchedulerSearch.submit = function(form) {
148 //construct query obj:
149 var conditions = new Array();
151 if(form.search_first_name.value != '') {
152 conditions[conditions.length] = {"name":"first_name","op":"starts_with","value":form.search_first_name.value}
154 if(form.search_last_name.value != '') {
155 conditions[conditions.length] = {"name":"last_name","op":"starts_with","value":form.search_last_name.value}
157 if(form.search_email.value != '') {
158 conditions[conditions.length] = {"name":"email1","op":"starts_with","value":form.search_email.value}
161 var query = {"modules":["Users","Contacts"
163 ],"group":"and","field_list":['id','full_name','email1','phone_work'],"conditions":conditions};
164 global_request_registry[req_count] = [this,'display'];
165 req_id = global_rpcClient.call_method('query',query);
166 global_request_registry[req_id] = [ GLOBAL_REGISTRY['widget_element_map'][form.id],'refresh_list'];
169 SugarWidgetSchedulerSearch.prototype.refresh_list = function(rslt) {
170 GLOBAL_REGISTRY['result_list'] = rslt['list'];
171 this.list_view.display();
174 SugarWidgetSchedulerSearch.prototype.display = function() {
175 var html ='<div class="schedulerInvitees"><h3>'+GLOBAL_REGISTRY['meeting_strings']['LBL_ADD_INVITEE']+'</h5><table border="0" cellpadding="0" cellspacing="0" width="100%" class="edit view">';
177 html += '<form name="schedulerwidget" id="'+this.form_id+'" onsubmit="SugarWidgetSchedulerSearch.submit(this);return false;">';
179 html += '<table width="100%" cellpadding="0" cellspacing="0" width="100%" >'
181 //html += '<form id="'+this.form_id+'"><table width="100%"><tbody><tr>';
182 html += '<td scope="row" nowrap>'+GLOBAL_REGISTRY['meeting_strings']['LBL_FIRST_NAME']+': <input name="search_first_name" value="" type="text" size="10"></td>';
183 html += '<td scope="row" nowrap>'+GLOBAL_REGISTRY['meeting_strings']['LBL_LAST_NAME']+': <input name="search_last_name" value="" type="text" size="10"></td>';
184 html += '<td scope="row" nowrap>'+GLOBAL_REGISTRY['meeting_strings']['LBL_EMAIL']+': <input name="search_email" type="text" value="" size="15"></td>';
185 //html += '<td valign="center"><input type="submit" onclick="SugarWidgetSchedulerSearch.submit(this.form);" value="Search" ></td></tr></tbody></table></form>';
186 html += '<td valign="center"><input type="submit" class="button" value="'+GLOBAL_REGISTRY['meeting_strings']['LBL_SEARCH_BUTTON']+'" ></td></tr>';
189 html += '</td></tr></table></div>';
191 // append the list_view as the third row of the outside table
192 this.parentNode.innerHTML += html;
194 var div = document.createElement('div');
195 div.setAttribute('id','list_div_win');
196 div.style.overflow = 'auto';
197 div.style.width = '100%';
198 div.style.height= '125px';
199 div.style.display = 'none';
200 this.parentNode.appendChild(div);
202 this.list_view = new SugarWidgetListView();
203 this.list_view.load(div);
206 //////////////////////////////////////////////////
207 // class: SugarWidgetScheduler
208 // widget to display the meeting scheduler
210 //////////////////////////////////////////////////
212 SugarClass.inherit("SugarWidgetScheduler","SugarClass");
214 function SugarWidgetScheduler() {
218 SugarWidgetScheduler.prototype.init = function() {
219 //var row = new SugarWidgetScheduleAttendees();
223 SugarWidgetScheduler.prototype.load = function(parentNode) {
224 this.parentNode = parentNode;
228 SugarWidgetScheduler.fill_invitees = function(form) {
229 for(var i=0;i<GLOBAL_REGISTRY.focus.users_arr.length;i++) {
230 if(GLOBAL_REGISTRY.focus.users_arr[i].module == 'User') {
231 form.user_invitees.value += GLOBAL_REGISTRY.focus.users_arr[i].fields.id + ",";
232 } else if(GLOBAL_REGISTRY.focus.users_arr[i].module == 'Contact') {
233 form.contact_invitees.value += GLOBAL_REGISTRY.focus.users_arr[i].fields.id + ",";
234 } else if(GLOBAL_REGISTRY.focus.users_arr[i].module == 'Lead') {
235 form.lead_invitees.value += GLOBAL_REGISTRY.focus.users_arr[i].fields.id + ",";
240 SugarWidgetScheduler.update_time = function() {
242 //For quick creates do nothing.
243 if( typeof(document.EditView) == 'undefined')
246 var date_start = document.EditView.date_start.value;
247 if(date_start.length < 16) {
250 var hour_start = parseInt(date_start.substring(11,13), 10);
251 var minute_start = parseInt(date_start.substring(14,16), 10);
252 var has_meridiem = /am|pm/i.test(date_start);
254 var meridiem = trim(date_start.substring(16));
257 GLOBAL_REGISTRY.focus.fields.date_start = date_start;
260 GLOBAL_REGISTRY.focus.fields.time_start = hour_start + time_separator + minute_start + meridiem;
262 GLOBAL_REGISTRY.focus.fields.time_start = hour_start + time_separator + minute_start;
265 GLOBAL_REGISTRY.focus.fields.duration_hours = document.EditView.duration_hours.value;
266 GLOBAL_REGISTRY.focus.fields.duration_minutes = document.EditView.duration_minutes.value;
267 GLOBAL_REGISTRY.focus.fields.datetime_start = SugarDateTime.mysql2jsDateTime(GLOBAL_REGISTRY.focus.fields.date_start,GLOBAL_REGISTRY.focus.fields.time_start);
269 GLOBAL_REGISTRY.scheduler_attendees_obj.init();
270 GLOBAL_REGISTRY.scheduler_attendees_obj.display();
273 SugarWidgetScheduler.prototype.display = function() {
274 this.parentNode.innerHTML = '';
276 var attendees = new SugarWidgetSchedulerAttendees();
277 attendees.load(this.parentNode);
279 var search = new SugarWidgetSchedulerSearch();
280 search.load(this.parentNode);
284 //////////////////////////////////////////////////
285 // class: SugarWidgetSchedulerAttendees
286 // widget to display the meeting attendees and availability
288 //////////////////////////////////////////////////
290 SugarClass.inherit("SugarWidgetSchedulerAttendees","SugarClass");
292 function SugarWidgetSchedulerAttendees() {
296 SugarWidgetSchedulerAttendees.prototype.init = function() {
297 // this.datetime = new SugarDateTime();
298 GLOBAL_REGISTRY.scheduler_attendees_obj = this;
299 var date_start = document.EditView.date_start.value;
300 var hour_start = parseInt(date_start.substring(11,13), 10);
301 var minute_start = parseInt(date_start.substring(14,16), 10);
302 var has_meridiem = /am|pm/i.test(date_start);
304 var meridiem = trim(date_start.substring(16));
308 GLOBAL_REGISTRY.focus.fields.time_start = hour_start + time_separator + minute_start + meridiem;
310 GLOBAL_REGISTRY.focus.fields.time_start = hour_start+time_separator+minute_start;
311 //GLOBAL_REGISTRY.focus.fields.time_start = document.EditView.time_hour_start.value+time_separator+minute_start;
314 GLOBAL_REGISTRY.focus.fields.date_start = document.EditView.date_start.value;
315 GLOBAL_REGISTRY.focus.fields.duration_hours = document.EditView.duration_hours.value;
316 GLOBAL_REGISTRY.focus.fields.duration_minutes = document.EditView.duration_minutes.value;
317 GLOBAL_REGISTRY.focus.fields.datetime_start = SugarDateTime.mysql2jsDateTime(GLOBAL_REGISTRY.focus.fields.date_start,GLOBAL_REGISTRY.focus.fields.time_start);
319 this.timeslots = new Array();
322 this.start_hours_before = 4;
324 var minute_interval = 15;
325 var dtstart = GLOBAL_REGISTRY.focus.fields.datetime_start;
327 // initialize first date in timeslots
328 var curdate = new Date(dtstart.getFullYear(),dtstart.getMonth(),dtstart.getDate(),dtstart.getHours()-this.start_hours_before,0);
330 if(typeof(GLOBAL_REGISTRY.focus.fields.duration_minutes) == 'undefined') {
331 GLOBAL_REGISTRY.focus.fields.duration_minutes = 0;
333 GLOBAL_REGISTRY.focus.fields.datetime_end = new Date(dtstart.getFullYear(),dtstart.getMonth(),dtstart.getDate(),dtstart.getHours()+parseInt(GLOBAL_REGISTRY.focus.fields.duration_hours),dtstart.getMinutes()+parseInt(GLOBAL_REGISTRY.focus.fields.duration_minutes),0);
335 var has_start = false;
338 for(i=0;i < this.hours*this.segments; i++) {
339 var hash = SugarDateTime.getUTCHash(curdate);
340 var obj = {"hash":hash,"date_obj":curdate};
341 if(has_start == false && GLOBAL_REGISTRY.focus.fields.datetime_start.getTime() <= curdate.getTime()) {
345 if(has_end == false && GLOBAL_REGISTRY.focus.fields.datetime_end.getTime() <= curdate.getTime()) {
349 this.timeslots.push(obj);
351 curdate = new Date(curdate.getFullYear(),curdate.getMonth(),curdate.getDate(),curdate.getHours(),curdate.getMinutes()+minute_interval);
355 SugarWidgetSchedulerAttendees.prototype.load = function (parentNode) {
356 this.parentNode = parentNode;
360 SugarWidgetSchedulerAttendees.prototype.display = function() {
361 var dtstart = GLOBAL_REGISTRY.focus.fields.datetime_start;
362 var top_date = SugarDateTime.getFormattedDate(dtstart);
363 var html = '<h3>'+GLOBAL_REGISTRY['meeting_strings']['LBL_SCHEDULING_FORM_TITLE']+'</h3><table id ="schedulerTable">';
364 html += '<tr class="schedulerTopRow">';
365 html += '<th colspan="'+((this.hours*this.segments)+2)+'"><h4>'+ top_date +'</h4></th>';
367 html += '<tr class="schedulerTimeRow">';
368 html += '<td> </td>';
370 for(var i=0;i < (this.timeslots.length/this.segments); i++) {
371 var hours = this.timeslots[i*this.segments].date_obj.getHours();
374 if(time_reg_format.indexOf('A') >= 0 || time_reg_format.indexOf('a') >= 0) {
388 if(time_reg_format.indexOf('a') >= 0) {
389 am_pm = am_pm.toLowerCase();
391 if(hours != 0 && hours != 12 && i != 0) {
397 var form_hours = hours+time_separator+"00";
398 html += '<td scope="col" colspan="'+this.segments+'">'+form_hours+am_pm+'</td>';
401 html += '<td> </td>';
404 if ( this.parentNode.childNodes.length < 1 )
405 this.parentNode.innerHTML += '<div class="schedulerDiv">' + html + '</div>';
407 this.parentNode.childNodes[0].innerHTML = html;
409 var thetable = "schedulerTable";
411 if(typeof (GLOBAL_REGISTRY) == 'undefined') {
415 //set the current user (as event-coordinator) so that they can be added to invitee list
416 //only IF the first removed flag has not been set AND this is a new record
417 if((typeof (GLOBAL_REGISTRY.focus.users_arr) == 'undefined' || GLOBAL_REGISTRY.focus.users_arr.length == 0)
418 && document.EditView.record.value =='' && typeof(GLOBAL_REGISTRY.FIRST_REMOVE)=='undefined') {
419 GLOBAL_REGISTRY.focus.users_arr = [ GLOBAL_REGISTRY.current_user ];
422 if(typeof GLOBAL_REGISTRY.focus.users_arr_hash == 'undefined') {
423 GLOBAL_REGISTRY.focus.users_arr_hash = new Object();
426 // append attendee rows
427 for(var i=0;i < GLOBAL_REGISTRY.focus.users_arr.length;i++) {
428 var row = new SugarWidgetScheduleRow(this.timeslots);
429 row.focus_bean = GLOBAL_REGISTRY.focus.users_arr[i];
430 GLOBAL_REGISTRY.focus.users_arr_hash[ GLOBAL_REGISTRY.focus.users_arr[i]['fields']['id']] = GLOBAL_REGISTRY.focus.users_arr[i];
435 SugarWidgetSchedulerAttendees.form_add_attendee = function (list_row) {
436 if(typeof (GLOBAL_REGISTRY.result_list[list_row]) != 'undefined' && typeof(GLOBAL_REGISTRY.focus.users_arr_hash[ GLOBAL_REGISTRY.result_list[list_row].fields.id]) == 'undefined') {
437 GLOBAL_REGISTRY.focus.users_arr[ GLOBAL_REGISTRY.focus.users_arr.length ] = GLOBAL_REGISTRY.result_list[list_row];
439 GLOBAL_REGISTRY.scheduler_attendees_obj.display();
443 //////////////////////////////////////////////////
444 // class: SugarWidgetScheduleRow
445 // widget to display each row in the scheduler
447 //////////////////////////////////////////////////
448 SugarClass.inherit("SugarWidgetScheduleRow","SugarClass");
450 function SugarWidgetScheduleRow(timeslots) {
451 this.init(timeslots);
454 SugarWidgetScheduleRow.prototype.init = function(timeslots) {
455 this.timeslots = timeslots;
458 SugarWidgetScheduleRow.prototype.load = function (thetableid) {
459 this.thetableid = thetableid;
462 vcalClient = new SugarVCalClient();
463 if(typeof (GLOBAL_REGISTRY['freebusy_adjusted']) == 'undefined' || typeof (GLOBAL_REGISTRY['freebusy_adjusted'][this.focus_bean.fields.id]) == 'undefined') {
464 global_request_registry[req_count] = [this,'display'];
465 vcalClient.load(this.focus_bean.fields.id,req_count);
472 SugarWidgetScheduleRow.prototype.display = function() {
475 this.thetable = document.getElementById(this.thetableid);
477 if(typeof (this.element) != 'undefined') {
478 if (this.element.parentNode != null)
479 this.thetable.deleteRow(this.element.rowIndex);
481 tr = document.createElement('tr');
482 this.thetable.appendChild(tr);
484 tr = this.thetable.insertRow(this.thetable.rows.length);
486 tr.className = "schedulerAttendeeRow";
488 td = document.createElement('td');
490 //insertCell(tr.cells.length);
494 var img = '<img align="absmiddle" src="index.php?entryPoint=getImage&themeName='+SUGAR.themes.theme_name+'&imageName='+self.focus_bean.module+'s.gif"/> ';
497 td.innerHTML = td.innerHTML;
499 if (self.focus_bean.fields.full_name)
500 td.innerHTML += ' ' + self.focus_bean.fields.full_name;
502 td.innerHTML += ' ' + self.focus_bean.fields.name;
504 // add freebusy tds here:
505 this.add_freebusy_nodes(tr);
508 var td = document.createElement('td');
510 //var td = tr.insertCell(tr.cells.length);
511 td.className = 'schedulerAttendeeDeleteCell';
513 //CCL - Remove check to disallow removal of assigned user or current user
514 //if ( GLOBAL_REGISTRY.focus.fields.assigned_user_id != self.focus_bean.fields.id && GLOBAL_REGISTRY.current_user.fields.id != self.focus_bean.fields.id) {
515 td.innerHTML = '<a title="'+ GLOBAL_REGISTRY['meeting_strings']['LBL_REMOVE'] +'" class="listViewTdToolsS1" style="text-decoration:none;" href="javascript:SugarWidgetScheduleRow.deleteRow(\''+self.focus_bean.fields.id+'\');"> <img src="index.php?entryPoint=getImage&themeName='+SUGAR.themes.theme_name+'&imageName=delete_inline.gif" align="absmiddle" alt="'+ GLOBAL_REGISTRY['meeting_strings']['LBL_REMOVE'] +'" border="0"> '+ GLOBAL_REGISTRY['meeting_strings']['LBL_REMOVE'] +'</a>';
518 this.element_index = this.thetable.rows.length - 1;
521 SugarWidgetScheduleRow.deleteRow = function(bean_id) {
522 // can't delete organizer
524 if(GLOBAL_REGISTRY.focus.users_arr.length == 1 || GLOBAL_REGISTRY.focus.fields.assigned_user_id == bean_id) {
528 for(var i=0;i<GLOBAL_REGISTRY.focus.users_arr.length;i++) {
529 if(GLOBAL_REGISTRY.focus.users_arr[i]['fields']['id']==bean_id) {
530 delete GLOBAL_REGISTRY.focus.users_arr_hash[GLOBAL_REGISTRY.focus.users_arr[i]['fields']['id']];
531 GLOBAL_REGISTRY.focus.users_arr.splice(i,1);
532 //set first remove flag to true for processing in display() function
533 GLOBAL_REGISTRY.FIRST_REMOVE = true;
534 GLOBAL_REGISTRY.container.root_widget.display();
540 function DL_GetElementLeft(eElement) {
542 * ifargument is invalid
543 * (not specified, is null or is 0)
544 * and function is a method
545 * identify the element as the method owner
547 if(!eElement && this) {
552 * initialize var to store calculations
553 * identify first offset parent element
554 * move up through element hierarchy
555 * appending left offset of each parent
556 * until no more offset parents exist
558 var nLeftPos = eElement.offsetLeft;
559 var eParElement = eElement.offsetParent;
560 while (eParElement != null) {
561 nLeftPos += eParElement.offsetLeft;
562 eParElement = eParElement.offsetParent;
564 return nLeftPos; // return the number calculated
568 function DL_GetElementTop(eElement) {
569 if(!eElement && this) {
573 var nTopPos = eElement.offsetTop;
574 var eParElement = eElement.offsetParent;
575 while (eParElement != null) {
576 nTopPos += eParElement.offsetTop;
577 eParElement = eParElement.offsetParent;
583 //////////////////////////////////////////
584 // adds the <td>s for freebusy display within a row
585 SugarWidgetScheduleRow.prototype.add_freebusy_nodes = function(tr,attendee) {
589 var is_loaded = false;
591 if(typeof GLOBAL_REGISTRY['freebusy_adjusted'] != 'undefined' && typeof GLOBAL_REGISTRY['freebusy_adjusted'][this.focus_bean.fields.id] != 'undefined') {
595 for(var i=0;i < this.timeslots.length; i++) {
596 var td = document.createElement('td');
598 //var td = tr.insertCell(tr.cells.length);
599 td.innerHTML = ' ';
600 if(typeof(this.timeslots[i]['is_start']) != 'undefined') {
601 td.className = 'schedulerSlotCellStartTime';
603 if(typeof(this.timeslots[i]['is_end']) != 'undefined') {
604 td.className = 'schedulerSlotCellEndTime';
608 // iftheres a freebusy stack in this slice
609 if( typeof(GLOBAL_REGISTRY['freebusy_adjusted'][this.focus_bean.fields.id][this.timeslots[i].hash]) != 'undefined') {
610 td.style.backgroundColor="#4D5EAA";
612 if(td.className == 'schedulerSlotCellStartTime') {
614 if(typeof(GLOBAL_REGISTRY.focus.orig_users_arr_hash) != 'undefined' && typeof(GLOBAL_REGISTRY.focus.orig_users_arr_hash[this.focus_bean.fields.id]) != 'undefined') {
618 if( GLOBAL_REGISTRY['freebusy_adjusted'][this.focus_bean.fields.id][this.timeslots[i].hash] >= fb_limit) {
619 td.style.backgroundColor="#AA4D4D";
621 td.style.backgroundColor="#4D5EAA";