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