moved addCommas to app, using addCommas in topic.tpl

This commit is contained in:
Baris Usakli
2013-05-16 15:45:32 -04:00
parent 122d43d37f
commit 0e39acb366
5 changed files with 22 additions and 22 deletions

View File

@@ -44,6 +44,11 @@ var socket,
async: false
});
// takes a string like 1000 and returns 1,000
app.addCommas = function(text) {
return text.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,");
}
// use unique alert_id to have multiple alerts visible at a time, use the same alert_id to fade out the current instance
// type : error, success, info, warning/notify
// title = bolded title text