Skip to content

Commit

Permalink
Item11875: GRID macro now passes _connectorparam parameters to the gr…
Browse files Browse the repository at this point in the history
…id connector

git-svn-id: http://svn.foswiki.org/trunk/JQGridPlugin@14848 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
KipLubliner authored and KipLubliner committed May 18, 2012
1 parent 038a3c3 commit 0e5cae4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions data/System/JQGridPlugin.txt
Expand Up @@ -154,6 +154,7 @@ If guests are to make use of %TOPIC% without being logged in, remove the =rest=
| Release: | %$RELEASE% |
| Version: | %$VERSION% |
| Change History: | <!-- versions below in reverse order --> |
| 18 May 2012: | (2.03) GRID macro now passes _connectorparam parameters to the grid connector |
| 19 Oct 2011: | (2.02) Fixed bugs with SEARCH connector: broken on Foswiki 1.1.x, corrected column sorting quirks;\
added some code to help when =LocalSite.cfg= settings are missing;\
added notes regarding ={AuthScripts}= (Foswiki:Main/PaulHarvey) |
Expand Down
2 changes: 1 addition & 1 deletion lib/Foswiki/Plugins/JQGridPlugin.pm
Expand Up @@ -17,7 +17,7 @@ use strict;
use warnings;

our $VERSION = '$Rev$';
our $RELEASE = '2.02';
our $RELEASE = '2.03';
our $SHORTDESCRIPTION = 'jQuery grid widget for Foswiki';
our $NO_PREFS_IN_TOPIC = 1;
our $doInit = 0;
Expand Down
8 changes: 8 additions & 0 deletions lib/Foswiki/Plugins/JQGridPlugin/GRID.pm
Expand Up @@ -355,6 +355,13 @@ EOT

push @metadata, 'colModel: ['.join(",\n", @colModels).']';

# Connector parameters
my @connParams = ();
while(my ($k,$v) = each %$params) {
next unless $k =~ /_connectorparam$/;
push @connParams, $k, $v;
}

my $baseWeb = $session->{webName};
my $baseTopic = $session->{topicName};
my $gridConnectorUrl;
Expand Down Expand Up @@ -383,6 +390,7 @@ EOT
query => $theQuery,
columns => join(',', @selectedFields),
connector => $theConnector,
@connParams
);
} else {
throw Error::Simple("unknown grid connector $theConnector"); # SMELL: where's the catch
Expand Down

0 comments on commit 0e5cae4

Please sign in to comment.