| 36394 |
amit |
1 |
$(function () {
|
|
|
2 |
$(document).on('click', '.toggle-price-drop-detail', function () {
|
|
|
3 |
$(this).closest('.price-block').find('.price-drop-detail').toggle();
|
|
|
4 |
});
|
|
|
5 |
|
|
|
6 |
$(document).on('click', '.view-imei-net-margin', function () {
|
|
|
7 |
var $btn = $(this);
|
|
|
8 |
var $row = $btn.closest('tr');
|
|
|
9 |
var imei = $row.find('input.serialNumber').val();
|
|
|
10 |
imei = (imei || '').trim();
|
|
|
11 |
|
|
|
12 |
if (!imei) {
|
|
|
13 |
bootbox.alert('Enter an IMEI first.');
|
|
|
14 |
return;
|
|
|
15 |
}
|
|
|
16 |
|
|
|
17 |
var fofoId = $btn.data('fofoid');
|
|
|
18 |
if (!fofoId) {
|
|
|
19 |
fofoId = $('#currentFofoId').val();
|
|
|
20 |
}
|
|
|
21 |
|
|
|
22 |
var loader = '<div class="modal-header"><h4 class="modal-title">IMEI Scheme Margin</h4></div>'
|
|
|
23 |
+ '<div class="modal-body"><div style="text-align:center;padding:20px;">'
|
|
|
24 |
+ '<i class="fa fa-spinner fa-spin fa-2x"></i></div></div>';
|
|
|
25 |
$('#imeiNetMarginModal .modal-content').html(loader);
|
|
|
26 |
$('#imeiNetMarginModal').modal('show');
|
|
|
27 |
|
|
|
28 |
var url = context + '/getImeiNetMarginModal?searchImei=' + encodeURIComponent(imei)
|
|
|
29 |
+ '&fofoId=' + encodeURIComponent(fofoId);
|
|
|
30 |
doGetAjaxRequestHandler(url, function (response) {
|
|
|
31 |
$('#imeiNetMarginModal .modal-content').html(response);
|
|
|
32 |
});
|
|
|
33 |
});
|
|
|
34 |
});
|