PageSourceSearch

https://dpmptsp.denpasarkota.go.id/portal/js/backend/js-frontend.js

js denpasarkota.go.id collected 2026-10-02 07:20:53 UTC 10,432 bytes, 375 lines download raw bytes

1var base_url = 'https://dpmptsp.denpasarkota.go.id/portal/';
2
3$(document).ready(function ($) {
4
5	
6		
7	App.initHelpers(['appear', 'appear-countTo', 'colorpicker','datepicker','magnific-popup','masked-inputs','select2']);
8	$('.js-masked-year').mask("9999");
9	////	Hidder Header
10
11
12	if($('#view-post').length > 0){
13		App.initHelpers(['magnific-popup','slick']);
14
15	}
16
17
18	
19	
20	
21	
22
23	var headerEle = function () {
24		var $headerHeight = $('header').height();
25		$('.hidden-header').css({ 'height' : $headerHeight  + "px", 'background': '#444'});
26	};
27	
28	$(window).load(function () {
29	    headerEle();
30	});
31	
32	$(window).resize(function () {
33	    headerEle();
34	});
35    
36	/*----------------------------------------------------*/
37	/*	Nivo Lightbox
38	/*----------------------------------------------------*/
39	
40	$('.lightbox').nivoLightbox({
41		effect: 'fadeScale',
42		keyboardNav: true,
43		errorMessage: 'The requested content cannot be loaded. Please try again later.'
44	});
45
46
47    /*---------------------------------------------------*/
48    /* Progress Bar
49    /*---------------------------------------------------*/
50    
51    
52    $('.skill-shortcode').appear(function() {
53  		$('.progress').each(function(){ 
54    		$('.progress-bar').css('width',  function(){ return ($(this).attr('data-percentage')+'%')});
55  		});
56	},{accY: -100}
56);
57	
58	
59	
60    /*--------------------------------------------------*/
61    /* Counter
62    /*--------------------------------------------------*/
63    
64    
65    
66    $('.timer').countTo();
67
68    $('.counter-item').appear(function() {
69        $('.timer').countTo();
70    },{accY: -100});
71    
72    
73	
74	/*----------------------------------------------------*/
75	/*	Nice-Scroll
76	/*----------------------------------------------------*/
77	
78/*	$("html").niceScroll({
79		scrollspeed: 100,
80		mousescrollstep: 38,
81		cursorwidth: 5,
82		cursorborder: 0,
83		cursorcolor: '#333',
84		autohidemode: true,
85		zindex: 999999999,
86		horizrailenabled: false,
87		cursorborderradius: 0,
88	});
89		
90	
91	*/
92	
93	
94	/*----------------------------------------------------*/
95	/*	Nav Menu & Search
96	/*----------------------------------------------------*/
97	
98	$(".nav > li:has(ul)").addClass("drop");
99	$(".nav > li.drop > ul").addClass("dropdown");
100	$(".nav > li.drop > ul.dropdown ul").addClass("sup-dropdown");
101	
102	$('.show-search').click(function() {
103		$('.search-form').fadeIn(300);
104		$('.search-form input').focus();
105	});
106	$('.search-form input').blur(function() {
107		$('.search-form').fadeOut(300);
108	});
109
110	$('.view-search').click(function() {
111		
112		if($('.view-search').hasClass('out')){
113			$('.search-form').fadeOut(300);
114			$('.search-form').hide();
115			$('.view-search').removeClass('out');
116		}else{
117			$('.search-form').fadeIn(300);
118			$('.search-form').show();
119			$('.search-form input').focus();
120			$('.view-search').addClass('out');
121		}
122	});
123
124
125	$('.search-form input').blur(function() {
126		$('.search-form').fadeOut(300);
127	});
128	
129	 /*$(window).scroll(function(){
130        if($(window).scrollTop() >100 ){
131          $(".navbar-top").addClass('past-main');   
132        }
133      else{
134        $(".navbar-top").removeClass('past-main');
135      }
136     });
137	*/
138	
139	
140	/*----------------------------------------------------*/
141	/*	Back Top Link
142	/*----------------------------------------------------*/
143	
144	
145    var offset = 200;
146    var duration = 500;
147    $(window).scroll(function() {
148        if ($(this).scrollTop() > offset) {
149            $('.back-to-top').fadeIn(400);
150        } else {
151            $('.back-to-top').fadeOut(400);
152        }
153    });
154    $('.back-to-top').click(function(event) {
155        event.preventDefault();
156        $('html, body').animate({scrollTop: 0}, 600);
157        return false;
158    });
159    
160    $('a[href="#content"]').click(function(event) {
161        event.preventDefault();
162        $('html, body').animate({scrollTop: 0}, 600);
163        return false;
164    });
165
166    
167
168    $('a.page-scroll').bind('click', function(event) {
169        var $anchor = $(this);
170        $('html, body').stop().animate({
171            scrollTop: $($anchor.attr('href')).offset().top
172        }, 1500);
173        event.preventDefault();
174    });
175
176
177
178	
179	jQuery('#map').CustomMap();
180
181
182});
183
184$(window).resize(function(){
185        
186        container_full_height_init();
187  });
188
189
190//Slider
191$(document).ready(function() {
192	 if($('#home-slideshow').length > 0 ){
193
194        $('.fw-slider').slick({
195            slidesToShow: 1,
196            slidesToScroll: 1,
197            fade: true,
198            dots: false,
199            arrows: true,
200            prevArrow: '<button type="button" class="slick-prev"><span class="linea-arrows-slim-left"></span></button>',
201            nextArrow: '<button type="button" class="slick-next"><span class="linea-arrows-slim-right"></span></button>',
202            autoplay: true,
203            autoplaySpeed: 4000,
204        });
205
206    }
207
208     if($('.info-penting').length > 0 ){
209	    $(".info-penting").owlCarousel({
210			navigation : false,
211			pagination: false,
212			slideSpeed : 500,
213			stopOnHover: true,
214	    	autoPlay: 3000,
215			transitionStyle : "goDown",
216	    	singleItem:true,
217			autoHeight : true,
218		});
219
220	}
221});
222
223
224
225/*----------------------------------------------------*/
226/*	Sticky Header
227/*----------------------------------------------------*/
228
229(function() {
230	
231	var docElem = document.documentElement,
232		didScroll = false,
233		changeHeaderOn = 100;
234		document.querySelector( 'header' );
235		
236	function init() {
237		window.addEventListener( 'scroll', function() {
238			if( !didScroll ) {
239				didScroll = true;
240				setTimeout( scrollPage, 250 );
241			}
242		}, false );
243	}
244	
245	function scrollPage() {
246		var sy = scrollY();
247		if ( sy >= changeHeaderOn ) {
248			$('.top-bar').slideUp(300);
249			$("header").addClass("fixed-header");
250			/*$('.navbar-brand').css({ 'padding-top' : 19 + "px", 'padding-bottom' : 19 + "px" });*/
251			
252			if (/iPhone|iPod|BlackBerry/i.test(navigator.userAgent) || $(window).width() < 479 ){
253				// $('.navbar-default .navbar-nav > li > a').css({ 'padding-top' : 0 + "px", 'padding-bottom' : 0 + "px" })
254			}else{
255				/*$('.navbar-default .navbar-nav > li > a').css({ 'padding-top' : 20 + "px", 'padding-bottom' : 20 + "px" })*/
256				$('.search-side').css({ 'margin-top' : 3 + "px" });
257			};
258			
259		}
260		else {
261			$('.top-bar').slideDown(300);
262			$("header").removeClass("fixed-header");
263			/*$('.navbar-brand').css({ 'padding-top' : 27 + "px", 'padding-bottom' : 27 + "px" });*/
264			
265			if (/iPhone|iPod|BlackBerry/i.test(navigator.userAgent) || $(window).width() < 479 ){
266				// $('.navbar-default .navbar-nav > li > a').css({ 'padding-top' : 0 + "px", 'padding-bottom' : 0 + "px" })
267			}else{
268				/*$('.navbar-default .navbar-nav > li > a').css({ 'padding-top' : 28 + "px", 'padding-bottom' : 28 + "px" })*/
269				$('.search-side').css({ 'margin-top' : 0  + "px" });
270			};
271			
272		}
273		didScroll = false;
274	}
275	
276	function scrollY() {
277		return window.pageYOffset || docElem.scrollTop;
278	}
279	
280	init();
281
282
283
284	/*--------------------------------------------------*/
285	/* Search 
286
287	/*--------------------------------------------------*/
288	var cx = '001463793352579678962:73amjcwg80g';
289	var gcse = document.createElement('script');
290	gcse.type = 'text/javascript';
291	gcse.async = true;
292	gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
293	  '//www.google.com/cse/cse.js?cx=' + cx;
294	var s = document.getElementsByTagName('script')[0];
295	s.parentNode.insertBefore(gcse, s);
296	
297})();
298
299
300// ================================ MAPP ========================================
301
302(function ( $ ) {
303	$.fn.CustomMap = function( options ) {
304		
305		var posLatitude = $('#map').data('position-latitude'),
306		posLongitude = $('#map').data('position-longitude');
307		
308		var settings = $.extend({
309			home: { latitude: posLatitude, longitude: posLongitude },
310			text: '<div class="map-popup"><h4>Universitas Udayana</h4><p>Location campus in bukit - jimbaran </p></div>',
311			icon_url: $('#map').data('marker-img'),	
312			zoom: 15
313		}, options );
314		
315		var coords = new google.maps.LatLng(settings.home.latitude, settings.home.longitude);
316		
317		return this.each(function() {	
318			var element = $(this);
319			
320			var options = {
321				zoom: settings.zoom,
322				center: coords,
323				mapTypeId: google.maps.MapTypeId.ROADMAP,
324				mapTypeControl: false,
325				scaleControl: false,
326				streetViewControl: false,
327				panControl: true,
328				disableDefaultUI: true,
329				zoomControlOptions: {
330					style: google.maps.ZoomControlStyle.DEFAULT
331				},
332				overviewMapControl: true,	
333			};
334			
335			var map = new google.maps.Map(element[0], options);
336			
337			var icon = { 
338				url: settings.icon_url, 
339				origin: new google.maps.Point(0, 0)
340			};
341			
342			var marker = new google.maps.Marker({
343				position: coords,
344				map: map,
345				icon: icon,
346				draggable: false
347			});
348			
349			var info = new google.maps.InfoWindow({
350				content: settings.text
351			});
352			
353			google.maps.event.addListener(marker, 'click', function() { 
354				info.open(map, marker);
355			});
356			
357			var styles = [{"featureType":"landscape","stylers":[{"saturation":-100},{"lightness":65},{"visibility":"on"}]},{"featureType":"poi","stylers":[{"saturation":-100},{"lightness":51},{"visibility":"simplified"}]},{"featureType":"road.highway","stylers":[{"saturation":-100},{"visibility":"simplified"}]},{"featureType":"road.arterial","stylers":[{"saturation":-100},{"lightness":30},{"visibility":"on"}]},{"featureType":"road.local","stylers":[{"saturation":-100},{"lightness":40},{"visibility":"on"}]},{"featureType":"transit","stylers":[{"saturation":-100},{"visibility":"simplified"}]},{"featureType":"administrative.province","stylers":[{"visibility":"on"}]},{"featureType":"water","elementType":"labels","stylers":[{"visibility":"on"},{"lightness":-25},{"saturation":-100}]},{"featureType":"water","elementType":"geometry","stylers":[{"hue":"#ffff00"},{"lightness":-25},{"saturation":-97}]}];
358			
359			map.setOptions({styles: styles});
360		});
361
362	};
363	
364	
365	
366}( jQuery ));
367
368/* Full Height Container
369-------------------------------------------------------*/
370
371function container_full_height_init(){
372    (function($){
373        $(".container-full-height").height($(window).height());
374    })(jQuery);
375}

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.