diff --git a/modules/src/xibo-elements-render.js b/modules/src/xibo-elements-render.js index 6eda8ba067..423415a5d3 100644 --- a/modules/src/xibo-elements-render.js +++ b/modules/src/xibo-elements-render.js @@ -28,8 +28,6 @@ jQuery.fn.extend({ duration: 50, durationIsPerItem: false, numItems: 1, - takeItemsFrom: 'start', - reverseOrder: 0, itemsPerPage: 1, speed: 2, previewWidth: 0, diff --git a/modules/src/xibo-text-render.js b/modules/src/xibo-text-render.js index 24bb4753ef..5417427757 100644 --- a/modules/src/xibo-text-render.js +++ b/modules/src/xibo-text-render.js @@ -26,9 +26,7 @@ jQuery.fn.extend({ pauseEffectOnStart: true, duration: '50', durationIsPerItem: false, - numItems: 0, - takeItemsFrom: 'start', - reverseOrder: 0, + numItems: 1, itemsPerPage: 0, speed: '2', previewWidth: 0, @@ -75,6 +73,9 @@ jQuery.fn.extend({ } }; + // If number of items is not defined, get it from the item count + options.numItems = options.numItems ? options.numItems : items.length; + // Calculate the dimensions of this item // based on the preview/original dimensions let width = height = 0; @@ -247,6 +248,8 @@ jQuery.fn.extend({ // Change the number of items numberOfItems = $(slides).length; + } else if (options.type === 'text') { + numberOfItems = $(slides).length; } const numberOfSlides = (options.itemsPerPage > 1) ? diff --git a/modules/templates/article-static.xml b/modules/templates/article-static.xml index 7fd9a35087..1de3ef5a37 100644 --- a/modules/templates/article-static.xml +++ b/modules/templates/article-static.xml @@ -325,7 +325,7 @@ $(target).xiboTextRender(properties, $(target).find('#content > .image, #content {{#if image}}{{/if}}
{{title}}
-
{{{content}}}
+
{{{summary}}}
]]> @@ -696,7 +696,7 @@ $(target).xiboTextRender(properties, $(target).find('#content > .image, #content
{{author}}
{{title}}
-
{{{content}}}
+
{{{summary}}}
]]> ').addClass('event').html(items[index]).appendTo('body'); $(target).find('#content').append($newItem); } diff --git a/ui/src/core/forms.js b/ui/src/core/forms.js index 168428a6a2..69db87089b 100644 --- a/ui/src/core/forms.js +++ b/ui/src/core/forms.js @@ -1864,6 +1864,9 @@ window.forms = { const $el = $(el).find('select'); const effectsType = $el.data('effects-type').split(' '); + // Show option groups if we show all + const showOptionGroups = (effectsType.indexOf('all') != -1); + // Effects const effects = [ {effect: 'none', group: 'showAll'}, @@ -1902,7 +1905,23 @@ window.forms = { return; } - $el.append( + // Show option group if it doesn't exist + let $optionGroup = $el.find(`optgroup[data-type=${element.group}]`); + if ( + showOptionGroups && $optionGroup.length == 0 + ) { + $optionGroup = + $(` + `); + $el.append($optionGroup); + } + + // Check if we add to option group or main select + const $appendTo = showOptionGroups ? $optionGroup : $el; + + $appendTo.append( $('