[PE] Show current hyperlink settings

This commit is contained in:
Julia Radzhabova 2020-03-17 10:54:47 +03:00
parent e826d8a8e1
commit c70db921eb

View file

@ -1357,23 +1357,31 @@ define([
text = me.api.can_AddHyperlink();
var _arr = [];
for (var i=0; i<me.api.getCountPages(); i++) {
_arr.push({
displayValue: i+1,
value: i
});
}
if (text !== false) {
var _arr = [];
for (var i=0; i<me.api.getCountPages(); i++) {
_arr.push({
displayValue: i+1,
value: i
props = new Asc.CHyperlinkProperty();
props.put_Text(text);
} else {
var selectedElements = me.api.getSelectedElements();
if (selectedElements && _.isArray(selectedElements)){
_.each(selectedElements, function(el, i) {
if (selectedElements[i].get_ObjectType() == Asc.c_oAscTypeSelectElement.Hyperlink)
props = selectedElements[i].get_ObjectValue();
});
}
}
if (props) {
win = new PE.Views.HyperlinkSettingsDialog({
api: me.api,
handler: handlerDlg,
slides: _arr
});
props = new Asc.CHyperlinkProperty();
props.put_Text(text);
win.show();
win.setSettings(props);
}