diff --git a/APPL/API/phonebook_js.asp b/APPL/API/phonebook_js.asp index 7f9c72a80e..ff5a3ca129 100644 --- a/APPL/API/phonebook_js.asp +++ b/APPL/API/phonebook_js.asp @@ -1,7 +1,7 @@ <%@language = "javascript" %> <% /* - $Revision: 4 $ - $Modtime: 25-11-10 16:38 $ + $Revision: 5 $ + $Modtime: 1-12-10 14:30 $ File: phonebook_js.asp Status: 70% @@ -16,6 +16,7 @@ DOCTYPE_Disable = 1; %> + <% @@ -23,7 +24,7 @@ DOCTYPE_Disable = 1; var APIKEY = getQParam("APIKEY"); var API = new API_func(APIname, APIKEY); - var transitParam = "&fac_id="+Session("customerId"); //+buildTransitParam(["API", "APIKEY"]); + var transitParam = "&fac_id="+Session("customerId") + buildTransitParam(["API", "APIKEY"]); var proto = (Request.ServerVariables("SERVER_PORT") == "443")?"https":"http"; var sitenoroot = proto + "://" + Request.ServerVariables("SERVER_NAME"); @@ -50,7 +51,8 @@ facilitor.phonebook = facilitor.phonebook || {}; var loadScriptTime = (new Date).getTime(); getCSS("appl/localscripts/theme/jquery-ui.css"); getCSS("appl/shared/suggest/suggest.css"); - getCSS("appl/shared/default.css"); + getCSS("appl/api/api.css"); +// JGL: zeker niet getCSS("appl/shared/default.css"); getCSS("cust/<%=Session("customerID")%>/cust.css"); getScript("appl/localscripts/jquery-1.3.2.min.js"); @@ -60,6 +62,9 @@ facilitor.phonebook = facilitor.phonebook || {}; window.LCL = {}; getScript("appl/shared/load_lcl.asp?module=" + "shared&callback=setLCL<%=transitParam%>"); //getScript("appl/api/phonebook.js"); + <% if (API.apidata.cust_js) { %> + getScript("<%=API.apidata.cust_js%>"); + <% } %> window.facilitor.open_phonebook = function(key, naam) { @@ -76,25 +81,21 @@ facilitor.phonebook = facilitor.phonebook || {}; // De default waarden, werkt nog niet TODO window.facilitor.phonebook_options = { detailWidth : 450, - toonWerkplekken: true, toonFoto: true, detailurl: "appl/fac/fac_user_info.asp", - toonEmail: true, - toonTelefoon: true, - toonMobiel: true, - toonAfdeling: true, - toonFunctie: false, - flexkenmerken: [1160] + fields: [ { lbl: "<%=lcl_prs_email%>", val: "prs_perslid_email" }, + { lbl: "<%=lcl_pb_phone%>", val: "prs_perslid_telefoonnr" }, + { lbl: "<%=lcl_pb_mobile%>", val: "prs_perslid_mobiel" }, + { lbl: "<%=lcl_pb_afdeling%>", val: "afdeling" } + ] }; <% + // kopieer de serverside overrules naar clientside for (opt in API.apidata.options) { - if (typeof API.apidata.options[opt] == "string") - Response.Write("\nwindow.facilitor.phonebook_options['"+opt+"'] = '" + safe.jsstring(API.apidata.options[opt]) + "';"); - else if (typeof API.apidata.options[opt] == "number") - Response.Write("\nwindow.facilitor.phonebook_options['"+opt+"'] = " + safe.jsfloat(API.apidata.options[opt]) + ";"); - else if (typeof API.apidata.options[opt] == "boolean") - Response.Write("\nwindow.facilitor.phonebook_options['"+opt+"'] = " + (API.apidata.options[opt]?"true":"false") + ";"); + Response.Write("\nwindow.facilitor.phonebook_options['"+opt+"'] = " + + " eval('(" + safe.jsstring(JSON.stringify(API.apidata.options[opt])) + ")')"); + } %> @@ -120,45 +121,17 @@ facilitor.phonebook = facilitor.phonebook || {}; { trs += "