Advertisement
Guest User

NetBeans 8.0 RC1 wrong auto-format

a guest
Mar 6th, 2014
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript" n:syntax="double">
  2.             var radiusValues = [250, 500, 1000, 2000, 5000, 10000, 25000, 50000];
  3.             var radius = {{$radius}};
  4.             var orderBy = 'distance';
  5.             var markers = [];
  6.             $(document).ready(function() {
  7.     var mapOptions = {
  8.     zoom: 7,
  9.             center: new google.maps.LatLng(49.8865147, 15.7235439),
  10.             mapTypeId: google.maps.MapTypeId.ROADMAP,
  11.             scrollwheel: false,
  12.             zoomControl: false,
  13.             scaleControl: false,
  14.             streetViewControl: false
  15.     };
  16.             GMapV3 = new google.maps.Map(document.getElementById('mapav3'), mapOptions);
  17.             google.maps.event.addListener(GMapV3, 'dragend', function() {
  18.             updateSnippet();
  19.             });
  20.             getPlaceCoords();
  21.             $('body').append('<img id="map-filter" src="/images/map_filter.png">');
  22.             $('#map-filter').css({
  23.     position: 'absolute',
  24.             'pointer-events': 'none', left: $('#mapav3').offset().left,
  25.             top: $('#mapav3').offset().top
  26.     });
  27.             $('body').append('<a href="javascript:void(0)" onclick="zoom(-1)" id="map-filter-zoom-out"><div style="width:55px; height:51px"><!-- --></div></a>');
  28.             $('#map-filter-zoom-out').css({
  29.     position: 'absolute',
  30.             left: $('#mapav3').offset().left + 253,
  31.             top: $('#mapav3').offset().top + 143
  32.     });
  33.             $('body').append('<a href="javascript:void(0)" onclick="zoom(+1)" id="map-filter-zoom-in"><div style="width:55px; height:51px"><!-- --></div></a>');
  34.             $('#map-filter-zoom-in').css({
  35.     position: 'absolute',
  36.             left: $('#mapav3').offset().left + 634,
  37.             top: $('#mapav3').offset().top + 143
  38.     });
  39.     });
  40.             function getPlaceCoords() {
  41.             var geocoder = new google.maps.Geocoder();
  42.                     geocoder.geocode({'address': $('#search-where').val()}, function(results, status) {
  43.                     if (status == google.maps.GeocoderStatus.OK) {
  44.                     placeCoords = results[0].geometry.location;
  45.                 focusPlace(placeCoords);
  46.                 updateSnippet();
  47.             } else {
  48.                 alert('Nepodařilo se najít požadované místo, zkuste prosím Váš dotaz zadat jinak.');
  49.             }
  50.         });
  51.     }
  52.    
  53.     function focusPlace(place) {
  54.         GMapV3.setCenter(place);
  55.         GMapV3.setZoom(21);
  56.         radiusBounds = new google.maps.Circle({radius: parseInt(radius), center: place}).getBounds();
  57.                     GMapV3.fitBounds(radiusBounds);
  58.             }
  59.  
  60.             function zoom(val) {
  61.             var actual = radiusValues.indexOf(radius);
  62.                     var tmp = val > 0 ? actual - 1 : actual + 1;
  63.                     if (radiusValues[tmp] > 1) {
  64.             radius = radiusValues[tmp];
  65.                     updateSnippet();
  66.             }
  67.             }
  68.  
  69.             function orderResultsBy(value) {
  70.             orderBy = value;
  71.                     updateSnippet();
  72.             }
  73.  
  74.             function updateSnippet() {
  75.             removeAllMarkers();
  76.                     $('#mapav3').block({
  77.             message: '<img src="/images/spinner.gif">',
  78.                     css:  {backgroundColor: 'transparent', border: 'none'}
  79.             });
  80.                     $.nette.ajax({
  81.                     type: "GET",
  82.                             url: {{link searchSnippet!}},
  83.                             data: {
  84.                             text: {{$what}},
  85.                                     lat: GMapV3.getCenter().lat(),
  86.                                     lng: GMapV3.getCenter().lng(),
  87.                                     radius: radius,
  88.                                     categories: {{$categories}},
  89.                                     orderBy: orderBy
  90.                             },
  91.                             complete: function() {
  92.                             $('.jNiceWrapper').on('click', function() {
  93.                             $('.jNiceRadio').removeClass('jNiceChecked');
  94.                                     $(this).children(":first").addClass('jNiceChecked');
  95.                                     radius = $(this).attr('rel');
  96.                                     updateSnippet();
  97.                             });
  98.                                     $('#mapav3').unblock();
  99.                                     focusPlace(GMapV3.getCenter());
  100.                                     window.history.pushState(null, document.title, {{link search $what}} + "&where=" + GMapV3.getCenter().lat() + "," + GMapV3.getCenter().lng() + "&radius=" + radius);
  101.                             }
  102.                     });
  103.             }
  104.  
  105. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement