あちあち情報局

趣味や日曜プログラムなどを書いています

ユーザ用ツール

サイト用ツール


dokuwiki:demo-notepad:index.html

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

次のリビジョン
前のリビジョン
dokuwiki:demo-notepad:index.html [2018/12/01 08:37] – 作成 管理者dokuwiki:demo-notepad:index.html [2018/12/01 09:27] (現在) – [メモ書きデモ] 管理者
行 1: 行 1:
 +======  メモ書きデモ ======
 +このページは自動ページIDと自動ページリストのデモページです。(管理者以外は書き込めません)
 +----
 +編集権限があれば「新規ページ作成」で自動作成したページIDの編集ページが表示され、メモを書きを保存した後にこのページに戻ってくると自動的にページ一覧に追加されます。面倒なページid作成と一覧作成の手間を省けます。
 +
 +詳しくは「[[dokuwiki:notepad]]」をご覧下さい。
 +
 +===== ページid自動作成 =====
 +<html>
 +<script>
 +function newpage(){
 +  var base='https://www.achiachi.net/blog/dokuwiki/demo-notepad/';
 + 
 +  //日時を取得
 +  var nowTime=new Date();
 +  var yyyy = nowTime.getFullYear();
 +  var mm = ("0"+(nowTime.getMonth()+1)).slice(-2);
 +  var dd = ("0"+(nowTime.getDate())).slice(-2);
 +  var hh = ("0"+(nowTime.getHours())).slice(-2);
 +  var nn = ("0"+(nowTime.getMinutes())).slice(-2);
 +  var ss = ("0"+(nowTime.getSeconds())).slice(-2);
 + 
 +  //編集ページに遷移「ベースURLyyyy-mm-dd-hhnnss?do=edit」・・・(2)
 +  location.href = base+yyyy+'-'+mm+'-'+dd+'-'+hh+nn+ss+'?do=edit';
 +}
 +</script>
 +<input type="button" name="link" value="新規ページ作成(管理者専用)" onclick="newpage()">
 +</html>
 +
 +===== ページ一覧 =====
 +
 +<nspages -textPages="" -simpleList -idAndTitle -reverse>
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki