Subversion Repositories SmartDukaan

Rev

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

Rev 33865 Rev 33894
Line 73... Line 73...
73
    });
73
    });
74
 
74
 
75
 
75
 
76
    $(document).on('click', ".reset-hard-limit", function () {
76
    $(document).on('click', ".reset-hard-limit", function () {
77
        var id = $(this).data('id');
77
        var id = $(this).data('id');
-
 
78
        const self = this;
78
        if (confirm("Are you sure you want to reset hard limit")) {
79
        if (confirm("Are you sure you want to reset hard limit")) {
-
 
80
            var hardLimitInput = $(this).closest('td').find('input[name="hardLimit"]');
79
            doPutAjaxRequestHandler(`${context}/resetHardLimit?id=${id}`, function (response) {
81
            doPutAjaxRequestHandler(`${context}/resetHardLimit?id=${id}`, function (response) {
80
                if (response) {
82
                if (response) {
81
                    alert("Hard Limit reset.");
83
                    alert("Hard Limit reset.");
82
                    var hardLimitInput = $('input[name="hardLimit"]');
-
 
83
                    hardLimitInput.prop('disabled', false);
-
 
84
                    hardLimitInput.val('false');
84
                    hardLimitInput.val('false');
85
                    hardLimitInput.prop('disabled', true);
85
                    $(self).closest('td').find('.reset-hard-limit').hide();
-
 
86
 
86
                }
87
                }
87
            });
88
            });
88
        }
89
        }
89
    });
90
    });
90
 
91