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>
|
echo $date->format('d-m-Y'); ?></td>
|
||||||
<td><?php echo $record->VehicleNo ?></td>
|
<td><?php echo $record->VehicleNo ?></td>
|
||||||
<td><?php echo $record->CourierNo ?></td>
|
<td><?php echo $record->CourierNo ?></td>
|
||||||
<td>
|
<td><?php if(!empty($record->FilePath)){ ?>
|
||||||
<?php
|
<!-- <a target="_blank" href="<?php echo base_url().$record->file ?>"><i class="fa fa-download" ></i></a> -->
|
||||||
if(!empty($record->FilePath))
|
<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>
|
||||||
<!-- <a target="_blank" href="<?php echo base_url().$record->file ?>"><i class="fa fa-download" ></i></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>
|
||||||
<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 } ?>
|
||||||
<?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>
|
</td>
|
||||||
<!--<td><?php echo $record->file ?></td>-->
|
<!--<td><?php echo $record->file ?></td>-->
|
||||||
</tr>
|
</tr>
|
||||||
@ -125,64 +107,44 @@
|
|||||||
|
|
||||||
<!-- ######################################edit file########################### -->
|
<!-- ######################################edit file########################### -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="modal fade" id="Fileshow" role="dialog">
|
<div class="modal fade" id="Fileshow" role="dialog">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<!-- Modal content-->
|
<!-- Modal content-->
|
||||||
<form>
|
<form id="igrfileform">
|
||||||
<div class="modal-content" style="width:800px;">
|
<div class="modal-content" style="width:800px;">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
<center><h4>Inward Gate File Details</h4></center> <!-- IGR number should display here-->
|
<center><h4>Inward Gate File Details <span id="title"></span></h4></center> <!-- IGR number should display here-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Table to show the line item of po -->
|
||||||
|
<div id="contents" > </div>
|
||||||
<!-- Table to show the line item of po -->
|
<table class="table table-bordered" id="Inwardgateregisterfile" style="font-size:12px;">
|
||||||
<div id="contents" > </div>
|
<thead>
|
||||||
<table class="table table-bordered" id="Inwardgateregisterfile" style="font-size:12px;">
|
<tr>
|
||||||
<thead>
|
<th>SNo</th>
|
||||||
<tr>
|
<th>BillNO</th>
|
||||||
<th>SNo</th>
|
<th>PONO</th>
|
||||||
<th>BillNO</th>
|
<th>FileName</th>
|
||||||
<th>PONO</th>
|
<th>Action</th>
|
||||||
<th>FileName</th>
|
</tr>
|
||||||
<th>Action</th>
|
</thead>
|
||||||
|
<tbody id="tblefile"></tbody>
|
||||||
|
</table>
|
||||||
</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="hidecounter" id="hidecounter" value="0" />
|
||||||
<!-- <input type="hidden" name="hideconstant" id="hideconstant" value="0" /> -->
|
<!-- <input type="hidden" name="hideconstant" id="hideconstant" value="0" /> -->
|
||||||
<input type ="hidden" name ="hiddenIGRNO" id="hiddenIGRNO"/>
|
<input type ="hidden" name ="hiddenIGRNO" id="hiddenIGRNO"/>
|
||||||
<input type ="hidden" name ="hiddenPONO" id="hiddenPONO" />
|
<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..">
|
||||||
|
|
||||||
|
<!-- <a class="btn btn-success" data-dismiss="modal" id='editfileadd' value="">ADD</a> -->
|
||||||
</div>
|
<a class="btn btn-success" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||||
<div class="modal-footer">
|
</div>
|
||||||
|
<br/>
|
||||||
<!-- <a class="btn btn-success" data-dismiss="modal" id='editfileadd' value="">ADD</a> -->
|
</div>
|
||||||
<br>
|
|
||||||
</br>
|
|
||||||
<a class="btn btn-success" data-dismiss="modal" value="Cancel">Cancel</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -450,11 +412,12 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
$("#Fileshow").on("shown.bs.modal",function(e) {
|
$("#Fileshow").on("shown.bs.modal",function(e) {
|
||||||
//var id = $(this).attr('id');
|
var id = $(this).attr('id');
|
||||||
|
|
||||||
var igr = $(e.relatedTarget).data('igrno');
|
var igr = $(e.relatedTarget).data('igrno');
|
||||||
var po = $(e.relatedTarget).data('pono');
|
var po = $(e.relatedTarget).data('pono');
|
||||||
|
$('#igrfileform')[0].reset();
|
||||||
|
$('#title').text(" ("+igr+") ");
|
||||||
$("#hiddenIGRNO").val(igr);
|
$("#hiddenIGRNO").val(igr);
|
||||||
$("#hiddenPONO").val(po);
|
$("#hiddenPONO").val(po);
|
||||||
|
|
||||||
@ -477,50 +440,48 @@ $("#hiddenPONO").val(po);
|
|||||||
var FilePath ='';
|
var FilePath ='';
|
||||||
var Filename = '';
|
var Filename = '';
|
||||||
var PONO ='';
|
var PONO ='';
|
||||||
var BillNO ='';
|
var BillNO ='';
|
||||||
$.each(JSON.parse(file), function (i, item)
|
$.each(JSON.parse(file), function (i, item)
|
||||||
{
|
{
|
||||||
if(item.file == null)
|
if(item.file == null)
|
||||||
{ if(item.Remarks ==null)
|
{ if(item.Remarks ==null)
|
||||||
{
|
{
|
||||||
|
console.log("<?php echo base_url()?>public/uploads/Igrfiles/"+item.FilePath);
|
||||||
//alert()
|
//alert()
|
||||||
PONO =item.PONO;
|
PONO =item.PONO;
|
||||||
BillNO =item.BillNo;
|
BillNO =item.BillNo;
|
||||||
Filename =item.FilePath;
|
Filename =item.FilePath;
|
||||||
FilePath = "<?php echo base_url()?>public/uploads/Igrfiles/"+item.FilePath;
|
FilePath = "<?php echo base_url()?>public/uploads/Igrfiles/"+item.FilePath;
|
||||||
}else{
|
}else{
|
||||||
Filename ="BillDetails";
|
Filename ="BillDetails";
|
||||||
PONO =item.PONO;
|
PONO =item.PONO;
|
||||||
BillNO =item.BillNo;
|
BillNO =item.BillNo;
|
||||||
FilePath = item.FilePath;
|
FilePath = item.FilePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
Filename = item.file;
|
Filename = item.file;
|
||||||
PONO =item.pono;
|
PONO =item.pono;
|
||||||
BillNO = '-';
|
BillNO = '-';
|
||||||
|
|
||||||
FilePath =item.file;
|
FilePath =item.file;
|
||||||
}
|
}
|
||||||
if(Filename != null)
|
if(Filename != null)
|
||||||
{
|
{
|
||||||
i=i+1;
|
i=i+1;
|
||||||
trHTML += '<tr id='+i+'>' +
|
trHTML += '<tr id='+i+'>' +
|
||||||
'<td align="right">' + i + '</td>' +
|
'<td align="right">' + i + '</td>' +
|
||||||
'<td id="billno'+i+'">' + BillNO+ '</td>' +
|
'<td id="billno'+i+'">' + BillNO+ '</td>' +
|
||||||
'<td>' + PONO+ '</td>' +
|
'<td>' + PONO+ '</td>' +
|
||||||
|
'<td id="file'+i+'"><a target="_blank" href = '+FilePath+'>'+ Filename +'</a></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>';
|
||||||
'<td name="filepathname" id="filepathname" onclick="openbillmodel('+i+');"><i class="fa fa-pencil"></i></td>' +
|
}
|
||||||
'</tr>';
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
});
|
||||||
$("#tblefile").empty();
|
$("#tblefile").empty();
|
||||||
|
if(trHTML == ''){
|
||||||
$("#tblefile").append(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