mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 08:23:12 +01:00
8b2dae28f7
- Added indexOf function for IE compatiblity - this and some other code is redundant to that in egw_action_common.js - Probably this code should be merged into jsapi and jsapi.js should be cleaned up and splitted into multiple files - Implemented template widget - Implemented dummy implementation of description widget - Improved et2_placeholder - it now shows all properties set for that placeholder - Improved and extended test page - Improved interface system in et2_inheritance.js - each object derrived from Class now has a instanceOf function which checks, whether the object is either an instance of the given class or implements the given interface (same behaviour as instanceOf in Java) - Widgets can now define which other widget classes are allowed inside of them
97 lines
2.1 KiB
HTML
97 lines
2.1 KiB
HTML
<html>
|
|
<head>
|
|
<title>ET2 - Test</title>
|
|
|
|
<script src="jquery.js"></script>
|
|
<script src="../et2_xml.js"></script>
|
|
<script src="../et2_inheritance.js"></script>
|
|
<script src="../et2_common.js"></script>
|
|
<script src="../et2_widget.js"></script>
|
|
<script src="../et2_template.js"></script>
|
|
<script src="../et2_description.js"></script>
|
|
<style type="text/css">
|
|
body {
|
|
font-family: Lucida Grande, sans-serif;
|
|
font-size: 10pt;
|
|
}
|
|
|
|
#linklist a {
|
|
color: blue;
|
|
display: block;
|
|
}
|
|
|
|
#linklist a:visited {
|
|
color: blue;
|
|
}
|
|
|
|
#linklist a:hover {
|
|
color: #5050FF;
|
|
}
|
|
|
|
#container {
|
|
margin: 10px;
|
|
border: 1px solid gray;
|
|
padding: 10px;
|
|
}
|
|
|
|
.header {
|
|
color: #111;
|
|
margin: 30px 0 5px 0;
|
|
border-bottom: 1px solid #111;
|
|
}
|
|
|
|
.et2_placeholder {
|
|
display: inline-block;
|
|
border: 1px solid cornflowerblue;
|
|
background-color: #FCFCFC;
|
|
padding: 3px;
|
|
margin: 1px;
|
|
}
|
|
|
|
.et2_placeholder .et2_caption {
|
|
display: block;
|
|
font-size: 8pt;
|
|
margin: 0 0 5px 0;
|
|
font-weight: bold;
|
|
color: #2E2E2E;
|
|
text-shadow: rgba(255, 255, 255, 0.5) 0 1px 0;
|
|
}
|
|
|
|
.et2_placeholder .et2_attr {
|
|
display: block;
|
|
font-size: 8pt;
|
|
color: #3030A0;
|
|
margin: 2px 0 2px 0;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>EGroupware ETemplate2 Test</h1>
|
|
<div class="header">Choose one of the following tests:</div>
|
|
<div id="linklist">
|
|
<a href="#" onclick="open_xet('../../../timesheet/templates/default/edit.xet');">Timesheet edit dialog</a>
|
|
<a href="#" onclick="open_xet('et2_test_template.xet');">Template proxy test</a>
|
|
</div>
|
|
<div class="header">ETemplate2 container:</div>
|
|
<div id="container"></div>
|
|
<script>
|
|
var container = null;
|
|
|
|
function open_xet(file) {
|
|
et2_loadXMLFromURL(file,
|
|
function(_xmldoc) {
|
|
if (container != null)
|
|
{
|
|
container.destroy();
|
|
container = null;
|
|
}
|
|
|
|
container = new et2_container(null);
|
|
container.setParentDOMNode(document.getElementById("container"));
|
|
container.loadFromXML(_xmldoc);
|
|
});
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|