|
function onPopupOpen(args) {
if (args.type === 'Editor') {
if (!args.element.querySelector('.e-clientname')) {
var inputEle = ej.base.createElement('input', {
className: 'e-field', attrs: { name: 'Customer_Name', value: (args.data.Customer_Name ? args.data.Customer_Name : "") }
});
}
}
} |
|
function onPopupOpen(args) {
if (args.type === 'Editor') {
if (!args.element.querySelector('.e-clientname')) {
var clientName = new ej.inputs.Input.createInput({
element: inputEle,
floatLabelType: 'Always',
readonly: true,
properties: {
placeholder: 'Client name'
}
});
}
}
} |
|
function onPopupOpen(args) {
if (args.type === 'Editor') {
if (!args.element.querySelector('.e-clientname')) {
row = ej.base.createElement('div', { className: 'e-client-phone' });
formElement.firstChild.insertBefore(row, args.element.querySelector('.e-clientname'));
container = ej.base.createElement('div', { className: 'e-client-phone-container' });
inputEle = ej.base.createElement('input', {
className: 'e-field', attrs: {
name: 'Customer_Phone', value: (args.data.Customer_Phone ? args.data.Customer_Phone : "")
}
});
container.appendChild(inputEle);
row.appendChild(container);
var clientPhone = new ej.inputs.Input.createInput({
element: inputEle,
floatLabelType: 'Always',
readonly: true,
properties: {
placeholder: 'Client phone'
}
});
inputEle.setAttribute('name', 'Customer_Phone');
}
var container = args.element.querySelector(".e-client-phone-container");
var callLink = args.element.querySelector(".e-phone-tag");
if (args.data.Customer_Phone) {
container.firstChild.style.width = "80%";
var link = "tel:" + args.data.Customer_Phone;
var linkEle = ej.base.createElement("a");
var linkedEle = Object.assign(linkEle, { rel='nofollow' href: link, rel: "nofollow", innerText: "Make a Call", className: "e-phone-tag" });
container.appendChild(linkedEle);
} else if (callLink) {
callLink.remove();
container.firstChild.style.width = "100%";
}
}
} |
function onPopupOpen(args) { if (args.type === 'Editor') { if (!args.element.querySelector('.e-clientname')) { var inputEle = ej.base.createElement('input', { className: 'e-field', attrs: { name: 'Customer_Name', value: (args.data.Customer_Name ? args.data.Customer_Name : ""), readonly:true } }); } } } |