PageSourceSearch

https://australian.physio/modules/custom/apa_pd/js/pd_detail.js?tluohp

js australian.physio collected 2026-09-24 20:28:17 UTC 11,155 bytes, 378 lines download raw bytes

1jQuery(function($) {
2	$('body').on('click','#registerPDUserButton', function(){
3		$( "#registerPDUser" ).dialog({
4			open: function(event, ui) {
5				// This is nescessary because old css files select the dialog element by aria labels.
6				$(this).parent().attr('aria-describedby', 'registerPDUser');
7			}
8		});
9		if($("#WP_consents").is(":visible")) {
10			$( "#WP_consents" ).dialog("close");
11		}
12		if($("#OS_consents").is(":visible")) {
13			$( "#OS_consents" ).dialog("close");
14		}
15		if($.inArray( "12", $('select[id=Dietary]').val()) == -1) {
16			$(".dietary_message").addClass('display-none');
17			$(".dietary_messageN").addClass('display-none');
18		} else {
19			$(".dietary_message").removeClass('display-none');
20			$(".dietary_messageN").removeClass('display-none');
21		}
22	});
23	$('#registerNonMember').on('click', function(){
24		$("#registerMember-container").show();
25		if($("#WP_consents").is(":visible")) {
26			$( "#WP_consents" ).dialog("close");
27		}
28		if($("#OS_consents").is(":visible")) {
29			$( "#OS_consents" ).dialog("close");
30		}
31	});
32	$('#WP_consentsButton').on('click', function(){
33			$('.overlay').fadeIn();
34			$( "#WP_consents" ).dialog();
35	});
36	$('#OS_consentsButton').on('click', function(){
37		$('.overlay').fadeIn();
38		$( "#OS_consents" ).dialog();
39});
40	$('.DisagreeCloseWP').on('click', function(){
41		$('.overlay').fadeOut();
42		$( "#WP_consents" ).dialog("close");
43	});
44	$('.DisagreeCloseOS').on('click', function(){
45		$('.overlay').fadeOut();
46		$( "#OS_consents" ).dialog("close");
47	});
48	// PD skip go to cart pop up save product in shopping cart
49	$('#skipDietary').on('click', function(){
50		$('.overlay').fadeIn();
51		$('.loaders').css('visibility','visible').hide().fadeIn();
52		$('#skipDietaryForm').submit();
53	});
54
55	$(window).on('load', function () {
56		if($('#saveShoppingCart').text()=='1'){
57			$("#processWindow").dialog();
58		}			
59	});
60
61	$('#go-to-cart').on('click', function(){
62		let isValid=true;
63		if($('#Professional-insurance1').length){
64			if ( !($('#Professional-insurance1').is(':checked'))  ) {
65				isValid=false;
66				$('label[for="Professional-insurance1"]').addClass("focuscss");
67			} else {
68				$('label[for="Professional-insurance1"]').removeClass("focuscss");
69			}
70		}
71
72		if($('#Vaccine-consent').length){
73			if ( !($('#Vaccine-consent').is(':checked'))  ) {
74				isValid=false;
75				$('label[for="Vaccine-consent"]').addClass("focuscss");
76			} else {
77				$('label[for="Vaccine-consent"]').removeClass("focuscss");
78			}
79		}
80
81		if(isValid){
82			$('[aria-describedby="registerPDUser"]').fadeOut();
83			$('.overlay').fadeIn();
84			$('.loaders').css('visibility','visible').hide().fadeIn();
85		}
86	});
87
88	if($('#popUp').text()!='0' && $('#popUp').text()!='3'){
89			var x = $('#popUp').text();
90					$('[class^=down]:not(.down'+x+')').slideUp(400);
91			$('.down' + x).slideToggle(450);
92	}
93	var delay = 900;
94	setTimeout(function() {
95		var prevSetup = Selectize.prototype.setup;
96		Selectize.prototype.setup = function () {
97			prevSetup.call(this);
98			this.$control_input.prop('readonly', true);
99		};
100
101		var $DietarySelectize = $('#Dietary').selectize({
102			plugins: { "remove_button": {
103			link : "page/location",
104			} }
105		});
106
107		$(document).on('change', $DietarySelectize, function(){
108			if(jQuery.inArray( "12", $('select[id=Dietary]').val())!==-1) {
109				$(".dietary_message").removeClass('display-none');
110			} else {
111				$(".dietary_message").addClass('display-none');
112			}
113		});
114		var $DietarySelectizeds = $('#NonMemberDietary').selectize({
115      plugins: { "remove_button": {
116          link : "page/location",
117        }
118      }
119		});
120		$(document).on('change', $DietarySelectizeds, function(){
121			if(jQuery.inArray( "12", $('select[id=NonMemberDietary]').val())!==-1) {
122				$(".dietary_messageN").removeClass('display-none');
123			} else {
124				$(".dietary_messageN").addClass('display-none');
125			}
126		});
127	});
128	// PD DESCRIPTION READMORE-------------------------------------------------------------------------
129	$(".pd-readmore-content").each(function () {
130			// define min height
131			let minHeight = 240;
132			// get window width
133			let window_width = $(window).width() + 10;
134	
135			// re-define min-height based on window width
136			if (window_width >= 481) {
137				minHeight = 350;
138			} else {
139				minHeight = 410;
140			}
141			
142			// hide loading & show content
143			$(window).on('load', function () {
144				$(".content-loading").hide();
145				$(".pd-description-container, .readmore-toggle").fadeIn(1300);
146				$(".readmore-toggle").css("display", "block");
147			});
148			// get content full height
149			let fullHeight = $(".pd-description-container").show().height();
150			// re-set content height
151			$(".pd-description-container").hide();
152			// apply readmore with height conditions
153			if (fullHeight > minHeight + 100) {
154				// set min height
155				$(this).css("height", minHeight);
156				$(this).addClass("minimized");
157		
158				// construct wrapper and toggle
159				$(this).wrap('<div class="readmore-container"></div>');
160				$(this).after('<a class="readmore-toggle">Read more</a>');
161			}
162	
163			// READMORE BUTTON FOR PD DESCRIPTION - toogle behaviour on click
164			$(".left-side-content .pd-description-container .readmore-toggle").on( "click",
165				function () {
166					if ($(this).text() == "Read more") {
167						// expanding
168						// get full height
169						fullHeight = $(this)
170								.parent()
171								.find(".pd-readmore-content")
172								.css("height", "auto")
173								.height();
174						// re-set min height
175						$(this)
176							.parent()
177							.find(".pd-readmore-content")
178							.css("height", minHeight);
179							//set full height
180						$(this)
181								.parent()
182								.find(".pd-readmore-content")
183								.animate({ height: fullHeight }, 800, function () {
184								$(this).css("height", "auto");
185								});
186						$(this)
187								.parent()
188								.find(".pd-readmore-content")
189								.removeClass("minimized");
190						$(this).text("Read less");
191					} else {
192						//minimizing
193						// auto scroll back to top
194						var window_width = $(window).width();
195						if (window_width >= 993) {
196							$("html, body")
197							.stop()
198							.animate({
199								scrollTop:
200								$("#block-system-main-block").offset().top - $("#section-header").height()
201							});
202						} else {
203							$("html, body")
204							.stop()
205							.animate(
206								{ scrollTop: $("#block-system-main-block").offset().top - 25 },
207								1000
208							);
209						}
210						// set min height
211						$(this)
212								.parent()
213								.find(".pd-readmore-content")
214								.animate({ height: minHeight }, 800);
215						$(this).parent().find(".pd-readmore-content").addClass("minimized");
216						$(this).text("Read more");
217					}
218				}
219			);
220	
221			// PD PRESENTER READMORE------------------------------------------------------------------------
222			$(".presenters-readmore-content").each(function () {
223			// define min height
224			let minHeight = 190;
225			// get window width
226			let window_width = $(window).width() + 10;
227	
228			// re-define min-height based on window width
229			if (window_width >= 1200) {
230					minHeight = 190;
231			} else if (window_width < 1200 && window_width >= 993) {
232					minHeight = 260;
233			} else if (window_width < 993 && window_width >= 769) {
234					minHeight = 225;
235			} else if (window_width < 769 && window_width >= 571) {
236					minHeight = 230;
237			} else if (window_width < 571 && window_width >= 481) {
238					minHeight = 350;
239			} else {
240					minHeight = 410;
241			}
242	
243			// hide loading & show content
244			var presenters_show_content = function () {
245					$(window).on('load', function () {
246					$(".content-loading").hide();
247					$(".presenters-readmore-content").fadeIn(1000);
248					$(".readmore-toggle").fadeIn(1000);
249					$(".readmore-toggle").css("display", "block");
250					});
251			};
252			// get content full height
253			let fullHeight = $(this).show().height();
254			// re-set content height
255			$(this).hide();
256			// apply readmore with height conditions
257			if (fullHeight > minHeight + 100) {
258					// set min height
259					$(this).css("height", minHeight);
260					$(this).addClass("minimized");
261	
262					// construct wrapper and toggle
263					$(this).wrap('<div class="readmore-container"></div>');
264					$(this).after('<a class="readmore-toggle">Read more</a>');
265	
266					presenters_show_content();
267			} else {
268					presenters_show_content();
269			}
270			});
271	});
272				// READMORE BUTTON FOR PD DESCRIPTION - toogle behaviour on click
273		$(".left-side-content .presenters-bio .readmore-toggle").on("click",
274				function () {
275				// define min height
276				let minHeight = 190;
277				// get window width
278				var window_width = $(window).width() + 10;
279				// re-define min-height based on window width
280				if (window_width >= 1200) {
281						minHeight = 190;
282				} else if (window_width < 1200 && window_width >= 993) {
283						minHeight = 260;
284				} else if (window_width < 993 && window_width >= 769) {
285						minHeight = 225;
286				} else if (window_width < 769 && window_width >= 571) {
287						minHeight = 230;
288				} else if (window_width < 571 && window_width >= 481) {
289						minHeight = 350;
290				} else {
291						minHeight = 410;
292				}
293		
294				if ($(this).text() == "Read more") {
295						// expanding
296						var x = $(this)
297						.parent()
298						.find(".presenters-readmore-content")
299						.attr("class")
300						.replace("extend-content", "")
301						.replace("presenters-readmore-content", "")
302						.replace("minimized", "");
303						var targetClass = "extend-content" + x;
304						targetClass = targetClass.replace(/\s/g, "");
305						// get full height
306						fullHeight = $(this)
307						.parent()
308						.find("." + targetClass)
309						.css("height", "auto")
310						.height();
311						// re-set min height
312						$(this)
313						.parent()
314						.find("." + targetClass)
315						.css("height", minHeight);
316						//set full height
317						$(this)
318						.parent()
319						.find("." + targetClass)
320						.animate({ height: fullHeight }, 800);
321						$(this)
322						.parent()
323						.find("." + targetClass)
324						.removeClass("minimized");
325						$(this)
326						.parent()
327						.find("." + targetClass)
328						.next()
329						.text("Read less");
330				} else {
331						//minimizing
332						// auto scroll back to top
333						var window_width = $(window).width();
334						if (window_width >= 993) {
335						$("html, body")
336								.stop()
337								.animate({
338								scrollTop:
339										$("#presenters-bio").offset().top -
340										$("#section-header").height(),
341								});
342						} else {
343						$("html, body")
344								.stop()
345								.animate(
346								{ scrollTop: $("#presenters-bio").offset().top - 25 },
347								1000
348								);
349						}
350						// set min height
351						var x = $(this)
352						.parent()
353						.find(".presenters-readmore-content")
354						.attr("class")
355						.replace("extend-content", "")
356						.replace("presenters-readmore-content", "");
357						var targetClass = "extend-content" + x;
358						targetClass = targetClass.replace(/\s/g, "");
359						$(this)
360						.parent()
361						.find("." + targetClass)
362						.animate({ height: minHeight }, 800);
363						$(this)
364						.parent()
365						.find("." + targetClass)
366						.addClass("minimized");
367						$(this)
368						.parent()
369						.find("." + targetClass)
370						.next()
371						.text("Read more");
372				}
373				}
374		);
375		$("#close").on("click", function() {
376			$( "#jobnoticement" ).dialog( "close" );
377		});
378});

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.