// generates a global javascript file using consts from the java src tree var currentCpc = 3.35; var defaultMinPrice = 0; var defaultMaxPrice = 1000000; var defaultMinDOL = 0; var defaultMaxDOL = 2000; var defaultMinMiles = 0; var defaultMaxMiles = 1000000; var defaultMinYear = 0; var defaultMaxYear = 2018; var defaultMinViews = 0; var defaultMaxViews = 10000; var defaultMinImageCount = 0; var defaultMaxImageCount = 1000; var ProductNames = {}; ProductNames.standard = "VS Omnichannel"; ProductNames.facebook = "VS Facebook"; ProductNames.leads = "VS Lead-Enabled Retargeting"; ProductNames.sem = "VS Search AI"; ProductNames.retargeting = "CX Retargeting"; ProductNames.geofencing = "VS Conquest"; ProductNames.customimages = "CX Photo AI"; function initializeDatepicker(monthcode) { var oldest = new Date(2009, 0, 1, 0, 0, 0, 0); var now = new Date(); var mainformat = $.fn.datepicker.DPGlobal.parseFormat("MM yyyy"); var subformat = $.fn.datepicker.DPGlobal.parseFormat("yyyymm"); var nowMonth = now.getMonth() + 1; var nowYear = now.getFullYear(); var selectYear, selectMonth; if (monthcode === undefined) { selectYear = nowYear; selectMonth = nowMonth; } else { // trickery to tolerate receiving either a string or int as input monthcodeString = "" + monthcode; selectYear = parseInt(monthcodeString.substring(0,4)); selectMonth = parseInt(monthcodeString.substring(4)); } var selected = new Date(selectYear, selectMonth - 1, 1, 0, 0, 0, 0); // initial values of hidden timeperiod field and visible date $('#datepickerbox').val($.fn.datepicker.DPGlobal.formatDate(selected, mainformat, 'en')); $('#timeperiod').val($.fn.datepicker.DPGlobal.formatDate(selected, subformat, 'en')); $('#datepickerdiv').datepicker({ autoclose: true, format: "MM yyyy", dateFormat: "MM yyyy", viewMode: "months", minViewMode: "months", startView: "month", immediateUpdates: true, startDate: oldest, endDate: now, viewDate: selected }).on('changeDate', function(ev) { $('#timeperiod').val($.fn.datepicker.DPGlobal.formatDate(ev.date, subformat, 'en')); }); } var defaultConfigData = { "category": "Under-Engaged30", "subcategory": "", "condition": "All", "excludedBrands": [], "excludedEngagement": [], "excludedVins": [], "excludedStockNumbers": [], "excludedModels": [], "excludedTypes": [], "excludedSources": [], "noImageVins": [], "minPrice": defaultMinPrice, "maxPrice": defaultMaxPrice, "minDOL": defaultMinDOL, "maxDOL": defaultMaxDOL, "minMiles": defaultMinMiles, "maxMiles": defaultMaxMiles, "minYear": defaultMinYear, "maxYear": defaultMaxYear, "minViews": defaultMinViews, "maxViews": defaultMaxViews, "minImageCount": defaultMinImageCount, "maxImageCount": defaultMaxImageCount, "sampleVin": "", "numVehicles": 0, "srpLander": false, "lowerPriceOnly" : false, "duration": "durationOngoing", "pacing": - 1, "runCampaignUntil": "", "potentialShoppers": - 1, "anShoppers": - 1, "atShoppers": - 1, "rtShoppers": - 1, "fbShoppers": - 1, "anBudget": - 1, "atBudget": - 1, "rtBudget": - 1, "fbBudget": - 1, "totalReach": - 1, "budget": - 1, "perDayCost": - 1, "leadBudget":0, "leadType":"", "leadCost":0, "leadShoppers":0, "vinInclusion":"dynamic", "vinInclusionVins": [], "perVinBudget": - 1, "cpc": 3.99, "domainName": "www.demodealer.com", "maxMonthlyVDPViews":40, "maxLifetimeVDPViews":75, "locationConfig": 0, "product":"automotive" };