123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319 |
- // Licensed Materials - Property of IBM
- // IBM Cognos Products: XQE
- // (C) Copyright IBM Corp. 2008, 2015
- // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- function submitadminform(formObj)
- {
- if (formObj)
- {
- formObj.mode.value = 'flush';
-
- formObj.submit();
-
- }
- }
- function resetadminform(formObj, resetValue)
- {
- if (formObj)
- {
- formObj.mode.value = 'reset';
- formObj.xqeMetric_resetfield.value = resetValue;
-
- formObj.submit();
-
- }
- }
- function reloadadminform(formObj)
- {
- if (formObj)
- {
- formObj.dispatcher.value = formObj.xqeConfiguration_dispatchers.options[formObj.xqeConfiguration_dispatchers.selectedIndex].value;
- formObj.configurationcategory.value = formObj.xqeConfiguration_ConfigCategory.value;
- formObj.mode.value = 'reload';
-
- formObj.submit();
-
- }
- }
- function flushsaladminform(formObj)
- {
- if (formObj)
- {
- formObj.mode.value = 'flush';
- formObj.submit();
-
- }
- }
- function dumpsaladminform(formObj)
- {
- if (formObj)
- {
- formObj.mode.value = 'dump';
- formObj.submit();
-
- }
- }
- function hideAndShow(formObj, rowId, hideOrShow)
- {
- if (formObj) {
- var row = document.getElementById(rowId);
- if ((hideOrShow == 'hide'))
- {
- row.style.display = 'none';
- } else {
- row.style.display = '';
- }
- }
- }
- function changeServerGroup(formObj)
- {
- var newServerGroup = formObj.xqeConfiguration_serverGroups.options[formObj.xqeConfiguration_serverGroups.selectedIndex].value;
- formObj.servergroup.value = newServerGroup;
-
- formObj.mode.value = 'display';
-
- formObj.submit();
- }
- function changeConfigurationSubCategory(formObj, categoryName, activePage)
- {
- formObj.configurationcategory.value = categoryName;
- formObj.xqeConfiguration_ConfigCategory.value = categoryName;
-
- formObj.dispatcher.value = activePage;
- formObj.mode.value = 'display';
-
- formObj.submit();
- }
- function allowNumbersOnly(data, e, dec)
- {
- var key_null = 0;
- var key_backspace = 8;
- var key_tab = 9;
- var key;
- var keychar;
- if (window.event)
- key = window.event.keyCode;
- else if (e)
- key = e.which;
- else
- return true;
- keychar = String.fromCharCode(key);
- if ( (key==null) || (key==key_null) || (key==key_backspace) ||
- (key==key_tab) )
- return true;
-
- else if ((("0123456789").indexOf(keychar) > -1))
- return true;
- else if (dec && (keychar == ".")) {
- data.form.elements[dec].focus();
- return false;
- }
- else
- return false;
- }
- function submitQSATDS(formObj)
- {
- formObj.mode.value = 'dataSource';
- formObj.submit();
- }
- function submitQSATCatalogs(formObj)
- {
- formObj.mode.value = 'catalog';
- formObj.submit();
- }
- function submitQSATCubesOrOoperation(formObj)
- {
- formObj.mode.value = 'cube';
- formObj.submit();
- }
- function flushadminform(formObj,alertMsg)
- {
- var numberOfCheckBoxChecked = 0;
- if (formObj)
- {
- var elementCount = formObj.length;
- for(var i = 0; i < elementCount; i++)
- {
- var element = formObj.elements[i];
- if (element.type == 'checkbox' && element.checked) {
- numberOfCheckBoxChecked++;
- }
- }
-
- if (numberOfCheckBoxChecked == 0)
- {
- javascript:alert(alertMsg);
- }
- else
- {
- formObj.mode.value = 'flush';
-
- formObj.submit();
- }
-
- }
- }
- function dumpadminform(formObj,alertMsg)
- {
- var numberOfCheckBoxChecked = 0;
- if (formObj)
- {
-
- var elementCount = formObj.length;
- for(var i = 0; i < elementCount; i++)
- {
- var element = formObj.elements[i];
- if (element.type == 'checkbox' && element.checked) {
- numberOfCheckBoxChecked++;
- }
- }
-
- if (numberOfCheckBoxChecked == 0)
- {
- javascript:alert(alertMsg);
- }
- else
- {
-
- formObj.mode.value = 'dump';
-
- formObj.submit();
- }
-
- }
- }
- function toggleChecks(formObj, prefix, checkState)
- {
- if (formObj)
- {
- var elementCount = formObj.length;
- for(var i = 0; i < elementCount; i++)
- {
- var element = formObj.elements[i];
- if (element.type == 'checkbox' && element.name.indexOf(prefix) == 0) {
- element.checked = checkState;
- }
- }
- }
- }
- function performClose(formObj)
- {
- if (formObj)
- {
- formObj.mode.value = 'display';
- formObj.submit();
-
- }
- }
- function xmlencode(string) {
- return string.replace(/\&/g,'&'+'amp;').replace(/\'/g,'&'+'apos;');
- }
- function changeROLAPOperation(formObj)
- {
- var newROLAPOperation = formObj.xqeROLAPQSATPage_selectedOperation.options[formObj.xqeROLAPQSATPage_selectedOperation.selectedIndex].value;
- formObj.xqeROLAPQSATPage_selectedOperation.value = newROLAPOperation;
-
- formObj.mode.value = 'display';
-
- formObj.submit();
- }
- function changeROLAPServerGroup(formObj)
- {
- var newROLAPOperation = formObj.xqeROLAPQSATPage_selectedOperation.options[formObj.xqeROLAPQSATPage_selectedOperation.selectedIndex].value;
- formObj.xqeROLAPQSATPage_selectedOperation.value = newROLAPOperation;
-
- var newROLAPServerGroup = formObj.xqeROLAPQSATPage_selectedSG.options[formObj.xqeROLAPQSATPage_selectedSG.selectedIndex].value;
- formObj.xqeROLAPQSATPage_selectedSG.value = newROLAPServerGroup;
-
- formObj.mode.value = 'display';
-
- formObj.submit();
- }
- function changeROLAPDispatcher(formObj)
- {
- var newROLAPOperation = formObj.xqeROLAPQSATPage_selectedOperation.options[formObj.xqeROLAPQSATPage_selectedOperation.selectedIndex].value;
- formObj.xqeROLAPQSATPage_selectedOperation.value = newROLAPOperation;
-
- var newROLAPServerGroup = formObj.xqeROLAPQSATPage_selectedSG.options[formObj.xqeROLAPQSATPage_selectedSG.selectedIndex].value;
- formObj.xqeROLAPQSATPage_selectedSG.value = newROLAPServerGroup;
-
- var newROLAPDispatcher = formObj.xqeROLAPQSATPage_selectedDispatcher.options[formObj.xqeROLAPQSATPage_selectedDispatcher.selectedIndex].value;
- formObj.xqeROLAPQSATPage_selectedDispatcher.value = newROLAPDispatcher;
-
- formObj.mode.value = 'display';
-
- formObj.submit();
- }
- function dmrRadioButtonSelection(formObj)
- {
- var radioButtonElementValue = "";
-
- var oRadio = formObj.elements['xqeQSATPage_DMR_Radio_Button_Group'];
-
- for(var i = 0; i < oRadio.length; i++)
- {
- if(oRadio[i].checked)
- {
- radioButtonElementValue = oRadio[i].value;
- break;
- }
- }
-
- if (radioButtonElementValue == 'Package')
- {
- formObj.xqeQSATPage_Package.disabled = false;
- formObj.xqeQSATPage_DataSources.disabled = true;
- } else if (radioButtonElementValue == 'DataSources')
- {
- formObj.xqeQSATPage_Package.disabled = true;
- formObj.xqeQSATPage_DataSources.disabled = false;
- }
- }
|