File tree Expand file tree Collapse file tree 6 files changed +38
-18
lines changed
dist/assets/js/plugins/storeLocator Expand file tree Collapse file tree 6 files changed +38
-18
lines changed Original file line number Diff line number Diff line change 546
546
}
547
547
548
548
// Raw data
549
- if ( _this . settings . dataRaw !== null ) {
549
+ if ( _this . settings . dataRaw !== null ) {
550
550
// XML
551
551
if ( dataTypeRead === 'xml' ) {
552
552
return $ . parseXML ( _this . settings . dataRaw ) ;
553
553
}
554
554
555
555
// JSON
556
- else if ( dataTypeRead === 'json' ) {
556
+ else if ( dataTypeRead === 'json' ) {
557
557
if ( Array . isArray && Array . isArray ( _this . settings . dataRaw ) ) {
558
558
return _this . settings . dataRaw ;
559
559
}
Original file line number Diff line number Diff line change 1
1
{{#location}}
2
2
< div class ="loc-name "> {{name}}</ div >
3
3
< div > {{address}}</ div >
4
- < div > {{address2}}</ div >
4
+ {{#if address2}}
5
+ < div > {{address2}}</ div >
6
+ {{/if}}
5
7
< div > {{city}}{{#if city}},{{/if}} {{state}} {{postal}}</ div >
6
- < div > {{hours1}}</ div >
7
- < div > {{hours2}}</ div >
8
- < div > {{hours3}}</ div >
9
- < div > {{phone}}</ div >
8
+ {{#if hours1}}
9
+ < div > {{hours1}}</ div >
10
+ {{/if}}
11
+ {{#if hours2}}
12
+ < div > {{hours2}}</ div >
13
+ {{/if}}
14
+ {{#if hours3}}
15
+ < div > {{hours3}}</ div >
16
+ {{/if}}
17
+ {{#if phone}}
18
+ < div > {{phone}}</ div >
19
+ {{/if}}
10
20
< div > < a href ="{{web}} " target ="_blank "> {{niceURL web}}</ a > </ div >
11
- {{/location}}
21
+ {{/location}}
Original file line number Diff line number Diff line change 1
1
{{#location}}
2
2
< div class ="loc-name "> {{name}}</ div >
3
- < div > {{{description}}}</ div >
4
- {{/location}}
3
+ {{#if description}}
4
+ < div > {{{description}}}</ div >
5
+ {{/if}}
6
+ {{/location}}
Original file line number Diff line number Diff line change 4
4
< div class ="list-details ">
5
5
< div class ="list-content ">
6
6
< div class ="loc-name "> {{name}}</ div >
7
- < div > {{{description}}}</ div >
7
+ {{#if description}}
8
+ < div > {{{description}}}</ div >
9
+ {{/if}}
8
10
</ div >
9
11
</ div >
10
12
</ li >
11
- {{/location}}
13
+ {{/location}}
Original file line number Diff line number Diff line change 5
5
< div class ="list-content ">
6
6
< div class ="loc-name "> {{name}}</ div >
7
7
< div class ="loc-addr "> {{address}}</ div >
8
- < div class ="loc-addr2 "> {{address2}}</ div >
8
+ {{#if address2}}
9
+ < div class ="loc-addr2 "> {{address2}}</ div >
10
+ {{/if}}
9
11
< div class ="loc-addr3 "> {{city}}{{#if city}},{{/if}} {{state}} {{postal}}</ div >
10
- < div class ="loc-phone "> {{phone}}</ div >
11
- < div class ="loc-web "> < a href ="{{web}} " target ="_blank "> {{niceURL web}}</ a > </ div >
12
+ {{#if phone}}
13
+ < div class ="loc-phone "> {{phone}}</ div >
14
+ {{/if}}
15
+ {{#if web}}
16
+ < div class ="loc-web "> < a href ="{{web}} " target ="_blank "> {{niceURL web}}</ a > </ div >
17
+ {{/if}}
12
18
{{#if distance}}
13
19
< div class ="loc-dist loc-default-dist "> {{distance}} {{length}}</ div >
14
20
{{#if altdistance}}< div class ="loc-dist loc-alt-dist "> {{altdistance}} {{altlength}}</ div > {{/if}}
Original file line number Diff line number Diff line change 530
530
formattedAddress = '' ;
531
531
532
532
// Define extra geocode result info
533
- if ( typeof geocodeData !== 'undefined' && typeof geocodeData . geometry . bounds !== 'undefined' ) {
533
+ if ( typeof geocodeData !== 'undefined' && typeof geocodeData . geometry . bounds !== 'undefined' ) {
534
534
formattedAddress = geocodeData . formatted_address ;
535
535
northEast = JSON . stringify ( geocodeData . geometry . bounds . getNorthEast ( ) ) ;
536
536
southWest = JSON . stringify ( geocodeData . geometry . bounds . getSouthWest ( ) ) ;
542
542
}
543
543
544
544
// Raw data
545
- if ( _this . settings . dataRaw !== null ) {
545
+ if ( _this . settings . dataRaw !== null ) {
546
546
// XML
547
547
if ( dataTypeRead === 'xml' ) {
548
548
return $ . parseXML ( _this . settings . dataRaw ) ;
549
549
}
550
550
551
551
// JSON
552
- else if ( dataTypeRead === 'json' ) {
552
+ else if ( dataTypeRead === 'json' ) {
553
553
if ( Array . isArray && Array . isArray ( _this . settings . dataRaw ) ) {
554
554
return _this . settings . dataRaw ;
555
555
}
You can’t perform that action at this time.
0 commit comments