Opened 12 years ago

Last modified 12 years ago

#456 new enhancement

Adding support for External Widgets

Reported by: belug Owned by: belug
Priority: major Milestone: 1.8.0
Component: server Version: trunk
Keywords: Cc: adube

Description

The widget system in GeoPrisma is really good, and the integration with the toolbars and menus is very usefull, but from time to time we need to create private widgets really attached to our data but those are difficulte to integrate with GeoPrisma without overriding some main files.

So here we propose a few changes to add support for external widgets to enable private widget but still being able to set them in the configs and order them in the toolbars.

What do you think about that Adube?

I'll add a patch in no time to show what was done to support that.

Attachments (1)

456-Adding-support-for-External-Widgets-A0.patch (18.1 KB ) - added by belug 12 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 by adube, 12 years ago

We had an idea in the past for something like that, but it wasn't implemented. Basically, we wanted to have a widget that would load complete external javascript sources (for source and execution) and link the resources in it directly.

The management of what to do with what resource would have been taken care of in the source directly. The sources wouldn't include any xslt files.

Let me know more about your ideas.

comment:2 by belug, 12 years ago

This patach add configurations for the external Widgets and add the sample file for ExternalGlobals.xslt

comment:3 by belug, 12 years ago

The Idea is to Use widgets exactly as those made in Geoprisma, with the XSLT and php files for configurations. This add some settings and a new file that does the job of the Globals.xslt

comment:4 by adube, 12 years ago

I don't know. IMHO, you'd have a clean Globals.xslt file, but a dirty ExternalGlobals.xslt with custom content that would always need to be not commited.

Customized content doesn't belong in the source of GeoPrisma, so I don't really like the idea. I'd be -0 for it.

comment:5 by belug, 12 years ago

As said in the documentation, the ExernalGlobals.xslt need to be copied outside the geoprisma directory as the sample.xslt is copied to template.xslt

comment:6 by adube, 12 years ago

I understand. In that case, that would be okay. Here's some changes that would make me +1 :

  • ExternalGlobals.xslt : the method comments were copied from Globals, but not edited.
  • I don't think we need a printAllExternalLibSources method. Custom source is already loaded in the template.xslt, so it is not required.
  • Do not load it directly in samples.xslt. Instead, use a combinaison of samples/config.php settings and load accordingly.
  • Add a sample showing that new feature (mandatory). The custom widget itself doesn't need to show anything cool. We only want to demonstrate how to use the external globals.

That's pretty much it. Comments welcomed.

comment:7 by adube, 12 years ago

What is the status of this task ? Is it ready for 1.6 ?

comment:8 by belug, 12 years ago

No it is not. When are you building 1.6? today or later this week?

comment:9 by adube, 12 years ago

Later this week, most probably on Friday :

http://trac.osgeo.org/geoprisma/milestone/1.6.0

comment:10 by adube, 12 years ago

I may have time to do the release today. Is it okay if we push this to 1.8 ?

comment:11 by adube, 12 years ago

Milestone: 1.6.01.8.0

belug replied on Skype. Pushed to 1.8.

Note: See TracTickets for help on using tickets.