/***
USAGE:
FAQList()
Show a compact, sorted list of subpage links for the current page.
FAQList(PATH)
Show a compact, sorted list of subpage links for the given page path.
NOTES:
* the "How do I..." prefix is automatically stripped from subpages
TABLE Sto table pou bazeis tis erotiseis apantiseis pame Table properties
advanced stylesheet Classes kai bazoume tablefaq
CHANGE HISTORY:
1.0
* initial version
***/
<p>
<font size="-1">
var target = ($0 ?? $path) ? wiki.getpage($0 ?? $path) : page;
foreach(var p in list.sort(map.values(target.subpages), 'title')) {
if(string.startswith(p.title, "How do I...", true)) {
web.link(p.uri, string.substr(p.title, 11));
} else {
web.link(p.uri, p.title);
}
<br />
}
</font>
</p>
var AnswerBackGround = ($AnswerColor ?? $0 ?? '#bcd4ec');
var QuestionBackGround = ($QuestionColor ?? $1 ?? '#ecf6fc');
var AnswerSize = ($AnswerTextSize ?? $2 ?? '0.9em');
var QuestionSize = ($QuestionTextSize ?? $3 ?? '1.5em');
<p><label>'Quick Search: '</label><input type="text" id="FilterTextBox" name="FilterTextBox" /></p>
<html><head>
<script type="text/javascript">"
$(document).ready(function(){
$('.tablefaq').attr('border',0);
$('.tablefaq tr:even').addClass('tblQuestion');
$('.tablefaq tr:odd').addClass('tblAnswer');
$('.tblAnswerDiv').hide();
$('tr.tblQuestion').click(function() {
$('.arrow').removeClass('up');
$('div.tblAnswerDiv').hide();
$(this).find('.arrow').toggleClass('up');
$(this).find('div.tblAnswerDiv').toggle();
$('.tblAnswer').show();
});
$('.tablefaq tr:even').each(function() {
var QuestionCnts = $(this).find('td').eq(0).html();
var AnswerCnts = $(this).next('tr.tblAnswer').html();
$(this).next('tr.tblAnswer').html('');
$(this).find('td').eq(0).html('<span class=\"arrow\"></span><div class=\"tblQuestionDiv\">' + QuestionCnts + '</div><div class=\"tblAnswerDiv\">' + AnswerCnts + '</div><div> </div>');
$(this).find('td').eq(0).find('.tblAnswerDiv').hide();
});
//add index column with all content.
$('.tablefaq tr:has(td)').each(function(){
var t = $(this).text().toLowerCase(); //all row text
$('<td class=\"indexColumn\"></td>')
.hide().text(t).appendTo(this);
});//each tr
$('#FilterTextBox').keyup(function(){
var s = $(this).val().toLowerCase().split(' ');
//show all rows.
$('.tablefaq tr:hidden').show();
$.each(s, function(){
$(\".tablefaq tr:visible .indexColumn:not(:contains('\" + this + \"'))\").parent().hide();
});//each
});//key up.
});
"</script>
<style type="text/css">"
.tablefaq {border-style:none; border:0;}
.tblQuestion span.arrow { float:left; margin-top: 5px; margin-right:5px; background:transparent url(http://developer.mindtouch.com/@api/deki/files/4810/=arrows.png) no-repeat scroll 0px -16px; width:16px; height:16px; display:block;}
.tblQuestion span.up { background-position:0px 0px;}
.tblAnswerDiv {padding-left:20px; background:"..AnswerBackGround.."; font-size:"..AnswerSize.."; font-weight:normal;font-size:16px; }
.tblQuestionDiv { background:"..QuestionBackGround.."; font-size:"..QuestionSize.."; font-weight: bold; width=100%; font-size:18px; cursor:pointer; }
"</style>
</head></html>
| test1 |
| apantisi 1 |
| test2 |
| answer2 |
| question3 |
| answer3 |
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |