1var MENU_CONFIG = { 2 "courseCatalogs": [ 3 "/customer/courseCatalogs.action", 4 "/customer/courseKeywords.action", 5 "/customer/recentCourseDetail.action", 6 "/shop/courseCatalogs.action", 7 "/shop/courseKeywords.action", 8 "/shop/recentCourseDetail.action" 9 ], 10 "courseSearch": [ 11 "/customer/searchOfferings.action", 12 "/shop/searchOfferings.action" 13 ], 14 "programCatalogs": [ 15 "/customer/programCatalogs.action", 16 "/customer/courseKeywords.action", 17 "/customer/recentCourseDetail.action", 18 "/shop/programCatalogs.action", 19 "/shop/courseKeywords.action", 20 "/shop/recentCourseDetail.action" 21 ], 22 "programSearch": [ 23 "/customer/searchPrograms.action", 24 "/shop/searchPrograms.action" 25 ], 26 "programArea": [ 27 "/customer/searchProgramApplication.action", 28 "/customer/searchProgramEnrollment.action", 29 "/customer/searchUpcomingCourses.action", 30 "/customer/searchUpcomingCourses.action", 31 "/shop/searchProgramApplication.action", 32 "/shop/searchProgramEnrollment.action", 33 "/shop/searchUpcomingCourses.action", 34 "/shop/searchUpcomingCourses.action" 35 ], 36 "currentSections": [ 37 "/customer/currentSections.action", 38 "/shop/currentSections.action" 39 ], 40 "completedSections": [ 41 "/customer/completedSections.action", 42 "/shop/completedSections.action" 43 ], 44 "schedule": [ 45 "/customer/viewCurrentSchedule.action", 46 "/customer/viewOnlineSchedule.action", 47 "/shop/viewCurrentSchedule.action", 48 "/shop/viewOnlineSchedule.action" 49 ], 50 "certificates": [ 51 "/customer/searchCertificates.action", 52 "/shop/searchCertificates.action" 53 ], 54 "profile": [ 55 "/customer/profile.action", 56 "/customer/CountryCode.action", 57 "/customer/GenderType.action", 58 "/customer/PersonPrefix.action", 59 "/customer/PersonSuffix.action", 60 "/customer/EthnicityType.action", 61 "/customer/profileQuestions.action", 62 "/shop/regionList.action", 63 "/customer/erpvalidationinfo.action", 64 "/shop/profile.action", 65 "/shop/CountryCode.action", 66 "/shop/GenderType.action", 67 "/shop/PersonPrefix.action", 68 "/shop/PersonSuffix.action", 69 "/shop/EthnicityType.action", 70 "/shop/profileQuestions.action", 71 "/shop/erpvalidationinfo.action" 72 ], 73 "orderHistory": [ 74 "/customer/orders.action", 75 "/shop/orders.action" 76 ], 77 "paymentHistory": [ 78 "/customer/payments.action", 79 "/shop/payments.action" 80 ], 81 "payBalance": [ 82 "/customer/outstandingBalance.action", 83 "/customer/paymentOption.action", 84 "/shop/outstandingBalance.action", 85 "/shop/paymentOption.action" 86 ], 87 "viewCart": [ 88 "/customer/showCart.action", 89 "/shop/showCart.action" 90 ], 91 "cart": [ 92 "/customer/showCart.action", 93 "/shop/showCart.action" 94 ], 95 "checkout": [ 96 "/customer/showCart.action", 97 "/shop/showCart.action" 98 ] 99} 100 101var BUTTON_CONFIG = { 102 "btn_section_inquire": { 103 "actions": [ 104 "/customer/section.action", 105 "/customer/profile.action", 106 "/marketingCode/getInquiryMarketingCodes.action", 107 "/shop/section.action", 108 "/shop/profile.action" 109 ], 110 "type": "." 111 }, 112 "btn_section_addtoCart": { 113 "actions": [ 114 "/customer/addRegistrationRequest.action", 115 "/shop/addRegistrationRequest.action" 116 ], 117 "type": "." 118 }, 119 "addToCart_img_btn": { 120 "actions": [ 121 "/customer/addRegistrationRequest.action", 122 "/shop/addRegistrationRequest.action" 123 ], 124 "type": "." 125 }, 126 "btn_section_buy_for_others": { 127 "actions": [ 128 "/customer/addRegistrationRequest.action", 129 "/shop/addRegistrationRequest.action" 130 ], 131 "type": "." 132 }, 133 "btn_section_join_waitlist": { 134 "actions": [ 135 "/customer/joinWaitList.action", 136 "/shop/joinWaitList.action" 137 ], 138 "type": "." 139 }, 140 "btn_shop_view_cart": { 141 "actions": [
142 "/customer/showCart.action", 143 "/shop/showCart.action" 144 ], 145 "type": "." 146 }, 147 "btn_shop_checkout": { 148 "actions": [ 149 "/customer/validateCart.action", 150 "/shop/validateCart.action" 151 ], 152 "type": "." 153 }, 154 "btn_course_search": { 155 "actions": [ 156 "/customer/searchOfferings.action", 157 "/shop/searchOfferings.action" 158 ], 159 "type": "#" 160 }, 161 "btn_remove_item_validation": { 162 "actions": [ 163 "/customer/updateCheckoutRegistrationRequest.action", 164 "/customer/validateCart.action", 165 "/shop/updateCheckoutRegistrationRequest.action", 166 "/shop/validateCart.action" 167 ], 168 "type": "." 169 }, 170 "btn_validation_next_step": { 171 "actions": [ 172 "/marketingCode/getOrderMarketingCodesCustomer.action", 173 "/customer/optionalItems.action", 174 "/customer/showCheckoutCart.action", 175 "/customer/paymentOption.action", 176 "/shop/optionalItems.action", 177 "/shop/showCheckoutCart.action", 178 "/shop/paymentOption.action" 179 ], 180 "type": "#" 181 }, 182 "btn_remove_item_cart": { 183 "actions": [ 184 "/customer/updateRegistrationRequest.action", 185 "/shop/updateRegistrationRequest.action" 186 ], 187 "type": "." 188 }, 189 "btn_cart_checkout": { 190 "actions": [ 191 "/customer/validateCart.action", 192 "/marketingCode/getOrderMarketingCodesCustomer.action", 193 "/shop/validateCart.action" 194 ], 195 "type": "#" 196 }, 197 "btn_cart_checkout": { 198 "actions": [ 199 "/customer/validateCart.action", 200 "/marketingCode/getOrderMarketingCodesCustomer.action", 201 "/shop/validateCart.action" 202 ], 203 "type": "." 204 }, 205 //Not used 206 "btnNextStep": { 207 "actions": [ 208 "/marketingCode/saveOrderMarketingCodesCustomer.action", 209 "/customer/optionalItems.action", 210 "/shop/optionalItems.action" 211 ], 212 "type": "#" 213 }, 214 "btn_next_add_optional_item": { 215 "actions": [ 216 "/customer/addOptionalItem.action", 217 "/customer/showCheckoutCart.action", 218 "/customer/paymentOption.action", 219 "/shop/addOptionalItem.action", 220 "/shop/showCheckoutCart.action", 221 "/shop/paymentOption.action" 222 ], 223 "type": "#" 224 }, 225 "btn_payment_checkout_remove_item": { 226 "actions": [ 227 "/customer/updateCheckoutRegistrationRequest.action", 228 "/customer/paymentOption.action", 229 "/shop/updateCheckoutRegistrationRequest.action", 230 "/shop/paymentOption.action" 231 ], 232 "type": "." 233 }, 234 "btn_apply_promocode": { 235 "actions": [ 236 "/customer/calculateDiscount.action", 237 "/customer/showCheckoutCart.action", 238 "/customer/paymentOption.action", 239 "/shop/calculateDiscount.action", 240 "/shop/showCheckoutCart.action", 241 "/shop/paymentOption.action" 242 ], 243 "type": "#" 244 }, 245 //Not used 246 "makePaymentButton": { 247 "actions": [ 248 "/customer/canReserveCartItem.action", 249 "/shop/canReserveCartItem.action", 250 "/shop/retrieveCart.action" 251 ], 252 "type": "#" 253 }, 254 "submitOrderButton": { 255 "actions": [ 256 "/customer/canReserveCartItem.action", 257 "/customer/billMeLater.action", 258 "/customer/submitFreeChargeOrder.action", 259 "/customer/submitFreeChargeProgramOrder.action", 260 "/shop/canReserveCartItem.action", 261 "/shop/billMeLater.action", 262 "/shop/submitFreeChargeOrder.action", 263 "/shop/submitFreeChargeProgramOrder.action" 264 ], 265 "type": "#" 266 }, 267 "btn_submit_purchase_order": { 268 "actions": [ 269 "/customer/submitPurchaseOrder.action", 270 "/customer/clearShoppingCart.action", 271 "/shop/submitPurchaseOrder.action", 272 "/shop/clearShoppingCart.action",
273 "/shop/retrieveCart.action" 274 ], 275 "type": "#" 276 }, 277 "btn_program_application": { 278 "actions": [ 279 "/customer/programApplication.action", 280 "/customer/programApplicationStep.action", 281 "/shop/programApplication.action", 282 "/shop/programApplicationStep.action" 283 ], 284 "type": "." 285 }, 286 "btn_program_inquire": { 287 "actions": [ 288 "/customer/searchPrograms.action", 289 "/customer/profile.action", 290 "/shop/searchPrograms.action", 291 "/shop/profile.action", 292 "/marketingCode/getInquiryMarketingCodes.action" 293 ], 294 "type": "." 295 }, 296 "btn_submit_program_application": { 297 "actions": [ 298 "/customer/validateProgramApplicationCart.action", 299 "/shop/validateProgramApplicationCart.action", 300 "/marketingCode/getOrderMarketingCodesProgram.action", 301 "/customer/programApplication.action", 302 "/customer/saveApplication.action", 303 "/customer/programApplicationStatusWithApplicationFee.action", 304 "/shop/saveApplication.action", 305 "/shop/programApplicationStatusWithApplicationFee.action" 306 ], 307 "type": "." 308 }, 309 "btn_program_save": { 310 "actions": [ 311 "/customer/saveApplication.action", 312 "/shop/saveApplication.action" 313 ], 314 "type": "." 315 }, 316 "btn_programEnroll": { 317 "actions": [ 318 "/customer/validateProgramEnrollmentCart.action", 319 "/shop/validateProgramEnrollmentCart.action", 320 "/marketingCode/getOrderMarketingCodesProgram.action" 321 ], 322 "type": "." 323 }, 324 "btn_program_search": { 325 "actions": [ 326 "/customer/searchPrograms.action", 327 "/shop/searchPrograms.action" 328 ], 329 "type": "#" 330 }, 331 "btn_program_resume": { 332 "actions": [ 333 "/customer/programApplication.action", 334 "/customer/programApplicationStep.action", 335 "/shop/programApplication.action", 336 "/shop/programApplicationStep.action" 337 ], 338 "type": "." 339 }, 340 "btn_program_resolve_issue": { 341 "actions": [ 342 "/customer/programApplication.action", 343 "/customer/programApplicationStep.action", 344 "/shop/programApplication.action", 345 "/shop/programApplicationStep.action" 346 ], 347 "type": "." 348 }, 349 "btn_program_enroll": { 350 "actions": [ 351 "/customer/programApplication.action", 352 "/customer/programApplicationStep.action", 353 "/shop/programApplication.action", 354 "/shop/programApplicationStep.action" 355 ], 356 "type": "." 357 }, 358 "btn_program_enroll_info": { 359 "actions": [ 360 "/customer/programApplication.action", 361 "/customer/programApplicationStep.action", 362 "/shop/programApplication.action", 363 "/shop/programApplicationStep.action" 364 ], 365 "type": "." 366 }, 367 "btn_cart_buyOptionalItem": { 368 "actions": [ 369 "/customer/showCart.action", 370 "/shop/showCart.action" 371 ], 372 "type": "#" 373 }, 374 "btn_checkout_buyOptionalItem": { 375 "actions": [ 376 "/customer/showCheckoutCart.action", 377 "/shop/showCheckoutCart.action" 378 ], 379 "type": "#" 380 }, 381 "ReservationTokenID": { 382 "actions": [ 383 "/customer/validateReservationTicket.action", 384 "/shop/validateReservationTicket.action" 385 ], 386 "type": "#" 387 }, 388 //Not used 389 "btn_submit_profile": { 390 "actions": [ 391 "/customer/submitProfileQuestions.action", 392 "/customer/submitProfile.action", 393 "/shop/submitProfileQuestions.action", 394 "/shop/submitProfile.action" 395 ], 396 "type": "#" 397 }, 398 "btn_change_password": { 399 "actions": [ 400 "/customer/changePassword.action", 401 "/shop/changePassword.action" 402 ], 403 "type": "#" 404 }, 405 "btn_order_history": { 406 "actions": [ 407 "/customer/orders.action", 408 "/shop/orders.action" 409 ], 410 "type": "#" 411 }, 412 "btn_payment_history": { 413 "actions": [ 414 "/customer/payments.action", 415 "/shop/payments.action" 416 ], 417 "type": "#" 418 }, 419 //Not used 420 "btn_viewDetails": { 421 "actions": [ 422 "/customer/defaultSections.action", 423 "/customer/offeringOverview.action", 424 "/customer/courseCrossSell.action", 425 "/customer/recentCourseDetail.action", 426 "/customer/courseKeywords.action",
427 "/customer/showCart.action", 428 "/shop/defaultSections.action", 429 "/shop/offeringOverview.action", 430 "/shop/courseCrossSell.action", 431 "/shop/recentCourseDetail.action", 432 "/shop/courseKeywords.action", 433 "/shop/showCart.action" 434 ], 435 "type": "." 436 }, 437 "btn_program_application_continue": { 438 "actions": [ 439 "/customer/saveApplication.action", 440 "/customer/programApplicationStatusWithApplicationFee.action", 441 "/shop/saveApplication.action", 442 "/shop/programApplicationStatusWithApplicationFee.action" 443 ], 444 "type": "." 445 }, 446 "btn_show_courses": { 447 "actions": [ 448 "/customer/catalog.action", 449 "/customer/catalogOfferings.action", 450 "/shop/catalog.action", 451 "/shop/catalogOfferings.action" 452 ], 453 "type": "." 454 }, 455 "btn_show_courses_new": { 456 "actions": [ 457 "/customer/catalog.action", 458 "/customer/catalogOfferingsNew.action", 459 "/shop/catalog.action", 460 "/shop/catalogOfferingsNew.action" 461 ], 462 "type": "." 463 }, 464 "btn_show_programs": { 465 "actions": [ 466 "/customer/catalog.action", 467 "/customer/searchPrograms.action", 468 "/shop/catalog.action", 469 "/shop/searchPrograms.action" 470 ], 471 "type": "." 472 }, 473 //Not used 474 "btn_add_optionalItem": { 475 "actions": [ 476 "/customer/buyOptionalItems.action", 477 "/customer/showCart.action", 478 "/shop/buyOptionalItems.action", 479 "/shop/showCart.action" 480 ], 481 "type": "." 482 } 483} 484 485function isItemBlocked(itemActions, blockedActions) { 486 return _.intersection(blockedActions, itemActions).length > 0; 487} 488 489var getBlockedMenuList = function (actions) { 490 var blockedMenu = []; 491 for (var key in MENU_CONFIG) { 492 if (MENU_CONFIG.hasOwnProperty(key)) { 493 if (isItemBlocked(MENU_CONFIG[key], actions)) 494 blockedMenu.push(key) 495 } 496 } 497 return blockedMenu; 498} 499 500function getBlockedButtonList(actions) { 501 var blockedMenu = []; 502 for (var key in BUTTON_CONFIG) { 503 if (BUTTON_CONFIG.hasOwnProperty(key)) { 504 if (isItemBlocked(BUTTON_CONFIG[key].actions, actions)) 505 blockedMenu.push({btn: key, type: BUTTON_CONFIG[key].type}) 506 } 507 } 508 return blockedMenu; 509} 510 511function blockButtons() { 512 var blockedActions = getBlockedActions(); 513 var blockedButtons = getBlockedButtonList(blockedActions); 514 var blockedButtonsLength = blockedButtons.length; 515 for (var i = 0; i < blockedButtonsLength; i++) { 516 var buttonInfo = blockedButtons[i]; 517 var buttonSelector = buttonInfo.type + buttonInfo.btn; 518 $(buttonSelector).addClass('btn-disable'); 519 } 520} 521 522function blockMenuItems() { 523 //disable blocked menu 524 var blockedActions = getBlockedActions(); 525 var blockedMenu = getBlockedMenuList(blockedActions); 526 var blockedMenuLength = blockedMenu.length; 527 for (var i = 0; i < blockedMenuLength; i++) { 528 var menu = blockedMenu[i]; 529 $("#" + menu) 530 .addClass('disable_a_href') 531 .append("<span class='disabled_menu_tooltip'>Due to restrictions on your account <br> this option is not available at this <br> time.</span>") 532 .on("click", function () { 533 return false; 534 }); 535 } 536}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.