16 if (typeof Debug ==
'undefined')
17 console.log(
'ERROR: Debug is undefined! Must include Debug.js before Desktop.js');
19 if (typeof Desktop ==
'undefined')
20 console.log(
'ERROR: Desktop is undefined! Must include Desktop.js before DesktopDashboard.js');
29 Desktop.createDashboard =
function(z) {
30 if(
false === (
this instanceof Desktop.createDashboard)) {
33 return new Desktop.createDashboard(z);
53 var _defaultDashboardColor =
"rgb(0,40,85)";
59 var _defaultDashboardHeight = 41;
60 var _defaultWindowDashboardWidth = 200;
61 var _defaultWindowDashboardMinWidth = 50;
63 var _windowDashboardWidth = _defaultWindowDashboardWidth;
65 Debug.log(
"window.parent.window.location.hash=" + window.parent.window.location.hash,
67 var _displayWindowDashboard =
68 window.parent.window.location.hash[1]?
69 (window.parent.window.location.hash[1] | 0):1;
70 var _windowDashboard,_topBar,_showDesktopBtn,_fullScreenBtn,_fullScreenRefreshBtn;
72 var _windowDashboardWindowCSSRule;
74 var _layoutDropDownDisplayed =
false;
75 var _layoutMenuItems = [];
76 var numOfUserLayouts = 5;
77 var numOfSystemLayouts = 5;
78 for(var i=0;i<numOfSystemLayouts;++i)
79 _layoutMenuItems.push(
"System Preset-" + (i+1));
80 _layoutMenuItems.push(
"---");
81 for(var i=0;i<numOfUserLayouts;++i)
82 _layoutMenuItems.push(
"User Preset-" + (i+1));
84 var _dashboardElement, _dashboardColorPostbox;
86 var _deepClickTimer = 0;
90 this.dashboardElement;
97 var _toggleWindowDashboard =
function(event,setValue) {
99 if(setValue !== undefined)
100 _displayWindowDashboard = setValue;
102 _displayWindowDashboard = !_displayWindowDashboard;
104 var newURL = window.parent.window.location.pathname +
105 window.parent.window.location.search +
107 (_displayWindowDashboard?
"1":
"0");
110 if(!Desktop.isWizardMode())
111 window.parent.window.history.replaceState(
'ots',
'ots', newURL);
113 window.parent.window.history.replaceState(
'ots wiz',
'ots wiz', newURL);
115 _windowDashboard.style.display = _displayWindowDashboard?
"inline":
"none";
116 Desktop.desktop.redrawDesktop();
122 var _refreshTitle =
function() {
125 var hdrW = _windowDashboardWidth - 14;
126 for(var i=0;i<Desktop.desktop.getNumberOfWindows();++i) {
127 el = document.getElementById(
'DesktopDashboard-windowDashboard-win'+i);
128 winIndex = document.getElementById(
'DesktopDashboard-windowDashboard-winIndex'+i).innerHTML;
129 el.innerHTML = Desktop.desktop.getWindowNameByIndex(winIndex) +
130 (Desktop.desktop.getWindowSubNameByIndex(winIndex)==
""?
"":
" - ") +
131 Desktop.desktop.getWindowSubNameByIndex(winIndex);
132 while(el.scrollWidth > hdrW && el.innerHTML.length > 4)
133 el.innerHTML = el.innerHTML.substr(0,el.innerHTML.length-4)+
"...";
135 el.innerHTML +=
"<div class='hiddenDiv' " +
136 "id='DesktopDashboard-windowDashboard-winIndex"+i+
"'>"+ winIndex +
"</div>";
140 var _redrawDashboard =
function() {
142 _topBar.style.left = Desktop.desktop.getDesktopX()+
"px";
143 _topBar.style.top = Desktop.desktop.getDesktopY()+
"px";
144 _topBar.style.width = Desktop.desktop.getDesktopWidth()+
"px";
145 _topBar.style.height = _defaultDashboardHeight+
"px";
147 _windowDashboard.style.left = Desktop.desktop.getDesktopX()+
"px";
148 _windowDashboard.style.top = Desktop.desktop.getDesktopY()+_defaultDashboardHeight+
"px";
149 _windowDashboard.style.width = _windowDashboardWidth+
"px";
150 _windowDashboardWindowCSSRule.style.width = (_windowDashboardWidth-34)+
"px";
152 _windowDashboard.style.height = Desktop.desktop.getDesktopHeight()-(Desktop.desktop.getDesktopY()+_defaultDashboardHeight)+
"px";
157 var _getDashboardWindowWidthCSSRule =
function() {
160 for(i=0;i<document.styleSheets.length;++i) {
161 Debug.log(document.styleSheets[i].href);
162 if(document.styleSheets[i].href && document.styleSheets[i].href.split(
'/').pop() ==
164 for(j=0;j<document.styleSheets[i].cssRules.length;++j) {
165 if(document.styleSheets[i].cssRules[j].selectorText ==
166 "#Desktop .DesktopDashboard-windowDashboard-win")
167 return document.styleSheets[i].cssRules[j];
172 if(i == document.styleSheets.length) Debug.log(
"FAIL -- Could not locate CSS Rule for Dashboard Window.",Debug.HIGH_PRIORITY);
178 var _windowOrganizeMode = -1;
179 var _windowOrganizeModeTimeout = 0;
180 var _windowDashboardOrganize =
function() {
183 clearTimeout(_windowOrganizeModeTimeout);
184 _windowOrganizeModeTimeout = setTimeout(
function() {_windowOrganizeMode = -1; Debug.log(
"Reseting _windowOrganizeMode.");},10000);
189 var dx = Desktop.desktop.getDesktopContentX(), dy = Desktop.desktop.getDesktopContentY(),
190 dw = Desktop.desktop.getDesktopContentWidth(), dh = Desktop.desktop.getDesktopContentHeight();
193 var numOfWindows = Desktop.desktop.getNumberOfWindows();
196 if(++_windowOrganizeMode < 0 || _windowOrganizeMode > numOfWindows)
197 _windowOrganizeMode = 0;
201 if(_windowOrganizeMode && numOfWindows > 1)
207 var ww = Math.floor(dw/numOfWindows);
212 ww = Math.floor(dw/Math.ceil(numOfWindows/++rows)); wh = Math.floor(dh/rows);
216 var cols = Math.ceil(numOfWindows/rows);
217 Debug.log(
"Desktop Dashboard Organize r" + rows +
" , c" + cols,Debug.LOW_PRIORITY);
224 if(_windowOrganizeMode && numOfWindows > 1)
226 var i = _windowOrganizeMode-1;
228 win = Desktop.desktop.getWindowByIndex(
229 document.getElementById(
'DesktopDashboard-windowDashboard-winIndex'+i).innerHTML);
231 if(win.isMinimized()) win.unminimize();
232 if(win.isMaximized()) win.unmaximize();
235 win.setWindowSizeAndPosition(xx,yy,ww*2,wh);
239 if((ic)%cols==0){xx = dx; yy += wh;}
246 for(var i=0;i<Desktop.desktop.getNumberOfWindows();++i) {
248 if(_windowOrganizeMode && numOfWindows > 1 && i == _windowOrganizeMode-1)
continue;
250 win = Desktop.desktop.getWindowByIndex(
251 document.getElementById(
'DesktopDashboard-windowDashboard-winIndex'+i).innerHTML);
253 if(win.isMinimized()) win.unminimize();
254 if(win.isMaximized()) win.unmaximize();
257 if(i == Desktop.desktop.getNumberOfWindows()-1)
258 win.setWindowSizeAndPosition(xx,yy,ww*(1 + (rows*cols - numOfWindows)),wh);
260 win.setWindowSizeAndPosition(xx,yy,ww,wh);
263 if((++ic)%cols==0){xx = dx; yy += wh;}
268 Desktop.desktop.redrawDashboardWindowButtons();
271 Debug.log(
"Desktop Dashboard Organize Mode: " + _windowOrganizeMode,Debug.LOW_PRIORITY);
274 var _windowDashboardMinimizeAll =
function() {
276 for(var i=0;i<Desktop.desktop.getNumberOfWindows();++i) {
277 win = Desktop.desktop.getWindowByIndex(i);
278 win.minimize();
if(!win.isMinimized()) win.minimize();
283 var _windowDashboardRestoreAll =
function() {
285 for(var i=0;i<Desktop.desktop.getNumberOfWindows();++i) {
286 win = Desktop.desktop.getWindowByIndex(i);
288 if (win.isMaximized())
289 Desktop.desktop.setForeWindow(win);
296 var _windowDashboardToggleWindows =
function () {
305 if(_showDesktopBtn.innerHTML.indexOf(
">Show Desktop</a>") !== -1)
306 _windowDashboardMinimizeAll();
308 _windowDashboardRestoreAll();
310 Desktop.desktop.redrawDashboardWindowButtons();
317 var _windowDashboardRefresh =
function() {
319 Debug.log(
"Window refreshed.");
324 var _windowDashboardLayoutsDropDown =
function() {
325 _layoutDropDownDisplayed = !_layoutDropDownDisplayed;
326 Debug.log(
"Desktop _windowDashboardDefaultsDropDown " +
327 _layoutDropDownDisplayed,Debug.LOW_PRIORITY);
331 el = document.getElementById(
"DesktopDashboard-defaults-dropdown");
334 Debug.log(
"found DesktopDashboard-defaults-dropdown div and deleted",Debug.LOW_PRIORITY);
335 el.parentNode.removeChild(el);
337 if(!_layoutDropDownDisplayed)
return;
340 el = document.createElement(
"div");
341 el.setAttribute(
"id",
"DesktopDashboard-defaults-dropdown");
342 el.style.backgroundColor = _defaultDashboardColor;
344 for(var i=0;i<_layoutMenuItems.length;++i)
345 if(_layoutMenuItems[i] ==
"---")
346 str +=
"<center><hr width='75%' style='border:1px solid; margin-top:5px'/></center>";
348 str +=
"<a href='#' onmouseup='Desktop.desktop.dashboard.windowDashboardLayoutsDropDown(); "
349 +
"Desktop.desktop.defaultLayoutSelect("+i+
"); return false;'>"
350 + _layoutMenuItems[i] +
"</a>";
352 str +=
"<a onclick='Desktop.openNewBrowserTab(" +
353 "\"Desktop.openLayout(" + i +
")\",\"\"," +
354 "\"\",0 /*unique*/);' " +
355 "title='Click to open the layout in a new tab' " +
357 str +=
"<img style='width:11px;margin-left:10px;' " +
358 "src='/WebPath/images/dashboardImages/icon-New-Tab.png'>";
361 if(i<_layoutMenuItems.length-1)
366 _dashboardElement.appendChild(el);
372 this.getDashboardHeight =
function() {
return _defaultDashboardHeight;}
373 this.getDashboardWidth =
function() {
return _displayWindowDashboard?_windowDashboardWidth:0;}
374 this.setDashboardWidth =
function(w) {
if(w > _defaultWindowDashboardMinWidth) _windowDashboardWidth = w; Desktop.desktop.redrawDesktop();}
376 this.toggleWindowDashboard = _toggleWindowDashboard;
377 this.redrawDashboard = _redrawDashboard;
378 this.windowDashboardLayoutsDropDown = _windowDashboardLayoutsDropDown;
379 this.windowDashboardOrganize = _windowDashboardOrganize;
381 this.updateWindows =
function() {
383 _windowDashboard.innerHTML =
"";
385 var mySortArrId = [];
386 var mySortArrIndex = [];
387 for(var i=0;i<Desktop.desktop.getNumberOfWindows();++i) {
388 mySortArrId.push(Desktop.desktop.getWindowByIndex(i).getWindowId());
389 mySortArrIndex.push(i);
393 for(var i=0;i<mySortArrId.length-1;++i) {
395 for(var j=i+1;j<mySortArrId.length;++j)
396 if(mySortArrId[j] < mySortArrId[min])
401 tmp = mySortArrId[i];
402 mySortArrId[i] = mySortArrId[min];
403 mySortArrId[min] = tmp;
404 tmp = mySortArrIndex[i];
405 mySortArrIndex[i] = mySortArrIndex[min];
406 mySortArrIndex[min] = tmp;
410 var tmpClassStr, defClassStr =
"DesktopDashboard-windowDashboard-win";
412 for(var i=0;i<Desktop.desktop.getNumberOfWindows();++i) {
414 tmpClassStr = defClassStr +
415 ((mySortArrIndex[i] == Desktop.desktop.getNumberOfWindows()-1)?
416 " DesktopDashboard-windowDashboard-foreWin":
"");
417 _windowDashboard.innerHTML +=
419 "onmouseup='Desktop.desktop.dashboard.handleDashboardWinMouseUp(event," +
421 mySortArrId[i] +
");' " +
422 "onmousedown='Desktop.desktop.dashboard.handleDashboardWinMouseDown(event," +
424 mySortArrId[i] +
");' " +
426 "class='" + tmpClassStr +
"' " +
427 "id='DesktopDashboard-windowDashboard-win"+i+
"'>" +
428 Desktop.desktop.getWindowNameByIndex(mySortArrIndex[i]) +
" - " +
429 Desktop.desktop.getWindowSubNameByIndex(mySortArrIndex[i]) +
430 "<div class='hiddenDiv' " +
431 "id='DesktopDashboard-windowDashboard-winIndex"+i+
"'>"+ mySortArrIndex[i] +
439 this.redrawFullScreenButton =
function() {
440 _fullScreenBtn.innerHTML =
"<a href='#' title='Click to toggle full screen mode for current window'>" +
441 ((Desktop.desktop.getForeWindow() &&
442 Desktop.desktop.getForeWindow().isMaximized())?
443 "Exit Full Screen":
"Full Screen") +
"</a>";
447 this.redrawRefreshButton =
function() {
448 _fullScreenRefreshBtn.innerHTML =
"<a href='#' style='font-size:16px' title='Click to reload the desktop and all windows'> ↻ </a>";
449 _fullScreenRefreshBtn.style.height =
"16px";
450 _fullScreenRefreshBtn.style.padding =
"3px 10px 7px 10px";
453 this.redrawShowDesktopButton =
function() {
454 _showDesktopBtn.innerHTML =
"<a href='#' title='Click to toggle minimize/restore all windows'>" +
455 ((Desktop.desktop.getForeWindow() &&
456 Desktop.desktop.getForeWindow().isMinimized())?
457 "Restore Windows":
"Show Desktop") +
"</a>";
461 this.getDefaultDashboardColor =
function() {
return _defaultDashboardColor; }
463 this.setDefaultDashboardColor =
function(color) {
464 _defaultDashboardColor = color;
465 _dashboardColorPostbox.innerHTML = _defaultDashboardColor;
467 _topBar.style.backgroundColor = _defaultDashboardColor;
468 _windowDashboard.style.backgroundColor = _defaultDashboardColor;
471 var _oldUserNameWithLock =
"";
472 this.displayUserLock =
function(usernameWithLock, el) {
474 el = document.getElementById(
"DesktopDashboard-userWithLock");
476 var user = Desktop.desktop.login.getUsername();
478 data +=
"lock=" + ((!usernameWithLock || usernameWithLock ==
"")?
"1":
"0") +
"&";
479 data +=
"username=" + user;
482 "Desktop.XMLHttpRequest(\"" +
483 "Request?RequestType=setUserWithLock&accounts=1\"," +
484 "\"" + data +
"\",Desktop.desktop.dashboard.handleSetUserWithLock)";
486 if(!usernameWithLock || usernameWithLock ==
"")
490 str +=
"<a href='javascript:" + jsReq +
"'" +
491 "title='Click to lockout the system and take the ots Lock'>";
493 "src='/WebPath/images/dashboardImages/icon-Settings-Unlock.png'>";
496 _oldUserNameWithLock =
"";
497 el.style.display =
"block";
501 if(_oldUserNameWithLock == usernameWithLock &&
502 el.style.display ==
"block")
506 if(usernameWithLock != user)
507 str =
"<img src='/WebPath/images/dashboardImages/icon-Settings-LockDisabled.png' " +
509 usernameWithLock +
" has the ots Lock'>";
512 str +=
"<a href='javascript:" + jsReq +
"' " +
513 "title='Click to unlock the system and release the ots Lock'>";
515 "src='/WebPath/images/dashboardImages/icon-Settings-Lock.png'>";
520 el.style.display =
"block";
522 _oldUserNameWithLock = usernameWithLock;
525 this.handleSetUserWithLock =
function(req) {
528 var serverAlert = Desktop.getXMLValue(req,
"server_alert");
529 if(serverAlert) Debug.log(
"Message from Server: " + serverAlert, Debug.HIGH_PRIORITY);
531 Desktop.desktop.dashboard.displayUserLock(
532 Desktop.getXMLValue(req,
"username_with_lock"));
534 Desktop.desktop.resetDesktop();
540 this.displayConnectionStatus =
function(connected) {
541 var el = document.getElementById(
"DesktopDashboard-serverConnectionStatus");
545 el.style.display =
"none";
550 el.innerHTML =
"*** <a onclick='Desktop.desktop.resetDesktop();//soft reset attempt' " +
551 "style='cursor:pointer; color:rgb(255,150,0);'>Disconnected</a> ***";
552 el.style.display =
"block";
555 document.getElementById(
"DesktopDashboard-userWithLock").style.display =
"none";
560 this.handleDashboardWinMouseUp =
function(event, winId) {
563 window.clearTimeout(_deepClickTimer);
566 Desktop.desktop.clickedWindowDashboard(winId);
570 this.handleDashboardWinMouseDown =
function(event, winId) {
571 event.cancelBubble =
true;
572 event.preventDefault();
573 _deepClickTimer = window.setTimeout(
function() {
575 var targetWin = Desktop.desktop.getWindowById(winId);
576 Debug.log(
"Create Dashboard Window Menu " +
577 targetWin.isMaximized() +
"-" + targetWin.isMinimized());
580 targetWin.isMaximized()?
581 "Restore Window":
"Maximize Window",
582 targetWin.isMinimized()?
583 "Restore Window":
"Minimize Window",
586 var menuItemHandlers = [
587 "Desktop.desktop.maximizeWindowById("+ winId +
")",
588 "Desktop.desktop.minimizeWindowById("+ winId +
")",
589 "Desktop.desktop.closeWindowById("+ winId +
")",
591 Debug.log(
"createEditTableMenu()");
592 SimpleContextMenu.createMenu(
595 "DesktopIconContextMenu",
596 event.pageX-1,event.pageY-1,
597 Desktop.desktop.dashboard.getDefaultDashboardColor(),
608 this.dashboardElement = _dashboardElement = document.createElement(
"div");
609 this.dashboardElement.setAttribute(
"class",
"DesktopDashboard");
610 this.dashboardElement.setAttribute(
"id",
"DesktopDashboard");
613 _topBar = document.createElement(
"div");
614 _topBar.setAttribute(
"class",
"DesktopDashboard-topBar");
615 _topBar.style.position =
"absolute";
616 _topBar.style.zIndex = z;
617 _topBar.style.backgroundColor = _defaultDashboardColor;
619 var tmpBtn = document.createElement(
"div");
620 tmpBtn.setAttribute(
"class",
"DesktopDashboard-button DesktopDashboard-button-left");
621 tmpBtn.innerHTML =
"<a href='#' title='Click to toggle side Window Bar'>" +
622 "<img id='dashboard_bi_arrow' src='/WebPath/images/dashboardImages/icon-Bi-arrow-gray.png'></a>";
623 tmpBtn.onmouseup = _toggleWindowDashboard;
624 _topBar.appendChild(tmpBtn);
626 tmpBtn = document.createElement(
"div");
627 tmpBtn.setAttribute(
"class",
"DesktopDashboard-button DesktopDashboard-button-left");
628 tmpBtn.innerHTML =
"<a href='#' title='Click to open default window layouts'>Layouts</a>";
629 tmpBtn.onmouseup = _windowDashboardLayoutsDropDown;
630 _topBar.appendChild(tmpBtn);
632 tmpBtn = document.createElement(
"div");
633 tmpBtn.setAttribute(
"class",
"DesktopDashboard-button DesktopDashboard-button-left");
634 tmpBtn.innerHTML =
"<a href='#' title='Click to automatically arrange and tile windows'>Tile</a>";
635 tmpBtn.onmouseup = _windowDashboardOrganize;
636 _topBar.appendChild(tmpBtn);
638 _showDesktopBtn = document.createElement(
"div");
639 _showDesktopBtn.setAttribute(
"class",
"DesktopDashboard-button DesktopDashboard-button-left");
640 _showDesktopBtn.innerHTML =
"<a href='#' title='Click to toggle minimize/restore all windows'>Show Desktop</a>";
641 _showDesktopBtn.onmouseup = _windowDashboardToggleWindows;
642 _topBar.appendChild(_showDesktopBtn);
644 _fullScreenBtn = document.createElement(
"div");
645 _fullScreenBtn.setAttribute(
"class",
"DesktopDashboard-button DesktopDashboard-button-left");
646 this.redrawFullScreenButton();
647 _fullScreenBtn.onmouseup = Desktop.desktop.toggleFullScreen;
648 _topBar.appendChild(_fullScreenBtn);
650 _fullScreenRefreshBtn = document.createElement(
"div");
651 _fullScreenRefreshBtn.setAttribute(
"class",
"DesktopDashboard-button DesktopDashboard-button-left");
652 this.redrawRefreshButton();
653 _fullScreenRefreshBtn.onmouseup = Desktop.handleFullScreenWindowRefresh;
654 _topBar.appendChild(_fullScreenRefreshBtn);
657 tmpBtn = document.createElement(
"div");
658 tmpBtn.setAttribute(
"class",
"DesktopDashboard-button-right");
659 tmpBtn.setAttribute(
"id",
"DesktopDashboard-serverConnectionStatus");
660 tmpBtn.setAttribute(
"title",
"Click to attempt to reconnect the server. You could also try refreshing the page, or if the problem persists contact the ots admins.");
661 tmpBtn.style.display =
"none";
662 tmpBtn.style.color =
"rgb(255,150,0)";
663 _topBar.appendChild(tmpBtn);
666 tmpBtn = document.createElement(
"div");
667 tmpBtn.setAttribute(
"class",
"DesktopDashboard-button-right");
668 tmpBtn.setAttribute(
"id",
"DesktopDashboard-userWithLock");
669 tmpBtn.style.display =
"none";
670 tmpBtn.style.marginTop =
"4px";
671 _topBar.appendChild(tmpBtn);
673 tmpBtn = document.createElement(
"div");
674 tmpBtn.setAttribute(
"class",
"DesktopDashboard-button-right");
675 tmpBtn.innerHTML =
"<a target='_blank' href='" +
676 "https://cdcvs.fnal.gov/redmine/projects/otsdaq/wiki/Otsdaq_User_Manual" +
677 " 'title='Click to open ots documentation in a new tab' ><img src='/WebPath/images/dashboardImages/icon-Help.png'></a>";
678 _topBar.appendChild(tmpBtn);
680 if(Desktop.desktop.security == Desktop.SECURITY_TYPE_DIGEST_ACCESS ||
681 Desktop.desktop.security == Desktop.SECURITY_TYPE_NONE)
683 tmpBtn = document.createElement(
"div");
684 tmpBtn.setAttribute(
"class",
"DesktopDashboard-button-right DesktopDashboard-user-account DesktopDashboard-user-logout");
685 tmpBtn.innerHTML =
"<a href='#' title='Click to sign out of your account'>Sign out</a>";
686 tmpBtn.onmouseup = Desktop.logout;
687 _topBar.appendChild(tmpBtn);
689 tmpBtn = document.createElement(
"div");
690 tmpBtn.setAttribute(
"class",
"DesktopDashboard-button-right");
691 tmpBtn.setAttribute(
"id",
"DesktopDashboard-settings-icon");
692 tmpBtn.innerHTML =
"<a href='Javascript:var win = Desktop.desktop.addWindow(\"Settings\",Desktop.desktop.login.getUsername()," +
693 "\"/WebPath/html/UserSettings.html\",true);' title='Click to open settings window'><img src='/WebPath/images/dashboardImages/icon-Settings.png'></a>";
694 _topBar.appendChild(tmpBtn);
696 tmpBtn = document.createElement(
"div");
697 tmpBtn.setAttribute(
"class",
"DesktopDashboard-user-account");
698 tmpBtn.setAttribute(
"id",
"DesktopDashboard-user-displayName");
699 tmpBtn.innerHTML =
"";
700 _topBar.appendChild(tmpBtn);
703 Debug.log(
"Desktop Dashboard is in Wizard mode",Debug.LOW_PRIORITY);
705 this.dashboardElement.appendChild(_topBar);
706 Debug.log(
"Desktop Dashboard Top Bar created",Debug.LOW_PRIORITY);
709 _windowDashboard = document.createElement(
"div");
710 _windowDashboard.setAttribute(
"id",
"DesktopDashboard-windowDashboard");
711 _windowDashboard.style.position =
"absolute";
712 _windowDashboard.style.zIndex = z;
713 _windowDashboard.style.backgroundColor = _defaultDashboardColor;
714 _toggleWindowDashboard(0,_displayWindowDashboard);
715 this.updateWindows();
716 this.dashboardElement.appendChild(_windowDashboard);
719 _dashboardColorPostbox = document.createElement(
"div");
720 _dashboardColorPostbox.setAttribute(
"id",
"DesktopContent-dashboardColorPostbox");
721 _dashboardColorPostbox.style.display =
"none";
722 _dashboardColorPostbox.innerHTML = _defaultDashboardColor;
723 this.dashboardElement.appendChild(_dashboardColorPostbox);
727 _windowDashboard.onmousemove = Desktop.handleWindowMouseMove;
728 _windowDashboard.onmousedown = Desktop.handleWindowMouseDown;
729 _windowDashboard.onmouseup = Desktop.handleWindowMouseUp;
731 _windowDashboardWindowCSSRule = _getDashboardWindowWidthCSSRule();
733 Debug.log(
"Desktop Window Dashboard created",Debug.LOW_PRIORITY);
735 Debug.log(
"Desktop Dashboard created",Debug.LOW_PRIORITY);