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EAEV,CArBAvP,QAAQyF,OAAO,cAAc+J,UAAU,eAAgBmK,GAGvDA,EAAsBjU,QAAU,CAAC,cAmBjC,CA1BD,GCAA,WACC,aASA,SAASkU,EAAwBzK,EAAa0K,EAA2B7L,GAExE,IAAI2B,EAAKxL,KACTwL,EAAGC,SAAU,EACbD,EAAGmK,mBAAoB,EACvBnK,EAAGoK,kBAAmB,EACtBpK,EAAGqK,WAAa,GAChBrK,EAAGpE,UAAY,GAUdoE,EAAGC,SAAU,EAGb5B,EAAuB0C,YAAY,oBAcpC,SAAsBnF,GAErBoE,EAAGpE,UAAYA,GAAa,EAC7B,IAdCsO,EAA0BpS,OAAO,CAAE,OAAU,CAAE,wBAAwB,KAAU2B,MAAK,SAAS4Q,GAE9FrK,EAAGqK,WAAaA,EAGhBrK,EAAGC,SAAU,CACd,GASF,CA5CA5P,QAAQyF,OAAO,cAAcqK,WAAW,4BAA6B8J,GAGrEA,EAAwBlU,QAAU,CAAC,cAAe,+BAAgC,2BA0ClF,CAjDD,GCAA,WACC,aASA,SAASuU,EAAuB9K,GAE/B,MAAO,CACNC,SAAU,IACVC,YAAaF,EAAYG,iBAAmB,8DAC5CQ,WAAY,4BACZE,aAAc,oBACdT,MAAO,CAAC,EAEV,CAfAvP,QAAQyF,OAAO,cAAc+J,UAAU,gBAAiByK,GAGxDA,EAAuBvU,QAAU,CAAC,cAalC,CApBD","sources":["webpack://nha.portal.web/./app/scripts/sv-element.decorator.js","webpack://nha.portal.web/./app/_global.js","webpack://nha.portal.web/./app/app.js","webpack://nha.portal.web/./app/repositories/birthday.repository.js","webpack://nha.portal.web/./app/repositories/color.repository.js","webpack://nha.portal.web/./app/repositories/config-frontend-web-source.repository.js","webpack://nha.portal.web/./app/repositories/config.repository.js","webpack://nha.portal.web/./app/repositories/portal-link-business-application.repository.js","webpack://nha.portal.web/./app/repositories/portal-link-group-link.repository.js","webpack://nha.portal.web/./app/repositories/portal-link-group.repository.js","webpack://nha.portal.web/./app/repositories/portal-link-location.repository.js","webpack://nha.portal.web/./app/repositories/portal-link-role.repository.js","webpack://nha.portal.web/./app/repositories/portal-link.repository.js","webpack://nha.portal.web/./app/repositories/portal-quick-link.repository.js","webpack://nha.portal.web/./app/repositories/staff-favorite.repository.js","webpack://nha.portal.web/./app/managers/portal-app-context.manager.js","webpack://nha.portal.web/./app/managers/portal-favorites.manager.js","webpack://nha.portal.web/./app/directives/nha-branding/nha-branding.directive.js","webpack://nha.portal.web/./app/directives/portal-app-logo/portal-app-logo.controller.js","webpack://nha.portal.web/./app/directives/portal-app-logo/portal-app-logo.directive.js","webpack://nha.portal.web/./app/directives/portal-favorites/portal-favorites.controller.js","webpack://nha.portal.web/./app/directives/portal-favorites/portal-favorites.directive.js","webpack://nha.portal.web/./app/directives/portal-group-list/portal-group-list.controller.js","webpack://nha.portal.web/./app/directives/portal-group-list/portal-group-list.directive.js","webpack://nha.portal.web/./app/directives/portal-group/portal-group.controller.js","webpack://nha.portal.web/./app/directives/portal-group/portal-group.directive.js","webpack://nha.portal.web/./app/directives/portal-launcher/portal-launcher.directive.js","webpack://nha.portal.web/./app/directives/portal-link-list/portal-link-list.controller.js","webpack://nha.portal.web/./app/directives/portal-link-list/portal-link-list.directive.js","webpack://nha.portal.web/./app/directives/portal-link/portal-link.controller.js","webpack://nha.portal.web/./app/directives/portal-link/portal-link.directive.js","webpack://nha.portal.web/./app/directives/portal-mini-launcher/portal-mini-launcher.controller.js","webpack://nha.portal.web/./app/directives/portal-mini-launcher/portal-mini-launcher.directive.js","webpack://nha.portal.web/./app/directives/portal-mini-search/portal-mini-search.controller.js","webpack://nha.portal.web/./app/directives/portal-mini-search/portal-mini-search.directive.js","webpack://nha.portal.web/./app/directives/portal-search/portal-search.controller.js","webpack://nha.portal.web/./app/directives/portal-search/portal-search.directive.js","webpack://nha.portal.web/./app/directives/portal-search/portal-search.manager.js","webpack://nha.portal.web/./app/directives/portal-search/search-result/search-result.controller.js","webpack://nha.portal.web/./app/directives/portal-search/search-result/search-result.directive.js","webpack://nha.portal.web/./app/directives/portal-sidebar/portal-sidebar.controller.js","webpack://nha.portal.web/./app/directives/portal-sidebar/portal-sidebar.directive.js"],"sourcesContent":["/**\n * sv-element decorator\n * @namespace angular-sortable-view\n */\n\n(function() {\n\t'use strict';\n\n\t/** decorate the sv-element directive */\n\tangular.module('angular-sortable-view').config(config);\n\n\t/** injection */\n\tconfig.$inject = ['$provide'];\n\tsvElementDecorator.$inject = ['$delegate', '$parse'];\n\n\t/** config implementation */\n\tfunction config($provide) {\n\t\t/** create the sv-element decorator */\n\t\t$provide.decorator('svElementDirective', svElementDecorator);\n\t}\n\n\t/** svElementDecorator implementation */\n\tfunction svElementDecorator($delegate, $parse) {\n\t\t/** get the directive */\n\t\tvar directive = $delegate[0];\n\n\t\t/** set compile function */\n\t\tdirective.compile = compileFunc;\n\n\t\t/** compileFunc implementation */\n\t\tfunction compileFunc() {\n\t\t\treturn newLinkFunc;\n\t\t}\n\n\t\t/** create new link function */\n\t\tfunction newLinkFunc($scope, $element, $attrs, $controllers) {\n\t\t\tvar sortableElement = {\n\t\t\t\telement: $element,\n\t\t\t\tgetPart: $controllers[0].getPart,\n\t\t\t\tgetIndex: function(){\n\t\t\t\t\treturn $scope.$index;\n\t\t\t\t}\n\t\t\t};\n\t\t\t$controllers[1].addToSortableElements(sortableElement);\n\t\t\t$scope.$on('$destroy', function(){\n\t\t\t\t$controllers[1].removeFromSortableElements(sortableElement);\n\t\t\t});\n\n\t\t\tvar handle = $element;\n\n\t\t\t/******************************************************************************************\n\t\t\t * PATCHED AREA OF CODE\n\t\t\t * https://github.com/RobertjanTuit/angular-sortable-view/commit/2d9438e70ce6df6373dec0cf5c4ff341eaffbf3a\n\t\t\t******************************************************************************************/\n\n\t\t\tvar startTimer;\n\t\t\tvar clearEvent = function() {\n\t\t\t\tclearTimeout(startTimer);\n\t\t\t};\n\n\t\t\tvar opts = $parse($attrs.svElement)($scope);\n\t\t\topts = angular.extend({}, {\n\t\t\t\tdelay: 0\n\t\t\t}, opts);\n\n\t\t\t/** check for disabled flag */\n\t\t\tif (opts.disabled !== true) {\n\t\t\t\tvar event = onMousedown;\n\t\t\t\tif (opts.delay) {\n\t\t\t\t\tevent = function (e) {\n\t\t\t\t\t\thtml.on('mouseup touchend', clearEvent);\n\t\t\t\t\t\tstartTimer = setTimeout(function () { onMousedown(e); }, opts.delay);\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\thandle.on('mousedown touchstart', event);\n\n\t\t\t\t$scope.$watch('$ctrl.handle', function(customHandle){\n\t\t\t\t\tif(customHandle){\n\t\t\t\t\t\tclearEvent();\n\t\t\t\t\t\thandle.off('mousedown touchstart', event);\n\t\t\t\t\t\thandle = customHandle;\n\t\t\t\t\t\thandle.on('mousedown touchstart', event);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t/******************************************************************************************/\n\n\t\t\tvar helper;\n\t\t\t$scope.$watch('$ctrl.helper', function(customHelper){\n\t\t\t\tif(customHelper){\n\t\t\t\t\thelper = customHelper;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tvar placeholder;\n\t\t\t$scope.$watch('$ctrl.placeholder', function(customPlaceholder){\n\t\t\t\tif(customPlaceholder){\n\t\t\t\t\tplaceholder = customPlaceholder;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tvar html = angular.element(document.documentElement);\n\n\t\t\tvar moveExecuted;\n\n\t\t\tfunction onMousedown(e){\n\t\t\t\ttouchFix(e);\n\n\t\t\t\tif($controllers[1].sortingInProgress()) return;\n\t\t\t\tif(e.button !== 0 && e.type === 'mousedown') return;\n\n\t\t\t\t// START - for Behavior Module : Student's List page - Bug #20772\n\t\t\t\tvar isForBehaviorList = false;\n\n\t\t\t\tif (e.toElement) {\n if (e.toElement.ownerDocument) {\n if (e.toElement.ownerDocument.URL.indexOf('behavior') > 0 && e.toElement.ownerDocument.URL.indexOf('list') > 0) {\n var words = _.words(e.toElement.ownerDocument.URL);\n\n var numbers = _.remove(words, function (n) {\n return !isNaN(n);\n });\n\n numbers = _.drop(numbers, 2); // drop unncessary course info\n\n numbers = _.chunk(numbers, 3); // split array to compare dates\n\n isForBehaviorList = _.difference(numbers[0], numbers[1]).length === 0;\n }\n }\n }\n\t\t\t\t// END - for Behavior Module : Student's List page\n\n\t\t\t\tmoveExecuted = false;\n\t\t\t\tvar opts = $parse($attrs.svElement)($scope);\n\t\t\t\topts = angular.extend({}, {\n\t\t\t\t\ttolerance: 'pointer',\n\t\t\t\t\trevert: 200,\n\t\t\t\t\tcontainment: 'html'\n\t\t\t\t}, opts);\n\t\t\t\tif(opts.containment){\n\t\t\t\t\tvar containmentRect = closestElement.call($element, opts.containment)[0].getBoundingClientRect();\n\t\t\t\t}\n\n\t\t\t\tvar target = $element;\n\t\t\t\tvar clientRect = $element[0].getBoundingClientRect();\n\t\t\t\tvar clone;\n\n\t\t\t\tif(!helper) helper = $controllers[0].helper;\n\t\t\t\tif(!placeholder) placeholder = $controllers[0].placeholder;\n\t\t\t\tif(helper){\n\t\t\t\t\tclone = helper.clone();\n\t\t\t\t\tclone.removeClass('ng-hide');\n\t\t\t\t\tclone.css({\n\t\t\t\t\t 'left': clientRect.left + document.body.scrollLeft + 'px',\n\t\t\t\t\t 'top': clientRect.top + document.body.scrollTop + 'px'\n\t\t\t\t\t});\n\t\t\t\t\ttarget.addClass('sv-visibility-hidden');\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tclone = target.clone();\n\n\t\t\t\t\tvar width = isForBehaviorList ? (clone.context.clientWidth - clone.context.lastElementChild.clientWidth) : clientRect.width;\n\n\t\t\t\t\tclone.addClass('sv-helper').css({\n\t\t\t\t\t 'left': clientRect.left + document.body.scrollLeft + 'px',\n\t\t\t\t\t 'top': clientRect.top + document.body.scrollTop + 'px',\n\t\t\t\t\t 'width': width + 'px'\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tclone[0].reposition = function(coords){\n\t\t\t\t\tvar targetLeft = coords.x;\n\t\t\t\t\tvar targetTop = coords.y;\n\t\t\t\t\tvar helperRect = clone[0].getBoundingClientRect();\n\n\t\t\t\t\tvar body = document.body;\n\n\t\t\t\t\tif(containmentRect){\n\t\t\t\t\t\tif(targetTop < containmentRect.top + body.scrollTop) // top boundary\n\t\t\t\t\t\t\ttargetTop = containmentRect.top + body.scrollTop;\n\t\t\t\t\t\tif(targetTop + helperRect.height > containmentRect.top + body.scrollTop + containmentRect.height) // bottom boundary\n\t\t\t\t\t\t\ttargetTop = containmentRect.top + body.scrollTop + containmentRect.height - helperRect.height;\n\t\t\t\t\t\tif(targetLeft < containmentRect.left + body.scrollLeft) // left boundary\n\t\t\t\t\t\t\ttargetLeft = containmentRect.left + body.scrollLeft;\n\t\t\t\t\t\tif(targetLeft + helperRect.width > containmentRect.left + body.scrollLeft + containmentRect.width) // right boundary\n\t\t\t\t\t\t\ttargetLeft = containmentRect.left + body.scrollLeft + containmentRect.width - helperRect.width;\n\t\t\t\t\t}\n\t\t\t\t\tthis.style.left = targetLeft - body.scrollLeft + 'px';\n\t\t\t\t\tthis.style.top = targetTop - body.scrollTop + 'px';\n\t\t\t\t};\n\n var pointerOffset = {\n x: (e.clientX - clientRect.left)/clientRect.width,\n y: (e.clientY - clientRect.top)/clientRect.height\n };\n\t\t\t\thtml.addClass('sv-sorting-in-progress');\n\t\t\t\thtml.on('mousemove touchmove', onMousemove).on('mouseup touchend touchcancel', function mouseup(){\n\t\t\t\t\thtml.off('mousemove touchmove', onMousemove);\n\t\t\t\t\thtml.off('mouseup touchend', mouseup);\n\t\t\t\t\thtml.removeClass('sv-sorting-in-progress');\n\t\t\t\t\tif(moveExecuted){\n\t\t\t\t\t\t$controllers[0].$drop($scope.$index, opts);\n\t\t\t\t\t}\n\t\t\t\t\t$element.removeClass('sv-visibility-hidden');\n\t\t\t\t});\n\n\t\t\t\t// onMousemove(e);\n\t\t\t\tfunction onMousemove(e){\n\t\t\t\t\ttouchFix(e);\n\t\t\t\t\tif(!moveExecuted){\n\t\t\t\t\t\t$element.parent().prepend(clone);\n\t\t\t\t\t\tmoveExecuted = true;\n\t\t\t\t\t}\n\t\t\t\t\t$controllers[1].$moveUpdate(opts, {\n\t\t\t\t\t\tx: e.clientX,\n\t\t\t\t\t\ty: e.clientY,\n\t\t\t\t\t\toffset: pointerOffset\n\t\t\t\t\t}, clone, $element, placeholder, $controllers[0].getPart(), $scope.$index);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/** add methods from original sv-sort module that only exist in its context */\n\t\tfunction touchFix(e){\n\t\t\tif(!('clientX' in e) && !('clientY' in e)) {\n\t\t\t\tvar touches = e.touches || e.originalEvent.touches;\n\t\t\t\tif(touches && touches.length) {\n\t\t\t\t\te.clientX = touches[0].clientX;\n\t\t\t\t\te.clientY = touches[0].clientY;\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t}\n\t\tvar closestElement = angular.element.prototype.closest || function (selector){\n\t\t\tvar el = this[0].parentNode;\n\t\t\twhile(el !== document.documentElement && !el[matchingFunction](selector))\n\t\t\t\tel = el.parentNode;\n\t\t\tif(el[matchingFunction](selector))\n\t\t\t\treturn angular.element(el);\n\t\t\telse\n\t\t\t\treturn angular.element();\n\t\t};\n\n\t\t/** return the delegate */\n\t\treturn $delegate;\n\t}\n})();","/**\n * Global Script\n * @namespace curriculum\n */\n\n/** String object extensions */\n\n(function () {\n\t'use strict';\n\n\t/** check to see if a string contains another string */\n\tString.prototype.contains = function(str){\n\t\treturn this.toLowerCase().indexOf(str.toLowerCase()) > -1;\n\t};\n\n\t/** remove the specified string from the given string */\n\tString.prototype.remove = function(str){\n\t\tif (this.contains(str)) return this.replace(str, '');\n\t};\n\n\t/** strip html */\n\tString.prototype.stripHtml = function() {\n\t\tvar tmp = document.createElement('div');\n\t\ttmp.innerHTML = this;\n\t\treturn tmp.textContent || tmp.innerText || '';\n\t};\n\n\t/** Array Extensions */\n\n\t/** check an array for an item and return true or false */\n\tArray.prototype.contains = function(item){\n\t\treturn $.inArray(item, this) > -1;\n\t};\n\n\t/** remove an entry from an array */\n\tArray.prototype.remove = function(item){\n\t\tif (this.contains(item)){\n\t\t\tthis.splice($.inArray(item, this), 1);\n\t\t}\n\t};\n\n\t/** compare array to another array and return missing values */\n\tArray.prototype.compare = function(array){\n\t\tvar missingValues = [];\n\t\tfor (var i = 0; i < this.length; i++){\n\t\t\tif (!array.contains(this[i])) missingValues.push(this[i]);\n\t\t}\n\t\treturn missingValues;\n\t};\n})();","/**\n * app\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** create the nha.portal module */\n\tangular.module('nha.portal', _ng.moduleInit(['nha.core']));\n})();","/**\n * birthday.repository\n * @namespace portal\n * @description This should probably move to a separate module for the DataWarehouse once it has a web application, or we move to the CDN\n */\n\n(function () {\n\t'use strict';\n\n\t/** add the repo */\n\tangular.module('nha.portal').service('birthday.repository', birthdayRepo);\n\n\t/** injection */\n\tbirthdayRepo.$inject = ['repositoryFactory', 'DataWarehouseRestangular'];\n\n\t/** implementation */\n\tfunction birthdayRepo(repositoryFactory, dataWarehouseRestangular) {\n\t\t/** create the repo */\n\t\tvar repo = new repositoryFactory('Birthday', dataWarehouseRestangular);\n\n\t\t/** return the repo */\n\t\treturn repo;\n\t}\n})();","/**\n * color.repository\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** add the repo */\n\tangular.module('nha.portal').service('color.repository', colorRepo);\n\n\t/** injection */\n\tcolorRepo.$inject = ['$q'];\n\n\t/** implementation */\n\tfunction colorRepo($q) {\n\t\t/** private properties */\n\t\tvar colors = [\n\t\t\t{ 'label': 'Gray', 'value': '#8E9697'},\n\t\t\t{ 'label': 'Blue', 'value': '#00D3F7'},\n\t\t\t{ 'label': 'Medium Blue', 'value': '#00AEEF' },\n\t\t\t{ 'label': 'Dark Blue', 'value': '#00539F' },\n\t\t\t{ 'label': 'Green', 'value': '#AED900'},\n\t\t\t{ 'label': 'Dark Green', 'value': '#77B800'},\n\t\t\t{ 'label': 'Orange', 'value': '#FE6401'}\n\t\t];\n\n\t\t/** get the colors */\n\t\tfunction getAll() {\n\t\t\t/** create a promise */\n\t\t\tvar deferred = $q.defer();\n\n\t\t\t/** resolve the promise */\n\t\t\tdeferred.resolve(colors);\n\n\t\t\t/** return the promise */\n\t\t\treturn deferred.promise;\n\t\t}\n\n\t\t/** create the service */\n\t\tvar service = {\n\t\t\tgetAll: getAll\n\t\t};\n\n\t\t/** return the service */\n\t\treturn service;\n\t}\n})();","(function () {\r\n\t'use strict';\r\n\r\n\tangular.module('nha.portal').service('config-frontend-web-source.repository', configFrontEndWebSourceRepo);\r\n\r\n\tconfigFrontEndWebSourceRepo.$inject = ['PortalRestangular', 'baseService'];\r\n\r\n\tfunction configFrontEndWebSourceRepo(portalRestangular, baseService) {\r\n\t\t/** create the repo */\r\n\t\tvar repo = {\r\n\t\t\tendpoint: 'ConfigFrontEndWebSource',\r\n\t\t\tgetKeys: getKeys,\r\n\t\t\tgetEnvironments: getEnvironments\r\n\t\t};\r\n\r\n\t\t/** public methods */\r\n\r\n\t\tfunction getKeys() {\r\n\t\t\treturn baseService.getList(repo.endpoint.concat('/keys/'), null, false, false, portalRestangular);\r\n\t\t}\r\n\r\n\t\tfunction getEnvironments() {\r\n\t\t\treturn baseService.getList(repo.endpoint.concat('/environments/'), null, false, false, portalRestangular);\r\n\t\t}\r\n\r\n\t\t/** return the repo */\r\n\t\treturn repo;\r\n\t}\r\n}());","(function () {\r\n\t'use strict';\r\n\r\n\tangular.module('nha.portal').service('config.repository', configRepo);\r\n\r\n\tconfigRepo.$inject = ['PortalRestangular', 'baseService'];\r\n\r\n\tfunction configRepo(portalRestangular, baseService) {\r\n\t\t/** create the repo */\r\n\t\tvar repo = {\r\n\t\t\tendpoint: 'config',\r\n\t\t\tgetSettings: getSettings,\r\n\t\t\tgetEnvironments: getEnvironments,\r\n\t\t\tsaveSetting: saveSetting,\r\n\t\t\tremoveSetting: removeSetting,\r\n\t\t\thasApplication: hasApplication\r\n\t\t};\r\n\r\n\t\t/** public methods */\r\n\r\n\t\tfunction getEnvironments() {\r\n\t\t\treturn baseService.getList(repo.endpoint.concat('/environments'), null, false, false, portalRestangular);\r\n\t\t}\r\n\r\n\t\tfunction getSettings() {\r\n\t\t\treturn baseService.getList(repo.endpoint.concat('/settings'), null, false, false, portalRestangular);\r\n\t\t}\r\n\r\n\t\tfunction saveSetting(setting) {\r\n\t\t\treturn portalRestangular.all(repo.endpoint.concat('/settings/save')).customPOST(setting);\r\n\t\t}\r\n\r\n\t\tfunction removeSetting(settingID) {\r\n\t\t\treturn portalRestangular.one(repo.endpoint.concat('/settings/remove'), settingID).remove();\r\n\t\t}\r\n\r\n\t\tfunction hasApplication(schoolID, settingKey) {\r\n\t\t\treturn portalRestangular.all(this.endpoint + '/hasapplication?schoolID=' + schoolID + '&settingKey=' + settingKey).customGET().then(function (result) {\r\n\t\t\t\treturn result;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t/** return the repo */\r\n\t\treturn repo;\r\n\t}\r\n}());","/**\n * portal-link-busiess-application.repository\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** add the repo */\n\tangular.module('nha.portal').service('portal-link-busiess-application.repository', portalLinkBusinessApplicationRepo);\n\n\t/** injection */\n\tportalLinkBusinessApplicationRepo.$inject = ['repositoryFactory', 'PortalRestangular'];\n\n\t/** implementation */\n\tfunction portalLinkBusinessApplicationRepo(repositoryFactory, portalRestangular) {\n\t\t/** create the repo */\n\t\tvar repo = new repositoryFactory('PortalLinkBusinessApplication', portalRestangular);\n\n\t\t/** return the repo */\n\t\treturn repo;\n\t}\n})();","/**\n * portal-link-group-link.repository\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** add the repo */\n\tangular.module('nha.portal').service('portal-link-group-link.repository', portalLinkGroupLinkRepo);\n\n\t/** injection */\n\tportalLinkGroupLinkRepo.$inject = ['repositoryFactory', 'PortalRestangular'];\n\n\t/** implementation */\n\tfunction portalLinkGroupLinkRepo(repositoryFactory, portalRestangular) {\n\t\t/** create the repo */\n\t\tvar repo = new repositoryFactory('PortalLinkGroupLink', portalRestangular);\n\n\t\t/** additional public methods */\n\t\trepo.getForGroup = getForGroup;\n\t\trepo.reorder = reorder;\n\n\t\t/** reorder the group links */\n\t\tfunction reorder(groups) {\n\t\t\treturn this.put(groups, '/reorder');\n\t\t}\n\n\t\t/** get the group links */\n\t\tfunction getForGroup(groupID) {\n\t\t\t/** send request */\n\t\t\treturn portalRestangular.all(this.endpoint + '/getforgroup/' + groupID).customGET().then(function(portalLinkGroupLinks) {\n\t\t\t\t/** return group links */\n\t\t\t\treturn portalLinkGroupLinks;\n\t\t\t});\n\t\t}\n\n\t\t/** return the repo */\n\t\treturn repo;\n\t}\n})();","/**\n * portal-link-group.repository\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** add the repo */\n\tangular.module('nha.portal').service('portal-link-group.repository', portalLinkGroupRepo);\n\n\t/** injection */\n\tportalLinkGroupRepo.$inject = ['$q', 'repositoryFactory', 'PortalRestangular'];\n\n\t/** implementation */\n\tfunction portalLinkGroupRepo($q, repositoryFactory, portalRestangular) {\n\t\t/** private properties */\n\t\tvar portalGroups = [];\n\n\t\t/** create the repo */\n\t\tvar repo = new repositoryFactory('PortalLinkGroup', portalRestangular);\n\n\t\t/** additional public methods */\n\t\trepo.getForUser = getForUser;\n\t\trepo.reorder = reorder;\n\t\trepo.resetGroups = resetGroups;\n\n\t\t/** get the groups for the user */\n\t\tfunction getForUser() {\n\t\t\t/** create the promise */\n\t\t\tvar deferred = $q.defer();\n\n\t\t\t/** check for portal groups */\n\t\t\tif (portalGroups.length > 0) {\n\t\t\t\t/** set the current context */\n\t\t\t\tdeferred.resolve(portalGroups);\n\t\t\t} else {\n\t\t\t\t/** load portal links */\n\t\t\t\trepo.getAll({ 'filter': { 'IsEnabled': true } }).then(function(groups) {\n\t\t\t\t\t/** set portal groups */\n\t\t\t\t\tportalGroups = groups;\n\n\t\t\t\t\t/** set the current context */\n\t\t\t\t\tdeferred.resolve(portalGroups);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t/** return the promise */\n\t\t\treturn deferred.promise;\n\t\t}\n\n\t\t/** reorder the groups */\n\t\tfunction reorder(groups) {\n\t\t\treturn this.put(groups, '/reorder');\n\t\t}\n\n\t\t/** clear the groups */\n\t\tfunction resetGroups() {\n\t\t\tportalGroups = [];\n\t\t}\n\n\t\t/** return the repo */\n\t\treturn repo;\n\t}\n})();","/**\n * portal-link-location.repository\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** add the repo */\n\tangular.module('nha.portal').service('portal-link-location.repository', portalLinkLocationRepo);\n\n\t/** injection */\n\tportalLinkLocationRepo.$inject = ['repositoryFactory', 'PortalRestangular'];\n\n\t/** implementation */\n\tfunction portalLinkLocationRepo(repositoryFactory, portalRestangular) {\n\t\t/** create the repo */\n\t\tvar repo = new repositoryFactory('PortalLinkLocation', portalRestangular);\n\n\t\t/** additional public methods */\n\t\trepo.postAll = postAll;\n\n\t\t/** create multiple portal link location records */\n\t\tfunction postAll(portalLinkLocations) {\n\t\t\treturn portalRestangular.all(repo.endpoint.concat('/postall')).customPOST(portalLinkLocations);\n\t\t}\n\n\t\t/** return the repo */\n\t\treturn repo;\n\t}\n})();","/**\n * portal-link-role.repository\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** add the repo */\n\tangular.module('nha.portal').service('portal-link-role.repository', portalLinkRoleRepo);\n\n\t/** injection */\n\tportalLinkRoleRepo.$inject = ['repositoryFactory', 'PortalRestangular'];\n\n\t/** implementation */\n\tfunction portalLinkRoleRepo(repositoryFactory, portalRestangular) {\n\t\t/** create the repo */\n\t\tvar repo = new repositoryFactory('PortalLinkRole', portalRestangular);\n\n\t\t/** return the repo */\n\t\treturn repo;\n\t}\n})();","/**\n * portal-link.repository\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** add the repo */\n\tangular.module('nha.portal').service('portal-link.repository', portalLinkRepo);\n\n\t/** injection */\n\tportalLinkRepo.$inject = ['$q', 'repositoryFactory', 'PortalRestangular'];\n\n\t/** implementation */\n\tfunction portalLinkRepo($q, repositoryFactory, portalRestangular) {\n\t\t/** private properties */\n\t\tvar pageSize = 25;\n\t\tvar loadedCount = 0;\n\t\tvar moreExist = true;\n\t\tvar loadedLinks = [];\n\n\t\t/** create the repo */\n\t\tvar repo = new repositoryFactory('PortalLink', portalRestangular);\n\n\t\t/** public methods */\n\t\trepo.search = search;\n\t\trepo.getForSettingKey = getForSettingKey;\n\t\trepo.hasPortalLink = hasPortalLink;\n\t\trepo.load = load;\n\n\t\t/** search the subject codes */\n\t\tfunction search(searchString, portalLinkGroupID) {\n\t\t\t/** send request */\n\t\t\treturn portalRestangular.all(this.endpoint + '/search?searchString=' + searchString + (portalLinkGroupID ? '&excludeGroup=' + portalLinkGroupID : '')).customGET().then(function(matches) {\n\t\t\t\t/** return matches */\n\t\t\t\treturn matches;\n\t\t\t});\n\t\t}\n\n\t\t/** get for the settings key */\n\t\tfunction getForSettingKey(settingKey) {\n\t\t\t/** send request */\n\t\t\treturn portalRestangular.all(this.endpoint + '/getforsettingkey?settingKey=' + settingKey).customGET().then(function(portalLinks) {\n\t\t\t\t/** return portal links */\n\t\t\t\treturn portalLinks;\n\t\t\t});\n\t\t}\n\n\t\t/** check to see if the user has the portal link */\n\t\tfunction hasPortalLink(settingKey) {\n\t\t\t/** send request */\n\t\t\treturn portalRestangular.all(this.endpoint + '/haslink?settingKey=' + settingKey).customGET().then(function (result) {\n\t\t\t\t/** return boolean value */\n\t\t\t\treturn result;\n\t\t\t});\n\t\t}\n\n\t\t/** load portal links by paging */\n\t\tfunction load() {\n\t\t\t/** prepare params and repo */\n\t\t\tvar params = '?$top=' + pageSize + '&$skip=' + loadedCount + '&$orderby=PortalLinkName';\n\n\t\t\t/** check for moreExist */\n\t\t\tif (!moreExist) {\n\t\t\t\t/** return empty promise */\n\t\t\t\tvar deferred = $q.defer();\n\t\t\t\tdeferred.resolve(loadedLinks);\n\t\t\t\treturn deferred.promise;\n\t\t\t}\n\n\t\t\t/** load a page of data */\n\t\t\treturn this.getAll(null, { 'shouldCache': false, 'urlAppendString': params }).then(function(portalLinks) {\n\t\t\t\t/** add to loadedCount and check for more */\n\t\t\t\tloadedCount += portalLinks.length;\n\t\t\t\tif (portalLinks.length < pageSize) moreExist = false;\n\n\t\t\t\t/** add to loadedLinks and return */\n\t\t\t\tloadedLinks = loadedLinks.concat(portalLinks);\n\t\t\t\treturn loadedLinks;\n\t\t\t});\n\t\t}\n\n\t\t/** return the repo */\n\t\treturn repo;\n\t}\n})();","/**\n * portal-quick-link.repository\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** add the repo */\n\tangular.module('nha.portal').service('portal-quick-link.repository', portalQuickLinkRepo);\n\n\t/** injection */\n\tportalQuickLinkRepo.$inject = ['repositoryFactory', 'PortalRestangular'];\n\n\t/** implementation */\n\tfunction portalQuickLinkRepo(repositoryFactory, portalRestangular) {\n\t\t/** create the repo */\n\t\tvar repo = new repositoryFactory('PortalQuickLink', portalRestangular);\n\n\t\t/** additional public methods */\n\t\trepo.reorder = reorder;\n\n\t\t/** define custom method */\n\t\tfunction reorder(quicklinks) {\n\t\t\treturn this.put(quicklinks, '/reorder');\n\t\t}\n\n\t\t/** return the repo */\n\t\treturn repo;\n\t}\n})();","/**\n * staff-favorite.repository\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** add the repo */\n\tangular.module('nha.portal').service('staff-favorite.repository', staffFavoriteRepo);\n\n\t/** injection */\n\tstaffFavoriteRepo.$inject = ['repositoryFactory', 'PortalRestangular'];\n\n\t/** implementation */\n\tfunction staffFavoriteRepo(repositoryFactory, portalRestangular) {\n\t\t/** create the repo */\n\t\tvar repo = new repositoryFactory('StaffFavorite', portalRestangular);\n\n\t\t/** additional public methods */\n\t\trepo.getForUser = getForUser;\n\t\trepo.reorder = reorder;\n\t\trepo.deleteForUser = deleteForUser;\n\n\t\t/** get the favorites for a user */\n\t\tfunction getForUser() {\n\t\t\t/** send request */\n\t\t\treturn portalRestangular.all(this.endpoint + '/getforuser').customGET().then(function(staffFavorites) {\n\t\t\t\t/** return staff favorites */\n\t\t\t\treturn staffFavorites;\n\t\t\t});\n\t\t}\n\n\t\t/** define custom method */\n\t\tfunction reorder(favorites) {\n\t\t\treturn this.put(favorites, '/reorder');\n\t\t}\n\n\t\t/** delete the favorite for the user by the portalLinkID */\n\t\tfunction deleteForUser(portalLinkID) {\n\t\t\treturn portalRestangular.one(this.endpoint + '/deleteforuser', portalLinkID).remove();\n\t\t}\n\n\t\t/** return the repo */\n\t\treturn repo;\n\t}\n})();","/**\n * portal-app-context.manager\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** add manager */\n\tangular.module('nha.portal').service('portal-app-context.manager', portalAppContextManager);\n\n\t/** setup inject */\n\tportalAppContextManager.$inject = ['$q', '$state', '$interval', 'ipCookie', 'userContextService', 'appContextFactory'];\n\n\t/** implement the manager */\n\tfunction portalAppContextManager($q, $state, $interval, ipCookie, userContextService, appContextFactory) {\n\t\t/** instantiate the context manager */\n\t\tvar contextManager = new appContextFactory(null, [loadSchoolFromSelector]);\n\n\t\t/** private properties */\n\t\tvar appContextModel = contextManager.getContext();\n\n\t\t/** public methods */\n\t\tcontextManager.ensurePortalContext = ensurePortalContext;\n\t\tcontextManager.resetContext = resetContext;\n\t\tcontextManager.setBreadcrumbLabel = setBreadcrumbLabel;\n\n\t\t/** add load app context */\n\t\tfunction ensurePortalContext() {\n\t\t\t/** create a promise */\n\t\t\tvar deferred = $q.defer();\n\n\t\t\t/** check for context */\n\t\t\tif (appContextModel.school === null || !appContextModel.roles) {\n\t\t\t\t/** run the ensure app context */\n\t\t\t\tcontextManager.ensureAppContext().then(function(context) {\n\t\t\t\t\t/** set the current context */\n\t\t\t\t\tdeferred.resolve(context);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\t/** resolve with current context */\n\t\t\t\tdeferred.resolve(appContextModel);\n\t\t\t}\n\n\t\t\t/** return the promise */\n\t\t\treturn deferred.promise;\n\t\t}\n\n\t\t/** reset the context */\n\t\tfunction resetContext() {\n\t\t\t/** clear the context and reset */\n\t\t\t_.forIn(appContextModel, function(value, key) {\n\t\t\t\tappContextModel[key] = null;\n\t\t\t});\n\n\t\t\t/** reload the context */\n\t\t\treturn ensurePortalContext();\n\t\t}\n\n\t\t/** set a state's breadcrumb label */\n\t\tfunction setBreadcrumbLabel(stateName, value) {\n\t\t\t/** get the state config */\n\t\t\tvar config = $state.get(stateName);\n\t\t\tif (config && config.ncyBreadcrumb) {\n\t\t\t\tif (config.ncyBreadcrumb.label !== undefined) config.ncyBreadcrumb.label = value;\n\t\t\t\tif (config.ncyBreadcrumbLabel !== undefined) config.ncyBreadcrumbLabel = value;\n\t\t\t}\n\t\t}\n\n\t\t/** return the context manager */\n\t\treturn contextManager;\n\n\t\t/** private methods */\n\n\t\t/** load the school from the school selector */\n\t\tfunction loadSchoolFromSelector() {\n\t\t\t/** create the promise */\n\t\t\tvar deferred = $q.defer();\n\n\t\t\t/** state param not set so look for the cookie */\n\t\t\tuserContextService.ensureUserContext().then(function(context) {\n\t\t\t\t/** we need to wait for the school cookie to be set */\n\t\t\t\tvar interval = $interval(function() {\n\t\t\t\t\t/** attempt to get the cookie */\n\t\t\t\t\tvar defaultSchoolCookieName = 'nha.core.user-default-school.' + context['http://schemas.mynha.com/Savyint/UserID'];\n\t\t\t\t\tvar defaultSchool = ipCookie(defaultSchoolCookieName) !== null ? ipCookie(defaultSchoolCookieName) : null;\n\n\t\t\t\t\t/** has school been set */\n\t\t\t\t\tif (defaultSchool && defaultSchool !== null) {\n\t\t\t\t\t\t/** cancel the interval */\n\t\t\t\t\t\t$interval.cancel(interval);\n\t\t\t\t\t\tinterval = undefined;\n\n\t\t\t\t\t\t/** set the user roles */\n\t\t\t\t\t\tappContextModel.roles = context.role;\n\n\t\t\t\t\t\t/** set the app context school */\n\t\t\t\t\t\tappContextModel.school = defaultSchool;\n\n\t\t\t\t\t\t/** set the staff information */\n\t\t\t\t\t\tappContextModel.staffID = parseInt(context['http://schemas.mynha.com/SIS/Core/StaffID']);\n\t\t\t\t\t\tappContextModel.staffName = context.commonname;\n\n\t\t\t\t\t\t/** get the users schools */\n\t\t\t\t\t\tvar usersSchools = userContextService.getUserContext()[\"http://schemas.mynha.com/ILM/SchoolID\"];\n\t\t\t\t\t\tappContextModel.schoolIDs = (_.isArray(usersSchools) ? usersSchools : [usersSchools]);\n\n\t\t\t\t\t\t/** resolve the promise */\n\t\t\t\t\t\tdeferred.resolve();\n\t\t\t\t\t}\n\t\t\t\t}, 100);\n\t\t\t});\n\n\t\t\t/** return the promise */\n\t\t\treturn deferred.promise;\n\t\t}\n\t}\n})();","/**\n * portal-favorites.manager\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** add model */\n\tangular.module('nha.portal').service('portal-favorites.manager', portalFavoritesManager);\n\n\t/** setup injection */\n\tportalFavoritesManager.$inject = ['$q', 'pub-sub.factory', 'staff-favorite.repository'];\n\n\t/** implement the model */\n\tfunction portalFavoritesManager($q, pubSubFactory, staffFavoriteRepository) {\n\t\t/** create pub sub manager */\n\t\tvar pubSubManager = new pubSubFactory(['portal-favorites'], 'memory', 'portal');\n\n\t\t/** public methods */\n\t\tpubSubManager.getFavorites = getFavorites;\n\t\tpubSubManager.toggleFavorite = toggleFavorite;\n\t\tpubSubManager.reorderFavorites = reorderFavorites;\n\n\t\t/** return the pub sub */\n\t\treturn pubSubManager;\n\n\t\t/** public method implementations */\n\n\t\t/** retrieve the users favorites */\n\t\tfunction getFavorites() {\n\t\t\t/** create a promise */\n\t\t\tvar deferred = $q.defer();\n\n\t\t\t/** check for favorites data */\n\t\t\tvar favorites = pubSubManager.getData('portal-favorites');\n\t\t\tif (favorites !== null) {\n\t\t\t\t/** resolve with favorites */\n\t\t\t\tdeferred.resolve(favorites);\n\t\t\t} else {\n\t\t\t\t/** request favorites */\n\t\t\t\tstaffFavoriteRepository.getForUser().then(function(favorites) {\n\t\t\t\t\t/** set favorites */\n\t\t\t\t\tpubSubManager.setData('portal-favorites', favorites);\n\n\t\t\t\t\t/** resolve with favorites */\n\t\t\t\t\tdeferred.resolve(favorites);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t/** return the promise */\n\t\t\treturn deferred.promise;\n\t\t}\n\n\t\t/** favorite a link */\n\t\tfunction toggleFavorite(link) {\n\t\t\t/** create a promise */\n\t\t\tvar deferred = $q.defer();\n\n\t\t\t/** check the favorite flag */\n\t\t\tif (link.isFavorite) {\n\t\t\t\t/** delete the favorite */\n\t\t\t\tstaffFavoriteRepository.deleteForUser(link.portalLinkID).then(function() {\n\t\t\t\t\t/** toggle the isFavorite value */\n\t\t\t\t\tlink.isFavorite = false;\n\t\t\t\t\tremoveFavorite(link, deferred);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\t/** save the favorite */\n\t\t\t\tstaffFavoriteRepository.post({ 'portalLinkID': link.portalLinkID }).then(function(favorite) {\n\t\t\t\t\t/** toggle the isFavorite value */\n\t\t\t\t\tlink.favoriteOrderNumber = favorite.orderNumber;\n\t\t\t\t\tlink.isFavorite = true;\n\t\t\t\t\taddFavorite(link, deferred);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t/** return the promise */\n\t\t\treturn deferred.promise;\n\t\t}\n\n\t\t/** reorder the favorites */\n\t\tfunction reorderFavorites(favorites) {\n\t\t\t/** create a promise */\n\t\t\tvar deferred = $q.defer();\n\n\t\t\t/** delete the favorite */\n\t\t\tstaffFavoriteRepository.reorder(favorites).then(function() {\n\t\t\t\t/** set the new favorites */\n\t\t\t\tpubSubManager.setData('portal-favorites', favorites);\n\n\t\t\t\t/** resolve with favorites */\n\t\t\t\tdeferred.resolve(favorites);\n\t\t\t});\n\n\t\t\t/** return the promise */\n\t\t\treturn deferred.promise;\n\t\t}\n\n\t\t/** private methods */\n\n\t\t/** add a favorite */\n\t\tfunction addFavorite(link, deferred) {\n\t\t\t/** get the favorites and add one */\n\t\t\tgetFavorites().then(function(favorites) {\n\t\t\t\t/** add a favorite */\n\t\t\t\tfavorites.push(link);\n\n\t\t\t\t/** set the new favorites */\n\t\t\t\tpubSubManager.setData('portal-favorites', favorites);\n\n\t\t\t\t/** resolve with favorites */\n\t\t\t\tdeferred.resolve(favorites);\n\t\t\t});\n\t\t}\n\n\t\t/** remove a favorite */\n\t\tfunction removeFavorite(link, deferred) {\n\t\t\t/** get the favorites and add one */\n\t\t\tgetFavorites().then(function(favorites) {\n\t\t\t\t/** remove the favorite */\n\t\t\t\t_.remove(favorites, function(fav) {\n\t\t\t\t\treturn fav.portalLinkID === link.portalLinkID;\n\t\t\t\t});\n\n\t\t\t\t/** set the new favorites */\n\t\t\t\tpubSubManager.setData('portal-favorites', favorites);\n\n\t\t\t\t/** resolve with favorites */\n\t\t\t\tdeferred.resolve(favorites);\n\t\t\t});\n\t\t}\n\t}\n})();","/**\n * nha-branding.directive\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** get the angular module and add directive */\n\tangular.module('nha.portal').directive('nhaBranding', nhaBrandingDirective);\n\n\t/** injection */\n\tnhaBrandingDirective.$inject = ['appSettings'];\n\n\t/** implementation */\n\tfunction nhaBrandingDirective(appSettings) {\n\t\t/** return directive */\n\t\treturn {\n\t\t\trestrict: 'E',\n\t\t\treplace: true,\n\t\t\ttemplateUrl: appSettings.portalWebRootUrl + 'app/directives/nha-branding/nha-branding.directive.html',\n\t\t\tscope: {}\n\t\t};\n\t}\n})();","/**\n * portal-app-logo.controller\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** get the angular module and add controller */\n\tangular.module('nha.portal').controller('portal-app-logo.controller', portalAppLogoController);\n\n\t/** setup injection */\n\tportalAppLogoController.$inject = ['portal-link.repository'];\n\n\t/** implementation */\n\tfunction portalAppLogoController(portalLinkRepository) {\n\t\t/** pubic properties */\n\t\tvar vm = this;\n\t\tvm.loading = false;\n\t\tvm.portalLink = null;\n\n\t\t/** run init */\n\t\tinit();\n\n\t\t/** private methods */\n\n\t\t/** initialize */\n\t\tfunction init() {\n\t\t\t/** flip loading flag */\n\t\t\tvm.loading = true;\n\n\t\t\t/** get the corresponding portal links */\n\t\t\tportalLinkRepository.getForSettingKey(vm.settingKey).then(function(portalLink) {\n\t\t\t\t/** set the portal link */\n\t\t\t\tvm.portalLink = portalLink;\n\n\t\t\t\t/** flip loading flag */\n\t\t\t\tvm.loading = false;\n\t\t\t});\n\t\t}\n\t}\n})();","/**\n * portal-app-logo.directive\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** get the angular module and add directive */\n\tangular.module('nha.portal').directive('portalAppLogo', portalAppLogoDirective);\n\n\t/** injection */\n\tportalAppLogoDirective.$inject = ['appSettings'];\n\n\t/** implementation */\n\tfunction portalAppLogoDirective(appSettings) {\n\t\t/** return directive */\n\t\treturn {\n\t\t\trestrict: 'E',\n\t\t\treplace: true,\n\t\t\ttemplateUrl: appSettings.portalWebRootUrl + 'app/directives/portal-app-logo/portal-app-logo.directive.html',\n\t\t\tcontroller: 'portal-app-logo.controller',\n\t\t\tcontrollerAs: 'portalAppLogoCtrl',\n\t\t\tbindToController: {\n\t\t\t\tsettingKey: '=',\n\t\t\t\tisTraining: '=?'\n\t\t\t},\n\t\t\tscope: {}\n\t\t};\n\t}\n})();","/**\n * portal-favorites.controller\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** get the angular module and add controller */\n\tangular.module('nha.portal').controller('portal-favorites.controller', portalFavoritesController);\n\n\t/** setup injection */\n\tportalFavoritesController.$inject = ['toastr', 'portal-favorites.manager'];\n\n\t/** implementation */\n\tfunction portalFavoritesController(toastr, portalFavoritesManager) {\n\t\t/** pubic properties */\n\t\tvar vm = this;\n\t\tvm.loading = false;\n\t\tvm.favorites = [];\n\n\t\t/** public methods */\n\t\tvm.reorder = reorder;\n\n\t\t/** run init */\n\t\tinit();\n\n\t\t/** public method implementations */\n\n\t\t/** reorder the user favorites */\n\t\tfunction reorder() {\n\t\t\t/** set the order number value */\n\t\t\tangular.forEach(vm.favorites, function(fav, index) {\n\t\t\t\tfav.favoriteOrderNumber = (index + 1);\n\t\t\t});\n\n\t\t\t/** save the reordered extension types */\n\t\t\tportalFavoritesManager.reorderFavorites(vm.favorites).then(function() {\n\t\t\t\t/** show success message */\n\t\t\t\ttoastr.success('Favorites reordered successfully.', 'Save Successful', { positionClass: 'toast-bottom-right' });\n\t\t\t});\n\t\t}\n\n\t\t/** private methods */\n\n\t\t/** initialize */\n\t\tfunction init() {\n\t\t\t/** flip loading flag */\n\t\t\tvm.loading = true;\n\n\t\t\t/** get the user favorites */\n\t\t\tportalFavoritesManager.getFavorites().then(function(favorites) {\n\t\t\t\t/** set favorites */\n\t\t\t\tvm.favorites = favorites;\n\n\t\t\t\t/** set the favorites callback */\n\t\t\t\tportalFavoritesManager.addCallback('portal-favorites', setFavorites);\n\n\t\t\t\t/** flip loading flag */\n\t\t\t\tvm.loading = false;\n\t\t\t});\n\t\t}\n\n\t\t/** callback for favorites */\n\t\tfunction setFavorites(favorites) {\n\t\t\t/** set the favorites */\n\t\t\tvm.favorites = favorites || [];\n\t\t}\n\t}\n})();","/**\n * portal-favorites.directive\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** get the angular module and add directive */\n\tangular.module('nha.portal').directive('portalFavorites', portalFavoritesDirective);\n\n\t/** injection */\n\tportalFavoritesDirective.$inject = ['appSettings'];\n\n\t/** implementation */\n\tfunction portalFavoritesDirective(appSettings) {\n\t\t/** return directive */\n\t\treturn {\n\t\t\trestrict: 'E',\n\t\t\ttemplateUrl: appSettings.portalWebRootUrl + 'app/directives/portal-favorites/portal-favorites.directive.html',\n\t\t\tcontroller: 'portal-favorites.controller',\n\t\t\tcontrollerAs: 'portalFavoritesCtrl',\n\t\t\tscope: {}\n\t\t};\n\t}\n})();","/**\n * portal-group-list.controller\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** get the angular module and add controller */\n\tangular.module('nha.portal').controller('portal-group-list.controller', portalGroupListController);\n\n\t/** setup injection */\n\tportalGroupListController.$inject = ['$timeout', 'portal-link-group.repository', 'portal-link.repository'];\n\n\t/** implementation */\n\tfunction portalGroupListController($timeout, portalLinkGroupRepository, portalLinkRepository) {\n\t\t/** pubic properties */\n\t\tvar vm = this;\n\t\tvm.loading = false;\n\t\tvm.portalGroups = [];\n\t\tvm.searching = false;\n\t\tvm.searchString = '';\n\t\tvm.searchResults = [];\n\n\t\t/** public methods */\n\t\tvm.searchLinks = searchLinks;\n\t\tvm.closeSearch = closeSearch;\n\n\t\t/** run init */\n\t\tinit();\n\n\t\t/** public method implementations */\n\n\t\t/** search for links */\n\t\tfunction searchLinks() {\n\t\t\t/** reset matches */\n\t\t\tvm.searchResults = [];\n\n\t\t\t/** check the length */\n\t\t\tif (vm.searchString.length < 2) return;\n\n\t\t\t/** place search in timeout so that old results don't still display */\n\t\t\t$timeout(function() {\n\t\t\t\t/** flip searching flag */\n\t\t\t\tvm.searching = true;\n\n\t\t\t\t/** load portal links */\n\t\t\t\tportalLinkRepository.search(vm.searchString).then(function(matches) {\n\t\t\t\t\t/** set search results */\n\t\t\t\t\tvm.searchResults = matches;\n\n\t\t\t\t\t/** flip searching flag */\n\t\t\t\t\tvm.searching = false;\n\t\t\t\t});\n\t\t\t}, 100);\n\t\t}\n\n\t\t/** close the search results */\n\t\tfunction closeSearch() {\n\t\t\t/** reset values */\n\t\t\tvm.searchString = '';\n\t\t\tvm.searchResults = [];\n\t\t}\n\n\t\t/** private methods */\n\t\t\n\t\t/** initialize */\n\t\tfunction init() {\n\t\t\t/** flip loading flag */\n\t\t\tvm.loading = true;\n\n\t\t\t/** load portal links */\n\t\t\tportalLinkGroupRepository.getForUser().then(function(portalGroups) {\n\t\t\t\t/** set portal groups */\n\t\t\t\tvm.portalGroups = portalGroups.filter(function(g){ return g.linkCount > 0; });\n\n\t\t\t\t/** flip loading flag */\n\t\t\t\tvm.loading = false;\n\t\t\t});\n\t\t}\n\t}\n})();","/**\n * portal-group-list.directive\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** get the angular module and add directive */\n\tangular.module('nha.portal').directive('portalGroupList', portalGroupListDirective);\n\n\t/** injection */\n\tportalGroupListDirective.$inject = ['appSettings'];\n\n\t/** implementation */\n\tfunction portalGroupListDirective(appSettings) {\n\t\t/** return directive */\n\t\treturn {\n\t\t\trestrict: 'E',\n\t\t\ttemplateUrl: appSettings.portalWebRootUrl + 'app/directives/portal-group-list/portal-group-list.directive.html',\n\t\t\tcontroller: 'portal-group-list.controller',\n\t\t\tcontrollerAs: 'portalGroupListCtrl',\n\t\t\tscope: {}\n\t\t};\n\t}\n})();","/**\n * portal-group.controller\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** get the angular module and add controller */\n\tangular.module('nha.portal').controller('portal-group.controller', portalGroupController);\n\n\t/** setup injection */\n\tportalGroupController.$inject = ['$scope', '$window', '$q', '$timeout', 'portal-link-group-link.repository', 'portal-favorites.manager'];\n\n\t/** implementation */\n\tfunction portalGroupController($scope, $window, $q, $timeout, portalLinkGroupLinkRepository, portalFavoritesManager) {\n\t\t/** private properties */\n\t\tvar windowElement = angular.element($window);\n\t\tvar groupLinks = [];\n\t\t\n\t\t/** pubic properties */\n\t\tvar vm = this;\n\t\tvm.loading = false;\n\t\tvm.showLinks = false;\n\t\tvm.groupLinks = [];\n\t\tvm.fixedLinks = false;\n\n\t\t/** public methods */\n\t\tvm.viewLinks = viewLinks;\n\t\tvm.close = close;\n\n\t\t/** run init */\n\t\tinit();\n\n\t\t/** public method implementations */\n\n\t\t/** view the links for the group */\n\t\tfunction viewLinks() {\n\t\t\t/** check for preview */\n\t\t\tif (vm.preview) return;\n\n\t\t\t/** flip loading flag */\n\t\t\tvm.loading = true;\n\n\t\t\t/** show the links area */\n\t\t\tvm.showLinks = true;\n\n\t\t\t/** set the onScroll handler */\n\t\t\twindowElement.on('scroll', positionHandler);\n\t\t\t$scope.$on('$destroy', function() {\n\t\t\t\twindowElement.off('scroll', positionHandler);\n\t\t\t});\n\t\t\tpositionHandler();\n\n\t\t\t/** load the links */\n\t\t\tloadLinks().then(function(gl) {\n\t\t\t\t/** set timeout so that links display properly */\n\t\t\t\t$timeout(function() {\n\t\t\t\t\t/** set group links */\n\t\t\t\t\tvm.groupLinks = gl;\n\n\t\t\t\t\t/** flip loading flag */\n\t\t\t\t\tvm.loading = false;\n\t\t\t\t}, 300);\n\t\t\t});\n\t\t}\n\n\t\t/** close the links window */\n\t\tfunction close() {\n\t\t\t/** show the links area */\n\t\t\tvm.showLinks = false;\n\n\t\t\t/** empty links */\n\t\t\tvm.groupLinks = [];\n\n\t\t\t/** destroy the scroll event */\n\t\t\twindowElement.off('scroll', positionHandler);\n\t\t}\n\n\t\t/** private methods */\n\n\t\t/** initialize */\n\t\tfunction init() {\n\t\t\t/** set the favorites callback */\n\t\t\tportalFavoritesManager.addCallback('portal-favorites', adjustFavorites, false, $scope);\n\t\t}\n\n\t\t/** load the related links */\n\t\tfunction loadLinks() {\n\t\t\t/** create a promise */\n\t\t\tvar deferred = $q.defer();\n\n\t\t\t/** check for links */\n\t\t\tif (groupLinks.length > 0) {\n\t\t\t\t/** set the current context */\n\t\t\t\tdeferred.resolve(groupLinks);\n\t\t\t} else {\n\t\t\t\t/** load the links */\n\t\t\t\tportalLinkGroupLinkRepository.getForGroup(vm.group.portalLinkGroupID).then(function(gl) {\n\t\t\t\t\t/** set the group links */\n\t\t\t\t\tgroupLinks = gl;\n\n\t\t\t\t\t/** set the current context */\n\t\t\t\t\tdeferred.resolve(groupLinks);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t/** return the promise */\n\t\t\treturn deferred.promise;\n\t\t}\n\n\t\t/** position handler */\n\t\tfunction positionHandler() {\n\t\t\t/** event must fire in scope */\n\t\t\t$timeout(function() {\n\t\t\t\t/** get the scroll position */\n\t\t\t\tvar scrollY = $window.scrollY || $window.pageYOffset;\n\n\t\t\t\t/** check the value */\n\t\t\t\tif (scrollY > 84) vm.fixedLinks = true;\n\t\t\t\telse vm.fixedLinks = false;\n\t\t\t});\n\t\t}\n\n\t\t/** adjust the favorites */\n\t\tfunction adjustFavorites(favorites) {\n\t\t\t/** adjust the group link isFavorite star */\n\t\t\t_.forEach(groupLinks, function(gl) {\n\t\t\t\t/** default the link to isFavorite = false */\n\t\t\t\tgl.portalLink.isFavorite = false;\n\n\t\t\t\t/** find a match in favorites */\n\t\t\t\tvar match = favorites.filter(function(fav){ return fav.portalLinkID === gl.portalLinkID; });\n\t\t\t\tif (match.length > 0) gl.portalLink.isFavorite = true;\n\t\t\t});\n\t\t}\n\t}\n})();","/**\n * portal-group.directive\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** get the angular module and add directive */\n\tangular.module('nha.portal').directive('portalGroup', portalGroupDirective);\n\n\t/** injection */\n\tportalGroupDirective.$inject = ['appSettings'];\n\n\t/** implementation */\n\tfunction portalGroupDirective(appSettings) {\n\t\t/** return directive */\n\t\treturn {\n\t\t\trestrict: 'E',\n\t\t\treplace: true,\n\t\t\ttemplateUrl: appSettings.portalWebRootUrl + 'app/directives/portal-group/portal-group.directive.html',\n\t\t\tcontroller: 'portal-group.controller',\n\t\t\tcontrollerAs: 'portalGroupCtrl',\n\t\t\tbindToController: {\n\t\t\t\tgroup: '=',\n\t\t\t\tpreview: '=?'\n\t\t\t},\n\t\t\tscope: {}\n\t\t};\n\t}\n})();","/**\n * portal-launcher.directive\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** get the angular module and add directive */\n\tangular.module('nha.portal').directive('portalLauncher', portalLauncherDirective);\n\n\t/** injection */\n\tportalLauncherDirective.$inject = ['appSettings'];\n\n\t/** implementation */\n\tfunction portalLauncherDirective(appSettings) {\n\t\t/** return directive */\n\t\treturn {\n\t\t\trestrict: 'E',\n\t\t\ttemplateUrl: appSettings.portalWebRootUrl + 'app/directives/portal-launcher/portal-launcher.directive.html',\n\t\t\tscope: {}\n\t\t};\n\t}\n})();","/**\n * portal-link-list.controller\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** get the angular module and add controller */\n\tangular.module('nha.portal').controller('portal-link-list.controller', portalLinkListController);\n\n\t/** setup injection */\n\tportalLinkListController.$inject = ['appSettings', 'portal-link.repository'];\n\n\t/** implementation */\n\tfunction portalLinkListController(appSettings, portalLinkRepository) {\n\t\t/** pubic properties */\n\t\tvar vm = this;\n\t\tvm.loading = false;\n\t\tvm.searchString = '';\n\t\tvm.portalLinks = [];\n\n\t\t/** run init */\n\t\tinit();\n\n\t\t/** private methods */\n\t\t\n\t\t/** initialize */\n\t\tfunction init() {\n\t\t\t/** flip loading flag */\n\t\t\tvm.loading = true;\n\n\t\t\t/** load portal links */\n\t\t\tportalLinkRepository.getAll().then(function(portalLinks) {\n\t\t\t\t/** set portal links */\n\t\t\t\tvm.portalLinks = portalLinks;\n\n\t\t\t\t/** flip loading flag */\n\t\t\t\tvm.loading = false;\n\t\t\t});\n\t\t}\n\t}\n})();","/**\n * portal-link-list.directive\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** get the angular module and add directive */\n\tangular.module('nha.portal').directive('portalLinkList', portalLinkListDirective);\n\n\t/** injection */\n\tportalLinkListDirective.$inject = ['appSettings'];\n\n\t/** implementation */\n\tfunction portalLinkListDirective(appSettings) {\n\t\t/** return directive */\n\t\treturn {\n\t\t\trestrict: 'E',\n\t\t\ttemplateUrl: appSettings.portalWebRootUrl + 'app/directives/portal-link-list/portal-link-list.directive.html',\n\t\t\tcontroller: 'portal-link-list.controller',\n\t\t\tcontrollerAs: 'portalLinkListCtrl',\n\t\t\tscope: {}\n\t\t};\n\t}\n})();","/**\n * portal-link.controller\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** get the angular module and add controller */\n\tangular.module('nha.portal').controller('portal-link.controller', portalLinkController);\n\n\t/** setup injection */\n\tportalLinkController.$inject = ['$scope', '$sce', 'appSettings', 'portal-favorites.manager'];\n\n\t/** implementation */\n\tfunction portalLinkController($scope, $sce, appSettings, portalFavoritesManager) {\n\t\t/** pubic properties */\n\t\tvar vm = this;\n\n\t\t/** public methods */\n\t\tvm.toggleFavorite = portalFavoritesManager.toggleFavorite;\n\t\tvm.getUrl = getUrl;\n\t\tvm.getSVG = getSVG;\n\n\t\t/** run init */\n\t\tinit();\n\n\t\t/** public method implementations */\n\n\t\t/** get the url */\n\t\tfunction getUrl() {\n\t\t\t/** check for preview */\n\t\t\tif (vm.preview) return '';\n\t\t\treturn vm.link.linkUrl;\n\t\t}\n\n\t\t/** get the svg value */\n\t\tfunction getSVG() {\n\t\t\treturn vm.link.iconSVG ? $sce.trustAsHtml(vm.link.iconSVG) : '';\n\t\t}\n\n\t\t/** private methods */\n\n\t\t/** initialize */\n\t\tfunction init() {\n\t\t\t/** set callback for favorite */\n\t\t\tportalFavoritesManager.addCallback('portal-favorites', toggleFavorite, false, $scope);\n\t\t}\n\n\n\t\t/** toggle the favorite star */\n\t\tfunction toggleFavorite(favorites) {\n\t\t\t/** find a match in favorites */\n\t\t\tvar match = favorites.filter(function(fav){ return fav.portalLinkID === vm.link.portalLinkID; });\n\t\t\tif (match.length > 0) vm.link.isFavorite = true;\n\t\t\telse vm.link.isFavorite = false;\n\t\t}\n\t}\n})();","/**\n * portal-link.directive\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** get the angular module and add directive */\n\tangular.module('nha.portal').directive('portalLink', portalLinkDirective);\n\n\t/** injection */\n\tportalLinkDirective.$inject = ['appSettings'];\n\n\t/** implementation */\n\tfunction portalLinkDirective(appSettings) {\n\t\t/** return directive */\n\t\treturn {\n\t\t\trestrict: 'E',\n\t\t\treplace: true,\n\t\t\ttemplateUrl: appSettings.portalWebRootUrl + 'app/directives/portal-link/portal-link.directive.html',\n\t\t\tcontroller: 'portal-link.controller',\n\t\t\tcontrollerAs: 'portalLinkCtrl',\n\t\t\tbindToController: {\n\t\t\t\tlink: '=',\n\t\t\t\tsidebar: '=?',\n\t\t\t\tpreview: '=?'\n\t\t\t},\n\t\t\tscope: {}\n\t\t};\n\t}\n})();","/**\n * portal-mini-launcher.controller\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** get the angular module and add controller */\n\tangular.module('nha.portal').controller('portal-mini-launcher.controller', portalMiniLauncherController);\n\n\t/** setup injection */\n\tportalMiniLauncherController.$inject = ['message.manager'];\n\n\t/** implementation */\n\tfunction portalMiniLauncherController(messageManager) {\n\t\t/** pubic properties */\n\t\tvar vm = this;\n\t\tvm.active = false;\n\n\t\t/** public methods */\n\t\tvm.toggleLauncher = toggleLauncher;\n\t\t\n\t\t/** run init */\n\t\tinit();\n\n\t\t/** public method implementations */\n\n\t\t/** show the app launcher */\n\t\tfunction toggleLauncher() {\n\t\t\t/** show the launcher and mask */\n\t\t\tif (vm.active) {\n\t\t\t\tvm.active = false;\n\t\t\t\tmessageManager.setData('message', { 'key': 'module-callout-mask', 'value': { 'visible': false, 'window': null }});\n\t\t\t} else {\n\t\t\t\tvm.active = true;\n\t\t\t\tmessageManager.setData('message', { 'key': 'module-callout-mask', 'value': { 'visible': true, 'window': 'portal-mini-launcher' }});\n\t\t\t}\n\t\t}\n\n\t\t/** private methods */\n\n\t\t/** initialize */\n\t\tfunction init() {\n\t\t\t/** set callbacks */\n\t\t\tmessageManager.addCallback('message', messageReceiver, true);\n\t\t}\n\n\t\t/** watch for messages */\n\t\tfunction messageReceiver(message) {\n\t\t\tif (message.key && message.key === 'module-callout-mask' && (message.value.visible === false || (message.value.visible === true && message.value.window !== 'portal-mini-launcher'))) {\n\t\t\t\tvm.active = false;\n\t\t\t}\n\t\t}\n\t}\n})();","/**\n * portal-mini-launcher.directive\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** get the angular module and add directive */\n\tangular.module('nha.portal').directive('portalMiniLauncher', portalMiniLauncherDirective);\n\n\t/** injection */\n\tportalMiniLauncherDirective.$inject = ['appSettings'];\n\n\t/** implementation */\n\tfunction portalMiniLauncherDirective(appSettings) {\n\t\t/** return directive */\n\t\treturn {\n\t\t\trestrict: 'E',\n\t\t\treplace: true,\n\t\t\ttemplateUrl: appSettings.portalWebRootUrl + 'app/directives/portal-mini-launcher/portal-mini-launcher.directive.html',\n\t\t\tcontroller: 'portal-mini-launcher.controller',\n\t\t\tcontrollerAs: 'portalMiniLauncherCtrl',\n\t\t\tscope: {}\n\t\t};\n\t}\n})();","/**\n * portal-mini-search.controller\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** get the angular module and add controller */\n\tangular.module('nha.portal').controller('portal-mini-search.controller', portalMiniSearchController);\n\n\t/** setup injection */\n\tportalMiniSearchController.$inject = ['message.manager'];\n\n\t/** implementation */\n\tfunction portalMiniSearchController(messageManager) {\n\t\t/** pubic properties */\n\t\tvar vm = this;\n\t\tvm.active = false;\n\n\t\t/** public methods */\n\t\tvm.toggleSearch = toggleSearch;\n\t\t\n\t\t/** run init */\n\t\tinit();\n\n\t\t/** public method implementations */\n\n\t\t/** show the app search */\n\t\tfunction toggleSearch() {\n\t\t\t/** show the search and mask */\n\t\t\tif (vm.active) {\n\t\t\t\tvm.active = false;\n\t\t\t\tmessageManager.setData('message', { 'key': 'module-callout-mask', 'value': { 'visible': false, 'window': null }});\n\t\t\t} else {\n\t\t\t\tvm.active = true;\n\t\t\t\tmessageManager.setData('message', { 'key': 'module-callout-mask', 'value': { 'visible': true, 'window': 'portal-mini-search' } });\n\t\t\t}\n\t\t}\n\n\t\t/** private methods */\n\n\t\t/** initialize */\n\t\tfunction init() {\n\t\t\t/** set callbacks */\n\t\t\tmessageManager.addCallback('message', messageReceiver, true);\n\t\t}\n\n\t\t/** watch for messages */\n\t\tfunction messageReceiver(message) {\n\t\t\tif (message.key && message.key === 'module-callout-mask' && (message.value.visible === false || (message.value.visible === true && message.value.window !== 'portal-mini-search'))) {\n\t\t\t\tvm.active = false;\n\t\t\t}\n\t\t}\n\t}\n})();","/**\n * portal-mini-search.directive\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** get the angular module and add directive */\n\tangular.module('nha.portal').directive('portalMiniSearch', portalMiniSearchDirective);\n\n\t/** injection */\n\tportalMiniSearchDirective.$inject = ['appSettings'];\n\n\t/** implementation */\n\tfunction portalMiniSearchDirective(appSettings) {\n\t\t/** return directive */\n\t\treturn {\n\t\t\trestrict: 'E',\n\t\t\treplace: true,\n\t\t\ttemplateUrl: appSettings.portalWebRootUrl + 'app/directives/portal-mini-search/portal-mini-search.directive.html',\n\t\t\tcontroller: 'portal-mini-search.controller',\n\t\t\tcontrollerAs: 'portalMiniSearchCtrl',\n\t\t\tscope: {}\n\t\t};\n\t}\n})();","/**\n * portal-search.controller\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** get the angular module and add controller */\n\tangular.module('nha.portal').controller('portal-search.controller', portalSearchController);\n\n\t/** setup injection */\n\tportalSearchController.$inject = ['$q', 'portal-search.manager', 'portal-app-context.manager', 'academicYearRepository'];\n\n\t/** implementation */\n\tfunction portalSearchController($q, portalSearchManager, portalAppContextManager, academicYearRepository) {\n\t\t/** pubic properties */\n\t\tvar vm = this;\n\t\tvm.loading = false;\n\t\tvm.searching = false;\n\t\tvm.loadingMore = false;\n\t\tvm.schoolID = null;\n\t\tvm.currentSearchScope = null;\n\t\tvm.searchOptions = [];\n\t\tvm.searchString = '';\n\t\tvm.currentAcademicYearScope = null;\n\t\tvm.currentAndNextAcademicYearScope = [];\n\t\tvm.academicYears = [];\n\t\tvm.searchResultCount = 0;\n\t\tvm.searchResults = [];\n\t\tvm.searchMessage = '';\n\n\t\t/** private properties */\n\t\tvar schoolIDs = [];\n\t\tvar cancelor = null;\n\n\t\t/** public methods */\n\t\tvm.setSearchScope = setSearchScope;\n\t\tvm.setAcademicYearScope = setAcademicYearScope;\n\t\tvm.search = search;\n\t\tvm.clearSearch = clearSearch;\n\n\t\t/** run init */\n\t\tinit();\n\n\t\t/** public method implementations */\n\n\t\t/** set the current search scope */\n\t\tfunction setSearchScope(searchOption) {\n\t\t\tvm.currentSearchScope = searchOption;\n\t\t\tclearSearch();\n\t\t}\n\n\t\t/** set the current academic year scope */\n\t\tfunction setAcademicYearScope(academicYear) {\n\t\t\tvm.currentAcademicYearScope = academicYear;\n\t\t\tclearSearch();\n\t\t}\n\n\t\t/** search for matches to search criteria */\n\t\tfunction search(hideLoader) {\n\t\t\t/** clear the search message */\n\t\t\tvm.searchMessage = '';\n\n\t\t\t/** cancel any current requests */\n\t\t\tif (cancelor !== null) {\n\t\t\t\tcancelor.resolve();\n\t\t\t\tcancelor = null;\n\t\t\t}\n\n\t\t\t/** check the length */\n\t\t\tif (vm.searchString.length < 3) {\n\t\t\t\t/** reset the search results */\n\t\t\t\tvm.searchResults = [];\n\t\t\t\tvm.searching = false;\n\t\t\t\tvm.loadingMore = false;\n\t\t\t\tvm.searchResultCount = 0;\n\n\t\t\t\t/** reset the paging options */\n\t\t\t\tportalSearchManager.resetPagingOptions();\n\t\t\t}\n\n\t\t\t/** check the search string length */\n\t\t\tif (vm.searchString.length > 2) {\n\t\t\t\t/** create cancelor promise */\n\t\t\t\tcancelor = $q.defer();\n\n\t\t\t\t/** clear the search message */\n\t\t\t\tvm.searchMessage = '';\n\n\t\t\t\t/** flip searching flag */\n\t\t\t\tif (!hideLoader) vm.searching = true;\n\t\t\t\tvm.loadingMore = true;\n\n\t\t\t\t/** reset the search results */\n\t\t\t\tif (!hideLoader) vm.searchResults = [];\n\n\t\t\t\t/** get the search method */\n\t\t\t\tvar searchMethod = portalSearchManager.searchStudents;\n\t\t\t\tif (vm.currentSearchScope.type === 'staff') searchMethod = portalSearchManager.searchStaff;\n\t\t\t\tif (vm.currentSearchScope.type === 'parent') searchMethod = portalSearchManager.searchParents;\n\n\t\t\t\t/** execute the search method */\n\t\t\t\tsearchMethod(schoolIDs, vm.currentAcademicYearScope.academicYearID, vm.searchString, cancelor).then(function(results) {\n\t\t\t\t\t/** check for message */\n\t\t\t\t\tif (!results.message) {\n\t\t\t\t\t\t/** sort results by last name */\n\t\t\t\t\t\tresults.items.sort(function(a, b) {\n\t\t\t\t\t\t\t/** create name key */\n\t\t\t\t\t\t\tvar keyA = a.lastName + '_' + a.firstName;\n\t\t\t\t\t\t\tvar keyB = b.lastName + '_' + b.firstName;\n\n\t\t\t\t\t\t\t/** compare */\n\t\t\t\t\t\t\tif (keyA < keyB) return -1;\n\t\t\t\t\t\t\tif (keyA > keyB) return 1;\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t/** set the search results */\n\t\t\t\t\t\tvm.searchResults = results.items;\n\t\t\t\t\t\tvm.searchResultCount = results.count;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t/** set the search results to blank array */\n\t\t\t\t\t\tvm.searchResults = [];\n\n\t\t\t\t\t\t/** set the search message */\n\t\t\t\t\t\tvm.searchMessage = results.message;\n\t\t\t\t\t}\n\n\t\t\t\t\t/** flip searching flag */\n\t\t\t\t\tvm.searching = false;\n\t\t\t\t\tvm.loadingMore = false;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\t/** set the search results to blank array */\n\t\t\t\tvm.searchResults = [];\n\n\t\t\t\t/** set the search message */\n\t\t\t\tvm.searchMessage = 'You must enter at least 3 characters';\n\t\t\t}\n\t\t}\n\n\t\t/** clear the search area */\n\t\tfunction clearSearch() {\n\t\t\t/** reset search values */\n\t\t\tvm.searching = false;\n\t\t\tvm.loadingMore = false;\n\t\t\tvm.searchResults = [];\n\t\t\tvm.searchString = '';\n\t\t\tvm.searchMessage = '';\n\t\t\tvm.searchResultCount = 0;\n\n\t\t\t/** reset the paging options */\n\t\t\tportalSearchManager.resetPagingOptions();\n\t\t}\n\n\t\t/** private methods */\n\n\t\t/** initialize */\n\t\tfunction init() {\n\t\t\t/** flip loading flag */\n\t\t\tvm.loading = true;\n\n\t\t\t/** set the search options */\n\t\t\tvm.searchOptions = portalSearchManager.getSearchOptions();\n\t\t\tsetSearchScope(vm.searchOptions[0]);\n\n\t\t\t/** ensure the app context */\n\t\t\tportalAppContextManager.ensurePortalContext().then(function(context) {\n\t\t\t\t/** set the users school ids */\n\t\t\t\tvm.schoolID = context.school.schoolID;\n\t\t\t\tschoolIDs = context.schoolIDs;\n\n\t\t\t\t/** get the academic years */\n\t\t\t\tacademicYearRepository.getAllAcademicYears().then(function(academicYears) {\n\t\t\t\t\t/** set academic years */\n\t\t\t\t\tvm.academicYears = academicYears.reverse();\n\n\t\t\t\t\t/** get the current academic year */\n\t\t\t\t\tvm.currentAcademicYearScope = vm.academicYears.filter(function (ay) {\n\t\t\t\t\t\treturn ay.isCurrent;\n\t\t\t\t\t})[0];\n\n\t\t\t\t\tvm.currentAndNextAcademicYearScope = vm.academicYears.filter(function (ay) {\n\t\t\t\t\t\treturn ay.isCurrent || ay.academicYearID === (vm.currentAcademicYearScope.academicYearID + 1)\n\t\t\t\t\t});\n\n\t\t\t\t\t/** check for teacher */\n\t\t\t\t\tif (!context.roles.contains('Previous AY Student Search')) {\n\t\t\t\t\t\tvm.academicYears = vm.currentAndNextAcademicYearScope;\n\t\t\t\t\t}\n\n\t\t\t\t\t/** flip loading flag */\n\t\t\t\t\tvm.loading = false;\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}\n})();","/**\n * portal-search.directive\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** get the angular module and add directive */\n\tangular.module('nha.portal').directive('portalSearch', portalSearchDirective);\n\n\t/** injection */\n\tportalSearchDirective.$inject = ['appSettings'];\n\n\t/** implementation */\n\tfunction portalSearchDirective(appSettings) {\n\t\t/** return directive */\n\t\treturn {\n\t\t\trestrict: 'E',\n\t\t\ttemplateUrl: appSettings.portalWebRootUrl + 'app/directives/portal-search/portal-search.directive.html',\n\t\t\tcontroller: 'portal-search.controller',\n\t\t\tcontrollerAs: 'portalSearchCtrl',\n\t\t\tscope: {}\n\t\t};\n\t}\n})();","/**\n * portal-search.manager\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** add the service */\n\tangular.module('nha.portal').service('portal-search.manager', portalSearchManager);\n\n\t/** injection */\n\tportalSearchManager.$inject = ['$q', '$http', 'appSettings'];\n\n\t/** implementation */\n\tfunction portalSearchManager($q, $http, appSettings) {\n\t\t/** capture service object */\n\t\tvar service = this;\n\n\t\t/** private properties */\n\t\tvar searchOptions = [\n\t\t\t{ 'type': 'student', 'name': 'Students', 'placeholder': 'Enter Student Name, ID, or type \"Birthdays\" to see student birthdays' },\n\t\t\t{ 'type': 'staff', 'name': 'Staff', 'placeholder': 'Enter Staff Member Name' },\n\t\t\t{ 'type': 'parent', 'name': 'Parents', 'placeholder': 'Enter Parent Name or Phone' }\n\t\t];\n\t\tvar pageSize = 20;\n\t\tvar loadedCount = 0;\n\t\tvar moreExist = true;\n\t\tvar currentResults = [];\n\t\tvar currentCount = 0;\n\t\tvar currentSearchCriteria = '';\n\n\t\t/** public methods */\n\t\tservice.getSearchOptions = getSearchOptions;\n\t\tservice.resetPagingOptions = resetPagingOptions;\n\t\tservice.searchStudents = searchStudents;\n\t\tservice.searchParents = searchParents;\n\t\tservice.searchStaff = searchStaff;\n\n\t\t/** public method implementations */\n\n\t\t/** return the search options */\n\t\tfunction getSearchOptions() {\n\t\t\tsearchOptions[0].active = true;\n\t\t\treturn searchOptions;\n\t\t}\n\n\t\t/** reset the paging options */\n\t\tfunction resetPagingOptions() {\n\t\t\tpageSize = 20;\n\t\t\tloadedCount = 0;\n\t\t\tmoreExist = true;\n\t\t\tcurrentResults = [];\n\t\t\tcurrentCount = 0;\n\t\t\tcurrentSearchCriteria = '';\n\t\t}\n\n\t\t/** search students */\n\t\tfunction searchStudents(schoolIDs, academicYearID, searchCriteria, cancelor) {\n\t\t\t/** create a promise */\n\t\t\tvar deferred = $q.defer();\n\n\t\t\t/** check the search criteria */\n\t\t\tif (currentSearchCriteria !== searchCriteria) {\n\t\t\t\t/** reset the paging options */\n\t\t\t\tresetPagingOptions();\n\t\t\t}\n\n\t\t\t/** set the current search criteria */\n\t\t\tcurrentSearchCriteria = searchCriteria;\n\n\t\t\t/** get the params */\n\t\t\tvar params = getParams(schoolIDs, academicYearID);\n\t\t\tparams.searchText = searchCriteria;\n\t\t\tparams.skip = loadedCount;\n\t\t\tparams.take = pageSize;\n\n\t\t\t/** check for moreExist */\n\t\t\tif (!moreExist) {\n\t\t\t\t/** return last loaded data */\n\t\t\t\tdeferred.resolve({ 'count': currentCount, 'items': currentResults });\n\t\t\t\treturn deferred.promise;\n\t\t\t}\n\n\t\t\t/** make the request */\n\t\t\t$http.get(appSettings.portalServicesRootUrl + 'studentsearch', { 'params': params, 'cache': true, 'timeout': cancelor.promise }).then(function(results) {\n\t\t\t\t/** manipulate parent results */\n\t\t\t\t_.forEach(results.data.items, function(s) {\n\t\t\t\t\t/** adjust the grade level name */\n\t\t\t\t\ts.gradeLevelNameAdjusted = adjustGradeLevelName(s.gradeLevelName);\n\t\t\t\t});\n\n\t\t\t\t/** set paging variables */\n\t\t\t\tloadedCount += results.data.items.length;\n\t\t\t\tif (results.data.items.length < pageSize) moreExist = false;\n\n\t\t\t\t/** set the current context */\n\t\t\t\tcurrentResults = currentResults.concat(results.data.items);\n\t\t\t\tcurrentCount = results.data.count;\n\t\t\t\tdeferred.resolve({ 'count': currentCount, 'items': currentResults });\n\t\t\t});\n\n\t\t\t/** return the promise */\n\t\t\treturn deferred.promise;\n\t\t}\n\n\t\t/** search staff members */\n\t\tfunction searchStaff(schoolIDs, academicYearID, searchCriteria, cancelor) {\n\t\t\t/** create a promise */\n\t\t\tvar deferred = $q.defer();\n\n\t\t\t/** check the search criteria */\n\t\t\tif (currentSearchCriteria !== searchCriteria) {\n\t\t\t\t/** reset the paging options */\n\t\t\t\tresetPagingOptions();\n\t\t\t}\n\n\t\t\t/** set the current search criteria */\n\t\t\tcurrentSearchCriteria = searchCriteria;\n\n\t\t\t/** get the params */\n\t\t\tvar params = getParams(schoolIDs, academicYearID);\n\n\t\t\t/** search by name */\n\t\t\tparams.staffName = currentSearchCriteria;\n\n\t\t\t/** add additional odata params */\n\t\t\tparams.orderby = 'LastName, FirstName';\n\t\t\tparams.top = pageSize;\n\t\t\tparams.skip = loadedCount;\n\n\t\t\t/** check for moreExist */\n\t\t\tif (!moreExist) {\n\t\t\t\t/** return last loaded data */\n\t\t\t\tdeferred.resolve({ 'count': currentCount, 'items': currentResults });\n\t\t\t\treturn deferred.promise;\n\t\t\t}\n\n\t\t\t/** make the request */\n\t\t\t$http.get(appSettings.portalServicesRootUrl + 'staffsearch', { 'params': params, 'cache': true, 'timeout': cancelor.promise }).then(function(results) {\n\t\t\t\t/** set paging variables */\n\t\t\t\tloadedCount += results.data.items.length;\n\t\t\t\tif (results.data.items.length < pageSize) moreExist = false;\n\n\t\t\t\t/** set the current context */\n\t\t\t\tcurrentResults = currentResults.concat(results.data.items);\n\t\t\t\tcurrentCount = results.data.count;\n\t\t\t\tdeferred.resolve({ 'count': currentCount, 'items': currentResults });\n\t\t\t});\n\n\t\t\t/** return the promise */\n\t\t\treturn deferred.promise;\n\t\t}\n\n\t\t/** search parents */\n\t\tfunction searchParents(schoolIDs, academicYearID, searchCriteria, cancelor) {\n\t\t\t/** create a promise */\n\t\t\tvar deferred = $q.defer();\n\n\t\t\t/** check the search criteria */\n\t\t\tif (currentSearchCriteria !== searchCriteria) {\n\t\t\t\t/** reset the paging options */\n\t\t\t\tresetPagingOptions();\n\t\t\t}\n\n\t\t\t/** set the current search criteria */\n\t\t\tcurrentSearchCriteria = searchCriteria;\n\n\t\t\t/** get the params */\n\t\t\tvar params = getParams(schoolIDs, academicYearID);\n\n\t\t\t/** try to parse out a phone number */\n\t\t\tvar phoneNumber = parseNumber(currentSearchCriteria);\n\t\t\tif (phoneNumber) {\n\t\t\t\t/** check the phone number length */\n\t\t\t\tif (phoneNumber.length < 5) {\n\t\t\t\t\t/** create a promise */\n\t\t\t\t\tdeferred.resolve({ message: 'Phone numbers require at least 5 digits' });\n\t\t\t\t\treturn deferred.promise;\n\t\t\t\t}\n\n\t\t\t\t/** add the phone number param */\n\t\t\t\tparams.phoneNumber = phoneNumber;\n\t\t\t} else {\n\t\t\t\t/** search by name */\n\t\t\t\tparams.parentName = currentSearchCriteria;\n\t\t\t}\n\n\t\t\t/** add additional odata params */\n\t\t\tparams.$orderby = 'LastName, FirstName';\n\t\t\tparams.$inlinecount = 'allpages';\n\t\t\tparams.$top = pageSize;\n\t\t\tparams.$skip = loadedCount;\n\n\t\t\t/** check for moreExist */\n\t\t\tif (!moreExist) {\n\t\t\t\t/** return last loaded data */\n\t\t\t\tdeferred.resolve({ 'count': currentCount, 'items': currentResults });\n\t\t\t\treturn deferred.promise;\n\t\t\t}\n\n\t\t\t/** make the request */\n\t\t\t$http.get(appSettings.portalServicesRootUrl + 'parentsearch', { 'params': params, 'cache': true, 'timeout': cancelor.promise }).then(function(results) {\n\t\t\t\t/** manipulate parent results */\n\t\t\t\t_.forEach(results.data.items, function(p) {\n\t\t\t\t\t/** set opt out values */\n\t\t\t\t\tp.optOut = false;\n\t\t\t\t\tif (p.doNotCall) p.optOut = true;\n\t\t\t\t\tif (p.doNotText) p.optOut = true;\n\t\t\t\t\tif (p.doNotEmail) p.optOut = true;\n\t\t\t\t\tif (p.doNotMail) p.optOut = true;\n\n\t\t\t\t\t/** order the phone numbers by type */\n\t\t\t\t\tp.phoneNumbers.sort(function(a, b) {\n\t\t\t\t\t\tif (a.type < b.type) return -1;\n\t\t\t\t\t\tif (a.type > b.type) return 1;\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t});\n\n\t\t\t\t\t/** add students object */\n\t\t\t\t\tp.studentGroups = {};\n\n\t\t\t\t\t/** cycle through students */\n\t\t\t\t\t_.forEach(p.students, function(s) {\n\t\t\t\t\t\t/** adjust the grade level name */\n\t\t\t\t\t\ts.gradeLevelNameAdjusted = adjustGradeLevelName(s.gradeLevelName, s.gradeLevelNameDesc);\n\n\t\t\t\t\t\t/** check for student group */\n\t\t\t\t\t\tif (!p.studentGroups[s.studentID]) p.studentGroups[s.studentID] = {\n\t\t\t\t\t\t\t'studentID': s.studentID,\n\t\t\t\t\t\t\t'firstName': s.firstName,\n\t\t\t\t\t\t\t'lastName': s.lastName,\n\t\t\t\t\t\t\t'studentInSchool': []\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t/** add the student record */\n\t\t\t\t\t\tp.studentGroups[s.studentID].studentInSchool.push(s);\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\t/** set paging variables */\n\t\t\t\tloadedCount += results.data.items.length;\n\t\t\t\tif (results.data.items.length < pageSize) moreExist = false;\n\n\t\t\t\t/** set the current context */\n\t\t\t\tcurrentResults = currentResults.concat(results.data.items);\n\t\t\t\tcurrentCount = results.data.count;\n\t\t\t\tdeferred.resolve({ 'count': currentCount, 'items': currentResults });\n\t\t\t});\n\n\t\t\t/** return the promise */\n\t\t\treturn deferred.promise;\n\t\t}\n\n\t\t/** private methods */\n\n\t\t/** get base parameters */\n\t\tfunction getParams(schoolIDs, academicYearID) {\n\t\t\t/** setup params */\n\t\t\tvar params = {\n\t\t\t\t'academicYearID': academicYearID\n\t\t\t};\n\n\t\t\t/** parse integers out of school ids */\n\t\t\tschoolIDs = _.map(schoolIDs, _.parseInt);\n\t\t\tif (!_.includes(schoolIDs, 0)) {\n\t\t\t\tparams.schoolIDs = schoolIDs;\n\t\t\t}\n\n\t\t\t/** return the params */\n\t\t\treturn params;\n\t\t}\n\n\t\t/** parse a number from the string */\n\t\tfunction parseNumber(n) {\n\t\t\tvar numArr = n.match(/\\d/g);\n\t\t\treturn numArr ? numArr.join('') : null;\n\t\t}\n\n\t\t/** adjust the grade level name */\n\t\tfunction adjustGradeLevelName(gradeLevelName) {\n\t\t\tif (gradeLevelName === 'K') return 'Kindergarten';\n\t\t\tif (gradeLevelName === '1') return gradeLevelName + 'st Grade';\n\t\t\tif (gradeLevelName === '2') return gradeLevelName + 'nd Grade';\n\t\t\tif (gradeLevelName === '3') return gradeLevelName + 'rd Grade';\n\t\t\tif (['4', '5', '6', '7', '8'].contains(gradeLevelName)) return gradeLevelName + 'th Grade';\n\t\t\treturn gradeLevelName;\n\t\t}\n\n\t\t/** return the service */\n\t\treturn service;\n\t}\n})();","/**\n * search-result.controller\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** get the angular module and add controller */\n\tangular.module('nha.portal').controller('search-result.controller', searchResultController);\n\n\t/** setup injection */\n\tsearchResultController.$inject = ['appSettings'];\n\n\t/** implementation */\n\tfunction searchResultController(appSettings) {\n\t\t/** pubic properties */\n\t\tvar vm = this;\n\t\tvm.studentUrl = '';\n\t\tvm.staffUrl = '';\n\t\tvm.parentUrl = '';\n\n\t\t/** public methods */\n\t\tvm.adjustStudentUrl = adjustStudentUrl;\n\n\t\t/** run init */\n\t\tinit();\n\n\t\t/** public method implementations */\n\n\t\t/** adjust the student url */\n\t\tfunction adjustStudentUrl(url, id) {\n\t\t\treturn url.replace('{id}', id);\n\t\t}\n\n\t\t/** private methods */\n\n\t\t/** initialize */\n\t\tfunction init() {\n\t\t\t/** set urls */\n\t\t\tvm.studentUrl = appSettings.studentManagementWebRootUrl + '{id}/demographics/information';\n\t\t\tvm.staffUrl = appSettings.staffManagementWebRootUrl + 'staff-record/' + vm.result.staffID;\n\t\t\tvm.parentUrl = appSettings.studentManagementWebRootUrl + 'guardian/' + vm.result.guardianID + '/' + vm.academicYearId + '/' + vm.schoolId + '/guardian/overview';\n\n\t\t\t/** check for student and adjust */\n\t\t\tif (vm.type === 'student') {\n\t\t\t\tvm.studentUrl = adjustStudentUrl(vm.studentUrl, vm.result.studentInSchoolID);\n\t\t\t}\n\t\t}\n\t}\n})();","/**\n * search-result.directive\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** get the angular module and add directive */\n\tangular.module('nha.portal').directive('searchResult', searchResultDirective);\n\n\t/** injection */\n\tsearchResultDirective.$inject = ['appSettings'];\n\n\t/** implementation */\n\tfunction searchResultDirective(appSettings) {\n\t\t/** return directive */\n\t\treturn {\n\t\t\trestrict: 'E',\n\t\t\ttemplateUrl: appSettings.portalWebRootUrl + 'app/directives/portal-search/search-result/search-result.directive.html',\n\t\t\tcontroller: 'search-result.controller',\n\t\t\tcontrollerAs: 'searchResultCtrl',\n\t\t\tbindToController: {\n\t\t\t\tresult: '=',\n\t\t\t\ttype: '=',\n\t\t\t\tschoolId: '=',\n\t\t\t\tacademicYearId: '='\n\t\t\t},\n\t\t\tscope: {}\n\t\t};\n\t}\n})();","/**\n * portal-sidebar.controller\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** get the angular module and add controller */\n\tangular.module('nha.portal').controller('portal-sidebar.controller', portalSidebarController);\n\n\t/** setup injection */\n\tportalSidebarController.$inject = ['appSettings', 'portal-quick-link.repository', 'portal-favorites.manager'];\n\n\t/** implementation */\n\tfunction portalSidebarController(appSettings, portalQuickLinkRepository, portalFavoritesManager) {\n\t\t/** pubic properties */\n\t\tvar vm = this;\n\t\tvm.loading = false;\n\t\tvm.quickLinksVisible = true;\n\t\tvm.favoritesVisible = true;\n\t\tvm.quickLinks = [];\n\t\tvm.favorites = [];\n\n\t\t/** run init */\n\t\tinit();\n\n\t\t/** private methods */\n\n\t\t/** initialize */\n\t\tfunction init() {\n\t\t\t/** flip loading flag */\n\t\t\tvm.loading = true;\n\n\t\t\t/** setup callbacks */\n\t\t\tportalFavoritesManager.addCallback('portal-favorites', setFavorites);\n\n\t\t\t/** get the quick links */\n\t\t\tportalQuickLinkRepository.getAll({ 'filter': { 'PortalLink/IsEnabled': true } }).then(function(quickLinks) {\n\t\t\t\t/** set quick links */\n\t\t\t\tvm.quickLinks = quickLinks;\n\n\t\t\t\t/** flip loading flag */\n\t\t\t\tvm.loading = false;\n\t\t\t});\n\n\t\t}\n\n\t\t/** callback for favorites */\n\t\tfunction setFavorites(favorites) {\n\t\t\t/** set the favorites */\n\t\t\tvm.favorites = favorites || [];\n\t\t}\n\t}\n})();","/**\n * portal-sidebar.directive\n * @namespace portal\n */\n\n(function () {\n\t'use strict';\n\n\t/** get the angular module and add directive */\n\tangular.module('nha.portal').directive('portalSidebar', portalSidebarDirective);\n\n\t/** injection */\n\tportalSidebarDirective.$inject = ['appSettings'];\n\n\t/** implementation */\n\tfunction portalSidebarDirective(appSettings) {\n\t\t/** return directive */\n\t\treturn {\n\t\t\trestrict: 'E',\n\t\t\ttemplateUrl: appSettings.portalWebRootUrl + 'app/directives/portal-sidebar/portal-sidebar.directive.html',\n\t\t\tcontroller: 'portal-sidebar.controller',\n\t\t\tcontrollerAs: 'portalSidebarCtrl',\n\t\t\tscope: {}\n\t\t};\n\t}\n})();"],"names":["config","$provide","decorator","svElementDecorator","$delegate","$parse","newLinkFunc","$scope","$element","$attrs","$controllers","sortableElement","element","getPart","getIndex","$index","addToSortableElements","$on","removeFromSortableElements","startTimer","helper","placeholder","handle","clearEvent","clearTimeout","opts","svElement","angular","extend","delay","disabled","event","onMousedown","e","html","on","setTimeout","$watch","customHandle","off","customHelper","customPlaceholder","moveExecuted","document","documentElement","touchFix","sortingInProgress","button","type","isForBehaviorList","toElement","ownerDocument","URL","indexOf","words","_","numbers","remove","n","isNaN","drop","chunk","difference","length","tolerance","revert","containment","containmentRect","closestElement","call","getBoundingClientRect","clone","target","clientRect","removeClass","css","left","body","scrollLeft","top","scrollTop","addClass","width","context","clientWidth","lastElementChild","reposition","coords","targetLeft","x","targetTop","y","helperRect","height","this","style","pointerOffset","clientX","clientY","onMousemove","mouseup","$drop","parent","prepend","$moveUpdate","offset","touches","originalEvent","preventDefault","compile","prototype","closest","selector","el","parentNode","matchingFunction","module","$inject","String","contains","str","toLowerCase","replace","stripHtml","tmp","createElement","innerHTML","textContent","innerText","Array","item","$","inArray","splice","compare","array","missingValues","i","push","_ng","moduleInit","birthdayRepo","repositoryFactory","dataWarehouseRestangular","service","colorRepo","$q","colors","getAll","deferred","defer","resolve","promise","configFrontEndWebSourceRepo","portalRestangular","baseService","repo","endpoint","getKeys","getList","concat","getEnvironments","configRepo","getSettings","saveSetting","setting","all","customPOST","removeSetting","settingID","one","hasApplication","schoolID","settingKey","customGET","then","result","portalLinkBusinessApplicationRepo","portalLinkGroupLinkRepo","getForGroup","groupID","portalLinkGroupLinks","reorder","groups","put","portalLinkGroupRepo","portalGroups","getForUser","resetGroups","portalLinkLocationRepo","postAll","portalLinkLocations","portalLinkRoleRepo","portalLinkRepo","loadedCount","moreExist","loadedLinks","search","searchString","portalLinkGroupID","matches","getForSettingKey","portalLinks","hasPortalLink","load","params","portalQuickLinkRepo","quicklinks","staffFavoriteRepo","staffFavorites","favorites","deleteForUser","portalLinkID","portalAppContextManager","$state","$interval","ipCookie","userContextService","appContextFactory","contextManager","ensureUserContext","interval","defaultSchoolCookieName","defaultSchool","cancel","undefined","appContextModel","roles","role","school","staffID","parseInt","staffName","commonname","usersSchools","getUserContext","schoolIDs","isArray","getContext","ensurePortalContext","ensureAppContext","resetContext","forIn","value","key","setBreadcrumbLabel","stateName","get","ncyBreadcrumb","label","ncyBreadcrumbLabel","portalFavoritesManager","pubSubFactory","staffFavoriteRepository","pubSubManager","getFavorites","toggleFavorite","link","isFavorite","fav","setData","removeFavorite","post","favorite","favoriteOrderNumber","orderNumber","addFavorite","reorderFavorites","getData","nhaBrandingDirective","appSettings","restrict","templateUrl","portalWebRootUrl","scope","directive","portalAppLogoController","portalLinkRepository","vm","loading","portalLink","controller","portalAppLogoDirective","controllerAs","bindToController","isTraining","portalFavoritesController","toastr","setFavorites","forEach","index","success","positionClass","addCallback","portalFavoritesDirective","portalGroupListController","$timeout","portalLinkGroupRepository","searching","searchResults","searchLinks","closeSearch","filter","g","linkCount","portalGroupListDirective","portalGroupController","$window","portalLinkGroupLinkRepository","windowElement","groupLinks","positionHandler","scrollY","pageYOffset","fixedLinks","showLinks","viewLinks","preview","group","gl","close","portalGroupDirective","portalLauncherDirective","portalLinkListController","portalLinkListDirective","portalLinkController","$sce","getUrl","linkUrl","getSVG","iconSVG","trustAsHtml","portalLinkDirective","sidebar","portalMiniLauncherController","messageManager","active","toggleLauncher","message","visible","window","portalMiniLauncherDirective","portalMiniSearchController","toggleSearch","portalMiniSearchDirective","portalSearchController","portalSearchManager","academicYearRepository","loadingMore","currentSearchScope","searchOptions","currentAcademicYearScope","currentAndNextAcademicYearScope","academicYears","searchResultCount","searchMessage","cancelor","setSearchScope","searchOption","clearSearch","resetPagingOptions","setAcademicYearScope","academicYear","hideLoader","searchMethod","searchStudents","searchStaff","searchParents","academicYearID","results","items","sort","a","b","keyA","lastName","firstName","keyB","count","getSearchOptions","getAllAcademicYears","reverse","ay","isCurrent","portalSearchDirective","$http","pageSize","currentResults","currentCount","currentSearchCriteria","getParams","map","includes","adjustGradeLevelName","gradeLevelName","searchCriteria","searchText","skip","take","portalServicesRootUrl","data","s","gradeLevelNameAdjusted","numArr","phoneNumber","match","join","parentName","$orderby","$inlinecount","$top","$skip","p","optOut","doNotCall","doNotText","doNotEmail","doNotMail","phoneNumbers","studentGroups","students","gradeLevelNameDesc","studentID","studentInSchool","orderby","searchResultController","adjustStudentUrl","url","id","studentUrl","staffUrl","parentUrl","studentManagementWebRootUrl","staffManagementWebRootUrl","guardianID","academicYearId","schoolId","studentInSchoolID","searchResultDirective","portalSidebarController","portalQuickLinkRepository","quickLinksVisible","favoritesVisible","quickLinks","portalSidebarDirective"],"sourceRoot":""}