|
ファイル一覧/検索 |
トップ 前へ 次へ |
|
概要
<div class="fblist" src="[フォルダパスや検索条件]"></div> //縦方向に配列
<div class="fbtile" src="[フォルダパスや検索条件]"></div> //横方向に配列
ファイル一覧もしくは検索結果を一覧表示します。
タグ・属性 適用されるタグ div タグ class fblist もしくは fbtile を指定します。fblist = ファイル一覧を縦方向に配列、fbtile=横方向にファイルを配列します。 src 一覧したいフォルダもしくは検索結果のURLを指定します。URLは以下の手順で作成します。
例)http://localhost/FileBlog/index.php#path=%2F&dra=&keyword=jpg&target=2&doctype=10 上記の例の#移行のように、URLクエリ形式(&区切りでname=value)でパラメータを付与します。
※1:path, keywordは2byte文字を含むためURLEncodeする必要があります。 URLEncodeはphpのrawurlencodeと互換性のある方法で行って下さい。
フィールド設定 一覧に表示する列や行のレイアウトを変更するには、フィールド設定を行います。 フィールド設定
<div class="fblist" src="http://localhost/fileblog/index.php?path=%2F&dra="> <!-- { "datarequest":{ "getcomment": false, "getauthor": false, "getdescription": false, "getbodytext": false, "getattribute": true, "getthumexists": false, "getcanopen": true, "gethassubdir": false }, "header":{"visible":true}, "fields":[ {"field":"name", "link":true, "escape":true, "maxlength":15, "icon":true}, {"field":"updt"}, {"field":"parent", "parentlink":true, "escape":true, "maxlength":15} ] } --> </div>
div要素の中に、コメント(<!--で始まり、-->で終わる)領域に、Json形式で設定を記述します。 設定が正しいJson形式でない場合、"Invalid config."という文字列が表示されます。Json記法については、wikipediaの解説を参考にして下さい。 コメント領域以外に、HTMLを記述しないようにしてください。設定が正しくロードできなくなる可能性があります。 datarequest データ取得方法を指定します。 今までsrcに指定していたfirstやorderなどの他、以下のパラメータを指定することが出来ます。
header visibleプロパティのみ。boolean値を指定します。falseに設定すると、一覧のヘッダ行を非表示にすることができます。 なお、class="fbtile"の場合にはそもそもheaderがありませんので、このプロパティは意味がありません。 fields 各フィールドプロパティです。1つのフィールド定義は、fblistの場合は列、fbtileの場合は行にレイアウトされます。
※1:templateに使用できる変数一覧
スタイルのカスタマイズ スタイルシートを上書き・追加することで、見た目を変更することが出来ます。
※fblog.cssはFileBlogインストールフォルダ\Apache\htdocs\fileblog\cssにインストールされています。
<style> <!-- div.fblist table{margin-top: 0px;table-layout:fixed;} div.fblist span{white-space:nowrap;} div.fblist table th{font-size:13px;padding-left:5px;font-weight:normal;height:18px;margin-top: 10px;text-align: left;background: #E6E6FA;white-space:nowrap;word-break:keep-all;overflow:hidden;} div.fblist table th.size{padding-left:10px;padding-right:10px;text-align: right;width:70px;white-space:nowrap;word-break:keep-all;overflow:hidden;} div.fblist table td{font-size:13px;padding-top:0px;padding-bottom:0px;padding-left:2px;padding-right:10px;width:100%;white-space:nowrap;word-break:keep-all;overflow:hidden;} div.fblist table td.name{width:auto;word-break: break-all} div.fblist table td.size{padding-left:10px;padding-right:10px;text-align: right;width:70px;} div.fblist table td.updt{padding-left:10px;padding-right:10px;width:120px;} div.fblist table td.crdt{padding-left:10px;padding-right:10px;width:120px;} div.fblist table td.ext{padding-left:10px;padding-right:10px;width:40px;} div.fblist table td.parent{width:auto;word-break: break-all} div.fblist table td.parent a{text-decoration:none; color:green; font-size:13px;cursor:pointer;} div.fblist table img.icon{vertical-align:middle;} div.fblist table img.thum{border: 1px solid #D4D0C8;padding:0px;width:100px;height:100px} div.fblist table img.thum_m{border: 1px solid #D4D0C8;padding:0px;width:170px;height:170px} div.fblist table img.thumicon{border:0px;width:16px;height:16px;position: relative; top: -2px; left:-18px;} --> </style>
<style> <!-- div.fblist table th{color:white;background: blue;} div.fblist table td{color:blue;} div.fblist table td.name{color:white;background: aqua;} --> </style> 上記の例では、背景と文字色の設定を上書きしました。(nameやsizeなどのfield名がそのままclass属性として利用できます。)
旧ポータルオプションとの違い 新ポータルオプションでは、以下の機能は使用できなくなりました。
また、PCサイトでは利用可能ですが、モバイルサイトでは以下の機能を使用できません。
サンプル オンラインデモサイトに、各種サンプルを掲載しています。
|
© 2011 Teppi Technology ※無断転載を禁じます