Page 1 of 1

Is there any guideline about how to edit iViewer's menu?

PostPosted: Mon Sep 17, 2018 10:04 am
by Kouichi_C_Nakamura
Is there any guideline about how to edit iViewer's menu?

In particular, I'd like to add menu items to jump to another URL for Help. Can anybody suggest what to edit? I mean in the source code it is written in simple HTML, but how can we tweak it in the giant OMERO software?

Code: Select all
<div class="dropdown">
  <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">Help <span class="caret"></span>
  </button>
  <ul class="dropdown-menu">
    <li click.delegate="showAbout()" class="au-target" au-target-id="22"> <a href="#">About OMERO.iviewer</a>
  </li>
    <li> <a target="_blank" href="https://github.com/ome/omero-iviewer"> OMERO.iviewer on Github </a>
    </li>
  </ul>
</div>


Even if there is a way to edit it, that change will be lost every time I update OMERO. Do you have any suggestion to deal with this?

Re: Is there any guideline about how to edit iViewer's menu?

PostPosted: Tue Sep 18, 2018 11:25 am
by wmoore
Hi,

We don't have any configuration options for setting those menu items.

The source code for that is https://github.com/ome/omero-iviewer/bl ... eader.html.
However, when you build the app, this is compiled into omero_iviewer/static/omero_iviewer/main.js.

So, if you want to edit this options in the source code, you'll need to then build the app as described at https://github.com/ome/omero-iviewer/#build.

The OMERO.iviewer is released separately from the main OMERO.server + OMERO.web, so you can update the OMERO.server without losing your changes to iviewer. However, if you want to upgrade iviewer, you'll need to re-checkout the latest version and apply your changes to that too.
If your changes are under a single git commit, it should be easy to cherry-pick the same commit onto the latest version of iviewer.
Let us know if you need help with this.

Regards,

Will.

Re: Is there any guideline about how to edit iViewer's menu?

PostPosted: Tue Sep 18, 2018 12:16 pm
by Kouichi_C_Nakamura
I knew the HTML is generated programmatically and thought it might be tricky to edit it. Thank you for the guidance. Indeed, if we can keep using git cherry-pick , it may be manageable.