Subversion Repositories SmartDukaan

Rev

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

Rev 26846 Rev 27251
Line 22... Line 22...
22
			"click",
22
			"click",
23
			function() {
23
			function() {
24
				var catalogId = parseInt($(this).data("catalog-id"));
24
				var catalogId = parseInt($(this).data("catalog-id"));
25
				doGetAjaxRequestHandler(context + "/selectItemColor?catalogId="
25
				doGetAjaxRequestHandler(context + "/selectItemColor?catalogId="
26
						+ catalogId, function(response) {
26
						+ catalogId, function(response) {
-
 
27
 
27
					$('.select-item-container .modal-content').html(response);
28
					$('.select-item-container .modal-content').html(response);
-
 
29
					$('#select-item-table').find('tr').each(function() {
-
 
30
						var selectRow = $(this);
-
 
31
						var selectCurrentRow = $(this).closest("tr");
-
 
32
						var itemId = selectCurrentRow.find("td:eq(1)").html();
-
 
33
						console.log(itemId)
-
 
34
						if (itemId != undefined) {
-
 
35
							$('#po-table').find('tr').each(function() {
-
 
36
								var row = $(this);
-
 
37
								var currentRow = $(this).closest("tr");
-
 
38
								var item = currentRow.find("td:eq(0)").html();
-
 
39
								if (item != undefined) {
-
 
40
									console.log(item)
-
 
41
									if (item == itemId) {
-
 
42
										selectCurrentRow.remove();
-
 
43
									}
-
 
44
 
-
 
45
								}
-
 
46
 
-
 
47
							});
-
 
48
						}
28
 
49
 
-
 
50
					});
29
				});
51
				});
30
 
52
 
31
			});
53
			});
32
	$(".btnDelete").live('click', function() {
54
	$(".btnDelete").live('click', function() {
33
		console.log("Hello");
55
		console.log("Hello");