s4
changeset 702:2c5ddb0b5f4c
Add more shortcuts and baloon help messages
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Fri, 22 May 2020 08:37:04 +0900 |
parents | fdd9c98f0888 |
children | 6f07cfc1ba86 |
files | examples/common/default/home.m4.html s4-blog.sh s4-cgi.sh s4-funcs.sh |
diffstat | 4 files changed, 55 insertions(+), 42 deletions(-) [+] |
line diff
1.1 --- a/examples/common/default/home.m4.html Fri May 22 08:35:05 2020 +0900 1.2 +++ b/examples/common/default/home.m4.html Fri May 22 08:37:04 2020 +0900 1.3 @@ -7,12 +7,14 @@ 1.4 1.5 <div class="foldtabs"> 1.6 <input type="radio" id="sd" name="foldtabs"><label 1.7 - accesskey="a" title="A" for="sd">日記(_NBLOG_)</label> 1.8 + accesskey="a" title="Shortcut: A 1.9 +My Blogs" for="sd">日記(_NBLOG_)</label> 1.10 <div><!-- in home.m4 -->_BLOGS_</div><!-- in home.m4 --> 1.11 1.12 1.13 <input type="radio" id="grp" name="foldtabs"><label 1.14 - accesskey="s" title="S" for="grp">参加中グループ</label> 1.15 + accesskey="s" title="Shortcut: S 1.16 +My Groups" for="grp">参加中グループ</label> 1.17 <div> <!-- div.fold hides this div (in home.m4.html) --> 1.18 <div class="dumptable"> 1.19 _GROUPS_ 1.20 @@ -22,5 +24,6 @@ 1.21 _HOMETAIL_ 1.22 1.23 <input type="radio" id="close" name="foldtabs"><label 1.24 - accesskey="x" title="X" for="close">×</label> 1.25 + accesskey="x" title="Shortcut: X 1.26 +Hide Tabs" for="close">×</label> 1.27 </div> <!-- end of fold (in home.m4.html) -->
2.1 --- a/s4-blog.sh Fri May 22 08:35:05 2020 +0900 2.2 +++ b/s4-blog.sh Fri May 22 08:37:04 2020 +0900 2.3 @@ -222,18 +222,18 @@ 2.4 <table class="bloghead"> 2.5 EOF 2.6 2.7 - href="<a href=\"?editheading+$rowid\" accesskey=\"e\" title=\"E\"> 編集 </a>" 2.8 + href="<a href=\"?editheading+$rowid\" accesskey=\"e\" title=\"Shortcut: E${nl}Edit\"> 編集 </a>" 2.9 if $ismem; then 2.10 case $blog_mode in 2.11 *report*|*quiz*|*enquete*) 2.12 - href2="<a href=\"?lshandout+$rowid\" accesskey=\"l\" title=\"L\"> 提出状況 </a>" 2.13 - href3="(<a href=\"?gethandout+$rowid\" accesskey=\"f\" title=\"F\">ファイル取得</a>)" 2.14 + href2="<a href=\"?lshandout+$rowid\" accesskey=\"l\" title=\"Shortcut: L${nl}List Handouts\"> 提出状況 </a>" 2.15 + href3="(<a href=\"?gethandout+$rowid\" accesskey=\"f\" title=\"Shortcut: F${nl}File Retrieval\">ファイル取得</a>)" 2.16 ;; 2.17 esac 2.18 fi 2.19 - href4='<a href="#bottom" accesskey="b" title="B"> 末尾へ</a>' 2.20 + href4="<a href=\"#bottom\" accesskey=\"b\" title=\"Shortcut: B${nl}to the Bottom\"> 末尾へ</a>" 2.21 $isgrpadmin && 2.22 - href5="<a href=\"?blogseen+$rowid\" accesskey=\"s\" title=\"S\"> 読刻</a>" 2.23 + href5="<a href=\"?blogseen+$rowid\" accesskey=\"s\" title=\"Shortcut: S${nl}State of Accesses\"> 読刻</a>" 2.24 quizmodefile=$tmpd/quiz; rm -f "$quizmodefile" # XXX: Global state 2.25 midfile=$tmpd/midfile 2.26
3.1 --- a/s4-cgi.sh Fri May 22 08:35:05 2020 +0900 3.2 +++ b/s4-cgi.sh Fri May 22 08:37:04 2020 +0900 3.3 @@ -10,8 +10,8 @@ 3.4 <form action="$myname" method="${METHOD:-POST}" enctype="multipart/form-data"> 3.5 $cont 3.6 <input type="hidden" name="stage" value="$1"> 3.7 -<input type="submit" value="送信"> 3.8 -<input type="reset" value="リセット"> 3.9 +<input type="submit" value="送信" title="COMMIT"> 3.10 +<input type="reset" value="リセット" title="Reset"> 3.11 </form> 3.12 EOF 3.13 } 3.14 @@ -82,12 +82,12 @@ 3.15 cat<<EOF 3.16 <tr><td>($i)</td><td> 3.17 <input class="action" type="radio" name="action.$vname" id="keep.$vname" 3.18 - value="keep"><label for="keep.$vname">温存</label> 3.19 + value="keep"><label for="keep.$vname" title="Keep">温存</label> 3.20 <input class="action" type="radio" name="action.$vname" id="edit.$vname" 3.21 - value="edit"><label for="edit.$vname">修正</label> 3.22 + value="edit"><label for="edit.$vname" title="Replace">修正</label> 3.23 <input class="action" type="radio" name="action.$vname" id="rm.$vname" 3.24 - value="rm"><label for="rm.$vname">削除</label> 3.25 -<label class="confirm">本当に消します<input class="confirm" type="checkbox" 3.26 + value="rm"><label for="rm.$vname" title="Remove">削除</label> 3.27 +<label class="confirm" title="OK?">本当に消します<input class="confirm" type="checkbox" 3.28 name="confirm.$vname" value="yes">はい</label><br> 3.29 `$func $vname "$val" "$4"`<span>$val</span> 3.30 </td></tr>
4.1 --- a/s4-funcs.sh Fri May 22 08:35:05 2020 +0900 4.2 +++ b/s4-funcs.sh Fri May 22 08:37:04 2020 +0900 4.3 @@ -2024,8 +2024,8 @@ 4.4 search_form_args="" 4.5 if [ x"$user" = x"$uname" ]; then 4.6 usermenu="<a href=\"?userconf\" accesskey=\"e\" 4.7 - title=\"E\">プロフィールの編集</a> / 4.8 - <a href=\"?blog\" accesskey=\"n\" title=\"N\">新規話題の作成</a>" 4.9 + title=\"Shortcut: E${nl}Edit Profile\">プロフィールの編集</a> / 4.10 + <a href=\"?blog\" accesskey=\"n\" title=\"Shortcut: N${nl}New blog\">新規話題の作成</a>" 4.11 # Display folders 4.12 sql="select count(id) from article_m where id 4.13 in (select id from article where author='$user') 4.14 @@ -2035,7 +2035,7 @@ 4.15 # err nfile=$nfile 4.16 if [ $nfile -gt 0 ]; then 4.17 usermenu="$usermenu / <a href=\"?lsmyfile\" accesskey=\"l\" 4.18 - title=\"L\">過去の提出ファイル</a>" 4.19 + title=\"Shortcut: L${nl}List All Attachment files\">過去の提出ファイル</a>" 4.20 fi 4.21 else 4.22 latestlog=`query "SELECT max(time) FROM acclog WHERE user='$uname' \ 4.23 @@ -2123,7 +2123,7 @@ 4.24 4.25 cat<<-EOF 4.26 `cgi_radio foldtabs yes 'id="mre" accesskey="d"'`<label 4.27 - for="mre" title="D">最近の書き込み先</label> 4.28 + for="mre" title="Shortcut: D${nl}Recent Post">最近の書き込み先</label> 4.29 <div class="lcto"> 4.30 `DT_VIEW=replyblog dumptable html blog` 4.31 </div> 4.32 @@ -2146,7 +2146,7 @@ 4.33 if [ $cont -gt 0 ]; then 4.34 #echo "全体の新着記事${cont}傑" | html h2 4.35 cgi_radio foldtabs yes 'id="new10" accesskey="f"' 4.36 - echo "<label for=\"new10\" title=\"F\">新着${cont}傑</label><div>" 4.37 + echo "<label for=\"new10\" title=\"Shortcut: F${nl}NEWS\">新着${cont}傑</label><div>" 4.38 cat<<-EOF | html form 'action="?home"' 4.39 `cgi_checkbox readchk yes 'id="read"'`<label 4.40 for="read">新着ふくめて全部読んだことにする</label> 4.41 @@ -2538,27 +2538,32 @@ 4.42 viewtable $1 grp $rowid 4.43 echo "</div>" 4.44 if isgrpowner "$user" "$grp"; then 4.45 - echo "<p><a href=\"?groupconf+$rowid\">グループ情報の編集</a>" 4.46 + echo "<p><a href=\"?groupconf+$rowid\" accesskey=\"e\" 4.47 + title=\"Shortcut: e${nl}Edit Group\">グループ情報の編集</a>" 4.48 iamowner=$rowid 4.49 colmd=" mode" 4.50 fi 4.51 if [ -n "$ismember" ]; then 4.52 - echo "${iamowner:+ / }<a href=\"?blog+$rowid\">グループの新規話題作成</a>" 4.53 - echo "/ <a href=\"?grpaction+$rowid\">メンバーを個別選択しての操作</a></p>" 4.54 + #echo "${iamowner:+ / }<a href=\"?blog+$rowid\">グループの新規話題作成</a>" 4.55 + #echo "/ <a href=\"?grpaction+$rowid\">メンバーを個別選択しての操作</a></p>" 4.56 # div.fold input[type="checkbox"]:checked ~ div {display: block;} 4.57 - cat<<EOF 4.58 -<form action="?send2mem" method="POST" enctype="multipart/form-data"> 4.59 -<div class="fold clear"> 4.60 -`cgi_checkbox send yes id="send"`<label 4.61 - for="send">グループ全員にメッセージ送信</label> 4.62 -<div> 4.63 -`cgi_textarea message "" "cols=60"` 4.64 -`cgi_submit 送信` 4.65 -`cgi_reset リセット` 4.66 -</div> 4.67 -`cgi_hidden grp $rowid` 4.68 -</div></form> 4.69 -EOF 4.70 + cat<<-EOF 4.71 + ${iamowner:+ / }<a accesskey="n" title="Shortcut: n${nl}New blog" 4.72 + href="?blog+$rowid">グループの新規話題作成</a> 4.73 + / <a accesskey="m" title="Shortcut: m${nl}Operations on Members" 4.74 + href="?grpaction+$rowid">メンバーを個別選択しての操作</a></p> 4.75 + <form action="?send2mem" method="POST" enctype="multipart/form-data"> 4.76 + <div class="fold clear"> 4.77 + `cgi_checkbox send yes id="send"`<label 4.78 + for="send">グループ全員にメッセージ送信</label> 4.79 + <div> 4.80 + `cgi_textarea message "" "cols=60"` 4.81 + `cgi_submit 送信` 4.82 + `cgi_reset リセット` 4.83 + </div> 4.84 + `cgi_hidden grp $rowid` 4.85 + </div></form> 4.86 + EOF 4.87 fi 4.88 # 加入ボタン + 加入者リスト 4.89 if [ -n "$ismember" ]; then 4.90 @@ -2822,7 +2827,7 @@ 4.91 from=`getpar from`; to=`getpar to` 4.92 from_input="<input type=\"date\" name=\"from\" placeholder=\"YYYY-MM-DD\" value=\"${from}\">" 4.93 to_input="<input type=\"date\" name=\"to\" value=\"${to:-9999}\">" 4.94 - fromtonote="<p>POST集計: $from_input - $to_input</p><!-- $from - $to -->" 4.95 + fromtonote="<p title=\"Count the Number of Posts from-to\">POST集計: $from_input - $to_input</p><!-- $from - $to -->" 4.96 # New entry 4.97 sql="WITH mems AS ( 4.98 SELECT g.rowid, name, gecos FROM grp_mem gm LEFT JOIN gecoses g 4.99 @@ -2866,11 +2871,13 @@ 4.100 ## err grpaction: "`echo \"$sql\"`" 4.101 tf=$tmpd/title.$$ 4.102 echo "グループ[<a href=\"?grp+$grid\">$grp</a>]参加メンバーに対する操作" > $tf 4.103 - cmmsg="`cgi_radio rm commission id=\"cmadmin\"`<label 4.104 + cmmsg="`cgi_radio rm commission id=\"cmadmin\"`<label accesskey=\"f\" 4.105 + title=\"Shortcut: f${nl}Add to Administrator of the Group\" 4.106 for=\"cmadmin\">管理者委任</label> 4.107 <div><p>このグループでの全権を付与します。信頼できる人に託してください。 4.108 </p></div>" 4.109 - excmsg="`cgi_radio rm yes id=\"conf\"`<label 4.110 + excmsg="`cgi_radio rm yes id=\"conf\"`<label accesskey=\"g\" 4.111 + title=\"Shortcut: g${nl}Remove from the Group\" 4.112 for=\"conf\">GRP登録解除</label> 4.113 <div>本当に消します! `cgi_checkbox confirm yes` 確認 4.114 <p>この操作による通知は本人に行きません。 4.115 @@ -2884,7 +2891,8 @@ 4.116 myhexteams=$(hexteams "$grp" "$user") 4.117 fi 4.118 if [ -n "$myhexteams" ]; then 4.119 - rmteammsg="`cgi_radio rm rmteam 'id=\"cmrmteam\"'`<label 4.120 + rmteammsg="`cgi_radio rm rmteam 'id=\"cmrmteam\"'`<label accesskey=\"s\" 4.121 +title=\"Shortcut: s${nl}Strip a team tag from\" 4.122 for=\"cmrmteam\">チーム属性除去</label> 4.123 <div>チーム属性:`cgi_select_h rmteam \"2d2d2d\" $myhexteams` 4.124 を除去します: `cgi_checkbox teamconfirm yes` 確認 4.125 @@ -2913,17 +2921,19 @@ 4.126 | _m4 -D_TEAM_="spaste(\`$stf')" 4.127 <p>下でチェックした人を対象として:</p> 4.128 <div class="foldtabs"> 4.129 -`cgi_radio rm addteam 'id="cmteam"'`<label 4.130 +`cgi_radio rm addteam 'id="cmteam"'`<label accesskey="a" 4.131 +title="Shortcut: a${nl}Add a team tag to" 4.132 for="cmteam">同じチーム属性を付与</label> 4.133 <div>チーム名:`cgi_text team "" 'id="inteam" list="teams"'` 4.134 `cgi_datalist_h teams $allhexteams` 4.135 </div> 4.136 ${rmteammsg} 4.137 -`cgi_radio rm send id="sendmsg"`<label 4.138 +`cgi_radio rm send id="sendmsg"`<label accesskey="d" 4.139 + title="Shortcut: d${nl}DirectMail to" 4.140 for="sendmsg" title="Direct Message">DM送信</label> 4.141 <div> 4.142 `cgi_checkbox email yes 'id="email" class="fold"'`<label for="email" 4.143 ->email書式を使う</label> 4.144 +title="Using email format">email書式を使う</label> 4.145 <div class="folded"> 4.146 <table> 4.147 <tr><td>From: </td><td>$user</td></tr>