Wiki-Quellcode von FORMCYCLE Hilfe
Zeige letzte Bearbeiter
author | version | line-number | content |
---|---|---|---|
1 | {{panel type="info"}} | ||
2 | Die Hilfe zur vorherigen {{formcycle/}} Version 6 befindet sich unter: https://help6.formcycle.eu | ||
3 | {{/panel}} | ||
4 | |||
5 | {{velocity}} | ||
6 | #set ($mainCards = [{ | ||
7 | 'iconfc': 'square-edit-outline', | ||
8 | 'title': 'Formulardesigner', | ||
9 | 'description': 'Formulare erstellen und bearbeiten', | ||
10 | 'documentation': "Formcycle.Designer", | ||
11 | 'bgcolor': '#617496', | ||
12 | 'color': '#fff', | ||
13 | 'colordesc': '#e1e2e4' | ||
14 | }, { | ||
15 | 'iconfc': 'workflow-fill', | ||
16 | 'title': 'Workflowdesigner', | ||
17 | 'description': 'Formulardaten verarbeiten', | ||
18 | 'documentation': 'Formcycle.Designer.Workflow', | ||
19 | 'bgcolor': '#617496', | ||
20 | 'color': '#fff', | ||
21 | 'colordesc': '#e1e2e4' | ||
22 | }, { | ||
23 | 'iconfc': 'wrench', | ||
24 | 'title': 'Verwaltung', | ||
25 | 'description': 'Benutzerverwaltung, LDAP, Datenbanken, Dateien, Templates und vieles mehr', | ||
26 | 'documentation': 'Formcycle.UserInterface', | ||
27 | 'bgcolor': '#b6c2d2', | ||
28 | 'color': '#2b3649', | ||
29 | 'colordesc': '#617496' | ||
30 | }, { | ||
31 | 'iconfc': 'inbox', | ||
32 | 'title': 'Posteingang', | ||
33 | 'description': 'Formulardaten organisieren', | ||
34 | 'documentation': 'Formcycle.Inbox', | ||
35 | 'bgcolor': '#ffab70', | ||
36 | 'color': '#fff', | ||
37 | 'colordesc': '#fff' | ||
38 | }, { | ||
39 | 'icon': 'fa fa-download', | ||
40 | 'title': 'Installation', | ||
41 | 'description': 'FORMCYCLE installieren oder aktualisieren', | ||
42 | 'documentation': 'Formcycle.Installation', | ||
43 | 'bgcolor': '#b6c2d2', | ||
44 | 'color': '#2b3649', | ||
45 | 'colordesc': '#617496' | ||
46 | }, { | ||
47 | 'iconfc': 'form', | ||
48 | 'title': 'Beispiele', | ||
49 | 'description': 'Beispiele für Formulareinbindungen und Formulare', | ||
50 | 'documentation': 'doc:Examples.WebHome', | ||
51 | 'bgcolor': '#cae7df', | ||
52 | 'color': '#2b3649', | ||
53 | 'colordesc': '#617496' | ||
54 | }]) | ||
55 | |||
56 | ## 'icon': 'fa fa-play-circle', | ||
57 | ## 'title': 'Einführungsvideos', | ||
58 | ## 'description': 'Kurze Videos zum Vorstellen einzelner FORMCYCLE-Funktionen; ggf. Titel "Schnelleinstieg"', | ||
59 | ## 'documentation': 'https://formcycle.eu/de/features' | ||
60 | ##}, { | ||
61 | ## 'iconfc': 'puzzle', | ||
62 | ## 'title': 'Anwendungsfälle', | ||
63 | ## 'description': 'Formulardaten verarbeiten', | ||
64 | ## 'documentation': 'doc:Anwendungsfälle.WebHome' | ||
65 | ##}, { | ||
66 | |||
67 | #set ($smallCards = [{ | ||
68 | 'iconfc': 'information-outline', | ||
69 | 'title': 'Workshops', | ||
70 | 'description': 'Workshops zu verschiedenen Themen rund um FORMCYCLE', | ||
71 | 'documentation': 'doc:Workshops.WebHome', | ||
72 | 'bgcolor': '#b6c2d2', | ||
73 | 'color': '#2b3649' | ||
74 | }, { | ||
75 | 'icon': 'fa fa-cloud', | ||
76 | 'title': 'FORM.CLOUD', | ||
77 | 'description': 'Informationen zur XIMA FORM.CLOUD', | ||
78 | 'documentation': 'doc:FORMCLOUD.WebHome', | ||
79 | 'bgcolor': '#b6c2d2', | ||
80 | 'color': '#2b3649' | ||
81 | }, { | ||
82 | 'iconfc': 'action-change-status', | ||
83 | 'title': 'Einbindung externer Systeme', | ||
84 | 'description': 'Einbindung von FORMCYCLE in CMS/DMS-Systeme', | ||
85 | 'documentation': 'Formcycle.CMSExtension', | ||
86 | 'bgcolor': '#b6c2d2', | ||
87 | 'color': '#2b3649' | ||
88 | }, { | ||
89 | 'iconfc': 'puzzle', | ||
90 | 'title': 'Plugin-Dokumentation', | ||
91 | 'description': 'Dokumentation der für FORMCYCLE verfügbaren Plugins', | ||
92 | 'documentation': 'Formcycle.PluginDocumentation', | ||
93 | 'bgcolor': '#b6c2d2', | ||
94 | 'color': '#2b3649' | ||
95 | }, { | ||
96 | 'icon': 'fa fa-list', | ||
97 | 'title': 'Release Notes', | ||
98 | 'description': 'Release Notes und Download der aktuellen Version', | ||
99 | 'documentation': 'doc:Blog.WebHome', | ||
100 | 'bgcolor': '#b6c2d2', | ||
101 | 'color': '#2b3649' | ||
102 | }, { | ||
103 | 'iconfc': 'comment-faq-outline', | ||
104 | 'title': 'Häufig gestellte Fragen', | ||
105 | 'description': 'Häufig gestellte Fragen', | ||
106 | 'documentation': "https://faq.formcycle.eu/", | ||
107 | 'bgcolor': '#b6c2d2', | ||
108 | 'color': '#2b3649' | ||
109 | }]) | ||
110 | |||
111 | ## 'icon': 'fa fa-share-square', | ||
112 | ## 'title': 'Daten extern weiterverarbeiten', | ||
113 | ## 'description': 'Mit FORMCYCLE erfasste Daten an andere Systeme weiterleiten', | ||
114 | ## 'documentation': 'Formcycle.UserInterface.MyForms.WorkflowProcessing' | ||
115 | ##}, { | ||
116 | |||
117 | |||
118 | |||
119 | {{html}} | ||
120 | ##$jsontool.serialize(${mainCards})<br> | ||
121 | ##$jsontool.serialize($mainCards)<br> | ||
122 | {{/html}} | ||
123 | |||
124 | {{MainMenuTiles cards='$jsontool.serialize($mainCards)' /}} | ||
125 | |||
126 | {{MainMenuTiles cards='$jsontool.serialize($smallCards)' type="small" /}} | ||
127 | |||
128 | {{/velocity}} | ||
129 | |||
130 | {{velocity}} | ||
131 | {{html wiki="false" clean="false"}} | ||
132 | |||
133 | |||
134 | |||
135 | <style> | ||
136 | .jqcloud{font:10px Helvetica,Arial,sans-serif;line-height:normal;overflow:hidden;position:relative}.jqcloud-word{margin:0;padding:0}.jqcloud-word.w1{color:#aab5f0;font-size:100%}.jqcloud-word.w2{color:#9ce;font-size:150%}.jqcloud-word.w3{color:#a0ddff;font-size:200%}.jqcloud-word.w4{color:#90c5f0;font-size:250%}.jqcloud-word.w5{color:#90a0dd;font-size:300%}.jqcloud-word.w6{color:#90c5f0;font-size:350%}.jqcloud-word.w7{color:#39d;font-size:400%}.jqcloud-word.w8{color:#0cf;font-size:450%}.jqcloud-word.w9{color:#0cf;font-size:500%}.jqcloud-word.w10{color:#0cf;font-size:550%}.jqcloud-word a{color:inherit;font-size:inherit;text-decoration:none}.jqcloud-word a:hover{color:#0cf} | ||
137 | .jqcloud span { | ||
138 | -moz-user-select: -moz-none; | ||
139 | -khtml-user-select: none; | ||
140 | -webkit-user-select: none; | ||
141 | -ms-user-select: none; | ||
142 | user-select: none; | ||
143 | background-color: #eaeaef; | ||
144 | border-radius: 10px; | ||
145 | padding: 0px 4px 0px 4px; | ||
146 | } | ||
147 | .jqcloud span.jqHighlight { | ||
148 | color: #0cf !important; | ||
149 | } | ||
150 | .jQButton { | ||
151 | color: #fff; | ||
152 | background-color: #3480AD;/*#f0f0f3*/ | ||
153 | text-align: center; | ||
154 | display: inline-block; | ||
155 | border-radius: 4px; | ||
156 | padding: 4px 10px 4px 22px; | ||
157 | font-size: 15px | ||
158 | margin: auto; | ||
159 | margin-bottom: 5px; | ||
160 | -moz-user-select: -moz-none; | ||
161 | -khtml-user-select: none; | ||
162 | -webkit-user-select: none; | ||
163 | -ms-user-select: none; | ||
164 | user-select: none; | ||
165 | } | ||
166 | .jQButton[active=false] { | ||
167 | background-color: #a7a7a7; | ||
168 | } | ||
169 | .jQButton:hover { | ||
170 | background-color: #0cf; | ||
171 | } | ||
172 | .jQButton[active=false]:hover { | ||
173 | background-color: #676767; | ||
174 | } | ||
175 | .jQButton .jQButton-icon::before { | ||
176 | font-family: "FontAwesome"; | ||
177 | font-size: 14px; | ||
178 | font-weight: 400; | ||
179 | content: "\f046"; | ||
180 | } | ||
181 | .jQButton[active=false] .jQButton-icon::before { | ||
182 | content: "\f096"; | ||
183 | } | ||
184 | .jQButton-icon { | ||
185 | position: absolute; | ||
186 | margin-left: -11px; | ||
187 | } | ||
188 | </style> | ||
189 | |||
190 | <script> | ||
191 | require(['jquery'],function(XjQ) { | ||
192 | 'use strict'; | ||
193 | |||
194 | /* | ||
195 | * Plugin class | ||
196 | */ | ||
197 | var jQCloud = function(element, word_array, options) { | ||
198 | this.Xelement = XjQ(element); | ||
199 | |||
200 | this.word_array = word_array || []; | ||
201 | this.options = options; | ||
202 | |||
203 | this.sizeGenerator = null; | ||
204 | this.colorGenerator = null; | ||
205 | |||
206 | // Data used internally | ||
207 | this.data = { | ||
208 | placed_words: [], | ||
209 | timeouts: {}, | ||
210 | namespace: null, | ||
211 | step: null, | ||
212 | angle: null, | ||
213 | aspect_ratio: null, | ||
214 | max_weight: null, | ||
215 | min_weight: null, | ||
216 | sizes: [], | ||
217 | colors: [] | ||
218 | }; | ||
219 | |||
220 | this.initialize(); | ||
221 | }; | ||
222 | |||
223 | jQCloud.DEFAULTS = { | ||
224 | width: 100, | ||
225 | height: 100, | ||
226 | center: { x: 0.5, y: 0.5 }, | ||
227 | steps: 10, | ||
228 | delay: null, | ||
229 | shape: 'elliptic', | ||
230 | classPattern: 'w{n}', | ||
231 | encodeURI: true, | ||
232 | removeOverflowing: true, | ||
233 | afterCloudRender: null, | ||
234 | autoResize: false, | ||
235 | colors: null, | ||
236 | fontSize: null, | ||
237 | template: null | ||
238 | }; | ||
239 | |||
240 | jQCloud.prototype = { | ||
241 | initialize: function() { | ||
242 | // Set/Get dimensions | ||
243 | if (this.options.width) { | ||
244 | this.Xelement.width(this.options.width); | ||
245 | } | ||
246 | else { | ||
247 | this.options.width = this.Xelement.width(); | ||
248 | } | ||
249 | if (this.options.height) { | ||
250 | this.Xelement.height(this.options.height); | ||
251 | } | ||
252 | else { | ||
253 | this.options.height = this.Xelement.height(); | ||
254 | } | ||
255 | |||
256 | // Default options value | ||
257 | this.options = XjQ.extend(true, {}, jQCloud.DEFAULTS, this.options); | ||
258 | |||
259 | // Ensure delay | ||
260 | if (this.options.delay === null) { | ||
261 | this.options.delay = this.word_array.length > 50 ? 10 : 0; | ||
262 | } | ||
263 | |||
264 | // Backward compatibility | ||
265 | if (this.options.center.x > 1) { | ||
266 | this.options.center.x = this.options.center.x / this.options.width; | ||
267 | this.options.center.y = this.options.center.y / this.options.height; | ||
268 | } | ||
269 | |||
270 | // Create colorGenerator function from options | ||
271 | // Direct function | ||
272 | if (typeof this.options.colors == 'function') { | ||
273 | this.colorGenerator = this.options.colors; | ||
274 | } | ||
275 | // Array of sizes | ||
276 | else if (XjQ.isArray(this.options.colors)) { | ||
277 | var cl = this.options.colors.length; | ||
278 | if (cl > 0) { | ||
279 | // Fill the sizes array to X items | ||
280 | if (cl < this.options.steps) { | ||
281 | for (var i = cl; i < this.options.steps; i++) { | ||
282 | this.options.colors[i] = this.options.colors[cl - 1]; | ||
283 | } | ||
284 | } | ||
285 | |||
286 | this.colorGenerator = function(weight) { | ||
287 | return this.options.colors[this.options.steps - weight]; | ||
288 | }; | ||
289 | } | ||
290 | } | ||
291 | |||
292 | // Create sizeGenerator function from options | ||
293 | // Direct function | ||
294 | if (typeof this.options.fontSize == 'function') { | ||
295 | this.sizeGenerator = this.options.fontSize; | ||
296 | } | ||
297 | // Object with 'from' and 'to' | ||
298 | else if (XjQ.isPlainObject(this.options.fontSize)) { | ||
299 | this.sizeGenerator = function(width, height, weight) { | ||
300 | var max = width * this.options.fontSize.from, | ||
301 | min = width * this.options.fontSize.to; | ||
302 | return Math.round(min + (max - min) * 1.0 / (this.options.steps - 1) * (weight - 1)) + 'px'; | ||
303 | }; | ||
304 | } | ||
305 | // Array of sizes | ||
306 | else if (XjQ.isArray(this.options.fontSize)) { | ||
307 | var sl = this.options.fontSize.length; | ||
308 | if (sl > 0) { | ||
309 | // Fill the sizes array to X items | ||
310 | if (sl < this.options.steps) { | ||
311 | for (var j = sl; j < this.options.steps; j++) { | ||
312 | this.options.fontSize[j] = this.options.fontSize[sl - 1]; | ||
313 | } | ||
314 | } | ||
315 | |||
316 | this.sizeGenerator = function(width, height, weight) { | ||
317 | return this.options.fontSize[this.options.steps - weight]; | ||
318 | }; | ||
319 | } | ||
320 | } | ||
321 | |||
322 | this.data.angle = Math.random() * 6.28; | ||
323 | this.data.step = (this.options.shape === 'rectangular') ? 18.0 : 2.0; | ||
324 | this.data.aspect_ratio = this.options.width / this.options.height; | ||
325 | this.clearTimeouts(); | ||
326 | |||
327 | // Namespace word ids to avoid collisions between multiple clouds | ||
328 | this.data.namespace = (this.Xelement.attr('id') || Math.floor((Math.random() * 1000000)).toString(36)) + '_word_'; | ||
329 | |||
330 | this.Xelement.addClass('jqcloud'); | ||
331 | |||
332 | // Container's CSS position cannot be 'static' | ||
333 | if (this.Xelement.css('position') === 'static') { | ||
334 | this.Xelement.css('position', 'relative'); | ||
335 | } | ||
336 | |||
337 | // Delay execution so that the browser can render the page before the computatively intensive word cloud drawing | ||
338 | this.createTimeout(XjQ.proxy(this.drawWordCloud, this), 10); | ||
339 | |||
340 | // Attach window resize event | ||
341 | if (this.options.autoResize) { | ||
342 | XjQ(window).on('resize.' + this.data.namespace, throttle(this.resize, 50, this)); | ||
343 | } | ||
344 | }, | ||
345 | |||
346 | // Helper function to keep track of timeouts so they can be destroyed | ||
347 | createTimeout: function(callback, time) { | ||
348 | var timeout = setTimeout(XjQ.proxy(function() { | ||
349 | delete this.data.timeouts[timeout]; | ||
350 | callback(); | ||
351 | }, this), time); | ||
352 | this.data.timeouts[timeout] = true; | ||
353 | }, | ||
354 | |||
355 | // Destroy all timeouts | ||
356 | clearTimeouts: function() { | ||
357 | XjQ.each(this.data.timeouts, function(key) { | ||
358 | clearTimeout(key); | ||
359 | }); | ||
360 | this.data.timeouts = {}; | ||
361 | }, | ||
362 | |||
363 | // Pairwise overlap detection | ||
364 | overlapping: function(a, b) { | ||
365 | if (Math.abs(2.0 * a.left + a.width - 2.0 * b.left - b.width) < a.width + b.width) { | ||
366 | if (Math.abs(2.0 * a.top + a.height - 2.0 * b.top - b.height) < a.height + b.height) { | ||
367 | return true; | ||
368 | } | ||
369 | } | ||
370 | return false; | ||
371 | }, | ||
372 | |||
373 | // Helper function to test if an element overlaps others | ||
374 | hitTest: function(elem) { | ||
375 | // Check elements for overlap one by one, stop and return false as soon as an overlap is found | ||
376 | for (var i = 0, l = this.data.placed_words.length; i < l; i++) { | ||
377 | if (this.overlapping(elem, this.data.placed_words[i])) { | ||
378 | return true; | ||
379 | } | ||
380 | } | ||
381 | return false; | ||
382 | }, | ||
383 | |||
384 | // Initialize the drawing of the whole cloud | ||
385 | drawWordCloud: function() { | ||
386 | var i, l; | ||
387 | |||
388 | this.Xelement.children('[id^="' + this.data.namespace + '"]').remove(); | ||
389 | |||
390 | if (this.word_array.length === 0) { | ||
391 | return; | ||
392 | } | ||
393 | |||
394 | // Make sure every weight is a number before sorting | ||
395 | for (i = 0, l = this.word_array.length; i < l; i++) { | ||
396 | this.word_array[i].weight = parseFloat(this.word_array[i].weight, 10); | ||
397 | } | ||
398 | |||
399 | // Sort word_array from the word with the highest weight to the one with the lowest | ||
400 | this.word_array.sort(function(a, b) { | ||
401 | return b.weight - a.weight; | ||
402 | }); | ||
403 | |||
404 | // Kepp trace of bounds | ||
405 | this.data.max_weight = this.word_array[0].weight; | ||
406 | this.data.min_weight = this.word_array[this.word_array.length - 1].weight; | ||
407 | |||
408 | // Generate colors | ||
409 | this.data.colors = []; | ||
410 | if (this.colorGenerator) { | ||
411 | for (i = 0; i < this.options.steps; i++) { | ||
412 | this.data.colors.push(this.colorGenerator(i + 1)); | ||
413 | } | ||
414 | } | ||
415 | |||
416 | // Generate font sizes | ||
417 | this.data.sizes = []; | ||
418 | if (this.sizeGenerator) { | ||
419 | for (i = 0; i < this.options.steps; i++) { | ||
420 | this.data.sizes.push(this.sizeGenerator(this.options.width, this.options.height, i + 1)); | ||
421 | } | ||
422 | } | ||
423 | |||
424 | // Iterate drawOneWord on every word, immediately or with delay | ||
425 | if (this.options.delay > 0) { | ||
426 | this.drawOneWordDelayed(); | ||
427 | } | ||
428 | else { | ||
429 | for (i = 0, l = this.word_array.length; i < l; i++) { | ||
430 | this.drawOneWord(i, this.word_array[i]); | ||
431 | } | ||
432 | |||
433 | if (typeof this.options.afterCloudRender === 'function') { | ||
434 | this.options.afterCloudRender.call(this.Xelement); | ||
435 | } | ||
436 | } | ||
437 | }, | ||
438 | |||
439 | // Function to draw a word, by moving it in spiral until it finds a suitable empty place | ||
440 | drawOneWord: function(index, word) { | ||
441 | var word_id = this.data.namespace + index, | ||
442 | word_selector = '#' + word_id, | ||
443 | |||
444 | // option.shape == 'elliptic' | ||
445 | angle = this.data.angle, | ||
446 | radius = 0.0, | ||
447 | |||
448 | // option.shape == 'rectangular' | ||
449 | steps_in_direction = 0.0, | ||
450 | quarter_turns = 0.0, | ||
451 | |||
452 | weight = Math.floor(this.options.steps / 2), | ||
453 | word_span, | ||
454 | word_size, | ||
455 | word_style; | ||
456 | |||
457 | // Create word attr object | ||
458 | //word.attr = XjQ.extend({}, word.html, { id: word_id }); | ||
459 | word.attr = XjQ.extend({}, word.html, { id: word_id, group: (word.group ? word.group : "") }); | ||
460 | |||
461 | // Linearly map the original weight to a discrete scale from 1 to 10 | ||
462 | // Only if weights are different | ||
463 | if (this.data.max_weight != this.data.min_weight) { | ||
464 | weight = Math.round((word.weight - this.data.min_weight) * 1.0 * (this.options.steps - 1) / (this.data.max_weight - this.data.min_weight)) + 1; | ||
465 | } | ||
466 | word_span = XjQ('<span>').attr(word.attr); | ||
467 | |||
468 | word_span.addClass('jqcloud-word'); | ||
469 | |||
470 | // Apply class | ||
471 | if (this.options.classPattern) { | ||
472 | word_span.addClass(this.options.classPattern.replace('{n}', weight)); | ||
473 | } | ||
474 | |||
475 | // Apply color | ||
476 | if (this.data.colors.length) { | ||
477 | word_span.css('color', this.data.colors[weight - 1]); | ||
478 | } | ||
479 | |||
480 | // Apply color from word property | ||
481 | if (word.color) { | ||
482 | word_span.css('color', word.color); | ||
483 | } | ||
484 | |||
485 | // Apply size | ||
486 | if (this.data.sizes.length) { | ||
487 | word_span.css('font-size', this.data.sizes[weight - 1]); | ||
488 | } | ||
489 | |||
490 | //Render using template function if provided. | ||
491 | if (this.options.template) { | ||
492 | word_span.html(this.options.template(word)); | ||
493 | } else if (word.link) { | ||
494 | // Append link if word.link attribute was set | ||
495 | // If link is a string, then use it as the link href | ||
496 | if (typeof word.link === 'string') { | ||
497 | word.link = { href: word.link }; | ||
498 | } | ||
499 | |||
500 | if (this.options.encodeURI) { | ||
501 | word.link.href = encodeURI(word.link.href).replace(/'/g, '%27'); | ||
502 | } | ||
503 | |||
504 | word_span.append(XjQ('<a>').attr(word.link).text(word.text)); | ||
505 | } | ||
506 | else { | ||
507 | word_span.text(word.text); | ||
508 | } | ||
509 | |||
510 | // Bind handlers to words | ||
511 | if (word.handlers) { | ||
512 | word_span.on(word.handlers); | ||
513 | } | ||
514 | |||
515 | this.Xelement.append(word_span); | ||
516 | |||
517 | word_size = { | ||
518 | width: word_span.outerWidth(), | ||
519 | height: word_span.outerHeight() | ||
520 | }; | ||
521 | word_size.left = this.options.center.x * this.options.width - word_size.width / 2.0; | ||
522 | word_size.top = this.options.center.y * this.options.height - word_size.height / 2.0; | ||
523 | |||
524 | // Save a reference to the style property, for better performance | ||
525 | word_style = word_span[0].style; | ||
526 | word_style.position = 'absolute'; | ||
527 | word_style.left = word_size.left + 'px'; | ||
528 | word_style.top = word_size.top + 'px'; | ||
529 | |||
530 | while (this.hitTest(word_size)) { | ||
531 | // option shape is 'rectangular' so move the word in a rectangular spiral | ||
532 | if (this.options.shape === 'rectangular') { | ||
533 | steps_in_direction++; | ||
534 | |||
535 | if (steps_in_direction * this.data.step > (1 + Math.floor(quarter_turns / 2.0)) * this.data.step * ((quarter_turns % 4 % 2) === 0 ? 1 : this.data.aspect_ratio)) { | ||
536 | steps_in_direction = 0.0; | ||
537 | quarter_turns++; | ||
538 | } | ||
539 | |||
540 | switch (quarter_turns % 4) { | ||
541 | case 1: | ||
542 | word_size.left += this.data.step * this.data.aspect_ratio + Math.random() * 2.0; | ||
543 | break; | ||
544 | case 2: | ||
545 | word_size.top -= this.data.step + Math.random() * 2.0; | ||
546 | break; | ||
547 | case 3: | ||
548 | word_size.left -= this.data.step * this.data.aspect_ratio + Math.random() * 2.0; | ||
549 | break; | ||
550 | case 0: | ||
551 | word_size.top += this.data.step + Math.random() * 2.0; | ||
552 | break; | ||
553 | } | ||
554 | } | ||
555 | // Default settings: elliptic spiral shape | ||
556 | else { | ||
557 | radius += this.data.step; | ||
558 | angle += (index % 2 === 0 ? 1 : -1) * this.data.step; | ||
559 | |||
560 | word_size.left = this.options.center.x * this.options.width - (word_size.width / 2.0) + (radius * Math.cos(angle)) * this.data.aspect_ratio; | ||
561 | word_size.top = this.options.center.y * this.options.height + radius * Math.sin(angle) - (word_size.height / 2.0); | ||
562 | } | ||
563 | word_style.left = word_size.left + 'px'; | ||
564 | word_style.top = word_size.top + 'px'; | ||
565 | } | ||
566 | |||
567 | // Don't render word if part of it would be outside the container | ||
568 | if (this.options.removeOverflowing && ( | ||
569 | word_size.left < 0 || word_size.top < 0 || | ||
570 | (word_size.left + word_size.width) > this.options.width || | ||
571 | (word_size.top + word_size.height) > this.options.height | ||
572 | ) | ||
573 | ) { | ||
574 | word_span.remove(); | ||
575 | return; | ||
576 | } | ||
577 | |||
578 | // Save position for further usage | ||
579 | this.data.placed_words.push(word_size); | ||
580 | |||
581 | if (typeof word.afterWordRender === 'function') { | ||
582 | word.afterWordRender.call(word_span); | ||
583 | } | ||
584 | }, | ||
585 | |||
586 | // Draw one word then recall the function after a delay | ||
587 | drawOneWordDelayed: function(index) { | ||
588 | index = index || 0; | ||
589 | |||
590 | // if not visible then do not attempt to draw | ||
591 | if (!this.Xelement.is(':visible')) { | ||
592 | this.createTimeout(XjQ.proxy(function() { | ||
593 | this.drawOneWordDelayed(index); | ||
594 | }, this), 10); | ||
595 | |||
596 | return; | ||
597 | } | ||
598 | |||
599 | if (index < this.word_array.length) { | ||
600 | this.drawOneWord(index, this.word_array[index]); | ||
601 | |||
602 | this.createTimeout(XjQ.proxy(function() { | ||
603 | this.drawOneWordDelayed(index + 1); | ||
604 | }, this), this.options.delay); | ||
605 | } | ||
606 | else { | ||
607 | if (typeof this.options.afterCloudRender == 'function') { | ||
608 | this.options.afterCloudRender.call(this.Xelement); | ||
609 | } | ||
610 | } | ||
611 | }, | ||
612 | |||
613 | // Destroy any data and objects added by the plugin | ||
614 | destroy: function() { | ||
615 | if (this.options.autoResize) { | ||
616 | XjQ(window).off('resize.' + this.data.namespace); | ||
617 | } | ||
618 | |||
619 | this.clearTimeouts(); | ||
620 | this.Xelement.removeClass('jqcloud'); | ||
621 | this.Xelement.removeData('jqcloud'); | ||
622 | this.Xelement.children('[id^="' + this.data.namespace + '"]').remove(); | ||
623 | }, | ||
624 | |||
625 | // Update the list of words | ||
626 | update: function(word_array) { | ||
627 | this.word_array = word_array; | ||
628 | this.data.placed_words = []; | ||
629 | |||
630 | this.clearTimeouts(); | ||
631 | this.drawWordCloud(); | ||
632 | }, | ||
633 | |||
634 | resize: function() { | ||
635 | var new_size = { | ||
636 | width: this.Xelement.width(), | ||
637 | height: this.Xelement.height() | ||
638 | }; | ||
639 | |||
640 | if (new_size.width != this.options.width || new_size.height != this.options.height) { | ||
641 | this.options.width = new_size.width; | ||
642 | this.options.height = new_size.height; | ||
643 | this.data.aspect_ratio = this.options.width / this.options.height; | ||
644 | |||
645 | this.update(this.word_array); | ||
646 | } | ||
647 | }, | ||
648 | }; | ||
649 | |||
650 | /* | ||
651 | * Apply throttling to a callback | ||
652 | * @param callback {function} | ||
653 | * @param delay {int} milliseconds | ||
654 | * @param context {object|null} | ||
655 | * @return {function} | ||
656 | */ | ||
657 | function throttle(callback, delay, context) { | ||
658 | var state = { | ||
659 | pid: null, | ||
660 | last: 0 | ||
661 | }; | ||
662 | |||
663 | return function() { | ||
664 | var elapsed = new Date().getTime() - state.last, | ||
665 | args = arguments, | ||
666 | that = this; | ||
667 | |||
668 | function exec() { | ||
669 | state.last = new Date().getTime(); | ||
670 | return callback.apply(context || that, Array.prototype.slice.call(args)); | ||
671 | } | ||
672 | |||
673 | if (elapsed > delay) { | ||
674 | return exec(); | ||
675 | } | ||
676 | else { | ||
677 | clearTimeout(state.pid); | ||
678 | state.pid = setTimeout(exec, delay - elapsed); | ||
679 | } | ||
680 | }; | ||
681 | } | ||
682 | |||
683 | /* | ||
684 | * jQuery plugin | ||
685 | */ | ||
686 | XjQ.fn.jQCloud = function(word_array, option) { | ||
687 | var args = arguments; | ||
688 | |||
689 | return this.each(function() { | ||
690 | var Xthis = XjQ(this), | ||
691 | data = Xthis.data('jqcloud'); | ||
692 | |||
693 | if (!data && word_array === 'destroy') { | ||
694 | // Don't even try to initialize when called with 'destroy' | ||
695 | return; | ||
696 | } | ||
697 | if (!data) { | ||
698 | var options = typeof option === 'object' ? option : {}; | ||
699 | Xthis.data('jqcloud', (data = new jQCloud(this, word_array, options))); | ||
700 | } | ||
701 | else if (typeof word_array === 'string') { | ||
702 | data[word_array].apply(data, Array.prototype.slice.call(args, 1)); | ||
703 | } | ||
704 | }); | ||
705 | }; | ||
706 | |||
707 | XjQ.fn.jQCloud.defaults = { | ||
708 | set: function(options) { | ||
709 | XjQ.extend(true, jQCloud.DEFAULTS, options); | ||
710 | }, | ||
711 | get: function(key) { | ||
712 | var options = jQCloud.DEFAULTS; | ||
713 | if (key) { | ||
714 | options = options[key]; | ||
715 | } | ||
716 | return XjQ.extend(true, {}, options); | ||
717 | } | ||
718 | }; | ||
719 | |||
720 | var jQwords = [ | ||
721 | {text: "Druckvorschau", weight: 9, group: 'Designer', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
722 | {text: "Link im Formular", weight: 6, group: 'Designer', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
723 | {text: "Kalenderwidget anpassen", weight: 8, group: 'Designer', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
724 | {text: "Optionale Daten einer Auswahl mitspeichern (col Attribute)", weight: 4, group: 'Designer', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
725 | {text: "Aktion vor Absenden ausführen", weight: 5, group: 'Designer', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
726 | {text: "Absenden ohne Speichern", weight: 9, group: 'Designer', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
727 | {text: "Eigene Formularfeld-Validatoren (Regex)", weight: 10, group: 'Designer', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
728 | {text: "Wiederholende Felder (dynamic) im JS adressieren", weight: 10, group: 'Designer', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
729 | {text: "Events an dynamic Felder anhängen", weight: 9, group: 'Designer', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
730 | {text: "[Richtext-Editor (Ticket #4227)]", weight: 3, group: 'Designer', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
731 | {text: "Vorbelegung von Daten im Formular (extern)", weight: 9, group: 'Designer', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
732 | {text: "intiale Vorbelegung von Daten in Feldern", weight: 9, group: 'Designer', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
733 | {text: "Formularfelder mit LDAP-Daten vorbelegen (Ticket 3701)", weight: 3, group: 'Designer', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
734 | {text: "Formulareingaben zurücksetzen", weight: 7, group: 'Designer', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
735 | {text: "Formulardaten lokal speichern und später wieder laden (Ticket #3964)", weight: 8, group: 'Designer', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
736 | {text: "Formular zwischenspeichern", weight: 9, group: 'Designer', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
737 | {text: "Labeltext zur Laufzeit manipulieren (Ticket #3493)", weight: 5, group: 'Designer', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
738 | {text: "Mehrfachbedingungen im Designer", weight: 7, group: 'Designer', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
739 | {text: "zusätzliches JS und CSS in allen Formularen", weight: 8, group: 'Designer', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
740 | {text: "mehrseitige Formulare", weight: 9, group: 'Designer', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
741 | {text: "responive / mobile Ansicht", weight: 10, group: 'Designer', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
742 | {text: "andere Schriftart einbinden / Design ändern", weight: 9, group: 'Designer', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
743 | {text: "Java-Script API", weight: 8, group: 'Designer', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
744 | |||
745 | {text: "Datenquellen für Auswahllisten hinterlegen", weight: 8, group: 'Datenquellen', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
746 | {text: "Datenquellen in Auswahllisten anhand von Parametern hinterlegen", weight: 6, group: 'Datenquellen', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
747 | {text: "Leerer erster Eintrag bei SQL-Datenquelle (Ticket #4068)", weight: 5, group: 'Datenquellen', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
748 | |||
749 | {text: "Mehrfachbedingungen im Workflow", weight: 8, group: 'Statusverarbeitung', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
750 | {text: "Automatisiertes Löschen nach bestimmten Zeitraum", weight: 9, group: 'Statusverarbeitung', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
751 | {text: "Exportmöglichkeiten von Daten", weight: 6, group: 'Statusverarbeitung', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
752 | {text: "E-Mail Aktionen abhängig von Eingaben (Bedingungen) durchführen", weight: 8, group: 'Statusverarbeitung', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
753 | {text: "Bedingtes Einblenden von Elementen", weight: 7, group: 'Statusverarbeitung', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
754 | {text: "Mehrstufigen Workflow (Beispiel)", weight: 8, group: 'Statusverarbeitung', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
755 | {text: "Statuswechsel", weight: 10, group: 'Statusverarbeitung', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
756 | {text: "Vorgangs-ID im Druck (Word-Fill) anzeigen (Ticket #3813)", weight: 5, group: 'Statusverarbeitung', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
757 | {text: "iCal Datei erzeugen", weight: 3, group: 'Statusverarbeitung', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
758 | {text: "aktuelles Datum in der Verarbeitung", weight: 6, group: 'Statusverarbeitung', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
759 | {text: "Laufende Nummer aus Nummernkreis erzeugen (Ticket #3249)", weight: 3, group: 'Statusverarbeitung', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
760 | {text: "E-Mail-Versand", weight: 10, group: 'Statusverarbeitung', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
761 | |||
762 | {text: "Migrationsmöglichkeiten in Webseite", weight: 6, group: 'Abschlusseite', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
763 | {text: "Abschlussseite in Webseite anzeigen (inline)", weight: 5, group: 'Abschlusseite', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
764 | {text: "Generierte Dateien auf Abschlussseite anzeigen", weight: 7, group: 'Abschlusseite', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
765 | {text: "Benutzerdefinierte Abschlussseite", weight: 9, group: 'Abschlusseite', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
766 | {text: "Referenznummer (Ticket #3866)", weight: 5, group: 'Abschlusseite', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
767 | |||
768 | {text: "Vorgänge löschen", weight: 9, group: 'Posteingang', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
769 | {text: "Filtermöglichkeiten", weight: 8, group: 'Posteingang', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
770 | {text: "Stauswechsel im Postfach ermöglichen (notwendige Einstellungen)", weight: 6.5, group: 'Posteingang', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
771 | {text: "Postfach exportieren", weight: 7, group: 'Posteingang', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
772 | {text: "Berechtigungen/Sichtbarkeiten für Benutzer festlegen", weight: 6, group: 'Posteingang', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
773 | |||
774 | {text: "Update FORMCYCLE", weight: 4, group: 'Anderes', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
775 | {text: "Zugriffseinschränkung - Möglichkeiten", weight: 3, group: 'Anderes', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
776 | {text: "I-Frame automatisch Höhe anpassen", weight: 5, group: 'Anderes', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
777 | {text: "Daten aus Formular werden nicht gespeichert (Disablede Felder)", weight: 6, group: 'Anderes', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
778 | {text: "Double Opt-In", weight: 7, group: 'Anderes', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/UserInterface/MyForms/DoubleOptIn/'}, | ||
779 | {text: "[Übersicht von Lösungen bei Problemen mit z.B. DB (Ticket #3714, #3057)]", weight: 6, group: 'Anderes', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
780 | {text: "[Tomcat Zugriff HTTPS - Zertifikat-Einrichtung (Ticket #3295)]", weight: 5, group: 'Anderes', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
781 | {text: "Beispiele für Print CSS / Erläuterung was das PDF Print Plugin macht", weight: 7, group: 'Anderes', link: 'https://help.formcycle.eu/xwiki/bin/view/Formcycle/'}, | ||
782 | ]; | ||
783 | ##http://mistic100.github.io/jQCloud/demo.html#handlers | ||
784 | /*XjQ('#jQArea').jQCloud(jQwords, { | ||
785 | classPattern: null, | ||
786 | colors: ["#176694", "#3480AD", "#5398c1", "#76b2d6", "#7ca2b9", "#889fad", "#8e979c", "#929596", "#babbbb"], | ||
787 | fontSize: ['16px','15px','15px','14px','14px','13px','13px','12px','12px'], | ||
788 | //width: 500, | ||
789 | height: 500 | ||
790 | });*/ | ||
791 | |||
792 | var jQButtons = XjQ('.jQButton'); | ||
793 | |||
794 | jQButtons.click(function() { | ||
795 | if (XjQ(this).attr('active') == 'true') { | ||
796 | XjQ('#jQArea').children('span[group="'+XjQ(this).attr('group')+'"]').each(jQTagInvisible); | ||
797 | XjQ(this).attr('active', 'false'); | ||
798 | } else { | ||
799 | XjQ('#jQArea').children('span[group="'+XjQ(this).attr('group')+'"]').each(jQTagVisible); | ||
800 | XjQ(this).attr('active', 'true'); | ||
801 | } | ||
802 | }); | ||
803 | function jQTagVisible() { | ||
804 | XjQ(this).css('display', 'block'); | ||
805 | } | ||
806 | function jQTagInvisible() { | ||
807 | XjQ(this).css('display', 'none'); | ||
808 | } | ||
809 | |||
810 | jQButtons.hover(function() { | ||
811 | console.log("hover",XjQ(this)); | ||
812 | XjQ('#jQArea').children('span[group="'+XjQ(this).attr('group')+'"]').each(jQTagHighlighted); | ||
813 | }, function() { | ||
814 | console.log("unhover",XjQ(this)); | ||
815 | XjQ('#jQArea').children('span[group="'+XjQ(this).attr('group')+'"]').each(jQTagNotHighlighted); | ||
816 | }); | ||
817 | function jQTagHighlighted() { | ||
818 | XjQ(this).addClass('jqHighlight'); | ||
819 | } | ||
820 | function jQTagNotHighlighted() { | ||
821 | XjQ(this).removeClass('jqHighlight'); | ||
822 | } | ||
823 | }); | ||
824 | </script> | ||
825 | <!-- | ||
826 | <div class="row"> | ||
827 | <div class="d-none d-md-block col-lg-12 card-main"> | ||
828 | <div class="well" > | ||
829 | <div id="jQButtons"> | ||
830 | <div id="jQBtn1" class="jQButton" group="Designer" active="true"><span class="jQButton-icon"></span> Designer</div> | ||
831 | <div id="jQBtn1" class="jQButton" group="Datenquellen" active="true"><span class="jQButton-icon"></span> Datenquellen</div> | ||
832 | <div id="jQBtn1" class="jQButton" group="Statusverarbeitung" active="true"><span class="jQButton-icon"></span> Statusverarbeitung</div> | ||
833 | <div id="jQBtn1" class="jQButton" group="Abschlusseite" active="true"><span class="jQButton-icon"></span> Abschlusseite</div> | ||
834 | <div id="jQBtn1" class="jQButton" group="Posteingang" active="true"><span class="jQButton-icon"></span> Posteingang</div> | ||
835 | <div id="jQBtn1" class="jQButton" group="Anderes" active="true"><span class="jQButton-icon"></span> Anderes</div> | ||
836 | </div> | ||
837 | <div id="jQArea"> | ||
838 | </div> | ||
839 | </div> | ||
840 | </div> | ||
841 | </div> | ||
842 | --> | ||
843 | {{/html}} | ||
844 | {{/velocity}} |