Modify

Opened 8 years ago

Last modified 2 years ago

#5742 new enhancement

Allow Iframe to occupy more of the window

Reported by: Ryan J Ollos Owned by:
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 Ryan J Ollos 8 years ago.
tractabplugin.patch (1.0 KB) - added by Sebastian Baumhekel 5 years ago.
Patch for a dynamically sizing IFrame

Download all attachments as: .zip

Change History (14)

Changed 8 years ago by Ryan J Ollos

Attachment: IframeExample.png added

comment:1 Changed 8 years ago by Russ Tyndall

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 8 years ago by Russ Tyndall

Owner: changed from Russ Tyndall to Ryan J Ollos

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

Changed 5 years ago by Sebastian Baumhekel

Attachment: tractabplugin.patch added

Patch for a dynamically sizing IFrame

comment:3 Changed 5 years ago by Sebastian Baumhekel

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 5 years ago by Ryan J Ollos

Status: newassigned

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

comment:5 Changed 5 years ago by Ryan J Ollos

(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 5 years ago by Ryan J Ollos

(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 5 years ago by Ryan J Ollos

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

comment:8 Changed 5 years ago by Sebastian Baumhekel

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 5 years ago by Ryan J Ollos

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 5 years ago by Sebastian Baumhekel

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 5 years ago by Ryan J Ollos

Status: assignednew

comment:12 Changed 2 years ago by Ryan J Ollos

Owner: Ryan J Ollos deleted

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.

Add Comment


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

 
Note: See TracTickets for help on using tickets.