PageSourceSearch

https://classic.ptotoday.com/components/com_store/app/directives/s…m-school-search.controller.js?6ab4ec80cf30e

js ptotoday.com collected 2026-09-24 09:26:18 UTC 1,591 bytes, 52 lines download raw bytes

1'use strict';
2angular.module('sfmStore')
3    .controller('sfmSchoolSearchController', function(VALIDATORS, $school, $scope, $order, $sfmSchoolNotFound, $sfmNotMySchool) {
4        var vm = this;
5        vm.zipPattern = VALIDATORS.zip;
6        vm.showSearch = false;
7        vm.school = vm.school || {};
8        
9        var locateSchool = function(schoolId) {
10            $school.getSchoolById(vm.profile.school_id).then(function(res) {
11                var data = res.data.data;
12                if(data) {
13                    vm.school = data;
14                } else {
15                    vm.school = {};
16                }
17            });
18        }
19        
20        if(!angular.isUndefined(vm.profile) && parseInt(vm.profile.school_id) > 0) {
21            locateSchool(vm.profile.school_id);
22        }
23        
24        $scope.$watch('vm.profile.school_id', function(newVal) {
25            if(parseInt(newVal) > 0) {
26                locateSchool(newVal);
27            }
28        });
29        
30        vm.toggleSearch = function() {
31            vm.showSearch = !vm.showSearch;
32        }
33
34        vm.findSchoolsInZip = function() {
35            $school.getSchoolsByZip(vm.searchZip).then(function(res) {
36                vm.schools = res.data.data;
37            });
38        }
39
40        vm.selectSchool = function() {
41            vm.school = vm.selectedSchool;
42            vm.showSearch = false;
43        }
44
45        vm.schoolNotFound = function() {
46            $sfmSchoolNotFound.showModal();
47        }
48        
49        vm.notMySchool = function() {
50            $sfmNotMySchool.showModal();
51       }
52    })

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.