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