,
auto
var isBidiEnabled = ;
if (isBidiEnabled){
var bidi = BidiUtils.getInstance();
bidi.setProperties('',
'',
'');
}
bidi.onfocus(this)
bidi.onfocus(this)
var _THIS_itemList = new Array("title");
function _THIS_refreshEdit(evt)
{
if(evt.eventPhase == evt.AT_TARGET)
{
checkToRefresh("_THIS_form",evt,"");
}
}
_THIS_.addEventListener("fragment.refresh","_THIS_refreshEdit",false);
function _THIS_submitEditForm(formAction)
{
if (_THIS_validateFormFields())
{
var action = $("_THIS_formAction");
action.setAttribute("value", formAction);
if($("_THIS_navSelectId"))
{
if ((formAction == 'save')&&($("_THIS_navSelectId").value != ''))
{
$("_THIS_navSelectId").value = $("_THIS_navSelectId").value;
}
if (_THIS_.removeFragChildren)
_THIS_.removeFragChildren();
}
document._THIS_form.submit();
}
}
function _THIS_uviewReset(evt)
{
if (evt.eventPhase == evt.AT_TARGET){
if (_THIS_.removeFragChildren)
_THIS_.removeFragChildren();
}
}
_THIS_.addEventListener("fragment.reset","_THIS_uviewReset",false);
function _THIS_cancelEdit()
{
_THIS_.setMode('view');
}
function _THIS_validateFormFields()
{
var valid = true;
var titleErr = validateMultiLingualProperty("selectLang", "title", "form", "_THIS_", _THIS_, _THIS_itemList);
if (titleErr != CValidator.RES_VALID)
{
var entryEl = document.getElementById("_THIS_title");
alert(entryEl.getAttribute("valerr:message"));
entryEl.focus();
return false;
}
//check the view channel
var channel = $("_THIS_viewChannel");
if (channel)
{
var channelErr = _THIS_.validate("channel", channel.value);
if (channelErr != CValidator.RES_VALID)
{
alert(channel.getAttribute("valerr:message"));
channel.focus();
return false;
}
}
//check the frag height
var fragHeight = $("_THIS_viewFragHeight");
if (fragHeight)
{
var fragHeightErr = _THIS_.validate("viewerFragmentHeight", fragHeight.value);
if (fragHeightErr != CValidator.RES_VALID)
{
if (fragHeightErr == CValidator.RES_NUMERIC_NAN)
{
alert("");
}
else if (fragHeightErr == CValidator.RES_NUMERIC_MAX)
{
alert("");
}
else
{
alert("");
}
fragHeight.focus();
return false;
}
}
return true;
}
function _THIS_createHiddenElement(id, name, value)
{
var hiddenElem;
if ($("_THIS_selectedLanguage"))
{
hiddenElem = $(id);
}
else
{
hiddenElem = xCreateElement("input");
hiddenElem.setAttribute("name", name);
hiddenElem.setAttribute("value", value);
hiddenElem.setAttribute("type", "hidden");
hiddenElem.setAttribute("id", id);
document._THIS_form.appendChild(hiddenElem);
}
hiddenElem.setAttribute("value", value);
}
function _THIS_reloadAfterSelectObject(response)
{
response = _THIS_decode(response);
var xml = new _THIS_XMLBuilderLoadXMLFromString(response);
if(xml)
{
var idNode = _F_DOM.selectSingleNode(xml, "/return/object/item[name= 'id']/value");
var id = _F_DOM.text(idNode);
var tmpChannel = $("_THIS_viewChannel").value;
_THIS_.addEventListener("fragment.retrieve.after","_THIS_closeSelectDialog",false);
var funcParms = "_THIS_.retrieve(\"p_navSelectionId=" + id + "&tmp_channel=" + tmpChannel + "&formaction=objectSelect\",\"" + _THIS_currentObjDiv + "\")";
setTimeout(funcParms,1);
_THIS_clearCustomizations();
return;
}
}
function _THIS_closeSelectDialog(evt)
{
if(evt.eventPhase == evt.AT_TARGET)
setTimeout('_THIS_closeSD()', 350);
}
//CQ234492 To remove the delay in IE when closing the select dialog and focusing back to the main window
function _THIS_closeSD() {
_THIS_modalDialog.hide();
_THIS_modalDialog.destroy();
_THIS_modalDialog = null;
_THIS_.removeEventListener("fragment.retrieve.after","_THIS_closeSelectDialog",false);
}
function _THIS_resetObject( divId)
{
_THIS_.retrieve('p_navSelectionId=&tmp_channel=&formaction=objectSelect', divId);
return;
}
function _THIS_XMLBuilderLoadXMLFromString (markup)
{
var xmlDocument = null;
if (window.ActiveXObject || "ActiveXObject" in window)
{
try
{
xmlDocument = new ActiveXObject('Microsoft.XMLDOM');
xmlDocument.loadXML(markup);
}
catch (e)
{
}
}
else if (typeof DOMParser != 'undefined')
{
xmlDocument = new DOMParser().parseFromString(markup, 'application/xml');
}
return xmlDocument;
}
function _THIS_decode(text)
{
var amp_re = /&/g;
var lt_re = /</g;
var gt_re = />/g;
var apos_re = /'/g;
// Decode stuff which has been encoded/escaped out.
// ORDER IS IMPORTANT - amp_re must be the last value to replace!
text = text.replace(lt_re, "<");
text = text.replace(gt_re, ">");
text = text.replace(apos_re, "'");
text = text.replace(amp_re, "&");
return text;
}
function _THIS_ccModalCallBack(cmd,sResponse)
{
if(cmd == 'ok' && sResponse)
_THIS_reloadAfterSelectObject(sResponse);
else{
_THIS_modalDialog.hide();
_THIS_modalDialog.destroy();
_THIS_modalDialog = null;
}
}
var _THIS_currentObjDiv = "";
var _THIS_currentObjType ="";
var _THIS_currentProperty ="";
var _THIS_modalDialog = null;
function _THIS_chooseObject(propName, updateDivId, objType) {
var defaultPath = "/";
if($("_THIS_navSelectId") !== undefined && $("_THIS_navSelectId").value != ""){
defaultPath = "storeID(\"" + $("_THIS_navSelectId").value + "\")";
}
var theAmp = "&";
var cForm = document._THIS_form;
_THIS_currentObjDiv = updateDivId;
_THIS_currentObjType = objType;
_THIS_currentProperty = propName;
if (objType =="folder" || objType == "package")
objType += ".container";
var url = "_THIS?frag-urlType=gateway&b_action=xts.run/THIS_" + theAmp +
"m=portal/select/select.xts" + theAmp +
"so.defaultObject=" + defaultPath + theAmp + "so.defaultLocation=" + defaultPath + theAmp + "so.select=" + objType + theAmp +
"md.callBack=xml" + theAmp + "md.displayOptions=h1" + theAmp +
"backURL=javascript:parent.ui_modal_dialog.close()";
var iframeStaticHeight = parseInt(xClientHeight() * .75);
var iframeStaticWidth = parseInt(xClientWidth() * .75);
if (_THIS_modalDialog == null)
_THIS_modalDialog = new ui_dialog("modalDialogViewer", '', ui_dialog.style.BTN_NOBUTTONS | ui_dialog.style.CENTER | ui_dialog.style.IFRAME, -1, -1, iframeStaticWidth, iframeStaticHeight, _THIS_.div, url);
_THIS_modalDialog.show();
ccModalCallBack = _THIS_ccModalCallBack;
}
function _THIS_openAdvancedPropEdit() {
var theAmp = "&";
var navId = $("_THIS_targetId").value;
var tmpChannel = $("_THIS_viewChannel").value;
var fragDialog = new ui_dialog("advProps", '', ui_dialog.style.BTN_OKCANCEL | ui_dialog.style.CENTER | ui_dialog.style.RESIZABLE, -1, -1, 600, 400, _THIS_.div);
fragDialog.setContent("<div id=" + _THIS_.id + "dialogPrefcontent></div>");
fragDialog.fragment = new fragment("/cm/" + navId, _THIS_.id + "dialogPref");
fragDialog.fragment.modes = ["view", "edit"];
fragDialog.show();
fragDialog.fragment.mode = 'edit';
fragDialog.fragment.retrieve('frag-view=dialog&p_navSelectionId=' + navId + '&tmp_channel=' + tmpChannel);
fragDialog.fragment.ownerFragment = _THIS_;
fragDialog.fragment.ownerDialog = fragDialog;
fragDialog.data = _THIS_getCustomizations();
_THIS_.dialog = fragDialog;
}
function _THIS_getCustomizations()
{
var customizationsHiddenElem = $("_THIS_dlgCustomizations");
var propsObj = null;
if ((customizationsHiddenElem)&&(customizationsHiddenElem.value != ''))
{
propsObj = _THIS_buildObjFromUrl(customizationsHiddenElem.value);
}
return propsObj;
}
function _THIS_saveCustomizations(url)
{
$("_THIS_dlgCustomizations").value = url;
}
function _THIS_clearCustomizations()
{
$("_THIS_dlgCustomizations").value = '';
}
function _THIS_buildObjFromUrl(url)
{
var propsObj = null;
var paramsArray = url.split("&");
if (paramsArray.length > 0)
{
propsObj = new Object();
for (var i=0; i < paramsArray.length; i++)
{
var equalPos = paramsArray[i].indexOf("=");
if (equalPos > 0){
var key = paramsArray[i].substring(0,equalPos);
var val = paramsArray[i].substring(equalPos + 1, paramsArray[i].length);
var decodedVal = decodeURIComponent(val);
propsObj[key] = decodedVal;
}
}
}
return propsObj;
}
function _THIS_handleDialogEvents(evt){
switch(evt.name){
case "cognos.viewer.plugin.preferences.save":
_THIS_saveCustomizations(evt.payload);
_THIS_.dialog.fragment.destroy();
_THIS_.dialog.hide();
_THIS_.dialog.destroy();
break;
case "cognos.viewer.plugin.preferences.close":
_THIS_.dialog.fragment.destroy();
_THIS_.dialog.destroy();
break;
}
evt.stopPropagation();
}
_THIS_.addEventListener("cognos.viewer.plugin.preferences.*", "_THIS_handleDialogEvents", false);
function _THIS_resetRadio(format)
{
if( format == "type")
document._THIS_form._THIS_viewerTitleOptions[1].checked=true;
else
{
document._THIS_form._THIS_viewerTitleOptions[0].checked=true;
}
}
true
entryName
true
customTitle
_THIS_form
title
bidi.onfocus(this)
true