Merge branch 'master' of http://git.dirt.kz/igor/Metadata_PHP
This commit is contained in:
@ -50,9 +50,9 @@ String.prototype.stripTags = function() {
|
||||
};
|
||||
|
||||
//Показать прогрес бар
|
||||
function showProgressBar(obj,img)
|
||||
function showProgressBar(obj,img_id)
|
||||
{
|
||||
if(img === undefined) img='';
|
||||
if(img_id === undefined) img_id='';
|
||||
|
||||
if (typeof obj === 'string' || obj instanceof String)
|
||||
obj=document.getElementById(obj);
|
||||
@ -61,7 +61,7 @@ function showProgressBar(obj,img)
|
||||
let pBarDiv=document.createElement('div');
|
||||
pBarDiv.id=obj.id+'_pBar';
|
||||
pBarDiv.style.cssText='position: absolute; left: 0px; top: 0px; z-index: 1; background-color: rgba(0,0,0,0.5); width:100%; height: 100%;';
|
||||
pBarDiv.innerHTML='<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"><tr><td align="center" style="vertical-align: middle;"><img src="../resources/metadata/dbms/images/loading'+img+'.gif" alt=""></td></tr></table>';
|
||||
pBarDiv.innerHTML='<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"><tr><td align="center" style="vertical-align: middle;"><img src="../resources/metadata/dbms/images/loading'+img_id+'.gif" alt=""></td></tr></table>';
|
||||
obj.appendChild(pBarDiv);
|
||||
};
|
||||
|
||||
@ -617,7 +617,9 @@ function findNodeOnAttribute(node, nodename,Attribute,val)
|
||||
var n = node.firstChild;
|
||||
while (n != null)
|
||||
{
|
||||
if((n.nodeName.toLowerCase()==nodename.toLowerCase())&&(n.getAttribute(Attribute)==val)) return n;
|
||||
if((n.nodeName.toLowerCase()==nodename.toLowerCase())&&(n.getAttribute(Attribute)==val)) {
|
||||
return n;
|
||||
}
|
||||
n=n.nextSibling;
|
||||
}
|
||||
return null;
|
||||
@ -800,15 +802,15 @@ function applyNodeToNode(first, second, name)
|
||||
var fn=first.firstChild;
|
||||
while (fn !== null)
|
||||
{
|
||||
//alert("child="+fn.nodeName+" = "+getXMLNodeSerialisation(fn));
|
||||
//alert(name+" "+fn.getAttribute("n"));
|
||||
var sn=null;
|
||||
if(fn.nodeName!=="#text" && fn.nodeName!=="#cdata-section" && fn.nodeName!=="#comment") //потому что для этих getAttribute вызывает ошибку
|
||||
if(fn.nodeName!=="#text" && fn.nodeName!=="#cdata-section" && fn.nodeName!=="#comment"){ //потому что для этих getAttribute вызывает ошибку
|
||||
sn=findNodeOnAttribute(second,fn.nodeName,name,fn.getAttribute(name));
|
||||
}
|
||||
|
||||
if(sn!==null) //Если по имени атрибуту совпали узлы
|
||||
{
|
||||
//Переписываем значения атрибутов из первого второму, если их нет то создаём.
|
||||
//Переписываем значения атрибутов из первого второму, если их нет то создаются автоматом
|
||||
for(i=0;i<fn.attributes.length;i++)
|
||||
{ sn.setAttribute(fn.attributes[i].nodeName,fn.attributes[i].value);
|
||||
}
|
||||
@ -821,11 +823,10 @@ function applyNodeToNode(first, second, name)
|
||||
{
|
||||
getCdata(second).nodeValue = fn.nodeValue;
|
||||
}else
|
||||
{
|
||||
{
|
||||
second.appendChild(fn.cloneNode(true));
|
||||
}
|
||||
}
|
||||
|
||||
fn=fn.nextSibling;
|
||||
}
|
||||
}
|
||||
@ -900,7 +901,7 @@ class TRequest
|
||||
if((node==null)||(node.getAttribute("fn")==null)) alert(_('Error')+"\n"+_('No_data')+"!\n"+xmlHttpRequest.responseText);
|
||||
else
|
||||
{
|
||||
//alert("Принятый браузером XML=\n"+getXMLNodeSerialisation(node));
|
||||
//alert("XML=\n"+getXMLNodeSerialisation(node));
|
||||
var fn = node.getAttribute("fn");
|
||||
if(this.winObj!=null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user