* [task#139076] only show moreItems on zentaopms.

This commit is contained in:
dingyongliang
2025-03-10 16:18:17 +08:00
committed by 孙浩
parent a6b2888e1e
commit 9d18971e60
+6 -2
View File
@@ -744,6 +744,10 @@ function importFileToEditor(type, options)
});
}
function isOpenVersion(version) {
return /^\d/.test(version || $('#zuiCSS').attr('href').split('?v=').pop());
}
/**
* 定义文档各个试图和 UI 元素的上的操作方法。
* Define the operation methods on the views and UI elements of the doc.
@@ -847,7 +851,7 @@ const actionsMap =
}
}
const docApp = this;
const isOpen = /^\d/.test(config.version || $('#zuiCSS').attr('href').split('?v=').pop());
const isOpen = isOpenVersion(config.version);
if(!isOpen && docApp && docApp.mode === 'view' && doc.status != 'draft' && !doc.api)
{
moreItems.push({icon: 'link', text: getLang('relateObject'), className: 'relateObject-btn', command: 'toggleViewSideTab/relateObject'})
@@ -1043,7 +1047,7 @@ const actionsMap =
}
const moreItems = [];
if((doc.contentType === 'doc' || doc.contentType === 'markdown') && !isApiDoc(doc))
if(isOpenVersion() && (doc.contentType === 'doc' || doc.contentType === 'markdown') && !isApiDoc(doc))
{
if(config.debug > 5) moreItems.push({text: lang.importConfluence, command: 'importFile/confluence'});
moreItems.push(