Subversion Repositories SmartDukaan

Rev

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

Rev 17947 Rev 17987
Line 324... Line 324...
324
 
324
 
325
function confirmPrepaid(addressid){
325
function confirmPrepaid(addressid){
326
	if (typeof addressid=="undefined"){
326
	if (typeof addressid=="undefined"){
327
		addressid=$("input.css-checkbox:checked").val();
327
		addressid=$("input.css-checkbox:checked").val();
328
	}
328
	}
-
 
329
	if (addressid==undefined || typeof addressid=="undefined"){
-
 
330
		$('#loadingModal').modal('hide');
-
 
331
		$('#message').empty();
-
 
332
        $('#message').append("Please select an address...");
-
 
333
        $('#message').removeClass('hidden');
-
 
334
        setTimeout(function() {
-
 
335
            $('#message').addClass('hidden');
-
 
336
        }, 2000);
-
 
337
        return;
-
 
338
	}
-
 
339
	
329
	var url = apihost + 'checkout/?user_id='+me+'&cod=0';
340
	var url = apihost + 'checkout/?user_id='+me+'&cod=0';
330
    var newForm = $('<form>', {
341
    var newForm = $('<form>', {
331
        'action': url,
342
        'action': url,
332
        'method':'post'
343
        'method':'post'
333
    }).append($('<input>', {
344
    }).append($('<input>', {
Line 345... Line 356...
345
function confirmCheckout(addressid){
356
function confirmCheckout(addressid){
346
	var url = apihost + 'checkout/?user_id='+me+'&cod=1';
357
	var url = apihost + 'checkout/?user_id='+me+'&cod=1';
347
	if (typeof addressid=="undefined"){
358
	if (typeof addressid=="undefined"){
348
		addressid=$("input.css-checkbox:checked").val();
359
		addressid=$("input.css-checkbox:checked").val();
349
	}
360
	}
-
 
361
	if (addressid==undefined || typeof addressid=="undefined"){
-
 
362
		$('#loadingModal').modal('hide');
-
 
363
		$('#message').empty();
-
 
364
        $('#message').append("Please select an address...");
-
 
365
        $('#message').removeClass('hidden');
-
 
366
        setTimeout(function() {
-
 
367
            $('#message').addClass('hidden');
-
 
368
        }, 2000);
-
 
369
        return;
-
 
370
	}
-
 
371
	
350
    var newForm = $('<form>', {
372
    var newForm = $('<form>', {
351
        'action': url,
373
        'action': url,
352
        'method':'post'
374
        'method':'post'
353
    }).append($('<input>', {
375
    }).append($('<input>', {
354
        'name': 'addressid',
376
        'name': 'addressid',