Actually there is no need to support a different right.cgi, as this theme will be package with Webmin. Also, remove refereces to Virtualmin.

This commit is contained in:
Jamie Cameron
2014-12-08 22:50:02 -08:00
parent 860fc5464b
commit 6697810b99
4 changed files with 2 additions and 55 deletions

View File

@@ -6,19 +6,4 @@ BEGIN { push(@INC, ".."); };
use WebminCore;
&init_config();
sub right_frame_cgi
{
my %tconfig = &foreign_config("gray-theme");
if ($tconfig{'newright'} eq '1') {
return 'newright.cgi';
}
elsif ($tconfig{'newright'} eq '0') {
return 'right.cgi';
}
else {
# XXX add more logic here
return 'right.cgi';
}
}
1;

View File

@@ -15,7 +15,7 @@ else {
$minfo = &get_goto_module();
}
my $goto = $minfo ? $minfo->{'dir'}."/" :
$in{'page'} ? "" : &right_frame_cgi()."?open=system&open=status";
$in{'page'} ? "" : "right.cgi";
if ($in{'page'}) {
$goto .= "/".$in{'page'};
}

View File

@@ -87,10 +87,9 @@ if ($gconfig{'log'} && &foreign_available("webminlog")) {
}
# Show info link
my $right = &right_frame_cgi();
push(@leftmenu, { 'type' => 'item',
'desc' => $text{'left_home'},
'link' => '/'.$right,
'link' => '/right.cgi',
'icon' => '/images/gohome.gif' });
# Show feedback link, but only if a custom email is set

View File

@@ -240,10 +240,6 @@ if ($script_name =~ /session_login.cgi/) {
print "</style>\n";
print "<![endif]-->\n";
}
if (get_module_name() eq "virtual-server") {
# No need for Module Index link, as we have the left-side frame
$tconfig{'nomoduleindex'} = 1;
}
}
sub theme_prehead
@@ -778,28 +774,6 @@ for($i=0; $i+1<@_; $i+=2) {
if ($url eq '/') {
$url = "/?cat=$module_info{'category'}";
}
elsif ($url eq '' && get_module_name() eq 'virtual-server' ||
$url eq '/virtual-server/') {
# Don't bother with virtualmin menu
next;
}
elsif ($url eq '' && get_module_name() eq 'server-manager' ||
$url eq '/server-manager/') {
# Don't bother with Cloudmin menu
next;
}
elsif ($url =~ /(view|edit)_domain.cgi/ &&
get_module_name() eq 'virtual-server' ||
$url =~ /^\/virtual-server\/(view|edit)_domain.cgi/) {
# Don't bother with link to domain details
next;
}
elsif ($url =~ /edit_serv.cgi/ &&
get_module_name() eq 'server-manager' ||
$url =~ /^\/virtual-server\/edit_serv.cgi/) {
# Don't bother with link to system details
next;
}
elsif ($url eq '' && get_module_name()) {
$url = "/".get_module_name()."/".
$module_info{'index_link'};
@@ -823,17 +797,6 @@ if (!$_[$i]) {
}
}
# Don't show virtualmin menu
sub theme_redirect
{
local ($orig, $url) = @_;
if (get_module_name() eq "virtual-server" && $orig eq "" &&
$url =~ /^((http|https):\/\/([^\/]+))\//) {
$url = "$1/".&right_frame_cgi();
}
print "Location: $url\n\n";
}
# theme_ui_hidden_javascript()
# Returns <script> and <style> sections for hiding functions and CSS
sub theme_ui_hidden_javascript