[geeklog-cvs] geeklog: In the Group Editor, hide the 'Apply "Default Group" ch...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Thu May 13 10:42:18 EDT 2010


changeset 7933:85b1a6e95611
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/85b1a6e95611
user: Dirk Haun <dirk at haun-online.de>
date: Thu May 13 16:40:32 2010 +0200
description:
In the Group Editor, hide the 'Apply "Default Group" change' option until the state of the "Default Group" checkbox changes (feature request #0001116, patch provided by Dushyant Tiwari)

diffstat:

 public_html/docs/english/theme.html                           |  13 +++++++-
 public_html/docs/history                                      |   4 ++
 public_html/javascript/common.js                              |  18 ++++++++--
 public_html/layout/professional/admin/group/groupeditor.thtml |  10 ++++-
 4 files changed, 37 insertions(+), 8 deletions(-)

diffs (97 lines):

diff -r c6030829e27f -r 85b1a6e95611 public_html/docs/english/theme.html
--- a/public_html/docs/english/theme.html	Thu May 13 16:04:38 2010 +0200
+++ b/public_html/docs/english/theme.html	Thu May 13 16:40:32 2010 +0200
@@ -201,7 +201,18 @@
 </ol>
 
 
-<h2><a name="changes">Theme changes in Geeklog 1.7.0</a></h2>
+<h2><a name="changes">Theme changes in Geeklog 1.7.1</a></h2>
+<p><small>(just collection for now - to be cleaned up before release)</small></p>
+<ul>
+<li>Changed the <code>chk_grpdefault</code> and <code>chk_applydefault</code>
+    checkboxes in <tt>admin/group/groupeditor.thtml</tt> so that the "apply
+    Default Group change" option only shows up when the state of the Default
+    Group checkbox changes (requires an additional piece of JavaScript in
+    <tt>javascript/common.js</tt>).</li>
+</ul>
+
+
+<h2><a name="changes170">Theme changes in Geeklog 1.7.0</a></h2>
 
 <h3>Admin templates</h3>
 <ul>
diff -r c6030829e27f -r 85b1a6e95611 public_html/docs/history
--- a/public_html/docs/history	Thu May 13 16:04:38 2010 +0200
+++ b/public_html/docs/history	Thu May 13 16:40:32 2010 +0200
@@ -3,6 +3,10 @@
 ??? ?, 2010 (1.7.1)
 -----------
 
+- In the Group Editor, hide the 'Apply "Default Group" change' option until the
+  state of the "Default Group" checkbox changes (feature request #0001116,
+  patch provided by Dushyant Tiwari)
+
 - New and updated French (France) language files, provided by Ben
 
 
diff -r c6030829e27f -r 85b1a6e95611 public_html/javascript/common.js
--- a/public_html/javascript/common.js	Thu May 13 16:04:38 2010 +0200
+++ b/public_html/javascript/common.js	Thu May 13 16:40:32 2010 +0200
@@ -1,13 +1,13 @@
 /* Reminder: always indent with 4 spaces (no tabs). */
 // +---------------------------------------------------------------------------+
-// | Geeklog 1.6                                                               |
+// | Geeklog 1.7                                                               |
 // +---------------------------------------------------------------------------+
-// | Commmon javascript functions                                              |
+// | Commmon JavaScript functions                                              |
 // |                                                                           |
 // +---------------------------------------------------------------------------+
-// | Copyright (C) 2005-2009 by the following authors:                         |
+// | Copyright (C) 2005-2010 by the following authors:                         |
 // |                                                                           |
-// |            Blaine Lang - blaine at portalparts.com                           |
+// |            Blaine Lang - blaine AT portalparts DOT com                    |
 // +---------------------------------------------------------------------------+
 // |                                                                           |
 // | This program is free software; you can redistribute it and/or             |
@@ -71,3 +71,13 @@
             elementToggle(id);
         }
     }
+
+//Basic function to hide the default option checkbox
+//displays the other checkbox on selecting the first checkbox.
+//used in the default group selection
+
+    function showHide(id1) {
+        el1 = document.getElementById(id1);
+        el1.style.display = (el1.style.display != 'block')? 'block' : 'none';
+    }
+
diff -r c6030829e27f -r 85b1a6e95611 public_html/layout/professional/admin/group/groupeditor.thtml
--- a/public_html/layout/professional/admin/group/groupeditor.thtml	Thu May 13 16:04:38 2010 +0200
+++ b/public_html/layout/professional/admin/group/groupeditor.thtml	Thu May 13 16:40:32 2010 +0200
@@ -16,14 +16,18 @@
                                     </tr>
                                     <tr{hide_defaultoption}>
                                         <td class="alignright">{lang_defaultgroup}:</td>
-                                        <td><input type="checkbox" name="chk_grpdefault" value="1" {chk_defaultuse}{xhtml}>
+                                        <td>
+                                            <input type="checkbox" name="chk_grpdefault" id="chk1" onclick="showHide('msg1')" value="1" {chk_defaultuse}{xhtml}>
                                             <span class="fieldhelp">{lang_defaultgrp_msg}</span>
                                         </td>
                                     </tr>
                                     <tr id="applydefault_row" {hide_defaultoption}>
                                         <td class="alignright"> </td>
-                                        <td><input type="checkbox" name="chk_applydefault" value="1"{xhtml}>
-                                            <span class="fieldhelp">{lang_applydefault_msg}</span>
+                                        <td>
+                                            <div style="display:none" id="msg1">
+                                                <input type="checkbox" name="chk_applydefault" id="chk2" value="1"{xhtml}>
+                                                <span class="fieldhelp">{lang_applydefault_msg}</span>
+                                            </div>
                                         </td>
                                     </tr>
                                     <tr>



More information about the geeklog-cvs mailing list