FIX_file modal algnment : ps
This commit is contained in:
parent
df825bd66e
commit
437cc01e48
@ -75,33 +75,15 @@
|
||||
echo $date->format('d-m-Y'); ?></td>
|
||||
<td><?php echo $record->VehicleNo ?></td>
|
||||
<td><?php echo $record->CourierNo ?></td>
|
||||
<td>
|
||||
<?php
|
||||
if(!empty($record->FilePath))
|
||||
{
|
||||
?>
|
||||
<!-- <a target="_blank" href="<?php echo base_url().$record->file ?>"><i class="fa fa-download" ></i></a> -->
|
||||
|
||||
|
||||
<a target="_blank" data-toggle="modal" data-target="#Fileshow" data-id="<%=index%>" title="Attachment Available for Download/View" data-userid="<?php echo $record->IGRNO.'-'.$record->PONO ?>"><button class="btn btn-info btn-sm " >Download</button></a>
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
else if(!empty($record->file))
|
||||
{ ?>
|
||||
|
||||
<a target="_blank" data-toggle="modal" data-target="#Fileshow" data-id="<%=index%>" title="Attachment Available for Download/View" data-userid="<?php echo $record->IGRNO ?>"><button class="btn btn-info btn-sm ">Download</button></a>
|
||||
|
||||
<?php }
|
||||
|
||||
else
|
||||
{?>
|
||||
<!-- echo "NO FILE"; -->
|
||||
<a target="_blank" data-toggle="modal" data-target="#Fileshow" data-id="<%=index%>" title="Attachment Available for Download/View" data-igrno="<?php echo $record->IGRNO ?>" data-pono="<?php echo $record->PONO ?>"><i class="fa fa-pencil" style="text-align: center;"></i></a>
|
||||
<?php }
|
||||
?>
|
||||
|
||||
<td><?php if(!empty($record->FilePath)){ ?>
|
||||
<!-- <a target="_blank" href="<?php echo base_url().$record->file ?>"><i class="fa fa-download" ></i></a> -->
|
||||
<a target="_blank" data-toggle="modal" data-target="#Fileshow" data-id="<%=index%>" title="Attachment Available for Download/View" data-igrno="<?php echo $record->IGRNO ?>" data-pono="<?php echo $record->PONO ?>"><button class="btn btn-success btn-sm ">Download</button></a>
|
||||
<?php } else if(!empty($record->file)){ ?>
|
||||
<a target="_blank" data-toggle="modal" data-target="#Fileshow" data-id="<%=index%>" title="Attachment Available for Download/View" data-igrno="<?php echo $record->IGRNO ?>" ><button class="btn btn-success btn-sm ">Download</button></a>
|
||||
<?php } else { ?>
|
||||
<!-- echo "NO FILE"; -->
|
||||
<a target="_blank" data-toggle="modal" data-target="#Fileshow" data-id="<%=index%>" title="Attachment Available for Download/View" data-igrno="<?php echo $record->IGRNO ?>" data-pono="<?php echo $record->PONO ?>"><i class="fa fa-pencil" style="text-align: center;"></i></a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<!--<td><?php echo $record->file ?></td>-->
|
||||
</tr>
|
||||
@ -125,64 +107,44 @@
|
||||
|
||||
<!-- ######################################edit file########################### -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="modal fade" id="Fileshow" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<form>
|
||||
<form id="igrfileform">
|
||||
<div class="modal-content" style="width:800px;">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<center><h4>Inward Gate File Details</h4></center> <!-- IGR number should display here-->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Table to show the line item of po -->
|
||||
<div id="contents" > </div>
|
||||
<table class="table table-bordered" id="Inwardgateregisterfile" style="font-size:12px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>SNo</th>
|
||||
<th>BillNO</th>
|
||||
<th>PONO</th>
|
||||
<th>FileName</th>
|
||||
<th>Action</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tblefile">
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<center><h4>Inward Gate File Details <span id="title"></span></h4></center> <!-- IGR number should display here-->
|
||||
</div>
|
||||
|
||||
<!-- Table to show the line item of po -->
|
||||
<div id="contents" > </div>
|
||||
<table class="table table-bordered" id="Inwardgateregisterfile" style="font-size:12px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>SNo</th>
|
||||
<th>BillNO</th>
|
||||
<th>PONO</th>
|
||||
<th>FileName</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tblefile"></tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-offset-10 col-md-8" >
|
||||
<input type="button" class="btn btn-success" id ="addmorebutton" value=" ADD FILES..">
|
||||
</div>
|
||||
|
||||
<div id="newdiv"></div>
|
||||
<input type="hidden" name="hidecounter" id="hidecounter" value="0" />
|
||||
<!-- <input type="hidden" name="hideconstant" id="hideconstant" value="0" /> -->
|
||||
<input type ="hidden" name ="hiddenIGRNO" id="hiddenIGRNO"/>
|
||||
<input type ="hidden" name ="hiddenPONO" id="hiddenPONO" />
|
||||
<div style="text-align: right; margin:5px;">
|
||||
<div id="newdiv"></div>
|
||||
<input type="button" class="btn btn-success" id ="addmorebutton" value=" ADD FILES..">
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
<!-- <a class="btn btn-success" data-dismiss="modal" id='editfileadd' value="">ADD</a> -->
|
||||
<br>
|
||||
</br>
|
||||
<a class="btn btn-success" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <a class="btn btn-success" data-dismiss="modal" id='editfileadd' value="">ADD</a> -->
|
||||
<a class="btn btn-success" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||
</div>
|
||||
<br/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@ -450,11 +412,12 @@
|
||||
$(document).ready(function() {
|
||||
|
||||
$("#Fileshow").on("shown.bs.modal",function(e) {
|
||||
//var id = $(this).attr('id');
|
||||
var id = $(this).attr('id');
|
||||
|
||||
var igr = $(e.relatedTarget).data('igrno');
|
||||
var po = $(e.relatedTarget).data('pono');
|
||||
|
||||
$('#igrfileform')[0].reset();
|
||||
$('#title').text(" ("+igr+") ");
|
||||
$("#hiddenIGRNO").val(igr);
|
||||
$("#hiddenPONO").val(po);
|
||||
|
||||
@ -477,50 +440,48 @@ $("#hiddenPONO").val(po);
|
||||
var FilePath ='';
|
||||
var Filename = '';
|
||||
var PONO ='';
|
||||
var BillNO ='';
|
||||
var BillNO ='';
|
||||
$.each(JSON.parse(file), function (i, item)
|
||||
{
|
||||
if(item.file == null)
|
||||
{ if(item.Remarks ==null)
|
||||
{
|
||||
console.log("<?php echo base_url()?>public/uploads/Igrfiles/"+item.FilePath);
|
||||
//alert()
|
||||
PONO =item.PONO;
|
||||
BillNO =item.BillNo;
|
||||
Filename =item.FilePath;
|
||||
FilePath = "<?php echo base_url()?>public/uploads/Igrfiles/"+item.FilePath;
|
||||
PONO =item.PONO;
|
||||
BillNO =item.BillNo;
|
||||
Filename =item.FilePath;
|
||||
FilePath = "<?php echo base_url()?>public/uploads/Igrfiles/"+item.FilePath;
|
||||
}else{
|
||||
Filename ="BillDetails";
|
||||
PONO =item.PONO;
|
||||
BillNO =item.BillNo;
|
||||
FilePath = item.FilePath;
|
||||
Filename ="BillDetails";
|
||||
PONO =item.PONO;
|
||||
BillNO =item.BillNo;
|
||||
FilePath = item.FilePath;
|
||||
}
|
||||
|
||||
}else{
|
||||
Filename = item.file;
|
||||
PONO =item.pono;
|
||||
BillNO = '-';
|
||||
|
||||
FilePath =item.file;
|
||||
}
|
||||
if(Filename != null)
|
||||
{
|
||||
i=i+1;
|
||||
trHTML += '<tr id='+i+'>' +
|
||||
'<td align="right">' + i + '</td>' +
|
||||
'<td id="billno'+i+'">' + BillNO+ '</td>' +
|
||||
'<td>' + PONO+ '</td>' +
|
||||
|
||||
'<td id="file'+i+'"><a target="_blank" href = '+FilePath+'>'+ Filename +'</a></td>' +
|
||||
|
||||
'<td name="filepathname" id="filepathname" onclick="openbillmodel('+i+');"><i class="fa fa-pencil"></i></td>' +
|
||||
'</tr>';
|
||||
|
||||
}
|
||||
i=i+1;
|
||||
trHTML += '<tr id='+i+'>' +
|
||||
'<td align="right">' + i + '</td>' +
|
||||
'<td id="billno'+i+'">' + BillNO+ '</td>' +
|
||||
'<td>' + PONO+ '</td>' +
|
||||
'<td id="file'+i+'"><a target="_blank" href = '+FilePath+'>'+ Filename +'</a></td>' +
|
||||
'<td name="filepathname" id="filepathname" onclick="openbillmodel('+i+');"><i class="fa fa-pencil"></i></td>' +
|
||||
'</tr>';
|
||||
}
|
||||
|
||||
});
|
||||
$("#tblefile").empty();
|
||||
|
||||
$("#tblefile").append(trHTML);
|
||||
$("#tblefile").empty();
|
||||
if(trHTML == ''){
|
||||
trHTML = '<tr><td colspan="5" style="text-align: center;">NO FILE</td></tr>';
|
||||
}
|
||||
$("#tblefile").append(trHTML);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user