Admin users page. some fix to template processor.
This commit is contained in:
@@ -307,3 +307,15 @@
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* sprintf in javascript
|
||||
* "{0} and {1}".format('zero','uno');
|
||||
**/
|
||||
String.prototype.format = function() {
|
||||
var formatted = this;
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
var regexp = new RegExp('\\{'+i+'\\}', 'gi');
|
||||
formatted = formatted.replace(regexp, arguments[i]);
|
||||
}
|
||||
return formatted;
|
||||
};
|
||||
|
Reference in New Issue
Block a user