Subversion Repositories SmartDukaan

Rev

Rev 5110 | Rev 5496 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

$(function() {
    $('select.item').live('change', function() {
        if ($(this).find('option:selected').attr('serialized') == 'SERIALIZED') {
            $(this).parent().parent().find('.itemNumber').attr('readonly', false);
            $(this).parent().parent().find('.serialNumber').attr('readonly', false);
            $(this).parent().parent().find('.quantity').attr('readonly', true);
            $(this).parent().parent().find('.quantity').val(1);
        }
        else {
            $(this).parent().parent().find('.itemNumber').attr('readonly', true);
            $(this).parent().parent().find('.serialNumber').attr('readonly', true);
            $(this).parent().parent().find('.quantity').attr('readonly', false);
        }

        return true;
    });
});