Subversion Repositories SmartDukaan

Rev

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

Rev 26031 Rev 26039
Line 9... Line 9...
9
 
9
 
10
	$(".review_order").live('click', function() {
10
	$(".review_order").live('click', function() {
11
		loadOrder("main-content");
11
		loadOrder("main-content");
12
	});
12
	});
13
 
13
 
-
 
14
	$(".notify_cancel").live('click', function() {
-
 
15
		loadNotifyCancelOrder("main-content");
-
 
16
	});
-
 
17
 
14
	$(".keep-a-tab").live('click', function() {
18
	$(".keep-a-tab").live('click', function() {
15
		loadtabOrder("main-content");
19
		loadtabOrder("main-content");
16
	});
20
	});
17
 
21
 
18
	$(".notify_order").live('click', function() {
22
	$(".notify_order").live('click', function() {
Line 429... Line 433...
429
 
433
 
430
							doPostAjaxRequestWithJsonHandler(context
434
							doPostAjaxRequestWithJsonHandler(context
431
									+ "/notifyOrder", JSON
435
									+ "/notifyOrder", JSON
432
									.stringify(jsonObject), function(response) {
436
									.stringify(jsonObject), function(response) {
433
								if (response == 'true') {
437
								if (response == 'true') {
434
									alert("successfully Add");
438
									alert("successfully notify");
435
									$('#notifyOrder').modal('hide');
439
									$('#notifyOrder').modal('hide');
436
									$('.modal-backdrop').remove();
440
									$('.modal-backdrop').remove();
437
									loadOrder("main-content");
441
									loadOrder("main-content");
438
								}
442
								}
439
							});
443
							});
440
						}
444
						}
441
 
445
 
442
					});
446
					});
443
 
447
 
-
 
448
	$(".change-notify-request")
-
 
449
			.live(
-
 
450
					"click",
-
 
451
					function(e) {
-
 
452
 
-
 
453
						var jsonObject = {};
-
 
454
						var orderIdsJSon = [];
-
 
455
						var orderIds;
-
 
456
 
-
 
457
						$('#notify-cancel-order-list-table').find('tr').each(
-
 
458
								function() {
-
 
459
									var row = $(this);
-
 
460
 
-
 
461
									console.log(row);
-
 
462
									if (row.find(
-
 
463
											'input[name="cancelOrderCheck"]')
-
 
464
											.is(':checked')) {
-
 
465
										var currentRow = $(this).closest("tr");
-
 
466
										var col5 = currentRow.find("td:eq(1)")
-
 
467
												.html();
-
 
468
										var col6 = currentRow.find("td:eq(2)")
-
 
469
												.html();
-
 
470
 
-
 
471
										orderIds = {
-
 
472
											"orderId" : col6,
-
 
473
											"olditemId" : col5
-
 
474
										}
-
 
475
										orderIdsJSon.push(orderIds)
-
 
476
									}
-
 
477
								});
-
 
478
						console.log(orderIdsJSon)
-
 
479
						jsonObject['orderIds'] = orderIdsJSon;
-
 
480
						console.log(jsonObject)
-
 
481
						if (confirm("Are you sure you want to update notify order") == true) {
-
 
482
 
-
 
483
							doPostAjaxRequestWithJsonHandler(context
-
 
484
									+ "/changeNotifyCancelRequest", JSON
-
 
485
									.stringify(jsonObject), function(response) {
-
 
486
								if (response == 'true') {
-
 
487
									alert("successfully Update");
-
 
488
									$('#notifyCancelOrderList').modal('hide');
-
 
489
									$('.modal-backdrop').remove();
-
 
490
									loadNotifyCancelOrder("main-content");
-
 
491
								}
-
 
492
							});
-
 
493
						}
-
 
494
					});
-
 
495
 
444
});
496
});
445
 
497
 
446
function getItemColor(catalogId, itemId) {
498
function getItemColor(catalogId, itemId) {
447
	console.log(catalogId);
499
	console.log(catalogId);
448
 
500
 
Line 614... Line 666...
614
			}
666
			}
615
		});
667
		});
616
	}
668
	}
617
 
669
 
618
}
670
}
-
 
671
 
-
 
672
function loadNotifyCancelOrder(domId) {
-
 
673
	doGetAjaxRequestHandler(context + "/getNotifiedCancelOrder", function(
-
 
674
			response) {
-
 
675
		$('#' + domId).html(response);
-
 
676
	});
-
 
677
}
-
 
678
 
-
 
679
function getNotifyCancelItems(itemId, OrderId) {
-
 
680
	doGetAjaxRequestHandler(context + "/getNotifyItems?itemId=" + itemId,
-
 
681
			function(response) {
-
 
682
				$('.notify-cancel-order-Items-container .modal-content').html(
-
 
683
						response);
-
 
684
 
-
 
685
			});
-
 
686
}