Subversion Repositories SmartDukaan

Rev

Rev 23629 | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed

var walletHistory = walletHistory || {};
walletHistory.startTime="";
walletHistory.endTime="";

$(function() {
        $(document).on('click', ".wallet_icon_header", function() {
                loadWallet("main-content", "", "");
        });
        
        $(document).on('click', "#wallet-history-paginated .next", function() {
                var params = {};
                params['startTime'] = walletHistory.startTime;
                params['endTime'] = walletHistory.endTime;
                loadPaginatedNextItems('/getPaginatedWalletHistory', params, 'wallet-history-paginated', 'wallet-history-table', null);
                $(this).blur();
    });
        
        $(document).on('click', "#wallet-history-paginated .previous", function() {
                var params = {};
                params['startTime'] = walletHistory.startTime;
                params['endTime'] = walletHistory.endTime;
                loadPaginatedPreviousItems('/getPaginatedWalletHistory', params, 'wallet-history-paginated', 'wallet-history-table', null);
                $(this).blur();
    });
});

function loadWallet(domId, startTime, endTime){
        doGetAjaxRequestHandler(context+"/walletDetails?startTime="+startTime
                +"&endTime="+endTime, function(response){
                $('#' + domId).html(response);
        });
}