[SSE] Fix internal links

This commit is contained in:
Julia Radzhabova 2020-03-16 13:30:51 +03:00
parent 94633cce20
commit e6c0127698
3 changed files with 24 additions and 22 deletions

View file

@ -513,9 +513,7 @@ define([
items = []; items = [];
while (++i < wc) { while (++i < wc) {
if (!this.api.asc_isWorksheetHidden(i)) { items.push({name: me.api.asc_getWorksheetName(i), hidden: me.api.asc_isWorksheetHidden(i)});
items.push(me.api.asc_getWorksheetName(i));
}
} }
var handlerDlg = function(dlg, result) { var handlerDlg = function(dlg, result) {

View file

@ -880,9 +880,7 @@ define([
items = []; items = [];
while (++i < wc) { while (++i < wc) {
if (!this.api.asc_isWorksheetHidden(i)) { items.push({name: me.api.asc_getWorksheetName(i), hidden: me.api.asc_isWorksheetHidden(i)});
items.push(me.api.asc_getWorksheetName(i));
}
} }
var handlerDlg = function(dlg, result) { var handlerDlg = function(dlg, result) {

View file

@ -64,7 +64,7 @@ define([
}, options || {}); }, options || {});
this.template = [ this.template = [
'<div class="box" style="height: 290px;">', '<div class="box" style="height: 313px;">',
'<div class="input-row" style="margin-bottom: 10px;">', '<div class="input-row" style="margin-bottom: 10px;">',
'<button type="button" class="btn btn-text-default auto" id="id-dlg-hyperlink-external" style="border-top-right-radius: 0;border-bottom-right-radius: 0;">', this.textExternalLink,'</button>', '<button type="button" class="btn btn-text-default auto" id="id-dlg-hyperlink-external" style="border-top-right-radius: 0;border-bottom-right-radius: 0;">', this.textExternalLink,'</button>',
'<button type="button" class="btn btn-text-default auto" id="id-dlg-hyperlink-internal" style="border-top-left-radius: 0;border-bottom-left-radius: 0;">', this.textInternalLink,'</button>', '<button type="button" class="btn btn-text-default auto" id="id-dlg-hyperlink-internal" style="border-top-left-radius: 0;border-bottom-left-radius: 0;">', this.textInternalLink,'</button>',
@ -76,11 +76,14 @@ define([
'<div id="id-dlg-hyperlink-url" class="input-row" style="margin-bottom: 5px;"></div>', '<div id="id-dlg-hyperlink-url" class="input-row" style="margin-bottom: 5px;"></div>',
'</div>', '</div>',
'<div id="id-internal-link" class="hidden">', '<div id="id-internal-link" class="hidden">',
'<div class="input-row">',
'<label>' + this.strLinkTo + '</label>',
'</div>',
'<div id="id-dlg-hyperlink-list" style="width:100%; height: 115px;border: 1px solid #cfcfcf;"></div>',
'<div class="input-row">', '<div class="input-row">',
'<label>' + this.strRange + '</label>', '<label>' + this.strRange + '</label>',
'</div>', '</div>',
'<div id="id-dlg-hyperlink-range" class="input-row" style="margin-bottom: 5px;"></div>', '<div id="id-dlg-hyperlink-range" class="input-row" style="margin-bottom: 5px;"></div>',
'<div id="id-dlg-hyperlink-list" style="width:100%; height: 115px;border: 1px solid #cfcfcf;"></div>',
'</div>', '</div>',
'<div class="input-row">', '<div class="input-row">',
'<label>' + this.strDisplay + '</label>', '<label>' + this.strDisplay + '</label>',
@ -349,8 +352,8 @@ define([
hasSubItems: true hasSubItems: true
})); }));
for (var i=0; i<count; i++) { for (var i=0; i<count; i++) {
arr.push(new Common.UI.TreeViewModel({ !sheets[i].hidden && arr.push(new Common.UI.TreeViewModel({
name : sheets[i], name : sheets[i].name,
level: 1, level: 1,
index: i+1, index: i+1,
type: 0, // sheet type: 0, // sheet
@ -373,18 +376,21 @@ define([
prev_level = 0; prev_level = 0;
count = ranges.length; count = ranges.length;
for (var i=0; i<count; i++) { for (var i=0; i<count; i++) {
var range = ranges[i]; var range = ranges[i],
if (prev_level<1) scope = range.asc_getScope();
arr[arr.length-1].set('hasSubItems', true); if (!range.asc_getIsHidden()) {
arr.push(new Common.UI.TreeViewModel({ if (prev_level<1)
name : range.asc_getName(), arr[arr.length-1].set('hasSubItems', true);
level: 1, arr.push(new Common.UI.TreeViewModel({
index: arr.length, name : (range.asc_getIsXlnm() && sheets[scope] ? sheets[scope].name + '!' : '') + range.asc_getName(), // add sheet name for print area
type: 1, // defined name level: 1,
isVisible: false, index: arr.length,
hasParent: true type: 1, // defined name
})); isVisible: false,
prev_level = 1; hasParent: true
}));
prev_level = 1;
}
} }
store.reset(arr); store.reset(arr);
var sheet = props ? (props.asc_getSheet() || props.asc_getLocation()) : this.settings.currentSheet, var sheet = props ? (props.asc_getSheet() || props.asc_getLocation()) : this.settings.currentSheet,