Your ROOT_URL in app.ini is http://git.osmesh.ru/ but you are visiting http://91.221.70.94:3000/MOS/OpenBoard/blame/commit/59ff00754ba25c1cb1d9e46797d1ac4a8027aa9a/resources/library/interactive/barre_prof.wgt/scripts/tpl.js You should set ROOT_URL correctly, otherwise the web may not work correctly.
новые иконки в OpenBoard

41 lines
709 B

function Tpl( obj )
{
var templates = {};
this.load = function( obj )
{
templates = obj;
};
this.get = function( name )
{
return templates[name];
};
this.getParsed = function( name, obj )
{
var s = templates[name];
for( var i in obj ){
s = s.replaceAll( "{"+i+"}", obj[i] );
}
return s;
};
this.getParsedMulti = function( nao ) // nao = names and objects array
{
var html = "";
for( var i = 0; i < nao.length; i++ )
{
if( nao[i].length > 1 ){
html += this.getParsed( nao[i][0], nao[i][1] );
}
else{
html += this.get( nao[i][0] );
}
}
return html;
};
if( arguments.length > 0 ){
this.load( obj );
}
}