Created method to return given string ns from app.strings
This commit is contained in:
parent
4e43a0adee
commit
fff0dfa7d1
|
@ -122,6 +122,12 @@ function getNormalizedURI() { return window.location.pathname.replace(/\/+?$/, '
|
|||
function capitalize(s) { return s.charAt(0).toUpperCase() + s.substr(1) }
|
||||
function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)) }
|
||||
|
||||
function s(name) {
|
||||
if (app.strings === undefined || !name.match(/^[a-zA-Z0-9\.\_]+$/))
|
||||
return false;
|
||||
return eval('app.strings.'+name);
|
||||
}
|
||||
|
||||
function JSON_to_URLEncoded(element,key,list) {
|
||||
var list = list || [];
|
||||
if (typeof(element) == 'object') {
|
||||
|
|
Loading…
Reference in New Issue