1m_specialists = { 2 list_partial: ko.observableArray(), 3 nextQuery: ko.observable(), 4 isLoading: ko.observable(false), 5 landingSpecialistPk: ko.observable(null), 6 landingSpecialistUrl: ko.observable(null), 7}; 8 9m_specialists.init = function() { 10 m_specialists.nextQuery(SERVER_URL + '/api/specialists/' + $('#speciality_slug').val() + '/?page=1'); 11 m_specialists.loadMore(); 12}; 13 14m_specialists.init_from_global = function() { 15 m_specialists.list_partial.push.apply(m_specialists.list_partial, __specialists); 16}; 17 18m_specialists.loadMore = function() { 19 const self = m_specialists; 20 if (self.isLoading()) return; 21 self.isLoading(true); 22 23 m_device_auth.get({ url: self.nextQuery() }) 24 .done(function(response, status) { 25 (response.results).forEach(doctor => { 26 if (doctor.image != null) { 27 doctor.image = new URL(doctor.image).pathname 28 } 29 else doctor.image ='/static/mobile_app/www/assets/images/specialist-placeholder.png' 30 }); 31 if (status === 'success') { 32 self.list_partial.push.apply(self.list_partial, response.results); 33 if (response.next) { 34 url = new URL(response.next) 35 response.next = url.pathname + url.search 36 } 37 self.nextQuery(response.next); 38 } 39 }) 40 .fail(function(response) { 41 console.warn(response); 42 }) 43 .always(function() { 44 self.isLoading(false); 45 }); 46};
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.