We're Hiring!

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

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

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

Postby Kouichi_C_Nakamura » Mon Sep 17, 2018 10:04 am

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?
Attachments
1479966123-Screenshot2.png
1479966123-Screenshot2.png (12.8 KiB) Viewed 882 times
Kouichi_C_Nakamura
 
Posts: 165
Joined: Thu Oct 19, 2017 1:35 pm

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

Postby wmoore » Tue Sep 18, 2018 11:25 am

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.
User avatar
wmoore
Team Member
 
Posts: 674
Joined: Mon May 18, 2009 12:46 pm

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

Postby Kouichi_C_Nakamura » Tue Sep 18, 2018 12:16 pm

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.
Kouichi_C_Nakamura
 
Posts: 165
Joined: Thu Oct 19, 2017 1:35 pm


Return to Developer Discussion

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron