| Current Path : /var/www/homesaver/www/bitrix/js/fermaofd.ferma/ |
| Current File : /var/www/homesaver/www/bitrix/js/fermaofd.ferma/ofdferma_receipts.js |
BX.ready(function () {
window.ofdferma = new ofdfermaClass();
});
ofdfermaClass.prototype.openReceiptStatusPanel = function (receiptId) {
BX.showWait();
BX.SidePanel.Instance.open('/bitrix/admin/ofdferma_receipt_status.php?lang=' + phpVars.LANGUAGE_ID + '&receiptId=' + receiptId, {
width: 500,
cacheable: false,
allowChangeHistory: false
});
};
ofdfermaClass.prototype.openOrderReceiptPanel = function (orderId) {
BX.showWait();
BX.SidePanel.Instance.open('/bitrix/admin/ofdferma_receipt_order.php?lang=' + phpVars.LANGUAGE_ID + '&orderId=' + orderId, {
width: 500,
cacheable: false,
allowChangeHistory: false
});
};
ofdfermaClass.prototype.openOrderRefundPanel = function (orderId) {
BX.showWait();
BX.SidePanel.Instance.open('/bitrix/admin/ofdferma_receipt_refund_order.php?lang=' + phpVars.LANGUAGE_ID + '&orderId=' + orderId, {
width: 500,
cacheable: false,
allowChangeHistory: false
});
};
ofdfermaClass.prototype.openReceiptRefundPanel = function (receiptId) {
BX.showWait();
BX.SidePanel.Instance.open('/bitrix/admin/ofdferma_receipt_refund.php?lang=' + phpVars.LANGUAGE_ID + '&receiptId=' + receiptId, {
width: 500,
cacheable: false,
allowChangeHistory: false
});
};
ofdfermaClass.prototype.checkReceiptStatus = function (receiptId, onsuccess, onfailure) {
BX.ajax({
method: 'POST',
url: '/bitrix/admin/ofdferma_receipt_status.php',
data: {
receiptId: receiptId,
lang: phpVars.LANGUAGE_ID
},
dataType: 'json',
timeout: 10,
cache: false,
onsuccess: onsuccess,
onfailure: onfailure
});
};
function ofdfermaClass() {
}
function mergeObjects() {
var resObj = {};
for (var i = 0; i < arguments.length; i += 1) {
var obj = arguments[i];
var keys = Object.keys(obj);
for (var j = 0; j < keys.length; j += 1) {
resObj[keys[j]] = obj[keys[j]];
}
}
return resObj;
}