Commit b9efdc6c authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

http://bugzserver/show_bug.cgi?id=25151 - Ошибка в консоли после вставки...

http://bugzserver/show_bug.cgi?id=25151 - Ошибка в консоли после вставки гиперссылки в заголовок диаграммы и клику по ней

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57450 954022d7-b5bf-4e40-9824-e11837661b57
parent a5774aea
......@@ -1670,6 +1670,13 @@
if(onlyFromLocalStorage)
node = this.lStorage.htmlInShape ? this.lStorage.htmlInShape : this.lStorage;
//если находимся внутри диаграммы убираем ссылки
if(targetDocContent && targetDocContent.Parent && targetDocContent.Parent.parent && targetDocContent.Parent.parent.chart)
{
var changeTag = $(node).find("a");
this._changeHtmlTag(changeTag);
};
oPasteProcessor._Prepeare_recursive(node, true, true);
oPasteProcessor.aContent = [];
......@@ -1697,6 +1704,31 @@
return true;
},
//TODO сделать при получаении структуры. игнорировать размер шрифта и тп
_changeHtmlTag: function(arr)
{
var oldElem, value, style, bold, underline, italic;
for(var i = 0; i < arr.length; i++)
{
oldElem = arr[i];
value = oldElem.innerText;
underline = "none";
if(oldElem.style.textDecoration && oldElem.style.textDecoration != "")
underline = oldElem.style.textDecoration;
italic = "normal";
if(oldElem.style.textDecoration && oldElem.style.textDecoration != "")
italic = oldElem.style.fontStyle;
bold = "normal";
if(oldElem.style.fontWeight && oldElem.style.fontWeight != "")
bold = oldElem.style.fontWeight;
style = ' style = "text-decoration:' + underline + ";" + "font-style:" + italic + ";" + "font-weight:" + bold + ";" + '"';
$(oldElem).replaceWith("<span" + style + ">" + value + "</span>");
};
},
_convertFonts: function(oFonts)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment