update
This commit is contained in:
@@ -50,7 +50,7 @@
|
||||
}).first();
|
||||
}
|
||||
|
||||
function triggerExpertiseButton(boundIndex) {
|
||||
function triggerExpertiseButton(boundIndex, rowData) {
|
||||
try {
|
||||
var columns = $('#gridpemeriksaan').jqxGrid('columns');
|
||||
var records = columns && columns.records ? columns.records : [];
|
||||
@@ -63,7 +63,7 @@
|
||||
: '';
|
||||
|
||||
if (String(renderedLabel).indexOf('Expertise') !== -1) {
|
||||
column.buttonclick(boundIndex);
|
||||
column.buttonclick(rowData || boundIndex);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -88,12 +88,14 @@
|
||||
|
||||
var rows = $('#gridpemeriksaan').jqxGrid('getrows') || [];
|
||||
var matchedRow = null;
|
||||
var matchedRowIndex = -1;
|
||||
var matchedRowBoundIndex = -1;
|
||||
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
if (String(rows[i].id) === focusPeriksaId || (focusNoFoto !== '' && String(rows[i].nofoto) === focusNoFoto)) {
|
||||
matchedRow = rows[i];
|
||||
matchedRowIndex = i;
|
||||
matchedRowBoundIndex = typeof rows[i].boundindex !== 'undefined'
|
||||
? rows[i].boundindex
|
||||
: i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -106,12 +108,12 @@
|
||||
return;
|
||||
}
|
||||
|
||||
var triggerRowIndex = matchedRowIndex >= 0 ? matchedRowIndex : matchedRow.boundindex;
|
||||
var triggerRowIndex = matchedRowBoundIndex >= 0 ? matchedRowBoundIndex : matchedRow.boundindex;
|
||||
$('#gridpemeriksaan').jqxGrid('selectrow', triggerRowIndex);
|
||||
$('#gridpemeriksaan').jqxGrid('ensurerowvisible', triggerRowIndex);
|
||||
|
||||
setTimeout(function () {
|
||||
if (triggerExpertiseButton(triggerRowIndex)) {
|
||||
if (triggerExpertiseButton(triggerRowIndex, matchedRow)) {
|
||||
hasOpenedTarget = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4948,9 +4948,12 @@
|
||||
});
|
||||
}
|
||||
function openlamanekpertise(dlp, nofoto, idne){
|
||||
dlp = dlp || document.getElementById('dlp').value;
|
||||
nofoto = nofoto || document.getElementById('nofoto').value;
|
||||
idne = idne || document.getElementById('periksa_id').value;
|
||||
dlp = dlp || document.getElementById('dlp').value;
|
||||
nofoto = nofoto || document.getElementById('nofoto').value;
|
||||
idne = idne || document.getElementById('periksa_id').value;
|
||||
$('#dlp').val(dlp);
|
||||
$('#nofoto').val(nofoto);
|
||||
$('#periksa_id').val(idne);
|
||||
$('#template_jenis').val(dlp);
|
||||
$('#divtemplate').hide();
|
||||
$('.templatejawaban').hide();
|
||||
|
||||
@@ -4986,6 +4986,9 @@
|
||||
dlp = dlp || document.getElementById('dlp').value;
|
||||
nofoto = nofoto || document.getElementById('nofoto').value || document.getElementById('nofoto').textContent;
|
||||
idne = idne || document.getElementById('periksa_id').value;
|
||||
$('#dlp').val(dlp);
|
||||
$('#nofoto').val(nofoto).html(nofoto);
|
||||
$('#periksa_id').val(idne);
|
||||
$('#template_jenis').val(dlp);
|
||||
$('#divtemplate').hide();
|
||||
$('.templatejawaban').hide();
|
||||
@@ -5332,13 +5335,18 @@
|
||||
$("#gridpemeriksaan").jqxGrid('sortby', 'tlsnofoto', 'asc');
|
||||
},
|
||||
columns: [
|
||||
{ text: 'Expertise', filterable: false, columntype: 'button', align: 'center', width: 70, cellsrenderer: function () {
|
||||
return "Expertise";
|
||||
}, buttonclick: function (row) {
|
||||
editrow = row;
|
||||
var offset = $("#gridpemeriksaan").offset();
|
||||
var dataRecord = $("#gridpemeriksaan").jqxGrid('getrowdata', editrow);
|
||||
$("#nofoto").val('');
|
||||
{ text: 'Expertise', filterable: false, columntype: 'button', align: 'center', width: 70, cellsrenderer: function () {
|
||||
return "Expertise";
|
||||
}, buttonclick: function (row) {
|
||||
editrow = row;
|
||||
var offset = $("#gridpemeriksaan").offset();
|
||||
var dataRecord = (row && typeof row === 'object')
|
||||
? row
|
||||
: $("#gridpemeriksaan").jqxGrid('getrowdata', editrow);
|
||||
if (!dataRecord || typeof dataRecord.id === 'undefined') {
|
||||
return;
|
||||
}
|
||||
$("#nofoto").val('');
|
||||
$("#id_mikroorganismeoptional").val('').trigger('change');
|
||||
|
||||
for (var instance in CKEDITOR.instances) {
|
||||
|
||||
Reference in New Issue
Block a user