// = pt29.js = /* javascript functions for SMBGetHelp 2.0 Mashlet pt29.js $Revision: 1.9 $ (c) 1992-2010 Cisco Systems, Inc. All rights reserved. Terms and Conditions: //cisco.com/en/US/swassets/sw293/sitewide_important_notices.html */ if (typeof(lpPartnerLocation) == 'undefined') var lpPartnerLocation; if (typeof(lpUnit) == 'undefined') var lpUnit; if (typeof(lpLanguage) == 'undefined') var lpLanguage; cdc.util.ensureNamespace('cdc.cl.pt29'); cdc.cl.pt29 = { pre_html: {}, moduleData:{}, init: function (returned) { returned = returned.smbHelpResponse; this.moduleData = returned; SMBHelpResult = returned; var label = cdc.cl.pt29.SMBHelp_createResourceBundle(returned.labels); this.labels = cdc.cl.pt29.SMBHelp_createResourceBundle(returned.labels); this.pre_html['community'] = '\t\t
' + this.labels['WORKSPACE_SMBHELP_PRE_SALES_ENGAGE_TITLE'] + ': ' + '' + this.labels['WORKSPACE_SMBHELP_PRE_SALES_ENGAGE_LINKTEXT'] + "
\n"; //lp CHAT Variables Setting Here if (returned.nonTechnicalSupportList ) { lpPartnerLocation = this.getlpValues( returned.nonTechnicalSupportList, "chat", "lpPartnerLocation"); lpUnit = this.getlpValues( returned.nonTechnicalSupportList, "chat", "lpUnit"); lpLanguage = this.getlpValues( returned.nonTechnicalSupportList, "chat", "lpLanguage"); var scode = this.getlpValues( returned.nonTechnicalSupportList, "chat", "lpSkill"); } // TEMPORARILY RELOCATING FILE TO ADDRESS WORKSPACE ISSUE cdc.includer.loadJs("/etc/designs/cdc/fw/lib/mtagconfig-temp.js", { callback: function () { if (typeof(lpMTagConfig.lpTagLoaded) != 'undefined' && (!lpMTagConfig.lpTagLoaded)) { lpMTagConfig.sendCookies = false; lpAddMonitorTag(); lpMTagConfig.lpTagLoaded = true; } } }); // conditions -- to display the correct message on the portlets if (returned.resultCode == 0) { if ((!returned.countryAvailabilityFlag) || (returned.countryAvailabilityFlag == "false")) { gethelpdata = this.SMBHelp_availMsg(); }else{ // country availability flag is true // traversing the technical and non-technical values this.SMBHelp_technicalvalues(returned.technicalSupportList); if(returned.nonTechnicalSupportList)this.SMBHelp_nontechnicalvalues(returned.nonTechnicalSupportList); if (returned.widthOfPortlet == "50") { gethelpdata = this.SMBHelp_percent50( returned ); }else{ gethelpdata = this.SMBHelp_percent100( returned ); }// 100% view } //end else condition of country availability flag }else{ // result code is not -- 0 gethelpdata = this.SMBHelp_errorMsg(); } jQuery("#pt29").html(gethelpdata); // content display on page this.SMBHelp_appendHacks(); // in case the html hasn't been rendered in time, re-include the required files. /************** Replacing '/etc/designs/cdc/fw/lib/jquery.hoverIntent.minified.js' with '/etc/designs/cdc/fw/lib/jQuery/hoverintent/jquery.hoverIntent.r6.minified.js' so that it can be used with jQuery 1.4 The below can be replaced again once the workspace page moves to jQuery 1.10 ***************/ // cdc.includer.loadJs(['/etc/designs/cdc/fw/lib/jquery.hoverIntent.minified.js','/etc/designs/cdc/fw/w/cl/c19/c19v1.js']); cdc.includer.loadJs(['/etc/designs/cdc/fw/lib/jQuery/hoverintent/jquery.hoverIntent.r6.minified.js', '/etc/designs/cdc/fw/w/cl/c19/c19v1.js']); // in case c19v1 is already on page, it wil not be re-executed, so re-init. try { cdc.cl.c19v1.init(); } catch (e) { } // AGAIN : LP Chat Variables try { // Variables submission using lpAddVars lpAddVars('session', 'ccoID', returned.userId); lpAddVars('session', 'firstName', returned.firstName); lpAddVars('session', 'lastName', returned.lastName); lpAddVars('session', 'emailAddress', returned.emailId); lpAddVars('session', 'phone', returned.telephoneNumber); if (typeof(lpMTagConfig.lpTagLoaded) != 'undefined' && (!lpMTagConfig.lpTagLoaded)) { lpMTagConfig.sendCookies = false; lpAddMonitorTag(); lpMTagConfig.lpTagLoaded = true; } } catch (e) { } try{ var lpTimerWS = function(){ var lpImg = jQuery("#lpButton img"); if (lpImg.length) { // Image is available if (lpImg.attr("src").match("reponline.gif")) { abc = window.clearInterval(abc); // do something with img if (jQuery('#lpChatNow a[href]').length == 0){ //only if it's not there already cdc.cl.pt29.SMBHelp_showLPChat(scode); } } if (lpImg.attr("src").match("repoffline")) { abc = window.clearInterval(abc); } } // lpImg.length }; }catch(e){} if (returned.nonTechnicalSupportList) { abc = setInterval(lpTimerWS, 500); } cdc.cl.pt29.addUnicaRules( returned );// calling Unica parameters }, SMBHelp_percent100: function(returned){ // COLUMN ONE -- SALES AND PROGRAM HELP if ((returned.eligibilityFlag) && (returned.eligibilityFlag != "false")) { var sales_program = "