Subversion Repositories SmartDukaan

Rev

Rev 7410 | Rev 11353 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4687 mandeep.dh 1
$(function() {
5361 mandeep.dh 2
    $('select.item').live('change', function() {
5369 mandeep.dh 3
        var tr = $(this).parent().parent();
5496 mandeep.dh 4
        var option = $(this).find('option:selected');
5369 mandeep.dh 5
 
5496 mandeep.dh 6
        $(tr).find('.serialNumber').removeClass('required').addClass(option.attr('hasSerialNumber'));
7
        $(tr).find('.itemNumber').removeClass('required').addClass(option.attr('hasItemNumber'));
8
 
9
        if (option.attr('hasSerialNumber') == 'required' || option.val() == -1) {
5369 mandeep.dh 10
            $(tr).find('.quantity').attr('readonly', true);
5496 mandeep.dh 11
            $(tr).find('.quantity').val(1.0);
5361 mandeep.dh 12
        }
13
        else {
5496 mandeep.dh 14
            $(tr).find('.quantity').removeAttr('readonly');
5361 mandeep.dh 15
        }
5110 mandeep.dh 16
 
5361 mandeep.dh 17
        return true;
18
    });
7410 amar.kumar 19
 
11350 manish.sha 20
    $('#instructionsLink').live('click', function() {
21
    	$('div#instrctionsDiv').show();
22
    	$.colorbox({
23
            inline : true,
24
            width : "500px",
25
            height : "350px",
26
            href : "div#instrctionsDiv",
27
            onClosed : function() {
28
                $("div#instrctionsDiv").hide();
29
            }
30
		});
31
    });
32
 
7410 amar.kumar 33
    /*$('#transfer-items-button').live('click', function(){
34
    	var transferWarehouseId = $('input[name="transferWarehouseId"]').val();
35
    	$.ajax({
36
    		type : "GET",
37
            url : "/inventory/purchase!setTransferItemsOption",
38
            data : "transferWarehouseId="+transferWarehouseId,
39
            success : function(response) {
40
                $('div#item-transfer-warehouse-selector').html("Items will be transferred to Warehouse ");
41
                $('form#scanItem').append($('<input type = "hidden" name="transferWarehouseId" value="12">'));
42
            }
43
    	});
44
    });*/
5110 mandeep.dh 45
});