Opened 12 years ago

Closed 12 years ago

#340 closed enhancement (fixed)

keepActiveSession widget

Reported by: cdeschenes Owned by: cdeschenes
Priority: minor Milestone: 1.2.0
Component: widgets Version:
Keywords: Cc: adube

Description

Create a widget to keep active session over time the browser is open on geoprisma page by sending request every x minutes to proxy in the goal to keep session.

Attachments (5)

patch-keepactivesession-340-r1185-A0.diff (23.9 KB ) - added by cdeschenes 12 years ago.
This is the first version of the plugin
sample.png (9.2 KB ) - added by cdeschenes 12 years ago.
This is icon to put in "samples\keepactivesession\sample.png"
patch-keepactivesession-340-r1185-A1.diff (23.9 KB ) - added by cdeschenes 12 years ago.
This is the first version of the plugin (default delay corrected)
patch-keepactivesession-340-r1186-A2.diff (22.4 KB ) - added by cdeschenes 12 years ago.
A revision of the widget with requested change
patch-keepactivesession-340-r1186-A3.diff (22.2 KB ) - added by cdeschenes 12 years ago.
Another revision of the widget with requested change

Download all attachments as: .zip

Change History (12)

comment:1 by cdeschenes, 12 years ago

Type: defectenhancement

comment:2 by adube, 12 years ago

Owner: changed from adube to cdeschenes

comment:3 by adube, 12 years ago

r1178, featuring the following javascript libraries added in ./lib/client :

  • openlayers, 2.11
  • mapfish, r 3962
  • geoext, r 2865
  • geoext-ux, r 2865
  • geoext-ux-featureediting, r 2865
  • geoext-ux-layermanager, r 2865
  • geoext-ux-layertreebuilder, r 2865
  • geoext-ux-shortcutcombo, r 2865
  • geoext-ux-styler, r 2865
  • geoext-ux-wfstfeatureediting, r 2865
  • geoext-ux-wmsbrowser, r 2865
  • geoext-ux-zoomto, r 2865

comment:4 by adube, 12 years ago

Woops, that last comment wasn't supposed to be in this ticket. My bad.

by cdeschenes, 12 years ago

This is the first version of the plugin

by cdeschenes, 12 years ago

Attachment: sample.png added

This is icon to put in "samples\keepactivesession\sample.png"

by cdeschenes, 12 years ago

This is the first version of the plugin (default delay corrected)

comment:5 by adube, 12 years ago

I did a review. Please, do the following changes :

  • use the following namespace : org.GeoPrisma
  • classname becomes : org.GeoPrisma.KeepActiveSession
  • rename the file org.GeoPrisma.KeeActiveSession.js
  • create a 'lib' directory of move that file there
  • don't extend from Ext.Element, extend from Ext.util.Observable instead
  • 'sendRequest' is private, not API
  • use {Integer}, not {int}
  • Property: APIProperty: delay -> should be APIProperty
  • use the "Ext" code documentation method, you can inspire from ./src/client/widgets/filetreepanel/js/org.GeoPrisma.FileTreePlugin.js
  • remove "CLASS_NAME", this is only used when extending OpenLayers classes
  • the "url" used is hardcoded to "proxy.php", create an "url" APIProperty for that and use this.url. The default must be null, and when the object is created in the xslt use <xsl:value-of select="$proxyurl" /> to set it.
  • Inherits from: {Ext.form.KeepActiveSessionRequest} : that's not the case, please remove.
  • in the xslt file, remove the "geoexttoolbar" stuff, the widget don't need it
  • in the xslt file, remove the "drawWidgets" template since the widget doesn't need to be drawn

by cdeschenes, 12 years ago

A revision of the widget with requested change

comment:6 by adube, 12 years ago

One last review with required changes :

  • api: property[url] -> it is not an Integer, but a String
  • in documentation, change :
    The widget cannot be draw. Just add it in your configuration xml file. 
    
    for
    This widget doesn't need to be drawn.
    
  • in documentation, remove the 'url' option. The configuration manager doesn't need to worry about that since it's already automatically set.
  • in the xslt, remove the following tag that has no purpose :
    <script type="text/javascript"> 
      var objGPWidget<xsl:value-of select="$WidgetType" />Container; 
    </script> 
    
  • instead of :
     var url = "<xsl:value-of select="$proxyurl" />"; 
     objWidgetOptions['url'] = url; 
    
    why not simply do :
     objWidgetOptions['url'] = "<xsl:value-of select="$proxyurl" />"; 
    

by cdeschenes, 12 years ago

Another revision of the widget with requested change

comment:7 by adube, 12 years ago

Resolution: fixed
Status: newclosed

Patch applied in r1189 (p=cdeschenes, r=me), also featuring :

  • inclusion in the PGSQLMapContextConfig driver (for its support in it)
  • 'unstable' file put in the widget directory to mark it as unstable in the documentation.

Done.

Note: See TracTickets for help on using tickets.