Subversion Repositories SmartDukaan

Rev

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

Rev 24229 Rev 24406
Line 5... Line 5...
5
		loadIndent('main-content');
5
		loadIndent('main-content');
6
	});
6
	});
7
	$("button.mk_pause_button").live('click', function(){
7
	$("button.mk_pause_button").live('click', function(){
8
		var clickedButton = $(this);
8
		var clickedButton = $(this);
9
		var description = clickedButton.data("description");
9
		var description = clickedButton.data("description");
10
		var tagId = clickedButton.data("id");
10
		var catalogId = clickedButton.data("id");
11
		if(confirm("Confirm Pause " + clickedButton.data("description") + "?")) {
11
		getColorsForItems(catalogId, description, function(itemIds){
-
 
12
			console.log(itemIds);
-
 
13
			if(itemIds!=null) {
12
			doPostAjaxRequestWithJsonHandler(context+"/indent/confirm-pause/" + tagId, {}, function(response) {
14
				bootbox.confirm("Confirm Update " + clickedButton.data("description") + "?", function(result){
13
				if(response) {
15
					if(result) {
14
					 indentTable
16
						coloredItems.forEach(function(item){
15
				        .row( clickedButton.closest('tr') )
17
							item.active = itemIds.indexOf(item.id) >= 0;
16
				        .remove()
18
						});
-
 
19
						doPostAjaxRequestWithJsonHandler(context+"/indent/confirm-pause/", JSON.stringify(coloredItems), function(response) {
17
				        .draw();
20
							if(response) {
18
					alert("Item Paused Successfully");
21
								bootbox.alert("Item/s  Updated Successfully");
19
				} else {
22
							} else {
20
					alert("Could not pause item");
23
								bootbox.alert("Could not pause item");
-
 
24
							}
-
 
25
						});
21
				}
26
					}
22
			});
27
				});
23
		}
28
			}
-
 
29
		});
24
	});
30
	});
25
	$("button.raise_po").live('click', function(){
31
	$("button.raise_po").live('click', function(){
26
		if (confirm("Please confirm the PO")) {
32
		if (confirm("Please confirm the PO")) {
27
			raisePO();
33
			raisePO();
28
		} else {
34
		} else {