| Line 306... |
Line 306... |
| 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();
|
310 |
populatePlans();
|
| - |
|
311 |
var operatorName = jQuery('#operatorSelector option:selected').text();
|
| - |
|
312 |
if(operatorName == "AIRTEL" || operatorName == "VODAFONE") {
|
| - |
|
313 |
jQuery('#showPlansDiv').show();
|
| - |
|
314 |
jQuery('#showPlans').html("See popular <b class='showDenomination' denominationType='1'>TOPUP</b> and <b class='showDenomination' denominationType='2'>SPECIAL</b> plans for " + operatorName);
|
| - |
|
315 |
} else {
|
| - |
|
316 |
jQuery('#showPlansDiv').hide();
|
| - |
|
317 |
}
|
| 311 |
});
|
318 |
});
|
| 312 |
|
319 |
|
| 313 |
if(jQuery('#operatorSelector option:selected').val() != '0'){
|
320 |
if(jQuery('#operatorSelector option:selected').val() != '0'){
|
| 314 |
populatePlans();
|
321 |
populatePlans();
|
| 315 |
}
|
322 |
}
|
| 316 |
|
323 |
|
| 317 |
function populatePlans() {
|
324 |
function populatePlans() {
|
| 318 |
jQuery('#planSelector select#planDropDown').children().remove();
|
325 |
jQuery('#planSelector select#planDropDown').children().remove();
|
| 319 |
jQuery('.planSelector').hide();
|
326 |
jQuery('.planSelector').hide();
|
| 320 |
var operatorId = jQuery('#operatorSelector option:selected').val();
|
327 |
var operatorId = jQuery('#operatorSelector option:selected').val();
|
| 321 |
var operatorName = jQuery('#operatorSelector option:selected').text();
|
- |
|
| 322 |
if(operatorName == "AIRTEL" || operatorName == "VODAFONE") {
|
- |
|
| 323 |
jQuery('#showPlansDiv').show();
|
- |
|
| 324 |
jQuery('#showPlans').html("See popular <b class='showDenomination' denominationType='1'>TOPUP</b> and <b class='showDenomination' denominationType='2'>SPECIAL</b> plans for " + operatorName);
|
- |
|
| 325 |
} else {
|
- |
|
| 326 |
jQuery('#showPlansDiv').hide();
|
- |
|
| 327 |
}
|
- |
|
| 328 |
plans = jsonMap[operatorId];
|
328 |
plans = jsonMap[operatorId];
|
| - |
|
329 |
if(plans) {
|
| 329 |
jQuery.each(plans, function(i, plan) {
|
330 |
jQuery.each(plans, function(i, plan) {
|
| 330 |
var planName = plan.name;
|
331 |
var planName = plan.name;
|
| 331 |
var planDisplayName = plan.displayName;
|
332 |
var planDisplayName = plan.displayName;
|
| 332 |
var planDescription = plan.description;
|
333 |
var planDescription = plan.description;
|
| 333 |
jQuery('.planSelector').show();
|
334 |
jQuery('.planSelector').show();
|
| 334 |
if(i==0) {
|
335 |
if(i==0) {
|
| 335 |
jQuery('#planDropDown').append("<option value='" + planName + "' desc='" + planDescription + "'>" + planDisplayName + "</option>");
|
336 |
jQuery('#planDropDown').append("<option value='" + planName + "' desc='" + planDescription + "'>" + planDisplayName + "</option>");
|
| 336 |
} else {
|
337 |
} else {
|
| 337 |
jQuery('#planDropDown').append("<option selected='true' value='" + planName + "' desc='" + planDescription + "'>" + planDisplayName + "</option>");
|
338 |
jQuery('#planDropDown').append("<option selected='true' value='" + planName + "' desc='" + planDescription + "'>" + planDisplayName + "</option>");
|
| 338 |
}
|
339 |
}
|
| 339 |
});
|
340 |
});
|
| - |
|
341 |
}
|
| 340 |
jQuery('#planDescription').html(jQuery('#planDropDown option:selected').attr('desc'));
|
342 |
var planDescription =jQuery('#planDropDown option:selected')
|
| - |
|
343 |
if(planDescription.length != 0) {
|
| - |
|
344 |
jQuery('#planDescription').html(planDescription.attr('desc'));
|
| - |
|
345 |
}
|
| 341 |
}
|
346 |
}
|
| 342 |
|
347 |
|
| 343 |
#else
|
348 |
#else
|
| 344 |
var helpMap = {"1":"Your VC number starts with 0 and is 11 digits long.",
|
349 |
var helpMap = {"1":"Your VC number starts with 0 and is 11 digits long.",
|
| 345 |
"2":"Smart card number starts with 2 and is 12 digits long.",
|
350 |
"2":"Smart card number starts with 2 and is 12 digits long.",
|