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