Subversion Repositories SmartDukaan

Rev

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

Rev 25394 Rev 25649
Line 365... Line 365...
365
function numberToComma(x) {
365
function numberToComma(x) {
366
 
366
 
367
	x = x.toString();
367
	x = x.toString();
368
	x = x.split('.');
368
	x = x.split('.');
369
	var x1 = x[0];
369
	var x1 = x[0];
370
	var x2 = x.length > 1 && x[1]!='0'? '.' + x[1] : '';
370
	var x2 = x.length > 1 && x[1] != '0' ? '.' + x[1] : '';
371
	var lastThree = x1.substring(x1.length - 3);
371
	var lastThree = x1.substring(x1.length - 3);
372
	var otherNumbers = x1.substring(0, x1.length - 3);
372
	var otherNumbers = x1.substring(0, x1.length - 3);
373
	if(x1.charAt(x1.length-4)==',' || x1.charAt(x1.length-4)=='-'){
373
	if (x1.charAt(x1.length - 4) == ',' || x1.charAt(x1.length - 4) == '-') {
374
		console.log(lastThree)
374
		console.log(lastThree)
375
	}
-
 
376
	else{
375
	} else {
377
	if (otherNumbers != '')
376
		if (otherNumbers != '')
378
		lastThree = ',' + lastThree;
377
			lastThree = ',' + lastThree;
379
	}
378
	}
380
	return otherNumbers.replace(/\B(?=(\d{2})+(?!\d))/g, ",") + (lastThree)
379
	return otherNumbers.replace(/\B(?=(\d{2})+(?!\d))/g, ",") + (lastThree)
381
			+ x2;
380
			+ x2;
382
 
381
 
383
}
382
}
Line 601... Line 600...
601
			});
600
			});
602
}
601
}
603
$(".price_drop").live('click', function() {
602
$(".price_drop").live('click', function() {
604
	loadPriceDrop("main-content");
603
	loadPriceDrop("main-content");
605
});
604
});
-
 
605
 
-
 
606
$(document).ready(function() {
-
 
607
	$("#notifyType").trigger('change');
-
 
608
	
-
 
609
});
-
 
610
 
-
 
611
function notifyTypeChange() {
-
 
612
 
-
 
613
	var notifyType = $('#notifyType').val();
-
 
614
	console.log(notifyType);
-
 
615
 
-
 
616
	doGetAjaxRequestHandler(
-
 
617
			context + "/notifications?notifyType=" + notifyType, function(
-
 
618
					response) {
-
 
619
				$('.notification-container').html(response);
-
 
620
				console.log(response)
-
 
621
 
-
 
622
			});
-
 
623
}