X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;ds=sidebyside;f=configure.js;h=23a945a96d725ebb834baa65d15766de01b04fbd;hb=1e715ab70fa254cf6b4349e2d026e7d15d05d641;hp=0b716bbb7470ddae0a9400340f20bde824c3c858;hpb=2a09077974280afc74c701500cca18895676197e;p=webchat%2FWebChat.git diff --git a/configure.js b/configure.js index 0b716bb..23a945a 100644 --- a/configure.js +++ b/configure.js @@ -20,41 +20,124 @@ showip : false, //IPアドレスを表示するなら真。そうでないなら、偽 - //詳細画面に表示するフィールド名と表示名の組み合わせ - //詳細画面で表示される順番はこの変数によって決まります - //連想配列の名称と数はinputtype、visiblefield、init.sqlと一致させること + //詳細画面と編集画面に表示するフィールド名と表示名の組み合わせおよびテーブル定義 + //表示される順番はこの変数によって決まります + // + //name 表示名を指定する + //type データ型を指定する。指定可能な型は以下の通り + // text 文字列型を受け付ける + // password パスワードとして指定できるものを受け付ける。デフォルトではすべての文字列です + // number 符号付数値型を受け付ける + // unsignednumber 符号なし数値型を受け付ける + // textarea 改行を含む文字列型を受け付ける + // bool BOOL型を受け付ける + // datetime DATETIME型を受け付ける + //length 長さを指定する + // numberの場合、2がSMALLINT、4がINTに対応する + // textとpasswordの場合、最大長を指定する + //defaultvalue デフォルト値を指定する + //primary プライマリーキーとして指定するなら真。そうでないなら偽 + //isnotempty:真なら必須メンバーであることを表し、そうでないなら空欄でも構わないことを表す + //visible 詳細画面に表示するなら真。そうでないなら偽 + //visible_edit 編集画面に表示するなら真。そうでないなら偽 + //rule バリテーション時に実行される関数を指定する + // 実行される関数でバリテーションが成功した場合、nullを返さなければならない alias : { - mailto : "メールアドレス", - age : "年齢", - height : "身長", - weight : "体重", - gender : "性別", - race : "種族", - etc : "備考", + //name以外の項目を編集しないでください。正常に動作しなくなります + //ここから + name_hash: + { + name : "名前(ハッシュ)", + type : "unsignednumber", + length : 4, + primary : true, + visible : false, + visible_edit : false, + isnotempty : true + }, + name : + { + name : "名前", + type : "text", + visible : true, + visible_edit : true, + length : 64, + isnotempty : true + }, + password : + { + name : "パスワード", + type : "password", + length : 32, + visible : false, + visible_edit : true, + }, + lastmodified : + { + name : "更新日付", + type : "datetime", + visible : false, + visible_edit : false, + }, + //ここまで + mailto : + { + name : "メールアドレス", + type : "mail", + length : 255, + visible : false, + visible_edit : true, + }, + age : + { + name : "年齢", + type : "number", + defaultvalue : 0, + length : 2, + visible : true, + visible_edit : true, + }, + height : + { + name : "身長", + type : "number", + defaultvalue : 0, + length : 2, + visible : true, + visible_edit : true, + }, + weight : + { + name : "体重", + type : "number", + defaultvalue : 0, + length : 2, + visible : true, + visible_edit : true, + }, + gender : + { + name : "性別", + type : "text", + length : 8, + visible : true, + visible_edit : true, + }, + race : + { + name : "種族", + type : "text", + length : 64, + visible : true, + visible_edit : true, + }, + etc : + { + name : "備考", + type : "textarea", + visible : true, + visible_edit : true, + }, }, - - //フィールドタイプ - //text:一行入力 - //textarea:複数行入力を表す - inputtype : { - age : "text", - height : "text", - weight : "text", - gender : "text", - race : "text", - mailto : "text", - etc : "textarea", - }, - - //詳細画面に表示するなら真。そうでないなら偽 - visiblefield : { - age : true, - height : true, - weight : true, - gender : true, - race : true, - mailto : false, - etc : true, - } };