Subversion Repositories SmartDukaan

Rev

Rev 33788 | Rev 33927 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 33788 Rev 33790
Line 63... Line 63...
63
 
63
 
64
$(document).ajaxSend(function (ev, req) {
64
$(document).ajaxSend(function (ev, req) {
65
    req.setRequestHeader('IdempotencyKey', IdempotencyKey);
65
    req.setRequestHeader('IdempotencyKey', IdempotencyKey);
66
});
66
});
67
 
67
 
-
 
68
$(document).ajaxSuccess(function () {
-
 
69
    IdempotencyKey = uuidv4();
-
 
70
    console.log('succcess handlor');
-
 
71
});
-
 
72
 
68
$(document).ajaxComplete(function () {
73
$(document).ajaxComplete(function () {
69
    if (typeof loaderDialogObj != "undefined") {
74
    if (typeof loaderDialogObj != "undefined") {
70
        loaderDialogObj.modal('hide');
75
        loaderDialogObj.modal('hide');
71
        // $('div.modal-backdrop.fade').remove();
76
        // $('div.modal-backdrop.fade').remove();
72
    }
77
    }
Line 89... Line 94...
89
        cache: false,
94
        cache: false,
90
        data: params,
95
        data: params,
91
        // dataType:'json',
96
        // dataType:'json',
92
        type: httpType,
97
        type: httpType,
93
        success: function (response) {
98
        success: function (response) {
-
 
99
            IdempotencyKey = uuidv4();
94
            callback_function(response);
100
            callback_function(response);
95
            formatCurrency();
101
            formatCurrency();
96
        }
102
        }
97
    });
103
    });
98
}
104
}
Line 145... Line 151...
145
function doPutAjaxRequestWithJsonHandler(urlString, json, callback_function) {
151
function doPutAjaxRequestWithJsonHandler(urlString, json, callback_function) {
146
    doAjaxRequestWithJsonHandler(urlString, "PUT", json, callback_function);
152
    doAjaxRequestWithJsonHandler(urlString, "PUT", json, callback_function);
147
}
153
}
148
 
154
 
149
function doAjaxRequestHandler(urlString, httpType, callback_function) {
155
function doAjaxRequestHandler(urlString, httpType, callback_function) {
150
    console.log("Current IdempotencyKey:", IdempotencyKey);
-
 
151
    $.ajax({
156
    $.ajax({
152
        url: urlString,
157
        url: urlString,
153
        async: true,
158
        async: true,
154
        cache: false,
159
        cache: false,
155
        type: httpType,
160
        type: httpType,