-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
197 lines (159 loc) · 6.79 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>WireIt - XProc Editor</title>
<link rel="icon" href="../favicon.ico" type="image/png" />
<link rel="SHORTCUT ICON" href="../favicon.ico" type="image/png" />
<!-- YUI -->
<link rel="stylesheet" type="text/css" href="wireit/lib/yui/reset-fonts-grids/reset-fonts-grids.css" />
<link rel="stylesheet" type="text/css" href="wireit/lib/yui/assets/skins/sam/skin.css" />
<!-- InputEx CSS -->
<link type='text/css' rel='stylesheet' href='wireit/lib/inputex/css/inputEx.css' />
<!-- WireIt CSS -->
<link rel="stylesheet" type="text/css" href="wireit/css/WireIt.css" />
<link rel="stylesheet" type="text/css" href="wireit/css/WireItEditor.css" />
<style>
div.WireIt-Container {
width: 270px; /* Prevent the modules from scratching on the right */
}
div.WireIt-InputExTerminal {
float: left;
width: 21px;
height: 21px;
position: relative;
}
div.WireIt-InputExTerminal div.WireIt-Terminal {
top: -3px;
left: -7px;
}
div.inputEx-Group div.inputEx-label {
width:100px;
}
div.WireIt-ImageContainer {
width: auto;
}
.WiringEditor-module span {
position: relative;
top: -3px;
}
div.WiringEditor-module-escape-markup {
width: 340px;
}
</style>
<!-- YUI -->
<script type="text/javascript" src="wireit/lib/yui/utilities/utilities.js"></script>
<script type="text/javascript" src="wireit/lib/yui/resize/resize-min.js"></script>
<script type="text/javascript" src="wireit/lib/yui/layout/layout-min.js"></script>
<script type="text/javascript" src="wireit/lib/yui/container/container-min.js"></script>
<script type="text/javascript" src="wireit/lib/yui/json/json-min.js"></script>
<script type="text/javascript" src="wireit/lib/yui/button/button-min.js"></script>
<!-- YUI-RPC -->
<script type="text/javascript" src="wireit/lib/yui-rpc.js"></script>
<!-- InputEx with wirable options (WirableField-beta) -->
<script src="wireit/lib/inputex/js/inputex.js" type='text/javascript'></script>
<script src=".wireit/lib/inputex/js/Field.js" type='text/javascript'></script>
<script type="text/javascript" src="wireit/js/util/inputex/WirableField-beta.js"></script>
<script src="wireit/lib/inputex/js/Group.js" type='text/javascript'></script>
<script src="wireit/lib/inputex/js/Visus.js" type='text/javascript'></script>
<script src="wireit/lib/inputex/js/fields/StringField.js" type='text/javascript'></script>
<script src="wireit/lib/inputex/js/fields/IntegerField.js" type='text/javascript'></script>
<script src="wireit/lib/inputex/js/fields/Textarea.js" type='text/javascript'></script>
<script src="wireit/lib/inputex/js/fields/SelectField.js" type='text/javascript'></script>
<script src="wireit/lib/inputex/js/fields/EmailField.js" type='text/javascript'></script>
<script src="wireit/lib/inputex/js/fields/UrlField.js" type='text/javascript'></script>
<script src="wireit/lib/inputex/js/fields/ListField.js" type='text/javascript'></script>
<script src="wireit/lib/inputex/js/fields/CheckBox.js" type='text/javascript'></script>
<script src="wireit/lib/inputex/js/fields/InPlaceEdit.js" type='text/javascript'></script>
<!-- WireIt -->
<!--[if IE]><script type="text/javascript" src="wireit/lib/excanvas.js"></script><![endif]-->
<script type="text/javascript" src="wireit/js/WireIt.js"></script>
<script type="text/javascript" src="wireit/js/CanvasElement.js"></script>
<script type="text/javascript" src="wireit/js/Wire.js"></script>
<script type="text/javascript" src="wireit/js/Terminal.js"></script>
<script type="text/javascript" src="wireit/js/util/DD.js"></script>
<script type="text/javascript" src="wireit/js/util/DDResize.js"></script>
<script type="text/javascript" src="wireit/js/Container.js"></script>
<script type="text/javascript" src="wireit/js/Layer.js"></script>
<script type="text/javascript" src="wireit/js/util/inputex/FormContainer-beta.js"></script>
<script type="text/javascript" src="wireit/js/LayerMap.js"></script>
<script type="text/javascript" src="wireit/js/WiringEditor.js"></script>
<script type="text/javascript" src="wireit/js/ImageContainer.js"></script>
<script type="text/javascript" src="xproc-language.js"></script>
<!-- Adding the ObjTree XML Library (included in inputex) -->
<script src="wireit/lib/inputex/lib/XML/ObjTree.js" type='text/javascript'></script>
<script>
// InputEx needs a correct path to this image
inputEx.spacerUrl = "/inputex/trunk/images/space.gif";
/**
* @class XProcEditor
* @extends WireIt.WiringEditor
* The wiring editor is overriden to add an "Export XML" action to the control bar
*/
XProcEditor = function() {
XProcEditor.superclass.constructor.call(this, xprocLanguage);
};
YAHOO.lang.extend(XProcEditor, WireIt.WiringEditor, {
// Add the "export XML" button
renderButtons: function() {
XProcEditor.superclass.renderButtons.call(this);
var exportButton = new YAHOO.widget.Button({
label:"Export XML",
id:"WiringEditor-exportButton", // Use this to add an icon with CSS
container: YAHOO.util.Dom.get('toolbar')
});
exportButton.on("click", this.exportXML, this, true);
},
// Click handler on the export button
exportXML: function() {
// Convert the editor value to XML
var xotree = new XML.ObjTree();
var xml = xotree.hash_to_xml("value",this.getValue());
// Build the panel
if(!this.exportPanel) {
this.exportPanel = new YAHOO.widget.Panel('xmlPanel', {fixedcenter: true,draggable: true,visible: false,modal: true});
this.exportPanel.setHeader("XML Export");
this.exportPanel.setBody("<textarea id='exportPanelBody' rows=30 cols=70></textarea>");
this.exportPanel.render(document.body);
}
// Write the XML in the panel's textarea
YAHOO.util.Dom.get('exportPanelBody').value = xml;
this.exportPanel.show();
}
});
YAHOO.util.Event.onDOMReady( function() {
var editor = new XProcEditor();
});
</script>
</head>
<body class="yui-skin-sam">
<div id="top">
<div class="logo">XProc</a></div>
<div id="toolbar"></div>
<div class="topright">
<span>Hello there !</span> |
<a href="../..">back to WireIt</a>
</div>
</div>
<div id="left">
</div>
<div id="right">
<h2>Properties</h2>
<div id="propertiesForm"></div>
<h2>Minimap</h2>
<div id="layerMap"></div>
</div>
<div id="center">
</div>
<div id="helpPanel">
<div class="hd">Welcome to the XProc Editor</div>
<div class="bd" style="text-align: left;">
<p>This example shows how to use the <i>ImageContainer</i> and <i>FormContainer</i> in a language definition.</p>
<br />
<p><b>Drag and drop modules from the Module list</b> on the left to the working layer in the middle.</p>
<br />
<p><a href="demo.js" target="_new">Click here to view the language definition for this editor.</a></p>
</div>
</div>
</body>
</html>