Opened 14 years ago

Closed 14 years ago

#84 closed enhancement (fixed)

new widget - HTWindow

Reported by: flbergeron Owned by:
Priority: major Milestone:
Component: widgets Version:
Keywords: Cc:

Description

Hello, i created a new widget that i needed in production real fast, i named it HTWindow. (It stands for HyperText Window.)

Each instance of the widget add to the toolbar a button. On click it will show an ExtWindow that contains hypertext coming from a preconfigured url. Crossdomain url wont work, so its used to display form, report or any custom html pages coming from the server hosting the geoprisma application.

now i need to finish some doc and a sample for testing purpose!

Attachments (2)

htwindow.diff (44.5 KB ) - added by flbergeron 14 years ago.
htwindow patch
htwindow_20100810.diff (43.3 KB ) - added by flbergeron 14 years ago.

Download all attachments as: .zip

Change History (5)

by flbergeron, 14 years ago

Attachment: htwindow.diff added

htwindow patch

comment:1 by adube, 14 years ago

Here are some comments :

  • instead of manually parsing each options inside the <options> node, you can use the "getObjectFromNode" template from Globals.xslt to automatically fetch them all, like this :
      var objWidgetOptions = {};
      <xsl:for-each select="./options">
        objWidgetOptions =
        <xsl:call-template name="getObjectFromNode">
          <xsl:with-param name="pNode" select="." />
        </xsl:call-template>;
      </xsl:for-each>
  • Replace "tabs" by "spaces"
  • Could this widget be "drawn" inside an existing panel ? If not, then remove "drawWidgets" template, else make a second sample and adjust code to allow that (not mandatory)
  • In the .js file, instead of defining the widget as a OpenLayers.Control, it should be as a Ext.Window or Ext.Panel (if we want to support "in panel" drawing). See !FeaturePanel_Selector widget (and sample) for a good example.

That's pretty much it. Good work.

by flbergeron, 14 years ago

Attachment: htwindow_20100810.diff added

comment:2 by flbergeron, 14 years ago

I modified the points you mentioned, except that it still extend OpenLayers.Control and it will stay that way till i have more time to put on that widget.

comment:3 by adube, 14 years ago

Resolution: fixed
Status: newclosed

That's fine. I made a few changes to the documentation and added it to the PGSQLMapContextConfig driver widget list as well.

Good work.

r857

Note: See TracTickets for help on using tickets.