arrow 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +1590 -0
- data/LICENSE +28 -0
- data/README +75 -0
- data/Rakefile +366 -0
- data/Rakefile.local +63 -0
- data/data/arrow/applets/TEMPLATE.rb.tpl +53 -0
- data/data/arrow/applets/args.rb +50 -0
- data/data/arrow/applets/config.rb +55 -0
- data/data/arrow/applets/error.rb +63 -0
- data/data/arrow/applets/files.rb +46 -0
- data/data/arrow/applets/inspect.rb +46 -0
- data/data/arrow/applets/nosuchapplet.rb +31 -0
- data/data/arrow/applets/status.rb +92 -0
- data/data/arrow/applets/test.rb +133 -0
- data/data/arrow/applets/tutorial/counter.rb +96 -0
- data/data/arrow/applets/tutorial/dingus.rb +67 -0
- data/data/arrow/applets/tutorial/hello.rb +34 -0
- data/data/arrow/applets/tutorial/hello2.rb +73 -0
- data/data/arrow/applets/tutorial/imgtext.rb +90 -0
- data/data/arrow/applets/tutorial/imgtext2.rb +286 -0
- data/data/arrow/applets/tutorial/index.rb +36 -0
- data/data/arrow/applets/tutorial/logo.rb +98 -0
- data/data/arrow/applets/tutorial/memcache.rb +61 -0
- data/data/arrow/applets/tutorial/missing.rb +37 -0
- data/data/arrow/applets/tutorial/protected.rb +100 -0
- data/data/arrow/applets/tutorial/redirector.rb +52 -0
- data/data/arrow/applets/tutorial/rndimages.rb +159 -0
- data/data/arrow/applets/tutorial/sharenotes.rb +83 -0
- data/data/arrow/applets/tutorial/subclassed-hello.rb +32 -0
- data/data/arrow/applets/tutorial/superhello.rb +72 -0
- data/data/arrow/applets/tutorial/timeclock.rb +78 -0
- data/data/arrow/applets/view-applet.rb +123 -0
- data/data/arrow/applets/view-template.rb +85 -0
- data/data/arrow/applets/wiki.rb +274 -0
- data/data/arrow/templates/TEMPLATE.tmpl.tpl +36 -0
- data/data/arrow/templates/applet-status.tmpl +153 -0
- data/data/arrow/templates/args-display.tmpl +120 -0
- data/data/arrow/templates/config/display-table.tmpl +36 -0
- data/data/arrow/templates/config/display.tmpl +36 -0
- data/data/arrow/templates/counter-deleted.tmpl +33 -0
- data/data/arrow/templates/counter.tmpl +59 -0
- data/data/arrow/templates/dingus.tmpl +55 -0
- data/data/arrow/templates/enumtable.tmpl +8 -0
- data/data/arrow/templates/error-display.tmpl +92 -0
- data/data/arrow/templates/filemap.tmpl +89 -0
- data/data/arrow/templates/hello-world-src.tmpl +34 -0
- data/data/arrow/templates/hello-world.tmpl +60 -0
- data/data/arrow/templates/imgtext/fontlist.tmpl +46 -0
- data/data/arrow/templates/imgtext/form.tmpl +70 -0
- data/data/arrow/templates/imgtext/reload-error.tmpl +40 -0
- data/data/arrow/templates/imgtext/reload.tmpl +55 -0
- data/data/arrow/templates/inspect/display.tmpl +80 -0
- data/data/arrow/templates/loginform.tmpl +64 -0
- data/data/arrow/templates/logout.tmpl +32 -0
- data/data/arrow/templates/memcache/display.tmpl +41 -0
- data/data/arrow/templates/navbar.incl +27 -0
- data/data/arrow/templates/nosuchapplet.tmpl +32 -0
- data/data/arrow/templates/printsource.tmpl +35 -0
- data/data/arrow/templates/protected.tmpl +36 -0
- data/data/arrow/templates/rndimages.tmpl +38 -0
- data/data/arrow/templates/service-response.tmpl +13 -0
- data/data/arrow/templates/sharenotes/display.tmpl +38 -0
- data/data/arrow/templates/status.tmpl +120 -0
- data/data/arrow/templates/templateviewer.tmpl +43 -0
- data/data/arrow/templates/test/harness.tmpl +57 -0
- data/data/arrow/templates/test/list.tmpl +48 -0
- data/data/arrow/templates/test/problem.tmpl +42 -0
- data/data/arrow/templates/tutorial/index.tmpl +37 -0
- data/data/arrow/templates/tutorial/missingapplet.tmpl +29 -0
- data/data/arrow/templates/view-applet-nosuch.tmpl +32 -0
- data/data/arrow/templates/view-applet.tmpl +40 -0
- data/data/arrow/templates/view-template.tmpl +83 -0
- data/data/arrow/templates/wiki/formerror.tmpl +47 -0
- data/data/arrow/templates/wiki/markup_help.incl +6 -0
- data/data/arrow/templates/wiki/new.tmpl +56 -0
- data/data/arrow/templates/wiki/new_system.tmpl +122 -0
- data/data/arrow/templates/wiki/sectionlist.tmpl +43 -0
- data/data/arrow/templates/wiki/show.tmpl +34 -0
- data/docs/manual/layouts/default.page +43 -0
- data/docs/manual/lib/api-filter.rb +81 -0
- data/docs/manual/lib/editorial-filter.rb +64 -0
- data/docs/manual/lib/examples-filter.rb +244 -0
- data/docs/manual/lib/links-filter.rb +117 -0
- data/lib/apache/fakerequest.rb +448 -0
- data/lib/apache/logger.rb +33 -0
- data/lib/arrow.rb +51 -0
- data/lib/arrow/acceptparam.rb +207 -0
- data/lib/arrow/applet.rb +725 -0
- data/lib/arrow/appletmixins.rb +218 -0
- data/lib/arrow/appletregistry.rb +590 -0
- data/lib/arrow/applettestcase.rb +503 -0
- data/lib/arrow/broker.rb +255 -0
- data/lib/arrow/cache.rb +176 -0
- data/lib/arrow/config-loaders/yaml.rb +75 -0
- data/lib/arrow/config.rb +615 -0
- data/lib/arrow/constants.rb +24 -0
- data/lib/arrow/cookie.rb +359 -0
- data/lib/arrow/cookieset.rb +108 -0
- data/lib/arrow/dispatcher.rb +368 -0
- data/lib/arrow/dispatcherloader.rb +50 -0
- data/lib/arrow/exceptions.rb +61 -0
- data/lib/arrow/fallbackhandler.rb +48 -0
- data/lib/arrow/formvalidator.rb +631 -0
- data/lib/arrow/htmltokenizer.rb +343 -0
- data/lib/arrow/logger.rb +488 -0
- data/lib/arrow/logger/apacheoutputter.rb +69 -0
- data/lib/arrow/logger/arrayoutputter.rb +63 -0
- data/lib/arrow/logger/coloroutputter.rb +111 -0
- data/lib/arrow/logger/fileoutputter.rb +96 -0
- data/lib/arrow/logger/htmloutputter.rb +54 -0
- data/lib/arrow/logger/outputter.rb +123 -0
- data/lib/arrow/mixins.rb +425 -0
- data/lib/arrow/monkeypatches.rb +94 -0
- data/lib/arrow/object.rb +117 -0
- data/lib/arrow/path.rb +196 -0
- data/lib/arrow/service.rb +447 -0
- data/lib/arrow/session.rb +289 -0
- data/lib/arrow/session/dbstore.rb +100 -0
- data/lib/arrow/session/filelock.rb +160 -0
- data/lib/arrow/session/filestore.rb +132 -0
- data/lib/arrow/session/id.rb +98 -0
- data/lib/arrow/session/lock.rb +253 -0
- data/lib/arrow/session/md5id.rb +42 -0
- data/lib/arrow/session/nulllock.rb +42 -0
- data/lib/arrow/session/posixlock.rb +166 -0
- data/lib/arrow/session/sha1id.rb +54 -0
- data/lib/arrow/session/store.rb +366 -0
- data/lib/arrow/session/usertrackid.rb +52 -0
- data/lib/arrow/spechelpers.rb +73 -0
- data/lib/arrow/template.rb +713 -0
- data/lib/arrow/template/attr.rb +31 -0
- data/lib/arrow/template/call.rb +31 -0
- data/lib/arrow/template/comment.rb +33 -0
- data/lib/arrow/template/container.rb +118 -0
- data/lib/arrow/template/else.rb +41 -0
- data/lib/arrow/template/elsif.rb +44 -0
- data/lib/arrow/template/escape.rb +53 -0
- data/lib/arrow/template/export.rb +87 -0
- data/lib/arrow/template/for.rb +145 -0
- data/lib/arrow/template/if.rb +78 -0
- data/lib/arrow/template/import.rb +119 -0
- data/lib/arrow/template/include.rb +206 -0
- data/lib/arrow/template/iterator.rb +208 -0
- data/lib/arrow/template/nodes.rb +734 -0
- data/lib/arrow/template/parser.rb +571 -0
- data/lib/arrow/template/prettyprint.rb +53 -0
- data/lib/arrow/template/render.rb +191 -0
- data/lib/arrow/template/selectlist.rb +94 -0
- data/lib/arrow/template/set.rb +87 -0
- data/lib/arrow/template/timedelta.rb +81 -0
- data/lib/arrow/template/unless.rb +78 -0
- data/lib/arrow/template/urlencode.rb +51 -0
- data/lib/arrow/template/yield.rb +139 -0
- data/lib/arrow/templatefactory.rb +125 -0
- data/lib/arrow/testcase.rb +567 -0
- data/lib/arrow/transaction.rb +608 -0
- data/rake/191_compat.rb +26 -0
- data/rake/dependencies.rb +76 -0
- data/rake/documentation.rb +114 -0
- data/rake/helpers.rb +502 -0
- data/rake/hg.rb +282 -0
- data/rake/manual.rb +787 -0
- data/rake/packaging.rb +129 -0
- data/rake/publishing.rb +278 -0
- data/rake/style.rb +62 -0
- data/rake/svn.rb +668 -0
- data/rake/testing.rb +187 -0
- data/rake/verifytask.rb +64 -0
- data/spec/arrow/acceptparam_spec.rb +157 -0
- data/spec/arrow/applet_spec.rb +575 -0
- data/spec/arrow/appletmixins_spec.rb +409 -0
- data/spec/arrow/appletregistry_spec.rb +294 -0
- data/spec/arrow/broker_spec.rb +153 -0
- data/spec/arrow/config_spec.rb +224 -0
- data/spec/arrow/cookieset_spec.rb +164 -0
- data/spec/arrow/dispatcher_spec.rb +137 -0
- data/spec/arrow/dispatcherloader_spec.rb +65 -0
- data/spec/arrow/formvalidator_spec.rb +781 -0
- data/spec/arrow/logger_spec.rb +346 -0
- data/spec/arrow/mixins_spec.rb +120 -0
- data/spec/arrow/service_spec.rb +645 -0
- data/spec/arrow/session_spec.rb +121 -0
- data/spec/arrow/template/iterator_spec.rb +222 -0
- data/spec/arrow/templatefactory_spec.rb +185 -0
- data/spec/arrow/transaction_spec.rb +319 -0
- data/spec/arrow_spec.rb +37 -0
- data/spec/lib/appletmatchers.rb +281 -0
- data/spec/lib/constants.rb +77 -0
- data/spec/lib/helpers.rb +41 -0
- data/spec/lib/matchers.rb +44 -0
- data/tests/cookie.tests.rb +310 -0
- data/tests/path.tests.rb +157 -0
- data/tests/session.tests.rb +111 -0
- data/tests/session_id.tests.rb +82 -0
- data/tests/session_lock.tests.rb +191 -0
- data/tests/session_store.tests.rb +53 -0
- data/tests/template.tests.rb +1360 -0
- metadata +339 -0
@@ -0,0 +1,55 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
3
|
+
|
4
|
+
<!--
|
5
|
+
|
6
|
+
Markdown/BlueCloth Dingus
|
7
|
+
|
8
|
+
-->
|
9
|
+
|
10
|
+
<head>
|
11
|
+
<title>Markdown/BlueCloth Dingus</title>
|
12
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
13
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
14
|
+
<link rel="stylesheet" type="text/css" href="/css/arrow.css" />
|
15
|
+
</head>
|
16
|
+
<body>
|
17
|
+
|
18
|
+
<h1>Markdown/BlueCloth Dingus</h1>
|
19
|
+
|
20
|
+
<p>This is a toy that lets you test the magical powers of the BlueCloth
|
21
|
+
module, which transforms Markdown text into HTML.</p>
|
22
|
+
|
23
|
+
<h2>Markdown Input</h2>
|
24
|
+
<form action="[?call txn.action?]" method="post">
|
25
|
+
<textarea id="source" name="source" rows="20"
|
26
|
+
cols="80"><?attr source?></textarea><br/>
|
27
|
+
<input type="submit" id="display" name=" Display "/>
|
28
|
+
</form>
|
29
|
+
|
30
|
+
<?if output?>
|
31
|
+
<h2>Output Source</h2>
|
32
|
+
<form action="" method="post">
|
33
|
+
<textarea id="markdown-output" cols="80" rows="20"><?escape output?></textarea>
|
34
|
+
</form>
|
35
|
+
|
36
|
+
<h2>Rendered Output</h2>
|
37
|
+
<div id="markdown-result" class="dotbox">
|
38
|
+
<?attr output?>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<?end if?>
|
42
|
+
|
43
|
+
<p style="font-size: smaller;">Using BlueCloth <?call bcmod.const_get(:SvnRev) ?>.</p>
|
44
|
+
|
45
|
+
<?include navbar.incl?>
|
46
|
+
|
47
|
+
</body>
|
48
|
+
</html>
|
49
|
+
|
50
|
+
|
51
|
+
<!--
|
52
|
+
Local Variables:
|
53
|
+
mode: xml
|
54
|
+
-->
|
55
|
+
|
@@ -0,0 +1,92 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
3
|
+
|
4
|
+
<!--
|
5
|
+
|
6
|
+
Arrow Example Error Handler: Display Template
|
7
|
+
|
8
|
+
-->
|
9
|
+
|
10
|
+
<head>
|
11
|
+
<title>Error</title>
|
12
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
13
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
14
|
+
<link rel="stylesheet" type="text/css" href="/css/arrow.css" />
|
15
|
+
</head>
|
16
|
+
<body>
|
17
|
+
|
18
|
+
<h1>Error</h1>
|
19
|
+
<p>An error (<?call err.class.name?>) occurred in the '<?call
|
20
|
+
applet.signature.name ?>' applet.</p>
|
21
|
+
|
22
|
+
<h2><strong><?escape err.message?></strong></h2>
|
23
|
+
<pre><?escape err.backtrace.join("\n") ?></pre>
|
24
|
+
|
25
|
+
<h3>Transaction Dump:</h3>
|
26
|
+
<table id="transaction-dump" class="kvlist">
|
27
|
+
<tbody>
|
28
|
+
<tr class="odd-row">
|
29
|
+
<th class="row-title">inspect</th>
|
30
|
+
<td><tt><?escape txn.inspect ?></tt></td>
|
31
|
+
</tr>
|
32
|
+
<tr class="even-row">
|
33
|
+
<th class="row-title">app_root</th>
|
34
|
+
<td><tt><?escape txn.app_root.inspect ?></tt></td>
|
35
|
+
</tr>
|
36
|
+
<tr class="odd-row">
|
37
|
+
<th class="row-title">applet</th>
|
38
|
+
<td><tt><?escape applet.inspect ?></tt></td>
|
39
|
+
</tr>
|
40
|
+
<tr class="even-row">
|
41
|
+
<th class="row-title">applet_path</th>
|
42
|
+
<td><tt><?escape txn.applet_path.inspect ?></tt></td>
|
43
|
+
</tr>
|
44
|
+
<tr class="odd-row">
|
45
|
+
<th class="row-title">vargs</th>
|
46
|
+
<td><tt><?escape txn.vargs.inspect ?></tt></td>
|
47
|
+
</tr>
|
48
|
+
<tr class="even-row">
|
49
|
+
<th class="row-title">serial</th>
|
50
|
+
<td><?call txn.serial ?></td>
|
51
|
+
</tr>
|
52
|
+
</tbody>
|
53
|
+
</table>
|
54
|
+
|
55
|
+
<h3>Request Dump:</h3>
|
56
|
+
<table id="request-headers" class="kvlist">
|
57
|
+
<tbody>
|
58
|
+
<?yield header, val from txn.request.headers_in.each?>
|
59
|
+
<tr>
|
60
|
+
<th><?call header ?>: </th>
|
61
|
+
<td><tt><?call val.chomp ?></tt></td>
|
62
|
+
</tr>
|
63
|
+
<?end?>
|
64
|
+
</tbody>
|
65
|
+
</table>
|
66
|
+
|
67
|
+
<h3>Session Dump:</h3>
|
68
|
+
<?if txn.session? ?>
|
69
|
+
<table id="session-dump" class="kvlist">
|
70
|
+
<tbody>
|
71
|
+
<?yield key, val from txn.session.each ?>
|
72
|
+
<tr>
|
73
|
+
<th><?call key ?>: </th>
|
74
|
+
<td><tt><?escape val.inspect ?></tt></td>
|
75
|
+
</tr>
|
76
|
+
<?end yield?>
|
77
|
+
</tbody>
|
78
|
+
</table>
|
79
|
+
<?else?>
|
80
|
+
<p>No session loaded when the error occurred.</p>
|
81
|
+
<?end if?>
|
82
|
+
|
83
|
+
<?include navbar.incl?>
|
84
|
+
|
85
|
+
</body>
|
86
|
+
</html>
|
87
|
+
|
88
|
+
|
89
|
+
<!--
|
90
|
+
Local Variables:
|
91
|
+
mode: xml
|
92
|
+
-->
|
@@ -0,0 +1,89 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
3
|
+
|
4
|
+
<!--
|
5
|
+
|
6
|
+
Arrow Broker Filemap Display
|
7
|
+
|
8
|
+
-->
|
9
|
+
|
10
|
+
<head>
|
11
|
+
<title>Arrow Broker Filemap Display</title>
|
12
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
13
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
14
|
+
<link rel="stylesheet" type="text/css" href="/css/arrow.css" />
|
15
|
+
|
16
|
+
<script type="text/javascript">
|
17
|
+
<!--
|
18
|
+
function toggle( id ) {
|
19
|
+
if ( !document.getElementById ) return;
|
20
|
+
|
21
|
+
target = document.getElementById( id );
|
22
|
+
if ( typeof target == "undefined" ) return;
|
23
|
+
|
24
|
+
if ( target.style.display == "block" ) {
|
25
|
+
target.style.display = "none";
|
26
|
+
} else {
|
27
|
+
target.style.display = "block";
|
28
|
+
}
|
29
|
+
|
30
|
+
return false;
|
31
|
+
}
|
32
|
+
// -->
|
33
|
+
</script>
|
34
|
+
</head>
|
35
|
+
<body>
|
36
|
+
|
37
|
+
<h1>Arrow Broker Filemap Display</h1>
|
38
|
+
<p><?call txn.broker.registry.filemap.length ?> Applet Files Examined</p>
|
39
|
+
|
40
|
+
<?for filename, appletfile in txn.broker.registry.filemap.sort_by {|key,val| key} ?>
|
41
|
+
|
42
|
+
<div class="filemap-entry">
|
43
|
+
<h3 class="filemap-filename"><?call filename ?></h3>
|
44
|
+
|
45
|
+
<?if appletfile.exception ?>
|
46
|
+
<!-- Exception while loading -->
|
47
|
+
<div class="filemap-exception-content">
|
48
|
+
<strong>Exception while loading:</strong>
|
49
|
+
<span class="toggle-button" onclick="toggle('exc-[?call appletfile.exception.object_id?]')">expand</span><br />
|
50
|
+
<pre><?escape appletfile.exception.message ?></pre>
|
51
|
+
<div id="exc-[?call appletfile.exception.object_id ?]" class="filemap-exception-backtrace">
|
52
|
+
<?for frame in appletfile.exception.backtrace ?>
|
53
|
+
<code class="filemap-exception-frame"><?escape frame ?></code><br/>
|
54
|
+
<?end for?>
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
|
58
|
+
<?else?>
|
59
|
+
<!-- Loaded okay -->
|
60
|
+
|
61
|
+
<div class="filemap-normal-content">
|
62
|
+
<div class="filemap-uris">
|
63
|
+
<strong>URIs:</strong>
|
64
|
+
<?call appletfile.uris.sort.join(";") ?>
|
65
|
+
</div>
|
66
|
+
<div class="filemap-classes">
|
67
|
+
<strong>Classes:</strong>
|
68
|
+
<?escape appletfile.appletclasses.collect {|cl| cl.normalized_name}.sort.join(";") ?>
|
69
|
+
</div>
|
70
|
+
<div class="filemap-timestamp">
|
71
|
+
<strong>Timestamp:</strong> <?call appletfile.timestamp.ctime ?>
|
72
|
+
</div>
|
73
|
+
</div>
|
74
|
+
<?end if ?>
|
75
|
+
|
76
|
+
</div>
|
77
|
+
<?end for ?>
|
78
|
+
|
79
|
+
<?include navbar.incl?>
|
80
|
+
|
81
|
+
</body>
|
82
|
+
</html>
|
83
|
+
|
84
|
+
|
85
|
+
<!--
|
86
|
+
Local Variables:
|
87
|
+
mode: nxml
|
88
|
+
-->
|
89
|
+
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
3
|
+
|
4
|
+
<!--
|
5
|
+
|
6
|
+
Hello World: Source View
|
7
|
+
|
8
|
+
-->
|
9
|
+
|
10
|
+
<head>
|
11
|
+
<title>Hello World: Source View</title>
|
12
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
13
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
14
|
+
<link rel="stylesheet" type="text/css" href="/css/arrow.css" />
|
15
|
+
</head>
|
16
|
+
<body>
|
17
|
+
|
18
|
+
<h1>Hello World: Source View</h1>
|
19
|
+
|
20
|
+
<p>This is the source code of the <tt>Hello World</tt> applet:</p>
|
21
|
+
|
22
|
+
<pre><?escape source?></pre>
|
23
|
+
|
24
|
+
<?include navbar.incl?>
|
25
|
+
|
26
|
+
</body>
|
27
|
+
</html>
|
28
|
+
|
29
|
+
|
30
|
+
<!--
|
31
|
+
Local Variables:
|
32
|
+
mode: xml
|
33
|
+
-->
|
34
|
+
|
@@ -0,0 +1,60 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
3
|
+
|
4
|
+
<!--
|
5
|
+
|
6
|
+
Arrow "Hello World" Applet Template
|
7
|
+
|
8
|
+
-->
|
9
|
+
|
10
|
+
<head>
|
11
|
+
<title>Arrow: Hello World</title>
|
12
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
13
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
14
|
+
<link rel="stylesheet" type="text/css" href="/css/arrow.css" />
|
15
|
+
</head>
|
16
|
+
<body>
|
17
|
+
|
18
|
+
<h1>Hello World</h1>
|
19
|
+
|
20
|
+
<p>This is a minimal demo applet that just loads and prints a template. You can
|
21
|
+
see the source code for it by running the <a href="[?call
|
22
|
+
txn.action?]/printsource">printsource action</a>. There's also <a
|
23
|
+
href="[?call txn.action?]/display">a simpler version</a> of this applet
|
24
|
+
that outputs plain text (i.e., no templates).<p>
|
25
|
+
|
26
|
+
<!-- Runcount: [?call applet.run_count ?] -->
|
27
|
+
|
28
|
+
<?if txn.session? ?>
|
29
|
+
<!-- Session found -->
|
30
|
+
<?if txn.session[:delegations] ?>
|
31
|
+
<p>This is apparently being run in a session that has executed the counted
|
32
|
+
version of the <tt>Hello World</tt> applet <strong><?call
|
33
|
+
txn.session[:delegations] ?></strong> times.</p>
|
34
|
+
|
35
|
+
<p>This is the same template used by the regular <tt>Hello World</tt>
|
36
|
+
applet.</p>
|
37
|
+
|
38
|
+
<?else?>
|
39
|
+
<!-- But no delegations in it, apparently. -->
|
40
|
+
<?end if ?>
|
41
|
+
|
42
|
+
<?if txn.session[:user] ?>
|
43
|
+
<p>Since you're logged in as '<?call txn.session[:user]?>', you can also <a
|
44
|
+
href="[?call txn.app_root?]/[?call txn.applet_path.split(%r{/})[0]
|
45
|
+
?]/logout">log out</a> to test the protectedness
|
46
|
+
of the applet chain.</p>
|
47
|
+
<?end?>
|
48
|
+
|
49
|
+
<?end if ?>
|
50
|
+
|
51
|
+
<?include navbar.incl?>
|
52
|
+
|
53
|
+
</body>
|
54
|
+
</html>
|
55
|
+
|
56
|
+
|
57
|
+
<!--
|
58
|
+
Local Variables:
|
59
|
+
mode: xml
|
60
|
+
-->
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
3
|
+
|
4
|
+
<!--
|
5
|
+
|
6
|
+
Image Text Creator: Font List
|
7
|
+
|
8
|
+
-->
|
9
|
+
|
10
|
+
<head>
|
11
|
+
<title>Image Text Creator: Font List</title>
|
12
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
13
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
14
|
+
<link rel="stylesheet" type="text/css" href="/css/arrow.css" />
|
15
|
+
<style type="text/css">
|
16
|
+
.font-family { font-size: 1.1em; }
|
17
|
+
.font-style { color: #666; }
|
18
|
+
</style>
|
19
|
+
</head>
|
20
|
+
<body>
|
21
|
+
|
22
|
+
<h1>Image Text Creator: Font List</h1>
|
23
|
+
|
24
|
+
<dl>
|
25
|
+
<?for name,font in fonts.sort_by {|k,v| [k, v[:family], v[:style]]} ?>
|
26
|
+
<dt><a href="[?call txn.applet ?]/[?attr name ?]/72/72%20Pt.%20[?urlencode
|
27
|
+
font[:family] ?]%20[?urlencode font[:style] ?].png"><?attr name ?></a></dt>
|
28
|
+
<dd><span class="font-family"><?call font[:family] ?></span>
|
29
|
+
<span class="font-style"><?call font[:style] ?></span></dd>
|
30
|
+
<?end?>
|
31
|
+
</dl>
|
32
|
+
|
33
|
+
<p>The fonts this applet displays are only loaded once, but you can <a
|
34
|
+
href="[?call txn.applet ?]/reload">force a reload</a>.</p>
|
35
|
+
|
36
|
+
<?include navbar.incl?>
|
37
|
+
|
38
|
+
</body>
|
39
|
+
</html>
|
40
|
+
|
41
|
+
|
42
|
+
<!--
|
43
|
+
Local Variables:
|
44
|
+
mode: xml
|
45
|
+
-->
|
46
|
+
|
@@ -0,0 +1,70 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
3
|
+
|
4
|
+
<!--
|
5
|
+
|
6
|
+
Image Text Generator
|
7
|
+
|
8
|
+
-->
|
9
|
+
|
10
|
+
<head>
|
11
|
+
<title>Image Text Generator</title>
|
12
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
13
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
14
|
+
<link rel="stylesheet" type="text/css" href="/css/arrow.css" />
|
15
|
+
</head>
|
16
|
+
<body>
|
17
|
+
|
18
|
+
<h1>Image Text Generator</h1>
|
19
|
+
|
20
|
+
<div id="input-form">
|
21
|
+
<p>Input some text below to generate a image of it:</p>
|
22
|
+
|
23
|
+
<form action="[?call txn.action ?]" method="get">
|
24
|
+
<fieldset id="text">
|
25
|
+
<legend>Image</legend>
|
26
|
+
<label for="imgtext">Image Text:</label>
|
27
|
+
<input id="imgtext" name="imgtext" type="text" size="50" maxlength="100"
|
28
|
+
value="[?call txn.params('imgtext') ?]" /><br/>
|
29
|
+
|
30
|
+
<label for="fontsize">Font Size (in points):</label>
|
31
|
+
<input id="fontsize" name="fontsize" type="text" size="3" maxlength="3"
|
32
|
+
value="[?call txn.params('fontsize') ?]" /><br/>
|
33
|
+
|
34
|
+
<select id="fontface" name="fontface">
|
35
|
+
<?for name,font in fonts.sort_by {|k,v| [k, v[:family], v[:style]]} ?>
|
36
|
+
<?if name == txn.vargs['fontface'] ?>
|
37
|
+
<option id="[?attr name ?]" value="[?attr name ?]" selected="selected"><?call
|
38
|
+
font[:family] ?> <?call font[:style] ?></option>
|
39
|
+
<?else?>
|
40
|
+
<option id="[?attr name ?]" value="[?attr name ?]"><?call
|
41
|
+
font[:family]?> <?call font[:style] ?></option>
|
42
|
+
<?end?>
|
43
|
+
<?end?>
|
44
|
+
</select>
|
45
|
+
</fieldset>
|
46
|
+
<fieldset id="controls">
|
47
|
+
<legend></legend>
|
48
|
+
<input type="submit" value="Make It!" name="Make It!" />
|
49
|
+
</fieldset>
|
50
|
+
</form>
|
51
|
+
</div>
|
52
|
+
|
53
|
+
<div id="output-image">
|
54
|
+
<h2>Output</h2>
|
55
|
+
<img src="[?call txn.action ?]/png/[?urlencode txn.vargs['imgtext'] ?]/[?call
|
56
|
+
txn.vargs['fontface'] ?]/[?call txn.vargs['fontsize'] ?]"
|
57
|
+
alt="[?call txn.vargs['imgtext'] ?]" />
|
58
|
+
</div>
|
59
|
+
|
60
|
+
<?include navbar.incl?>
|
61
|
+
|
62
|
+
</body>
|
63
|
+
</html>
|
64
|
+
|
65
|
+
|
66
|
+
<!--
|
67
|
+
Local Variables:
|
68
|
+
mode: xml
|
69
|
+
-->
|
70
|
+
|