File manager - Edit - /home/gzbnyc5/pty-app/realstate/public/js/pty.front.angjs-home.js
Back
angularApp.directive('onErrorSrc', function() { return { link: function(scope, element, attrs) { element.bind('error', function() { if (attrs.src != attrs.onErrorSrc) { attrs.$set('src', attrs.onErrorSrc); } }); element.bind('load', function() { }); } } }); angularApp.filter('bedNumber', function() { return function(x) { var z = x.toString(); if( z.indexOf('.') < 0 ) return x; var parts = z.split('.'); if(parseInt(parts[1]) == 0) { return parts[0]; } else { return x; } }; }); angularApp.controller('homeController', ['$rootScope', '$scope', '$http', function($rootScope, $scope, $http) { var ctrl = this; ctrl.trans = GLOBAL_TRANSLATION; ctrl.propertyList = []; ctrl.agentList = []; ctrl.testimonialList = []; ctrl.invalidType = false; window.rents.forEach(function(el, idx) { ctrl.propertyList.push(el); }); window.sales.forEach(function(el, idx) { ctrl.propertyList.push(el); }); window.agents.forEach(function(el, idx) { ctrl.agentList.push(el); }); window.testimonials.forEach(function(el, idx) { ctrl.testimonialList.push(el); }); ctrl.searchProperty = function() { var value = $('#pty-property-type').val(); if( value.length == 0 ) { ctrl.invalidType = true; return false; } else { ctrl.invalidType = false; } var url = ''; console.log(value); if( value == 'R' ) { url = 'rentals?'; } else if( value == 'S' ){ url = 'sales?'; } else if ( value == 'E') { url = 'exclusive?'; } url +='keywords=' + $('#pty-keywords').val() + '&minBeds=' + $('#pty-bed').val() + '&minBaths=' + $('#pty-bath').val() + '&location=' + ($('#pty-location').val() == null ? '' : $('#pty-location').val()) + '&minPrice=' + $('#pty-price-min').val().trim() + '&maxPrice=' + $('#pty-price-max').val().trim() + '&bAmens=' + $('input[type="checkbox"].build-amens:checked').map(function(){ return $(this).val(); }).get().join(',') + '&iAmens=' + $('input[type="checkbox"].apart-amens:checked').map(function(){ return $(this).val(); }).get().join(','); window.location.href = BASEURL + '/' + url; } $(document).ready(function() { $(document).on('click', '.feature_item .image', function(e) { window.location.href = $(this).parent().find('a:eq(0)').attr('href') }); $('#pty-property-type').change(function() { if( this.value.length == 0) { ctrl.invalidType = true; } else { ctrl.invalidType = false; fillPriceMinMax(this.value); } $scope.$apply(); }); function fillPriceMinMax(value) { var list = null; if(value == 'R' ) { list = priceList.priceRent; } else if(value == 'S') { list = priceList.priceSale; } var priceRange = $('.pty-price-range'); priceRange.find('option').not('[value=""]').remove(); list.forEach(function(e) { priceRange.append('<option value="'+e.id+'">'+e.value+'</option>'); }); priceRange.trigger('change'); } var select2 = $('.callus select[placeholder]').each(function() { var placeHolder = $(this).attr('placeholder'); $(this).select2({ placeholder: { id: '', text: placeHolder, }, minimumResultsForSearch: -1, width: '100%', }) }); $.when(select2).done(function() { $('.callus .input-group > .select2-container:eq(0)').addClass('first'); $('.callus .input-group > .select2-container:eq(1)').addClass('last'); $('#pty-property-type').val('R').trigger('change'); }); //Filter Property $('#property-gallery').cubeportfolio({ filters: '#filters-property', layoutMode: 'grid', mediaQueries: [{ width: 1500, cols: 4 }, { width: 1100, cols: 3 }, { width: 800, cols: 3 }, { width: 480, cols: 2 }, { width: 320, cols: 1 }], defaultFilter: '*', animationType: 'fadeOut', gapHorizontal: 30, gapVertical: 30, gridAdjustment: 'responsive', caption: 'zoom', displayType: 'sequentially', displayTypeSpeed: 100, }); //Testinomial (Home2) $("#testinomial-slider").owlCarousel({ autoPlay: false, stopOnHover: true, navigation: true, navigationText: ["<i class='icon-arrow-left2'></i>", "<i class='icon-arrow-right2'></i>"], slideSpeed: 300, pagination: true, transitionStyle: "fade", singleItem: true }); $(".three-item").owlCarousel({ autoPlay: true, navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"], stopOnHover: true, pagination: false, navigation: true, items: 3, itemsDesktop: [1199, 3], itemsDesktopSmall: [979, 2] }); $('#ptyVideo')[0].play(); $('.pty-btn-url').click(function() { window.location.href = $(this).attr('href'); }); }); }]);
| ver. 1.4 |
Github
|
.
| PHP 8.2.31 | Generation time: 0 |
proxy
|
phpinfo
|
Settings