[SSE mobile] Bug 49779
This commit is contained in:
parent
b8004facae
commit
9c6a685bf5
|
@ -23,24 +23,15 @@ class EditLinkController extends Component {
|
|||
|
||||
let items = [];
|
||||
let wsc = api.asc_getWorksheetsCount();
|
||||
// const aws = api.asc_getActiveWorksheetIndex();
|
||||
|
||||
if (wsc > 0) {
|
||||
items = [];
|
||||
while ( !(--wsc < 0) ) {
|
||||
if ( !api.asc_isWorksheetHidden(wsc) ) {
|
||||
while (!(--wsc < 0)) {
|
||||
if (!api.asc_isWorksheetHidden(wsc)) {
|
||||
items.unshift({
|
||||
value: wsc,
|
||||
caption: api.asc_getWorksheetName(wsc)
|
||||
});
|
||||
|
||||
console.log(api.asc_getWorksheetName(wsc))
|
||||
// if (wsc === aws) {
|
||||
// this.activeSheet = {
|
||||
// value: wsc,
|
||||
// caption: api.asc_getWorksheetName(wsc)
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
this.sheets = items;
|
||||
|
@ -105,7 +96,7 @@ class EditLinkController extends Component {
|
|||
defaultDisplay = url;
|
||||
}
|
||||
|
||||
if (args.isLock) {
|
||||
if (this.isLock) {
|
||||
linkProps.asc_setText(null);
|
||||
} else {
|
||||
if (!displayText) {
|
||||
|
@ -133,7 +124,6 @@ class EditLinkController extends Component {
|
|||
linkInfo={this.linkInfo}
|
||||
isLock={this.isLock}
|
||||
sheets={this.sheets}
|
||||
// activeSheet={this.activeSheet}
|
||||
currentSheet={this.currentSheet}
|
||||
onEditLink={this.onEditLink}
|
||||
onRemoveLink={this.onRemoveLink}
|
||||
|
|
|
@ -81,17 +81,12 @@ const EditLink = props => {
|
|||
const isLock = props.isLock;
|
||||
const sheets = props.sheets;
|
||||
const currentSheet = props.currentSheet;
|
||||
const valueTypeLink = linkInfo.asc_getType();
|
||||
const valueLinkSheet = linkInfo.asc_getSheet();
|
||||
const getLinkSheet = () => sheets.find(sheet => sheet.caption === valueLinkSheet);
|
||||
const linkSheet = (valueTypeLink == Asc.c_oAscHyperlinkType.RangeLink) ? getLinkSheet() ? getLinkSheet().caption : '' : currentSheet;
|
||||
|
||||
console.log(linkInfo);
|
||||
|
||||
const valueLinkInfo = linkInfo.asc_getType();
|
||||
const linkSheet = (valueLinkInfo == Asc.c_oAscHyperlinkType.RangeLink) ? linkInfo.asc_getSheet() : currentSheet;
|
||||
|
||||
console.log(valueLinkInfo);
|
||||
console.log(currentSheet);
|
||||
console.log(linkSheet);
|
||||
|
||||
const [typeLink, setTypeLink] = useState(valueLinkInfo);
|
||||
const [typeLink, setTypeLink] = useState(valueTypeLink);
|
||||
const textType = typeLink != Asc.c_oAscHyperlinkType.RangeLink ? _t.textExternalLink : _t.textInternalDataRange;
|
||||
|
||||
const changeType = (newType) => {
|
||||
|
@ -164,10 +159,10 @@ const EditLink = props => {
|
|||
</List>
|
||||
<List>
|
||||
<ListButton title={_t.textEditLink}
|
||||
className={`button-fill button-raised${(typeLink === 'ext' && link.length < 1 || typeLink === 'int' && range.length < 1) && ' disabled'}`}
|
||||
className={`button-fill button-raised${(typeLink === 'ext' && link.length < 1 || typeLink === 'int' || range.length < 1 || !curSheet.length) && ' disabled'}`}
|
||||
onClick={() => {props.onEditLink(typeLink === 1 ?
|
||||
{type: 1, url: link, text: stateDisplayText, tooltip: screenTip, isLock} :
|
||||
{type: 2, url: range, sheet: curSheet, text: stateDisplayText, tooltip: screenTip, isLock})}}
|
||||
{type: 1, url: link, text: stateDisplayText, tooltip: screenTip} :
|
||||
{type: 2, url: range, sheet: curSheet, text: stateDisplayText, tooltip: screenTip})}}
|
||||
/>
|
||||
<ListButton title={_t.textRemoveLink}
|
||||
className={`button-fill button-red`}
|
||||
|
|
Loading…
Reference in a new issue