Content Management and Capture

Content Management and Capture

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  Hiding tabs in Properties Dialog

    Posted Thu February 17, 2022 11:07 AM

    Hi,

    Background: I have a folder search. When I click on properties on one of the search result item(Folder), I could see following tabs Properties, Security and Associate Entry Templates. Once I opened the Folder, it contains Documents.

    When I click on properties on one of the search result item(Document), I could see follows tabs Properties, Security, Versions, FoldersFileIn, ParentDocuments and Content Elements Pane.

    Requirement: I need to hide the tabs of Folder and Document except the tab Properties.

    What I have tried so far: I have tried below code.

    aspect.after(ecm.widget.dialog.EditPropertiesDialog.prototype, "show", function() {

    //Below are document properties tabs

    //folders filed in

    this._itemEditPane._itemFoldersFileInPane.controlButton.domNode.style.display = "none";

    //parent document pane

    this._itemEditPane._itemParentDocumentsPane.controlButton.domNode.style.display = "none";

    //content elements pane

    this._itemEditPane._itemContentElementsPane.controlButton.domNode.style.display = "none";

    //version selecor combo box

    // this._itemEditPane._versionSelectorPane.domNode.style.display = "none";

    //Below are folder properties tabs

    //secrurity pane

    this._itemEditPane._itemSecurityPane.controlButton.domNode.style.display = "none";

    //associate entry template pane

    this._itemEditPane._EntryTemplateFolderAssociationsPane.controlButton.domNode.style.display = "none";

    });

    Issue: It is hiding only document tabs but not Folder tabs.

    Note: If I change the order in the above code, that is first I put the code related to Folder followed by Document. The folder tabs are hidden but not Document tabs.

    Please suggest me how to hide both Folder and Document tabs.



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 2.  RE: Hiding tabs in Properties Dialog

    Posted Mon February 21, 2022 04:03 AM

    It looks like you're heading to the right direction, but with your issue, I suspect that you have some javascript errors that you might observe in the browser dev console.

    What I think might be a problem is that for the _EntryTemplateFolderAssociationsPane variable, it only exists for folders, and not documents. So what I'd like to suggest is that in this code, you should check to see if it exists before setting a display for it.

    For example:

    if (this._itemEditPane._EntryTemplateFolderAssociationsPane) {

    this._itemEditPane._EntryTemplateFolderAssociationsPane.controlButton.domNode.style.display = "none";

    }

    And do the checking for all other panes as well to avoid javascript errors.

    And you might find that you may need to hide some other tabs as well. For example:

    if (this._itemEditPane._itemCommentsPane)

    this._itemEditPane._itemCommentsPane.controlButton.domNode.style.display = "none";

    if (this._itemEditPane._itemNotelogsPane) this._itemEditPane._itemNotelogsPane.controlButton.domNode.style.display = "none";

    if (this._itemEditPane._itemVersionsPane) this._itemEditPane._itemVersionsPane.controlButton.domNode.style.display = "none";

    Hope that this helps.

    Lauren



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 3.  RE: Hiding tabs in Properties Dialog

    Posted Mon February 21, 2022 04:07 PM

    Hi,

    You are correct. This check solved the issue. Thank you.



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration