summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--httemplate/elements/selectlayers.html17
-rw-r--r--httemplate/elements/tr-selectlayers-select.html1
2 files changed, 14 insertions, 4 deletions
diff --git a/httemplate/elements/selectlayers.html b/httemplate/elements/selectlayers.html
index 4496892ff..302621775 100644
--- a/httemplate/elements/selectlayers.html
+++ b/httemplate/elements/selectlayers.html
@@ -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
index 000000000..af8133627
--- /dev/null
+++ b/httemplate/elements/tr-selectlayers-select.html
@@ -0,0 +1 @@
+<% include('tr-selectlayers.html', @_, 'select_only'=>1 ) %>