Skip to content

Commit

Permalink
[se] By bug 50263
Browse files Browse the repository at this point in the history
  • Loading branch information
GoshaZotov committed Sep 1, 2023
1 parent a5b96a7 commit d52d617
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
7 changes: 5 additions & 2 deletions cell/model/WorkbookElems.js
Original file line number Diff line number Diff line change
Expand Up @@ -6122,7 +6122,10 @@ StyleManager.prototype =
return this.bVisited;
};
Hyperlink.prototype.getHyperlinkType = function () {
var res = null;
return null !== this.Hyperlink ? Asc.c_oAscHyperlinkType.WebLink : Asc.c_oAscHyperlinkType.RangeLink;

//for local file
/*var res = null;
if (null !== this.Hyperlink) {
//либо гиперссылка, либо ссылка на локальный файл(отдельное поле не стал заводить, все будет в Hyperlink)
if (XRegExp.exec(this.Hyperlink, new XRegExp("([a-zA-Z]:)?(\\\\[a-zA-Z0-9_.-]+)+\\\\?"))) {
Expand All @@ -6131,7 +6134,7 @@ StyleManager.prototype =
res = Asc.c_oAscHyperlinkType.WebLink;
}
}
return null !== res ? res : Asc.c_oAscHyperlinkType.RangeLink;
return null !== res ? res : Asc.c_oAscHyperlinkType.RangeLink;*/
};
Hyperlink.prototype.getType = function () {
return UndoRedoDataTypes.Hyperlink;
Expand Down
16 changes: 8 additions & 8 deletions cell/view/WorkbookView.js
Original file line number Diff line number Diff line change
Expand Up @@ -1428,14 +1428,14 @@
this.handlers.trigger("asc_onHideComment");
this.Api._asc_setWorksheetRange(ct.hyperlink);
break;
case Asc.c_oAscHyperlinkType.FileLink:
//нужно открыть файл через диалоговое окно
this.handlers.trigger("asc_onConfirmAction", Asc.c_oAscConfirm.ConfirmFileOpen, function (can) {
if (can) {
t.handlers.trigger("asc_onFileOpenClick", ct.hyperlink.asc_getHyperlinkUrl());
}
});
break;
case Asc.c_oAscHyperlinkType.FileLink:
//нужно открыть файл через диалоговое окно
this.handlers.trigger("asc_onConfirmAction", Asc.c_oAscConfirm.ConfirmFileOpen, function (can) {
if (can) {
t.handlers.trigger("asc_onFileOpenClick", ct.hyperlink.asc_getHyperlinkUrl());
}
});
break;
}
}
}
Expand Down

0 comments on commit d52d617

Please sign in to comment.