Show hyperlink pop-up on cell selection
Change-Id: I59f3301bd94c4d898ec2ff82fd91d3c611122d3a Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86651 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com>
This commit is contained in:
parent
1cf5bde981
commit
7b94981b7d
1 changed files with 23 additions and 0 deletions
|
@ -2843,6 +2843,29 @@ L.TileLayer = L.GridLayer.extend({
|
|||
this._map.removeLayer(this._cellCursorMarker);
|
||||
}
|
||||
this._removeDropDownMarker();
|
||||
|
||||
//hyperlink pop-up from here
|
||||
if (this._lastFormula && this._cellCursorMarker && this._lastFormula.substring(1, 10) == 'HYPERLINK')
|
||||
{
|
||||
var formula = this._lastFormula;
|
||||
var targetURL = formula.substring(11, formula.length - 1).split(',')[0];
|
||||
targetURL = targetURL.split('"').join('');
|
||||
targetURL = this._map.makeURLFromStr(targetURL);
|
||||
|
||||
this._map.closePopup(this._map.hyperlinkPopup);
|
||||
this._map.hyperlinkPopup = null;
|
||||
if (targetURL) {
|
||||
this._map.hyperlinkPopup = new L.Popup({className: 'hyperlink-popup', closeButton: false, closeOnClick: false})
|
||||
.setContent('<a href="' + targetURL + '" target="_blank">' + targetURL + '</a>')
|
||||
.setLatLng(this._cellCursorMarker._bounds._northEast)
|
||||
.openOn(this._map);
|
||||
}
|
||||
|
||||
}
|
||||
else if (this._map.hyperlinkPopup)
|
||||
{
|
||||
this._map.closePopup(this._map.hyperlinkPopup);
|
||||
}
|
||||
},
|
||||
|
||||
_onValidityListButtonMsg: function(textMsg) {
|
||||
|
|
Loading…
Reference in a new issue