feat: Introducing telephony module (#24032)

This commit is contained in:
Leela vadlamudi
2020-12-01 13:04:53 +05:30
committed by GitHub
parent ad57eef40c
commit a3845a95ed
21 changed files with 391 additions and 8 deletions

View File

@@ -0,0 +1,23 @@
frappe.ui.form.ControlData = frappe.ui.form.ControlData.extend( {
make_input() {
this._super();
if (this.df.options == 'Phone') {
this.setup_phone();
}
},
setup_phone() {
if (frappe.phone_call.handler) {
this.$wrapper.find('.control-input')
.append(`
<span class="phone-btn">
<a class="btn-open no-decoration" title="${__('Make a call')}">
<i class="fa fa-phone"></i></a>
</span>
`)
.find('.phone-btn')
.click(() => {
frappe.phone_call.handler(this.get_value(), this.frm);
});
}
}
});