1if (SunGard === undefined) SunGard = {}; 2SunGard.Hac = function () { 3 var _root = ""; 4 var _area = ""; 5 var _controller = ""; 6 var _action = ""; 7 8 9 var init = function (root) { 10 /// <summary>Common initialization for Home Access Center JavaScript functionality.</summary> 11 /// <param name="root" type="string">root url.</param> 12 13 // disable ajax caching by default 14 $.ajaxSetup({ cache: false }); 15 16 // set the root url 17 _root = root; 18 if (_root.indexOf("/", _root.length - 1) === -1) { 19 _root += "/"; 20 } 21 }; 22 23 var area = function (area) { 24 /// <summary> 25 /// This function gets or sets the MVC area of the current page 26 /// </summary> 27 /// <param name="area" type="type">The MVC area of the current page</param> 28 /// <returns type=""></returns> 29 if (typeof area === 'undefined') { 30 return _area; 31 } else { 32 _area = area; 33 } 34 }; 35 36 var controller = function (ctrlr) { 37 /// <summary> 38 /// This function gets or sets the MVC controller of the current page 39 /// </summary> 40 /// <param name="ctrlr" type="type">The MVC controller of the current page</param> 41 /// <returns type=""></returns> 42 if (typeof ctrlr === 'undefined') { 43 return _controller; 44 } else { 45 _controller = ctrlr; 46 } 47 }; 48 49 var action = function (action) { 50 /// <summary> 51 /// This function gets or sets the MVC action of the current page 52 /// </summary> 53 /// <param name="action" type="type">The MVC action of the current page</param> 54 /// <returns type=""></returns> 55 if (typeof action === 'undefined') { 56 return _action; 57 } else { 58 _action = action; 59 } 60 }; 61 62 var getStudentId = function () { 63 /// <summary> 64 /// This function returns the student ID associated with the current page. And exception will be thrown if the current page does not contain the student banner. 65 /// </summary> 66 /// <returns type="">The student ID associated with the current page.</returns> 67 var $banner = $('.sg-banner'); 68 if (!$banner.length) throw "The GetStudentId method cannot be called when the banner is not loaded."; 69 70 return $banner.data('student-id'); 71 }; 72 73 var getContactId = function () { 74 /// <summary> 75 /// This function returns the contact ID of the logged in user. And exception will be thrown if the current page does not contain the student banner. 76 /// </summary> 77 /// <returns type="">The contact ID of the logged in user.</returns> 78 var $banner = $('.sg-banner'); 79 if (!$banner.length) throw "The GetContactId method cannot be called when the banner is not loaded."; 80 81 return $banner.data('contact-id'); 82 }; 83 84 var rootUrl = function () { 85 /// <summary>Returns the application root URL.</summary> 86 87 return _root; 88 }; 89 90 return { 91 Init: init, 92 Area: area, 93 Controller: controller, 94 Action: action, 95 GetStudentId: getStudentId, 96 GetContactId: getContactId, 97 RootUrl: rootUrl 98 } 99}();
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.