Skip to main content
The 2024 Developer Survey results are live! See the results
added 18 characters in body
Source Link
m4gic
  • 1.5k
  • 12
  • 21

Although this is an old question, an answer can be useful for someone.

The simplest way to do this - if you would like to remove it permanently - is to copy the containing menu and remove the menuitem you would like to hide, then replace the OOTB menu in desktop configuration with your custom one.

The other way is to create a Content Navigator plugin and you can create your custom action (menuitem) that does the exactly same thing that the menuitem you would like to control. When you install your plugin, your new action(menuitem) will be available in the menuitem list in the menu configuration. The next step is the same as you can see above: copy the OOTB menu, create a custom menu, then remove the original menuitem and replace with your custom one, then replace the OOTB menu with your custom menu.

There is an official github repo with sample plugins to find some ideas in this topic.

For example, in this custom CheckinActionCheckinAction the author would like to enable the checkin of the document only if the item (the document) is not locked, the DSSignatureStatus property is true and there are some other conditions in the superclass (e.g. the item is a Document, there is no checkin on Folder):

    /**
     * Returns true if this action should be enabled for the given repository, list type, and items.
     */
    isEnabled: function(repository, listType, items, teamspace, resultSet) 
    {
        var enabled = this.inherited(arguments);
        
        if(!items || items.length != 1){
            return false;
        };
        if(items[0].attributes && items[0].attributes.DSSignatureStatus == 3 && !items[0].locked) {
            return (enabled && true);
        }
        return false;
    },

    /**
     * Returns true if this action should be visible for the given repository and list type.
     */
    isVisible: function(repository, listType) 
    {
        return this.inherited(arguments);
    }

As you can see here, you can influence the visiblility too, you can decide to put your logic to the isVisible function if you would like to hide the menu, not just disable it.

Although this is an old question, an answer can be useful for someone.

The simplest way to do this - if you would like to remove it permanently - is to copy the containing menu and remove the menuitem you would like to hide, then replace the OOTB menu in desktop configuration with your custom one.

The other way is to create a Content Navigator plugin and you can create your custom action (menuitem) that does the exactly same thing that the menuitem you would like to control. When you install your plugin, your new action(menuitem) will be available in the menuitem list in the menu configuration. The next step is the same as you can see above: copy the OOTB menu, create a custom menu, then remove the original menuitem and replace with your custom one, then replace the OOTB menu with your custom menu.

There is an official github repo with sample plugins to find some ideas in this topic.

For example, in this custom CheckinAction the author would like to enable the checkin of the document only if the item (the document) is not locked, the DSSignatureStatus property is true and there are some other conditions in the superclass (e.g. the item is a Document, there is no checkin on Folder):

    /**
     * Returns true if this action should be enabled for the given repository, list type, and items.
     */
    isEnabled: function(repository, listType, items, teamspace, resultSet) 
    {
        var enabled = this.inherited(arguments);
        
        if(!items || items.length != 1){
            return false;
        };
        if(items[0].attributes && items[0].attributes.DSSignatureStatus == 3 && !items[0].locked) {
            return (enabled && true);
        }
        return false;
    },

    /**
     * Returns true if this action should be visible for the given repository and list type.
     */
    isVisible: function(repository, listType) 
    {
        return this.inherited(arguments);
    }

As you can see here, you can influence the visiblility too, you can decide to put your logic to the isVisible function if you would like to hide the menu, not just disable it.

Although this is an old question, an answer can be useful for someone.

The simplest way to do this - if you would like to remove it permanently - is to copy the containing menu and remove the menuitem you would like to hide, then replace the OOTB menu in desktop configuration with your custom one.

The other way is to create a Content Navigator plugin and you can create your custom action (menuitem) that does the exactly same thing that the menuitem you would like to control. When you install your plugin, your new action(menuitem) will be available in the menuitem list in the menu configuration. The next step is the same as you can see above: copy the OOTB menu, create a custom menu, then remove the original menuitem and replace with your custom one, then replace the OOTB menu with your custom menu.

There is an official github repo with sample plugins to find some ideas in this topic.

For example, in this custom CheckinAction the author would like to enable the checkin of the document only if the item (the document) is not locked, the DSSignatureStatus property is true and there are some other conditions in the superclass (e.g. the item is a Document, there is no checkin on Folder):

    /**
     * Returns true if this action should be enabled for the given repository, list type, and items.
     */
    isEnabled: function(repository, listType, items, teamspace, resultSet) 
    {
        var enabled = this.inherited(arguments);
        
        if(!items || items.length != 1){
            return false;
        };
        if(items[0].attributes && items[0].attributes.DSSignatureStatus == 3 && !items[0].locked) {
            return (enabled && true);
        }
        return false;
    },

    /**
     * Returns true if this action should be visible for the given repository and list type.
     */
    isVisible: function(repository, listType) 
    {
        return this.inherited(arguments);
    }

As you can see here, you can influence the visiblility too, you can decide to put your logic to the isVisible function if you would like to hide the menu, not just disable it.

Source Link
m4gic
  • 1.5k
  • 12
  • 21

Although this is an old question, an answer can be useful for someone.

The simplest way to do this - if you would like to remove it permanently - is to copy the containing menu and remove the menuitem you would like to hide, then replace the OOTB menu in desktop configuration with your custom one.

The other way is to create a Content Navigator plugin and you can create your custom action (menuitem) that does the exactly same thing that the menuitem you would like to control. When you install your plugin, your new action(menuitem) will be available in the menuitem list in the menu configuration. The next step is the same as you can see above: copy the OOTB menu, create a custom menu, then remove the original menuitem and replace with your custom one, then replace the OOTB menu with your custom menu.

There is an official github repo with sample plugins to find some ideas in this topic.

For example, in this custom CheckinAction the author would like to enable the checkin of the document only if the item (the document) is not locked, the DSSignatureStatus property is true and there are some other conditions in the superclass (e.g. the item is a Document, there is no checkin on Folder):

    /**
     * Returns true if this action should be enabled for the given repository, list type, and items.
     */
    isEnabled: function(repository, listType, items, teamspace, resultSet) 
    {
        var enabled = this.inherited(arguments);
        
        if(!items || items.length != 1){
            return false;
        };
        if(items[0].attributes && items[0].attributes.DSSignatureStatus == 3 && !items[0].locked) {
            return (enabled && true);
        }
        return false;
    },

    /**
     * Returns true if this action should be visible for the given repository and list type.
     */
    isVisible: function(repository, listType) 
    {
        return this.inherited(arguments);
    }

As you can see here, you can influence the visiblility too, you can decide to put your logic to the isVisible function if you would like to hide the menu, not just disable it.