|
<PDM_FORM NAME=INSERT_FORM>
<input type=hidden name="KEY.linkItem" id="KEY.linkItem">
<input type=hidden name='SET.linkItem' id='SET.linkItem'>
<input type=hidden name="obj_flag" id="obj_flag">
|
<script type="text/javascript">
var lookupLinkTextKD;
var linkTabindexKD;
if ( ahdtop.cstUsingScreenReader ) {
lookupLinkTextKD = "Look up Knowledge Doc"
linkTabindexKD = "";
}
else {
lookupLinkTextKD = " Knowledge Doc"
linkTabindexKD = " tabindex=" + (++_dtl.tabIndex);
write_img_link("$CAisd/img/lookup.gif", "KD", "SET.linkItem", "INSERT_FORM", "", "Find KD", 0);
}
document.write("<a class=lookup" + linkTabindexKD + " style='font-size:1.0em;' href='javascript:void(0)' onClick=\"popup_search('KD','SET.linkItem', 'INSERT_FORM', , 0);return false\">" + lookupLinkTextKD + "</a> | ")
if ($ACCESS.call_mgr >= 1) {
document.write("");
var lookupLinkTextCR;
var linkTabindexCR;
if ( ahdtop.cstUsingScreenReader ) {
lookupLinkTextCR = "Look up Request"
linkTabindexCR = "";
}
else {
lookupLinkTextCR = " Request"
linkTabindexCR = " tabindex=" + (++_dtl.tabIndex);
write_img_link("$CAisd/img/lookup.gif", "CR", "SET.linkItem", "INSERT_FORM", "", "Find CR", 0);
}
document.write("<a class=lookup" + linkTabindexCR + " style='font-size:1.0em;' href='javascript:void(0)' onClick=\"popup_search('CR','SET.linkItem', 'INSERT_FORM', , 0);return false\">" + lookupLinkTextCR + "</a> | ")
if ("$env.NX_OTB_MARKET" == "itil") {
document.write("");
var lookupLinkTextIN;
var linkTabindexIN;
if ( ahdtop.cstUsingScreenReader ) {
lookupLinkTextIN = "Look up Incident"
linkTabindexIN = "";
}
else {
lookupLinkTextIN = " Incident"
linkTabindexIN = " tabindex=" + (++_dtl.tabIndex);
write_img_link("$CAisd/img/lookup.gif", "IN", "SET.linkItem", "INSERT_FORM", "", "Find IN", 0);
}
document.write("<a class=lookup" + linkTabindexIN + " style='font-size:1.0em;' href='javascript:void(0)' onClick=\"popup_search('IN','SET.linkItem', 'INSERT_FORM', , 0);return false\">" + lookupLinkTextIN + "</a> | ")
document.write("");
var lookupLinkTextPR;
var linkTabindexPR;
if ( ahdtop.cstUsingScreenReader ) {
lookupLinkTextPR = "Look up Problem"
linkTabindexPR = "";
}
else {
lookupLinkTextPR = " Problem"
linkTabindexPR = " tabindex=" + (++_dtl.tabIndex);
write_img_link("$CAisd/img/lookup.gif", "PR", "SET.linkItem", "INSERT_FORM", "", "Find PR", 0);
}
document.write("<a class=lookup" + linkTabindexPR + " style='font-size:1.0em;' href='javascript:void(0)' onClick=\"popup_search('PR','SET.linkItem', 'INSERT_FORM', , 0);return false\">" + lookupLinkTextPR + "</a> | ")
}
}
document.write(" ");
if ($ACCESS.change_mgr >= 1) {
document.write("");
var lookupLinkTextCHG;
var linkTabindexCHG;
if ( ahdtop.cstUsingScreenReader ) {
lookupLinkTextCHG = "Look up Change"
linkTabindexCHG = "";
}
else {
lookupLinkTextCHG = " Change Order"
linkTabindexCHG = " tabindex=" + (++_dtl.tabIndex);
write_img_link("$CAisd/img/lookup.gif", "CHG", "SET.linkItem", "INSERT_FORM", "", "Find CHG", 0);
}
document.write("<a class=lookup" + linkTabindexCHG + " style='font-size:1.0em;' href='javascript:void(0)' onClick=\"popup_search('CHG','SET.linkItem', 'INSERT_FORM', , 0);return false\">" + lookupLinkTextCHG + "</a> | ")
}
if ($ACCESS.issue_mgr >= 1) {
document.write("");
var lookupLinkTextISS;
var linkTabindexISS;
if ( ahdtop.cstUsingScreenReader ) {
lookupLinkTextISS = "Look up Issue"
linkTabindexISS = "";
}
else {
lookupLinkTextISS = " Issue"
linkTabindexISS = " tabindex=" + (++_dtl.tabIndex);
write_img_link("$CAisd/img/lookup.gif", "ISS", "SET.linkItem", "INSERT_FORM", "", "Find ISS", 0);
}
document.write("<a class=lookup" + linkTabindexISS + " style='font-size:1.0em;' href='javascript:void(0)' onClick=\"popup_search('ISS','SET.linkItem', 'INSERT_FORM', , 0);return false\">" + lookupLinkTextISS + "</a> | ")
}
document.write("");
var lookupLinkTextNR;
var linkTabindexNR;
if ( ahdtop.cstUsingScreenReader ) {
if ("$env.NX_OTB_MARKET" == "itil") {
lookupLinkTextNR = "Look up Configuration Item"
} else {
lookupLinkTextNR = "Look up Asset"
}
linkTabindexNR = "";
}
else {
if ("$env.NX_OTB_MARKET" == "itil") {
lookupLinkTextNR = " Configuration Item"
} else {
lookupLinkTextNR = " Asset"
}
linkTabindexNR = " tabindex=" + (++_dtl.tabIndex);
write_img_link("$CAisd/img/lookup.gif", "NR", "SET.linkItem", "INSERT_FORM", "", "Find NR", 0);
}
document.write("<a class=lookup" + linkTabindexNR + " style='font-size:1.0em;' href='javascript:void(0)' onClick=\"popup_search('NR','SET.linkItem', 'INSERT_FORM', , 0);return false\">" + lookupLinkTextNR + "</a> | ")
var linktextIdText = detailNextID(1,true);
var linktextID = _dtl.currID;
document.write(" \n"+
"");
var text = "| " +
"Link Destination" +
" | " +
"<label for='" +
linktextID + "'>Link Text</label> | " +
"" +
"| "+
" | " +
"<input" + linktextIdText + " type=text size=60 name=" +
linktextID + " value=> | ";
document.write(text);
document.write(" ");
ImgBtnCreate("InsertItem", "Insert Link", "javascript:do_insert()", false, 0);
document.write(" | ");
</script>
</tr>
<script type="text/javascript">
// To capture persid of returned item
var curPersid = "";
function backfill_event(momform, field_name, what2fill,
persid, rel_attr_val)
{
if ( field_name == "SET.linkItem" &&
typeof persid == "string" && persid.length > 0 ) {
var commonName = document.getElementById("SET.linkItem").value;
ImgBtnEnableButton("InsertItem");
curPersid = persid;
var currId = persid.substring(3);
var obj = persid.substring(0,2);
document.getElementById("SET.linkItem").value = currId;
document.getElementById("obj_flag").value = obj;
if ( obj == "KD") {
document.getElementById("linkitemID").innerHTML = "Doc " + currId;
} else {
var obj_desc = "";
switch ( obj ) {
case "cr" :
obj_desc = "Req/Inc/Prb ";
break;
case "ch" :
obj_desc = "Change ";
break;
case "is" :
obj_desc = "Issue ";
break;
case "nr" :
obj_desc = "Config. Item ";
break;
}
document.getElementById("linkitemID").innerHTML = obj_desc + commonName;
}
var e = document.getElementById(linktextID);
e.value = commonName;
e.focus();
}
}
// Inserts and HTML link into the announcement text
function do_insert()
{
if (null != curPersid && curPersid.length > 0) {
var key_val = document.getElementById(linktextID).value;
if (typeof key_val == "undefined" ||
key_val == null ||
key_val.length <= 0) {
alert(msgtext(727));
return;
}
var el_text = findElem("SET.text");
var doc_id = curPersid.match(/[0-9]+/);
if (document.getElementById("obj_flag").value == "KD") {
var link_txt = "<A HREF=\"javascript:OpenDocumentViewer(" + doc_id + ", 2);\">";
} else {
var link_txt = "<A HREF=\"javascript:showDetailWithPersid('" + curPersid + "');\">";
}
link_txt += key_val + "</a>";
el_text.value = el_text.value + link_txt;
}
}
</script>
</pdm_form>
|