Subversion Repositories SmartDukaan

Rev

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

Rev 6307 Rev 6310
Line 305... Line 305...
305
	<script>
305
	<script>
306
    	jQuery('.planSelector').hide();
306
    	jQuery('.planSelector').hide();
307
    	#if($action.getServiceType() == "1")
307
    	#if($action.getServiceType() == "1")
308
        	var jsonMap = $action.getPlanMapInJson();
308
        	var jsonMap = $action.getPlanMapInJson();
309
        	jQuery('#operatorSelector').change(function() {
309
        	jQuery('#operatorSelector').change(function() {
-
 
310
        		populatePlans();
-
 
311
        	});
-
 
312
			
-
 
313
			if(jQuery('#operatorSelector option:selected').val() != '0'){
-
 
314
				populatePlans();
-
 
315
			}
-
 
316
			
-
 
317
			function populatePlans() {
310
        		jQuery('#planSelector select#planDropDown').children().remove();
318
				jQuery('#planSelector select#planDropDown').children().remove();
311
        		jQuery('.planSelector').hide();
319
        		jQuery('.planSelector').hide();
312
        		var operatorId = jQuery('#operatorSelector option:selected').val();
320
        		var operatorId = jQuery('#operatorSelector option:selected').val();
313
				var operatorName = jQuery('#operatorSelector option:selected').text();
321
				var operatorName = jQuery('#operatorSelector option:selected').text();
314
				if(operatorName == "AIRTEL" || operatorName == "VODAFONE") {
322
				if(operatorName == "AIRTEL" || operatorName == "VODAFONE") {
315
					jQuery('#showPlansDiv').show();
323
					jQuery('#showPlansDiv').show();
Line 328... Line 336...
328
            		} else {
336
            		} else {
329
            			jQuery('#planDropDown').append("<option selected='true' value='" + planName + "' desc='" + planDescription + "'>" + planDisplayName + "</option>");
337
            			jQuery('#planDropDown').append("<option selected='true' value='" + planName + "' desc='" + planDescription + "'>" + planDisplayName + "</option>");
330
        			}
338
        			}
331
        		});
339
        		});
332
        		jQuery('#planDescription').html(jQuery('#planDropDown option:selected').attr('desc'));
340
        		jQuery('#planDescription').html(jQuery('#planDropDown option:selected').attr('desc'));
333
        	});
341
			}
334
			
342
			
335
    	#else	
343
    	#else	
336
        	var helpMap = {"1":"Your VC number starts with 0 and is 11 digits long.",
344
        	var helpMap = {"1":"Your VC number starts with 0 and is 11 digits long.",
337
        				"2":"Smart card number starts with 2 and is 12 digits long.",
345
        				"2":"Smart card number starts with 2 and is 12 digits long.",
338
        				"3":"Smart card number starts with 4 and is 11 digits long.",
346
        				"3":"Smart card number starts with 4 and is 11 digits long.",
Line 343... Line 351...
343
        						"3":"Smart Card Number :",
351
        						"3":"Smart Card Number :",
344
        						"4":"Subscriber Id :",
352
        						"4":"Subscriber Id :",
345
        						"5":"Customer Id :",
353
        						"5":"Customer Id :",
346
        						"0":"Account Number :"};
354
        						"0":"Account Number :"};
347
        	jQuery('#operatorSelector').change(function() {
355
        	jQuery('#operatorSelector').change(function() {
348
        		jQuery('#accNumberHelp').html(helpMap[jQuery('#operatorSelector option:selected').val()]);
356
        		populateDthHelp();
349
        		jQuery('#dthIdAlias').html(dthIdAliasMap[jQuery('#operatorSelector option:selected').val()]);
-
 
350
        	});
357
        	});
-
 
358
			
-
 
359
			if(jQuery('#operatorSelector option:selected').val() != '0'){
-
 
360
				populateDthHelp();
-
 
361
			}
-
 
362
			
-
 
363
			function populateDthHelp() {
-
 
364
				jQuery('#accNumberHelp').html(helpMap[jQuery('#operatorSelector option:selected').val()]);
-
 
365
				jQuery('#dthIdAlias').html(dthIdAliasMap[jQuery('#operatorSelector option:selected').val()]);
-
 
366
			}
351
    	#end
367
    	#end
352
	</script>
368
	</script>
353
</body>
369
</body>
354
</html>
370
</html>