[vhffs-dev] [1959] recovered theme support and frooze theme to light-grey, replaced light-grey from templates to theme param, removed old broken vhffs theme |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
- To: vhffs-dev@xxxxxxxxx
- Subject: [vhffs-dev] [1959] recovered theme support and frooze theme to light-grey, replaced light-grey from templates to theme param, removed old broken vhffs theme
- From: subversion@xxxxxxxxxxxxx
- Date: Fri, 27 Jan 2012 21:17:34 +0100
Revision: 1959
Author: gradator
Date: 2012-01-27 21:17:34 +0100 (Fri, 27 Jan 2012)
Log Message:
-----------
recovered theme support and frooze theme to light-grey, replaced light-grey from templates to theme param, removed old broken vhffs theme
Modified Paths:
--------------
trunk/vhffs-api/src/Vhffs/Panel/Main.pm
trunk/vhffs-panel/js/vhffs/anonymous/login.js
trunk/vhffs-panel/js/vhffs/anonymous/subscribe.js
trunk/vhffs-panel/templates/layouts/anonymous.tt
trunk/vhffs-panel/templates/layouts/panel.tt
trunk/vhffs-panel/templates/misc/header.tt
trunk/vhffs-public/templates/layouts/public.tt
trunk/vhffs-themes/Makefile.am
Removed Paths:
-------------
trunk/vhffs-themes/vhffs/
Modified: trunk/vhffs-api/src/Vhffs/Panel/Main.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Main.pm 2012-01-27 19:38:58 UTC (rev 1958)
+++ trunk/vhffs-api/src/Vhffs/Panel/Main.pm 2012-01-27 20:17:34 UTC (rev 1959)
@@ -267,8 +267,10 @@
$theme = $cgi->cookie('theme') unless defined $theme;
$theme = $config->get_panel->{'default_theme'} unless defined $theme;
$theme = 'vhffs' unless( defined $theme and -f $config->get_panel->{'themesdir'}.'/'.$theme.'/main.css' );
- $self->{theme} = 'vhffs';
+ # theme feature is more or less deprecated since we never had more than one theme working, let me force to the current theme
+ $self->{theme} = 'light-grey';
+
unless( $vhffs->reconnect() and $vhffs->get_config->get_panel->{'open'} eq 'yes' ) {
$self->render('misc/closed.tt', undef, 'anonymous.tt');
undef $self;
@@ -480,7 +482,7 @@
$vars->{do} = $cgi->url_param('do');
$vars->{query_string} = $query_string;
- $vars->{theme} = $conf->get_panel->{default_theme} unless defined $vars->{theme};
+ $vars->{theme} = $self->{theme};
$vars->{panel_url} = $conf->get_panel->{url};
$vars->{title} = sprintf( gettext( '%s\'s Panel' ), $conf->get_host_name );
$vars->{page_title} = $self->{title};
Modified: trunk/vhffs-panel/js/vhffs/anonymous/login.js
===================================================================
--- trunk/vhffs-panel/js/vhffs/anonymous/login.js 2012-01-27 19:38:58 UTC (rev 1958)
+++ trunk/vhffs-panel/js/vhffs/anonymous/login.js 2012-01-27 20:17:34 UTC (rev 1959)
@@ -3,8 +3,10 @@
dojo.require("dijit.form.Form");
dojo.require("dijit.form.ValidationTextBox");
- var infoImg = '<img src="/themes/light-grey/img/info.png" alt="info"/> ';
+ var metatheme = $("meta[name=theme]");
+ var infoImg = '<img src="/themes/'+metatheme.attr("content")+'/img/info.png" alt="info"/> ';
+
dojo.parser.instantiate( dojo.query("input.validation-identifier"), {
dojoType: "dijit.form.ValidationTextBox",
required: true,
Modified: trunk/vhffs-panel/js/vhffs/anonymous/subscribe.js
===================================================================
--- trunk/vhffs-panel/js/vhffs/anonymous/subscribe.js 2012-01-27 19:38:58 UTC (rev 1958)
+++ trunk/vhffs-panel/js/vhffs/anonymous/subscribe.js 2012-01-27 20:17:34 UTC (rev 1959)
@@ -3,9 +3,11 @@
dojo.require("dijit.form.Form");
dojo.require("dijit.form.ValidationTextBox");
+ var metatheme = $("meta[name=theme]");
+
dojo.requireLocalization("vhffs", "prompt");
var prompts = dojo.i18n.getLocalization("vhffs", "prompt");
- var infoImg = '<img src="/themes/light-grey/img/info.png" alt="info"/> ';
+ var infoImg = '<img src="/themes/'+metatheme.attr("content")+'/img/info.png" alt="info"/> ';
dojo.parser.instantiate( dojo.query("input.validation-identifier"), {
dojoType: "dijit.form.ValidationTextBox",
Modified: trunk/vhffs-panel/templates/layouts/anonymous.tt
===================================================================
--- trunk/vhffs-panel/templates/layouts/anonymous.tt 2012-01-27 19:38:58 UTC (rev 1958)
+++ trunk/vhffs-panel/templates/layouts/anonymous.tt 2012-01-27 20:17:34 UTC (rev 1959)
@@ -5,6 +5,7 @@
<link rel="stylesheet" type="text/css" href="/js/dijit/themes/tundra/tundra.css"/>
<link rel="stylesheet" type="text/css" href="/themes/[% theme %]/main.css"/>
<meta http-equiv="Content-type" content="application/xhtml+xml; charset=utf-8"/>
+ <meta name="theme" content="[% theme %]"/>
<script language="javascript" type="text/javascript" charset="utf-8" src="/js/dojo/dojo.js"></script>
</head>
<body class="tundra">
Modified: trunk/vhffs-panel/templates/layouts/panel.tt
===================================================================
--- trunk/vhffs-panel/templates/layouts/panel.tt 2012-01-27 19:38:58 UTC (rev 1958)
+++ trunk/vhffs-panel/templates/layouts/panel.tt 2012-01-27 20:17:34 UTC (rev 1959)
@@ -4,6 +4,7 @@
<title>[% title | html %]</title>
<link rel="stylesheet" type="text/css" href="/themes/[% theme %]/main.css"/>
<meta http-equiv="Content-type" content="application/xhtml+xml; charset=utf-8"/>
+ <meta name="theme" content="[% theme %]"/>
<script language="javascript" type="text/javascript" charset="utf-8" src="/js/prototype.js"></script>
<script language="javascript" type="text/javascript" charset="utf-8" src="/js/commons.js"></script>
<script language="javascript" type="text/javascript" charset="utf-8" src="/js/tooltip.js"></script>
Modified: trunk/vhffs-panel/templates/misc/header.tt
===================================================================
--- trunk/vhffs-panel/templates/misc/header.tt 2012-01-27 19:38:58 UTC (rev 1958)
+++ trunk/vhffs-panel/templates/misc/header.tt 2012-01-27 20:17:34 UTC (rev 1959)
@@ -1,12 +1,12 @@
<div id="header">
<div class="site-name">
- <img src="/themes/light-grey/img/vhffs.png" alt="Virtual Hosting For Free Software"/>
+ <img src="/themes/[% theme %]/img/vhffs.png" alt="Virtual Hosting For Free Software"/>
</div>
<!-- Flag navigations -->
<div class="navflag">
- <a href="?[% query_string %];lang=en_US"><img src="/themes/light-grey/img/en_US.png" alt="en_US"/></a>
- <a href="?[% query_string %];lang=fr_FR"><img src="/themes/light-grey/img/fr_FR.png" alt="fr_FR"/></a>
- <a href="?[% query_string %];lang=es_ES"><img src="/themes/light-grey/img/es_ES.png" alt="es_ES"/></a>
+ <a href="?[% query_string %];lang=en_US"><img src="/themes/[% theme %]/img/en_US.png" alt="en_US"/></a>
+ <a href="?[% query_string %];lang=fr_FR"><img src="/themes/[% theme %]/img/fr_FR.png" alt="fr_FR"/></a>
+ <a href="?[% query_string %];lang=es_ES"><img src="/themes/[% theme %]/img/es_ES.png" alt="es_ES"/></a>
</div>
<!-- Navigation Level 1 -->
Modified: trunk/vhffs-public/templates/layouts/public.tt
===================================================================
--- trunk/vhffs-public/templates/layouts/public.tt 2012-01-27 19:38:58 UTC (rev 1958)
+++ trunk/vhffs-public/templates/layouts/public.tt 2012-01-27 20:17:34 UTC (rev 1959)
@@ -3,6 +3,7 @@
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
<meta name="author" content="VHFFS Team, based on G. Wolfgang original design" />
+ <meta name="theme" content="[% theme %]"/>
<link rel="stylesheet" type="text/css" media="screen,projection" href="/themes/[% theme %]/main.css" />
[%# TODO: Add a parameter to include extra-js %]
Modified: trunk/vhffs-themes/Makefile.am
===================================================================
--- trunk/vhffs-themes/Makefile.am 2012-01-27 19:38:58 UTC (rev 1958)
+++ trunk/vhffs-themes/Makefile.am 2012-01-27 20:17:34 UTC (rev 1959)
@@ -1,77 +1,4 @@
themesfiles = \
- vhffs/images/admin.png \
- vhffs/images/black.png \
- vhffs/images/bug.png \
- vhffs/images/bug_little.png \
- vhffs/images/buttonbg.png \
- vhffs/images/cvscreate.png \
- vhffs/images/cvsentry.png \
- vhffs/images/cvshelp.png \
- vhffs/images/cvs.png \
- vhffs/images/dbacces.png \
- vhffs/images/dbcreate.png \
- vhffs/images/dbentry.png \
- vhffs/images/db.png \
- vhffs/images/de_DE.png \
- vhffs/images/dnscreate.png \
- vhffs/images/dnsentry.png \
- vhffs/images/dns.png \
- vhffs/images/en_US.png \
- vhffs/images/error.png \
- vhffs/images/es_ES.png \
- vhffs/images/fr_FR.png \
- vhffs/images/good.png \
- vhffs/images/groupentry.png \
- vhffs/images/help.png \
- vhffs/images/help_bg.png \
- vhffs/images/help_little.png \
- vhffs/images/home.png \
- vhffs/images/homeentry.png \
- vhffs/images/inputbg.png \
- vhffs/images/it_IT.png \
- vhffs/images/loading_little.gif \
- vhffs/images/login.png \
- vhffs/images/logo_2.png \
- vhffs/images/logo_old.png \
- vhffs/images/logo.png \
- vhffs/images/logout.png \
- vhffs/images/logout_little.png \
- vhffs/images/mailcreate.png \
- vhffs/images/mailentry.png \
- vhffs/images/mailingcreate.png \
- vhffs/images/mailingentry.png \
- vhffs/images/mailing.png \
- vhffs/images/mail.png \
- vhffs/images/prefs.png \
- vhffs/images/prefs_little.png \
- vhffs/images/projectcontribentry.png \
- vhffs/images/projectcontrib.png \
- vhffs/images/projectcreate.png \
- vhffs/images/projectcurrent.png \
- vhffs/images/projectownerentry.png \
- vhffs/images/projectowner.png \
- vhffs/images/projectparams.png \
- vhffs/images/projects.png \
- vhffs/images/quota.png \
- vhffs/images/quota_progress.png \
- vhffs/images/repositorycreate.png \
- vhffs/images/repositoryentry.png \
- vhffs/images/repository.png \
- vhffs/images/svnentry.png \
- vhffs/images/gitentry.png \
- vhffs/images/mercurialentry.png \
- vhffs/images/git.png \
- vhffs/images/tab.png \
- vhffs/images/tip.png \
- vhffs/images/userentry.png \
- vhffs/images/user.png \
- vhffs/images/users.png \
- vhffs/images/webcreate.png \
- vhffs/images/webentry.png \
- vhffs/images/web.png \
- vhffs/images/webs.png \
- vhffs/images/cronentry.png \
- vhffs/main.css \
light-grey/main.css \
light-grey/img/en_US.png \
light-grey/img/es_ES.png \