|
|
@ -71,17 +71,17 @@ frappe.ui.form.on('Procedure', { |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// var url = window.location.host;
|
|
|
|
// var regex = /[://]+/;
|
|
|
|
// frappe.db.get_value('Fish', { name: "Fish" }, 'path', (r) => {
|
|
|
|
// for (var i = 0; i < frm.doc.procedure_details.length; i++) {
|
|
|
|
// if (frm.doc.procedure_details[i].content && r.path && frm.doc.procedure_details[i].content_type == "Link"){// && !(frm.doc.procedure_details[i].content).includes('</a>')){
|
|
|
|
// var x = "<a href=" + '"' + r.path + "://" + url + "/app/procedure/" + frm.doc.procedure_details[i].temp_cnt+ '"' + 'target="_blank"' + ' role="link"' +' onclick="window.open('+r.path + "://" + url + "/app/procedure/" + frm.doc.procedure_details[i].temp_cnt+')"'+'>' + frm.doc.procedure_details[i].temp_cnt + '</a>';
|
|
|
|
// frm.doc.procedure_details[i].content = x
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// cur_frm.refresh_fields('procedure_details');
|
|
|
|
// })
|
|
|
|
var url = window.location.host; |
|
|
|
var regex = /[://]+/; |
|
|
|
frappe.db.get_value('Fish', { name: "Fish" }, 'path', (r) => { |
|
|
|
for (var i = 0; i < frm.doc.procedure_details.length; i++) { |
|
|
|
if (frm.doc.procedure_details[i].content && r.path && frm.doc.procedure_details[i].content_type == "Link"){// && !(frm.doc.procedure_details[i].content).includes('</a>')){
|
|
|
|
var x = "<a href=" + '"' + r.path + "://" + url + "/app/procedure/" + frm.doc.procedure_details[i].temp_cnt+ '"' + 'target="_blank"' + ' role="link"' +' onclick="window.open('+r.path + "://" + url + "/app/procedure/" + frm.doc.procedure_details[i].temp_cnt+')"'+'>' + frm.doc.procedure_details[i].temp_cnt + '</a>'; |
|
|
|
frm.doc.procedure_details[i].content = x |
|
|
|
} |
|
|
|
} |
|
|
|
cur_frm.refresh_fields('procedure_details'); |
|
|
|
}) |
|
|
|
} |
|
|
|
select_row(frm); |
|
|
|
if (frm.doc.procedure_filter == "All") { |
|
|
|