forked from oerpub/Aloha-Editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
image.html
350 lines (318 loc) · 23.5 KB
/
image.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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Aloha Block Plugin Testcase</title>
<script language="javascript">
Aloha = window.Aloha || {};
Aloha.settings = {
logLevels: {'error': true, 'warn': true, 'info': false, 'debug': false},
errorhandling : true,
plugins: {
block: {
defaults : {
'.default-block': {
},
'.columnBlock': {
'aloha-block-type': 'ColumnBlock'
},
'.uneditableColumnBlock': {
'aloha-block-type': 'UneditableColumnBlock'
},
'.product-teaser': {
'aloha-block-type': 'ProductTeaserBlock'
},
'.company': {
'aloha-block-type': 'CompanyBlock'
},
'.imageBlock': {
'aloha-block-type': 'ImageBlock'
},
'.editableImageBlock': {
'aloha-block-type': 'EditableImageBlock'
},
'.news-block': {
'aloha-block-type': 'NewsBlock'
},
'.sortable-news-block': {
'aloha-block-type': 'SortableNewsBlock'
},
'.editable-product-teaser': {
'aloha-block-type': 'EditableProductTeaserBlock'
}
}
}
},
bundles: {
// Path for custom bundle relative from require.js path
user: '../demo/block'
}
};
</script>
<script src="src/lib/require.js"></script>
<script src="src/lib/aloha.js" data-aloha-plugins="common/ui,common/format,common/paste,common/block,user/blockdemo,common/table,common/highlighteditables,common/image"></script>
<link rel="stylesheet" href="src/css/aloha.css" type="text/css">
<style>
</style>
</head>
<body>
<div class="document">
<h1 id="title">Aloha, Blocks!</h1>
<p>This example demoes the following use cases:<br />
<table border="1">
<thead>
<tr>
<th>Editable/Non-Editable</th>
<th>Inline/Block-Level</th>
<th>inside editable/outside editable</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>non-editable</td>
<td>block-level</td>
<td>outside editable</td>
<td><a href="#non-block-outside">Tested</a></td>
</tr>
<tr>
<td>non-editable</td>
<td>block-level</td>
<td>inside editable</td>
<td><a href="#non-block-inside">Tested</a></td>
</tr>
<tr>
<td>non-editable</td>
<td>inline</td>
<td>outside editable</td>
<td><a href="#non-inline-outside">Tested</a></td>
</tr>
<tr>
<td>non-editable</td>
<td>inline</td>
<td>inside editable</td>
<td><a href="#non-inline-inside">Tested</a></td>
</tr>
<tr>
<td>editable</td>
<td>block-level</td>
<td>outside editable</td>
<td><a href="#edit-block-outside">Tested</a></td>
</tr>
<tr>
<td>editable</td>
<td>block-level</td>
<td>inside editable</td>
<td><a href="#edit-block-inside">Tested</a></td>
</tr>
<tr>
<td>editable</td>
<td>inline</td>
<td>outside editable</td>
<td>-- not relevant --</td>
</tr>
<tr>
<td>editable</td>
<td>inline</td>
<td>inside editable</td>
<td>-- not relevant --</td>
</tr>
</tbody>
</table>
<ul>
<li>A block which has sortable contents - <a href="#sortable-news-block">Tested</a></li>
<li>Nested blocks with editable in between - <a href="#nested-blocks-editable">Tested</a></li>
<li><b>Block Collections</b>: Nested blocks WITHOUT editable in between - <a href="#nested-blocks-noeditable">Tested</a></li>
<li><b>Block Collections</b>: Nested blocks WITHOUT editable in between (inside outer editable) - <a href="#nested-blocks-noeditable2">Tested</a></li>
</ul>
</p>
<div id="bodyContent">
<h2><a name="non-block-outside"></a>(1)Non-editable (2)"Block"-Element Blocks (3)outside editable</h2>
<div class="no-aloha-area">
<h3>DefaultRenderer</h3>
<div class="default-block">
<p>This is a default aloha block without special type, which uses the <strong>DefaultRenderer</strong>. It
is not editable and embedded as a "block" element.</p>
</div>
<h3>News Listing example</h3>
<div class="news-block" data-numberofarticles="2">
<div class="newselement">
<h4>News Title 1</h4>
<p>Drosera brevifolia (the dwarf, small or red sundew), is a carnivorous plant of the family Droseraceae and is the smallest sundew species native to the United States. This species differs considerably from the pink sundew, Drosera capillaris, by its wedge-shaped leaves, and distinctly deeper red to reddish purple color, noticeable when side by side with D. capillaris.</p>
</div>
<div class="newselement">
<h4>News Title 2</h4>
<p>Bednarz studied Slavic studies, theatre and Eastern Europe history at universities in Hamburg, Wien and Moskow. His dissertation at university was over russian author Anton Chekhov. Since 1967 Bednarz worked for German television as Correspondent in Poland (1971–1977) and in Soviet Union (1977-1982). Later he was television presenter of german tv-programme Monitor on German broadcaster Westdeutscher Rundfunk. During these years Bednarz wrote several books over Eastern Europe countries and over the south of South America.</p>
</div>
</div>
</div>
<h2><a name="non-block-inside"></a>(1)Non-editable (2)"Block"-Element Blocks (3)inside editable</h2>
<div id="content" class="article">
<p>Blocks can be embedded right inside an editable. "Block" element blocks are not very differen from inline element blocks. A simple example is the DefaultRenderer block type, which renders and stores the initial markup. Try copy and pasting or dragging it around!
</p>
<h3>DefaultRenderer</h3>
<div class="default-block">
<p>This is a default aloha block without special type, which uses the <strong>DefaultRenderer</strong>. It
is not editable and embedded as a "block" element.</p>
</div>
<h3>News Listing example</h3>
<div class="news-block" data-numberofarticles="2">
<div class="newselement">
<h4>News Title 1</h4>
<p>Drosera brevifolia (the dwarf, small or red sundew), is a carnivorous plant of the family Droseraceae and is the smallest sundew species native to the United States. This species differs considerably from the pink sundew, Drosera capillaris, by its wedge-shaped leaves, and distinctly deeper red to reddish purple color, noticeable when side by side with D. capillaris.</p>
</div>
<div class="newselement">
<h4>News Title 2</h4>
<p>Bednarz studied Slavic studies, theatre and Eastern Europe history at universities in Hamburg, Wien and Moskow. His dissertation at university was over russian author Anton Chekhov. Since 1967 Bednarz worked for German television as Correspondent in Poland (1971–1977) and in Soviet Union (1977-1982). Later he was television presenter of german tv-programme Monitor on German broadcaster Westdeutscher Rundfunk. During these years Bednarz wrote several books over Eastern Europe countries and over the south of South America.</p>
</div>
</div>
<h3><a name="sortable-news-block"></a>Sortable News Listing example</h3>
<div class="sortable-news-block" data-numberofarticles="2">
<div class="newselement">
<h4>News Title 1</h4>
<p>Drosera brevifolia (the dwarf, small or red sundew), is a carnivorous plant of the family Droseraceae and is the smallest sundew species native to the United States. This species differs considerably from the pink sundew, Drosera capillaris, by its wedge-shaped leaves, and distinctly deeper red to reddish purple color, noticeable when side by side with D. capillaris.</p>
</div>
<div class="newselement">
<h4>News Title 2</h4>
<p>Bednarz studied Slavic studies, theatre and Eastern Europe history at universities in Hamburg, Wien and Moskow. His dissertation at university was over russian author Anton Chekhov. Since 1967 Bednarz worked for German television as Correspondent in Poland (1971–1977) and in Soviet Union (1977-1982). Later he was television presenter of german tv-programme Monitor on German broadcaster Westdeutscher Rundfunk. During these years Bednarz wrote several books over Eastern Europe countries and over the south of South America.</p>
</div>
</div>
<h3>Table</h3>
<table><thead><tr><th>Test1</th><th>Test2</th></tr></thead>
<tbody><tr><td>Foo</td><td>Bar</td></tr></tbody></table>
</div>
<h2><a name="non-inline-outside"></a>(1)Non-editable (2)Inline Blocks (3)outside editable</h2>
<div class="no-aloha-area">
<h3>Inline Element</h3>
<p><b>This is the Product Teaser Example:</b> Try our new <span class="product-teaser" data-sku="2423423" data-title="Big can of fresh Aloha soup" data-price="27">Big can of fresh Aloha soup <span class="price">(27 €)</span></span>, it tastes delicious!</p>
<p>Some other content here...</p>
<p><b>Stock Quote example:</b> When you hover over the name of the <span class="company" data-symbol="MSFT">Microsoft</span> company, the stock quotes are shown.</p>
<p>Some more content...</p>
<h3>Floating Element</h3>
<p>
Super Dodge Ball Advance,<span class="default-block">Some Text</span> released in Japan as Bakunetsu Dodgeball Fighters (爆熱ドッジボールファイターズ?, "Bakunetsu" meaning "Burning Heat"), dodge ball game based on the Super Dodge Ball. While based on the original Super Dodge Ball series, the game does not feature the Kunio-kun characters from the original game due to copyrights issues, as developer Million did not obtain the rights to the Kunio-kun characters until the following year.[citation needed] However, the game uses a remixed version of opening and ending songs from Technos Japan Corp's Super Dodge Ball games.
from WikipediaSuper Dodge Ball Advance, released in Japan as Bakunetsu Dodgeball Fighters (爆熱ドッジボールファイターズ?, "Bakunetsu" meaning "Burning Heat"), dodge ball game based on the Super Dodge Ball. While based on the original Super Dodge Ball series, the game does not feature the Kunio-kun characters from the original game due to copyrights issues, as developer Million did not obtain the rights to the Kunio-kun characters until the following year.[citation needed] However, the game uses a remixed version of opening and ending songs from Technos Japan Corp's Super Dodge Ball games.
from Wikipedia
</p>
<p>
Super Dodge Ball Advance, released in Japan as Bakunetsu Dodgeball Fighters (爆熱ドッジボールファイターズ?, "Bakunetsu" meaning "Burning Heat"), dodge ball game based on the Super Dodge Ball. While based on the original Super Dodge Ball series, the game does not feature the Kunio-kun characters from the original game due to copyrights issues, as developer Million did not obtain the rights to the Kunio-kun characters until the following year.[citation needed] However, the game uses a remixed version of opening and ending songs from Technos Japan Corp's Super Dodge Ball games.
from Wikipedia
</p>
</div>
<h2><a name="non-inline-inside"></a>(1)Non-editable (2)Inline Blocks (3)inside editable</h2>
<div id="teaser" class="shorttext">
<h3>Inline Element</h3>
<p><b>This is the Product Teaser Example:</b> Try our new <span class="product-teaser" data-sku="2423423" data-title="Big can of fresh Aloha soup" data-price="27">Big can of fresh Aloha soup <span class="price">(27 €)</span></span>, it tastes delicious!</p>
<p>Some other content here...</p>
<p><b>Stock Quote example:</b> When you hover over the name of the <span class="company" data-symbol="MSFT">Microsoft</span> company, the stock quotes are shown.</p>
<p>Some more content...</p>
<h3>Floating Element</h3>
<p>
Super Dodge Ball Advance,<span class="default-block">Some Text</span> released in Japan as Bakunetsu Dodgeball Fighters (爆熱ドッジボールファイターズ?, "Bakunetsu" meaning "Burning Heat"), dodge ball game based on the Super Dodge Ball. While based on the original Super Dodge Ball series, the game does not feature the Kunio-kun characters from the original game due to copyrights issues, as developer Million did not obtain the rights to the Kunio-kun characters until the following year.[citation needed] However, the game uses a remixed version of opening and ending songs from Technos Japan Corp's Super Dodge Ball games.
from WikipediaSuper Dodge Ball Advance, released in Japan as Bakunetsu Dodgeball Fighters (爆熱ドッジボールファイターズ?, "Bakunetsu" meaning "Burning Heat"), dodge ball game based on the Super Dodge Ball. While based on the original Super Dodge Ball series, the game does not feature the Kunio-kun characters from the original game due to copyrights issues, as developer Million did not obtain the rights to the Kunio-kun characters until the following year.[citation needed] However, the game uses a remixed version of opening and ending songs from Technos Japan Corp's Super Dodge Ball games.
from Wikipedia
</p>
<p>
Super Dodge Ball Advance, released in Japan as Bakunetsu Dodgeball Fighters (爆熱ドッジボールファイターズ?, "Bakunetsu" meaning "Burning Heat"), dodge ball game based on the Super Dodge Ball. While based on the original Super Dodge Ball series, the game does not feature the Kunio-kun characters from the original game due to copyrights issues, as developer Million did not obtain the rights to the Kunio-kun characters until the following year.[citation needed] However, the game uses a remixed version of opening and ending songs from Technos Japan Corp's Super Dodge Ball games.
from Wikipedia
</p>
</div>
<h2><a name="edit-block-outside"></a>(1)editable (2)"Block"-Element Blocks (3)outside editable</h2>
<div class="no-aloha-area">
<div class="editableImageBlock">
<div class="aloha-editable">This Image Caption is editable through Aloha.</div>
</div>
<p>Williams, and other pilots who worked for British Airways claimed that their holiday pay was too low, because it only reflected his fixed salary, and not his bonuses. Williams' comprised a fixed annual salary, a "flying pay supplement" that went up the more he flew, and a "time away from base" which went up the more he was away from home. The flying and time away allowances were capped. Properly construed, his contract suggested that his holiday pay would be at the rate of only his fixed salary. Williams, however, contended that this was contrary to the Civil Aviation Working Time Directive,[1] as implemented by the Civil Aviation (Working Time) Regulations 2004,[2] (sector-specific implementations with the same objective as the Working Time Directive and the Working Time Regulations 1998 in this respect). In absence of particular provisions, the pay while on leave should be "normal remuneration". British Airways contended that because the Employment Rights Act 1996 sections 221 to 224 did not have provisions on how to determine a week's pay, the rate should be determined with reference to the contract.
The Employment Appeal Tribunal allowed Williams' claim, but this was reversed in the Court of Appeal.[3] The Supreme Court made a reference to the European Court of Justice.</p>
</div>
<h2><a name="edit-block-inside"></a>(1)editable (2)"Block"-Element Blocks (3)inside editable</h2>
<div class="textcontent"><p>Williams, and other pilots who worked for British Airways claimed that their holiday pay was too low, because it only reflected his fixed salary, and not his bonuses. Williams' comprised a fixed annual salary, a "flying pay supplement" that went up the more he flew, and a "time away from base" which went up the more he was away from home. The flying and time away allowances were capped. Properly construed, his contract suggested that his holiday pay would be at the rate of only his fixed salary. Williams, however, contended that this was contrary to the Civil Aviation Working Time Directive,[1] as implemented by the Civil Aviation (Working Time) Regulations 2004,[2] (sector-specific implementations with the same objective as the Working Time Directive and the Working Time Regulations 1998 in this respect). In absence of particular provisions, the pay while on leave should be "normal remuneration". British Airways contended that because the Employment Rights Act 1996 sections 221 to 224 did not have provisions on how to determine a week's pay, the rate should be determined with reference to the contract.
The Employment Appeal Tribunal allowed Williams' claim, but this was reversed in the Court of Appeal.[3] The Supreme Court made a reference to the European Court of Justice.</p>
<div class="editableImageBlock">
<div class="aloha-editable">This Image Caption is editable through Aloha.</div>
</div>
<p>Williams, and other pilots who worked for British Airways claimed that their holiday pay was too low, because it only reflected his fixed salary, and not his bonuses. Williams' comprised a fixed annual salary, a "flying pay supplement" that went up the more he flew, and a "time away from base" which went up the more he was away from home. The flying and time away allowances were capped. Properly construed, his contract suggested that his holiday pay would be at the rate of only his fixed salary. Williams, however, contended that this was contrary to the Civil Aviation Working Time Directive,[1] as implemented by the Civil Aviation (Working Time) Regulations 2004,[2] (sector-specific implementations with the same objective as the Working Time Directive and the Working Time Regulations 1998 in this respect). In absence of particular provisions, the pay while on leave should be "normal remuneration". British Airways contended that because the Employment Rights Act 1996 sections 221 to 224 did not have provisions on how to determine a week's pay, the rate should be determined with reference to the contract.
The Employment Appeal Tribunal allowed Williams' claim, but this was reversed in the Court of Appeal.[3] The Supreme Court made a reference to the European Court of Justice.</p>
<p>Williams, and other pilots who worked for British Airways claimed that their holiday pay was too low, because it only reflected his fixed salary, and not his bonuses. Williams' comprised a fixed annual salary, a "flying pay supplement" that went up the more he flew, and a "time away from base" which went up the more he was away from home. The flying and time away allowances were capped. Properly construed, his contract suggested that his holiday pay would be at the rate of only his fixed salary. Williams, however, contended that this was contrary to the Civil Aviation Working Time Directive,[1] as implemented by the Civil Aviation (Working Time) Regulations 2004,[2] (sector-specific implementations with the same objective as the Working Time Directive and the Working Time Regulations 1998 in this respect). In absence of particular provisions, the pay while on leave should be "normal remuneration". British Airways contended that because the Employment Rights Act 1996 sections 221 to 224 did not have provisions on how to determine a week's pay, the rate should be determined with reference to the contract.
The Employment Appeal Tribunal allowed Williams' claim, but this was reversed in the Court of Appeal.[3] The Supreme Court made a reference to the European Court of Justice.</p>
</div>
<hr /><hr /><hr />
<h2><a name="nested-blocks-editable"></a>Block which contains a variable number of editable columns</h2>
<h3>The following CMS systems use Aloha:</h3>
<div class="columnBlock" data-columns="3">
<div class="column aloha-editable">
<h2>TYPO3 Phoenix</h2>
<p>TYPO3 Phoenix is the next-generation Open Source CMS system built on FLOW3. FLOW3 is a <b>PHP-based</b> Enterprise Web Framework suitable for large applications.</p>
<p>This is some test with a nested block: <span class="company" data-symbol="MSFT">Microsoft</span> -- curious if it works!</p>
</div>
<div class="column aloha-editable">
<p> </p>
</div>
<div class="column aloha-editable">
<h2>Gentics Content.Node</h2>
<p>Gentics Content.Node is a leading CMS for big organizations and governments. The team behind Content.Node puts a lot of work into Aloha.</p>
<p>Here follows a non-editable block</p>
<div class="default-block">
<p>This is a default aloha block without special type, which uses the <strong>DefaultRenderer</strong>. It
is not editable and embedded as a "block" element.</p>
</div>
<p>Some more text with the <span class="company" data-symbol="AAPL">Apple</span> stocks</p>
</div>
<div class="clear"></div>
</div>
<hr />
<h2><a name="nested-blocks-noeditable"></a>Block which contains nested blocks (without editables in between)</h2>
<div class="uneditableColumnBlock" data-columns="2">
<div class="column aloha-block-collection">
<h2>TYPO3 Phoenix</h2>
<p>TYPO3 Phoenix is the next-generation Open Source CMS system built on FLOW3. FLOW3 is a <b>PHP-based</b> Enterprise Web Framework suitable for large applications.</p>
<p>This is some test with a nested block: <span class="company" data-symbol="MSFT">Microsoft</span> -- curious if it works!</p>
</div>
<div class="column aloha-block-collection">
<h2>Gentics Content.Node</h2>
<p>Gentics Content.Node is a leading CMS for big organizations and governments. The team behind Content.Node puts a lot of work into Aloha.</p>
<p>Here follows a non-editable block</p>
<div class="default-block">
<p>This is a default aloha block without special type, which uses the <strong>DefaultRenderer</strong>. It
is not editable and embedded as a "block" element.</p>
</div>
<p>Some more text with the <span class="company" data-symbol="AAPL">Apple</span> stocks</p>
</div>
<div class="clear"></div>
</div>
<hr />
<h2><a name="nested-blocks-noeditable2"></a>Block which contains nested blocks (without editables in between); all inside an outer editable</h2>
<div class="textcontent">
<h4>Some editable content before</h2>
<div class="uneditableColumnBlock" data-columns="2">
<div class="column aloha-block-collection">
<h2>TYPO3 Phoenix</h2>
<p>TYPO3 Phoenix is the next-generation Open Source CMS system built on FLOW3. FLOW3 is a <b>PHP-based</b> Enterprise Web Framework suitable for large applications.</p>
<p>This is some test with a nested block: <span class="company" data-symbol="MSFT">Microsoft</span> -- curious if it works!</p>
</div>
<div class="column aloha-block-collection">
<h2>Gentics Content.Node</h2>
<p>Gentics Content.Node is a leading CMS for big organizations and governments. The team behind Content.Node puts a lot of work into Aloha.</p>
<p>Here follows a non-editable block</p>
<div class="default-block">
<p>This is a default aloha block without special type, which uses the <strong>DefaultRenderer</strong>. It
is not editable and embedded as a "block" element.</p>
</div>
<p>Some more text with the <span class="company" data-symbol="AAPL">Apple</span> stocks</p>
</div>
<div class="clear"></div>
</div>
<p>Some editable content after</p>
</div>
<hr />
<h2>Inline-Editable elements (not officially supported)</h2>
<p>Here follows the <b>editable product teaser example</b>: Try our new <span class="editable-product-teaser" data-sku="2423423" data-title="Big can of fresh Aloha soup" data-price="27"><span class="aloha-editable">Big can of fresh Aloha soup</span> (27 €)</span> - which enables some great stuff.
</div>
</div>
<script type="text/javascript">
Aloha.ready( function() {
Aloha.jQuery('.document').aloha();
});
</script>
</body>
</html>