[svn:p5ee] r8595 - p5ee/trunk/App-Widget-JSApp/lib/App/Widget

[email protected]
Newsgroups perl.cvs.p5ee
Message-ID <[email protected]>
Author: spadkins
Date: Tue Jan 16 10:00:26 2007
New Revision: 8595

Modified:
   p5ee/trunk/App-Widget-JSApp/lib/App/Widget/JSApp.pm

Log:
add {jsapp_value_domain} config param for including ValueDomains in the page javascript head

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	Tue Jan 16 10:00:26 2007
@@ -41,7 +41,7 @@
 
     $self->init_jsapp();
 
-    my %jsapp_special = ( attrib => 1, include_value_domain => 1, domain => 1, conf => 1, values_labels => 1 );
+    my %jsapp_special = ( attrib => 1, include_value_domain => 1, value_domain => 1, domain => 1, conf => 1, values_labels => 1 );
     my (@attrib);
     foreach my $key (keys %$self) {
         if ($key =~ /^jsapp_(.+)/) {
@@ -80,6 +80,12 @@
         }
     }
  
+    if (defined $self->{jsapp_value_domain}) {
+        my $value_domain_name = $self->{jsapp_value_domain};
+        $self->include_value_domain($value_domain_name);
+        $js_conf .= ",\n    \"domain\" : \"$value_domain_name\"";
+    }
+
     if (defined $self->{jsapp_include_value_domain}) {
         foreach my $value_domain_name (@{$self->{jsapp_include_value_domain}}) {
             $self->include_value_domain($value_domain_name);
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.