Custom PL
Custom PL
Custom PL
CustomPostload) == "undefined")
{
Namespace('SiebelAppFacade.CustomPostload');
(function()
{
SiebelApp.EventManager.addListner("postload", OnPostload, this);
/*JJOB 6/8/15:Code to focus on the top applet*/
function OnPostload()
{
//jjob: 29 march 16:to display msg for non portal users
if (SiebelApp.S_App.GetAppName() === "Siebel HTIM PRM" &&
theApplication().GetProfileAttr("Primary Responsibility Name") == "ZEB Deny Portal
Access")
{
$("#_sweview").replaceWith("<font size='20'>You are not authorized
to use this site. For assistance, please contact your Partner Interaction Center
representative at <a href= 'http://www.zebra.com/partnerinteractioncenter'
target='_blank'>www.zebra.com/partnerinteractioncenter </a>. Thank you. </font>");
setTimeout(function()
{
$("#quickcartview").remove(); //KABHISHEK 12th April Code to
remove the Live Cart Display for this case.
}, 250);
}
//end of code jjob
$("#_sweview").scrollTop(0);
//jjob 18/jan/15:getting base url
var baseurl = window.location.href.split("?")[0];
baseurl = baseurl.replace("start.swe", "");
$(".ui-jqgrid-view").find("tr").find("td").css("border-color",
"#B8B8B8"); /*JJOB 27/oct/15:added for prod hot fix*/
$(".ui-jqgrid-view").find("tr").find("td").css("text-align",
"left"); /*JJOB 27/oct/15:added for prod hot fix*/
$(".ui-jqgrid-view").find("th").find("div").css("text-align",
"left"); /*jjob branding added*/
$(".ui-jqgrid-view").find("th").find("div").css("background-color",
"#F8F8F8"); /*jjob branding added*/
$(".zeb_home_img1").find("img").css("display", "none"); /*jjob branding
added*/
//jjob 2/sep/16: Msg on Homepage
var repairdiv = "";
if (SiebelApp.S_App.GetActiveView().GetName() === "Home Page View
(SCW)")
{
$("#_sweview").css("overflow","auto");
if(theApplication().GetProfileAttr("Org.Parent Organization
Name") === "Zebra NALA")
{
repairdiv = "<div id='repairdiv'
style='float:left;padding:15px;border-bottom:1px solid #ccc;width:84%;font-
size:30px;color:red;'>Remember to provide your Support Service renewal POs in a
timely manner to avoid Service Continuity Fees. </br></br> Effective for contracts
that expire in November 2016, POs submitted late will need to include the
additional fee for reactivation.</div>";
}
else if(theApplication().GetProfileAttr("Org.Parent
Organization Name") === "Zebra EMEA" || theApplication().GetProfileAttr("Org.Parent
Organization Name") === "Zebra APAC USD" ||
theApplication().GetProfileAttr("Org.Parent Organization Name") === "Zebra APAC
RMB")
{
repairdiv = "<div id='repairdiv'
style='float:left;padding:15px;border-bottom:1px solid #ccc;width:84%;font-
size:30px;color:red;'>Remember to provide your Support Service renewal POs in a
timely manner to avoid Service Continuity Fees. </br></br> Effective for contracts
that expire in October 2016, POs submitted late will need to include the
additional fee for reactivation.</div>";
}
$(repairdiv).insertBefore($
("div[class='zeb_home_rightlogo']"));
}
//jjob 2/sep/16:msg on product availability for nala users
var prodavail = "<div id='prodavail'
style='float:left;padding:15px;border-bottom:1px solid #ccc;width:84%;font-
size:15px;color:red;'>Valued Customers and Partners</br> Please note, if an order
is placed directly with Zebra the pricing may be different than displayed in the
quote. The actual pricing will be displayed when placing the order.</div>";
if (SiebelApp.S_App.GetActiveView().GetName() === "ZEB Portal Price &
Availability Check View")
{
$("#_sweview").css("overflow","auto");
if(theApplication().GetProfileAttr("Org.Parent Organization
Name") === "Zebra NALA")
{
var inPS = SiebelApp.S_App.NewPropertySet();
var outPS = SiebelApp.S_App.NewPropertySet();
var pAccntId = SiebelApp.S_App.GetProfileAttr("Primary Account
Id");
inPS.SetProperty("paccntid", pAccntId);
outPS = SiebelApp.S_App.GetService("Zeb Open UI
Utility").InvokeMethod('ProdAvailability', inPS);
var ppCount = outPS.childArray[0].propArray.ppCount;
debugger;
if(ppCount >= 1)
{
$(prodavail).insertBefore($
("div[class='zeb_prodavail_1container']"));
}
}
}
//SSINGH: END
}
if (SiebelApp.S_App.GetActiveView().GetName() === "ZEB Portal RMA
Contract Agreement List Detail View")
{
debugger;
setTimeout(function()
{
$("#quickcartview").remove(); //KABHISHEK 12th April Code to
remove the Live Cart Display for this case.
}, 250);
//DISABLING MENU BUTTON IN ALL APPLET.
$("div[title='Assets List
Applet']").find("div[class='AppletButtons siebui-applet-buttons']").insertAfter($
("div[title='Assets List Applet']").find("div[id*='pager']"));
$("div[title='Line Items List
Applet']").find("div[class='AppletButtons siebui-applet-buttons']").insertAfter($
("div[title='Line Items List Applet']").find("div[id*='pager']"));
$("div[title='Contracts Form
Applet']").find("input").css("height","25px");
$("div[title='Contracts Form
Applet']").find("input").css("padding", "5px");
$("div[title='Contracts Form
Applet']").find("input").css("border-radius", "2px");
$("div[title='Contracts Form
Applet']").find("div[class='mceGridLabel siebui-label mceLabel']").css("font-
weight", "300 !important");
$("div[title='Contracts Form
Applet']").find("div[class='mceGridLabel siebui-label mceLabel']").css("font-
style", "italic !important");
$("div[title='Contracts Form
Applet']").find("span[class='mceGridLabel siebui-label mceLabel']").css("font-
weight", "300 !important");
$("div[title='Contracts Form
Applet']").find("span[class='mceGridLabel siebui-label mceLabel']").css("font-
style", "italic !important");
$("#s_vctrl_div").remove();
$("div[title='eContract
Creation']").find("span[id*='Label']").css("color", "#004785 !important");
$("div[title='eContract
Creation']").find("span[id*='Label']").css("font-weight", "900");
$("div[title='Add Contract SKU Form Applet']").toggle();
$("div[title='Line Items List Applet']").toggle();
$("div[title='Quick Add Asset Form Applet']").toggle();
$("div[title='Assets List Applet']").toggle();
$("div[title='Line Items Tile List Applet']").toggle();
if ($("input[aria-label='Reseller
Email']").val().length === 0)
{
var REMailErrorMsg = "<div id='REMailErrorMsg'
style='width:100%;height:none;color:red;font-size:18px;'></div>";
$(REMailErrorMsg).insertAfter($
("div[title='Contracts Form Applet']" + ' button[title="Contracts:Next"]'));
$("#REMailErrorMsg").text("Reseller Email is
required.");
}
/*else if ($("input[aria-label='End User Account
Number']").val().length === 0)
{
var EUNumErrorMsg = "<div id='EUNumErrorMsg'
style='width:100%;height:none;color:red;font-size:18px;'></div>";
$(EUNumErrorMsg).insertAfter($
("div[title='Contracts Form Applet']" + ' button[title="Contracts:Next"]'));
$("#EUNumErrorMsg").text("End User Account
Number is required.");
}*/
else if ($("input[aria-label='End User
Email']").val().length === 0)
{
var EUEmailErrorMsg = "<div
id='EUEmailErrorMsg' style='width:100%;height:none;color:red;font-
size:18px;'></div>";
$(EUEmailErrorMsg).insertAfter($
("div[title='Contracts Form Applet']" + ' button[title="Contracts:Next"]'));
$("#EUEmailErrorMsg").text("End User Email is
required.");
}
else if($("input[aria-label='End User
Country']").val().length === 0)
{
var EUCErrorMsg = "<div id='EUCErrorMsg'
style='width:100%;height:none;color:red;font-size:18px;'></div>";
$(EUCErrorMsg).insertAfter($
("div[title='Contracts Form Applet']" + ' button[title="Contracts:Next"]'));
$("#EUCErrorMsg").text("End User Country is
required.");
}
else if($("input[aria-label='PO
Number']").val().length === 0)
{
var PONumErrorMsg = "<div id='PONumErrorMsg'
style='width:100%;height:none;color:red;font-size:18px;'></div>";
$(PONumErrorMsg).insertAfter($
("div[title='Contracts Form Applet']" + ' button[title="Contracts:Next"]'));
$("#PONumErrorMsg").text("Purchase Order Number
is required.");
}
else
{
if ($("input[aria-label='Reseller
Email']").val().length !== 0)
{
//Replacing all comma and space with ; since it will
be passed to outbound communication manager
var EmailAddresses = new Array();
var wrongFlag = "N";
var EmailList = $("input[aria-label='Reseller
Email']").val();
var mailerrorLabel;
mailerrorLabel = document.createElement('label');
mailerrorLabel.innerHTML = "";
$(mailerrorLabel).css('color','red');
$(mailerrorLabel).css('font-weight','bolder');
$(mailerrorLabel).css('position','relative');
$(mailerrorLabel).css('bottom','10px');
$(mailerrorLabel).css('right','150px');
var mailerrorLabel1;
mailerrorLabel1 = document.createElement('label1');
mailerrorLabel1.innerHTML = "";
$(mailerrorLabel1).css('color','red');
$(mailerrorLabel1).css('font-weight','bolder');
$(mailerrorLabel1).css('position','relative');
$(mailerrorLabel1).css('bottom','10px');
$(mailerrorLabel1).css('right','150px');
}
}
}
}
}
});
$("div[title='Assets List
Applet']").find("div[class='ui-jqgrid-bdiv']").css("height", AssetItemheight_bdiv);
$("div[title='Assets List Applet']").find("div[class='ui-
jqgrid-bdiv']").css("width", sweViewWidth);
});
$("div[title='Assets List Applet']" + '
button[title="Assets:Previous"]').click(function()
{
$("div[title='Line Items List
Applet']").find("table[class='ui-jqgrid-htable']").css("width", sweViewWidth);
$("div[title='Line Items List Applet']").find("table[class='ui-
jqgrid-btable']").css("width", sweViewWidth);
$("div[title='Line Items List
Applet']").find("div[class='ui-jqgrid-bdiv']").css("height",
ContractItemheight_bdiv);
$("div[title='Line Items List Applet']").find("div[class='ui-
jqgrid-bdiv']").css("width", sweViewWidth);
$("div[title='Contracts Form
Applet']").find("input").css("height","25px");
$("div[title='Contracts Form
Applet']").find("input").css("padding", "5px");
$("div[title='Contracts Form
Applet']").find("input").css("border-radius", "2px");
$("div[title='Contracts Form
Applet']").find("button[title='Contracts:Next']").remove();
$("div[title='eContract
Creation']").find("span[id*='Label']").css("color", "#004785 !important");
$("div[title='eContract
Creation']").find("span[id*='Label']").css("font-weight", "900");
}
if (SiebelApp.S_App.GetActiveView().GetName() === "ZEB RMA Portal
Review View")
{
setTimeout(function()
{
$("#quickcartview").remove(); //KABHISHEK 12th April Code to
remove the Live Cart Display for this case.
}, 250);
debugger;
var searchtip = "<div id='searchtip'><font
size='2'><style='float:right;'>-You can execute wildcard searches using the '*'
character.<br>-You can enter range searches on Repair Order Date by using the '<'
or '> character. Example >'05/06/2011' <br>-All fields are case
sensitive.</font></div>";
$(searchtip).insertAfter($(".siebui-screen-hp-
title").parent());
//$(searchtip).insertAfter("button[aria-label='Search
Repairs:Go']");
$("div[title='Search Repairs Form
Applet']").find("button[class='siebui-appletmenu-btn']").hide();
$("div[title='Search Repairs Form Applet']").css("margin-top",
"1%");
$("div[title='ZEB Portal RMA Repair Review Applet List
Applet']").css("margin-top", "1%");
// $(".siebui-btn-grp-applet").remove();
//$("#s_vis_div").replaceWith("<font size='5px'>Assets</font>");
$("div[title='Search Repairs Form Applet']").css("border-radius",
"15px");
$("div[title='ZEB Portal RMA Repair Review Applet List
Applet']").find("div[class='siebui-applet-header siebui-collapsible AppletButtons
siebui-form-applet-header siebui-collapsible-applet-header']").remove();
//$("div[title=' Form Applet']").css("margin-top", "1%");
// $(".siebui-btn-grp-applet").remove();
//$("#s_vis_div").replaceWith("<font size='5px'>Assets</font>");
$("div[title='ZEB Portal RMA Repair Review Applet List
Applet']").css("border-radius", "15px");
//$("div[title='ZEB Portal RMA Repair Review Applet List
Applet']").toggle();
var check = $("div[title='Search Repairs Form
Applet']").find("input[aria-label='Order Number']").val();
if ($("div[title='Search Repairs Form Applet']").find("input[aria-
label='Order Number']").val() === "" && $("div[title='Search Repairs Form
Applet']").find("input[aria-label='Serial Number']").val() === "" && $
("div[title='Search Repairs Form Applet']").find("input[aria-
label='Product']").val() === "" && $("div[title='Search Repairs Form
Applet']").find("input[aria-label='PO']").val() === "")
{
$("div[title='ZEB Portal RMA Repair Review Applet List
Applet']").hide();
$("div[title='Search Repairs Form
Applet']").find("span[id*='Label']").css("color", "#004785 !important");
}
else
{
$("div[title='ZEB Portal RMA Repair Review Applet List
Applet']").show();
$("div[title='ZEB Portal RMA Repair Review Applet List
Applet']").find("div[class='ui-jqgrid-bdiv']").css("height", "auto");
$("div[title='ZEB Portal RMA Repair Review Applet List
Applet']").find("div[class='ui-jqgrid-bdiv']").css("overflow-x", "hidden");
$("div[title='Search Repairs Form Applet']").hide();
}
$("div[title='Search Repairs Form
Applet']").find("span[id*='Label']").css("font-size", "medium");
$("div[title='Search Repairs Form
Applet']").find("input[aria-labelledby*='Label']").css("font-size", "medium");
$("div[title='Search Repairs Form
Applet']").find("input[aria-labelledby*='Label']").css("width", "100%");
}
if (SiebelApp.S_App.GetActiveView().GetName() === "ZEB Portal Asset
Mgmt - Entitlements View")
{
setTimeout(function()
{
$("#quickcartview").remove(); //KABHISHEK 12th April Code to
remove the Live Cart Display for this case.
}, 250);
debugger;
$("div[title=' Form
Applet']").find("input[readonly='readonly']").css("border", "hidden");
$("div[title=' Form
Applet']").find("input[readonly='readonly']").parent().find("span[id*='icon']").rem
ove();
$("div[title=' Form
Applet']").find("span[id*='HTML_FormSection_Label']").css("background", "#E5E8E8");
$("div[title=' Form Applet']").find("button[class='siebui-
appletmenu-btn']").hide();
$("div[title=' Form Applet']").css("margin-top", "1%");
$("div[title=' Form
Applet']").find("span[id*='Label']").css("color", "#004785 !important");
$("div[title=' Form Applet']").find("span[id*='Label']").css("font-
weight", "900");
// $(".siebui-btn-grp-applet").remove();
//$("#s_vis_div").replaceWith("<font size='5px'>Assets</font>");
$("div[title=' Form Applet']").css("border-radius", "15px");
$("div[title='Entitlements List
Applet']").find("button[title='Entitlements Menu']").hide();
$("div[title='Entitlements List
Applet']").find("button[title='Entitlements:Query']").hide();
//$("div[title=' Form Applet']").css("margin-top", "1%");
// $(".siebui-btn-grp-applet").remove();
//$("#s_vis_div").replaceWith("<font size='5px'>Assets</font>");
$("div[title='Entitlements List Applet']").css("border-radius",
"15px");
}
if (SiebelApp.S_App.GetActiveView().GetName() === "ZEB Portal Service
Contract List View")
{
setTimeout(function()
{
$("#quickcartview").remove(); //KABHISHEK 12th April Code to
remove the Live Cart Display for this case.
}, 250);
debugger;
$("button[title='Contract Menu']").hide();
$("div[title='Contract List Applet']").css("margin-top", "1%");
//$(".siebui-btn-grp-applet").remove();
$("#s_vis_div").replaceWith("<font size='5px'>Contracts</font>");
$("div[title='Contract List Applet']").css("border-radius",
"15px");
}
if (SiebelApp.S_App.GetActiveView().GetName() === "ZEB RMA Portal List
View")
{
setTimeout(function()
{
$("#quickcartview").remove(); //KABHISHEK 12th April Code to
remove the Live Cart Display for this case.
}, 250);
debugger;
$("button[title='Shopping Cart Menu']").hide();
$("div[title='My RMAs List Applet']").css("margin-top", "1%");
$(".siebui-btn-grp-applet").remove();
$("#s_vis_div").replaceWith("<font size='5px'>My Repair
Orders</font>");
$("div[title='My RMAs List Applet']").css("border-radius", "15px");
}
if (SiebelApp.S_App.GetActiveView().GetName() === "ZEB RMA Portal
Detail View")
{
debugger;
setTimeout(function()
{
$("#quickcartview").remove(); //KABHISHEK 12th April Code to
remove the Live Cart Display for this case.
}, 250);
$("input[aria-label='ErrorMsg']").val("");
$("div[title='Quick Add Serial Number Form
Applet']").find("input").val("");
$("div[title='Quick Add Serial Number Form
Applet']").find("textarea").val("");
$("div[title='ZEB RMA Dispute Form Applet Form
Applet']").parent().css("height", "0px"); //jjob:13/june/16: to remove bottom extra
space from detail view
var linediv_height = $("div[title='Line Items List
Applet']").parent().css("height");
var lineitemheight_gridview = $("div[title='Line Items List
Applet']").find("div[class='ui-jqgrid-view']").css("height");
var lineitemwidth_gridview = $("div[title='Line Items List
Applet']").find("div[class='ui-jqgrid-view']").css("width");
var lineitemheight_bdiv = $("div[title='Line Items List
Applet']").find("div[class='ui-jqgrid-bdiv']").css("height");
var lineitemwidth_bdiv = $("div[title='Line Items List
Applet']").find("div[class='ui-jqgrid-bdiv']").css("width");
var lineitemheight_hdiv = $("div[title='Line Items List
Applet']").find("div[class*='ui-jqgrid-hdiv']").css("height");
var lineitemwidth_hdiv = $("div[title='Line Items List
Applet']").find("div[class*='ui-jqgrid-hdiv']").css("width");
var lineitemheight_pager = $("div[title='Line Items List
Applet']").find("div[class*='pager']").css("height");
var lineitemwidth_pager = $("div[title='Line Items List
Applet']").find("div[class*='pager']").css("width");
var lineitemwidth_pagercontrol = $("div[title='Line Items List
Applet']").find("div[class='ui-pager-control']").css("width");
var lineitemwidth_divheight = $("div[title='Line Items List
Applet']").find("div[class='ui-jqgrid ui-widget ui-widget-content ui-corner-
all']").css("height");
$("div[title='ZEB RMA Dispute Form Applet Form
Applet']").find("input[aria-label='Job Type']").parent().hide();
$("div[title='Line Items List Applet']").find("button[title='Line
Items:Empty Cart']").removeAttr("disabled");
$("div[title='Line Items List Applet']").find("button[title='Line
Items:Delete Line']").removeAttr("disabled");
$("div[title='Line Items List Applet']").find("button[title='Line
Items:Bulk Load']").removeAttr("disabled");
var POErrorMsg = "<div id='poerrormsg'
style='width:100%;height:none;color:red;font-size:18px;'></div>";
$(POErrorMsg).insertAfter($("div[title='RMA Form Applet']" + '
button[title="RMA:Next"]'));
var DisputeErrorMsg = "<div id='disperrormsg'
style='width:100%;height:none;color:red;font-size:18px;'></div>";
//$(DisputeErrorMsg).insertAfter($("div[title='Quick Add Serial
Number Form Applet']" + ' button[aria-label="Quick Add Serial Number:Add Item to
Cart"]'));
$(DisputeErrorMsg).insertAfter("div[title='Quick Add Serial Number
Form Applet']");
$("div[title='ZEB RMA Dispute Form Applet Form
Applet']").find("span[id*='Label']").css("color", "#004785 !important");
$("div[title='ZEB RMA Dispute Form Applet Form
Applet']").find("span[id*='Label']").css("font-weight", "900");
$("div[title='ZEB RMA Dispute Form Applet Form
Applet']").find("span[id='LabelProbDesc_Label']").parent().css("background",
"#ccc");
$("div[title='ZEB RMA Dispute Form Applet Form
Applet']").find("span[id='LabelDispute_Label']").parent().css("background",
"#ccc");
$("div[title='RMA Form Applet']").css("border-radius", "15px");
$("div[title='Line Items List Applet']").css("width", "75%");
//var listheight=$("div[title='Line Items List
Applet']").find("div[class='ui-jqgrid-bdiv']").css("height");
var listheight = $("div[title='Line Items List
Applet']").css("height");
$("div[title='ZEB RMA Dispute Form Applet Form
Applet']").css("height", listheight);
$("div[title='ZEB RMA Dispute Form Applet Form
Applet']").css("width", "22%");
$("div[title='ZEB RMA Dispute Form Applet Form
Applet']").css("position", "relative");
$("div[title='ZEB RMA Dispute Form Applet Form
Applet']").css("left", "76%");
$("div[title='ZEB RMA Dispute Form Applet Form
Applet']").css("bottom", "480px");
$("div[title='ZEB RMA Dispute Form Applet Form
Applet']").css("border-radius", "15px");
$("div[title='ZEB RMA Dispute Form Applet Form
Applet']").css("background", "#F6F6F6");
$("div[title='ZEB RMA Dispute Form Applet Form
Applet']").css("border", "1px solid #D0E4F3");
//$("div[title='ZEB RMA Dispute Form Applet Form
Applet']").insertAfter($("div[title='Quick Add Serial Number Form Applet']"));
$("button[title='Line Items:Dispute Reason']").remove();
$("button[title='ZEB RMA Dispute Form Applet Menu']").remove();
$("div[title='ZEB RMA Dispute Form Applet Form
Applet']").find("span[class='siebui-row-counter']").remove();
//$("div[title='ZEB RMA Dispute Form Applet Form
Applet']").find("div[class*='siebui-applet-header siebui-collapsible AppletButtons
siebui-form-applet-header siebui-collapsible-applet-header']").remove();
//$("div[title='ZEB RMA Dispute Form Applet Form
Applet']").find("div[class*='title']").remove();
debugger;
var OrderLine =
SiebelApp.S_App.GetActiveBusObj().GetBusCompByName("Order Entry - Line
Items").GetFieldValue("ZEB Calc Oracle Line Number");
var OrderId =
SiebelApp.S_App.GetActiveBusObj().GetBusCompByName("Order Entry -
Orders").GetFieldValue("Id");
$("div[title='ZEB RMA Dispute Form Applet Form
Applet']").find("div[class*='title']").text("Line # " + OrderLine + " details");
$("div[title='Line Items List Applet']").css("border-radius",
"15px");
$("div[title='Quick Add Serial Number Form Applet']").css("border-
radius", "10px");
$("div[title='Line Items List
Applet']").find("div[class='AppletButtons siebui-applet-buttons']").insertAfter($
("div[title='Line Items List Applet']").find("div[id*='pager']"));
/* $("div[title='Line Items List
Applet']").find("button[title='Line Items:Next']").insertAfter($("div[title='Line
Items List Applet']").find("div[id*='pager']"));
$("div[title='Line Items List Applet']").find("button[title='Line
Items:Empty Cart']").insertAfter($("div[title='Line Items List
Applet']").find("div[id*='pager']"));
$("div[title='Line Items List Applet']").find("button[title='Line
Items:Delete Line']").insertAfter($("div[title='Line Items List
Applet']").find("div[id*='pager']"));
$("div[title='Line Items List Applet']").find("button[title='Line
Items:Bulk Load']").insertAfter($("div[title='Line Items List
Applet']").find("div[id*='pager']"));*/
//$("div[title='Line Items List Applet']").find("button[title='Line
Items:Dispute Reason']").insertAfter($("div[title='Line Items List
Applet']").find("div[id*='pager']"));
$("div[title='Line Items List Applet']").find("div[class='siebui-
btn-grp-applet']").remove();
$("#s_vctrl_div").remove();
$("button[title='Shopping Cart Menu']").hide();
$("text[id='subtext']").hide();
$("#subtext").remove();
$("div[title='Line Items List
Applet']").find("button").css("margin-right", "5px");
$("div[title='RMA Form Applet']").find("button").css("margin-left",
"5px");
//$("div[title='RMA Form Applet']").find("div[class='siebui-applet-
header siebui-collapsible AppletButtons siebui-form-applet-header siebui-
collapsible-applet-header']").remove();
$("div[title='RMA Form Applet']").find("input[aria-
readonly='true']").css("border", "none");
$("div[title='RMA Form Applet']").find("input[aria-
readonly='true']").parent().find("span[id*='icon']").css("border", "hidden");
$("div[title='RMA Form Applet']").find("input[aria-
readonly='true']").parent().find("span[id*='icon']").remove();
$("div[title='RMA Form
Applet']").find("span[id*='Label']").css("color", "#004785 !important");
$("div[title='RMA Form
Applet']").find("span[id*='Label']").css("font-weight", "900");
$("div[title='RMA Form Applet']").find("div[class='siebui-btn-grp-
applet']").remove();
$("div[title='RMA Form
Applet']").parent().parent().parent().find("ul").remove();
$("div[title='Line Items List Applet']").find("button[title='Line
Items:Save']").remove();
$("div[title='Line Items List Applet']").find("button[title='Line
Items:Query']").remove();
$("div[title='Line Detail Form Applet']").find("div[class='siebui-
btn-grp-applet']").remove();
$("div[title='Line Items List Applet']" + ' button[title="Line
Items:Dispute Reason"]').click(function()
{
$("div[title='ZEB RMA Dispute Details Applet Form
Applet']").find("div[class='siebui-applet-header siebui-collapsible AppletButtons
siebui-form-applet-header siebui-collapsible-applet-header']").hide();
});
var subtext = '<text id="subtext" type="text" title="subtext">
<font color="#004785"> (Please click this after entering line
items)</font></text>';
$(subtext).insertAfter($("div[title='RMA Form
Applet']").find("button[title='RMA:Submit']"));
$("div[title='Add Product Form Applet']").find("button[title='Add
Product Menu']").remove();
$("div[title='RMA Form Applet']").toggle();
$("div[title='Line Items List Applet']" + ' button[title="Line
Items:Next"]').click(function()
{
debugger;
/* if($("td[id*='CxTotal']").text() === "$1.00"){}else{
$
("span[id='Purchase_Order_#_Label']").parent().parent().parent().hide();
$("#FrightLbl_Label").parent().hide();
}*/
$("div[title='Line Items List
Applet']").find("button[title='Line Items:Empty Cart']").attr("disabled",
"disabled");
$("div[title='Line Items List
Applet']").find("button[title='Line Items:Delete Line']").attr("disabled",
"disabled");
$("div[title='Line Items List
Applet']").find("button[title='Line Items:Bulk Load']").attr("disabled",
"disabled");
$("#poerrormsg").text("");
// $("td[id='1NRC_CxTotal']").text("$1.00");
var inPS = SiebelApp.S_App.NewPropertySet();
var outPS = SiebelApp.S_App.NewPropertySet();
inPS.SetProperty("OrderId", OrderId);
outPS = SiebelApp.S_App.GetService("Zeb Open UI
Utility").InvokeMethod('CheckDispute', inPS);
var errorLine = outPS.childArray[0].propArray.psErrorLine;
//var errorLinePD =
outPS.childArray[0].propArray.psErrorLinePD;
var error = outPS.childArray[0].propArray.psError;
var LinePrice = outPS.childArray[0].propArray.psLinePrice;
var LineProbType = outPS.childArray[0].propArray.psPTLine;
var NoLine = outPS.childArray[0].propArray.psNoLine;
SiebelJS.Log("check this");
SiebelJS.Log(outPS);
SiebelJS.Log(errorLine);
SiebelJS.Log(error);
SiebelJS.Log(LinePrice);
//if (errorLine === "" && LineProbType === "" && NoLine === "")
{
if (error === "")
{
$("div[title='RMA Form Applet']").find("div[class='siebui-
applet-header siebui-collapsible AppletButtons siebui-form-applet-header siebui-
collapsible-applet-header']").replaceWith("<font size='5px'>Proceed to
Checkout<br></font><div id='temp001'> <ul class='breadcrumb breadcrumb1
breadcrumb2'><li><a href='#'>Add Serial Number</a></li><li><a href='#'>Manage
Shipping Information</a></li><li><a href='#'>Review Order</a></li><li><a
href='#'>Confirm Order</a></li></ul></div>");
//SHIPPING MANAGE PAGE
$("#disperrormsg").text("");
$("div[title='Line Items List Applet']").toggle();
$("div[title='Quick Add Serial Number Form
Applet']").toggle();
$("div[title='RMA Form Applet']").toggle();
$("div[title='ZEB RMA Dispute Form Applet Form
Applet']").toggle();
if (LinePrice.search("1") !== -1 || LinePrice.search("2") !
== -1 || LinePrice.search("3") !== -1 || LinePrice.search("4") !== -1 ||
LinePrice.search("5") !== -1 || LinePrice.search("6") !== -1 ||
LinePrice.search("7") !== -1 || LinePrice.search("8") !== -1 ||
LinePrice.search("9") !== -1)
{
$
("span[id='Purchase_Order_#_Label']").parent().parent().parent().show();
$("#FrightLbl_Label").parent().show();
}
else
{
$
("span[id='Purchase_Order_#_Label']").parent().parent().parent().hide();
$("#FrightLbl_Label").parent().hide();
}
}
else
{
$("#disperrormsg").text(error);
$("div[title='Line Items List
Applet']").find("button[title='Line Items:Empty Cart']").removeAttr("disabled");
$("div[title='Line Items List
Applet']").find("button[title='Line Items:Delete Line']").removeAttr("disabled");
$("div[title='Line Items List
Applet']").find("button[title='Line Items:Bulk Load']").removeAttr("disabled");
}
});
var btnSeeLine = '<button id="PREV_CTRL" class="appletButton"
type="button" title="PrevStep">Previous</button>';
$(btnSeeLine).insertBefore($("div[title='RMA Form Applet']
button[title='RMA:Next']"));
$("div[title='RMA Form Applet']" + '
button[title="PrevStep"]').click(function()
{
debugger;
$("#poerrormsg").text("");
$("#disperrormsg").text("");
$("input[aria-label='ErrorMsg']").val("");
//jjob :refresh issue
$("div[title='Line Items List Applet']").find("div[class='ui-
jqgrid-bdiv']").css("height", lineitemheight_bdiv);
$("div[title='Line Items List Applet']").find("div[class='ui-
jqgrid-bdiv']").css("width", lineitemwidth_bdiv);
//$("div[title='Line Items List
Applet']").find("div[class*='ui-jqgrid-hdiv']").css("height", lineitemheight_hdiv);
$("div[title='Line Items List Applet']").find("div[class*='ui-
jqgrid-hdiv']").css("width", lineitemwidth_hdiv);
$("div[title='Line Items List Applet']").find("div[class='ui-
jqgrid-view']").css("height", lineitemheight_gridview);
$("div[title='Line Items List
Applet']").find("div[class*='pager']").css("height", lineitemheight_pager);
$("div[title='Line Items List
Applet']").find("div[class*='pager']").css("width", lineitemwidth_pager);
$("div[title='Line Items List Applet']").find("div[class='ui-
pager-control']").css("width", "75%");
$("div[title='Line Items List Applet']").find("div[class='ui-
pager-control']").css("overflow-x", "auto");
$("div[title='Line Items List Applet']").find("div[class='ui-
jqgrid ui-widget ui-widget-content ui-corner-all']").css("width",
lineitemwidth_bdiv);
$("div[title='Line Items List
Applet']").find("button[title='Line Items:Empty Cart']").removeAttr("disabled");
$("div[title='Line Items List
Applet']").find("button[title='Line Items:Delete Line']").removeAttr("disabled");
$("div[title='Line Items List
Applet']").find("button[title='Line Items:Bulk Load']").removeAttr("disabled");
$("div[title='Line Items List Applet']").toggle();
$("div[title='Quick Add Serial Number Form Applet']").toggle();
$("div[title='RMA Form Applet']").toggle();
$("div[title='ZEB RMA Dispute Form Applet Form
Applet']").toggle();
});
$("div[title='RMA Form
Applet']").find("span[id*='Lbl']").parent().css("height", "25px");
$("div[title='RMA Form
Applet']").find("span[id*='Lbl']").parent().css("width", "1000px");
$("div[title='RMA Form
Applet']").find("span[id*='Lbl']").parent().css("background", "#ccc");
$("div[title='RMA Form
Applet']").find("span[id*='Lbl']").parent().css("border-radius", "2px");
$("div[title='RMA Form
Applet']").find("span[id*='Lbl']").css("padding", "10px");
$("div[title='RMA Form
Applet']").find("span[id*='Lbl']").css("font-size", "medium");
$("div[title='RMA Form Applet']").find("input").css("height",
"40px");
$("div[title='RMA Form Applet']").find("input").css("width",
"500px");
$("div[title='RMA Form Applet']").find("input").css("border-
radius", "2px");
$("div[title='RMA Form Applet']").find("input").css("padding",
"5px");
//
$("div[title='Quick Add Serial Number Form
Applet']").find("span[id*='EnterItem_Label']").parent().css("height", "25px");
$("div[title='Quick Add Serial Number Form
Applet']").find("span[id*='EnterItem_Label']").parent().css("background", "#ccc");
$("div[title='Quick Add Serial Number Form
Applet']").find("span[id*='EnterItem_Label']").parent().css("border-radius",
"2px");
$("div[title='Quick Add Serial Number Form
Applet']").find("span[id*='EnterItem_Label']").css("font-size", "medium");
$("div[title='Quick Add Serial Number Form
Applet']").find("input").css("height", "25px");
$("div[title='Quick Add Serial Number Form
Applet']").find("input").css("border-radius", "2px");
$("div[title='Quick Add Serial Number Form
Applet']").find("input").css("padding", "5px");
$("div[title='Quick Add Serial Number Form
Applet']").find("input[aria-label='ErrorMsg']").css("border-style", "hidden");
$("div[title='Quick Add Serial Number Form
Applet']").find("div[class='siebui-applet-header siebui-collapsible AppletButtons
siebui-form-applet-header siebui-collapsible-applet-header']").replaceWith("<font
size='5px'>Proceed to Checkout<br></font><div id='temp001'> <ul class='breadcrumb
breadcrumb1'><li><a href='#'>Add Serial Number</a></li><li><a href='#'>Manage
Shipping Information</a></li><li><a href='#'>Review Order</a></li><li><a
href='#'>Confirm Order</a></li></ul></div>");
//ADD SERIAL NUMBER PAGE
$("div[title='Quick Add Serial Number Form Applet']").css("margin-
top", "1%");
$("div[title='Quick Add Serial Number Form
Applet']").find("span[id*='Label']").css("color", "#004785 !important");
$("div[title='Quick Add Serial Number Form
Applet']").find("span[id*='Label']").css("font-weight", "900");
$("div[title='Quick Add Serial Number Form
Applet']").find("input[aria-label='ErrorMsg']").css("color", "red");
$("div[title='Quick Add Serial Number Form
Applet']").find("input[aria-label='ErrorMsg']").css("font-size", "18px");
$("div[title='Quick Add Serial Number Form
Applet']").find("input[aria-label='Serial #']").css("border-left-color", "red");
$("div[title='Quick Add Serial Number Form
Applet']").find("input[aria-label='Serial #']").css("border-left-width", "medium");
$("div[title='Quick Add Serial Number Form
Applet']").find("input[aria-label='Problem Type']").css("border-left-color",
"red");
$("div[title='Quick Add Serial Number Form
Applet']").find("input[aria-label='Problem Type']").css("border-left-width",
"medium");
$("div[title='RMA Form Applet']" + '
button[title="RMA:Next"]').click(function()
{
debugger;
if ($
("span[id='Purchase_Order_#_Label']").parent().parent().parent().css("display") !==
"none")
{
if ($("input[aria-label='Purchase Order #']").val().length
=== 0)
{
//var POErrorMsg = "<div id='poerrormsg'
style='width:100%;height:none;'><font color='red'>Purchase Order# is
required.Please fill this in to proceed to next step.</font></div>";
//$(POErrorMsg).insertAfter($("div[title='RMA Form
Applet']" + ' button[title="RMA:Next"]'));
$("#poerrormsg").text("Purchase Order# is
required.Please fill this in to proceed to next step.")
var inPS = SiebelApp.S_App.NewPropertySet();
var outPS = SiebelApp.S_App.NewPropertySet();
outPS = SiebelApp.S_App.GetService("Zeb Open UI
Utility").InvokeMethod('RMAPOPF', inPS);
}
else
{}
}
else
{
var inPS = SiebelApp.S_App.NewPropertySet();
var outPS = SiebelApp.S_App.NewPropertySet();
inPS.SetProperty("OrderId", OrderId);
outPS = SiebelApp.S_App.GetService("Zeb Open UI
Utility").InvokeMethod('PONullify', inPS);
}
});
//
$("input[aria-
labelledby='ZEBRMADisputeEntitlement_Label']").click(function()
{
if ($("input[aria-
labelledby='ZEBRMADisputeEntitlement_Label']").attr('aria-checked') === "true")
{
$("div[title='ZEB RMA Dispute Form Applet Form
Applet']").find("span[id='ZEBRMADisputeReason_Label']").parent().parent().parent().
show();
}
else if ($("input[aria-
labelledby='ZEBRMADisputeEntitlement_Label']").attr('aria-checked') === "false")
{
$("div[title='ZEB RMA Dispute Form Applet Form
Applet']").find("span[id='ZEBRMADisputeReason_Label']").parent().parent().parent().
hide();
$("div[title='ZEB RMA Dispute Form Applet Form
Applet']").find("span[id='ZEBRMAContractNumber_Label']").parent().parent().parent()
.hide();
$("div[title='ZEB RMA Dispute Form Applet Form
Applet']").find("span[id='ZEBRMAPurchaseDate_Label']").parent().parent().parent().h
ide();
}
});
//
}
if (SiebelApp.S_App.GetActiveView().GetName() === "ZEB RMA Portal
Summary View")
{
setTimeout(function()
{
$("#quickcartview").remove(); //KABHISHEK 12th April Code to
remove the Live Cart Display for this case.
}, 250);
$("div[title='Line Items List
Applet']").find("tr[role='row']").parent().parent().parent().parent().css("height",
"auto");
$("#s_vctrl_div").hide();
$("button[title='ZEB RMA Portal Summary Applet:Goto
Orders']").parent().parent().parent().css("float", "left"); //jjob back to orders
position
$("div[title='RMA Form Applet']").css("border-radius", "10px");
$("div[title='ZEB RMA Portal Summary Applet Form
Applet']").css("border-radius", "10px");
$("div[title='Line Items List Applet']").css("border-radius",
"10px");
$("button[title='Shopping Cart Menu']").hide();
var ordernumber = $("input[aria-label='OrderNumber']").val();
$("input[aria-label='OrderNumber']").remove();
var formheight = $("div[title='RMA Form
Applet']").find("div[class='GridBorder']").css("height");
$("div[title='Attachments List Applet']").css("height",
formheight);
//$("div[title='RMA Form Applet']").css("width","130%");
//$("div[title='Attachments List Applet']").css("width","60%");
//$("div[title='Attachments List Applet']").css("float","right");
$("div[title='Line Items List Applet']").insertAfter($
("div[title='RMA Form Applet']"));
var appletwidth = $("div[title='ZEB RMA Portal Summary Applet Form
Applet']").css("width");
$("div[title='Line Items List Applet']").css("width", appletwidth);
$("div[title='Documents List Applet']").find("div[class='siebui-
btn-grp-applet']").remove();
//$("div[title='Documents List Applet']").find("div[class='siebui-
applet-header siebui-collapsible AppletButtons siebui-form-applet-header siebui-
collapsible-applet-header']").remove();
$("div[title='Documents List
Applet']").find("div[class='AppletButtons siebui-applet-buttons']").remove();
$("div[title='Documents List Applet']").find("div[class='ui-state-
default ui-jqgrid-pager ui-corner-bottom siebui-applet-footer']").remove();
$("div[title='Documents List Applet']").find("div[class='ui-jqgrid-
bdiv']").css("overflow-x", "hidden");
$("div[title='Documents List Applet']").css("overflow-x", "auto");
$("div[title='Documents List Applet']").find("button[aria-
label='Attachments:New URL']").remove();
$("div[title='Documents List
Applet']").find("span").find("input[title='Attachments:New
File']").parent().parent().remove();
/*$("div[title='RMA Form Applet']").css("width","50%");
var formwidth =$("div[title='RMA Form Applet']").css("width");
$("div[title='Attachments List Applet']").css("width","200px");
$("div[title='Attachments List Applet']").css("height", "20px");
$("div[title='Attachments List Applet']").insertBefore($
("div[title='Line Items List Applet']"));*/
$("div[title='RMA Form
Applet']").find("span[id*='_Details_Label']").parent().css("height", "25px");
$("div[title='RMA Form
Applet']").find("span[id*='_Details_Label']").parent().css("width", "1000px");
$("div[title='RMA Form
Applet']").find("span[id*='_Details_Label']").parent().css("background", "#ccc");
$("div[title='RMA Form
Applet']").find("span[id*='_Details_Label']").parent().css("border-radius", "2px");
$("div[title='RMA Form
Applet']").find("span[id*='_Details_Label']").css("font-size", "medium");
$("div[title='RMA Form Applet']").find("input").css("border",
"none");
$("div[title='RMA Form
Applet']").find("span[id*='Label']").css("color", "#004785 !important");
$("div[title='RMA Form
Applet']").find("span[id*='Label']").css("font-weight", "900");
$("div[title='RMA Form Applet']").find("div[class='siebui-btn-grp-
applet']").remove();
$("div[title='ZEB RMA Portal Summary Applet Form
Applet']").find("button[title='ZEB RMA Portal Summary Applet:Confirm
Order']").remove();
$("div[title='ZEB RMA Portal Summary Applet Form
Applet']").find("button[title='ZEB RMA Portal Summary Applet:Edit
Items']").remove();
$("div[title='Line Items List Applet']").find("div[class='siebui-
btn-grp-applet']").remove();
$("div[title='Line Items List Applet']").find("div[class='siebui-
btn-grp-search']").remove();
$("div[title='Line Items List
Applet']").find("div[class='AppletButtons siebui-applet-buttons']").remove();
$("div[title='RMA Form
Applet']").find("input").parent().find("span[id*='icon']").css("border", "hidden");
$("div[title='RMA Form
Applet']").find("input").parent().find("span[id*='icon']").remove();
$("div[title='RMA Form Applet']").find("span[class='siebui-icon-
zeb_help_order_items_update']").remove();
$("div[title='ZEB RMA Portal Summary Applet Form
Applet']").find("div[class='siebui-applet-header siebui-collapsible AppletButtons
siebui-form-applet-header siebui-collapsible-applet-header']").remove();
$("div[title='ZEB RMA Portal Summary Applet Form
Applet']").find("input[aria-label='Order Number']").remove();
$("button[title='ZEB RMA Portal Summary Applet:Shipping
Manifest']").hide();
var ordnum = $("#s_3_1_101_0_Label").text().split(" ")[0];
$("div[title='RMA Form Applet']").find("div[class='siebui-applet-
header siebui-collapsible AppletButtons siebui-form-applet-header siebui-
collapsible-applet-header']").remove();
$(".zeb_cartsummary_view_main_confirm_outer").css("width", "100%");
$("#OrderNumber_Label").replaceWith("<font size='10px'>REPAIR ORDER
#:" + ordernumber + "</font>");
$("#OrderNumber_Label").remove();
}
if (SiebelApp.S_App.GetActiveView().GetName() === "ZEB RMA Portal
Submit View")
{
setTimeout(function()
{
$("#quickcartview").remove(); //KABHISHEK 12th April Code to
remove the Live Cart Display for this case.
}, 250);
$("div[title='Line Items List
Applet']").find("tr[role='row']").parent().parent().parent().parent().css("height",
"auto");
$("div[title='RMA Form Applet']").css("border-radius", "10px");
$("div[title='ZEB RMA Portal Summary Applet Form
Applet']").css("border-radius", "10px");
$("div[title='Line Items List Applet']").css("border-radius",
"10px");
$("button[title='Shopping Cart Menu']").hide();
var ordernumber = $("input[aria-label='OrderNumber']").val();
$("input[aria-label='OrderNumber']").remove();
$("div[title='RMA Form
Applet']").find("span[id*='_Details_Label']").parent().css("height", "25px");
$("div[title='RMA Form
Applet']").find("span[id*='_Details_Label']").parent().css("width", "1000px");
$("div[title='RMA Form
Applet']").find("span[id*='_Details_Label']").parent().css("background", "#ccc");
$("div[title='RMA Form
Applet']").find("span[id*='_Details_Label']").parent().css("border-radius", "2px");
$("div[title='RMA Form
Applet']").find("span[id*='_Details_Label']").css("font-size", "medium");
$("div[title='RMA Form Applet']").find("input").css("border",
"none");
$("div[title='RMA Form
Applet']").find("span[id*='Label']").css("color", "#004785 !important");
$("div[title='RMA Form
Applet']").find("span[id*='Label']").css("font-weight", "900");
$("div[title='RMA Form
Applet']").find("button[title='RMA:Submit']").remove();
$("div[title='Line Items List Applet']").find("div[class='siebui-
btn-grp-applet']").remove();
$("div[title='Line Items List Applet']").find("div[class='siebui-
btn-grp-search']").remove();
$("div[title='Line Items List
Applet']").find("div[class='AppletButtons siebui-applet-buttons']").remove();
$("div[title='RMA Form
Applet']").find("input").parent().find("span[id*='icon']").css("border", "hidden");
$("div[title='RMA Form
Applet']").find("input").parent().find("span[id*='icon']").remove();
$("div[title='RMA Form Applet']").find("span[class='siebui-icon-
zeb_help_order_items_update']").remove();
$("div[title='ZEB RMA Portal Summary Applet Form
Applet']").find("div[class='siebui-applet-header siebui-collapsible AppletButtons
siebui-form-applet-header siebui-collapsible-applet-header']").hide();
var alink = "<br><a href=
'https://private.zebra.com/terms_conditions/Standard_TC_Sale.htm'
target='_blank'>https://private.zebra.com/terms_conditions/Standard_TC_Sale.htm</a>
";
$(alink).insertAfter($("#OrderNumber_Label"));
$("div[title='RMA Form Applet']").find("div[class='siebui-applet-
header siebui-collapsible AppletButtons siebui-form-applet-header siebui-
collapsible-applet-header']").replaceWith("<font size='5px'>Proceed to
Checkout</font><div id='temp001'> <ul class='breadcrumb breadcrumb1 breadcrumb2
breadcrumb3'><li><a href='#'>Add Serial Number</a></li><li><a href='#'>Manage
Shipping Information</a></li><li><a href='#'>Review Order</a></li><li><a
href='#'>Confirm Order</a></li></ul></div>");
//REVIEW ORDER PAGE
$(".zeb_cartsummary_view_main_confirm_outer").css("width", "100%");
$(".zeb_cartsummary_view_main_confirm_inner").css("border",
"none");
$("button[title='ZEB RMA Portal Summary Applet:Shipping
Manifest']").hide();
$("button[title='ZEB RMA Portal Summary Applet:Goto
Orders']").hide();
$("div[title='ZEB RMA Portal Summary Applet Form Applet']" + '
button[title="ZEB RMA Portal Summary Applet:Confirm Order"]').click(function()
{
$("div[title='Line Items List Applet']").hide();
$("#OrderNumber_Label").parent().hide();
$("div[title='RMA Form Applet']").hide();
$("button[title='ZEB RMA Portal Summary Applet:Edit
Items']").hide();
// $("button[title='ZEB RMA Portal Summary Applet:Shipping
Manifest']").show(); //need to activatr later
$("button[title='ZEB RMA Portal Summary Applet:Shipping
Manifest']").hide();
$("button[title='ZEB RMA Portal Summary Applet:Goto
Orders']").show();
$("button[title='ZEB RMA Portal Summary Applet:Confirm
Order']").remove();
// $("button[title='ZEB RMA Portal Summary Applet:Confirm
Order']").replaceWith("<div id='ack'>Your Repair Order has been accepted.Thank You!
<br>You will shortly receive an email notification containing an order
acknowledgement and shipping manifest.<br><br>Order Number:" + ordernumber +
"</div>");
$("div[title='ZEB RMA Portal Summary Applet Form
Applet']").find("div[class='siebui-applet-header siebui-collapsible AppletButtons
siebui-form-applet-header siebui-collapsible-applet-header']").replaceWith("<font
size='5px'>Proceed to Checkout</font><div id='temp001'> <ul class='breadcrumb
breadcrumb1 breadcrumb2 breadcrumb3 breadcrumb4'><li><a href='#'>Add Serial
Number</a></li><li><a href='#'>Manage Shipping Information</a></li><li><a
href='#'>Review Order</a></li><li><a href='#'>Confirm Order</a></li></ul></div>");
//CONFIM ORDER PAGE
$("#OrderNumber_Label").parent().replaceWith("<br><br><br><font
size='5px'>Your Repair Order has been accepted.Thank You!<br>You will shortly
receive an email notification containing an order acknowledgement and shipping
manifest.<br><br>Order Number:" + ordernumber + "<br></font>");
});
}
//KRAMACHANDRAN 29JUN2016 CREATED FOR RMA BULK LOAD VIEW
if (SiebelApp.S_App.GetActiveView().GetName() === "ZEB RMA Bulk
Import View")
{
setTimeout(function()
{
$("#quickcartview").remove(); //KABHISHEK 12th
April Code to remove the Live Cart Display for this case.
}, 250);
$("div[title='Information Form
Applet']").find("div[class='siebui-applet-header siebui-collapsible AppletButtons
siebui-form-applet-header siebui-collapsible-applet-header']").replaceWith("<font
size='5px'>Proceed to Checkout<br></font><div id='temp001'> <ul class='breadcrumb
breadcrumb1 breadcrumb2'><li><a href='#'>Add Serial Number</a></li><li><a
href='#'>Bulk Load</a></li></ul></div>");
var bulkloadlinkRMA = "<a href='" + baseurl +
"files/RMABulkLoadTemplate.xlsm' target='_blank'>Click Here to Download
Template</a>";
$(bulkloadlinkRMA).insertAfter($("div[class='siebui-applet-
title']:contains('Download Template')"));
$("div[title='Information Form
Applet']").find("button[title='Information Menu']").hide();
$("div[title='Information Form
Applet']").find("span[class='siebui-row-counter']").hide();
$("div[title='Information Form
Applet']").find("div[class='AppletButtons siebui-applet-buttons']").css("border-
top", "hidden");
$("div[title='Information Form
Applet']").find("div[class='AppletButtons siebui-applet-buttons']").css("border-
bottom", "hidden");
$("div[title='Download Template Form
Applet']").find("button[title='Download Template Menu']").hide();
$("div[title='Download Template Form
Applet']").find("span[class='siebui-row-counter']").hide();
$("div[title='Download Template Form
Applet']").find("div[class='AppletButtons siebui-applet-buttons']").css("border-
top", "hidden");
$("div[title='Download Template Form
Applet']").find("div[class='AppletButtons siebui-applet-buttons']").css("border-
bottom", "hidden");
$("div[title='Bulk Load List
Applet']").find("button[title='Bulk Load Menu']").hide();
$("div[title='Bulk Load List Applet']").find("span[class='siebui-
row-counter']").hide();
$("div[title='Information Form
Applet']").find("span[id*='Label']").css("font-weight", "900");
$("div[title='Information Form
Applet']").find("span[id*='Label']").css("color", "#004785 !important");
$("div[title='Bulk Load List
Applet']").find("button[title='Bulk Load:LOAD DATA']").css("color", "white");
$("div[title='Bulk Load List
Applet']").find("button[title='Bulk Load:CONTINUE']").css("color", "white");
$("div[title='Bulk Load List
Applet']").find("button[title='Bulk Load:UPLOAD FILE']").css("color", "white");
$("div[title='Bulk Load List
Applet']").find("button[title='Bulk Load:DELETE ALL']").css("color", "white");
}
//RMA END
if (SiebelApp.S_App.GetActiveView().GetName() === "ZEB SD Order Entry
Frequency Detail View")
{
if (SiebelApp.S_App.GetActiveBusObj().GetBusCompByName("ZEB SD Non
Frequency Transaction Data").GetFieldValue("ZEB Applies To Each Unit Qty") != "Y")
{
$("div[title='Supplement Data']").find("div[title='Please enter
details List Applet']").hide();
}
}
if (SiebelApp.S_App.GetActiveView().GetName() === "Company Profile View
(SCW)")
{
$("div[title='My Company Form
Applet']").find("input[readonly='readonly']").css("border-style", "hidden");
$("div[title='My Company Form
Applet']").find("input[readonly='readonly']").parent().find("span[id*='icon']").rem
ove();
}
if (SiebelApp.S_App.GetActiveView().GetName() === "User Catalog List
View (SCW)")
{
$("div[title='Catalog']").find('span[aria-
readonly="true"]').removeClass();
$("div[title='Catalog']").find('span[aria-
readonly="true"]').removeAttr('maxlength');
$("div[title='Catalog']").find('span[aria-
readonly="true"]').removeAttr('readonly');
$("div[title='Catalog']").find('span[aria-
readonly="true"]').removeAttr('tabindex');
$("div[title='Catalog']").find('span[aria-
readonly="true"]').removeAttr('aria-readonly');
$('nobr').find('a[aria-readonly="true"]').removeAttr('style');
$('nobr').find('a[aria-
readonly="true"]').parent().find('span').remove();
$('nobr').find('a[aria-readonly="true"]').removeClass();
$('nobr').find('a[aria-readonly="true"]').removeAttr('maxlength');
$('nobr').find('a[aria-readonly="true"]').removeAttr('readonly');
$('nobr').find('a[aria-readonly="true"]').removeAttr('tabindex');
$('nobr').find('a[aria-readonly="true"]').removeAttr('aria-
readonly');
}
if (SiebelApp.S_App.GetActiveView().GetName() === "User Catalog List
View - Literature")
{
$('td').find('a[aria-readonly="true"]').removeAttr('style');
$('td').find('a[aria-
readonly="true"]').parent().find('span').remove();
$('td').find('a[aria-readonly="true"]').removeClass();
$('td').find('a[aria-readonly="true"]').removeAttr('maxlength');
$('td').find('a[aria-readonly="true"]').removeAttr('readonly');
$('td').find('a[aria-readonly="true"]').removeAttr('tabindex');
$('td').find('a[aria-readonly="true"]').removeAttr('aria-
readonly');
}
//jjob end of Info Center code
//JJOB 7/11/15:Code for New Product Ordering Confirmation Page
if (SiebelApp.S_App.GetActiveView().GetName() === "Quote Summary View
(eSales)")
{
$("div[title='Review and Confirm Order Form
Applet']").find("button[title='Review and Confirm Order Menu']").hide(); //To hide
the menu button
$("div[title='Review and Confirm Order Form
Applet']").find("span[class='siebui-row-counter']").hide(); //To hide the row
counter
$(".ui-jqgrid-bdiv").css("background", "white"); //To change list
applet color from grey
$("div[title='Review and Confirm Order Form
Applet']").find("span[class*='siebui-btn-icon-d']").hide(); //To hide the next
button
$("div[title='Review and Confirm Order Form
Applet']").find("span[class*='siebui-btn-icon-e']").hide(); //To hide the previous
button
$("div[title='Review and Confirm Order Form
Applet']").find("span[id*='ZEB_HTML_Label']").css("background", "#F8F8F8"); //To
change background of labels
$("div[title='Review and Confirm Order Form
Applet']").find("span[id*='ZEB_HTML_Label']").css("color", "#3A75C4"); //To change
font of labels
$("div[title='Review and Confirm Order Form
Applet']").find("input[readonly='readonly']").css("border-style", "hidden"); //To
remove boxes for read only fields
$("div[title='Review and Confirm Order Form
Applet']").find("input[aria-label='Shipping
Terms']").parent().find("span[id*='icon']").remove();
$("div[title='Review and Confirm Order Form
Applet']").find("input[aria-label='Payment
Currency']").parent().find("span[id*='icon']").remove();
$("div[title='Review and Confirm Order Form
Applet']").find("input[aria-label='Requested Ship
Date']").parent().find("span[id*='icon']").remove();
$
("span[id*='CurrencyCode']").parent().find("span[title='Required']").hide(); //to
hide the required image
$(".mceGridLabel.siebui-label.mceLabel").find("span").css("font-
weight", "900"); //To make control names bold
$("span[id*='ZEB_HTML_Label_1']").css("font-weight", "900"); //To
make labels bold
}
//jjob:mar 15 for alm 4530
if (SiebelApp.S_App.GetActiveView().GetName() === "Order Confirmation
View (eSales)")
{
var fieldspace = "<div style='height:15px;'></div>";
$
(fieldspace).insertAfter("div[class='zeb_ordersubmit_main_section_1']");
}
//JJOB 7/16/15:Parametric Search View
if (SiebelApp.S_App.GetActiveView().GetName() === "Parametric Search
Results View")
{
$(".siebui-span-lg-3").css("width", "35%");
$(".siebui-span-lg-9").css("width", "65%");
$("button[title='Shopping Cart Menu']").hide();
$(".col4").css("width", "60%");
$(".col2").css("width", "60%");
$("div[title='Shopping Cart Form
Applet']").find("span[class='siebui-row-counter']").hide();
$("button[title='Results Menu']").hide();
$(".siebui-btn-grp-search").find("button[title='Shopping
Cart:PROCEED TO CHECKOUT']").insertAfter($("div[class='GridBorder']"));
$("div[title='Parametric Search
Results']").find("div[title='Shopping Cart Form
Applet']").find("table[class='GridBack']").css("margin-right", "30%"); //JJOB 27
JUL 15:To align checkout button
}
//JJOB 7/22/15:Favourite List View
if (SiebelApp.S_App.GetActiveView().GetName() === "Favorite List View")
{
$("div[title='Shopping Cart Form
Applet']").find("span[class='siebui-row-counter']").hide(); //To hide the row
counter
$("div[title='Shopping Cart Form Applet']").css("width", "30%");
$("div[title='Shopping Cart Form Applet']").css("float", "right");
$("div[title='Shopping Cart Form
Applet']").find("input[readonly='readonly']").css("border-style", "hidden");
$("div[title='Shopping Cart Form
Applet']").find("span[id*='Label']").css("color", "#004785 !important");
$("div[title='Shopping Cart Form
Applet']").find("span[id*='Label']").css("font-weight", "400");
$(".siebui-btn-grp-search").find("button[title='Shopping
Cart:PROCEED TO CHECKOUT']").insertAfter($("div[class='GridBorder']"));
$("div[title='Shopping Cart Form
Applet']").find("span[class='siebui-row-counter']").hide();
$("div[title='Shopping Cart Form
Applet']").find("button[title='Shopping Cart Menu']").hide();
$("div[title='Shopping Cart Form
Applet']").find("div[class*='siebui-applet-header']").css("min-height", "10px !
important");
$("div[title='Shopping Cart Form
Applet']").find("div[class='.siebui-applet .siebui-applet-header']").css("min-
height", "10px !important");
$("#s_vis_div").text("Shopping Cart");
}
//JJOB 7/22/15:My Company profile
if (SiebelApp.S_App.GetActiveView().GetName() === "ZEB Partner Profile
View")
{
$(".siebui-applet-title").text("Company Profile");
$(".siebui-icon-map").hide();
$("#s_vctrl_div_tabScreen").hide();
}
//JJOB 7/10/15:Code for New Product Ordering main screen
if (SiebelApp.S_App.GetActiveView().GetName() === "Product Catalog View
CXPRM")
{
var parentorgName = theApplication().GetProfileAttr("Org.Parent
Organization Name"); //jjob 28/dec/15:getting parent org id
$("div[title='Quick Add Form Applet']").css("height", "175px");
$("div[title='Search Form Applet']").insertAfter($
("div[title='Quick Add Form Applet']")).parent();
$("button[title='Shopping Cart Menu']").hide(); //To hide the menu
button
$("div[title='Shopping Cart Form
Applet']").find("span[class='siebui-row-counter']").hide(); //To hide the row
counter
// $("div[title='Shopping Cart Form
Applet']").css("width","35%");//JJOB 27/jul:changed from 450 px to 35%
//$("div[title='Shopping Cart Form Applet']").css("margin-top","-
670px");/*JJOB 27/oct/15:changed from -590 to -572for prod hot fix to 670*/
$("div[title='Shopping Cart Form Applet']").css("width",
"34%"); //jjob 8/dec commented above and added this to increase the width
$("div[title='Shopping Cart Form Applet']").css("float", "right");
//$("div[title='Shopping Cart Form
Applet']").css("height","100px");/*JJOB 09/nov/15:changed from 123 to 100 for prod
hot fix*/
$("div[title='Shopping Cart Form
Applet']").find("input[readonly='readonly']").css("border-style", "hidden");
$("div[title='Shopping Cart Form
Applet']").find("span[id*='Label']").css("color", "#004785 !important");
$("div[title='Shopping Cart Form
Applet']").find("span[id*='Label']").css("font-weight", "400");
$(".siebui-btn-grp-search").find("button[title='Shopping
Cart:Favorites']").insertAfter($("div[class='GridBorder']"));
$(".siebui-btn-grp-search").find("button[title='Shopping
Cart:PROCEED TO CHECKOUT']").insertAfter($("div[class='GridBorder']"));
$("div[title='Shopping Cart Form
Applet']").find("div[class*='siebui-applet-header']").css("min-height", "10px !
important");
$("div[title='Shopping Cart Form
Applet']").find("div[class='.siebui-applet .siebui-applet-header']").css("min-
height", "10px !important");
/*$("button[title='Shopping Cart:PROCEED TO
CHECKOUT']").css("position","relative");//jjob 8/dec
$("button[title='Shopping Cart:PROCEED TO
CHECKOUT']").css("bottom","25px");//jjob 8/dec
$("button[title='Shopping Cart:PROCEED TO
CHECKOUT']").css("left","49%");//jjob 8/dec
$("button[title='Shopping Cart:Invoke solution
Builder']").css("position","relative");//jjob 8/dec
$("button[title='Shopping Cart:Invoke solution
Builder']").css("left","49%");//jjob 8/dec*/
//$("div[title='Shopping Cart Form
Applet']").find(".GridBorder").css("overflow","auto");
/*$("div[title='Shopping Cart Form
Applet']").find("div[class*='siebui-applet-
header']").css("position","relative");//jjob 8/dec
$("div[title='Shopping Cart Form
Applet']").find("div[class*='siebui-applet-header']").css("left","12%");//jjob
8/dec*/
$(".siebui-catalogviewprm-col1").css("width", "20%");
$(".siebui-catalogviewprm-col1").css("max-width", "none");
$(".siebui-catalogviewprm-col2").css("width", "80%");
$("div[title='Shopping Cart Form Applet']").css("box-shadow",
"none");
$("div[title='Search Form Applet']").css("width", "20%");
$("div[title='Search Form Applet']").css("margin-top", "-145px");
//$("div[title='Search Form Applet']").css("margin-
left","20%");//JJOB 27/jul:changed from 500 px to 35% /*jjob 27/dec/15:changed from
35 to 20*/
$("div[title='Search Form Applet']").css("height", "100%");
$("div[title='Search Form Applet']").css("box-shadow", "none");
$("div[title='Catalog']").find("div[title='Shopping Cart Form
Applet']").find("table[class='GridBack']").css("margin-right", "11%"); //JJOB 27
JUL 15:To align checkout button
//jjob 28/dec/15:condition to hide and show solution builder
//jjob 1/Aug/16:condition to hide and show solution
builder
if(SiebelApp.S_App.GetActiveView().GetActiveApplet().GetName()==="ZEB RMA
Order Entry List Applet"){
$("button[title='My RMAs:Go']").click(function(){
$(document).on("click", "a[class='drilldown']
[name='Order Number']", function(){
setTimeout(function() {
$("#_sweview").css('z-index', '-9999');
}, 100);
});
});
$(document).on("click", "a[class='drilldown'][name='Order
Number']", function(){
setTimeout(function() {
$("#_sweview").css('z-index', '-9999');
}, 100);
});
$("button[title='My RMAs:New Repair
Order']").click(function(){
setTimeout(function() {
$("#_sweview").css('z-index', '-9999');
}, 100);
});
}
//
console.log("end of custompl");
}
function CreateQuickCartPopup()
{
$("#shoppingcart").remove();
var CurrencySymbols = {
'AFN': '',
'ARS': '$',
'AWG': '',
'AUD': '$',
'BSD': '$',
'BBD': '$',
'BMD': '$',
'BWP': 'P',
'BND': '$',
'CAD': '$',
'KYD': '$',
'CLP': '$',
'CNY': '',
'COP': '$',
'CRC': '',
'CUP': '',
'XCD': '$',
'EGP': '',
'SVC': '$',
'EUR': '',
'FKP': '',
'FJD': '$',
'GHC': '',
'GIP': '',
'GTQ': 'Q',
'GGP': '',
'GYD': '$',
'HNL': 'L',
'HKD': '$',
'INR': '',
'IRR': '',
'IMP': '',
'JPY': '',
'JEP': '',
'KPW': '',
'KRW': '',
'LAK': '',
'LBP': '',
'LRD': '$',
'MXN': '$',
'MNT': '',
'NAD': '$',
'ANG': '',
'NZD': '$',
'NGN': '',
'OMR': '',
'PHP': '',
'QAR': '',
'SHP': '',
'SAR': '',
'SGD': '$',
'SBD': '$',
'SOS': 'S',
'ZAR': 'S',
'SRD': '$',
'SYP': '',
'THB': '',
'TRL': '',
'TVD': '$',
'UAH': '',
'GBP': '',
'USD': '$',
'RMB': '',
};
var inputPS = SiebelApp.S_App.NewPropertySet();
var NoOfRecords = 0;
var parOrderId = SiebelApp.S_App.GetProfileAttr("CurrentQuoteId");
if (parOrderId == "" || parOrderId == "EMPTY_CART")
{
parOrderId = "DUMMY_VALUE";
}
inputPS.SetProperty("parorderid", parOrderId);
var outputPS = SiebelApp.S_App.GetService("Zeb Open UI
Utility").InvokeMethod('ShowLiveCount', inputPS);
var resultSet = outputPS.GetChildByType("ResultSet");
NoOfRecords = resultSet.GetProperty("noofrecords");
var inPS = SiebelApp.S_App.NewPropertySet();
var showShoppingList, TotalQuotePrice, currencySymbol;
inPS.SetProperty("parorderid", parOrderId);
var outPS = SiebelApp.S_App.GetService("Zeb Open UI
Utility").InvokeMethod('ShowLiveCart', inPS);
var resultSet = outPS.GetChildByType("ResultSet");
showShoppingList = resultSet.GetProperty("shoppingcartlist");
TotalQuotePrice = resultSet.GetProperty("quoteprice");
TotalQuotePrice = parseFloat(TotalQuotePrice).toFixed(2);
TotalQuotePrice = TotalQuotePrice.toString().replace(/(\d)(?=(\d\d\d)+
(?!\d))/g, "$1,");
currencySymbol = resultSet.GetProperty("currencycode");
currencySymbol = CurrencySymbols[currencySymbol];
TotalQuotePrice = currencySymbol + TotalQuotePrice;
var shoppingLines = new Array();
var shoppingLineDetail = new Array();
shoppingLines = showShoppingList.split(" @ZEB@ ");
var ShoppingCartHTML = "<div id='shoppingcart'
style='width:100%;height:none;'><h4 id='shoppingcarttitle'
style='color:#5788c7;'>Shopping Cart:</h4><div
id='shoppingcarttablestructure'><table id='shoppingcarttable'
border='1'style='border-color:aliceblue;border-collapse:separate;border-
spacing:1px;width:100%; font-weight:bold; color:#5788c7;1px solid #000;'><tbody>";
ShoppingCartHTML += "<tr id='shoppingcartrow0'><td style='display:
table-cell;width:50%;text-align:-webkit-left;'>Item</td><td style='display: table-
cell;width:25%;text-align:-webkit-left;'>Qty</td><td style='display: table-
cell;width:25%;text-align:-webkit-left;'>Total Net Price</td></tr>";
for (var iloop = 0; iloop < shoppingLines.length - 1; iloop++)
{
shoppingLineDetail = shoppingLines[iloop].split(" |ZEB| ");
shoppingLineDetail[2] = shoppingLineDetail[2].toString().replace(/
(\d)(?=(\d\d\d)+(?!\d))/g, "$1,");
shoppingLineDetail[2] = currencySymbol + shoppingLineDetail[2];
ShoppingCartHTML += "<tr id='shoppingcartrow" + (iloop + 1) +
"'><td id='lineitemid" + (iloop + 1) + "'style='display: table-cell;width:40%;text-
align:-webkit-left;color:black;'>" + shoppingLineDetail[0] + "</td><td
style='display: table-cell;width:10%;text-align:-webkit-left;color:black;'>" +
shoppingLineDetail[1] + "</td><td style='display: table-cell;width:10%;text-align:-
webkit-left;color:black;'>" + shoppingLineDetail[2] + "</td></tr>";
}
ShoppingCartHTML += "</tbody></table></div><div id=totalquotepricediv
style='text-align:left;position:relative;top:10px'><label style='font-
size:18px;font-weight:bold;' id='totalquotetitle' type='text' aria-
readonly='false'>Total Price : </label><label id='totalquotevalue' style='font-
size:20px;font-weight:bold;' type='text' aria-readonly='false'></label></div><div
id=closelivecart><input type='button' value='X' id='closelivecartbtn'
class='appletButton'
style='border:none;position:relative;left:230px;bottom:20px;outline:none;font-
size:16px;border-radius:5px;'></input></div></div>";
$(ShoppingCartHTML).dialog(
{
modal: true,
height: 400,
width: 500
});
tempPopupLeftPos = $("#quickcartview").position().left - 450;
tempPopupTopPos = $("#quickcartview").position().top + 15;
$("#shoppingcarttitle").css('background-color', '#5788c7');
$("#shoppingcarttitle").css('color', 'white');
$("#shoppingcarttitle").css('height', '25px');
$("#shoppingcarttitle").css('text-align', 'center');
$("#shoppingcarttitle").css('font-size', '18px');
$("#shoppingcart").parent().css("top", tempPopupTopPos + "px");
$("#shoppingcart").parent().css("border-radius", "10px");
$("#shoppingcart").parent().css("left", tempPopupLeftPos + "px");
$("#shoppingcart").css('text-align', 'center');
$("#shoppingcart").css('color', '#5788c7');
$("#shoppingcarttablestructure").css("overflow", "auto");
$("#shoppingcarttablestructure").css("height", "240px");
$("#shoppingcarttablestructure").css("overflow-x", "hidden");
$("#totalquotevalue").text(TotalQuotePrice);
$("#livecartdisplay").text(NoOfRecords);
$("body > div.ui-dialog.ui-widget.ui-widget-content.ui-corner-all.ui-
front.ui-draggable.ui-resizable > div.ui-dialog-titlebar.ui-widget-header.ui-
corner-all.ui-helper-clearfix").hide();
$("#closelivecartbtn").click(function()
{
$("#shoppingcart").remove();
});
if (showShoppingList == "")
{
$("#shoppingcarttablestructure").css('visibility', 'hidden');
$("#totalquotetitle").text("There are no items in your cart");
$("#totalquotevalue").remove();
$("#totalquotetitle").css('position', 'relative');
$("#totalquotetitle").css('bottom', '150px');
$("#totalquotetitle").css('left', '130px');
}
}
function get_browser_info()
{
var ua = navigator.userAgent,
tem, M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?
=\/))\/?\s*(\d+)/i) || [];
if (/trident/i.test(M[1]))
{
tem = /\brv[ :]+(\d+)/g.exec(ua) || [];
return {
name: 'IE',
version: (tem[1] || '')
};
}
if (M[1] === 'Chrome')
{
tem = ua.match(/\bOPR\/(\d+)/)
if (tem != null)
{
return {
name: 'Opera',
version: tem[1]
};
}
}
M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion,
'-?'];
if ((tem = ua.match(/version\/(\d+)/i)) != null)
{
M.splice(1, 1, tem[1]);
}
return {
name: M[0],
version: M[1]
};
} //KABHISHEK 5th August End of Browser Related fix
}());
}