label browser column headings
parent
5503ce06ce
commit
5973009ed1
|
@ -55,6 +55,10 @@ USE: errors
|
|||
|
||||
: write-vocab-list ( -- )
|
||||
#! Write out the HTML for the list of vocabularies
|
||||
<table> [
|
||||
<tr> [ <th> [ "Vocabularies" write ] </th> ] </tr>
|
||||
<tr> [
|
||||
<td> [
|
||||
<select name= "vocabs" size= "20" onchange= "document.forms.main.submit()" select> [
|
||||
vocabs [
|
||||
dup "current-vocab" get [ "" ] unless* = [
|
||||
|
@ -65,10 +69,17 @@ USE: errors
|
|||
chars>entities write
|
||||
"</option>\n" write
|
||||
] each
|
||||
] </select> ;
|
||||
] </select>
|
||||
] </td>
|
||||
] </tr>
|
||||
] </table> ;
|
||||
|
||||
: write-word-list ( vocab -- )
|
||||
#! Write out the HTML for the list of words in a vocabulary.
|
||||
<table> [
|
||||
<tr> [ <th> [ "Words" write ] </th> ] </tr>
|
||||
<tr> [
|
||||
<td> [
|
||||
<select name= "words" size= "20" onchange= "document.forms.main.submit()" select> [
|
||||
words [
|
||||
dup "current-word" get [ "" ] unless* str-compare 0 = [
|
||||
|
@ -79,19 +90,33 @@ USE: errors
|
|||
chars>entities write
|
||||
"</option>\n" write
|
||||
] each
|
||||
] </select> ;
|
||||
] </select>
|
||||
] </td>
|
||||
] </tr>
|
||||
] </table> ;
|
||||
|
||||
: write-editable-word-source ( vocab word -- )
|
||||
#! Write the source in a manner allowing it to be edited.
|
||||
<table> [
|
||||
<tr> [ <td> [ "<b>Source</b>" write ] </td> ] </tr>
|
||||
<tr> [
|
||||
<td> [
|
||||
<textarea name= "eval" rows= "30" cols= "80" textarea> [
|
||||
1024 <string-output-stream> dup >r [
|
||||
>r words r> swap [ over swap dup word-name rot = [ see ] [ drop ] ifte ] each drop
|
||||
] with-stream r> stream>str chars>entities write
|
||||
] </textarea> <br/>
|
||||
"Accept" button ;
|
||||
"Accept" button
|
||||
] </td>
|
||||
] </tr>
|
||||
] </table> ;
|
||||
|
||||
: write-word-source ( vocab word -- )
|
||||
#! Write the source for the given word from the vocab as HTML.
|
||||
<table> [
|
||||
<tr> [ <td> [ "<b>Source</b>" write ] </td> ] </tr>
|
||||
<tr> [
|
||||
<td> [
|
||||
<namespace> [
|
||||
"responder" "inspect" put
|
||||
"allow-edit?" get [ "Edit" [ "edit-state" t put ] quot-href <br/> ] when
|
||||
|
@ -102,7 +127,10 @@ USE: errors
|
|||
>r words r> swap [ over swap dup word-name rot = [ see ] [ drop ] ifte ] each drop
|
||||
] with-simple-html-output
|
||||
] ifte
|
||||
] bind drop ;
|
||||
] bind drop
|
||||
] </td>
|
||||
] </tr>
|
||||
] </table> ;
|
||||
|
||||
: get-vm-runtime ( -- java.lang.Runtime )
|
||||
f "java.lang.Runtime" "getRuntime" jinvoke-static ;
|
||||
|
|
Loading…
Reference in New Issue