|
395 | 395 | * Check for query string
|
396 | 396 | *
|
397 | 397 | * @param param {string} query string parameter to test
|
| 398 | + * |
398 | 399 | * @returns {string} query string value
|
399 | 400 | */
|
400 | 401 | getQueryString: function(param) {
|
|
794 | 795 | *
|
795 | 796 | * @param num {number} the full number
|
796 | 797 | * @param dec {number} the number of digits to show after the decimal
|
| 798 | + * |
797 | 799 | * @returns {number}
|
798 | 800 | */
|
799 | 801 | roundNumber: function (num, dec) {
|
|
805 | 807 | * Checks to see if the object is empty. Using this instead of $.isEmptyObject for legacy browser support
|
806 | 808 | *
|
807 | 809 | * @param obj {Object} the object to check
|
| 810 | + * |
808 | 811 | * @returns {boolean}
|
809 | 812 | */
|
810 | 813 | isEmptyObject: function (obj) {
|
|
821 | 824 | * Checks to see if all the property values in the object are empty
|
822 | 825 | *
|
823 | 826 | * @param obj {Object} the object to check
|
| 827 | + * |
824 | 828 | * @returns {boolean}
|
825 | 829 | */
|
826 | 830 | hasEmptyObjectVals: function (obj) {
|
|
1002 | 1006 | *
|
1003 | 1007 | * @param data {array} data array to check for filter values
|
1004 | 1008 | * @param filters {Object} taxonomy filters object
|
| 1009 | + * |
1005 | 1010 | * @returns {boolean}
|
1006 | 1011 | */
|
1007 | 1012 | filterData: function (data, filters) {
|
|
1030 | 1035 | *
|
1031 | 1036 | * @param currentPage {number}
|
1032 | 1037 | * @param totalPages {number}
|
| 1038 | + * |
1033 | 1039 | * @returns {string}
|
1034 | 1040 | */
|
1035 | 1041 | _paginationOutput: function(currentPage, totalPages) {
|
|
1111 | 1117 | * @param markerUrl {string} path to marker image
|
1112 | 1118 | * @param markerWidth {number} width of marker
|
1113 | 1119 | * @param markerHeight {number} height of marker
|
| 1120 | + * |
1114 | 1121 | * @returns {Object} Google Maps icon object
|
1115 | 1122 | */
|
1116 | 1123 | markerImage: function (markerUrl, markerWidth, markerHeight) {
|
|
1147 | 1154 | * points
|
1148 | 1155 | * @param map {Object} the Google Map
|
1149 | 1156 | * @param category {string} location category/categories
|
| 1157 | + * |
1150 | 1158 | * @returns {Object} Google Maps marker
|
1151 | 1159 | */
|
1152 | 1160 | createMarker: function (point, name, address, letter, map, category) {
|
|
1227 | 1235 | * @param currentMarker {Object} Google Maps marker
|
1228 | 1236 | * @param storeStart {number} optional first location on the current page
|
1229 | 1237 | * @param page {number} optional current page
|
| 1238 | + * |
1230 | 1239 | * @returns {Object} extended location data object
|
1231 | 1240 | */
|
1232 | 1241 | _defineLocationData: function (currentMarker, storeStart, page) {
|
|
1529 | 1538 | * Get the address by marker ID
|
1530 | 1539 | *
|
1531 | 1540 | * @param markerID {number} location ID
|
| 1541 | + * |
1532 | 1542 | * @returns {string} formatted address
|
1533 | 1543 | */
|
1534 | 1544 | getAddressByMarker: function(markerID) {
|
|
2608 | 2618 | return featuredset;
|
2609 | 2619 | },
|
2610 | 2620 |
|
2611 |
| - /** |
| 2621 | + /** |
2612 | 2622 | * Restrict featured locations by distance.
|
2613 | 2623 | *
|
2614 | 2624 | * @returns {Array}
|
2615 |
| - */ |
| 2625 | + */ |
2616 | 2626 | featuredRestrictions: function(mappingObject) {
|
2617 |
| - this.writeDebug('featuredRestrictions',arguments); |
| 2627 | + this.writeDebug('featuredRestrictions',arguments); |
2618 | 2628 |
|
2619 | 2629 | if (this.settings.featuredDistance === null) {
|
2620 | 2630 | return featuredset;
|
2621 | 2631 | }
|
2622 | 2632 |
|
2623 | 2633 | // Featured locations radius restriction.
|
2624 |
| - if (this.settings.featuredDistance !== null) { |
2625 |
| - featuredset = this.featuredDistanceRestriction(mappingObject); |
2626 |
| - } |
| 2634 | + if (this.settings.featuredDistance !== null) { |
| 2635 | + featuredset = this.featuredDistanceRestriction(mappingObject); |
| 2636 | + } |
2627 | 2637 |
|
2628 |
| - return featuredset; |
| 2638 | + return featuredset; |
2629 | 2639 | },
|
2630 | 2640 |
|
2631 | 2641 | /**
|
|
2818 | 2828 | if (!taxFilters[k]) {
|
2819 | 2829 | taxFilters[k] = [];
|
2820 | 2830 | }
|
2821 |
| - taxFilters[k][z] = '(?:^|\\s)' + filters[k][z].replace(/([.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, ''); |
| 2831 | + taxFilters[k][z] = '(?=.*' + filters[k][z].replace(/([.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, '') + '(?!\\s))'; |
2822 | 2832 | }
|
2823 | 2833 | }
|
2824 | 2834 | }
|
|
0 commit comments