Modify

Opened 5 years ago

Last modified 19 months ago

#5742 new enhancement

Allow Iframe to occupy more of the window

Reported by: rjollos Owned by: rjollos
Priority: normal Component: TracTabPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

It would be nice if the Iframe occupied slightly more of the window. You can see an example in my attached screen shot.

Attachments (2)

IframeExample.png (104.5 KB) - added by rjollos 5 years ago.
tractabplugin.patch (1.0 KB) - added by sebasbaumh 22 months ago.
Patch for a dynamically sizing IFrame

Download all attachments as: .zip

Change History (13)

Changed 5 years ago by rjollos

comment:1 Changed 5 years ago by bobbysmith007

that is what the height drop down is for.

I do not use this plugin any more, however, if you wish to provide a patch that handles this better I will commit it.

comment:2 Changed 5 years ago by bobbysmith007

  • Owner changed from bobbysmith007 to rjollos

This plugin will be adopted soon, changing ownership to new owner

Changed 22 months ago by sebasbaumh

Patch for a dynamically sizing IFrame

comment:3 Changed 22 months ago by sebasbaumh

I just attached a patch, which dynamically resizes the IFrame to render the whole page seamlessly. It removes the requirement to supply a specific height at all and integrates the sub page better into trac. The patch is targeted against the tractab.html of subversion branch 0.11 and is used in production on an intranet site in my company.

comment:4 Changed 22 months ago by rjollos

  • Status changed from new to assigned

Thanks! Which Trac version(s) did you develop/test this patch with?

comment:5 Changed 22 months ago by rjollos

(In [12714]) Refs #5742: Misc changes.

  • Modified entry point.
  • Added url to setup.py.
  • Added to setup.py:
    • license header
    • description and long description
    • project url
    • included "2-Clause" in license description
  • Formatted source code.

comment:6 Changed 22 months ago by rjollos

(In [12715]) Refs #5742:

  • Moved import of resource_filename to its customary location within the ITemplateProvider method.
  • Organized imports.
  • Minor source code formatting changes.
  • Removed unused method.

comment:7 Changed 22 months ago by rjollos

(In [12716]) Refs #5742: Refactored template.

comment:8 Changed 22 months ago by sebasbaumh

I used Trac 1.0.1 for development. As JQuery is used already in Trac it was rather easy to resize the frame. My goal was to embed the sub page as seamlessly as possible to integrate it with Trac.

comment:9 Changed 22 months ago by rjollos

The following error is seen in my development environment, where tracd runs on port 8001:

Unsafe JavaScript attempt to access frame with URL http://www.google.com/ from frame with URL http://localhost:8001/tracdev/tractab/Google. Domains, protocols and ports must match.

Any ideas on how to deal with that? The issue appears to be somewhat complex: SO:153152.

comment:10 Changed 22 months ago by sebasbaumh

Yes, seems like you are using a sub page outside of your own domain (here www.google.com). Your browser will see that as a kind of cross-site-scripting. Maybe you need to add a check if the used URL is in another domain and apply the template only if it is the same domain? My URLs are relative on the same server to use the Trac authentication to limit access to the sub page.

Google shows some solutions for the cross-site-scripting, but they seem to be fairly complex though :(

comment:11 Changed 19 months ago by rjollos

  • Status changed from assigned to new

Add Comment

Modify Ticket

Action
as new The owner will remain rjollos.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.