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