Skip to content

Commit

Permalink
Merge pull request #305 from bjorn2404/fix/directions-link
Browse files Browse the repository at this point in the history
Fix/directions link
  • Loading branch information
bjorn2404 authored Dec 22, 2024
2 parents 90e8c1b + a3eac54 commit f41f3b6
Show file tree
Hide file tree
Showing 13 changed files with 1,490 additions and 739 deletions.
20 changes: 19 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@ module.exports = function (grunt) {
clean : {
files: ['dist']
},
copy: {
templates: {
files: [
{
expand: true,
cwd: 'src/templates/',
src: '**/*.html',
dest: 'dist/assets/js/plugins/storeLocator/templates/',
flatten: true
}
]
}
},
sass : {
dist: {
files: {
Expand Down Expand Up @@ -100,6 +113,10 @@ module.exports = function (grunt) {
files: '<%= jshint.gruntfile.src %>',
tasks: ['jshint:gruntfile']
},
templates: {
files: ['src/templates/**/*.html'],
tasks: ['copy']
},
src : {
files : ['src/**/*'],
tasks : ['sass', 'concat', 'uglify', 'usebanner', 'cssmin'],
Expand All @@ -117,6 +134,7 @@ module.exports = function (grunt) {
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-qunit');
Expand All @@ -127,7 +145,7 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-handlebars');

// Build
grunt.registerTask('build', ['sass', 'concat', 'uglify', 'usebanner', 'cssmin']);
grunt.registerTask('build', ['sass', 'copy', 'concat', 'uglify', 'usebanner', 'cssmin']);

//Watch src build
grunt.registerTask('watchsrc', ['watch:src']);
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquery-storelocator-plugin",
"version": "3.4.0",
"version": "3.4.1",
"description": "This jQuery plugin takes advantage of Google Maps API version 3 to create an easy to implement store locator. No back-end programming is required, you just need to feed it KML, XML, or JSON data with all the location information.",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion dist/assets/js/plugins/storeLocator/jquery.storelocator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! jQuery Google Maps Store Locator - v3.4.0 - 2024-05-18
/*! jQuery Google Maps Store Locator - v3.4.1 - 2024-12-20
* http://www.bjornblog.com/web/jquery-store-locator-plugin
* Copyright (c) 2024 Bjorn Holine; Licensed MIT */

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{{#if distance}}
<div class="loc-dist loc-default-dist">{{distance}} {{length}}</div>
{{#if altdistance}}<div class="loc-dist loc-alt-dist">{{altdistance}} {{altlength}}</div>{{/if}}
<div class="loc-directions"><a href="https://maps.googleapis.com/maps?saddr={{origin}}&amp;daddr={{address}} {{address2}} {{city}}, {{state}} {{postal}}" target="_blank">Directions</a></div>
<div class="loc-directions"><a href="https://www.google.com/maps/dir/?api=1&amp;origin={{origin}}&amp;destination={{address}} {{address2}} {{city}}, {{state}} {{postal}}" target="_blank">Directions</a></div>
{{/if}}
</div>
</div>
Expand Down
Loading

0 comments on commit f41f3b6

Please sign in to comment.