Fixed the visibility of the Convert to DocX button so that it is not visible for Library Documents, Automatic Table of Contents or Step Sections.
This commit is contained in:
parent
b4d867a517
commit
ebbc57e5bb
@ -488,6 +488,7 @@ namespace VEPROMS
|
||||
bool sav_Initializing = _Initializing;
|
||||
_Initializing = true;
|
||||
bool isLib = false;
|
||||
// Only show the Convert To DocX button for non-library MS Word Sections
|
||||
if (_SectionConfig.MySection.MyContent.MyEntry!=null && _SectionConfig.MySection.MyContent.MyEntry.MyDocument!=null && (_SectionConfig.MySection.MyContent.MyEntry.MyDocument.LibTitle != null) && (_SectionConfig.MySection.MyContent.MyEntry.MyDocument.LibTitle != "")) isLib = true;
|
||||
if (isLib)
|
||||
{
|
||||
@ -499,8 +500,13 @@ namespace VEPROMS
|
||||
}
|
||||
else
|
||||
{
|
||||
// Only show the Convert To DocX button for RTF MS Word Sections
|
||||
if (_SectionConfig.MySection.MyContent.MyEntry.MyDocument != null && _SectionConfig.MySection.MyContent.MyEntry.MyDocument.FileExtension == ".RTF")
|
||||
this.ppBtnConvertToDocX.Visible = true; // Only allow save as DocX for normal word sections when the exissting text is RTF.
|
||||
{
|
||||
ItemInfo ii = ItemInfo.Get(_SectionConfig.MySection.ItemID);
|
||||
if (!ii.IsAutoTOCSection) // Only show the Convert To DocX button for non-Auto Table Of Contents Section
|
||||
this.ppBtnConvertToDocX.Visible = true; // Only allow save as DocX for normal word sections when the existing text is RTF.
|
||||
}
|
||||
else
|
||||
this.ppBtnConvertToDocX.Visible = false;
|
||||
if (_SectionConfig.MySection.MyContent.MyEntry.MyDocument == null)
|
||||
@ -624,9 +630,10 @@ namespace VEPROMS
|
||||
ppCmbxStyleSectionType.DataSource = newDocStyles;
|
||||
ppCmbxStyleSectionType.SelectedIndex = selindx;
|
||||
ppCmbxStyleSectionType.Refresh();
|
||||
ppBtnConvertToDocX.Visible = false;// Set the Convert To DocX button to invisible by default
|
||||
|
||||
if (!_isStepSection)
|
||||
ppCmbxLibDocFill();
|
||||
ppCmbxLibDocFill(); // set the Convert To DocX button to Visible if appropriate
|
||||
_Initializing = myInit;
|
||||
if (_isStepSection)
|
||||
SetupCheckoffsDropdowns();
|
||||
|
Loading…
x
Reference in New Issue
Block a user