Subversion Repositories SmartDukaan

Rev

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

Rev 27642 Rev 27754
Line 1... Line 1...
1
$(function() {
1
$(function() {
2
	$(".lead").live('click', function() {
2
	$(document).on('click', ".lead", function() {
3
		loadLead("main-content");
3
		loadLead("main-content");
4
	});
4
	});
5
 
5
 
6
	$(".lead-close").live('click', function() {
6
	$(document).on('click', ".lead-close", function() {
7
		loadClosedLead("main-content");
7
		loadClosedLead("main-content");
8
	});
8
	});
9
 
9
 
10
	$("#lead-close-paginated .next").live(
10
	$("#lead-close-paginated .next").live(
11
		'click',
11
		'click',
Line 55... Line 55...
55
					'lead-close-container');
55
					'lead-close-container');
56
			}
56
			}
57
			$(this).blur();
57
			$(this).blur();
58
		});
58
		});
59
 
59
 
60
	$("#close-lead-search-button").live('click', function() {
60
	$(document).on('click', "#close-lead-search-button", function() {
61
		var searchText = $("#authUser").val();
61
		var searchText = $("#authUser").val();
62
		if (typeof (searchText) == "undefined" || !searchText) {
62
		if (typeof (searchText) == "undefined" || !searchText) {
63
			searchText = "";
63
			searchText = "";
64
		}
64
		}
65
		loadLeadSearchInfo(searchText);
65
		loadLeadSearchInfo(searchText);
66
	});
66
	});
67
 
67
 
68
	$("#authUser").live("keyup", function(e) {
68
	$(document).on("keyup", "#authUser", function(e) {
69
		var keyCode = e.keyCode || e.which;
69
		var keyCode = e.keyCode || e.which;
70
		if (keyCode == 13) {
70
		if (keyCode == 13) {
71
			$("#close-lead-search-button").click();
71
			$("#close-lead-search-button").click();
72
		}
72
		}
73
	});
73
	});
Line 82... Line 82...
82
					$('#fetchLeadActivityData .modal-content').html(response);
82
					$('#fetchLeadActivityData .modal-content').html(response);
83
 
83
 
84
				});
84
				});
85
		});
85
		});
86
 
86
 
87
	$(".newLead").live('click', function() {
87
	$(document).on('click', ".newLead", function() {
88
		$('#newEntryLeadModal').modal('show');
88
		$('#newEntryLeadModal').modal('show');
89
		$("#scheduleTime").hide();
89
		$("#scheduleTime").hide();
90
	});
90
	});
91
 
91
 
92
	$(".show-lead").live('click', function() {
92
	$(document).on('click', ".show-lead", function() {
93
		var status = $("#statusFilter").val();
93
		var status = $("#statusFilter").val();
94
		doGetAjaxRequestHandler(context + "/getOpenLead?leadStatus=" + status, function(response) {
94
		doGetAjaxRequestHandler(context + "/getOpenLead?leadStatus=" + status, function(response) {
95
			$('#' + 'main-content').html(response);
95
			$('#' + 'main-content').html(response);
96
		});
96
		});
97
	});
97
	});
98
 
98
 
99
 
99
 
100
	$(".show-colowise-lead").live('click', function() {
100
	$(document).on('click', ".show-colowise-lead", function() {
101
		var status = $("#statusFilter").val();
101
		var status = $("#statusFilter").val();
102
		var color = $("#colorFilter").val();
102
		var color = $("#colorFilter").val();
103
		doGetAjaxRequestHandler(context + "/getOpenLead?leadStatus=" + status + "&color="  + color, function(response) {
103
		doGetAjaxRequestHandler(context + "/getOpenLead?leadStatus=" + status + "&color="  + color, function(response) {
104
			$('#' + 'main-content').html(response);
104
			$('#' + 'main-content').html(response);
105
		});
105
		});
Line 198... Line 198...
198
 
198
 
199
				return false;
199
				return false;
200
			}
200
			}
201
		});
201
		});
202
	var leadId = null;
202
	var leadId = null;
203
	$(".editLead").live('click', function() {
203
	$(document).on('click', ".editLead", function() {
204
		$('#editLeadData').modal('show');
204
		$('#editLeadData').modal('show');
205
		$("#editScheduleTime").hide();
205
		$("#editScheduleTime").hide();
206
		leadId = $(this).data('leadid');
206
		leadId = $(this).data('leadid');
207
		console.log(leadId)
207
		console.log(leadId)
208
 
208