[geeklog-hg] geeklog: Merged with HEAD

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sat Jan 4 04:25:59 EST 2014


changeset 9379:87eeb1abebdd
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/87eeb1abebdd
user: Kenji ITO <mystralkk at gmail.com>
date: Sat Jan 04 18:23:14 2014 +0900
description:
Merged with HEAD

diffstat:

 public_html/admin/block.php                                       |  20 +-
 public_html/layout/denim/admin/block/blockeditor.thtml            |   6 +-
 public_html/layout/modern_curve/admin/block/blockeditor.thtml     |   8 +-
 public_html/layout/professional/admin/block/blockeditor.thtml     |  96 ++++++---
 public_html/layout/professional_css/admin/block/blockeditor.thtml |   6 +-
 5 files changed, 88 insertions(+), 48 deletions(-)

diffs (247 lines):

diff -r bb98e4449d0d -r 87eeb1abebdd public_html/admin/block.php
--- a/public_html/admin/block.php	Sat Jan 04 14:53:49 2014 +0900
+++ b/public_html/admin/block.php	Sat Jan 04 18:23:14 2014 +0900
@@ -170,7 +170,7 @@
 function editblock ($bid = '')
 {
     global $_CONF, $_GROUPS, $_TABLES, $_USER, $LANG01, $LANG21, $LANG_ACCESS,
-           $LANG_ADMIN, $MESSAGE;
+           $LANG_ADMIN, $MESSAGE, $_SCRIPTS;
 
     $retval = '';
 
@@ -351,6 +351,24 @@
     $block_templates->parse('output', 'editor');
     $retval .= $block_templates->finish($block_templates->get_var('output'));
 
+    // Shows/Hides relevant block options dynamically
+    $_SCRIPTS->setJavaScript("
+jQuery(function () {
+    var $ = jQuery;
+    $('#admin-blockeditor-type').on('change', function () {
+        var fs, i, fieldsets = ['normal', 'phpblock', 'portal'];
+        
+        for (i = 0; i < 3; i++) {
+            if (this.value === fieldsets[i]) {
+                $('#fs-' + fieldsets[i] + '-options').show();
+            } else {
+                $('#fs-' + fieldsets[i] + '-options').hide();
+            }
+        }
+    })
+    .trigger('change');
+});", true, true);
+
     return $retval;
 }
 
diff -r bb98e4449d0d -r 87eeb1abebdd public_html/layout/denim/admin/block/blockeditor.thtml
--- a/public_html/layout/denim/admin/block/blockeditor.thtml	Sat Jan 04 14:53:49 2014 +0900
+++ b/public_html/layout/denim/admin/block/blockeditor.thtml	Sat Jan 04 18:23:14 2014 +0900
@@ -51,7 +51,7 @@
       <dd class="description">{lang_cachetime_desc}</dd>        
     </dl>
 
-    <fieldset>
+    <fieldset id="fs-phpblock-options">
       <legend>{lang_phpblockoptions}</legend>
 
       <dl class="form_block">
@@ -61,7 +61,7 @@
       </dl>
     </fieldset>
 
-    <fieldset>
+    <fieldset id="fs-portal-options">
       <legend>{lang_portalblockoptions}</legend>
 
       <dl class="form_block">
@@ -76,7 +76,7 @@
       </dl>
     </fieldset>
 
-    <fieldset>
+    <fieldset id="fs-normal-options">
       <legend>{lang_normalblockoptions}</legend>
 
       <dl class="form_block">
diff -r bb98e4449d0d -r 87eeb1abebdd public_html/layout/modern_curve/admin/block/blockeditor.thtml
--- a/public_html/layout/modern_curve/admin/block/blockeditor.thtml	Sat Jan 04 14:53:49 2014 +0900
+++ b/public_html/layout/modern_curve/admin/block/blockeditor.thtml	Sat Jan 04 18:23:14 2014 +0900
@@ -52,17 +52,17 @@
     </dl>
   </div>
 
-  <fieldset>
+  <fieldset id="fs-phpblock-options">
     <legend>{lang_phpblockoptions}</legend>
 
     <dl>
-      <dt></dt>
+      <dt><label for="admin-blockeditor-phpblockfn">{lang_blockfunction}</label></dt>
       <dd><input type="text" size="40" maxlength="50" value="{block_phpblockfn}" name="phpblockfn" id="admin-blockeditor-phpblockfn" class="text"{xhtml}></dd>
       <dd class="description">{lang_phpblockwarning}</dd>
     </dl>
   </fieldset>
 
-  <fieldset>
+  <fieldset id="fs-portal-options">
     <legend>{lang_portalblockoptions}</legend>
 
     <dl>
@@ -77,7 +77,7 @@
     </dl>
   </fieldset>
 
-  <fieldset>
+  <fieldset id="fs-normal-options">
     <legend>{lang_normalblockoptions}</legend>
 
     <dl>
diff -r bb98e4449d0d -r 87eeb1abebdd public_html/layout/professional/admin/block/blockeditor.thtml
--- a/public_html/layout/professional/admin/block/blockeditor.thtml	Sat Jan 04 14:53:49 2014 +0900
+++ b/public_html/layout/professional/admin/block/blockeditor.thtml	Sat Jan 04 18:23:14 2014 +0900
@@ -39,7 +39,7 @@
                                         <tr>
                                             <td class="alignright">{lang_blocktype}:</td>
                                             <td>
-                                                <select name="type">
+                                                <select name="type" id="admin-blockeditor-type">
                                                     <option value="normal" {normal_selected}>{lang_normalblock}</option>
                                                     <option value="phpblock" {php_selected}>{lang_phpblock}</option>
                                                     <option value="portal" {portal_selected}>{lang_portalblock}</option>
@@ -54,46 +54,68 @@
                                             <td colspan="2"><hr{xhtml}></td>
                                         </tr>
                                         <tr>
-                                            <td colspan="2"><b>{lang_phpblockoptions}</b></td>
+                                            <td colspan="2">
+                                                <table id="fs-phpblock-options">
+                                                    <tr>
+                                                        <td colspan="2"><b>{lang_phpblockoptions}</b></td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td class="alignright">{lang_blockfunction}:</td>
+                                                        <td><input type="text" size="50" maxlength="64" name="phpblockfn" value="{block_phpblockfn}"{xhtml}></td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td colspan="2">{lang_phpblockwarning}</td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td colspan="2"><hr{xhtml}></td>
+                                                    </tr>
+                                                </table>
+                                            </td>
                                         </tr>
                                         <tr>
-                                            <td class="alignright">{lang_blockfunction}:</td>
-                                            <td><input type="text" size="50" maxlength="64" name="phpblockfn" value="{block_phpblockfn}"{xhtml}></td>
+                                            <td colspan="2">
+                                                <table id="fs-portal-options">
+                                                    <tr>
+                                                        <td colspan="2"><b>{lang_portalblockoptions}</b></td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td class="alignright">{lang_rdfurl}:</td>
+                                                        <td><input type="text" dir="ltr" size="50" maxlength="{max_url_length}" name="rdfurl" value="{block_rdfurl}"{xhtml}></td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td class="alignright">{lang_rdflimit}:</td>
+                                                        <td><input type="text" size="3" maxlength="3" name="rdflimit" value="{block_rdflimit}"{xhtml}></td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td class="alignright">{lang_lastrdfupdate}:</td>
+                                                        <td><input type="text" size="19" name="rdfupdated" value="{block_rdfupdated}"{xhtml}></td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td colspan="2"><hr{xhtml}></td>
+                                                    </tr>
+                                                </table>
+                                            </td>
                                         </tr>
                                         <tr>
-                                            <td colspan="2">{lang_phpblockwarning}</td>
-                                        </tr>
-                                        <tr><td colspan="2"><hr{xhtml}></td></tr>
-                                        <tr>
-                                            <td colspan="2"><b>{lang_portalblockoptions}</b></td>
-                                        </tr>
-                                        <tr>
-                                            <td class="alignright">{lang_rdfurl}:</td>
-                                            <td><input type="text" dir="ltr" size="50" maxlength="{max_url_length}" name="rdfurl" value="{block_rdfurl}"{xhtml}></td>
-                                        </tr>
-                                        <tr>
-                                            <td class="alignright">{lang_rdflimit}:</td>
-                                            <td><input type="text" size="3" maxlength="3" name="rdflimit" value="{block_rdflimit}"{xhtml}></td>
-                                        </tr>
-                                        <tr>
-                                            <td class="alignright">{lang_lastrdfupdate}:</td>
-                                            <td><input type="text" size="19" name="rdfupdated" value="{block_rdfupdated}"{xhtml}></td>
-                                        </tr>
-                                        <tr><td colspan="2"><hr{xhtml}></td></tr>
-                                        <tr>
-                                            <td colspan="2"><b>{lang_normalblockoptions}</b></td>
-                                        </tr>
-                                        <tr>
-                                            <td class="alignright" style="vertical-align:top">{lang_blockcontent}:</td>
-                                            <td><textarea name="content" cols="45" rows="12" style="width:100%;">{block_content}</textarea><br{xhtml}>
-                                                <span class="warningsmall">{lang_allowed_html}</span></td>
-                                        </tr>
-                                        <tr>
-                                            <td class="alignright">{lang_autotags}:</td>
-                                            <td><input type="checkbox" name="allow_autotags" {allow_autotags}{xhtml}> ({lang_use_autotags})</td>
-                                        </tr>
-                                        <tr>
-                                            <td colspan="2"><hr{xhtml}></td>
+                                            <td colspan="2">
+                                                <table id="fs-normal-options">
+                                                    <tr>
+                                                        <td colspan="2"><b>{lang_normalblockoptions}</b></td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td class="alignright" style="vertical-align:top">{lang_blockcontent}:</td>
+                                                        <td><textarea name="content" cols="45" rows="12" style="width:100%;">{block_content}</textarea><br{xhtml}>
+                                                            <span class="warningsmall">{lang_allowed_html}</span></td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td class="alignright">{lang_autotags}:</td>
+                                                        <td><input type="checkbox" name="allow_autotags" {allow_autotags}{xhtml}> ({lang_use_autotags})</td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td colspan="2"><hr{xhtml}></td>
+                                                    </tr>
+                                                </table>
+                                            </td>
                                         </tr>
                                         <tr>
                                             <td colspan="2"><b>{lang_accessrights}</b></td>
diff -r bb98e4449d0d -r 87eeb1abebdd public_html/layout/professional_css/admin/block/blockeditor.thtml
--- a/public_html/layout/professional_css/admin/block/blockeditor.thtml	Sat Jan 04 14:53:49 2014 +0900
+++ b/public_html/layout/professional_css/admin/block/blockeditor.thtml	Sat Jan 04 18:23:14 2014 +0900
@@ -52,7 +52,7 @@
     </dl>
   </div>
 
-  <fieldset>
+  <fieldset id="fs-phpblock-options">
     <legend>{lang_phpblockoptions}</legend>
 
     <dl>
@@ -62,7 +62,7 @@
     </dl>
   </fieldset>
 
-  <fieldset>
+  <fieldset id="fs-portal-options">
     <legend>{lang_portalblockoptions}</legend>
 
     <dl>
@@ -77,7 +77,7 @@
     </dl>
   </fieldset>
 
-  <fieldset>
+  <fieldset id="fs-normal-options">
     <legend>{lang_normalblockoptions}</legend>
 
     <dl>



More information about the geeklog-cvs mailing list