[geeklog-hg] geeklog: Changed "Auto Delete" option in story editor into a che...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Wed Apr 3 06:09:29 EDT 2013


changeset 9028:8bc9671df054
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/8bc9671df054
user: Kenji ITO <mystralkk at gmail.com>
date: Wed Apr 03 19:08:46 2013 +0900
description:
Changed "Auto Delete" option in story editor into a checkbox (bug #0001571)

diffstat:

 public_html/javascript/story_editor.js                                     |  11 ++++--
 public_html/layout/denim/admin/story/storyeditor.thtml                     |  14 ++++----
 public_html/layout/denim/admin/story/storyeditor_advanced.thtml            |  14 ++++----
 public_html/layout/modern_curve/admin/story/storyeditor.thtml              |  14 ++++----
 public_html/layout/modern_curve/admin/story/storyeditor_advanced.thtml     |  14 ++++----
 public_html/layout/professional/admin/story/storyeditor.thtml              |  15 ++++------
 public_html/layout/professional/admin/story/storyeditor_advanced.thtml     |  15 ++++------
 public_html/layout/professional_css/admin/story/storyeditor.thtml          |  14 ++++----
 public_html/layout/professional_css/admin/story/storyeditor_advanced.thtml |  14 ++++----
 9 files changed, 61 insertions(+), 64 deletions(-)

diffs (300 lines):

diff -r 0ca924e03ea3 -r 8bc9671df054 public_html/javascript/story_editor.js
--- a/public_html/javascript/story_editor.js	Tue Apr 02 20:31:06 2013 -0400
+++ b/public_html/javascript/story_editor.js	Wed Apr 03 19:08:46 2013 +0900
@@ -55,9 +55,10 @@
     }
 
     $(function() {
-        var cmt_close_flag = $("input[name='cmt_close_flag']").attr("checked");
+        var cmt_close_flag = $("input[name='cmt_close_flag']")[0].checked;
         var s = $("select");
-        if (cmt_close_flag !== "checked") {
+
+        if (!cmt_close_flag) {
             s.filter("[name='cmt_close_month']").attr("disabled","disabled");
             s.filter("[name='cmt_close_day']").attr("disabled","disabled");
             s.filter("[name='cmt_close_year']").attr("disabled","disabled");
@@ -66,8 +67,9 @@
             s.filter("[name='cmt_close_ampm']").attr("disabled","disabled");
         }
 
-        var archiveflag = $("input[name='archiveflag']").attr("checked");
-        if (archiveflag !== "checked") {
+        var archiveflag = $("input[name='archiveflag']")[0].checked;
+
+        if (!archiveflag) {
             s.filter("[name='expire_month']").attr("disabled","disabled");
             s.filter("[name='expire_day']").attr("disabled","disabled");
             s.filter("[name='expire_year']").attr("disabled","disabled");
@@ -76,6 +78,7 @@
             s.filter("[name='expire_ampm']").attr("disabled","disabled");
             s.filter("[name='storycode10']").attr("disabled","disabled");
             s.filter("[name='storycode11']").attr("disabled","disabled");
+            $("#storycode11").attr("disabled", "disabled");
         }
     });
 
diff -r 0ca924e03ea3 -r 8bc9671df054 public_html/layout/denim/admin/story/storyeditor.thtml
--- a/public_html/layout/denim/admin/story/storyeditor.thtml	Tue Apr 02 20:31:06 2013 -0400
+++ b/public_html/layout/denim/admin/story/storyeditor.thtml	Wed Apr 03 19:08:46 2013 +0900
@@ -51,11 +51,11 @@
 
       <dt><label for="admin-storyeditor-archiveflag">{lang_archivetitle}</label></dt>
       <dd>
-        {lang_enabled} 
+        <label for="admin-storyeditor-archiveflag">{lang_enabled}</label> 
         <input type="checkbox" value="1" {is_checked2} onclick="enablearchive(this);" name="archiveflag" id="admin-storyeditor-archiveflag"{xhtml}>
-        <input type="radio" name="statuscode" id="storycode10" value="10" {is_checked3}{xhtml}>{lang_optionarchive}
-            <input type="radio" name="statuscode" id="storycode11" value="11" {is_checked4}{xhtml}>
-         {lang_optiondelete}
+        <input type="checkbox" name="statuscode" id="storycode10" value="10" {is_checked3}{xhtml}>{lang_optionarchive}
+            <input type="checkbox" name="statuscode" id="storycode11" value="11" {is_checked4}{xhtml}>
+         <label for="storycode11">{lang_optiondelete}</label>
       </dd>
 
       <dt><label for="admin-storyeditor-expire_month">{lang_archivetitle}({lang_date})</label></dt>
@@ -97,10 +97,10 @@
         </select>
       </dd>
 
-      <dt><label>{lang_cmt_disable}:</label></dt>
+      <dt><label for="cmt_close_flag">{lang_cmt_disable}:</label></dt>
       <dd>
-        {lang_enabled} 
-        <input type="checkbox" name="cmt_close_flag" value="1" {is_checked5} onclick="enablecmtclose(this);"{xhtml}>
+        <label for="cmt_close_flag">{lang_enabled}</label> 
+        <input type="checkbox" name="cmt_close_flag" id="cmt_close_flag" value="1" {is_checked5} onclick="enablecmtclose(this);"{xhtml}>
             
            <span dir="ltr">
            <select name="cmt_close_month">
diff -r 0ca924e03ea3 -r 8bc9671df054 public_html/layout/denim/admin/story/storyeditor_advanced.thtml
--- a/public_html/layout/denim/admin/story/storyeditor_advanced.thtml	Tue Apr 02 20:31:06 2013 -0400
+++ b/public_html/layout/denim/admin/story/storyeditor_advanced.thtml	Wed Apr 03 19:08:46 2013 +0900
@@ -165,10 +165,10 @@
           {trackback_options}
         </select>
       </dd>
-      <dt><label>{lang_cmt_disable}</label></dt>
+      <dt><label for="cmt_close_flag">{lang_cmt_disable}</label></dt>
       <dd>
-        {lang_enabled} 
-        <input type="checkbox" name="cmt_close_flag" value="1" {is_checked5} onclick="enablecmtclose(this);"{xhtml}>
+        <label for="cmt_close_flag">{lang_enabled}</label> 
+        <input type="checkbox" name="cmt_close_flag" id="cmt_close_flag" value="1" {is_checked5} onclick="enablecmtclose(this);"{xhtml}>
          
            <span dir="ltr">
                <select name="cmt_close_month">
@@ -221,11 +221,11 @@
     <dl class="form_block">
       <dt><label for="admin-storyeditor_advanced-archiveflag">{lang_archivetitle}</label></dt>
       <dd>
-        {lang_enabled} 
+        <label for="admin-storyeditor_advanced-archiveflag">{lang_enabled}</label> 
         <input type="checkbox" value="1" {is_checked2} onclick="enablearchive(this);" name="archiveflag" id="admin-storyeditor_advanced-archiveflag"{xhtml}>
-        <input type="radio" name="statuscode" id="storycode10" value="10" {is_checked3}{xhtml}>{lang_optionarchive}
-            <input type="radio" name="statuscode" id="storycode11" value="11" {is_checked4}{xhtml}>
-         {lang_optiondelete}
+        <input type="checkbox" name="statuscode" id="storycode10" value="10" {is_checked3}{xhtml}><label for="storycode10">{lang_optionarchive}</label>
+            <input type="checkbox" name="statuscode" id="storycode11" value="11" {is_checked4}{xhtml}>
+         <label for="storycode11">{lang_optiondelete}</label>
       </dd>
 
       <dt><label for="admin-storyeditor_advanced-expire_month"></label></dt>
diff -r 0ca924e03ea3 -r 8bc9671df054 public_html/layout/modern_curve/admin/story/storyeditor.thtml
--- a/public_html/layout/modern_curve/admin/story/storyeditor.thtml	Tue Apr 02 20:31:06 2013 -0400
+++ b/public_html/layout/modern_curve/admin/story/storyeditor.thtml	Wed Apr 03 19:08:46 2013 +0900
@@ -51,11 +51,11 @@
 
       <dt><label for="admin-storyeditor-archiveflag">{lang_archivetitle}</label></dt>
       <dd>
-        {lang_enabled} 
+        <label for="admin-storyeditor-archiveflag">{lang_enabled}</label> 
         <input type="checkbox" value="1" {is_checked2} onclick="enablearchive(this);" name="archiveflag" id="admin-storyeditor-archiveflag"{xhtml}>
-        <input type="radio" name="statuscode" id="storycode10" value="10" {is_checked3}{xhtml}>{lang_optionarchive}
-            <input type="radio" name="statuscode" id="storycode11" value="11" {is_checked4}{xhtml}>
-         {lang_optiondelete}
+        <input type="checkbox" name="statuscode" id="storycode10" value="10" {is_checked3}{xhtml}><label for="storycode10">{lang_optionarchive}</label>
+            <input type="checkbox" name="statuscode" id="storycode11" value="11" {is_checked4}{xhtml}>
+         <label for="storycode11">{lang_optiondelete}</label>
       </dd>
 
       <dt><label for="admin-storyeditor-expire_month"></label></dt>
@@ -97,10 +97,10 @@
         </select>
       </dd>
 
-      <dt>{lang_cmt_disable}:</dt>
+      <dt><label for="cmt_close_flag">{lang_cmt_disable}</label>:</dt>
       <dd>
-        {lang_enabled} 
-        <input type="checkbox" name="cmt_close_flag" value="1" {is_checked5} onclick="enablecmtclose(this);"{xhtml}>
+        <label for="cmt_close_flag">{lang_enabled}</label> 
+        <input type="checkbox" name="cmt_close_flag" id="cmt_close_flag" value="1" {is_checked5} onclick="enablecmtclose(this);"{xhtml}>
             
            <span dir="ltr">
            <select name="cmt_close_month">
diff -r 0ca924e03ea3 -r 8bc9671df054 public_html/layout/modern_curve/admin/story/storyeditor_advanced.thtml
--- a/public_html/layout/modern_curve/admin/story/storyeditor_advanced.thtml	Tue Apr 02 20:31:06 2013 -0400
+++ b/public_html/layout/modern_curve/admin/story/storyeditor_advanced.thtml	Wed Apr 03 19:08:46 2013 +0900
@@ -169,10 +169,10 @@
           {trackback_options}
         </select>
       </dd>
-      <dt>{lang_cmt_disable}</dt>
+      <dt><label for="cmt_close_flag">{lang_cmt_disable}</label></dt>
       <dd>
-        {lang_enabled} 
-        <input type="checkbox" name="cmt_close_flag" value="1" {is_checked5} onclick="enablecmtclose(this);"{xhtml}>
+        <label for="cmt_close_flag">{lang_enabled}</label> 
+        <input type="checkbox" name="cmt_close_flag" id="cmt_close_flag" value="1" {is_checked5} onclick="enablecmtclose(this);"{xhtml}>
          
            <span dir="ltr">
                <select name="cmt_close_month">
@@ -225,11 +225,11 @@
     <dl>
       <dt><label for="admin-storyeditor_advanced-archiveflag">{lang_archivetitle}</label></dt>
       <dd>
-        {lang_enabled} 
+        <label for="admin-storyeditor_advanced-archiveflag">{lang_enabled}</label> 
         <input type="checkbox" value="1" {is_checked2} onclick="enablearchive(this);" name="archiveflag" id="admin-storyeditor_advanced-archiveflag"{xhtml}>
-        <input type="radio" name="statuscode" id="storycode10" value="10" {is_checked3}{xhtml}>{lang_optionarchive}
-            <input type="radio" name="statuscode" id="storycode11" value="11" {is_checked4}{xhtml}>
-         {lang_optiondelete}
+        <input type="checkbox" name="statuscode" id="storycode10" value="10" {is_checked3}{xhtml}><label for="storycode10">{lang_optionarchive}</label>
+            <input type="checkbox" name="statuscode" id="storycode11" value="11" {is_checked4}{xhtml}>
+         <label for="storycode11">{lang_optiondelete}</label>
       </dd>
 
       <dt><label for="admin-storyeditor_advanced-expire_month"></label></dt>
diff -r 0ca924e03ea3 -r 8bc9671df054 public_html/layout/professional/admin/story/storyeditor.thtml
--- a/public_html/layout/professional/admin/story/storyeditor.thtml	Tue Apr 02 20:31:06 2013 -0400
+++ b/public_html/layout/professional/admin/story/storyeditor.thtml	Wed Apr 03 19:08:46 2013 +0900
@@ -62,14 +62,11 @@
                                                 </tr>
                                                 <tr>
                                                     <td class="alignright" style="padding-right:5px; width:20%">{lang_option}:</td>
-                                                    <td style="width:20%">{lang_enabled}:<input type="checkbox" name="archiveflag" value="1" {is_checked2} onclick="enablearchive(this);"{xhtml}></td>
+                                                    <td style="width:20%"><label for="admin-storyeditor-archiveflag">{lang_enabled}</label>:<input type="checkbox" name="archiveflag" value="1" {is_checked2} id="admin-storyeditor-archiveflag" onclick="enablearchive(this);"{xhtml}></td>
                                                     <td class="alignleft">
-                                                        <label for="storycode10">
-                                                            <input type="radio" name="statuscode" id="storycode10" value="10" {is_checked3}{xhtml}>{lang_optionarchive}
-                                                        </label> 
-                                                        <label for="storycode11">
-                                                            <input type="radio" name="statuscode" id="storycode11" value="11" {is_checked4}{xhtml}>{lang_optiondelete}
-                                                        </label>
+                                                        <input type="checkbox" name="statuscode" id="storycode10" value="10" {is_checked3}{xhtml}><label for="storycode10">{lang_optionarchive}</label>
+                                                         
+                                                        <input type="checkbox" name="statuscode" id="storycode11" value="11" {is_checked4}{xhtml}><label for="storycode11">{lang_optiondelete}</label>
                                                     </td>
                                                 </tr>
                                                 <tr>
@@ -119,8 +116,8 @@
                                         </td>
                                     </tr>
                                     <tr>
-                                        <td class="alignright" style="vertical-align:top;">{lang_cmt_disable}:</td>
-                                        <td class="alignleft" style="vertical-align:top;" colspan="1">{lang_enabled}:<input type="checkbox" name="cmt_close_flag" value="1" {is_checked5} onclick="enablecmtclose(this);"{xhtml}>
+                                        <td class="alignright" style="vertical-align:top;"><label for="cmt_close_flag">{lang_cmt_disable}</label>:</td>
+                                        <td class="alignleft" style="vertical-align:top;" colspan="1"><label for="cmt_close_flag">{lang_enabled}</label>:<input type="checkbox" name="cmt_close_flag" id="cmt_close_flag" value="1" {is_checked5} onclick="enablecmtclose(this);"{xhtml}>
                                             <span dir="ltr">
                                                 <select name="cmt_close_month">
                                                     {cmt_close_month_options}
diff -r 0ca924e03ea3 -r 8bc9671df054 public_html/layout/professional/admin/story/storyeditor_advanced.thtml
--- a/public_html/layout/professional/admin/story/storyeditor_advanced.thtml	Tue Apr 02 20:31:06 2013 -0400
+++ b/public_html/layout/professional/admin/story/storyeditor_advanced.thtml	Wed Apr 03 19:08:46 2013 +0900
@@ -144,8 +144,8 @@
                             </td>
                          </tr>
                          <tr>
-                            <td>{lang_cmt_disable}:</td>
-                                        <td class="alignleft" style="vertical-align:top;" colspan="1">{lang_enabled}:<input type="checkbox" name="cmt_close_flag" value="1" {is_checked5} onclick="enablecmtclose(this);"{xhtml}>
+                            <td><label for="cmt_close_flag">{lang_cmt_disable}</label>:</td>
+                                        <td class="alignleft" style="vertical-align:top;" colspan="1"><label for="cmt_close_flag">{lang_enabled}</label>:<input type="checkbox" name="cmt_close_flag" id="cmt_close_flag" value="1" {is_checked5} onclick="enablecmtclose(this);"{xhtml}>
                                             <span dir="ltr">
                                                 <select name="cmt_close_month">
                                                     {cmt_close_month_options}
@@ -186,14 +186,11 @@
                     <table cellspacing="0" cellpadding="3" style="width:100%;">
                         <tr>
                             <td class="alignright" style="width:20%; padding-right:5px;">{lang_option}:</td>
-                            <td style="width:20%;">{lang_enabled}:<input type="checkbox" name="archiveflag" value="1" {is_checked2} onclick="enablearchive(this);"{xhtml}></td>
+                            <td style="width:20%;"><label for="admin-storyeditor_advanced-archiveflag">{lang_enabled}</label>:<input type="checkbox" name="archiveflag" value="1" {is_checked2} id="admin-storyeditor_advanced-archiveflag" onclick="enablearchive(this);"{xhtml}></td>
                             <td class="alignleft">
-                                <label for="storycode10">
-                                    <input type="radio" name="statuscode" id="storycode10" value="10" {is_checked3}{xhtml}>{lang_optionarchive}
-                                </label> 
-                                <label for="storycode11">
-                                    <input type="radio" name="statuscode" id="storycode11" value="11" {is_checked4}{xhtml}>{lang_optiondelete}
-                                </label>
+                                <input type="checkbox" name="statuscode" id="storycode10" value="10" {is_checked3}{xhtml}><label for="storycode10">{lang_optionarchive}</label>
+                                 
+                                <input type="checkbox" name="statuscode" id="storycode11" value="11" {is_checked4}{xhtml}><label for="storycode11">{lang_optiondelete}</label>
                             </td>
                         </tr>
                         <tr>
diff -r 0ca924e03ea3 -r 8bc9671df054 public_html/layout/professional_css/admin/story/storyeditor.thtml
--- a/public_html/layout/professional_css/admin/story/storyeditor.thtml	Tue Apr 02 20:31:06 2013 -0400
+++ b/public_html/layout/professional_css/admin/story/storyeditor.thtml	Wed Apr 03 19:08:46 2013 +0900
@@ -51,11 +51,11 @@
 
       <dt><label for="admin-storyeditor-archiveflag">{lang_archivetitle}</label></dt>
       <dd>
-        {lang_enabled} 
+        <label for="admin-storyeditor-archiveflag">{lang_enabled}</label> 
         <input type="checkbox" value="1" {is_checked2} onclick="enablearchive(this);" name="archiveflag" id="admin-storyeditor-archiveflag"{xhtml}>
-        <input type="radio" name="statuscode" id="storycode10" value="10" {is_checked3}{xhtml}>{lang_optionarchive}
-            <input type="radio" name="statuscode" id="storycode11" value="11" {is_checked4}{xhtml}>
-         {lang_optiondelete}
+        <input type="checkbox" name="statuscode" id="storycode10" value="10" {is_checked3}{xhtml}><label for="storycode10">{lang_optionarchive}</label>
+            <input type="checkbox" name="statuscode" id="storycode11" value="11" {is_checked4}{xhtml}>
+         <label for="storycode11">{lang_optiondelete}</label>
       </dd>
 
       <dt><label for="admin-storyeditor-expire_month"></label></dt>
@@ -97,10 +97,10 @@
         </select>
       </dd>
 
-      <dt>{lang_cmt_disable}:</dt>
+      <dt><label for="cmt_close_flag">{lang_cmt_disable}</label>:</dt>
       <dd>
-        {lang_enabled} 
-        <input type="checkbox" name="cmt_close_flag" value="1" {is_checked5} onclick="enablecmtclose(this);"{xhtml}>
+        <label for="cmt_close_flag">{lang_enabled}</label> 
+        <input type="checkbox" name="cmt_close_flag" id="cmt_close_flag" value="1" {is_checked5} onclick="enablecmtclose(this);"{xhtml}>
             
            <span dir="ltr">
            <select name="cmt_close_month">
diff -r 0ca924e03ea3 -r 8bc9671df054 public_html/layout/professional_css/admin/story/storyeditor_advanced.thtml
--- a/public_html/layout/professional_css/admin/story/storyeditor_advanced.thtml	Tue Apr 02 20:31:06 2013 -0400
+++ b/public_html/layout/professional_css/admin/story/storyeditor_advanced.thtml	Wed Apr 03 19:08:46 2013 +0900
@@ -169,10 +169,10 @@
           {trackback_options}
         </select>
       </dd>
-      <dt>{lang_cmt_disable}</dt>
+      <dt><label for="cmt_close_flag">{lang_cmt_disable}</label></dt>
       <dd>
-        {lang_enabled} 
-        <input type="checkbox" name="cmt_close_flag" value="1" {is_checked5} onclick="enablecmtclose(this);"{xhtml}>
+        <label for="cmt_close_flag">{lang_enabled}</label> 
+        <input type="checkbox" name="cmt_close_flag" id="cmt_close_flag" value="1" {is_checked5} onclick="enablecmtclose(this);"{xhtml}>
          
            <span dir="ltr">
                <select name="cmt_close_month">
@@ -225,11 +225,11 @@
     <dl>
       <dt><label for="admin-storyeditor_advanced-archiveflag">{lang_archivetitle}</label></dt>
       <dd>
-        {lang_enabled} 
+        <label for="admin-storyeditor_advanced-archiveflag">{lang_enabled}</label> 
         <input type="checkbox" value="1" {is_checked2} onclick="enablearchive(this);" name="archiveflag" id="admin-storyeditor_advanced-archiveflag"{xhtml}>
-        <input type="radio" name="statuscode" id="storycode10" value="10" {is_checked3}{xhtml}>{lang_optionarchive}
-            <input type="radio" name="statuscode" id="storycode11" value="11" {is_checked4}{xhtml}>
-         {lang_optiondelete}
+        <input type="checkbox" name="statuscode" id="storycode10" value="10" {is_checked3}{xhtml}><label for="storycode10">{lang_optionarchive}</label>
+            <input type="checkbox" name="statuscode" id="storycode11" value="11" {is_checked4}{xhtml}>
+         <label for="storycode11">{lang_optiondelete}</label>
       </dd>
 
       <dt><label for="admin-storyeditor_advanced-expire_month"></label></dt>



More information about the geeklog-cvs mailing list