Subversion Repositories SmartDukaan

Rev

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

Rev 35569 Rev 35592
Line 108... Line 108...
108
			loadMyTicket("main-content", ticketStatus, ticketorderBy,
108
			loadMyTicket("main-content", ticketStatus, ticketorderBy,
109
				searchType, searchContent, null);
109
				searchType, searchContent, null);
110
 
110
 
111
		});
111
		});
112
 
112
 
113
	$(document).on('click', "#ticket-last-activity", function() {
113
	$(document).on('click', ".ticket-last-activity", function() {
114
		var ticketId = $(this).data('ticketid');
114
		var ticketId = $(this).data('ticketid');
115
		var activity = $(this).data('activity');
115
		var activity = $(this).data('activity');
116
		console.log(ticketId);
116
		console.log(ticketId);
117
		console.log(activity);
117
		console.log(activity);
118
		if (confirm("Are you sure!") == true) {
118
		if (confirm("Are you sure!") == true) {
Line 235... Line 235...
235
			if (confirm("Are you sure you want to change ticket!") == true) {
235
			if (confirm("Are you sure you want to change ticket!") == true) {
236
				changeMyPartnerTicket(ticketId, subCategory, authUserId,
236
				changeMyPartnerTicket(ticketId, subCategory, authUserId,
237
					categoryId, escalationType);
237
					categoryId, escalationType);
238
			}
238
			}
239
		});
239
		});
240
	$(document).on('click', "#edit-ticket", function() {
240
	$(document).on('click', ".edit-ticket", function() {
241
		var ticketId = $(this).data('ticketid1');
241
		var ticketId = $(this).data('ticketid1');
242
		loadEditTicket(ticketId);
242
		loadEditTicket(ticketId);
243
	});
243
	});
244
 
244
 
245
	$(document).on('click', "#edit-ticket-partner", function () {
245
	$(document).on('click', ".edit-ticket-partner", function () {
246
		var ticketId = $(this).data('ticketid1');
246
		var ticketId = $(this).data('ticketid1');
247
		loadMyPartnerEditTicket(ticketId);
247
		loadMyPartnerEditTicket(ticketId);
248
	});
248
	});
249
 
249
 
250
	$(document).on('click', ".manager-ticket", function() {
250
	$(document).on('click', ".manager-ticket", function() {
Line 255... Line 255...
255
	});
255
	});
256
	$(document).on('click', ".ticketType", function() {
256
	$(document).on('click', ".ticketType", function() {
257
		console.log("create Region");
257
		console.log("create Region");
258
		loadCreateRegion("main-content");
258
		loadCreateRegion("main-content");
259
	});
259
	});
260
	$(document).on('click', "#activities", function() {
260
	$(document).on('click', ".activities-link", function() {
261
		var ticketId = $(this).data('ticketid');
261
		var ticketId = $(this).data('ticketid');
262
		var assignee = $(this).data('assignee');
262
		var assignee = $(this).data('assignee');
263
		var internal = $(this).data('internal');
263
		var internal = $(this).data('internal');
264
		var roleType = $(this).data('role');
264
		var roleType = $(this).data('role');
265
		var isCrmUser = $(this).data('crm');
265
		var isCrmUser = $(this).data('crm');
Line 529... Line 529...
529
	});
529
	});
530
	$(document).on('click', ".create-ticket-button",
530
	$(document).on('click', ".create-ticket-button",
531
		function() {
531
		function() {
532
			var categoryId = $('#category').val();
532
			var categoryId = $('#category').val();
533
			var subCategoryId = $('#subCategory').val();
533
			var subCategoryId = $('#subCategory').val();
-
 
534
			var message = $('#message').val();
-
 
535
 
534
			if (categoryId == "" || categoryId == null
536
			if (categoryId == "" || categoryId == null || categoryId == undefined) {
535
				|| categoryId == undefined) {
537
				alert("Please select a category");
-
 
538
				return false;
-
 
539
			}
-
 
540
			if (subCategoryId == "" || subCategoryId == null || subCategoryId == undefined) {
536
				alert("select appropriate category");
541
				alert("Please select a subcategory");
537
				return false;
542
				return false;
538
			}
543
			}
539
			if (subCategoryId == "" || subCategoryId == null
544
			if (message == "" || message == null || message == undefined || message.trim() == "") {
540
				|| subCategoryId == undefined) {
545
				alert("Please describe your issue");
541
				alert("select appropriate subCategoryId");
546
				$('#message').focus();
542
				return false;
547
				return false;
543
			}
548
			}
544
			var dialog = bootbox
-
 
545
				.dialog({
-
 
546
					title: "Are you sure want to change create ticket!",
-
 
547
					message: "<div class=form-inline'>"
-
 
548
						+ "<label for='message'>Message:</label>"
-
 
549
						+ "<textarea class='form-control' rows='2' id='message'></textarea>"
-
 
550
						+ "</div>",
-
 
551
					buttons: {
-
 
552
						cancel: {
-
 
553
							label: "cancel",
-
 
554
							className: 'btn-danger',
-
 
555
							callback: function() {
-
 
556
								loadCreateTicket("main-content");
-
 
557
							}
-
 
558
						},
-
 
559
						ok: {
-
 
560
							label: "ok",
-
 
561
							className: 'btn-info',
-
 
562
							callback: function() {
-
 
563
								message = $('#message').val();
-
 
564
								console.log(message);
-
 
565
								if (message == ""
-
 
566
									|| message == null
-
 
567
									|| message == undefined) {
-
 
568
									alert("message field can't be empty");
-
 
569
									return false;
-
 
570
								}
-
 
571
								var params = {
-
 
572
									"categoryId": categoryId,
-
 
573
									"subCategoryId": subCategoryId,
-
 
574
									"message": message
-
 
575
								}
-
 
576
								doPostAjaxRequestWithParamsHandler(
-
 
577
									context
-
 
578
									+ "/cs/createTicket",
-
 
579
									params,
-
 
580
									function(response) {
-
 
581
										if (response == "true") {
-
 
582
											alert("successfully created");
-
 
583
											loadCreateTicket("main-content");
-
 
584
										} else {
-
 
585
											alert("You have reached maximum number of tickets Resolved , pls click on Resolved for the resolved tickets to create new.");
-
 
586
										}
-
 
587
									});
-
 
588
 
549
 
-
 
550
			if (confirm("Are you sure you want to create this ticket?")) {
-
 
551
				var params = {
-
 
552
					"categoryId": categoryId,
-
 
553
					"subCategoryId": subCategoryId,
-
 
554
					"message": message
589
							}
555
				};
-
 
556
				doPostAjaxRequestWithParamsHandler(
-
 
557
					context + "/cs/createTicket",
-
 
558
					params,
-
 
559
					function(response) {
-
 
560
						if (response == "true") {
-
 
561
							alert("Ticket created successfully");
-
 
562
							loadCreateTicket("main-content");
-
 
563
						} else {
-
 
564
							alert("You have reached maximum number of unresolved tickets. Please accept resolution for resolved tickets to create new ones.");
590
						}
565
						}
591
					}
566
					});
592
				});
567
			}
593
 
-
 
594
		});
568
		});
595
	$(document).on('click', ".create-position", function() {
569
	$(document).on('click', ".create-position", function() {
596
		loadCreatePosition("main-content");
570
		loadCreatePosition("main-content");
597
	});
571
	});
598
 
572