mirror of
https://github.com/webmin/webmin.git
synced 2026-02-17 04:02:15 +00:00
16
ui-lib.pl
16
ui-lib.pl
@@ -661,7 +661,7 @@ if ($buttons && @$buttons) {
|
||||
$rv .= "</form>\n";
|
||||
# When going back to a form, re-enable any text fields generated by
|
||||
# ui_opt_textbox that aren't in the default state.
|
||||
$rv .= "<script>\n";
|
||||
$rv .= "<script type='text/javascript'>\n";
|
||||
$rv .= "var opts = document.getElementsByClassName('ui_opt_textbox');\n";
|
||||
$rv .= "for(var i=0; i<opts.length; i++) {\n";
|
||||
$rv .= " opts[i].disabled = document.getElementsByName(opts[i].name+'_def')[0].checked;\n";
|
||||
@@ -955,7 +955,7 @@ sub ui_multi_select_javascript
|
||||
return &theme_ui_multiselect_javascript()
|
||||
if (defined(&theme_ui_multiselect_javascript));
|
||||
return <<EOF;
|
||||
<script>
|
||||
<script type='text/javascript'>
|
||||
// Move an element from the options list to the values list, or vice-versa
|
||||
function multi_select_move(name, f, dir)
|
||||
{
|
||||
@@ -1618,11 +1618,11 @@ $jscb =~ s/'/\\'/g;
|
||||
$jstb =~ s/'/\\'/g;
|
||||
|
||||
return <<EOF;
|
||||
<style>
|
||||
<style type='text/css'>
|
||||
.opener_shown {display:inline}
|
||||
.opener_hidden {display:none}
|
||||
</style>
|
||||
<script>
|
||||
<script type='text/javascript'>
|
||||
// Open or close a hidden section
|
||||
function hidden_opener(divid, openerid)
|
||||
{
|
||||
@@ -1884,7 +1884,7 @@ if (!$main::ui_hidden_start_donejs++) {
|
||||
# Build list of tab titles and names
|
||||
my $tabnames = "[".join(",", map { "\""."e_escape($_->[0])."\"" } @$tabs)."]";
|
||||
my $tabtitles = "[".join(",", map { "\""."e_escape($_->[1])."\"" } @$tabs)."]";
|
||||
$rv .= "<script>\n";
|
||||
$rv .= "<script type='text/javascript'>\n";
|
||||
$rv .= "document.${name}_tabnames = $tabnames;\n";
|
||||
$rv .= "document.${name}_tabtitles = $tabtitles;\n";
|
||||
$rv .= "</script>\n";
|
||||
@@ -2079,11 +2079,11 @@ return $rv;
|
||||
sub ui_radio_selector_javascript
|
||||
{
|
||||
return <<EOF;
|
||||
<style>
|
||||
<style type='text/css'>
|
||||
.selector_shown {display:inline}
|
||||
.selector_hidden {display:none}
|
||||
</style>
|
||||
<script>
|
||||
<script type='text/javascript'>
|
||||
function selector_show(name, value, values)
|
||||
{
|
||||
for(var i=0; i<values.length; i++) {
|
||||
@@ -2490,7 +2490,7 @@ if ($url =~ /^\//) {
|
||||
# If the URL is like /foo , add webprefix
|
||||
$url = $gconfig{'webprefix'}.$url;
|
||||
}
|
||||
return "<script>${window}.location = '"."e_escape($url)."';</script>\n";
|
||||
return "<script type='text/javascript'>${window}.location = '"."e_escape($url)."';</script>\n";
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
@@ -1036,8 +1036,8 @@ if ($textonly) {
|
||||
}
|
||||
else {
|
||||
$line =~ s/\r|\n//g;
|
||||
return "<script language=JavaScript type=text/javascript>\n".
|
||||
"defaultStatus=\""."e_escape($line)."\";\n".
|
||||
return "<script type='text/javascript'>\n".
|
||||
"window.defaultStatus=\""."e_escape($line)."\";\n".
|
||||
"</script>\n";
|
||||
}
|
||||
}
|
||||
@@ -7901,7 +7901,7 @@ is un-reliable.
|
||||
sub check_clicks_function
|
||||
{
|
||||
return <<EOF;
|
||||
<script>
|
||||
<script type='text/javascript'>
|
||||
clicks = 0;
|
||||
function check_clicks(form)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user