add a tr- for just the select bit of a selectlayers...
authorivan <ivan>
Sun, 13 Apr 2008 10:20:09 +0000 (10:20 +0000)
committerivan <ivan>
Sun, 13 Apr 2008 10:20:09 +0000 (10:20 +0000)
httemplate/elements/selectlayers.html
httemplate/elements/tr-selectlayers-select.html [new file with mode: 0644]

index 4496892..3026217 100644 (file)
@@ -50,13 +50,15 @@ Example:
                           # ("what" is the element)
     'js_only'      => 0, #set true to return only the JS portions
     'html_only'    => 0, #set true to return only the HTML portions
+    'select_only'  => 0, #set true to return only the <SELECT> HTML
+    'layers_only'  => 0, #set true to return only the layers <DIV> HTML
   )
 
 </%doc>
-% unless ( $opt{html_only} || $opt{js_only} ) {
+% unless ( grep $opt{$_}, qw(html_only js_only select_only layers_only) ) {
     <SCRIPT TYPE="text/javascript">
 % }
-% unless ( $opt{html_only} ) {
+% unless ( grep $opt{$_}, qw(html_only select_only layers_only) ) {
       //alert('start function define');
       function <% $key %>changed(what) {
 
@@ -86,11 +88,11 @@ Example:
       }
       //alert('end function define');
 % }
-% unless ( $opt{html_only} || $opt{js_only} ) {
+% unless ( grep $opt{$_}, qw(html_only js_only select_only layers_only) ) {
     </SCRIPT>
 % }
 %
-% unless ( $opt{js_only} ) {
+% unless ( grep $opt{$_}, qw(js_only layers_only) ) {
 
     <SELECT NAME          = "<% $key %>"
             ID            = "<% $key %>"
@@ -109,8 +111,15 @@ Example:
 
     </SELECT>
 
+% }
+% unless ( grep $opt{$_}, qw(js_only select_only layers_only) ) {
+
 <% ref($between) ? &{$between}($key) : $between %>
 
+% }
+%
+% unless ( grep $opt{$_}, qw(js_only select_only) ) {
+
 %   foreach my $layer ( keys %$options ) {
 
       <DIV ID="<% $key %>d<% $layer %>"
diff --git a/httemplate/elements/tr-selectlayers-select.html b/httemplate/elements/tr-selectlayers-select.html
new file mode 100644 (file)
index 0000000..af81336
--- /dev/null
@@ -0,0 +1 @@
+<% include('tr-selectlayers.html', @_, 'select_only'=>1 ) %>