[vhffs-dev] [1572] redesigned a bit the panel so that it suit better for small screens, removed the help feature that was not working anymore for a while, cleaned abusive margings

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1572
Author:   gradator
Date:     2010-03-26 00:13:17 +0100 (Fri, 26 Mar 2010)
Log Message:
-----------
redesigned a bit the panel so that it suit better for small screens, removed the help feature that was not working anymore for a while, cleaned abusive margings

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Panel/Main.pm
    trunk/vhffs-panel/Makefile.am
    trunk/vhffs-panel/js/commons.js
    trunk/vhffs-panel/templates/main/panel.tmpl
    trunk/vhffs-panel/templates/menu/main.tmpl
    trunk/vhffs-themes/vhffs/main.css

Removed Paths:
-------------
    trunk/vhffs-panel/ajax/

Modified: trunk/vhffs-api/src/Vhffs/Panel/Main.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Main.pm	2010-03-22 12:07:20 UTC (rev 1571)
+++ trunk/vhffs-api/src/Vhffs/Panel/Main.pm	2010-03-25 23:13:17 UTC (rev 1572)
@@ -647,7 +647,6 @@
 	$panel->add_error( Encode::decode_utf8( $cgi->param('error') ) ) if( defined $cgi->param('error') );
 
 	my $paneltemplate = new HTML::Template( filename => $templatedir.'/panel/main/panel.tmpl' );
-	$paneltemplate->param( THEME => $theme );
 	$paneltemplate->param( TITLE => $panel->{title} );
 	$paneltemplate->param( HEADER => $panel->generate_header );
 
@@ -663,9 +662,6 @@
 		$paneltemplate->param( INFOS => $tmplinfos->output );
 	}
 
-	$paneltemplate->param( TEXT_HELP => gettext('Help') );
-	$paneltemplate->param( TEXT_HELP_CONTENT => gettext('Stay over an icon to see its description.') );
-
 	$paneltemplate->param( CONTENT => $template->output ) if( defined $template );
 
 	$panel->{content} = $paneltemplate->output;

Modified: trunk/vhffs-panel/Makefile.am
===================================================================
--- trunk/vhffs-panel/Makefile.am	2010-03-22 12:07:20 UTC (rev 1571)
+++ trunk/vhffs-panel/Makefile.am	2010-03-25 23:13:17 UTC (rev 1572)
@@ -30,7 +30,6 @@
 	play_code.pl \
 	subscribe.pl \
 	acl/view.pl \
-	ajax/help.pl \
 	admin/index.pl \
 	admin/cvs/index.pl \
 	admin/cvs/list.pl \

Modified: trunk/vhffs-panel/js/commons.js
===================================================================
--- trunk/vhffs-panel/js/commons.js	2010-03-22 12:07:20 UTC (rev 1571)
+++ trunk/vhffs-panel/js/commons.js	2010-03-25 23:13:17 UTC (rev 1572)
@@ -118,87 +118,3 @@
     }
 }
 
-/**
- * Handles dynamic help system in VHFFS.
- * Don't use this class, use its unique instance
- * 'help'.
- */
-
-var VHFFS_Help = Class.create();
-
-VHFFS_Help.prototype = {
-
-    /**
-     * Constructor.
-     */
-    initialize: function() {
-        this.cachedTopics = new Array();
-    },
-
-    /**
-     * Shows an help topic. Use a cache to avoid
-     * multiple server hits.
-     * @param topic string Topic to be displayed.
-     */
-    show: function(topic) {
-        $('help_content').innerHTML = '<div class="loading"></div>';
-        this.currentTopic = topic;
-        var content = this.cachedTopics[topic];
-        // Topic isn't in cache, let's fetch it
-        if(!content) {
-            new VHFFS_Topic_Retriever(this, topic);
-        } else {
-            $('help_content').innerHTML = content;
-        }
-    }
-};
-
-/**
- * Class used to retrieve an help topic.
- * Internal use only.
- */
-
-VHFFS_Topic_Retriever = Class.create();
-
-VHFFS_Topic_Retriever.prototype = {
-
-    /**
-     * Constructor.
-     * @param vh VHFFS_Help Instance who called us
-     * @param topic string Help topic to display
-     */
-    initialize: function(vh, topic) {
-        this.topic = topic;
-        this.vh = vh;
-        new Ajax.Request('/ajax/help.pl', {
-            method: 'post',
-            parameters: { topic: topic },
-            onSuccess: this.onSuccess.bind(this)
-        });
-    },
-
-    /**
-     * Callback used to display topic if it is
-     * still wanted.
-     */
-    onSuccess: function(response) {
-        var vh = this.vh;
-        vh.cachedTopics[this.topic] = response.responseText;
-        // User asked for another topic while we were fetching
-        // this one. Don't display it .
-        if(vh.currentTopic == this.topic) {
-            $('help_content').innerHTML = response.responseText;
-        }
-    }
-};
-
-
-/**
- * Allow to delay help displaying. Returns a value
- * that can be passed to clearTimeout to cancel display.
- */
-function helpTimeout(topic) {
-    return window.setTimeout("help.show('"+topic+"')", 500);
-}
-
-var help = new VHFFS_Help();

Modified: trunk/vhffs-panel/templates/main/panel.tmpl
===================================================================
--- trunk/vhffs-panel/templates/main/panel.tmpl	2010-03-22 12:07:20 UTC (rev 1571)
+++ trunk/vhffs-panel/templates/main/panel.tmpl	2010-03-25 23:13:17 UTC (rev 1572)
@@ -10,9 +10,3 @@
 	<TMPL_VAR ESCAPE=0 NAME="INFOS">
 	<TMPL_VAR ESCAPE=0 NAME="CONTENT">
 </div>
-<div id="help">
-	<h1><img src="/themes/<TMPL_VAR ESCAPE=1 NAME="THEME">/images/help.png" alt="help"/><TMPL_VAR ESCAPE=1 NAME="TEXT_HELP"></h1>
-	<div id="help_content">
-	<p><TMPL_VAR ESCAPE=1 NAME="TEXT_HELP_CONTENT"></p>
-	</div>
-</div>

Modified: trunk/vhffs-panel/templates/menu/main.tmpl
===================================================================
--- trunk/vhffs-panel/templates/menu/main.tmpl	2010-03-22 12:07:20 UTC (rev 1571)
+++ trunk/vhffs-panel/templates/menu/main.tmpl	2010-03-25 23:13:17 UTC (rev 1572)
@@ -1,43 +1,40 @@
 <div id="header">
+	<div id="logo">
+	    <a class="logomenu" href="/panel.pl">
+       		<img src="/themes/<TMPL_VAR ESCAPE=1 NAME="THEME">/images/logo.png" alt="logo"/>
+	    </a>
+	</div>
     <div id="top_menu">
         <div id="userToolBox">
             <a  href="/panel.pl" title="<TMPL_VAR ESCAPE=1 NAME="TEXT_HOME">">
-                <img src="/themes/<TMPL_VAR ESCAPE=1 NAME="THEME">/images/home.png" title="<TMPL_VAR ESCAPE=1 NAME="TEXT_HOME">" alt="<TMPL_VAR ESCAPE=1 NAME="TEXT_HOME">" onmouseover="javascript:this.timer=helpTimeout('home_page');" onmouseout="javascript:window.clearTimeout(this.timer);"/>
+                <img src="/themes/<TMPL_VAR ESCAPE=1 NAME="THEME">/images/home.png" title="<TMPL_VAR ESCAPE=1 NAME="TEXT_HOME">" alt="<TMPL_VAR ESCAPE=1 NAME="TEXT_HOME">" />
             </a>
             <a  href="/user/prefs.pl" title="<TMPL_VAR ESCAPE=1 NAME="TEXT_PREFS">">
-                <img src="/themes/<TMPL_VAR ESCAPE=1 NAME="THEME">/images/prefs.png" title="<TMPL_VAR ESCAPE=1 NAME="TEXT_PREFS">" alt="<TMPL_VAR ESCAPE=1 NAME="TEXT_PREFS">" onmouseover="javascript:this.timer=helpTimeout('user_preferences');" onmouseout="javascript:window.clearTimeout(this.timer);"/>
+                <img src="/themes/<TMPL_VAR ESCAPE=1 NAME="THEME">/images/prefs.png" title="<TMPL_VAR ESCAPE=1 NAME="TEXT_PREFS">" alt="<TMPL_VAR ESCAPE=1 NAME="TEXT_PREFS">" />
             </a>
             <a href="/group/index.pl" title="<TMPL_VAR ESCAPE=1 NAME="TEXT_PROJECTS">">
-                <img src="/themes/<TMPL_VAR ESCAPE=1 NAME="THEME">/images/projects.png" title="<TMPL_VAR ESCAPE=1 NAME="TEXT_PROJECTS">" alt="<TMPL_VAR ESCAPE=1 NAME="TEXT_PROJECTS">" onmouseover="javascript:this.timer=helpTimeout('user_projects');" onmouseout="javascript:window.clearTimeout(this.timer);"/>
+                <img src="/themes/<TMPL_VAR ESCAPE=1 NAME="THEME">/images/projects.png" title="<TMPL_VAR ESCAPE=1 NAME="TEXT_PROJECTS">" alt="<TMPL_VAR ESCAPE=1 NAME="TEXT_PROJECTS">" />
             </a>
             <TMPL_IF NAME="TEXT_ADMIN">
             <a href="/admin/index.pl" title="<TMPL_VAR ESCAPE=1 NAME="TEXT_ADMIN">">
-                <img src="/themes/<TMPL_VAR ESCAPE=1 NAME="THEME">/images/admin.png" title="<TMPL_VAR ESCAPE=1 NAME="TEXT_ADMIN">" alt="<TMPL_VAR ESCAPE=1 NAME="TEXT_ADMIN">
-                " onmouseover="javascript:this.timer=helpTimeout('user_admin');" onmouseout="javascript:window.clearTimeout(this.timer);"/>
+                <img src="/themes/<TMPL_VAR ESCAPE=1 NAME="THEME">/images/admin.png" title="<TMPL_VAR ESCAPE=1 NAME="TEXT_ADMIN">" alt="<TMPL_VAR ESCAPE=1 NAME="TEXT_ADMIN">" />
             </a>
             </TMPL_IF>
             <a href="<TMPL_VAR ESCAPE=1 NAME="HELP_URL">" title="<TMPL_VAR ESCAPE=1 NAME="TEXT_HELP">">
-                <img src="/themes/<TMPL_VAR ESCAPE=1 NAME="THEME">/images/help.png" title="<TMPL_VAR ESCAPE=1 NAME="TEXT_HELP">" alt="<TMPL_VAR ESCAPE=1 NAME="TEXT_HELP">" onmouseover="javascript:this.timer=helpTimeout('user_help');" onmouseout="javascript:window.clearTimeout(this.timer);"/>
+                <img src="/themes/<TMPL_VAR ESCAPE=1 NAME="THEME">/images/help.png" title="<TMPL_VAR ESCAPE=1 NAME="TEXT_HELP">" alt="<TMPL_VAR ESCAPE=1 NAME="TEXT_HELP">" />
             </a>
             <a href="/alert.pl" title="<TMPL_VAR ESCAPE=1 NAME="TEXT_SUBMITBUG">">
-                <img src="/themes/<TMPL_VAR ESCAPE=1 NAME="THEME">/images/bug.png" title="<TMPL_VAR ESCAPE=1 NAME="TEXT_SUBMITBUG">" alt="<TMPL_VAR ESCAPE=1 NAME="TEXT_SUBMITBUG">" onmouseover="javascript:this.timer=helpTimeout('user_bug');" onmouseout="javascript:window.clearTimeout(this.timer);"/>
+                <img src="/themes/<TMPL_VAR ESCAPE=1 NAME="THEME">/images/bug.png" title="<TMPL_VAR ESCAPE=1 NAME="TEXT_SUBMITBUG">" alt="<TMPL_VAR ESCAPE=1 NAME="TEXT_SUBMITBUG">" />
             </a>
             <a href="/auth.pl?logout=1" title="<TMPL_VAR ESCAPE=1 NAME="TEXT_LOGOUT">">
-                <img src="/themes/<TMPL_VAR ESCAPE=1 NAME="THEME">/images/logout.png" title="<TMPL_VAR ESCAPE=1 NAME="TEXT_LOGOUT">" alt="<TMPL_VAR ESCAPE=1 NAME="TEXT_LOGOUT">" onmouseover="javascript:this.timer=helpTimeout('user_logout');" onmouseout="javascript:window.clearTimeout(this.timer);"/>
+                <img src="/themes/<TMPL_VAR ESCAPE=1 NAME="THEME">/images/logout.png" title="<TMPL_VAR ESCAPE=1 NAME="TEXT_LOGOUT">" alt="<TMPL_VAR ESCAPE=1 NAME="TEXT_LOGOUT">" />
             </a>
         </div>
         <span id="username" title="<TMPL_VAR ESCAPE=1 NAME="TEXT_ACCOUNT">"><TMPL_VAR ESCAPE=1 NAME="USERNAME"></span>
     </div>
-</div>
-<TMPL_IF NAME="CONTEXTUAL_MENU">
 <div id="contextual_menu">
 <p>
-<TMPL_VAR ESCAPE=0 NAME="CONTEXTUAL_MENU">
+<TMPL_IF NAME="CONTEXTUAL_MENU"><TMPL_VAR ESCAPE=0 NAME="CONTEXTUAL_MENU"></TMPL_IF>
 </p>
 </div>
-</TMPL_IF>
-<div id="logo">
-    <a class="logomenu" href="/panel.pl">
-        <img src="/themes/<TMPL_VAR ESCAPE=1 NAME="THEME">/images/logo.png" alt="logo"/>
-    </a>
 </div>

Modified: trunk/vhffs-themes/vhffs/main.css
===================================================================
--- trunk/vhffs-themes/vhffs/main.css	2010-03-22 12:07:20 UTC (rev 1571)
+++ trunk/vhffs-themes/vhffs/main.css	2010-03-25 23:13:17 UTC (rev 1572)
@@ -11,7 +11,8 @@
 h1
 {
 	font-size: 3em;
-	text-align: center;
+	text-align: left;
+	padding-left: 55px;
 }
 
 #chooselang img
@@ -102,8 +103,8 @@
 #logo
 {
     position:fixed;
-    top:50px;
-    left:0.2em;
+    top:0px;
+    left:0px;
 }
 
 body a
@@ -169,30 +170,31 @@
 	margin-top: 0;
 	padding-left: 0;
 	text-align: center;
-	height: 50px;
+	height: 70px;
 	background-color: white;
-    border-bottom:1px solid black;
+ 	border-bottom:1px solid black;
 	padding-top: 0;
-    z-index:1;
+	z-index:1;
 	display: block;
-    top: 0;
+	top: 0;
 }
 
 #contextual_menu {
-    position:fixed;
-    width:650px;
-    top:50px;
-    left:50%;
-    margin-left:-325px;
+    position: fixed;
+    top: 71px;
+    left: 234px;
+    width: 100%;
+    margin-left: 0;
     z-index:2;
-    text-align:center;
     padding-bottom: 0.1em;
-    background:url('images/tab.png') no-repeat right bottom;
+    background-color: white;
 }
 
 #contextual_menu p {
-    margin: 0 0 0 0;
+    margin: 0 0 0 10px;
     padding: 0.5em 1em 0 1em;
+    height: 15px;
+    text-align: left;
 }
 
 #contextual_menu p a {
@@ -200,11 +202,10 @@
 }
 
 div#top_menu {
-    width:350px;
-    text-align:right;
+    text-align:left;
     position:absolute;
-    left:50%;
-    margin-top:10px;
+    left:250px;
+    margin-top:30px;
     margin-bottom:10px;
 }
 
@@ -557,6 +558,7 @@
 	font-size: 0.8em;
 	text-align: right;
 	padding-right: 5em;
+	padding-top: 4em;
 }
 
 
@@ -599,44 +601,13 @@
 
 #main {
     width:575px;
-    margin-left:auto;
-    margin-right:auto;
-    padding-top:7em;
+    margin-left:40px;
+//    margin-right:auto;
+    padding-top:100px;
     padding-left:0px;
     padding-right:0px;
 }
 
-#help {
-    position: fixed;
-    top:200px;
-    left:50%;
-    width:165px;
-    padding:5px;
-    margin-left:-485px;
-    height:300px;
-    overflow:auto;
-    padding:5px;
-    border: 1px outset black;
-    background: url('images/help_bg.png') repeat-x top;
-
-}
-
-#help h1 {
-    font-size:large;
-    text-align:center;
-    margin-bottom:5px;
-}
-
-#help>h1>img {
-    vertical-align:middle;
-    margin-right:1em;
-}
-
-#help h2 {
-    margin-top:5px;
-    font-size:medium;
-}
-
 div.loading {
     width:16px;
     height:16px;


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/