123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938 |
- /****************************************************************
- ** Licensed Materials - Property of IBM
- **
- ** BI and PM: qs
- **
- ** (C) Copyright IBM Corp. 2001, 2015
- **
- ** US Government Users Restricted Rights - Use, duplication or
- ** disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- *****************************************************************/
- // Copyright (C) 2008 Cognos ULC, an IBM Company. All Rights Reserved.
- // Cognos and the Cognos logo are trademarks of Cognos ULC (formerly Cognos Incorporated) in the United States and/or other countries. IBM and the IBM logo are trademarks of International Business Machines Corporation in the United States, or other countries, or both. Other company, product, or service names may be trademarks or service marks of others.
- var menuPaneMinSize = 30;
- var menuPaneMinNSOpenSize = 106;
- function redrawLayers()
- {
- if (gsUiAction == 'new')
- {
- changeMenu('insert');
- }
- else
- {
- changeMenu('edit');
- }
- showPreview(false);
- showDialogFrame(0);
- changeNavigationLinks(false,false,false,false);
- };
- function showPreview(bShow)
- {
- if (bShow)
- {
- document.getElementById("previewTopTable").style.display = (document.all ? "inline" : "table");
- document.getElementById("previewBottomTable").style.display = (document.all ? "inline" : "table");
- document.getElementById("previewTopFrame").className = "previewBody";
- document.getElementById("previewBottomFrame").className = "previewBody";
- document.getElementById("previewTopFrame").style.height = "30px";
- document.getElementById("previewBottomFrame").style.height = "30px";
- }
- else
- {
- document.getElementById("previewTopTable").style.display = "none";
- document.getElementById("previewBottomTable").style.display = "none";
- document.getElementById("previewTopFrame").className = "previewBodyClosed";
- document.getElementById("previewBottomFrame").className = "previewBodyClosed";
- document.getElementById("previewTopFrame").style.height = "0px";
- document.getElementById("previewBottomFrame").style.height = "0px";
- }
- };
- function changeNavigationLinks(bPrevious, bNext, bLeft, bRight)
- {
- if (bPrevious === null || bNext === null || bLeft === null || bRight === null)
- {
- return;
- }
- document.getElementById("first_active").style.display = (bPrevious) ? ((document.all) ? "inline" : "table-cell") : "none";
- document.getElementById("first_inactive").style.display = (!bPrevious) ? ((document.all) ? "inline" : "table-cell") : "none";
- document.getElementById("prev_active").style.display = (bPrevious) ? ((document.all) ? "inline" : "table-cell") : "none";
- document.getElementById("prev_inactive").style.display = (!bPrevious) ? ((document.all) ? "inline" : "table-cell") : "none";
- document.getElementById("next_active").style.display = (bNext) ? ((document.all) ? "inline" : "table-cell") : "none";
- document.getElementById("next_inactive").style.display = (!bNext) ? ((document.all) ? "inline" : "table-cell") : "none";
- document.getElementById("last_active").style.display = (bNext) ? ((document.all) ? "inline" : "table-cell") : "none";
- document.getElementById("last_inactive").style.display = (!bNext) ? ((document.all) ? "inline" : "table-cell") : "none";
- if (!bPrevious)
- {
- cfgSet("StartRow", 1);
- }
- cfgSet("navigationLinksValues", bPrevious + "," + bNext + "," + bLeft + "," + bRight);
- if (bPrevious || bNext)
- {
- document.getElementById("navLinksFrame").style.display = (document.all) ? "inline" : "table-cell";
- document.getElementById("navLinksFrame").style.height = "19px";
- }
- else
- {
- document.getElementById("navLinksFrame").style.display = "none";
- }
- };
- function setMenuResizeDirection(direction)
- {
- cfgSet("MenuResizeDirection", direction);
- };
- function resizeMenuPane(evt, bEventInReportFrame)
- {
- if (typeof cfgGet == "function" && cfgGet("RESIZING_MENU_PANE"))
- {
- var m = null;
- if (cfgGet("MenuResizeDirection") == "ns")
- {
- m = document.getElementById("informationTDContainer");
- if (!m)
- {
- return;
- }
- if (getQSCookie('qs', 'in') === 0)
- {
- return;
- }
- getMenuPaneSize("ns");
- if (document.all)
- {
- size = document.body.offsetHeight - evt.y;
- }
- else
- {
- size = document.body.offsetHeight - evt.pageY;
- }
- if (size < menuPaneMinNSOpenSize)
- {
- size = menuPaneMinNSOpenSize;
- }
- if (size > menuPaneMinNSOpenSize + 100)
- {
- size = menuPaneMinNSOpenSize + 100;
- }
- resizeMenuPaneToSize("ns", size, true);
- }
- else
- {
- m = document.getElementById("menuFrame");
- if (!m)
- {
- return;
- }
- getMenuPaneSize("ew");
- if(!bEventInReportFrame)
- {
- size = 0;
- }
- if (document.all)
- {
- size += evt.x;
- }
- else
- {
- size += evt.pageX;
- }
- if (size < 100)
- {
- size = 100;
- }
- if (size > 500)
- {
- size = 500;
- }
- resizeMenuPaneToSize("ew", size, true);
- }
- renderInformation(false, true);
-
-
- autoSetMetadataContainerHeight();
- }
- };
- function getMenuPaneSize(menu)
- {
- var size = 0;
- var m = null;
- if (menu == "ns")
- {
- m = document.getElementById("informationTDContainer");
- size = parseInt(m.style.height);
- if (size === null || isNaN(size))
- {
- size = menuPaneMinSize;
- }
- }
- else
- {
- m = document.getElementById("menuFrame");
- size = parseInt(m.style.width);
- if (size === null || isNaN(size))
- {
- size = 200;
- }
- }
- return size;
- };
- function resizeMenuPaneToSize(menu, size, setCookie)
- {
- var m = null;
- if (menu == "ns")
- {
- m = document.getElementById("informationTDContainer");
- m.style.height = size + "px";
- if (setCookie)
- {
- setQSCookie('qs', 'msns', size);
- }
- }
- else
- {
- m = document.getElementById("menuFrame");
- cfgSet("MenuSize", size);
- m.style.width = size + "px";
- if (setCookie)
- {
- setQSCookie('qs', 'ms', size);
- }
- }
- };
- function enableResize(bEnable)
- {
- cfgSet('RESIZING_MENU_PANE', bEnable);
- if (cfgGet("lastMenu") == "insert")
- {
- var treePane = document.getElementById('metadataTreeOuterPane');
- if (treePane !== null)
- {
- if (bEnable)
- {
- if (treePane.scrollLeft > 0)
- {
- cfgSet('MENU_PANE_SCROLL_X',treePane.scrollLeft);
- }
- if (treePane.scrollTop > 0)
- {
- cfgSet('MENU_PANE_SCROLL_Y',treePane.scrollTop);
- }
- }
- else
- {
- if (cfgGet('MENU_PANE_SCROLL_X') != null)
- {
- treePane.scrollLeft = cfgGet('MENU_PANE_SCROLL_X');
- cfgRemove('MENU_PANE_SCROLL_X');
- }
- if (cfgGet('MENU_PANE_SCROLL_Y') != null)
- {
- treePane.scrollTop = cfgGet('MENU_PANE_SCROLL_Y');
- cfgRemove('MENU_PANE_SCROLL_Y');
- }
- }
- }
- }
- };
- function collapseMenu(url)
- {
- setQSCookie('qs', 'mn', 0);
- changeMenu('closed');
- document.getElementById("menuFrame").style.width = menuPaneMinSize + "px";
- };
- function expandMenu()
- {
- setQSCookie('qs', 'mn', 1);
- var size = cfgGet("MenuSize");
- if (size === null || isNaN(size))
- {
- size = 200;
- cfgSet("MenuSize");
- }
- changeMenu(cfgGet("lastMenu"));
- document.getElementById("menuFrame").style.width = size + "px";
- };
- function changeMenu(alias)
- {
- if (alias == null)
- {
- alias = 'edit';
- }
- if (alias != 'closed')
- {
- cfgSet("lastMenu", alias);
- }
- if (document.all)
- {
- var allTables = document.getElementsByTagName("TABLE");
- for (var i = 0; i < allTables.length; i++)
- {
- if (allTables[i].getAttribute("name") == "metadata_menu_panel")
- {
- allTables[i].style.display = "none";
- }
- }
- }
- else
- {
- var allMenuPanels = document.getElementsByName("metadata_menu_panel");
- for (var i = 0; i < allMenuPanels.length; i++)
- {
- allMenuPanels[i].style.display = "none";
- }
- }
- if (document.all)
- {
- document.getElementById('metadata_menu_' + alias).style.display = "block";
- }
- else
- {
- document.getElementById('metadata_menu_' + alias).style.display = "table";
- }
- if (alias == 'insert')
- {
-
- if (cfgSize("CalcFns") == 0)
- {
- fetchMetadataFunctionList("initial");
- }
- autoSetMetadataContainerHeight();
- }
- };
- function redrawSelf()
- {
- var previewType = getPreviewType();
- var previewTitleTop = document.getElementById("previewTitleTop");
- if (previewTitleTop)
- {
- while (previewTitleTop.hasChildNodes())
- {
- previewTitleTop.removeChild(previewTitleTop.firstChild);
- }
- previewTitleTop.appendChild(document.createTextNode(previewType=="none" ? runnodata_string : runlimited_string));
- }
- var previewTitleBottom = document.getElementById("previewTitleBottom");
- if (previewTitleBottom)
- {
- while (previewTitleBottom.hasChildNodes())
- {
- previewTitleBottom.removeChild(previewTitleBottom.firstChild);
- }
- previewTitleBottom.appendChild(document.createTextNode(previewType=="none" ? runnodata_string : runlimited_string));
- }
- };
- function setWindowTitle()
- {
- var fileName = cfgGet("ReportName");
- if ( fileName != null )
- {
- fileName = fileName.replace(/\.xml$/gi,"");
- }
- var captionText = "";
- try
- {
- if (fileName==null || fileName=="")
- {
- if (cfgGet("NewReport") == null)
- {
- document.title = windowTitle_string;
- }
- else
- {
- document.title = newFilename_string + " - " + windowTitle_string;
- captionText = windowTitle_string + " - " + newFilename_string;
- }
- }
- else
- {
- document.title = fileName + " - " + windowTitle_string;
- captionText = windowTitle_string + " - " + fileName;
- }
- }
- catch (e)
- {
- }
-
-
-
- var ac = document.getElementById("applicationCaption");
- if (ac)
- {
- while (ac.hasChildNodes())
- {
- ac.removeChild(ac.firstChild);
- }
-
- var newText = document.createTextNode(captionText);
- ac.appendChild(newText);
-
- }
- };
- function initQSUI()
- {
- setWindowTitle();
-
- var size = getQSCookie('qs', 'ms');
- if (size == null || isNaN(size))
- {
- size = 200;
- }
- document.getElementById("menuFrame").style.width = size + "px";
- cfgSet("MenuSize", size);
-
- cfgSet("InformationTableHeight", document.getElementById("informationTableContainer").style.height);
- if (getQSCookie('qs', 'in') == 1)
- {
- size = getQSCookie('qs', 'msns');
- if (size == null || isNaN(size) || size < menuPaneMinNSOpenSize)
- {
- size = menuPaneMinNSOpenSize;
- setQSCookie('qs', 'msns', menuPaneMinNSOpenSize);
- }
- else if (size >= menuPaneMinNSOpenSize)
- {
- document.getElementById("nsResizeBar").style.display = "block";
- if (document.all)
- {
- document.getElementById("informationContentContainer").style.display = "inline";
- }
- else
- {
- document.getElementById("informationContentContainer").style.display = "table-cell";
- }
- }
- }
- else
- {
- size = menuPaneMinSize;
- document.getElementById("informationTableContainer").style.height = "auto";
- }
- document.getElementById("informationTDContainer").style.height = size + "px";
- redrawLayers();
- gQsToolbar.draw();
- if (typeof gStyleToolbar != 'undefined')
- {
- gStyleToolbar.draw();
- }
- if (getQSCookie('qs', 'tb') == 0)
- {
- gQsToolbar.hideBar();
- }
- if (getQSCookie('qs', 'st') == 0)
- {
- gStyleToolbar.hideBar();
- }
- if (getQSCookie('qs', 'mn') == 0)
- {
- collapseMenu();
- }
- if (getQSCookie('qs', 'in') == 1)
- {
- toggleInformation();
- }
- goApplicationManager.getFeatureManager().registerFeatures();
-
-
-
-
- if (typeof unloadQS === "function")
- {
- if (window.attachEvent)
- {
- window.attachEvent("onunload", unloadQS);
- }
- else if (window.addEventListener)
- {
- window.addEventListener("unload", unloadQS, false);
- }
- }
- if (window.attachEvent)
- {
- window.attachEvent("onresize", autoSetMetadataContainerHeight);
- }
- else
- {
- window.addEventListener("resize", autoSetMetadataContainerHeight, false);
- }
-
- autoSetMetadataContainerHeight();
- };
- function closeLink(bForceCloseWindow, sUrl)
- {
- if (typeof sUrl === "string")
- {
- gsUiBackURL = sUrl;
- }
-
- if ( (typeof bForceCloseWindow == "undefined" || bForceCloseWindow == null || !bForceCloseWindow || bForceCloseWindow == "noCancel") && goApplicationManager.get("reportHasChanged") === true)
- {
-
- dlgReset();
- if (bForceCloseWindow == "noCancel")
- {
- dlgSetParm("xxNoCancel", "true");
- }
- dlgSetParm("m", "/" + qs_dir + "/leavingQS.xts");
- dlgSubmit(null, false, true);
- }
- else
- {
-
- releaseMetadataRequest();
-
-
-
- if (goApplicationManager)
- {
- var oCVQS = goApplicationManager.getReportManager().getCVObj();
- if (oCVQS)
- {
- oCVQS.exit(null);
- }
- }
-
- window.onbeforeunload = null;
- if (gsUiBackURL == null || gsUiBackURL == "")
- {
- setTimeout("window.close();", 100);
- }
- else
- {
- setTimeout("location.replace(gsUiBackURL);", 100);
- }
-
- window.onbeforeunload = null;
- if (gsUiBackURL == null || gsUiBackURL == "")
- {
- setTimeout("window.close();", 100);
- }
- else
- {
- setTimeout("location.replace(gsUiBackURL);", 100);
- }
- }
- };
- function unloadQS()
- {
-
-
-
- if (goApplicationManager && cfgGet("LAST_ACTION") != "logoff")
- {
-
- releaseMetadataRequest();
-
- var oCVQS = goApplicationManager.getReportManager().getCVObj();
- if (oCVQS)
- {
- oCVQS.exit(null);
- }
-
- }
- };
- function hideDialogs()
- {
-
- hideDialogFrame();
- };
- function bannerHelp(cmd)
- {
- switch(cmd)
- {
- case 'help':
- goApplicationManager.getFeatureManager().launchFeature('Help');
- break;
- case 'gettingstarted':
- gotoHelp(goApplicationManager.get("productLocale"), "wig_cr_a", "");
- break;
- case 'cogonweb':
- window.open("http://www-01.ibm.com/software/analytics/cognos");
- break;
- case 'welcome':
- bannerHome(goApplicationManager.get("scriptEngine") + "?b_action=xts.run&m=portal/welcome/welcome.xts");
- break;
- case 'about':
- goApplicationManager.getFeatureManager().launchFeature('About');
- break;
- default:
- break;
- }
- };
- function bannerHome(sUrl)
- {
-
- sUrl = sUrl.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, "\"").replace(/'/g, "'").replace(/&/g, "&");
- closeLink(false, sUrl);
- };
- function initLogonMenu(iAvailableNamespaces,iTraversableNamespaces,bIsAnonymous)
- {
-
- var sLogoffString = cfgGet("gsLogoffString");
- var sLogonString = cfgGet("gsLogonString");
-
-
- var sGateway = cfgGet("gsGateway");
- var sApp = cfgGet("gsApp");
- var sSkinFolder = cfgGet("gsSkinFolder");
- var sWebRoot = cfgGet("gsWebRoot");
- var sBrandFolder = sSkinFolder + "/branding";
- var bIsLoggedOut = (bIsAnonymous || (iTraversableNamespaces == 0));
- var bCanLogin = (iAvailableNamespaces !== iTraversableNamespaces);
- var oAuthContainer = document.getElementById("authOptionContainerDiv");
- var oTopToolbarLogon = null;
- if (oAuthContainer)
- {
-
- var oTopToolbarLogonStyle = new CUIStyle('bannerOptionsButtonNormal', 'bannerOptionsButtonNormal', 'bannerOptionsButtonNormal', 'bannerOptionsButtonNormal', 'bannerOptionsButtonNormal', 'bannerOptionsButtonNormal');
- var oTopMenuItemLogonStyle = new CUIStyle('bannerOptions', 'bannerOptions', 'bannerOptions', 'bannerOptions', 'bannerOptions');
- var oTopToolbarLogonFlyoutMenu = new CUIStyle('bannerOptionsButtonNormal', 'bannerOptionsButtonOver', 'bannerOptionsButtonNormal', 'bannerOptionsButtonNormal','bannerOptionsButtonNormal', 'bannerOptionsButtonNormal');
-
-
-
- oTopToolbarLogon = new CBar('authOptionContainerDiv', oTopToolbarLogonStyle, null, sWebRoot + '/common/images/toolbar/', '', '', 'qs', 'tt');
- oTopToolbarLogon.setMenuType(cHorizonalBar);
- if (bCanLogin && ! bIsLoggedOut)
- {
-
- var logonMenuItem = new CMenuItem(oTopToolbarLogon, sLogonString, 'cfgSet("LAST_ACTION", "logon");pptFaultHandler();', sWebRoot + '/common/images/spacer.gif', oTopMenuItemLogonStyle, sWebRoot, sSkinFolder);
- var menuIcon = logonMenuItem.getIcon();
- menuIcon.setWidth(1);
-
- logonMenuItem = new CMenuItem(oTopToolbarLogon, '', '', '', oTopToolbarLogonFlyoutMenu, sWebRoot, sSkinFolder);
- menuIcon = logonMenuItem.getIcon();
- menuIcon.setWidth(7);
-
- var oTopToolbarLogonMenu = logonMenuItem.createDropDownMenu(gMenuStyle, '');
- logonMenuItem = new CMenuItem(oTopToolbarLogonMenu, sLogonString, 'cfgSet("LAST_ACTION", "logon");pptFaultHandler();', sBrandFolder + '/tools_logon.gif', gMenuItemStyle, sWebRoot, sSkinFolder);
- logonMenuItem = new CMenuItem(oTopToolbarLogonMenu, sLogoffString, 'cfgSet("LAST_ACTION", "logoff");bannerHome("' + sGateway + '?b_action=xts.run&m=' + sApp + '/logoff.xts&h_CAM_action=logoff");', sBrandFolder + '/tools_logoff.gif', gMenuItemStyle, sWebRoot, sSkinFolder);
- }
- else if (bIsLoggedOut)
- {
-
- logonMenuItem = new CMenuItem(oTopToolbarLogon, sLogonString, 'cfgSet("LAST_ACTION", "logon");pptFaultHandler();', "", oTopMenuItemLogonStyle, sWebRoot, sSkinFolder);
- }
- else
- {
-
-
- logonMenuItem = new CMenuItem(oTopToolbarLogon, sLogoffString, 'cfgSet("LAST_ACTION", "logoff");bannerHome("' + sGateway + '?b_action=xts.run&m=' + sApp + '/logoff.xts&h_CAM_action=logoff");', '', oTopMenuItemLogonStyle, sWebRoot, sSkinFolder);
- }
- oTopToolbarLogon.draw();
- }
- return oTopToolbarLogon;
- };
- function CToolbarNotification()
- {
- };
- CToolbarNotification.prototype.update = function (e)
- {
- if (typeof e != "undefined" && canUseQueryStudioAdvancedMode)
- {
- var selections = e.getSelections();
- var fontFamElt = document.getElementById("fontFamily");
- var fontSizeElt = document.getElementById("fontSize");
- var boldElt = document.getElementById("tbbuttonbold");
- var italicElt = document.getElementById("tbbuttonitalic");
- var underlineElt = document.getElementById("tbbuttonunderline");
- if (selections.length > 0)
- {
- var stylesArr = getStylesFromAllSelectedCols();
- stylesArr = stylesArr.concat(getStylesFromAllSelectedReportElements());
- var singleStylesArr = mergeStyles(stylesArr, true);
-
- var fontFamValue = "";
- if (singleStylesArr[2] != -1 && singleStylesArr[2] != "" && singleStylesArr[2] != null)
- {
- fontFamValue = singleStylesArr[2];
- }
- var i = 0;
- if (fontFamValue != "")
- {
- for (i = 0; i < fontFamElt.options.length; i++)
- {
- if (fontFamElt.options[i].value == fontFamValue)
- {
- fontFamElt.selectedIndex = i;
- break;
- }
- }
- }
- else
- {
- fontFamElt.selectedIndex = 0;
- }
-
- var fontSizeValue = "";
- if (singleStylesArr[3] != -1 && singleStylesArr[3] != "" && singleStylesArr[3] != null)
- {
- fontSizeValue = singleStylesArr[3];
- }
- if (fontSizeValue != "")
- {
- for (i = 0; i < fontSizeElt.options.length; i++)
- {
- if (fontSizeElt.options[i].value == fontSizeValue)
- {
- fontSizeElt.selectedIndex = i;
- break;
- }
- }
- }
- else
- {
- fontSizeElt.selectedIndex = 0;
- }
-
- if (singleStylesArr[0] != -1 && singleStylesArr[0] != "" && singleStylesArr[0] != "normal" && singleStylesArr[0] != null)
- {
- boldElt.tbItem.pressed();
- }
- else if (boldElt !== null)
- {
- boldElt.tbItem.reset();
- }
-
- if (singleStylesArr[1] != -1 && singleStylesArr[1] != "" && singleStylesArr[1] != "normal" && singleStylesArr[1] != null)
- {
- italicElt.tbItem.pressed();
- }
- else if (italicElt !== null)
- {
- italicElt.tbItem.reset();
- }
-
- if (singleStylesArr[6] != -1 && singleStylesArr[6] != "" && singleStylesArr[6] != null)
- {
- underlineElt.tbItem.pressed();
- }
- else if (underlineElt !== null)
- {
- underlineElt.tbItem.reset();
- }
-
-
- if (typeof colorColor !== "undefined")
- {
- if (singleStylesArr[4] != -1 && singleStylesArr[4] != "" && singleStylesArr[4] != null)
- {
- colorColor.setActiveColor(singleStylesArr[4]);
- }
- else
- {
- colorColor.setActiveColor('');
- }
- }
-
-
- if (typeof backgroundColorPicker !== "undefined")
- {
-
- if (singleStylesArr[5] != -1 && singleStylesArr[5] != "" && singleStylesArr[5] != null)
- {
- backgroundColorPicker.setActiveColor(singleStylesArr[5]);
- }
- else
- {
- backgroundColorPicker.setActiveColor('');
- }
- }
-
- var horizAlign = singleStylesArr[9];
- var vertAlign = singleStylesArr[10];
- var align = cssToAlignCode(horizAlign, vertAlign);
-
- if (typeof alignmentPicker !== "undefined")
- {
- alignmentPicker.setActiveAlignment(align);
- }
- }
- else
- {
-
- if (fontFamElt !== null)
- {
- fontFamElt.selectedIndex = 0;
- }
- if (fontSizeElt !== null)
- {
- fontSizeElt.selectedIndex = 0;
- }
-
- if (boldElt !== null)
- {
- boldElt.tbItem.reset();
- }
- if (italicElt !== null)
- {
- italicElt.tbItem.reset();
- }
- if (underlineElt !== null)
- {
- underlineElt.tbItem.reset();
- }
-
-
- if (typeof colorColor !== "undefined" && colorColor.m_oPicker!==null)
- {
- colorColor.setActiveColor('');
- }
- if (typeof backgroundColorPicker !== "undefined" && backgroundColorPicker.m_oPicker!==null)
- {
- backgroundColorPicker.setActiveColor('');
- }
- if (typeof alignmentPicker !== "undefined" && alignmentPicker.m_oPicker!=null)
- {
- alignmentPicker.setActiveAlignment('');
- }
- }
- }
- };
- var toolbarNotifier = new CToolbarNotification();
- function defaultCloseLinkButton(evt)
- {
- if(evt != null)
- {
- var goDialogManager = new CDialogManager();
- if(!goDialogManager.isSpaceOrEnterKeyEvent(evt))
- {
- return;
- }
- }
-
- this.closeLink(true);
- };
-
- function promptCloseLinkButton(evt)
- {
- if(evt != null)
- {
- var goDialogManager = new CDialogManager();
- if(!goDialogManager.isSpaceOrEnterKeyEvent(evt))
- {
- return;
- }
- }
-
- this.closeLink('noCancel');
- };
- function setMetadataContainerHeight(size)
- {
- if (isNaN(size))
- {
- return;
- }
- var oMetadataTreeOuterPane = document.getElementById("metadataTreeOuterPane");
- oMetadataTreeOuterPane.style.height = size;
- };
- function getMetadataContainerHeight()
- {
- return parseInt(document.getElementById("metadataTreeOuterPane").style.height);
- };
- function autoSetMetadataContainerHeight()
- {
- var iBottomPadding = 10;
- var oMetadataMenuContainer = document.getElementById("menuContent");
- var oInformationContainer = document.getElementById("informationTDContainer");
- var iInsertButtonHeight = 30;
- if (oInformationContainer && oMetadataMenuContainer)
- {
-
- var oMetadataTreeOuterPane = document.getElementById("metadataTreeOuterPane");
- oMetadataTreeOuterPane.style.height = "100px";
-
- var iMenuHeight = oMetadataMenuContainer.offsetHeight;
- var iBottomElementsHeight = iInsertButtonHeight + oInformationContainer.offsetHeight + iBottomPadding;
- var iNewMetadataTreeHeight = iMenuHeight - iBottomElementsHeight;
-
-
- if (iMenuHeight && iBottomElementsHeight && iNewMetadataTreeHeight > 0)
- {
- oMetadataTreeOuterPane.style.height = iNewMetadataTreeHeight + "px";
- }
- }
- };
|