Bring back the old blue theme, but with modern code

This commit is contained in:
Jamie Cameron
2015-01-19 14:24:12 -08:00
parent a116a5e10f
commit d65ff9a623
184 changed files with 1878 additions and 0 deletions

22
old-blue-theme/CHANGELOG Normal file
View File

@@ -0,0 +1,22 @@
---- Changes since 1.280 ----
First version of this theme.
---- Changes since 1.290 ----
The current category name is now underlined.
Reduced the thickness of border lines.
All icons are now shown half the usual size, with the titles to the right instead of below.
---- Changes since 1.300 ----
Totally re-worked theme to use a new framed design, with a Javascript collapsing category menu.
---- Changes since 1.310 ----
Added Webmin Servers link on the left menu, when accessed via the Webmin Servers Index module.
---- Changes since 1.320 ----
Added a feedback link to the left menu, but only when a custom feedback address is set.
---- Changes since 1.330 ----
Updated the color schema to match the new webmin.com, and made table borders and forms nicer (thanks to Joe).
Added a whole new set of icons from Virtualmin.
---- Changes since 1.340 ----
Fixed bad table indentation on some browsers.
Changed link colors to be darker.
---- Changes since 1.400 ----
Display system uptime in the right frame after logging in.
---- Changes since 1.430 ----
Updated CSS and all UI elements to match the Virtualmin theme, except for colors and icons.

1
old-blue-theme/acl Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/acl

1
old-blue-theme/adsl-client Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/adsl-client

1
old-blue-theme/apache Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/apache

1
old-blue-theme/at Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/at

View File

@@ -0,0 +1 @@
../gray-theme/backup-config

1
old-blue-theme/bandwidth Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/bandwidth

1
old-blue-theme/bind8 Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/bind8

View File

@@ -0,0 +1,9 @@
# Common functions for theme CGIs
use strict;
use warnings;
BEGIN { push(@INC, ".."); };
use WebminCore;
&init_config();
1;

1
old-blue-theme/bsdfdisk Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/bsdfdisk

1
old-blue-theme/burner Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/burner

1
old-blue-theme/cfengine Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/cfengine

1
old-blue-theme/change-user Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/change-user

1
old-blue-theme/cluster-copy Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/cluster-copy

1
old-blue-theme/cluster-cron Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/cluster-cron

View File

@@ -0,0 +1 @@
../gray-theme/cluster-passwd

View File

@@ -0,0 +1 @@
../gray-theme/cluster-shell

View File

@@ -0,0 +1 @@
../gray-theme/cluster-software

View File

@@ -0,0 +1 @@
../gray-theme/cluster-useradmin

View File

@@ -0,0 +1 @@
../gray-theme/cluster-webmin

15
old-blue-theme/config Normal file
View File

@@ -0,0 +1,15 @@
cs_header=427AD1 class='maintitle'
cs_table=EFEFEF class='mainbody'
texttitles=1
functions=theme.pl
applet_body=e8e8ea
applet_text=000000
applet_light_edge=dadaf0
applet_dark_edge=333366
applet_light_edge_hi=dadaf8
applet_dark_edge_hi=333350
applet_dark_bg=8888aa
applet_light_bg=ffffff
noindex=1
inframe=1
framed=1

1
old-blue-theme/cpan Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/cpan

1
old-blue-theme/cron Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/cron

1
old-blue-theme/custom Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/custom

1
old-blue-theme/dhcpd Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/dhcpd

1
old-blue-theme/dhcpd-2.0 Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/dhcpd-2.0

1
old-blue-theme/dnsadmin Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/dnsadmin

1
old-blue-theme/dovecot Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/dovecot

1
old-blue-theme/download Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/download

1
old-blue-theme/escputil Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/escputil

1
old-blue-theme/exports Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/exports

1
old-blue-theme/fdisk Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/fdisk

1
old-blue-theme/fetchmail Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/fetchmail

1
old-blue-theme/file Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/file

1
old-blue-theme/firewall Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/firewall

1
old-blue-theme/frox Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/frox

1
old-blue-theme/fsdump Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/fsdump

View File

@@ -0,0 +1 @@
../gray-theme/generate-acls

1
old-blue-theme/gnupg Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/gnupg

1
old-blue-theme/grub Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/grub

1
old-blue-theme/heartbeat Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/heartbeat

1
old-blue-theme/help Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/help

View File

@@ -0,0 +1 @@
../gray-theme/htaccess-htpasswd

View File

@@ -0,0 +1 @@
../gray-theme/htpasswd-file

1
old-blue-theme/idmapd Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/idmapd

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 B

BIN
old-blue-theme/images/blue.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

BIN
old-blue-theme/images/down.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 651 B

BIN
old-blue-theme/images/gohome.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 B

View File

@@ -0,0 +1,68 @@
<public:component>
<public:attach event="onpropertychange" onevent="doFix()" />
<script type="text/javascript">
// IE5.5+ PNG Alpha Fix v1.0RC4
// (c) 2004-2005 Angus Turnbull http://www.twinhelix.com
// This is licensed under the CC-GNU LGPL, version 2.1 or later.
// For details, see: http://creativecommons.org/licenses/LGPL/2.1/
// This must be a path to a blank image. That's all the configuration you need.
if (typeof blankImg == 'undefined') var blankImg = '/images/blank.gif';
var f = 'DXImageTransform.Microsoft.AlphaImageLoader';
function filt(s, m)
{
if (filters[f])
{
filters[f].enabled = s ? true : false;
if (s) with (filters[f]) { src = s; sizingMethod = m }
}
else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")';
}
function doFix()
{
// Assume IE7 is OK.
if (!/MSIE (5\.5|6\.)/.test(navigator.userAgent) ||
(event && !/(background|src)/.test(event.propertyName))) return;
var bgImg = currentStyle.backgroundImage || style.backgroundImage;
if (tagName == 'IMG')
{
if ((/\.png$/i).test(src))
{
if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
style.width = offsetWidth + 'px';
filt(src, 'scale');
src = blankImg;
}
else if (src.indexOf(blankImg) < 0) filt();
}
else if (bgImg && bgImg != 'none')
{
if (bgImg.match(/^url[("']+(.*\.png)[)"']+$/i))
{
var s = RegExp.$1;
if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
style.width = offsetWidth + 'px';
style.backgroundImage = 'none';
filt(s, 'crop');
// IE link fix.
for (var n = 0; n < childNodes.length; n++)
if (childNodes[n].style) childNodes[n].style.position = 'relative';
}
else filt();
}
}
doFix();
</script>
</public:component>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 562 B

BIN
old-blue-theme/images/open.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

BIN
old-blue-theme/images/purple.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 B

BIN
old-blue-theme/images/red.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 584 B

42
old-blue-theme/index.cgi Executable file
View File

@@ -0,0 +1,42 @@
#!/usr/bin/perl
BEGIN { push(@INC, ".."); };
use WebminCore;
&ReadParse();
&init_config();
%text = &load_language($current_theme);
if ($in{'mod'}) {
$minfo = { &get_module_info($in{'mod'}) };
}
else {
$minfo = &get_goto_module();
}
$goto = $minfo ? "$minfo->{'dir'}/" :
$in{'page'} ? "" :
"right.cgi?open=system&open=status";
if ($minfo) {
$cat = "?$minfo->{'category'}=1";
}
if ($in{'page'}) {
$goto .= "/".$in{'page'};
}
# Show frameset
$title = &get_html_framed_title();
$cols = &get_product_name() eq 'usermin' ? 180 : 230;
&popup_header($title, undef, undef, 1);
print <<EOF;
<frameset cols="$cols,*" border=0>
<frame name="left" src="left.cgi$cat" scrolling="auto">
<frame name="right" src="$goto" noresize>
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
EOF
&popup_footer(1);

1
old-blue-theme/inetd Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/inetd

1
old-blue-theme/init Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/init

1
old-blue-theme/inittab Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/inittab

1
old-blue-theme/ipchains Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/ipchains

1
old-blue-theme/ipsec Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/ipsec

1
old-blue-theme/iptables Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/iptables

1
old-blue-theme/iscsi-client Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/iscsi-client

1
old-blue-theme/iscsi-server Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/iscsi-server

1
old-blue-theme/iscsi-target Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/iscsi-target

1
old-blue-theme/jabber Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/jabber

1
old-blue-theme/jsample Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/jsample

1
old-blue-theme/krb5 Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/krb5

1
old-blue-theme/lang Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/lang

View File

@@ -0,0 +1 @@
../gray-theme/ldap-useradmin

232
old-blue-theme/left.cgi Executable file
View File

@@ -0,0 +1,232 @@
#!/usr/bin/perl
# Show the left-side menu of Webmin modules
use strict;
use warnings;
require 'old-blue-theme/blue-theme-lib.pl';
&ReadParse();
our ($current_theme, $remote_user, %gconfig);
our %text = &load_language($current_theme);
my %gaccess = &get_module_acl(undef, "");
&popup_header();
print <<EOF;
<link rel="stylesheet" type="text/css" href="gray-left.css" />
<script>
function toggleview (id1,id2) {
var obj1 = document.getElementById(id1);
var obj2 = document.getElementById(id2);
(obj1.className=="itemshown") ? obj1.className="itemhidden" : obj1.className="itemshown";
(obj1.className=="itemshown") ? obj2.innerHTML="<img border='0' src='images/open.gif' alt='[&ndash;]'>" : obj2.innerHTML="<img border='0' src='images/closed.gif' alt='[+]'>";
}
// Show the logs for the current module in the right
function show_logs() {
var url = ''+window.parent.frames[1].location;
var sl1 = url.indexOf('//');
var mod = '';
if (sl1 > 0) {
var sl2 = url.indexOf('/', sl1+2);
if (sl2 > 0) {
var sl3 = url.indexOf('/', sl2+1);
if (sl3 > 0) {
mod = url.substring(sl2+1, sl3);
} else {
mod = url.substring(sl2+1);
}
}
}
if (mod && mod.indexOf('.cgi') <= 0) {
// Show one module's logs
window.parent.frames[1].location = 'webminlog/search.cgi?tall=4&uall=1&fall=1&mall=0&module='+mod;
}
else {
// Show all logs
window.parent.frames[1].location = 'webminlog/search.cgi?tall=4&uall=1&fall=1&mall=0&mall=1'
}
}
</script>
</head>
<body>
EOF
# Show login
my @leftmenu;
push(@leftmenu, { 'type' => 'text',
'desc' => &text('left_login', $remote_user) });
push(@leftmenu, { 'type' => 'hr' });
# Webmin modules
push(@leftmenu, &list_modules_webmin_menu());
# Show module/help search form
if ($gaccess{'webminsearch'}) {
push(@leftmenu, { 'type' => 'input',
'cgi' => $gconfig{'webprefix'}.'/webmin_search.cgi',
'name' => 'search',
'desc' => $text{'left_search'},
'size' => 15 });
}
push(@leftmenu, { 'type' => 'hr' });
# Show current module's log search, if logging
if ($gconfig{'log'} && &foreign_available("webminlog")) {
push(@leftmenu, { 'type' => 'item',
'desc' => $text{'left_logs'},
'link' => '/webminlog/',
'icon' => '/images/logs.gif',
'onclick' => 'show_logs(); return false;' });
}
# Show info link
push(@leftmenu, { 'type' => 'item',
'desc' => $text{'left_home'},
'link' => '/right.cgi',
'icon' => '/images/gohome.gif' });
# Show feedback link, but only if a custom email is set
%gaccess = &get_module_acl(undef, "");
if (&get_product_name() eq 'webmin' && # For Webmin
!$ENV{'ANONYMOUS_USER'} &&
$gconfig{'nofeedbackcc'} != 2 &&
$gaccess{'feedback'} &&
$gconfig{'feedback_to'} ||
&get_product_name() eq 'usermin' && # For Usermin
!$ENV{'ANONYMOUS_USER'} &&
$gconfig{'feedback'}
) {
push(@leftmenu, { 'type' => 'item',
'desc' => $text{'left_feedback'},
'link' => '/feedback_form.cgi',
'icon' => '/images/mail-small.gif' });
}
# Show refesh modules link, for master admin
if (&foreign_available("webmin")) {
push(@leftmenu, { 'type' => 'item',
'desc' => $text{'main_refreshmods'},
'link' => '/webmin/refresh_modules.cgi',
'icon' => '/images/refresh-small.gif' });
}
# Show logout link
my %miniserv;
&get_miniserv_config(\%miniserv);
if ($miniserv{'logout'} && !$ENV{'SSL_USER'} && !$ENV{'LOCAL_USER'} &&
$ENV{'HTTP_USER_AGENT'} !~ /webmin/i) {
my $logout = { 'type' => 'item',
'icon' => '/images/stock_quit.gif',
'target' => 'window' };
if ($main::session_id) {
$logout->{'desc'} = $text{'main_logout'};
$logout->{'link'} = '/session_login.cgi?logout=1';
}
else {
$logout->{'desc'} = $text{'main_switch'};
$logout->{'link'} = '/switch_user.cgi';
}
push(@leftmenu, $logout);
}
# Show link back to original Webmin server
if ($ENV{'HTTP_WEBMIN_SERVERS'}) {
push(@leftmenu, { 'type' => 'item',
'desc' => $text{'header_servers'},
'link' => $ENV{'HTTP_WEBMIN_SERVERS'},
'icon' => '/images/webmin-small.gif',
'target' => 'window' });
}
# Actually output the menu
print "<div class='wrapper'>\n";
print "<table id='main' width='100%'><tbody><tr><td>\n";
&show_menu_items_list(\@leftmenu, 0);
print "</td></tr></tbody></table>\n";
print "</div>\n";
&popup_footer();
# show_menu_items_list(&list, indent)
# Actually prints the HTML for menu items
sub show_menu_items_list
{
my ($items, $indent) = @_;
foreach my $item (@$items) {
if ($item->{'type'} eq 'item') {
# Link to some page
my $t = $item->{'target'} eq 'new' ? '_blank' :
$item->{'target'} eq 'window' ? '_top' : 'right';
if ($item->{'icon'}) {
my $icon = add_webprefix($item->{'icon'});
print "<div class='linkwithicon'>".
"<img src='$icon' alt=''>\n";
}
my $cls = $item->{'icon'} ? 'aftericon' :
$indent ? 'linkindented' : 'leftlink';
print "<div class='$cls'>";
my $link = add_webprefix($item->{'link'});
my $tags = $item->{'onclick'} ?
"onClick='".$item->{'onclick'}."'" : "";
print "<a href='$link' target=$t $tags>".
"$item->{'desc'}</a>";
print "</div>";
if ($item->{'icon'}) {
print "</div>";
}
print "\n";
}
elsif ($item->{'type'} eq 'cat') {
# Start of a new category
my $c = $item->{'id'};
print "<div class='linkwithicon'>";
print "<a href=\"javascript:toggleview('cat$c','toggle$c')\" ".
"id='toggle$c'><img border='0' src='images/closed.gif' ".
"alt='[+]'></a>\n";
print "<div class='aftericon'>".
"<a href=\"javascript:toggleview('cat$c','toggle$c')\" ".
"id='toggletext$c'>".
"<font color='#000000'>$item->{'desc'}</font></a></div>";
print "</div>\n";
print "<div class='itemhidden' id='cat$c'>\n";
&show_menu_items_list($item->{'members'}, $indent+1);
print "</div>\n";
}
elsif ($item->{'type'} eq 'text') {
# A line of text
print "<div class='leftlink'>",
html_escape($item->{'desc'}),"</div>\n";
}
elsif ($item->{'type'} eq 'hr') {
# Separator line
print "<hr>\n";
}
elsif ($item->{'type'} eq 'input') {
# For with an input of some kind
my $cgi = add_webprefix($item->{'cgi'});
print "<form action='$cgi' target=right>\n";
foreach my $h (@{$item->{'hidden'}}) {
print ui_hidden(@$h);
}
print "<div class='leftlink'>";
print $item->{'desc'},"\n";
print ui_textbox($item->{'name'}, $item->{'value'},
$item->{'size'});
if ($item->{'icon'}) {
my $icon = add_webprefix($item->{'icon'});
print "<input type=image src='$icon' ".
"border=0 class=goArrow>\n";
}
print "</div>";
print "</form>\n";
}
}
}
# add_webprefix(link)
# If a URL starts with a / , add webprefix
sub add_webprefix
{
my ($link) = @_;
return $link =~ /^\// ? $gconfig{'webprefix'}.$link : $link;
}

51
old-blue-theme/left.css Normal file
View File

@@ -0,0 +1,51 @@
.mode {
left: auto;
right: auto;
}
.linkwithicon {
position: relative;
white-space: nowrap;
left: 2px;
width: 16px;
padding-top: 2px;
}
.leftlink {
position: relative;
left: 4px;
right: 4px;
line-height: 150%;
}
.linkindented {
border: none;
position: relative;
padding-top: 2px;
margin-right: 2px;
margin-left: 20px;
}
.linknotindented {
border: none;
position: relative;
padding-top: 2px;
margin-right: 2px;
margin-left: 4px;
}
.aftericon {
display: inline;
}
.domainmenu {
white-space: nowrap;
position: relative;
left: 4px;
padding-top: 2px;
}
div.menubody {
border:1px solid #D9D9D9;
background-color:#F5F5F5;
padding:0;
margin:0;
}
div.menubodyInner {
border:1px solid #FFFFFF;
margin:0;
padding:0;
}

1
old-blue-theme/lilo Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/lilo

1
old-blue-theme/logrotate Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/logrotate

1
old-blue-theme/lpadmin Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/lpadmin

1
old-blue-theme/lvm Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/lvm

1
old-blue-theme/lvs Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/lvs

1
old-blue-theme/mailboxes Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/mailboxes

1
old-blue-theme/majordomo Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/majordomo

1
old-blue-theme/man Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/man

1
old-blue-theme/mon Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/mon

1
old-blue-theme/mount Symbolic link
View File

@@ -0,0 +1 @@
../gray-theme/mount

Some files were not shown because too many files have changed in this diff Show More