phone strikestrough
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
{{#if phoneNumberData}}
|
||||
{{#each phoneNumberData}}
|
||||
<div>
|
||||
<a href="tel:{{phoneNumber}}" data-phone-number="{{phoneNumber}}" data-action="dial">{{phoneNumber}}</a>
|
||||
{{#if ../doNotCall}}<s>{{/if}}<a href="tel:{{phoneNumber}}" data-phone-number="{{phoneNumber}}" data-action="dial">{{phoneNumber}}</a>{{#if ../doNotCall}}</s>{{/if}}
|
||||
<span class="text-muted small">({{translateOption type scope=../../scope field=../../name}})</span>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{else}}
|
||||
{{#if value}}
|
||||
<a href="tel:{{value}}" data-phone-number="{{value}}" data-action="dial">{{value}}</a>
|
||||
{{#if value}}
|
||||
{{#if doNotCall}}<s>{{/if}}<a href="tel:{{value}}" data-phone-number="{{value}}" data-action="dial">{{value}}</a>{{#if ../doNotCall}}</s>{{/if}}
|
||||
{{else}}
|
||||
{{translate 'None'}}
|
||||
{{/if}}
|
||||
|
||||
@@ -1 +1 @@
|
||||
<a href="tel:{{value}}" data-phone-number="{{value}}" data-action="dial" title="{{value}}">{{value}}</a>
|
||||
{{#if doNotCall}}<s>{{/if}}<a href="tel:{{value}}" data-phone-number="{{value}}" data-action="dial" title="{{value}}">{{value}}</a>{{#if doNotCall}}</s>{{/if}}
|
||||
|
||||
@@ -78,7 +78,8 @@ Espo.define('views/fields/phone', 'views/fields/varchar', function (Dep) {
|
||||
}
|
||||
|
||||
return _.extend({
|
||||
phoneNumberData: phoneNumberData
|
||||
phoneNumberData: phoneNumberData,
|
||||
doNotCall: this.model.get('doNotCall')
|
||||
}, Dep.prototype.data.call(this));
|
||||
},
|
||||
|
||||
@@ -211,6 +212,14 @@ Espo.define('views/fields/phone', 'views/fields/varchar', function (Dep) {
|
||||
setup: function () {
|
||||
this.dataFieldName = this.name + 'Data';
|
||||
this.defaultType = this.defaultType || this.getMetadata().get('entityDefs.' + this.model.name + '.fields.' + this.name + '.defaultType');
|
||||
|
||||
if (this.model.has('doNotCall')) {
|
||||
this.listenTo(this.model, 'change:doNotCall', function (model, value, o) {
|
||||
if (this.mode !== 'detail' && this.mode !== 'list') return;
|
||||
if (!o.ui) return;
|
||||
this.reRender();
|
||||
}, this);
|
||||
}
|
||||
},
|
||||
|
||||
fetchPhoneNumberData: function () {
|
||||
|
||||
Reference in New Issue
Block a user