Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #11064 (closed)

Opened 11 years ago

Closed 9 years ago

Last modified 9 years ago

Viewer opening in full size

Reported by: jburel Owned by: rkferguson
Priority: major Milestone: 5.x
Component: Web Version: 5.1.2
Keywords: n.a. Cc: jamoore, jrswedlow, rkferguson
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description

When opening the image displayed at http://www.lifesci.dundee.ac.uk/gre/staff/jason-swedlow
The viewer opened in full size. This should be adjust so it does not cover the main web page.

After discussion with Will, ticket assigned to him.

Change History (10)

comment:1 Changed 11 years ago by jburel

  • Sprint set to Blocker 4.4.9 (1)

comment:2 Changed 11 years ago by wmoore

  • Owner changed from wmoore to rkferguson

Gus, could you add these parameters to the javascript:

width=800, top=100, left=100, height=600,

So you'll have something like:

onclick="window.open(this.href, '', 'resizable=no,status=no,location=no, width=800, top=100, left=100, height=600, toolbar=no,menubar=no,fullscreen=no,scrollbars=no,dependent=no'); return false;"

comment:3 Changed 11 years ago by wmoore

Obviously you can adjust them to suit your preference ;)

comment:4 Changed 11 years ago by rkferguson

Jason and Will

Looking at the unchanged page on the lab web site as is:

  • in Safari if you click it opens in a new tab, but if you right-click the thumbnail and select > "open link in new window" the viewer opens in a new window which is appropriately sized to the image.
  • in Chrome and Firefox, if you just click on it or right click >New WIndow it opens in a new window the same size as the parent window.

So somehow Safari is picking up the dimensions of the full viewer and sizing appropriately.

If I add in the parameters to the Javascript as you suggested:

  • in Safari the same happens if you just click it opens in a new tab of the same size as the existing, if you right click you get the window sized to the parameters .
  • in Chrome and Firefox, clicking opens a new window sized according to the parameters.

If I add '_blank', into the javascript (without parameters):

  • Safari still opens it in a new tag or if right-clicked in a suitably resized window
  • in Chrome and Firefox it opens a new window but the size of the parent window.

In Windows 7 both IE9 and Firefox do the same as Firefox on the Mac.

What interests me is that Safari is somehow resizing the new window (on right-click select) to the image in the viewer without being passed parameters. This would appear to be the ideal as it would then be automatically determined for all images whereas parameters would have to be set according to the size of the image.

So it seems nothing we do in Safari will help, but it can be fixed for Chrome and Firefox.

I don't have editor permissions for the Lab page, so I will have to ask the CLS Helpdesk to do it.

I have put the various copies up at:

Original page:

http://users.openmicroscopy.org.uk/~rkferguson/jrs_gre_page.html

Using parameters in Javascript:

http://users.openmicroscopy.org.uk/~rkferguson/jrs_gre_page_p.html

Using '_blank' in Javascript:

http://users.openmicroscopy.org.uk/~rkferguson/jrs_gre_page_b.html


Please can you confirm that you want to have the parameters set individually for each image, and I will send the email, else we can try and work out how Safari is getting it right without the parameters.

comment:5 Changed 11 years ago by wmoore

Hi Gus, I find that http://users.openmicroscopy.org.uk/~rkferguson/jrs_gre_page_p.html works fine for me in Safari, Chrome and Firefox. I don't see any difference in the behaviours of the 3 browsers.
The parameters seem to be respected in all cases.

comment:6 Changed 11 years ago by rkferguson

Hi Will Yes the parameters are respected, but that means that every link has to be customised to the size of the image. Is there any way to get the other browsers to pick up the sizing appropriately when the parameters are not specifically set, as Safari appears to do automatically?

comment:7 Changed 11 years ago by wmoore

I've no idea what you're seeing in Safari. I can't imagine it's actually working out the right size for the window. There's no way to do this other than hand-editing the link javascript.

We could add code to the window itself to re-size once we've loaded some data, but that would look pretty terrible.

If we were using the OMERO.web framework, we could generate the right sizes in the javascript on the <a> link, but if you're just hand-coding the html then you're stuck with manually specifying them.

comment:8 Changed 11 years ago by rkferguson

Thanks Will. I will get the lab page done with parameters as you suggest.

comment:9 Changed 9 years ago by jburel

  • Resolution set to fixed
  • Status changed from new to closed
  • Version set to 5.1.2

comment:10 Changed 9 years ago by jburel

completed.

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.68421 sec.)

We're Hiring!