TRT перевод
This commit is contained in:
@ -139,8 +139,8 @@ class EdtRec
|
||||
str+=' <caption><b id="caption'+this.uid+'"></b></caption>';
|
||||
str+=' <thead>';
|
||||
str+=' <tr bgcolor="#dadada">';
|
||||
str+=' <th width="20%">'+_('Name')+'</th>';
|
||||
str+=' <th width="80%">'+_('Value')+'</th>';
|
||||
str+=' <th width="20%">'+trt('Name')+'</th>';
|
||||
str+=' <th width="80%">'+trt('Value')+'</th>';
|
||||
str+=' </tr>';
|
||||
str+=' </thead>';
|
||||
str+=' <tbody></tbody>';
|
||||
@ -379,11 +379,11 @@ class EdtRec
|
||||
select.appendChild( option );
|
||||
option = document.createElement("option");
|
||||
option.setAttribute("value","1");
|
||||
option.appendChild(document.createTextNode(_('Yes')));
|
||||
option.appendChild(document.createTextNode(trt('Yes')));
|
||||
select.appendChild( option );
|
||||
option = document.createElement("option");
|
||||
option.setAttribute("value","0");
|
||||
option.appendChild(document.createTextNode(_('Not')));
|
||||
option.appendChild(document.createTextNode(trt('Not')));
|
||||
select.appendChild( option );
|
||||
}else
|
||||
{
|
||||
@ -406,7 +406,7 @@ class EdtRec
|
||||
if(vt=="i4")
|
||||
{
|
||||
|
||||
//alert2(_('Alert'),"prop name = "+nodeProp.getAttribute("n"));
|
||||
//alert2(trt('Alert'),"prop name = "+nodeProp.getAttribute("n"));
|
||||
|
||||
//If there is a node "list" with the elements "CheckBox" then create them.
|
||||
var opt=findNode(nodeProp, "options");
|
||||
@ -456,7 +456,7 @@ class EdtRec
|
||||
button.className='button-secondary';
|
||||
button.setAttribute("type","button");
|
||||
button.setAttribute("value","+");
|
||||
button.setAttribute("title",_("Increase_by_1"));
|
||||
button.setAttribute("title",trt("Increase_by_1"));
|
||||
button.style.cssText="height:100%;width:22px;margin:0px;padding:0px;";
|
||||
button.onclick=function(inp){return function(){inp.value=getIntVal(inp.value)+1;}}(input);
|
||||
|
||||
@ -466,7 +466,7 @@ class EdtRec
|
||||
button.className='button-secondary';
|
||||
button.setAttribute("type","button");
|
||||
button.setAttribute("value","-");
|
||||
button.setAttribute("title",_("Decrease_by_1"));
|
||||
button.setAttribute("title",trt("Decrease_by_1"));
|
||||
button.style.cssText="height:100%;width:22px;margin:0px;padding:0px;";
|
||||
button.onclick=function(inp){return function(){inp.value=getIntVal(inp.value)-1;}}(input);
|
||||
newCell3.appendChild( button );
|
||||
@ -606,21 +606,29 @@ class EdtRec
|
||||
}*/
|
||||
}
|
||||
}else
|
||||
if(vt=="text")
|
||||
{
|
||||
var ta = document.createElement('textarea')
|
||||
ta.setAttribute("id","prop_"+this.uid+"_"+nodeProp.getAttribute("n"));
|
||||
ta.style.cssText="width: 100%;";
|
||||
ta.setAttribute("rows",4);
|
||||
ta.setAttribute("name",nodeProp.getAttribute("n"));
|
||||
ta.setAttribute("value",value);
|
||||
td2.appendChild( ta );
|
||||
if(vt=="text") {
|
||||
let ta = document.createElement('textarea')
|
||||
ta.setAttribute("id", "prop_" + this.uid + "_" + nodeProp.getAttribute("n"));
|
||||
ta.style.cssText = "width: 100%;";
|
||||
ta.setAttribute("rows", 4);
|
||||
ta.setAttribute("name", nodeProp.getAttribute("n"));
|
||||
ta.setAttribute("value", value);
|
||||
td2.appendChild(ta);
|
||||
|
||||
}else
|
||||
if(vt=="html"){
|
||||
let ta = document.createElement('textarea')
|
||||
ta.setAttribute("id", "prop_" + this.uid + "_" + nodeProp.getAttribute("n"));
|
||||
ta.style.cssText = "width: 100%;";
|
||||
ta.setAttribute("rows", 4);
|
||||
ta.setAttribute("name", nodeProp.getAttribute("n"));
|
||||
ta.setAttribute("value", value);
|
||||
td2.appendChild(ta);
|
||||
|
||||
/*var cdv=document.createElement('div');
|
||||
cdv.innerHTML+='<a href="javascript:;" onclick="return showTinyMCE(\'prop_'+this.uid+'_'+nodeProp.getAttribute("n")+'\');">[Show]</a>';
|
||||
cdv.innerHTML+=' <a href="javascript:;" onclick="tinyMCE.get(\'prop_'+this.uid+'_'+nodeProp.getAttribute("n")+'\').hide(); return false;">[Hide]</a>';
|
||||
td2.appendChild( cdv );*/
|
||||
|
||||
}else
|
||||
if(vt=="blob" || vt=="file")
|
||||
{
|
||||
@ -657,7 +665,7 @@ class EdtRec
|
||||
btnSel.className='button-secondary';
|
||||
btnSel.setAttribute("type","button");
|
||||
btnSel.setAttribute("value","...");
|
||||
btnSel.setAttribute("title",_('Upload'));
|
||||
btnSel.setAttribute("title",trt('Upload'));
|
||||
|
||||
btnSel.style.cssText="width:30px;font-size:9pt;margin:0px;padding:0px;";
|
||||
newCell2.appendChild(btnSel);
|
||||
@ -666,13 +674,13 @@ class EdtRec
|
||||
button2.className='button-secondary';
|
||||
button2.setAttribute("type","button");
|
||||
button2.setAttribute("value","X");
|
||||
button2.setAttribute("title",_('Delete'));
|
||||
button2.setAttribute("title",trt('Delete'));
|
||||
button2.style.cssText="height:22px;width:22px;margin:0px;padding:0px;";
|
||||
button2.onclick=function(inp,ifr){return function(){ inp.value=''; getIframeDocument(ifr).forms["form"].reset(); }}(input,ifr);
|
||||
newCell3.appendChild(button2);
|
||||
|
||||
//Download button
|
||||
newCell4.innerHTML='<form action="'+ScriptDName+'" method="get" style="display:inline;" target="_blank"><input type="hidden" name="fn" value="10"/><input type="hidden" name="n" value="'+nodeProp.getAttribute('cd')+'"/><input type="hidden" name="t" value="'+nodeType.getAttribute('n')+'"/><input type="hidden" name="f" value="'+nodeProp.getAttribute('n')+'"/><input type="hidden" name="i" value="'+record_id+'"/><input class="button-secondary" style="height:22px;width:22px;" type="submit" title="'+_('Download')+'" value="D" /></form>'
|
||||
newCell4.innerHTML='<form action="'+ScriptDName+'" method="get" style="display:inline;" target="_blank"><input type="hidden" name="fn" value="10"/><input type="hidden" name="n" value="'+nodeProp.getAttribute('cd')+'"/><input type="hidden" name="t" value="'+nodeType.getAttribute('n')+'"/><input type="hidden" name="f" value="'+nodeProp.getAttribute('n')+'"/><input type="hidden" name="i" value="'+record_id+'"/><input class="button-secondary" style="height:22px;width:22px;" type="submit" title="'+trt('Download')+'" value="D" /></form>'
|
||||
|
||||
td2.appendChild( tbl_b );
|
||||
|
||||
@ -768,7 +776,7 @@ class EdtRec
|
||||
var td = document.createElement('td');
|
||||
td.style.cssText="padding: 5px; vertical-align: bottom;";
|
||||
td.setAttribute("colspan", "2");
|
||||
if (this.record_id==-1) td.innerHTML='<label style="float: left; white-space: nowrap;"><input id="readd_'+this.uid+'" type="checkbox"> '+_('Repeat_the_addition_of_the_entry')+'</label>';
|
||||
if (this.record_id==-1) td.innerHTML='<label style="float: left; white-space: nowrap;"><input id="readd_'+this.uid+'" type="checkbox"> '+trt('Repeat_the_addition_of_the_entry')+'</label>';
|
||||
tr.appendChild(td);
|
||||
//var td = document.createElement('td');
|
||||
td.setAttribute("align","right");
|
||||
@ -776,7 +784,7 @@ class EdtRec
|
||||
button.className='button-secondary';
|
||||
button.setAttribute("type","button");
|
||||
button.style.cssText="margin:0px;margin-right:1px;";
|
||||
button.setAttribute("value",_('Apply'));
|
||||
button.setAttribute("value",trt('Apply'));
|
||||
button.onclick=function(thiz){
|
||||
return function(){
|
||||
thiz.sendData();
|
||||
@ -788,8 +796,8 @@ class EdtRec
|
||||
button.setAttribute("type","button");
|
||||
button.className='button-secondary';
|
||||
button.style.cssText="margin:0px;";
|
||||
button.setAttribute("value",_('Cancel'));
|
||||
//button.onclick=function f_exit(this) { alert2(_('Alert'),this.win.div); }
|
||||
button.setAttribute("value",trt('Cancel'));
|
||||
//button.onclick=function f_exit(this) { alert2(trt('Alert'),this.win.div); }
|
||||
button.onclick=function(thiz){ return function(){thiz.win.Close();};}(this);
|
||||
td.appendChild( button );
|
||||
tr.appendChild(td);
|
||||
@ -798,13 +806,13 @@ class EdtRec
|
||||
//Height adjust the height of the page
|
||||
//this.win.div.style.width="400px"
|
||||
//this.win.div.style.height="100px"
|
||||
//alert2(_('Alert'),document.documentElement.scrollTop)
|
||||
//alert2(_('Alert'),document.documentElement.clientHeight)
|
||||
//alert2(trt('Alert'),document.documentElement.scrollTop)
|
||||
//alert2(trt('Alert'),document.documentElement.clientHeight)
|
||||
|
||||
this.win.setHeight(eTable.offsetHeight+40); //this.win.div.style.height=(eTable.offsetHeight+40)+"px";
|
||||
|
||||
//alert2(_('Alert'),this.win.div.style.width)
|
||||
//alert2(_('Alert'),this.win.div.style.height)
|
||||
//alert2(trt('Alert'),this.win.div.style.width)
|
||||
//alert2(trt('Alert'),this.win.div.style.height)
|
||||
|
||||
|
||||
this.win.setCenter();
|
||||
@ -1115,7 +1123,7 @@ class EdtRec
|
||||
nodeProp=nodeProp.nextSibling;
|
||||
}
|
||||
|
||||
if(count==0) alert2(_('Alert'),_("No_results_were_found_for_your_search"));
|
||||
if(count==0) alert2(trt('Alert'),trt("No_results_were_found_for_your_search"));
|
||||
else
|
||||
if(count==1) //1 item has been selected, fill in the field.
|
||||
{
|
||||
@ -1153,7 +1161,7 @@ class EdtRec
|
||||
var win=new TWin();
|
||||
win.BuildGUI(pageX-280,pageY-7);
|
||||
win.setContent(htmlString);
|
||||
win.setCaption(document.createTextNode(_("Selection")));
|
||||
win.setCaption(document.createTextNode(trt("Selection")));
|
||||
win.setParent(this.win);
|
||||
//win.obj=this
|
||||
}
|
||||
@ -1161,10 +1169,10 @@ class EdtRec
|
||||
};
|
||||
|
||||
applyReq(req,fn,node,xmldoc,win)
|
||||
{ //alert2(_('Alert'),"erec XML=\n"+getXMLNodeSerialisation(node));
|
||||
{ //alert2(trt('Alert'),"erec XML=\n"+getXMLNodeSerialisation(node));
|
||||
if (fn==-1)
|
||||
{
|
||||
alert2(_('Alert'),findFirstNode(node,'#cdata-section').nodeValue);
|
||||
alert2(trt('Alert'),findFirstNode(node,'#cdata-section').nodeValue);
|
||||
//this.pBarCnt=0;
|
||||
this.hideProgressBar();
|
||||
}else
|
||||
@ -1204,7 +1212,7 @@ class EdtRec
|
||||
this.setData(node);
|
||||
}else
|
||||
{
|
||||
alert2(_('Alert'),"Unknown function! fn=\""+fn+"\"" );
|
||||
alert2(trt('Alert'),"Unknown function! fn=\""+fn+"\"" );
|
||||
this.hideProgressBar();
|
||||
}
|
||||
};
|
||||
@ -1230,7 +1238,7 @@ class EdtRec
|
||||
}
|
||||
}else
|
||||
{
|
||||
alert2(_('Alert'),'Field "'+prop_id+'" not find!');
|
||||
alert2(trt('Alert'),'Field "'+prop_id+'" not find!');
|
||||
}
|
||||
};
|
||||
|
||||
@ -1242,7 +1250,7 @@ class EdtRec
|
||||
//filterName - filter name
|
||||
callFilterVal(typeName,name,value,htmlid,filterName)
|
||||
{
|
||||
//alert2(_('Alert')," typeName="+typeName+" name="+name+" value="+value+" htmlid="+htmlid);
|
||||
//alert2(trt('Alert')," typeName="+typeName+" name="+name+" value="+value+" htmlid="+htmlid);
|
||||
if(value!="")
|
||||
{
|
||||
var xml='<?xml version="1.0" encoding="utf-8"?><metadata fn="6"><type n="'+typeName+'" c="'+name+'" pn="'+htmlid+'"><objects-list><filter>';
|
||||
@ -1274,8 +1282,8 @@ class EdtRec
|
||||
{
|
||||
var nProps1=findFirstNode(node, 'properties')
|
||||
var nProps2=findFirstNode(this.nodeMetadata, 'properties') //Since the values came in abbreviated XML
|
||||
if(nProps1==null){ alert2(_('Alert'),'Error, node='+getXMLNodeSerialisation(node)); return; }
|
||||
if(nProps2==null){ alert2(_('Alert'),'Error, nodeMetadata='+getXMLNodeSerialisation(this.nodeMetadata)); return; }
|
||||
if(nProps1==null){ alert2(trt('Alert'),'Error, node='+getXMLNodeSerialisation(node)); return; }
|
||||
if(nProps2==null){ alert2(trt('Alert'),'Error, nodeMetadata='+getXMLNodeSerialisation(this.nodeMetadata)); return; }
|
||||
var nProp1=nProps1.firstChild
|
||||
while(nProp1!=null)
|
||||
{
|
||||
@ -1406,7 +1414,7 @@ class EdtRec
|
||||
//Проверяю тип дпнных и заполненость полей
|
||||
if (!this.checkData(value,nodeProp.getAttribute("vt"),nodeProp.getAttribute("maybenull")))
|
||||
{
|
||||
alert2(_('Alert'),_("The_field_data_is_incorrect")+" \""+nodeProp.getAttribute("d")+"\"=\""+value+"\"!");
|
||||
alert2(trt('Alert'),trt("The_field_data_is_incorrect")+" \""+nodeProp.getAttribute("d")+"\"=\""+value+"\"!");
|
||||
return;
|
||||
}
|
||||
s+=' <prop n="'+nodeProp.getAttribute("n")+'"><![CDATA['+value+']]></prop>\n';
|
||||
@ -1416,7 +1424,7 @@ class EdtRec
|
||||
s+=' </properties>\n';
|
||||
s+='</type>\n';
|
||||
s+='</metadata>';
|
||||
//alert2(_('Alert'),s);
|
||||
//alert2(trt('Alert'),s);
|
||||
if(this.request.callServer(ScriptName,s,true))
|
||||
{
|
||||
this.showProgressBar();
|
||||
@ -1451,7 +1459,7 @@ class EdtRec
|
||||
//inserting the selected record
|
||||
setPropVal(id,caption,prop_id)
|
||||
{
|
||||
//alert2(_('Alert'),"id="+id+" caption="+caption+" prop_id="+prop_id)
|
||||
//alert2(trt('Alert'),"id="+id+" caption="+caption+" prop_id="+prop_id)
|
||||
var prop=document.getElementById("prop_"+this.uid+"_"+prop_id);
|
||||
var propvis=document.getElementById("prop_"+this.uid+"_"+prop_id+"_visible");
|
||||
if ((prop!=null)&&(propvis!=null))
|
||||
@ -1477,9 +1485,9 @@ class EdtRec
|
||||
|
||||
let readd=document.getElementById("readd_"+this.uid);
|
||||
if(readd!==null && readd.checked){
|
||||
//if(!confirm(_("Successfully_added_data")+".\n"+_("Add_more")+"?")) this.win.Close();
|
||||
//if(!confirm(trt("Successfully_added_data")+".\n"+trt("Add_more")+"?")) this.win.Close();
|
||||
|
||||
confirm2(_('Warning'),_("Successfully_added_data")+"<br>"+_("Add_more")+"?",null,function(thiz){return function(){thiz.win.Close();};}(this));
|
||||
confirm2(trt('Warning'),trt("Successfully_added_data")+"<br>"+trt("Add_more")+"?",null,function(thiz){return function(){thiz.win.Close();};}(this));
|
||||
|
||||
|
||||
}else
|
||||
|
||||
@ -61,7 +61,7 @@ class DBMSUser
|
||||
{
|
||||
if(findNode(node,'#cdata-section').nodeValue=="0") //if not logged
|
||||
{
|
||||
alert(_('Invalid_username_and_or_password'));
|
||||
alert(trt('Invalid_username_and_or_password'));
|
||||
}else
|
||||
{
|
||||
//location.reload();
|
||||
@ -76,7 +76,7 @@ class DBMSUser
|
||||
{
|
||||
//if(findNode(node,'#cdata-section').nodeValue=="1") //if register
|
||||
//{
|
||||
// alert(_('New_user_is_registered')+'\n'+_('The_password_has_been_sent_to_you_by_Email'));
|
||||
// alert(trt('New_user_is_registered')+'\n'+trt('The_password_has_been_sent_to_you_by_Email'));
|
||||
// location.reload();
|
||||
//}
|
||||
}
|
||||
@ -91,7 +91,7 @@ class DBMSUser
|
||||
{
|
||||
this.win=new TWin(true);
|
||||
this.win.BuildGUI(10,10);
|
||||
this.win.setCaption(_('Authorization'));
|
||||
this.win.setCaption(trt('Authorization'));
|
||||
|
||||
this.win.setSize("350px","200px");
|
||||
|
||||
@ -101,7 +101,7 @@ class DBMSUser
|
||||
<tr><td>\n\
|
||||
<table border="0" style="width: 100%; height: 100%;">\n\
|
||||
<tr>\n\
|
||||
<td style="padding: 2px; width: 30%; white-space: nowrap"><b>'+_('Login')+' (E-mail):</b></td>\n\
|
||||
<td style="padding: 2px; width: 30%; white-space: nowrap"><b>'+trt('Login')+' (E-mail):</b></td>\n\
|
||||
<td style="padding: 2px;"><input type="text" maxlength="50" style="width: 100%; padding: 2px; display: inline;" id="tcLogin'+this.uid+'" name="login"><br></td>\n\
|
||||
</tr>\n\
|
||||
<tr>\n\
|
||||
@ -111,7 +111,7 @@ class DBMSUser
|
||||
<tr>\n\
|
||||
<td style="padding: 2px;" colspan="2"><table cellspacing="0" cellpadding="0" border="0" style="width: 100%;"><tr><td><label for="save0" style="white-space: nowrap;"><input id="save_'+this.uid+'" type="checkbox" style="display: inline;" checked/> Remember (<a href="#" onclick="showRestoreForm();">Forgot your password?</a>)</label></td></tr></table></td>\n\
|
||||
</tr>\n\
|
||||
<tr><td colspan="2" style="text-align: right;"><input class="button-secondary" id="TLogin_E'+this.uid+'" type="button" style="display: inline;" value="'+_('Log_in')+'"></td></tr>\n\
|
||||
<tr><td colspan="2" style="text-align: right;"><input class="button-secondary" id="TLogin_E'+this.uid+'" type="button" style="display: inline;" value="'+trt('Log_in')+'"></td></tr>\n\
|
||||
</table>\n\
|
||||
</td></tr>\n\
|
||||
</tbody>\n\
|
||||
@ -241,7 +241,7 @@ class DBMSUser
|
||||
<tr><td>\n\
|
||||
<table border="0" style="width: 100%; height: 100%;">\n\
|
||||
<tr>\n\
|
||||
<td style="padding: 2px; width: 30%; white-space: nowrap"><b>'+_('Login')+' (E-mail):</b></td>\n\
|
||||
<td style="padding: 2px; width: 30%; white-space: nowrap"><b>'+trt('Login')+' (E-mail):</b></td>\n\
|
||||
<td style="padding: 2px;"><input type="text" maxlength="50" style="width: 100%; padding: 2px; display: inline;" id="tcLogin'+this.uid+'" name="login"><br></td>\n\
|
||||
</tr>\n\
|
||||
<tr>\n\
|
||||
@ -251,7 +251,7 @@ class DBMSUser
|
||||
<tr>\n\
|
||||
<td style="padding: 2px;" colspan="2"><table cellspacing="0" cellpadding="0" border="0" style="width: 100%;"><tr><td><label for="save0" style="white-space: nowrap;"><input id="save_'+this.uid+'" type="checkbox" style="display: inline;" checked/> Remember (<a href="#" onclick="showRestoreForm();">Forgot your password?</a>)</label></td></tr></table></td>\n\
|
||||
</tr>\n\
|
||||
<tr><td colspan="2" style="text-align: right;"><input class="button-secondary" id="TLogin_E'+this.uid+'" type="button" style="display: inline;" value="'+_('Log_in')+'"></td></tr>\n\
|
||||
<tr><td colspan="2" style="text-align: right;"><input class="button-secondary" id="TLogin_E'+this.uid+'" type="button" style="display: inline;" value="'+trt('Log_in')+'"></td></tr>\n\
|
||||
</table>\n\
|
||||
</td></tr>\n\
|
||||
</tbody>\n\
|
||||
@ -281,7 +281,7 @@ class DBMSUser
|
||||
var password=document.getElementById('tcPassword'+this.uid).value;
|
||||
if(login=='' || password=='')
|
||||
{ str="Not filled in the required fields: ";
|
||||
if(login=='') str+='"'+_('Login')+' (E-mail)"';
|
||||
if(login=='') str+='"'+trt('Login')+' (E-mail)"';
|
||||
if(login=='' && password=='') str+=', ';
|
||||
if(password=='') str+='"Password"';
|
||||
str+='!';
|
||||
@ -434,16 +434,16 @@ function showRestoreForm()
|
||||
{
|
||||
var win=new TWin(true);
|
||||
win.BuildGUI(10,10);
|
||||
win.setCaption(_("Password_recovery"));
|
||||
win.setCaption(trt("Password_recovery"));
|
||||
|
||||
str='<div id="TWin_DT_'+win.tWinId+'" style="width: 100%; height: 100%; padding: 4px; text-align: left;">\n\
|
||||
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%; padding: 0px;">\n\
|
||||
<tr>\n\
|
||||
<td style="padding: 2px; white-space: nowrap"><b>'+_('Login')+' (E-mail)</b></td>\n\
|
||||
<td style="padding: 2px; white-space: nowrap"><b>'+trt('Login')+' (E-mail)</b></td>\n\
|
||||
<td style="padding: 2px;"><input type="text" maxlength="40" style="width: 100%; display: inline;" id="'+win.uid+'_email" name="login">\n\
|
||||
<table id="'+win.uid+'_phone" style="width: 100%; display: none;" cellpadding="0" cellspacing="0"><tr><td style="white-space: nowrap;"><b>+7 ( </b><input type="text" maxlength="3" onkeydown="this.value = this.value.replace(/[^0-9]/g, \'\')" onkeyup="this.value = this.value.replace(/[^0-9]/g, \'\')" style="width: 35px; display: inline;" id="'+win.uid+'_phone0" value=""><b> ) </b></td><td style="width: 90%;"><input type="text" onkeydown="this.value = this.value.replace(/[^0-9]/g, \'\')" onkeyup="this.value = this.value.replace(/[^0-9]/g, \'\')" maxlength="7" style="width: 100%;display: inline;" id="'+win.uid+'_phone1" value=""></td></tr></table><br></td>\n\
|
||||
</tr>\n\
|
||||
<tr><td colspan="2" style="text-align: right; padding: 2px;"><input class="button-secondary" id="'+win.uid+'_restore" type="button" style="display: inline;" value="'+_('Restore')+'"></td></tr>\n\
|
||||
<tr><td colspan="2" style="text-align: right; padding: 2px;"><input class="button-secondary" id="'+win.uid+'_restore" type="button" style="display: inline;" value="'+trt('Restore')+'"></td></tr>\n\
|
||||
</table>\n\
|
||||
</td></tr>\n\
|
||||
</div>';
|
||||
@ -471,8 +471,8 @@ function showRestoreForm()
|
||||
|
||||
var em=document.getElementById(win.uid+'_email').value;
|
||||
|
||||
if(em==''){ document.getElementById(win.uid+'_email').select(); alert(_('Not_filled_Email_address')); win.hideProgressBar(); return; }
|
||||
if(! isEmail(em)){ document.getElementById(win.uid+'_email').select(); alert(_('Please_enter_a_valid_email_address')); win.hideProgressBar(); return; }
|
||||
if(em==''){ document.getElementById(win.uid+'_email').select(); alert(trt('Not_filled_Email_address')); win.hideProgressBar(); return; }
|
||||
if(! isEmail(em)){ document.getElementById(win.uid+'_email').select(); alert(trt('Please_enter_a_valid_email_address')); win.hideProgressBar(); return; }
|
||||
|
||||
//Send AJAX reqwest to server
|
||||
var xml='<?xml version="1.0" encoding="utf-8"?>\
|
||||
@ -495,12 +495,12 @@ function showRestoreForm()
|
||||
//загрузился xml документ начинаем его разбирать (по id функции в документе)
|
||||
var xmldoc = xmlHttpRequest.responseXML
|
||||
if(xmldoc==null) {
|
||||
alert2(_('Alert'), _('Wrong_XML_document') + "!\n" + xmlHttpRequest.responseText);
|
||||
alert2(trt('Alert'), trt('Wrong_XML_document') + "!\n" + xmlHttpRequest.responseText);
|
||||
return;
|
||||
}
|
||||
|
||||
var node = xmldoc.documentElement;
|
||||
if((node==null)||(node.getAttribute("fn")==null)) alert(_('Error')+"\n "+_("No_data")+"!\n"+xmlHttpRequest.responseText);
|
||||
if((node==null)||(node.getAttribute("fn")==null)) alert(trt('Error')+"\n "+trt("No_data")+"!\n"+xmlHttpRequest.responseText);
|
||||
else
|
||||
{
|
||||
//alert("Принятый браузером XML=\n"+getXMLNodeSerialisation(node));
|
||||
@ -518,7 +518,7 @@ function showRestoreForm()
|
||||
}
|
||||
}else
|
||||
{
|
||||
if(confirm(_('Failed_to_get_data')+"\n URL: "+url+"\n"+xmlHttpRequest.statusText+"\nRedo the request?"))
|
||||
if(confirm(trt('Failed_to_get_data')+"\n URL: "+url+"\n"+xmlHttpRequest.statusText+"\nRedo the request?"))
|
||||
{
|
||||
var call=new myXMLHttpRequest(this);
|
||||
call.callServer(url,xmlString);
|
||||
|
||||
@ -153,7 +153,7 @@
|
||||
}
|
||||
|
||||
//Функция для перевода текста без применения GetText
|
||||
function __($text)
|
||||
function trt($text)
|
||||
{
|
||||
global $db,$lng,$Schema;
|
||||
|
||||
@ -202,7 +202,7 @@
|
||||
if($pos2 !== false)
|
||||
{
|
||||
$result.=substr($text, $cut, $pos1 - $cut );
|
||||
$result.=__(substr($text, $pos1+3, $pos2 - $pos1 - 3 ));
|
||||
$result.=trt(substr($text, $pos1+3, $pos2 - $pos1 - 3 ));
|
||||
$cut=$pos2+2;
|
||||
$from = $pos2 + 2;
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ function CheckSession(path)
|
||||
clearTimeout(this.timer);
|
||||
//alert('Ваша сессия завершилась!');
|
||||
//location.reload();
|
||||
alert2(_("Alert"),'Ваша сессия завершилась! При нажатии на “OK” страница перезагрузится, а при нажатии на “X“ закроется сообщение.').onclick=function(){ location.reload(); };
|
||||
alert2(trt("Alert"),'Ваша сессия завершилась! При нажатии на “OK” страница перезагрузится, а при нажатии на “X“ закроется сообщение.').onclick=function(){ location.reload(); };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,17 +46,17 @@ class SRec
|
||||
|
||||
applyReq(req,fn,node,xmldoc)
|
||||
{
|
||||
//alert2(_('Alert'),getXMLNodeSerialisation(node));
|
||||
//alert2(trt('Alert'),getXMLNodeSerialisation(node));
|
||||
this.hideProgressBar();
|
||||
|
||||
this.xmldoc=node.ownerDocument; //xmldoc;
|
||||
if (fn==-1) //Information menu
|
||||
{
|
||||
alert2(_('Alert'),findFirstNode(node,'#cdata-section').nodeValue);
|
||||
alert2(trt('Alert'),findFirstNode(node,'#cdata-section').nodeValue);
|
||||
}else
|
||||
if (fn==0)
|
||||
{
|
||||
//alert2(_('Alert'),getXMLNodeSerialisation(node));
|
||||
//alert2(trt('Alert'),getXMLNodeSerialisation(node));
|
||||
this.setMetadata(node);
|
||||
this.updateSize();
|
||||
}else
|
||||
@ -81,10 +81,10 @@ class SRec
|
||||
if(this.rwin!=null)
|
||||
{
|
||||
this.rwin.hideProgressBar();
|
||||
this.rwin.setContent('<table border="0px" style="width: 100%; height: 100%; background-color: #f1f1f1;"><tr><td align="center"><a href="'+findFirstNode(node,'#cdata-section').nodeValue+'">'+_('Download_report')+': "'+this.win.getCaption().innerHTML+'".</a></td></tr></table>');
|
||||
this.rwin.setContent('<table border="0px" style="width: 100%; height: 100%; background-color: #f1f1f1;"><tr><td align="center"><a href="'+findFirstNode(node,'#cdata-section').nodeValue+'">'+trt('Download_report')+': "'+this.win.getCaption().innerHTML+'".</a></td></tr></table>');
|
||||
}
|
||||
}else
|
||||
alert2(_('Alert'),"Unknown function! fn=\""+fn+"\"" );
|
||||
alert2(trt('Alert'),"Unknown function! fn=\""+fn+"\"" );
|
||||
}
|
||||
|
||||
//Edit the GUI filter from the xml string.
|
||||
@ -150,11 +150,11 @@ class SRec
|
||||
<caption></caption><thead></thead><tbody></tbody>\
|
||||
</table>\
|
||||
</td></tr><tr><td>\
|
||||
<table style="width:100%;"><tr><td><img src="../resources/metadata/dbms/images/rplus.png" alt="add" id="SRec_Add_'+this.uid+'" title="'+_('Add_record')+'" border="0" style="cursor: pointer;"/></td>\
|
||||
<td><img src="../resources/metadata/dbms/images/rdel.png" alt="del" id="SRec_Del_'+this.uid+'" title="'+_('Delete_record')+'" border="0" style="cursor: pointer;"/></td>\
|
||||
<td><img src="../resources/metadata/dbms/images/excel.png" alt="excel" id="SRec_Exc_'+this.uid+'" title="'+_('Export_to_Excel')+'" border="0" style="cursor: pointer;"/></td>\
|
||||
<table style="width:100%;"><tr><td><img src="../resources/metadata/dbms/images/rplus.png" alt="add" id="SRec_Add_'+this.uid+'" title="'+trt('Add_record')+'" border="0" style="cursor: pointer;"/></td>\
|
||||
<td><img src="../resources/metadata/dbms/images/rdel.png" alt="del" id="SRec_Del_'+this.uid+'" title="'+trt('Delete_record')+'" border="0" style="cursor: pointer;"/></td>\
|
||||
<td><img src="../resources/metadata/dbms/images/excel.png" alt="excel" id="SRec_Exc_'+this.uid+'" title="'+trt('Export_to_Excel')+'" border="0" style="cursor: pointer;"/></td>\
|
||||
<td style="width: 99%;"> </td>\
|
||||
<td><img src="../resources/metadata/dbms/images/refresh.png" alt="refresh" id="SRec_Rfr_'+this.uid+'" title="'+_('Update')+'" border="0" style="cursor: pointer;"/></td></tr>\
|
||||
<td><img src="../resources/metadata/dbms/images/refresh.png" alt="refresh" id="SRec_Rfr_'+this.uid+'" title="'+trt('Update')+'" border="0" style="cursor: pointer;"/></td></tr>\
|
||||
</table>\
|
||||
</td></tr><tr><td id="tblContainer_'+this.uid+'" style="vertical-align:top; overflow:hidden; width:100%; height:100%; text-align:center;">\
|
||||
<div id="tblSContainer_'+this.uid+'" style="position: absolute; overflow:scroll; width: 400px; height: 400px;">\
|
||||
@ -234,7 +234,7 @@ class SRec
|
||||
//Function to fill the drop-down lists (here it is necessary to ensure that everywhere there is a "var" in front of the variables).
|
||||
setDataSelect(node)
|
||||
{
|
||||
//alert2(_('Alert'),"setDataSelect = " + getXMLNodeSerialisation(node));
|
||||
//alert2(trt('Alert'),"setDataSelect = " + getXMLNodeSerialisation(node));
|
||||
|
||||
let nodeType,prop_id,prop,option,nodeProp,id,value,cdataNode;
|
||||
nodeType=findFirstNode(node, 'type');
|
||||
@ -247,7 +247,7 @@ class SRec
|
||||
let nodeCur=findNodeOnAttribute(nodeFilter, 'column', 'n', prop_id);
|
||||
if(nodeCur!=null) selector=nodeCur.getAttribute("selector");
|
||||
|
||||
//alert2(_('Alert'),"nodeCur = " + getXMLNodeSerialisation(nodeCur));
|
||||
//alert2(trt('Alert'),"nodeCur = " + getXMLNodeSerialisation(nodeCur));
|
||||
|
||||
/*nodeCur=nodeFilter.firstChild
|
||||
while(nodeCur!=null)
|
||||
@ -324,7 +324,7 @@ class SRec
|
||||
}
|
||||
if(count==0)
|
||||
{
|
||||
alert2(_('Alert'),_("No_results_were_found_for_your_search"));
|
||||
alert2(trt('Alert'),trt("No_results_were_found_for_your_search"));
|
||||
}else
|
||||
if(count==1) //fill without window
|
||||
{
|
||||
@ -361,7 +361,7 @@ class SRec
|
||||
win.BuildGUI(pageX-10,pageY-10);
|
||||
win.setHeight(400);
|
||||
win.setContent(htmlString);
|
||||
win.setCaption(document.createTextNode(_('Selection')));
|
||||
win.setCaption(document.createTextNode(trt('Selection')));
|
||||
win.setParent(this.win);
|
||||
//win.obj=this
|
||||
}
|
||||
@ -401,7 +401,7 @@ class SRec
|
||||
}
|
||||
}else
|
||||
{
|
||||
alert2(_('Alert'),'Filter "'+prop_id+'" not find!');
|
||||
alert2(trt('Alert'),'Filter "'+prop_id+'" not find!');
|
||||
}
|
||||
}
|
||||
|
||||
@ -435,7 +435,7 @@ class SRec
|
||||
columnNode = columnNode.nextSibling;
|
||||
}
|
||||
}
|
||||
//alert2(_('Alert'),getXMLNodeSerialisation(this.nodeMetadata));
|
||||
//alert2(trt('Alert'),getXMLNodeSerialisation(this.nodeMetadata));
|
||||
}
|
||||
|
||||
/** Function to send filter data to the server
|
||||
@ -476,7 +476,7 @@ class SRec
|
||||
xs+='</filter></objects-list></type>\n';
|
||||
xs+='</metadata>';
|
||||
|
||||
//alert2(_('Alert'),xs);
|
||||
//alert2(trt('Alert'),xs);
|
||||
|
||||
if(this.request.callServer(ScriptName,xs))
|
||||
{
|
||||
@ -494,7 +494,7 @@ class SRec
|
||||
let td,tr,td1,td2;
|
||||
let nodeFilter=null;
|
||||
let tablefilter=document.getElementById('idfilter'+this.uid);
|
||||
if (tablefilter.tBodies==null) alert2(_('Alert'),'tablefilter=null');
|
||||
if (tablefilter.tBodies==null) alert2(trt('Alert'),'tablefilter=null');
|
||||
let nodeType=findFirstNode(node, "type");
|
||||
this.f_pI=nodeType.getAttribute("ins");//access rights
|
||||
this.f_pU=nodeType.getAttribute("upd");
|
||||
@ -679,12 +679,12 @@ class SRec
|
||||
select.appendChild( option );
|
||||
option=document.createElement("option");
|
||||
option.setAttribute("value","1");
|
||||
option.appendChild(document.createTextNode(_('Yes')));
|
||||
option.appendChild(document.createTextNode(trt('Yes')));
|
||||
if(value=="1") option.selected=true;
|
||||
select.appendChild( option );
|
||||
option=document.createElement("option");
|
||||
option.setAttribute("value","0");
|
||||
option.appendChild(document.createTextNode(_('Not')));
|
||||
option.appendChild(document.createTextNode(trt('Not')));
|
||||
if(value=="0") option.selected=true;
|
||||
select.appendChild( option );
|
||||
}else
|
||||
@ -893,7 +893,7 @@ class SRec
|
||||
}
|
||||
td2.appendChild( table );
|
||||
|
||||
}else alert2(_('Alert'),"Unknown type = "+columnNode.getAttribute("vt"));
|
||||
}else alert2(trt('Alert'),"Unknown type = "+columnNode.getAttribute("vt"));
|
||||
tablefilter.tBodies[0].appendChild(tr);
|
||||
}
|
||||
columnNode = columnNode.nextSibling;
|
||||
@ -909,7 +909,7 @@ class SRec
|
||||
let button = document.createElement('input');
|
||||
button.className='button-secondary';
|
||||
button.setAttribute("type","button");
|
||||
button.setAttribute("value",_("Filtering"));
|
||||
button.setAttribute("value",trt("Filtering"));
|
||||
button.setAttribute("id","btnfilter_"+this.uid);
|
||||
button.onclick=function(obj){
|
||||
return function()
|
||||
@ -1039,7 +1039,7 @@ class SRec
|
||||
tr.appendChild(th);
|
||||
th=document.createElement('th');
|
||||
th.appendChild( document.createTextNode('Del'));
|
||||
th.title = _('Invert_selection');
|
||||
th.title = trt('Invert_selection');
|
||||
th.style.cssText='width: 1%; cursor: pointer; text-decoration: underline;';
|
||||
th.onmouseover=function(){ this.style.backgroundColor=g_rowColor2; };
|
||||
th.onmouseout=function(){ this.style.backgroundColor='var(--header-color)'; };
|
||||
@ -1435,7 +1435,7 @@ class SRec
|
||||
dataalert()
|
||||
{
|
||||
let error_msg="";
|
||||
if (error_msg!="") alert2(_('Alert'),"ShowRecords: \n"+error_msg);
|
||||
if (error_msg!="") alert2(trt('Alert'),"ShowRecords: \n"+error_msg);
|
||||
}
|
||||
|
||||
showreport(ext)
|
||||
@ -1446,8 +1446,8 @@ class SRec
|
||||
this.rwin.BuildGUI(pageX-10,pageY-10);
|
||||
this.rwin.setParent(this.win);
|
||||
this.rwin.setSize(280,130);
|
||||
this.rwin.setCaption(_('Report'));
|
||||
this.rwin.setContent('<table border="0px" style="width: 100%; height: 100%; background-color: #f1f1f1;"><tr><td align="center"><b>'+_('Preparing_of_report')+'</b></td></tr><tr><td align="center"><img src="./metadata/dbms/form/loading.gif" alt=""/></td></tr></table>');
|
||||
this.rwin.setCaption(trt('Report'));
|
||||
this.rwin.setContent('<table border="0px" style="width: 100%; height: 100%; background-color: #f1f1f1;"><tr><td align="center"><b>'+trt('Preparing_of_report')+'</b></td></tr><tr><td align="center"><img src="./metadata/dbms/form/loading.gif" alt=""/></td></tr></table>');
|
||||
|
||||
this.appendFilter();
|
||||
//Call data from server
|
||||
@ -1508,7 +1508,7 @@ class SRec
|
||||
if(this.f_State=="1") //select one record
|
||||
{
|
||||
//Send the id of the selected record to the parent of the selected record and close the window
|
||||
//alert2(_('Alert'),"id="+id+" f_PropName="+this.f_PropName+" f_TypeName="+this.f_TypeName);
|
||||
//alert2(trt('Alert'),"id="+id+" f_PropName="+this.f_PropName+" f_TypeName="+this.f_TypeName);
|
||||
this.opener.setFilterObject(this.f_TypeName,this.f_PropName,id);
|
||||
this.win.Close();
|
||||
}else
|
||||
@ -1520,7 +1520,7 @@ class SRec
|
||||
//We run through the marked records and request their removal
|
||||
deleteRecord(recordid)
|
||||
{
|
||||
if (confirm(_("Are_you_sure_you_want_to_delete_the_entries")+'?'))
|
||||
if (confirm(trt("Are_you_sure_you_want_to_delete_the_entries")+'?'))
|
||||
{
|
||||
for(let i=0;i<this.masChBox.length;i++)
|
||||
{
|
||||
@ -1602,7 +1602,7 @@ function nodeToTable(node)
|
||||
if(cdataNode.nodeName=="#cdata-section")
|
||||
{
|
||||
result[pos][cols[i]]=cdataNode.nodeValue;
|
||||
//alert2(_('Alert'),pos+') '+cols[i]+' = '+cdataNode.nodeValue);
|
||||
//alert2(trt('Alert'),pos+') '+cols[i]+' = '+cdataNode.nodeValue);
|
||||
i++;
|
||||
}
|
||||
cdataNode = cdataNode.nextSibling;
|
||||
|
||||
@ -178,7 +178,7 @@ function alert2(title,text)
|
||||
</tr>\n\
|
||||
<tr style="height: 10px;">\n\
|
||||
<td style="width: 100%;"> </td>\n\
|
||||
<td><button class="button-secondary" id="'+win.uid+'_close" style="width: 80px;">'+_('OK')+'</button></td>\n\
|
||||
<td><button class="button-secondary" id="'+win.uid+'_close" style="width: 80px;">'+trt('OK')+'</button></td>\n\
|
||||
</tr>\n\
|
||||
</table>';
|
||||
|
||||
@ -205,8 +205,8 @@ function confirm2(title,text,okFunc,cancelFunc)
|
||||
</tr>\n\
|
||||
<tr style="height: 10px;">\n\
|
||||
<td style="width: 100%;"> </td>\n\
|
||||
<td><button class="button-secondary" id="'+win.uid+'_ok" style="width: 80px;">'+_('OK')+'</button></td>\n\
|
||||
\<td><button class="button-secondary" id="'+win.uid+'_cancel" style="width: 80px;">'+_('Cancel')+'</button></td>\n\
|
||||
<td><button class="button-secondary" id="'+win.uid+'_ok" style="width: 80px;">'+trt('OK')+'</button></td>\n\
|
||||
\<td><button class="button-secondary" id="'+win.uid+'_cancel" style="width: 80px;">'+trt('Cancel')+'</button></td>\n\
|
||||
</tr>\n\
|
||||
</table>';
|
||||
|
||||
@ -982,12 +982,12 @@ class TRequest
|
||||
//загрузился xml документ начинаем его разбирать (по id функции в документе)
|
||||
var xmldoc = xmlHttpRequest.responseXML;
|
||||
if(xmldoc==null){
|
||||
alert2(_('Alert'),_('Wrong_XML_document')+"!\nXML=("+xmlHttpRequest.responseText+')\nURL=('+url+')\nxmlString=('+xmlString+')');
|
||||
alert2(trt('Alert'),trt('Wrong_XML_document')+"!\nXML=("+xmlHttpRequest.responseText+')\nURL=('+url+')\nxmlString=('+xmlString+')');
|
||||
return;
|
||||
}
|
||||
|
||||
var node = xmldoc.documentElement;
|
||||
if((node==null)||(node.getAttribute("fn")==null)) alert(_('Error')+"\n"+_('No_data')+"!\n"+xmlHttpRequest.responseText);
|
||||
if((node==null)||(node.getAttribute("fn")==null)) alert(trt('Error')+"\n"+trt('No_data')+"!\n"+xmlHttpRequest.responseText);
|
||||
else
|
||||
{
|
||||
//alert("XML=\n"+getXMLNodeSerialisation(node));
|
||||
@ -1006,7 +1006,7 @@ class TRequest
|
||||
}
|
||||
}else
|
||||
{
|
||||
if(confirm(_('Failed_to_get_data')+"\n URL: "+url+"\n"+xmlHttpRequest.statusText+"\nПовторить запрос?"))
|
||||
if(confirm(trt('Failed_to_get_data')+"\n URL: "+url+"\n"+xmlHttpRequest.statusText+"\nПовторить запрос?"))
|
||||
{
|
||||
this.callServer(url,xmlString);
|
||||
};
|
||||
|
||||
@ -151,18 +151,18 @@ function TMenu(v_obj,v_scr,v_treepath) //Горизонтальное меню
|
||||
//загрузился xml документ начинаем его разбирать (по id функции в документе)
|
||||
let xmldoc = xmlHttpRequest.responseXML;
|
||||
if(xmldoc==null){
|
||||
alert2(_('Alert'),_('Wrong_XML_document')+"!\n"+xmlHttpRequest.responseText);
|
||||
alert2(trt('Alert'),trt('Wrong_XML_document')+"!\n"+xmlHttpRequest.responseText);
|
||||
return;
|
||||
}
|
||||
let node = xmldoc.documentElement;
|
||||
//alert2(_('Alert'),"Данные=\n"+xmlHttpRequest.responseText);
|
||||
if((node==null)||(node.getAttribute("fn")==null)) alert2(_('Alert'),_('Error')+"\n"+_('No_data')+"!\n"+xmlHttpRequest.responseText);
|
||||
//alert2(trt('Alert'),"Данные=\n"+xmlHttpRequest.responseText);
|
||||
if((node==null)||(node.getAttribute("fn")==null)) alert2(trt('Alert'),trt('Error')+"\n"+trt('No_data')+"!\n"+xmlHttpRequest.responseText);
|
||||
else
|
||||
{
|
||||
var fn = node.getAttribute("fn");
|
||||
if (fn=='0')
|
||||
{
|
||||
alert2(_('Alert'),findFirstNode(node,"#cdata-section").nodeValue);
|
||||
alert2(trt('Alert'),findFirstNode(node,"#cdata-section").nodeValue);
|
||||
}else if (fn=='1')
|
||||
{
|
||||
var tn=this.findNode(node.getAttribute("htmlid")); //Родительский узел
|
||||
@ -183,11 +183,11 @@ function TMenu(v_obj,v_scr,v_treepath) //Горизонтальное меню
|
||||
var cnt=document.getElementById(this.m_pr+tn.htmlid+'tb');
|
||||
if(cnt!=null) this.createList(tn.htmlid); //Создать HTML кнопки
|
||||
}else
|
||||
alert2(_('Alert'),"Unknown function! fn=\""+fn+"\"" );
|
||||
alert2(trt('Alert'),"Unknown function! fn=\""+fn+"\"" );
|
||||
}
|
||||
}else
|
||||
{
|
||||
alert2(_('Alert'),_('Failed_to_get_data')+"\n URL: "+url+"\n" + xmlHttpRequest.statusText);
|
||||
alert2(trt('Alert'),trt('Failed_to_get_data')+"\n URL: "+url+"\n" + xmlHttpRequest.statusText);
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -549,7 +549,7 @@ function TMenu(v_obj,v_scr,v_treepath) //Горизонтальное меню
|
||||
|
||||
//Добавить слушателя нажатия на кнопку
|
||||
this.addListener=function(listener)
|
||||
{ if(listener.OnClickNode==null) alert2(_('Alert'),'У объекта нет функции "OnClickNode()"!');
|
||||
{ if(listener.OnClickNode==null) alert2(trt('Alert'),'У объекта нет функции "OnClickNode()"!');
|
||||
this.m_ls[this.m_ls.length]=listener;
|
||||
};
|
||||
//Удалить слушателя
|
||||
@ -651,28 +651,28 @@ function TTree(v_obj,v_pr,v_scr,v_pth,v_imgsize) //Дерево
|
||||
//загрузился xml документ начинаем его разбирать (по id функции в документе)
|
||||
let xmldoc = xmlHttpRequest.responseXML;
|
||||
if(xmldoc==null){
|
||||
alert2(_('Alert'),_('Wrong_XML_document')+"!\n"+xmlHttpRequest.responseText);
|
||||
alert2(trt('Alert'),trt('Wrong_XML_document')+"!\n"+xmlHttpRequest.responseText);
|
||||
return;
|
||||
}
|
||||
let node = xmldoc.documentElement;
|
||||
if((node==null)||(node.getAttribute("fn")==null)) alert2(_('Alert'),_('Error')+"\n"+_('No_data')+"!\n"+xmlHttpRequest.responseText);
|
||||
if((node==null)||(node.getAttribute("fn")==null)) alert2(trt('Alert'),trt('Error')+"\n"+trt('No_data')+"!\n"+xmlHttpRequest.responseText);
|
||||
else
|
||||
{
|
||||
var fn = node.getAttribute("fn");
|
||||
if (fn==0)
|
||||
{
|
||||
alert2(_('Alert'),findFirstNode(node,"#cdata-section").nodeValue);
|
||||
alert2(trt('Alert'),findFirstNode(node,"#cdata-section").nodeValue);
|
||||
}else
|
||||
if (fn==1)
|
||||
{
|
||||
this.addNode(node);
|
||||
this.OpenTreeOnPath(this.m_path);
|
||||
}else
|
||||
alert2(_('Alert'),"Unknown function! fn=\""+fn+"\"" );
|
||||
alert2(trt('Alert'),"Unknown function! fn=\""+fn+"\"" );
|
||||
}
|
||||
}else
|
||||
{
|
||||
alert2(_('Alert'),_('Failed_to_get_data')+"\n URL: "+url+"\n" + xmlHttpRequest.statusText);
|
||||
alert2(trt('Alert'),trt('Failed_to_get_data')+"\n URL: "+url+"\n" + xmlHttpRequest.statusText);
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -905,7 +905,7 @@ function TTree(v_obj,v_pr,v_scr,v_pth,v_imgsize) //Дерево
|
||||
|
||||
//Добавить слушателя
|
||||
this.addListener=function(listener)
|
||||
{ if(listener.OnClickNode==null) alert2(_('Alert'),'У объекта нет функции "OnClickNode()"!');
|
||||
{ if(listener.OnClickNode==null) alert2(trt('Alert'),'У объекта нет функции "OnClickNode()"!');
|
||||
this.m_ls[this.m_ls.length]=listener;
|
||||
};
|
||||
//Удалить слушателя
|
||||
@ -917,7 +917,7 @@ function TTree(v_obj,v_pr,v_scr,v_pth,v_imgsize) //Дерево
|
||||
};
|
||||
//Добавить слушателя
|
||||
this.addListenerLoad=function(listener)
|
||||
{ if(listener.OnLoadNode==null) alert2(_('Alert'),'У объекта нет функции "OnLoadNode(node)"!');
|
||||
{ if(listener.OnLoadNode==null) alert2(trt('Alert'),'У объекта нет функции "OnLoadNode(node)"!');
|
||||
this.m_lsl[this.m_lsl.length]=listener;
|
||||
};
|
||||
//Удалить слушателя
|
||||
|
||||
Reference in New Issue
Block a user