You are viewing limited content. For full access, please sign in.

Question

Question

How to remove or hide menu options and/or command bar actions in Web Access

asked on January 5, 2015

We're looking into how to customize Laserfiche Web Access on specific servers to not offer certain features (e.g. only allow access to the viewer page and prevent modifications, save, annotations etc.

We have come up with a set of stylesheets we can dynamically load at runtime to do that. This works ok if we can find an element using its id or CSS class, but for context menus (associated with right-click), the menu and items do not have and id or CSS class. Is there another way to remove items?

0 0

Replies

replied on January 5, 2015

Please refer to this Web Access help page that talks about custom context menus. It contains a link to a white paper on the Support Site which goes into more detail regarding how this can be accomplished.

0 0
replied on January 6, 2015

Thanks for the link. I looked at the documentation and the approach works great when you want to add / remove items unconditionally. The requirement I am trying to implement though is conditional hiding of items. At run time I need to execute a JS function which will hide/show specific menu items, e.g. when the context menu for a document viewer panel opens up.

Is there a way to plug in that conditional logic somewhere?

Or is there a way I can customize the JS code responsible for loading the context menu xml file? This way I could make a runtime decision to use one xml file versus another?

What would you recommend? 

0 0
replied on January 6, 2015

Web Access isn't really intended to be customized at that level. The examples you listed (saving, modifying, adding annotations) are all items that can be controlled through entry access rights. Is there a reason you can't do this through security setups? 

0 0
replied on January 6, 2015

I cannot use the basic access rights as it would affect the regular Laserfiche client.

We're trying to provide a very limited pilot of the Web Access with a lot of restricted functionality - but restricted only on the web access side. So we've modified the Index.aspx with some bootstrapping code in JS that loads our own modules, determines what should be restricted, and loads custom CSS with rules to hide many controls. But we still want the ability for some users (mainly IT) to have unrestricted use of Web Access. The approach is working so far except for the custom menus because they don't have an id or any CSS class allowing them to be targetted with a CSS rule. The alternative approach would be to hook-up into your JS code and wrap some of the functions opening up context menus so we could add our own conditional code there. Are there some specific functions I could take a look at in files like wa90.js? Or is there another way?

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.