Subversion Repositories SmartDukaan

Rev

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

Rev 27754 Rev 27755
Line 3... Line 3...
3
		currentFofoId = 0;
3
		currentFofoId = 0;
4
		counterSize = '';
4
		counterSize = '';
5
		loadIndent('main-content');
5
		loadIndent('main-content');
6
	});
6
	});
7
	
7
	
8
	$(".partners_allocation")
8
	$(document).on('click', ".partners_allocation",
9
	.live(
-
 
10
			'click',
-
 
11
			function() {
9
			function() {
12
				
10
				
13
				doGetAjaxRequestHandler(context + "/getPartnerAllocation", function(response) {
11
				doGetAjaxRequestHandler(context + "/getPartnerAllocation", function(response) {
14
					$('#' + 'main-content').html(response);
12
					$('#' + 'main-content').html(response);
15
 
13
 
16
				});
14
				});
17
					
15
					
18
			});
16
			});
19
	
17
	
20
	$(".partnerAllocation")
18
	$(document).on('click', ".partnerAllocation",
21
	.live(
-
 
22
			'click',
-
 
23
			function() {
19
			function() {
24
				
20
				
25
				var fofoId = $('#fofo-users').val()
21
				var fofoId = $('#fofo-users').val()
26
				console.log(fofoId)
22
				console.log(fofoId)
27
				var url = "/indent/loadIndent?fofoId=" + fofoId + "&counterSize="
23
				var url = "/indent/loadIndent?fofoId=" + fofoId + "&counterSize="
Line 32... Line 28...
32
			           $('.partner-indent-container').html(response);
28
			           $('.partner-indent-container').html(response);
33
		               });
29
		               });
34
			});
30
			});
35
	
31
	
36
	
32
	
37
	$("button.mk_pause_button")
33
	$(document).on('click', "button.mk_pause_button",
38
			.live(
-
 
39
					'click',
-
 
40
					function() {
34
					function() {
41
						var clickedButton = $(this);
35
						var clickedButton = $(this);
42
 
36
 
43
						var description = clickedButton.data("description");
37
						var description = clickedButton.data("description");
44
						var catalogId = clickedButton.data("id");
38
						var catalogId = clickedButton.data("id");
Line 189... Line 183...
189
	
183
	
190
 
184
 
191
 
185
 
192
	
186
	
193
	 /*
187
	 /*
194
		 * $("button.mk_submit_indent") .live( 'click', function() {
188
		 * $(document).on('click', "button.mk_submit_indent", function() {
195
		 * confirmString =[]; confirmString .push('<table class="table
189
		 * confirmString =[]; confirmString .push('<table class="table
196
		 * table-striped table-condensed table-bordered"
190
		 * table-striped table-condensed table-bordered"
197
		 * id="entire-catalog-table">'); confirmString.push('<tr>');
191
		 * id="entire-catalog-table">'); confirmString.push('<tr>');
198
		 * confirmString .push('<th style="width:100px">Catalog Id</th>');
192
		 * confirmString .push('<th style="width:100px">Catalog Id</th>');
199
		 * confirmString .push('<th style="width:250px">Description</th>');
193
		 * confirmString .push('<th style="width:250px">Description</th>');
Line 233... Line 227...
233
		 * $('#indent-container').hide(); $('button.mk_submit_indent').hide();
227
		 * $('#indent-container').hide(); $('button.mk_submit_indent').hide();
234
		 * $('button.bk_toedit_indent').show();
228
		 * $('button.bk_toedit_indent').show();
235
		 * $('button.confirm_indent').show();
229
		 * $('button.confirm_indent').show();
236
		 */
230
		 */
237
		  /*
231
		  /*
238
			 * $("button.confirm_indent").live( 'click', function() { var
232
			 * $(document).on('click', "button.confirm_indent", function() { var
239
			 * itemQtyList = []; for (catalogId in indentMap) { diff =
233
			 * itemQtyList = []; for (catalogId in indentMap) { diff =
240
			 * indentMap[catalogId]["quantity"] -
234
			 * indentMap[catalogId]["quantity"] -
241
			 * indentMap[catalogId]["initialQuantity"]; if (diff != 0) {
235
			 * indentMap[catalogId]["initialQuantity"]; if (diff != 0) {
242
			 * itemQtyList.push({ "quantity" : indentMap[catalogId]["quantity"],
236
			 * itemQtyList.push({ "quantity" : indentMap[catalogId]["quantity"],
243
			 * "catalogId" : indentMap[catalogId]["catalogId"] }); } }
237
			 * "catalogId" : indentMap[catalogId]["catalogId"] }); } }
Line 246... Line 240...
246
			 * counterSize, JSON .stringify(itemQtyList), function(data) {
240
			 * counterSize, JSON .stringify(itemQtyList), function(data) {
247
			 * alert('Indent has been created Successfully!'); indentMap = {};
241
			 * alert('Indent has been created Successfully!'); indentMap = {};
248
			 * loadIndent('main-content'); }); });
242
			 * loadIndent('main-content'); }); });
249
			 */
243
			 */
250
	
244
	
251
	$(".confirm_indent").live(
245
	$(document).on('click', ".confirm_indent",
252
			'click',
-
 
253
			function() {
246
			function() {
254
			  if(confirm("Are you sure to confirm the indent")== true){
247
			  if(confirm("Are you sure to confirm the indent")== true){
255
			 doPostAjaxRequestHandler(context + "/open-indent/confirm?fofoId=" + currentFofoId  ,
248
			 doPostAjaxRequestHandler(context + "/open-indent/confirm?fofoId=" + currentFofoId  ,
256
			  function(response) { 
249
			  function(response) { 
257
				  
250