|
391 | 391 | * Check for query string
|
392 | 392 | *
|
393 | 393 | * @param param {string} query string parameter to test
|
| 394 | + * |
394 | 395 | * @returns {string} query string value
|
395 | 396 | */
|
396 | 397 | getQueryString: function(param) {
|
|
790 | 791 | *
|
791 | 792 | * @param num {number} the full number
|
792 | 793 | * @param dec {number} the number of digits to show after the decimal
|
| 794 | + * |
793 | 795 | * @returns {number}
|
794 | 796 | */
|
795 | 797 | roundNumber: function (num, dec) {
|
|
801 | 803 | * Checks to see if the object is empty. Using this instead of $.isEmptyObject for legacy browser support
|
802 | 804 | *
|
803 | 805 | * @param obj {Object} the object to check
|
| 806 | + * |
804 | 807 | * @returns {boolean}
|
805 | 808 | */
|
806 | 809 | isEmptyObject: function (obj) {
|
|
817 | 820 | * Checks to see if all the property values in the object are empty
|
818 | 821 | *
|
819 | 822 | * @param obj {Object} the object to check
|
| 823 | + * |
820 | 824 | * @returns {boolean}
|
821 | 825 | */
|
822 | 826 | hasEmptyObjectVals: function (obj) {
|
|
998 | 1002 | *
|
999 | 1003 | * @param data {array} data array to check for filter values
|
1000 | 1004 | * @param filters {Object} taxonomy filters object
|
| 1005 | + * |
1001 | 1006 | * @returns {boolean}
|
1002 | 1007 | */
|
1003 | 1008 | filterData: function (data, filters) {
|
|
1026 | 1031 | *
|
1027 | 1032 | * @param currentPage {number}
|
1028 | 1033 | * @param totalPages {number}
|
| 1034 | + * |
1029 | 1035 | * @returns {string}
|
1030 | 1036 | */
|
1031 | 1037 | _paginationOutput: function(currentPage, totalPages) {
|
|
1107 | 1113 | * @param markerUrl {string} path to marker image
|
1108 | 1114 | * @param markerWidth {number} width of marker
|
1109 | 1115 | * @param markerHeight {number} height of marker
|
| 1116 | + * |
1110 | 1117 | * @returns {Object} Google Maps icon object
|
1111 | 1118 | */
|
1112 | 1119 | markerImage: function (markerUrl, markerWidth, markerHeight) {
|
|
1143 | 1150 | * points
|
1144 | 1151 | * @param map {Object} the Google Map
|
1145 | 1152 | * @param category {string} location category/categories
|
| 1153 | + * |
1146 | 1154 | * @returns {Object} Google Maps marker
|
1147 | 1155 | */
|
1148 | 1156 | createMarker: function (point, name, address, letter, map, category) {
|
|
1223 | 1231 | * @param currentMarker {Object} Google Maps marker
|
1224 | 1232 | * @param storeStart {number} optional first location on the current page
|
1225 | 1233 | * @param page {number} optional current page
|
| 1234 | + * |
1226 | 1235 | * @returns {Object} extended location data object
|
1227 | 1236 | */
|
1228 | 1237 | _defineLocationData: function (currentMarker, storeStart, page) {
|
|
1525 | 1534 | * Get the address by marker ID
|
1526 | 1535 | *
|
1527 | 1536 | * @param markerID {number} location ID
|
| 1537 | + * |
1528 | 1538 | * @returns {string} formatted address
|
1529 | 1539 | */
|
1530 | 1540 | getAddressByMarker: function(markerID) {
|
|
2604 | 2614 | return featuredset;
|
2605 | 2615 | },
|
2606 | 2616 |
|
2607 |
| - /** |
| 2617 | + /** |
2608 | 2618 | * Restrict featured locations by distance.
|
2609 | 2619 | *
|
2610 | 2620 | * @returns {Array}
|
2611 |
| - */ |
| 2621 | + */ |
2612 | 2622 | featuredRestrictions: function(mappingObject) {
|
2613 |
| - this.writeDebug('featuredRestrictions',arguments); |
| 2623 | + this.writeDebug('featuredRestrictions',arguments); |
2614 | 2624 |
|
2615 | 2625 | if (this.settings.featuredDistance === null) {
|
2616 | 2626 | return featuredset;
|
2617 | 2627 | }
|
2618 | 2628 |
|
2619 | 2629 | // Featured locations radius restriction.
|
2620 |
| - if (this.settings.featuredDistance !== null) { |
2621 |
| - featuredset = this.featuredDistanceRestriction(mappingObject); |
2622 |
| - } |
| 2630 | + if (this.settings.featuredDistance !== null) { |
| 2631 | + featuredset = this.featuredDistanceRestriction(mappingObject); |
| 2632 | + } |
2623 | 2633 |
|
2624 |
| - return featuredset; |
| 2634 | + return featuredset; |
2625 | 2635 | },
|
2626 | 2636 |
|
2627 | 2637 | /**
|
|
2814 | 2824 | if (!taxFilters[k]) {
|
2815 | 2825 | taxFilters[k] = [];
|
2816 | 2826 | }
|
2817 |
| - taxFilters[k][z] = '(?:^|\\s)' + filters[k][z].replace(/([.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, ''); |
| 2827 | + taxFilters[k][z] = '(?=.*' + filters[k][z].replace(/([.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, '') + '(?!\\s))'; |
2818 | 2828 | }
|
2819 | 2829 | }
|
2820 | 2830 | }
|
|
0 commit comments