chg: replaced ant with gradle

This commit is contained in:
Tobi Schäfer 2020-03-16 16:53:52 +01:00
parent cee0be52e0
commit 5cbeb9f01d
609 changed files with 87626 additions and 638 deletions

View file

@ -0,0 +1,19 @@
if (req.data.add && req.data.name) {
var obj = new HopObject();
obj.name = req.data.name;
this.add(obj);
res.redirect(obj.href())
}
res.data.root = root.href();
res.data.parenthref = this._parent.href();
res.data.parentname = this._parent.name;
res.data.href = this.href();
res.data.title = this.name;
res.data.list = '\
<ul>\
<li><a href="'+ this.href() +'">&lt;&lt; back</a></li>\
</ul>';
res.data.content = this.renderSkinAsString('add');
res.data.body = this.renderSkinAsString('main');
this.renderSkin('page');

View file

@ -0,0 +1,6 @@
<form method="post">
<p>In order to attach a new HopObject to "<% response.title %>",
<br />please specify its name below.</p>
<p>Name: <input type="text" name="name">
<input type="submit" name="add" value="Add"></p>
</form>

View file

@ -0,0 +1,24 @@
<p>This HopObject is named "<% response.title %>" and has the ID "<% response.id %>".</p>
<p>It is attached to the HopObject
<a href="<% response.parenthref %>">"<% response.parentname %>"</a>.</p>
<form method="post">
<p>The access counter for
<a href="<% response.href %>">this Hop Object</a> is at
<% response.counter %>
<input type="submit" name="counter" value="Reset">
</p>
</form>
<p>This HopObject is automatically persisted in Helma's
embedded XML database at ./db/welcome/<% response.id %>.xml</p>
<p>To explore this HopObject and its properties in more detail you
may utilize the <a href="<% response.href %>shell">web-based shell</a>.
In addition to the inspection of this HopObject, you will be able to
evaluate server-side Javascript in its scope.</p>
<p>In case you are curious: This request has been handled by the action
defined at ./apps/welcome/code/HopObject/main.hac and this text was
rendered from the skin ./apps/welcome/code/HopObject/hop.skin</p>

View file

@ -0,0 +1,8 @@
function hoplist(){
var list = '';
for (var subnode in this.list()) {
list += '<li><a href="'+ this.list()[subnode].href()
+'">'+ this.list()[subnode].name +'</a></li>';
}
return '<ul>'+ list +'</ul>';
}

View file

@ -0,0 +1,24 @@
// Prepare some response values used by the skins
res.data.root = root.href();
res.data.parenthref = this._parent.href();
res.data.parentname = this._parent.name;
res.data.href = this.href();
res.data.title = this.name;
res.data.id = this._id;
if (req.data.counter)
this.counter = 0;
else
this.counter = !this.counter ? 1 : this.counter + 1;
res.data.counter = this.counter;
res.data.list = this.hoplist();
res.data.add = '\
<blockquote>\
<form method="post" action="'+ this.href() +'add">\
<input type="submit" name="add" value="Add HopObject">\
</form>\
</blockquote>';
// Render three nested skins
res.data.content = this.renderSkinAsString('hop');
res.data.body = this.renderSkinAsString('main');
this.renderSkin('page');

View file

@ -0,0 +1,16 @@
<div class="lead">
<p>HopObject - the central building blocks of your Helma applications.</p>
</div>
<script> openbox('pagewebsite') </script>
<ul>
<li><a href="<% response.parenthref %>"><% response.parentname %></a></li>
</ul>
<h3><% response.title %></h3>
<% response.list %>
<% response.add %>
<script> closebox() </script>
<script> openbox('content') </script>
<% response.content %>
<script> closebox() </script>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html>
<head>
<title><% response.title %></title>
<meta http-equiv="Content-Script-Type" content="text/javascript">
<script src="<% response.href %>scripts.js"></script>
<link rel="stylesheet" href="<% response.href %>styles.css" media="screen" />
</head>
<body>
<div class="frame">
<img class="overview" onclick="location='/'" src="/static/helmaheader.png" /><br />
<% response.body %>
</div>
<br clear="all" /><br /><br />
</body>
</html>

View file

@ -0,0 +1,2 @@
res.contentType="application/javascript";
this.renderSkin('scripts_js');

View file

@ -0,0 +1,22 @@
function openbox(kind) {
document.write('\
<div class="'+ kind +'">\
<b class="rtop"><b class="r1"></b><b class="r2"></b>\
<b class="r3"></b><b class="r4"></b></b>\
');
if (kind != 'content') document.write('\
<div class="columnheight">\
');
else document.write('\
<div class="contentmargin">\
');
}
function closebox(kind) {
document.write('\
</div>\
<b class="rbottom"><b class="r4"></b><b class="r3"></b>\
<b class="r2"></b><b class="r1"></b></b>\
</div>\
');
}

View file

@ -0,0 +1,2 @@
res.contentType="text/css";
this.renderSkin('styles_css');

View file

@ -0,0 +1,112 @@
body {
background-color: #fff;
margin-top: 0px;
margin-left: 0px;
}
a {text-decoration: none;}
a:link {color: #00f;}
a:visited {color: #00b;}
a:active {color: #f66;}
a:hover {color: #c33;}
pre {
background: #ffe;
line-height:150%;
padding: 8px;
}
h3 {
font-family: "Trebuchet MS", sans-serif;
font-size: 16px;
margin-left: 15px;
}
ul {
font-family: "Trebuchet MS", sans-serif;
font-size: 13px;
color: #333;
// margin-left: 40px;
}
.overview {
width: 755px;
heigth: 92px;
}
.tools {
float:left;
margin-left: 15px;
width: 222px;
}
.intro {
float:left;
margin-left: 27px;
margin-right: 27px;
width: 222px;
}
.website {
float:left;
width: 222px;
}
.pagetools, .pageintro, .pagewebsite {
float:left;
margin-left: 15px;
width: 195px;
}
.frame {
width: 755px;
margin-top: 0px;
margin-right: auto;
margin-left: auto;
margin-bottom: 30px;
}
.lead {
font-family: "Trebuchet MS", sans-serif;
font-size: 16px;
color: #666;
margin-top: 20px;
margin-right: 45px;
margin-left: 125px;
margin-bottom: 25px;
}
.columnheight {
height: 300px;
}
.content {
font-family: "Trebuchet MS", sans-serif;
font-size: 13px;
line-height:135%;
float:left;
spacing: 10px;
margin-left: 25px;
width: 505px;
}
.contentmargin {
margin-left: 20px;
margin-right: 15px;
}
.tools, .tools b.rtop b, .tools b.rbottom b,
.pagetools, .pagetools b.rtop b, .pagetools b.rbottom b
{background: #bf7}
.intro, .intro b.rtop b, .intro b.rbottom b,
.pageintro, .pageintro b.rtop b, .pageintro b.rbottom b
{background: #fd6}
.website, .website b.rtop b, .website b.rbottom b,
.pagewebsite, .pagewebsite b.rtop b, .pagewebsite b.rbottom b
{background: #7cf}
.content, .content b.rtop b, .content b.rbottom b
{background: #eee}
b.rtop, b.rbottom{display:block;background: #fff}
b.rtop b, b.rbottom b{display:block;height: 1px;
overflow: hidden;}
b.r1{margin: 0 5px}
b.r2{margin: 0 3px}
b.r3{margin: 0 2px}
b.r4{margin: 0 1px;height: 2px}
b.rtop b.r4, b.rbottom b.r4{margin: 0 1px;height: 2px}

View file

@ -0,0 +1,3 @@
_children = collection(HopObject)
_children.accessname = name
name