# HG changeset patch # User HIROSE Yuuji # Date 1471911283 -32399 # Node ID 1df64f0490cacbda5faa05d5a454821a4fd94b38 # Parent 8a101241003519da3b5654c9cf4bf701df9801fb `|col|col|...' like table conversion enabled diff -r 8a1012410035 -r 1df64f0490ca examples/common/default/default.css --- a/examples/common/default/default.css Mon Aug 22 16:05:58 2016 +0859 +++ b/examples/common/default/default.css Tue Aug 23 09:14:42 2016 +0859 @@ -80,7 +80,7 @@ white-space: pre-wrap; } table.blog_replies+p.update_link {margin-top: 0; margin-bottom: 14em;} -.blog_replies td:nth-child(2) { +.blog_replies td.repl { vertical-align: top; min-width: 30em; height: 3em; max-width: 50em; } @@ -91,6 +91,15 @@ .blog_replies td.new { /* New Article from last visit */ background: white } +table.mini, table.mini tr, table.mini th, table.mini td { + margin: 0; border-width: 0; + border-collapse: collapse; + vertical-align: top; width: auto; height: 1em; +} +table.mini th {text-align: justify;} +table.mini td, table.mini th {padding: 1px 1ex;} +table.mini {margin-left: 1em; border-left: 2px solid #686;} + p.profimg {float: left; max-width: 400px; max-height: 400px; overflow: hidden; margin-right: 1em; padding: 0; border: white 1px solid; box-shadow: 2px 3px 4px diff -r 8a1012410035 -r 1df64f0490ca s4-blog.sh --- a/s4-blog.sh Mon Aug 22 16:05:58 2016 +0859 +++ b/s4-blog.sh Tue Aug 23 09:14:42 2016 +0859 @@ -68,6 +68,7 @@ # fi # fi td=`getcachedir "article/$2"` + [ -d "$td" ] || mkdir -p $td tbl=${1%%[!A-Z0-9a-z_]*} rowid=${2%%[!A-Z0-9a-z_]*} err rowid=$rowid, '$2'=$2 ts=${tbl}_s tm=${tbl}_m @@ -184,14 +185,15 @@ while IFS='|' read id edit notify uid uname aid tm new hte imgids; do nt="" - cat< ${edit:+編集 }#$aid $uname $tm -${notify:+$nt}`echo "$hte"|unhexize|htmlescape` +${notify:+$nt} EOF - hreflink + echo -n "" + echo "$hte"|unhexize|htmlescape|hreflink|minitbl usecache='' tsfile=$td/$id.stamp for i in $imgids; do mrid=${i%%:*}; i=${i#*:}; sz=`size_h ${i%%:*}` @@ -231,7 +233,7 @@ | sed -e 's/\(..\)/%\1/g' \ -e "s|^|$fnb|" - [ -d $td ] || mkdir -p "$td" + # [ -d $td ] || mkdir -p "$td" echo $tm > $tsfile fi ;; diff -r 8a1012410035 -r 1df64f0490ca s4-funcs.sh --- a/s4-funcs.sh Mon Aug 22 16:05:58 2016 +0859 +++ b/s4-funcs.sh Tue Aug 23 09:14:42 2016 +0859 @@ -457,6 +457,30 @@ -e "s|^href=\($_hrefptn\)|\1|" \ -e "s|^iframe=\($_hrefptn\)||" } +minitbl() { + sed -n ' + /^|[^|]/ {; # If the line begin with "|" + s,|$,,; # Remove trailing "|" first + s,|\* *\([^|]*\) *,\1,g; # "|*..." to "..." + s,| *\([^|]*\) *,\1,g; # "|..." to "..." + s,^,,; s,$,,; # Enclose with "" and "" + H; # Concat this line to HoldSpace + s/.*//; # Delete PatternSpace for finalization + $ b cont + d; # If in final line, output the rest, else jump to next turn + } + :cont + x; # For non-"|" lines, check HoldSpace + /^./ {; # If HoldSpace has "|" table elements + s|^||; # Enclose whole elements like this: + # s|$|
|; # ..\n..
+ p; # Print whole "table" element + s/.*//; # Erase all when done. + x; s|^||; x; # Preppend /table to the next line + } + x; # Back to the newest line + p; # Print rest' +} acclog() ( # $1=table, $2=rowid n=${2%%[!0-9]*} # Remove non-digit chars from $2(should be rowid) @@ -2094,32 +2118,27 @@ ORDER by a.gecos;" err grpaction: `echo "$sql"` tf=$tmpd/title.$$ - echo "グループ[$grp]参加メンバーに対する操作" > $tf - cmmsg="
-`cgi_radio rm commission id=\"cmadmin\"` + echo "グループ[$grp]参加メンバーに対する操作" > $tf + cmmsg="`cgi_radio rm commission id=\"cmadmin\"`

このグループでの全権を付与します。信頼できる人に託してください。 -

" - excmsg="
-`cgi_radio rm yes `下でチェックした人のグループ登録解除 -
-本当に消します! `cgi_checkbox confirm yes` 確認 +

" + excmsg="`cgi_radio rm yes id=\"conf\"` +
本当に消します! `cgi_checkbox confirm yes` 確認

この操作による通知は本人に行きません。 あらかじめ通知するか、登録解除してよい状況かしっかり確認してください。

-
" # Get team list to which current user belongs into $hexteams myhexteams=$(hexteams "$grp" "$user") allhexteams=$(hexteams "$grp") if [ -n "$myhexteams" ]; then - rmteammsg="
-`cgi_radio rm rmteam 'id=\"cmrmteam\"'`
チーム属性:`cgi_select_h rmteam \"2d2d2d\" $myhexteams` を除去します: `cgi_checkbox teamconfirm yes` 確認

この操作による通知は本人に行きません。 あらかじめ通知するか、登録解除してよい状況かしっかり確認してください。

-
" fi @@ -2136,21 +2155,22 @@ -D_SUBTITLE_="チェック後操作ボタン" \ -D_FORM_="syscmd(cat)" -D_DUMPTABLE_="" \ $layout/form+dump.m4.html -
+

下でチェックした人を対象として:

+
`cgi_radio rm addteam 'id="cmteam"'` +for="cmteam">同じチーム属性を付与
チーム名:`cgi_text team "" 'id="inteam" list="teams"'` `cgi_datalist_h teams $allhexteams` -
+
${rmteammsg} -
`cgi_radio rm send id="sendmsg"` + for="sendmsg">メッセージ送信
`cgi_textarea text "" cols=40`
+${isowner:+$cmmsg$excmsg} +`cgi_radio rm close id="x"`
-${isowner:+$cmmsg$excmsg}

$grp 参加者一覧

`sq $db -header -html "$sql"`