Author: spadkins
Date: Mon Mar 20 08:59:23 2006
New Revision: 3699
Modified:
p5ee/trunk/App-Widget-JSApp/lib/App/Widget/JSApp.pm
Log:
added {jsapp_attrib} to widget config
Modified: p5ee/trunk/App-Widget-JSApp/lib/App/Widget/JSApp.pm
==============================================================================
--- p5ee/trunk/App-Widget-JSApp/lib/App/Widget/JSApp.pm (original)
+++ p5ee/trunk/App-Widget-JSApp/lib/App/Widget/JSApp.pm Mon Mar 20 08:59:23 2006
@@ -34,7 +34,7 @@
my (@attrib);
foreach my $key (keys %$self) {
if ($key =~ /^jsapp_(.+)/) {
- push(@attrib, $1, $self->{$key}) if ($1 ne "domain");
+ push(@attrib, $1, $self->{$key}) if (!ref($self->{$key}));
}
}
if (! defined $self->{jsapp_submittable}) {
@@ -52,6 +52,17 @@
}
}
+ if (defined $self->{jsapp_attrib}) {
+ my ($value, $so_name);
+ my $attribs = $self->{jsapp_attrib};
+ foreach my $attrib (sort keys %$attribs) {
+ $so_name = $attribs->{$attrib};
+ $so_name = $attrib if (!$so_name || $so_name eq "1");
+ $value = $context->so_get($so_name);
+ $js_conf .= ",\n \"$attrib\" : \"" . $self->escape_double_quoted_value($value) . "\"";
+ }
+ }
+
if (defined $self->{jsapp_domain}) {
my ($value_domain, $values, $labels, $domain_alias);
my ($values_text, $labels_text, $i);
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.