[cig-commits] r11959 - in cs/portal/trunk/northridge/SeismoWebPortal: . static static/images templates/SeismoWebPortal

leif at geodynamics.org leif at geodynamics.org
Mon May 12 21:16:02 PDT 2008


Author: leif
Date: 2008-05-12 21:16:02 -0700 (Mon, 12 May 2008)
New Revision: 11959

Added:
   cs/portal/trunk/northridge/SeismoWebPortal/static/images/help-large.gif
   cs/portal/trunk/northridge/SeismoWebPortal/static/images/help-small.gif
Modified:
   cs/portal/trunk/northridge/SeismoWebPortal/mezzanine.py
   cs/portal/trunk/northridge/SeismoWebPortal/models.py
   cs/portal/trunk/northridge/SeismoWebPortal/static/script.js
   cs/portal/trunk/northridge/SeismoWebPortal/static/style.css
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_upload.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_2chunks.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_3chunks.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_base.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodecatalog_form.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters_form.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_form.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/stationlist_upload.html
   cs/portal/trunk/northridge/SeismoWebPortal/urls.py
   cs/portal/trunk/northridge/SeismoWebPortal/views.py
Log:
Re-implemented inline help using DHTML.


Modified: cs/portal/trunk/northridge/SeismoWebPortal/mezzanine.py
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/mezzanine.py	2008-05-12 21:22:42 UTC (rev 11958)
+++ cs/portal/trunk/northridge/SeismoWebPortal/mezzanine.py	2008-05-13 04:16:02 UTC (rev 11959)
@@ -353,36 +353,27 @@
         ModelClass = cls.Model
 
         manipulator = UploadManipulator(cls.FileFormat())
-        help_visible = False #get_help_visible(request)
 
         if request.method == 'POST':
             new_data = request.POST.copy()
-            errors = {}
-            if new_data.has_key('show_help'):
-                help_visible = True
-                request.session['help_visible'] = help_visible
-            elif new_data.has_key('hide_help'):
-                help_visible = False
-                request.session['help_visible'] = help_visible
-            else:
-                new_data.update(request.FILES)
-                errors = manipulator.get_validation_errors(new_data)
-                if not errors:
-                    manipulator.do_html2python(new_data)
-                    new_object = manipulator.save(new_data)
-                    if post_save_redirect:
-                        return HttpResponseRedirect(post_save_redirect % new_object.__dict__)
-                    elif hasattr(new_object, 'get_absolute_url'):
-                        return HttpResponseRedirect(new_object.get_absolute_url())
-                    else:
-                        return HttpResponseRedirect(cls.urlForObject(new_object))
+            new_data.update(request.FILES)
+            errors = manipulator.get_validation_errors(new_data)
+            if not errors:
+                manipulator.do_html2python(new_data)
+                new_object = manipulator.save(new_data)
+                if post_save_redirect:
+                    return HttpResponseRedirect(post_save_redirect % new_object.__dict__)
+                elif hasattr(new_object, 'get_absolute_url'):
+                    return HttpResponseRedirect(new_object.get_absolute_url())
+                else:
+                    return HttpResponseRedirect(cls.urlForObject(new_object))
         else:
             errors = new_data = {}
 
         form = oldforms.FormWrapper(manipulator, new_data, errors)
         template_name = "%s/%s_upload.html" % (ModelClass._meta.app_label, ModelClass._meta.object_name.lower())
         t = template_loader.get_template(template_name)
-        c = RequestContext(request, {'form': form, 'help_visible': help_visible})
+        c = RequestContext(request, {'form': form })
         return t.render(c)
 
     id = property(lambda self: self.obj.id)
@@ -672,23 +663,13 @@
         else:
             assert False
 
-        help_visible = False #get_help_visible(request)
-
         if request.method == 'POST':
             new_data = request.POST.copy()
-            errors = {}
-            if new_data.has_key('show_help'):
-                help_visible = True
-                request.session['help_visible'] = help_visible
-            elif new_data.has_key('hide_help'):
-                help_visible = False
-                request.session['help_visible'] = help_visible
-            else:
-                errors = manipulator.get_validation_errors(new_data)
-                if not errors:
-                    manipulator.do_html2python(new_data)
-                    new_object = manipulator.save(new_data)
-                    return HttpResponseRedirect(cls.urlForObject(new_object))
+            errors = manipulator.get_validation_errors(new_data)
+            if not errors:
+                manipulator.do_html2python(new_data)
+                new_object = manipulator.save(new_data)
+                return HttpResponseRedirect(cls.urlForObject(new_object))
         else:
             # Populate new_data with a 'flattened' version of the current data.
             new_data = manipulator.flatten_data()
@@ -700,7 +681,6 @@
         c = RequestContext(request, dict(
             form = form,
             nchunks = nchunks,
-            help_visible = help_visible,
             object = mesh,
             action = request.path,
             ))

Modified: cs/portal/trunk/northridge/SeismoWebPortal/models.py
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/models.py	2008-05-12 21:22:42 UTC (rev 11958)
+++ cs/portal/trunk/northridge/SeismoWebPortal/models.py	2008-05-13 04:16:02 UTC (rev 11959)
@@ -457,7 +457,6 @@
     # 'True' if this user can run simulations.  Users who enter a
     # valid invitation code are automatically approved.
     approved = models.BooleanField(default=False)
-    help_visible = models.BooleanField(default=True)
 
     def __str__(self): return self.user.username
 

Added: cs/portal/trunk/northridge/SeismoWebPortal/static/images/help-large.gif
===================================================================
(Binary files differ)


Property changes on: cs/portal/trunk/northridge/SeismoWebPortal/static/images/help-large.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: cs/portal/trunk/northridge/SeismoWebPortal/static/images/help-small.gif
===================================================================
(Binary files differ)


Property changes on: cs/portal/trunk/northridge/SeismoWebPortal/static/images/help-small.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: cs/portal/trunk/northridge/SeismoWebPortal/static/script.js
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/static/script.js	2008-05-12 21:22:42 UTC (rev 11958)
+++ cs/portal/trunk/northridge/SeismoWebPortal/static/script.js	2008-05-13 04:16:02 UTC (rev 11959)
@@ -1131,3 +1131,103 @@
 };
 
 registerPloneFunction(initializeMenus);
+
+
+/* ----- collapsiblesections.js ----- */
+/*
+ * This is the code for the collapsibles. It uses the following markup:
+ *
+ * <dl class="collapsible">
+ *   <dt class="collapsibleHeader">
+ *     A Title
+ *   </dt>
+ *   <dd class="collapsibleContent">
+ *     <!-- Here can be any content you want -->
+ *   </dd>
+ * </dl>
+ *
+ * When the collapsible is toggled, then the dl will get an additional class
+ * which switches between 'collapsedBlockCollapsible' and
+ * 'expandedBlockCollapsible'. You can use this to style it accordingly, for
+ * example:
+ *
+ * .expandedBlockCollapsible .collapsibleContent {
+ *   display: block;
+ * }
+ *
+ * .collapsedBlockCollapsible .collapsibleContent {
+ *   display: none;
+ * }
+ *
+ * If you add the 'collapsedOnLoad' class to the dl, then it will get
+ * collapsed on page load, this is done, so the content is accessible even when
+ * javascript is disabled.
+ *
+ * If you add the 'inline' class to the dl, then it will toggle between
+ * 'collapsedInlineCollapsible' and 'expandedInlineCollapsible' instead of
+ * 'collapsedBlockCollapsible' and 'expandedBlockCollapsible'.
+ *
+ * This file uses functions from register_function.js, cssQuery.js and
+ * nodeutils.js.
+ *
+ */
+
+function isCollapsible(node) {
+    if (hasClassName(node, 'collapsible')) {
+        return true;
+    }
+    return false;
+};
+
+function toggleCollapsible(event) {
+    if (!event) var event = window.event; // IE compatibility
+
+    if (!this.tagName && (this.tagName == 'DT' || this.tagName == 'dt')) {
+        return true;
+    }
+
+    var container = findContainer(this, isCollapsible);
+    if (!container) {
+        return true;
+    }
+
+    if (hasClassName(container, 'collapsedBlockCollapsible')) {
+        replaceClassName(container, 'collapsedBlockCollapsible', 'expandedBlockCollapsible');
+    } else if (hasClassName(container, 'expandedBlockCollapsible')) {
+        replaceClassName(container, 'expandedBlockCollapsible', 'collapsedBlockCollapsible');
+    } else if (hasClassName(container, 'collapsedInlineCollapsible')) {
+        replaceClassName(container, 'collapsedInlineCollapsible', 'expandedInlineCollapsible');
+    } else if (hasClassName(container, 'expandedInlineCollapsible')) {
+        replaceClassName(container, 'expandedInlineCollapsible', 'collapsedInlineCollapsible');
+    }
+};
+
+function activateCollapsibles() {
+    if (!W3CDOM) {return false;}
+
+    var collapsibles = cssQuery('dl.collapsible');
+    for (var i=0; i < collapsibles.length; i++) {
+        var collapsible = collapsibles[i];
+
+        var collapsible_header = cssQuery('dt.collapsibleHeader', collapsible)[0];
+        collapsible_header.onclick = toggleCollapsible;
+
+        if (hasClassName(collapsible, 'inline')) {
+            // the collapsible should be inline
+            if (hasClassName(collapsible, 'collapsedOnLoad')) {
+                replaceClassName(collapsible, 'collapsedOnLoad', 'collapsedInlineCollapsible');
+            } else {
+                addClassName(collapsible, 'expandedInlineCollapsible');
+            }
+        } else {
+            // the collapsible is a block
+            if (hasClassName(collapsible, 'collapsedOnLoad')) {
+                replaceClassName(collapsible, 'collapsedOnLoad', 'collapsedBlockCollapsible');
+            } else {
+                addClassName(collapsible, 'expandedBlockCollapsible');
+            }
+        }
+    }
+};
+
+registerPloneFunction(activateCollapsibles);

Modified: cs/portal/trunk/northridge/SeismoWebPortal/static/style.css
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/static/style.css	2008-05-12 21:22:42 UTC (rev 11958)
+++ cs/portal/trunk/northridge/SeismoWebPortal/static/style.css	2008-05-13 04:16:02 UTC (rev 11959)
@@ -21,7 +21,7 @@
 #header {
     position: fixed;
     top: 0;
-    left 0;
+    left: 0;
     right: 0;
     width: 100%;
     z-index: 1;
@@ -363,6 +363,58 @@
 
 
 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  collapsible help
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+.help.collapsedInlineCollapsible {
+    display: inline;
+}
+
+.help.collapsedInlineCollapsible .collapsibleHeader {
+    display: inline;
+}
+
+.help.collapsedOnLoad .collapsibleContent,
+.help.collapsedInlineCollapsible .collapsibleContent,
+.help.collapsedBlockCollapsible .collapsibleContent {
+    display: none;
+}
+
+.collapsibleHeader {
+    cursor: pointer;
+    color: #00f;
+}
+
+.collapsibleHeader img {
+    vertical-align: middle;
+}
+
+.help.expandedInlineCollapsible {
+    display: block;
+}
+
+.help.expandedInlineCollapsible .collapsibleContent,
+.help.expandedBlockCollapsible .collapsibleContent {
+    display: block;
+    border-style: double;
+    border-color: black;
+    background-color: #ffc;
+    padding: 1em;
+    margin-left: 16px;
+}
+
+.help .collapsibleContent dt {
+    font-weight: bold;
+}
+
+.help div.illustration {
+    border: 1px solid black;
+    padding: 1em 1em 1em 1em;
+    background-color: white;
+}
+
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   misc.
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_upload.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_upload.html	2008-05-12 21:22:42 UTC (rev 11958)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_upload.html	2008-05-13 04:16:02 UTC (rev 11959)
@@ -1,17 +1,6 @@
 
 <h2>upload event</h2>
 
-<div class=toolbar>
-    <form method="post" action="/specfem3dglobe/help/toggle/">
-        <input type="hidden" name="post_toggle_redirect" value="/specfem3dglobe/events/upload/">
-        {% if help_visible %}
-        <input type="submit" name="hide_help" value="Hide Help" />
-        {% else %}
-        <input type="submit" name="show_help" value="Show Help" />
-        {% endif %}
-    </form>
-</div>
-
 <form action="/specfem3dglobe/?class=Event&action=upload" method="post" enctype="multipart/form-data">
 
     {% if form.has_errors %}
@@ -34,10 +23,10 @@
 
 </form>
 
-{% if help_visible %}
+<dl class="help collapsible collapsedOnLoad">
+<dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-large.gif"> Help</dt>
+<dd class="collapsibleContent">
 
-<div class=help>
-
 <h3><code>CMTSOLUTION</code> file format</h3>
 
 <p>For any particular earthquake, the <code>CMTSOLUTION</code> file
@@ -54,6 +43,5 @@
     seismic moment, and M<sub>w</sub> is the moment magnitude.</p>
     </div>
 
-</div>
-
-{% endif %}
+</dd>
+</dl>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_2chunks.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_2chunks.html	2008-05-12 21:22:42 UTC (rev 11958)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_2chunks.html	2008-05-13 04:16:02 UTC (rev 11959)
@@ -11,7 +11,7 @@
         <label for="id_angular_width_eta" class=before>angular width <span class=greek>&eta;</span></label>
         {{ form.angular_width_eta }}
         {% if form.angular_width_eta.errors %}<span class=error>{{ form.angular_width_eta.errors|join:", " }}</span>{% endif %}
-        {% if help_visible %}<span class=help>Denotes the width of the second side of the chunk (90&deg; or less). Note that this value may be different from angular width <span class=greek>&xi;</span>.</span>{% endif %}
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>angular width <span class=greek>&eta;</span></dt><dd>Denotes the width of the second side of the chunk (90&deg; or less). Note that this value may be different from angular width <span class=greek>&xi;</span>.</dd></dl></dd></dl>
     </div>
     {% endblock %}
 

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_3chunks.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_3chunks.html	2008-05-12 21:22:42 UTC (rev 11958)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_3chunks.html	2008-05-13 04:16:02 UTC (rev 11959)
@@ -26,7 +26,7 @@
         <label for="id_nproc" class=before>Nproc</label>
         {{ form.nproc }}
         {% if form.nproc.errors %}<span class=error>{{ form.nproc.errors|join:", " }}</span>{% endif %}
-        {% if help_visible %}<span class=help>The number of processors or mesh slices along each side of the chunks. To accommodate the mesh doubling layers, we must have Nex = 8 &times; c &times; Nproc, where c >= 1 is a positive integer.</span>{% endif %}
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>Nproc</dt><dd>The number of processors or mesh slices along each side of the chunks. To accommodate the mesh doubling layers, we must have Nex = 8 &times; c &times; Nproc, where c >= 1 is a positive integer.</dd></dl></dd></dl>
     </div>
     <p>Total number of required processors:
        Nchunks &times; Nproc<span style="vertical-align: super">2</span> =
@@ -41,11 +41,14 @@
     <span class="scripted">= <input name="nex" class="computed" readonly value="?" size="3"></span>
     {% if form.nex.errors %}<span class=error>{{ form.nex.errors|join:", " }}</span>{% endif %}
 
-    {% if help_visible %}
-    <dl class=help>
+    <dl class="help collapsible collapsedOnLoad">
+    <dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-large.gif"> Help</dt>
+    <dd class="collapsibleContent">
+    <dl>
         <dt>Nex</dt><dd><p>The number of spectral elements along each side of the chunks. This number must be 8 &times; a multiple of Nproc defined above. We do not recommend using Nex less than 64 because the curvature of the Earth cannot be honored if one uses too few elements, which results in inaccurate and unstable  simulations.</p></dd>
     </dl>
-    {% endif %}
+    </dd>
+    </dl>
 
     {% endblock %}
 

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_base.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_base.html	2008-05-12 21:22:42 UTC (rev 11958)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_base.html	2008-05-13 04:16:02 UTC (rev 11959)
@@ -26,13 +26,13 @@
         <label for="id_angular_width_xi" class=before>angular width <span class=greek>&xi;</span></label>
         {{ form.angular_width_xi }}
         {% if form.angular_width_xi.errors %}<span class=error>{{ form.angular_width_xi.errors|join:", " }}</span>{% endif %}
-        {% if help_visible %}<span class=help>Denotes the width of one side of the chunk (90&deg; or less).</span>{% endif %}
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>angular width <span class=greek>&xi;</span></dt><dd>Denotes the width of one side of the chunk (90&deg; or less).</dd></dl></dd></dl>
     </div>
     <div>
         <label for="id_angular_width_eta" class=before>angular width <span class=greek>&eta;</span></label>
         {{ form.angular_width_eta }}
         {% if form.angular_width_eta.errors %}<span class=error>{{ form.angular_width_eta.errors|join:", " }}</span>{% endif %}
-        {% if help_visible %}<span class=help>Denotes the width of the second side of the chunk (90&deg; or less). Note that this value may be different from angular width <span class=greek>&xi;</span>.</span>{% endif %}
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>angular width <span class=greek>&eta;</span></dt><dd>Denotes the width of the second side of the chunk (90&deg; or less). Note that this value may be different from angular width <span class=greek>&xi;</span>.</dd></dl></dd></dl>
     </div>
     {% endblock %}
 
@@ -41,19 +41,19 @@
         <label for="id_gamma_rotation_azimuth" class=before><span class=greek>&gamma;</greek> rotation azimuth</label>
         {{ form.gamma_rotation_azimuth }}
         {% if form.gamma_rotation_azimuth.errors %}<span class=error>{{ form.gamma_rotation_azimuth.errors|join:", " }}</span>{% endif %}
-        {% if help_visible %}<span class=help>Defines the rotation angle of the chunk about its center measured counter clockwise from due North (degrees).</span>{% endif %}
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt><span class=greek>&gamma;</greek> rotation azimuth</dt><dd>Defines the rotation angle of the chunk about its center measured counter clockwise from due North (degrees).</dd></dl></dd></dl>
     </div>
     <div>
         <label for="id_center_latitude" class=before>center latitude</label>
         {{ form.center_latitude }}
         {% if form.center_latitude.errors %}<span class=error>{{ form.center_latitude.errors|join:", " }}</span>{% endif %}
-        {% if help_visible %}<span class=help>Defines the latitude of the center of the chunk (degrees).</span>{% endif %}
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>center latitude</dt><dd>Defines the latitude of the center of the chunk (degrees).</dd></dl></dd></dl>
     </div>
     <div>
         <label for="id_center_longitude" class=before>center longitude</label>
         {{ form.center_longitude }}
         {% if form.center_longitude.errors %}<span class=error>{{ form.center_longitude.errors|join:", " }}</span>{% endif %}
-        {% if help_visible %}<span class=help>Defines the longitude of the center of the chunk (degrees).</span>{% endif %}
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>center longitude</dt><dd>Defines the longitude of the center of the chunk (degrees).</dd></dl></dd></dl>
     </div>
     {% endblock %}
 
@@ -67,13 +67,13 @@
         <label for="id_nproc_xi" class=before>Nproc <span class=greek>&xi;</span></label>
         {{ form.nproc_xi }}
         {% if form.nproc_xi.errors %}<span class=error>{{ form.nproc_xi.errors|join:", " }}</span>{% endif %}
-        {% if help_visible %}<span class=help>The number of processors or mesh slices along the <span class=greek>&xi;</span> side of the chunk. To accommodate the mesh doubling layers, we must have Nex <span class=greek>&xi;</span> = 8 &times; c &times; Nproc <span class=greek>&xi;</span>, where c >= 1 is a positive integer.</span>{% endif %}
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>Nproc <span class=greek>&xi;</span></dt><dd>The number of processors or mesh slices along the <span class=greek>&xi;</span> side of the chunk. To accommodate the mesh doubling layers, we must have Nex <span class=greek>&xi;</span> = 8 &times; c &times; Nproc <span class=greek>&xi;</span>, where c >= 1 is a positive integer.</dd></dl></dd></dl>
     </div>
     <div>
         <label for="id_nproc_eta" class=before>Nproc <span class=greek>&eta;</span></label>
         {{ form.nproc_eta }}
         {% if form.nproc_eta.errors %}<span class=error>{{ form.nproc_eta.errors|join:", " }}</span>{% endif %}
-        {% if help_visible %}<span class=help>The number of processors or slices along the <span class=greek>&eta;</span> side of the chunk; we must have Nex <span class=greek>&eta;</span> = 8 &times; c &times; Nproc <span class=greek>&eta;</span>, where c >= 1 is a positive integer.</span>{% endif %}
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>Nproc <span class=greek>&eta;</span></dt><dd>The number of processors or slices along the <span class=greek>&eta;</span> side of the chunk; we must have Nex <span class=greek>&eta;</span> = 8 &times; c &times; Nproc <span class=greek>&eta;</span>, where c >= 1 is a positive integer.</dd></dl></dd></dl>
     </div>
 
     <p>Total number of required processors:
@@ -99,13 +99,16 @@
     <span class="scripted">= <input name="nex_eta" class="computed" readonly value="?" size="3"></span>
     {% if form.nex_eta.errors %}<span class=error>{{ form.nex_eta.errors|join:", " }}</span>{% endif %}
 
-    {% if help_visible %}
-    <dl class=help>
+    <dl class="help collapsible collapsedOnLoad">
+    <dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-large.gif"> Help</dt>
+    <dd class="collapsibleContent">
+    <dl>
         <dt>Nex <span class=greek>&xi;</span></dt><dd><p>The number of spectral elements along the <span class=greek>&xi;</span> side of the chunk. This number must be 8 &times; a multiple of Nproc <span class=greek>&xi;</span> defined above. For a 90&deg; chunk, we do not recommend using Nex <span class=greek>&xi;</span> less than 64 because the curvature of the Earth cannot be honored if one uses too few elements, which results in inaccurate and unstable  simulations.</p></dd>
 
         <dt>Nex <span class=greek>&eta;</span></dt><dd><p>The number of spectral elements along the <span class=greek>&eta;</span> side of the chunk. This number must be 8 &times; a multiple of Nproc <span class=greek>&eta;</span> defined above. Note that in order to get elements that are close to square on the Earth's surface, the following ratios should be similar:</p><blockquote> <div class=formula>angular width <span class=greek>&xi;</span> / Nex <span class=greek>&xi;</span></div> <div class=formula>angular width <span class=greek>&eta;</span> / Nproc <span class=greek>&eta;</span></div> </blockquote><p>Because of the geometry of the cubed sphere, the option of having different values for Nex <span class=greek>&xi;</span> and Nex <span class=greek>&eta;</span> is available only for regional simulations when nchunks = 1 (1/6th of the sphere).</p></dd>
     </dl>
-    {% endif %}
+    </dd>
+    </dl>
 
     {% endblock %}
 

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodecatalog_form.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodecatalog_form.html	2008-05-12 21:22:42 UTC (rev 11958)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodecatalog_form.html	2008-05-13 04:16:02 UTC (rev 11959)
@@ -20,40 +20,40 @@
         <label for="id_eps" class=before>eps</label>
         {{ form.eps }}
         {% if form.eps.errors %}<span class=error>{{ form.eps.errors|join:", " }}</span>{% endif %}
-        {% if help_visible %}<span class=help>The parameter <code>eps</code> controls the accuracy of the Runge-Kutta integration scheme. The relative accuracy 
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>eps</dt><dd>The parameter <code>eps</code> controls the accuracy of the Runge-Kutta integration scheme. The relative accuracy 
 of an eigenfrequency is a factor 2 to 3 times <code>eps</code>. Parameter <code>eps</code> also controls the precision with which 
 a root is found and the minimum relative separation of two roots with the same angular order. It is 
 safe to set eps = 10<span style="vertical-align: super">-7</span> for periods greater than 10 seconds. For periods between 5 and 10 seconds, it 
-has to be set to 10<span style="vertical-align: super">-12</span>&mdash;10<span style="vertical-align: super">-10</span>.</span>{% endif %}
+has to be set to 10<span style="vertical-align: super">-12</span>&mdash;10<span style="vertical-align: super">-10</span>.</dd></dl></dd></dl>
     </div>
 
     <div>
         <label for="id_max_depth" class=before>maximum depth</label> {{ form.max_depth }} km
         {% if form.max_depth.errors %}<span class=error>{{ form.max_depth.errors|join:", " }}</span>{% endif %}
-        {% if help_visible %}<span class=help>Maximum depth, d<span style="vertical-align: sub">max</span>, to cut all output eigenfunctions (in km). All output values exist in the interval 
-(r<span style="vertical-align: sub">n</span>, r<span style="vertical-align: sub">n</span> - d<span style="vertical-align: sub">max</span>) only, where r<span style="vertical-align: sub">n</span> is the radius of the free surface in km.</span>{% endif %}
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>maximum depth</dt><dd>Maximum depth, d<span style="vertical-align: sub">max</span>, to cut all output eigenfunctions (in km). All output values exist in the interval 
+(r<span style="vertical-align: sub">n</span>, r<span style="vertical-align: sub">n</span> - d<span style="vertical-align: sub">max</span>) only, where r<span style="vertical-align: sub">n</span> is the radius of the free surface in km.</dd></dl></dd></dl>
     </div>
 
     </div> <!-- tab30ex -->
 
 
     <p>Neglect gravitational terms above {{ form.wgrav }} mHz. {% if form.wgrav.errors %}<span class=error>{{ form.wgrav.errors|join:", " }}</span>{% endif %}
-       {% if help_visible %}<span class=help>This gives about a factor of 3 increase in speed.</span>{% endif %}
+       <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>neglect gravitational terms</dt><dd>This gives about a factor of 3 increase in speed.</dd></dl></dd></dl>
 
     <p><label for="id_lmin" class=before>angular orders</label> {{ form.lmin }} <= l < {{ form.lmax }}
        {% if form.lmin.errors %}<span class=error>{{ form.lmin.errors|join:", " }}</span>{% endif %}
        {% if form.lmax.errors %}<span class=error>{{ form.lmax.errors|join:", " }}</span>{% endif %}
-       {% if help_visible %}<span class=help>The range of angular orders l to be computed. For radial modes, this range is not used.</span>{% endif %}
+       <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>angular orders</dt><dd>The range of angular orders l to be computed. For radial modes, this range is not used.</dd></dl></dd></dl>
 
     <p><label for="id_wmin" class=before>compute frequency range</label> {{ form.wmin }} <= w < {{ form.wmax }} mHz
        {% if form.wmin.errors %}<span class=error>{{ form.wmin.errors|join:", " }}</span>{% endif %}
        {% if form.wmax.errors %}<span class=error>{{ form.wmax.errors|join:", " }}</span>{% endif %}
-       {% if help_visible %}<span class=help>The frequency range to be computed (in millihertz).</span>{% endif %}
+       <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>compute frequency range</dt><dd>The frequency range to be computed (in millihertz).</dd></dl></dd></dl>
 
     <p><label for="id_nmin" class=before>dispersion branch numbers</label> {{ form.nmin }} <= n < {{ form.nmax }}
        {% if form.nmin.errors %}<span class=error>{{ form.nmin.errors|join:", " }}</span>{% endif %}
        {% if form.nmax.errors %}<span class=error>{{ form.nmax.errors|join:", " }}</span>{% endif %}
-       {% if help_visible %}<span class=help>The range of dispersion branch numbers n to be computed; n = 0 is the fundamental mode.</span>{% endif %}
+       <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>dispersion branch numbers</dt><dd>The range of dispersion branch numbers n to be computed; n = 0 is the fundamental mode.</dd></dl></dd></dl>
 
 
     <div class=tab30ex>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters_form.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters_form.html	2008-05-12 21:22:42 UTC (rev 11958)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters_form.html	2008-05-13 04:16:02 UTC (rev 11959)
@@ -1,17 +1,6 @@
 
 <h2>{% if object %}edit{% else %}new{% endif %} Mineos parameters</h2>
 
-<div class=toolbar>
-    <form method="post" action="/specfem3dglobe/help/toggle/">
-        <input type="hidden" name="post_toggle_redirect" value="{{ action }}">
-        {% if help_visible %}
-        <input type="submit" name="hide_help" value="Hide Help" />
-        {% else %}
-        <input type="submit" name="show_help" value="Show Help" />
-        {% endif %}
-    </form>
-</div>
-
 <form method="post" action="/specfem3dglobe/">
     <input type="hidden" name="class" value="MineosParameters">
     {% if object %}
@@ -72,15 +61,20 @@
     <p><label for="id_fmin" class=before>select frequency range</label> {{ form.fmin }} <= f < {{ form.fmax }} mHz
        {% if form.fmin.errors %}<span class=error>{{ form.fmin.errors|join:", " }}</span>{% endif %}
        {% if form.fmax.errors %}<span class=error>{{ form.fmax.errors|join:", " }}</span>{% endif %}
-       {% if help_visible %}<span class=help>The frequency range to be selected from the input eigenfunction databases. All 
-modes with frequencies out of this range are rejected.</span>{% endif %}
 
     <p><label for="id_step" class=before>sampling period</label> {{ form.step }} s
        {% if form.step.errors %}<span class=error>{{ form.step.errors|join:", " }}</span>{% endif %}
-       {% if help_visible %}<span class=help>This determines the number of samples in the synthetic seismograms. All synthetic seismograms start from the 
-source time.</span>{% endif %}
 
+    <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-large.gif"> Help</dt>
+    <dd class="collapsibleContent">
+        <dl>
+            <dt>select frequency range</dt><dd>The frequency range to be selected from the input eigenfunction databases. All modes with frequencies out of this range are rejected.</dd>
+            <dt>sampling period</dt><dd>This determines the number of samples in the synthetic seismograms. All synthetic seismograms start from the source time.</dd>
+        </dl>
+    </dd>
+    </dl>
 
+
     <div class=tab30ex>
 
     <div><input class=submit type="submit" name="save" value="Save" />

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_form.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_form.html	2008-05-12 21:22:42 UTC (rev 11958)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_form.html	2008-05-13 04:16:02 UTC (rev 11959)
@@ -34,50 +34,66 @@
         <label for="id_model" class=before>model</label>
         {{ form.model }}
         {% if form.model.errors %}<span class=error>{{ form.model.errors|join:", " }}</span>{% endif %}
+
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt>
+        <dd class="collapsibleContent">
+        <dl>
+            <dt>crust2.0+prem</dt><dd>This model has CRUST2.0 [Bassin et al., 2000] on top of a transversely isotropic PREM. We first extrapolate PREM mantle velocity up to the surface, then overwrite the model with CRUST2.0.</dd>
+
+            <dt>s20rts</dt><dd>By default, the code uses 3D mantle model S20RTS [Ritsema et al., 1999] and 3D crustal model Crust2.0 [Bassin et al., 2000]. Note that S20RTS uses transversely isotropic PREM as a background model, and that we use the PREM radial attenuation model when 'attenuation' is selected.</dd>
+
+            <dt>s362ani</dt><dd>A global shear-wave speed model developed by Kustowski et al. [2006]. In this model, radial anisotropy is confined to the uppermost mantle. The model (and the corresponding mesh) incorporate tomography on the 650~km and 410~km discontinuities in the 1D reference model REF.</dd>
+
+            <dt>s362wmani</dt><dd>A version of S362ANI with anisotropy allowed throughout the mantle.</dd>
+            <dt>s362ani+prem</dt><dd>A version of S362ANI calculated using PREM as the 1D reference model.</dd>
+            <dt>s29ea</dt><dd>A global model with higher resolution in the upper mantle beneath Eurasia calculated using REF as the 1D reference model.</dd>
+        </dl>
+        </dd>
+        </dl>
+
     </div>
 
     <div class=checkbox>
         {{ form.oceans }}
         <label for="id_oceans" class=after>oceans</label>
         {% if form.oceans.errors %}<span class=error>{{ form.oceans.errors|join:", " }}</span>{% endif %}
-        {% if help_visible %}<span class=help>If selected, the effect of the oceans on seismic wave propagation will be incorporated based upon the approximate treatment discussed in Komatitsch and Tromp [2002b]. This feature is inexpensive from a numerical perspective, both in terms of memory requirements and CPU time. This approximation is accurate at periods of roughly 20s and longer. At shorter periods the effect of water phases/reverberations is not taken into account, even when the flag is on.</span>{% endif %}
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>oceans</dt><dd>If selected, the effect of the oceans on seismic wave propagation will be incorporated based upon the approximate treatment discussed in Komatitsch and Tromp [2002b]. This feature is inexpensive from a numerical perspective, both in terms of memory requirements and CPU time. This approximation is accurate at periods of roughly 20s and longer. At shorter periods the effect of water phases/reverberations is not taken into account, even when the flag is on.</dd></dl></dd></dl>
     </div>
 
     <div class=checkbox>
         {{ form.gravity }}
         <label for="id_gravity" class=after>gravity</label>
         {% if form.gravity.errors %}<span class=error>{{ form.gravity.errors|join:", " }}</span>{% endif %}
-        {% if help_visible %}<span class=help>If selected, self-gravitation will be incorporated in the Cowling approximation [Komatitsch and Tromp, 2002b, Dahlen and Tromp, 1998]. Turning this feature on is relatively inexpensive, both from the perspective of memory requirements as well as in terms of computational speed.</span>{% endif %}
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>gravity</dt><dd>If selected, self-gravitation will be incorporated in the Cowling approximation [Komatitsch and Tromp, 2002b, Dahlen and Tromp, 1998]. Turning this feature on is relatively inexpensive, both from the perspective of memory requirements as well as in terms of computational speed.</dd></dl></dd></dl>
     </div>
 
     <div class=checkbox>
         {{ form.attenuation }}
         <label for="id_attenuation" class=after>attenuation</label>
         {% if form.attenuation.errors %}<span class=error>{{ form.attenuation.errors|join:", " }}</span>{% endif %}
-        {% if help_visible %}<span class=help>If selected, attenuation will be incorporated. Turning this feature on increases the memory requirements significantly (roughly by a factor of 1.5), and is numerically fairly expensive. Of course for realistic simulations this flag should be turned on. See Komatitsch and Tromp [1999, 2002a] for a discussion on the implementation of attenuation based upon standard linear solids.</span>{% endif %}
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>attenuation</dt><dd>If selected, attenuation will be incorporated. Turning this feature on increases the memory requirements significantly (roughly by a factor of 1.5), and is numerically fairly expensive. Of course for realistic simulations this flag should be turned on. See Komatitsch and Tromp [1999, 2002a] for a discussion on the implementation of attenuation based upon standard linear solids.</dd></dl></dd></dl>
     </div>
 
     <div class=checkbox>
         {{ form.topography }}
         <label for="id_topography" class=after>topography</label>
         {% if form.topography.errors %}<span class=error>{{ form.topography.errors|join:", " }}</span>{% endif %}
-        {% if help_visible %}<span class=help>If selected, topography and bathymetry will be incorporated based upon model ETOPO5 [NOAA, 1988]. This feature adds no cost to the simulation.</span>{% endif %}
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>topography</dt><dd>If selected, topography and bathymetry will be incorporated based upon model ETOPO5 [NOAA, 1988]. This feature adds no cost to the simulation.</dd></dl></dd></dl>
     </div>
 
     <div class=checkbox>
         {{ form.rotation }}
         <label for="id_rotation" class=after>rotation</label>
         {% if form.rotation.errors %}<span class=error>{{ form.rotation.errors|join:", " }}</span>{% endif %}
-        {% if help_visible %}<span class=help>If selected, the Coriolis effect will be incorporated. Turning this feature on is relatively cheap 
-numerically.</span>{% endif %}
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>rotation</dt><dd>If selected, the Coriolis effect will be incorporated. Turning this feature on is relatively cheap 
+numerically.</dd></dl></dd></dl>
     </div>
 
     <div class=checkbox>
         {{ form.ellipticity }}
         <label for="id_ellipticity" class=after>ellipticity</label>
         {% if form.ellipticity.errors %}<span class=error>{{ form.ellipticity.errors|join:", " }}</span>{% endif %}
-        {% if help_visible %}<span class=help>If selected, the mesh will make the Earth model elliptical in shape according to
- Clairaut's equation [Dahlen and Tromp, 1998]. This feature adds no cost to the simulation.</span>{% endif %}
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>ellipticity</dt><dd>If selected, the mesh will make the Earth model elliptical in shape according to Clairaut's equation [Dahlen and Tromp, 1998]. This feature adds no cost to the simulation.</dd></dl></dd></dl>
     </div>
 
 

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/stationlist_upload.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/stationlist_upload.html	2008-05-12 21:22:42 UTC (rev 11958)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/stationlist_upload.html	2008-05-13 04:16:02 UTC (rev 11959)
@@ -1,17 +1,6 @@
 
 <h2>upload station list</h2>
 
-<div class=toolbar>
-    <form method="post" action="/specfem3dglobe/help/toggle/">
-        <input type="hidden" name="post_toggle_redirect" value="/specfem3dglobe/stations/upload/">
-        {% if help_visible %}
-        <input type="submit" name="hide_help" value="Hide Help" />
-        {% else %}
-        <input type="submit" name="show_help" value="Show Help" />
-        {% endif %}
-    </form>
-</div>
-
 <form action="/specfem3dglobe/?class=StationList&action=upload" method="POST" enctype="multipart/form-data">
 
     {% if form.has_errors %}
@@ -36,10 +25,10 @@
 
 </form>
 
-{% if help_visible %}
+<dl class="help collapsible collapsedOnLoad">
+<dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-large.gif"> Help</dt>
+<dd class="collapsibleContent">
 
-<div class=help>
-
 <h3><code>STATIONS</code> file format</h3>
 
 <p>The solver can calculate seismograms at any number of stations for
@@ -75,6 +64,5 @@
 <p><a href="/specfem3dglobe/samples/STATIONS.txt">Click here</a> to
 download a sample <code>STATIONS</code> file.</p>
 
-</div>
-
-{% endif %}
+</dd>
+</dl>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/urls.py
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/urls.py	2008-05-12 21:22:42 UTC (rev 11958)
+++ cs/portal/trunk/northridge/SeismoWebPortal/urls.py	2008-05-13 04:16:02 UTC (rev 11959)
@@ -42,9 +42,6 @@
     # output files
     (r'^output/create/$', 'SeismoWebPortal.views.daemon_post', dict(modelName='OutputFile', action='create')),
 
-    # help
-    (r'^help/toggle/$', 'SeismoWebPortal.views.help_toggle'),
-
     (r'^(.*)', 'django.views.static.serve', dict(document_root = STATIC_ROOT)),
 )
 

Modified: cs/portal/trunk/northridge/SeismoWebPortal/views.py
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/views.py	2008-05-12 21:22:42 UTC (rev 11958)
+++ cs/portal/trunk/northridge/SeismoWebPortal/views.py	2008-05-13 04:16:02 UTC (rev 11959)
@@ -182,7 +182,6 @@
             user = manipulator.get_user()
             login(request, user)
             request.session.delete_test_cookie()
-            help_login_hook(request, user)
             return HttpResponseRedirect(redirect_to)
     else:
         errors = {}
@@ -396,7 +395,6 @@
             if not errors:
                 if isNewUser:
                     request.session.delete_test_cookie()
-                    help_login_hook(request, user)
                     notify_managers_of_new_user(request, user)
                     user.message_set.create(message="Welcome to the SPECFEM 3D GLOBE web portal!")
                 else:
@@ -473,55 +471,6 @@
 
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-# Help
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
-def help_toggle(request):
-    if request.method != 'POST':
-        raise Http404
-    
-    data = request.POST
-    if data.has_key('show_help'):
-        help_visible = True
-    elif data.has_key('hide_help'):
-        help_visible = False
-
-    request.session['help_visible'] = help_visible
-    try:
-        userInfo = request.user.userinfo
-        userInfo.help_visible = help_visible
-        userInfo.save()
-    except models.UserInfo.DoesNotExist:
-        pass
-
-    post_toggle_redirect = data['post_toggle_redirect']
-    return HttpResponseRedirect(post_toggle_redirect)
-
-
-def get_help_visible(request):
-    help_visible = request.session.get('help_visible', None)
-    if help_visible is None:
-        help_visible = False
-        try:
-            userInfo = request.user.userinfo
-            help_visible = userInfo.help_visible
-        except models.UserInfo.DoesNotExist:
-            pass
-        request.session['help_visible'] = help_visible
-    return help_visible
-
-
-def help_login_hook(request, user):
-    try:
-        userInfo = user.userinfo
-        request.session['help_visible'] = userInfo.help_visible
-    except models.UserInfo.DoesNotExist:
-        request.session['help_visible'] = False
-    return
-
-
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 # Mineos
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 



More information about the cig-commits mailing list