diff --git a/lib/Connector/OpenWeatherMapConnector.php b/lib/Connector/OpenWeatherMapConnector.php index e541ffb089..9f35768f61 100644 --- a/lib/Connector/OpenWeatherMapConnector.php +++ b/lib/Connector/OpenWeatherMapConnector.php @@ -1,6 +1,6 @@ copy()->addDay()->startOfDay() )['list']; } else { - // We use one call - if (($this->getSetting('owmApiVersion') ?? '2.5') === '2.5') { - $forecastCombined = $this->forecastCombined; - } else { - $forecastCombined = $this->forecastCombinedV3; - } - - $data = $this->queryApi($this->apiUrl . $forecastCombined . $url, $cacheExpire); + // We use one call API 3.0 + $data = $this->queryApi($this->apiUrl . $this->forecastCombinedV3 . $url, $cacheExpire); $this->timezone = $data['timezone']; diff --git a/lib/Controller/DataSet.php b/lib/Controller/DataSet.php index c97bb2c91e..e83879a8c0 100644 --- a/lib/Controller/DataSet.php +++ b/lib/Controller/DataSet.php @@ -1,6 +1,6 @@ setNoOutput(true); + // Explicitly set the Content-Type header to application/json + $response = $response->withHeader('Content-Type', 'application/json'); + return $this->render($request, $response); } diff --git a/lib/Controller/Font.php b/lib/Controller/Font.php index a8d6af8262..55e23c8ccc 100644 --- a/lib/Controller/Font.php +++ b/lib/Controller/Font.php @@ -1,6 +1,6 @@ getMediaService()->updateFontsCss(); + // Explicitly set the Content-Type header to application/json + $response = $response->withHeader('Content-Type', 'application/json'); + return $this->render($request, $response); } diff --git a/lib/Controller/Layout.php b/lib/Controller/Layout.php index 91dcae7dd2..9b388c66b8 100644 --- a/lib/Controller/Layout.php +++ b/lib/Controller/Layout.php @@ -2578,6 +2578,9 @@ public function import(Request $request, Response $response) // Hand off to the Upload Handler provided by jquery-file-upload new LayoutUploadHandler($options); + // Explicitly set the Content-Type header to application/json + $response = $response->withHeader('Content-Type', 'application/json'); + return $response; } diff --git a/lib/Controller/Library.php b/lib/Controller/Library.php index 3bc46cc0bc..e1dffd0d14 100644 --- a/lib/Controller/Library.php +++ b/lib/Controller/Library.php @@ -1222,6 +1222,9 @@ public function add(Request $request, Response $response) // Hand off to the Upload Handler provided by jquery-file-upload new XiboUploadHandler($options); + // Explicitly set the Content-Type header to application/json + $response = $response->withHeader('Content-Type', 'application/json'); + return $this->render($request, $response); } @@ -1660,6 +1663,9 @@ public function download(Request $request, Response $response, $id) } /** + * Thumbnail for the libary page + * this is called by library-page datatable + * * @SWG\Get( * path="/library/thumbnail/{mediaId}", * operationId="libraryThumbnail", @@ -1699,6 +1705,8 @@ public function download(Request $request, Response $response, $id) */ public function thumbnail(Request $request, Response $response, $id) { + $this->setNoOutput(); + // We can download by mediaId or by mediaName. if (is_numeric($id)) { $media = $this->mediaFactory->getById($id); @@ -1706,12 +1714,14 @@ public function thumbnail(Request $request, Response $response, $id) $media = $this->mediaFactory->getByName($id); } - $this->getLog()->debug('Thumbnail request for mediaId ' . $id + $this->getLog()->debug('thumbnail: Thumbnail request for mediaId ' . $id . '. Media is a ' . $media->mediaType); // Permissions. if (!$this->getUser()->checkViewable($media)) { - throw new AccessDeniedException(); + // Output a 1px image if we're not allowed to see the media. + echo Img::make($this->getConfig()->uri('img/1x1.png', true))->encode(); + return $this->render($request, $response); } // Hand over to the widget downloader @@ -1721,9 +1731,13 @@ public function thumbnail(Request $request, Response $response, $id) $this->getConfig()->getSetting('DEFAULT_RESIZE_LIMIT', 6000) ); $downloader->useLogger($this->getLog()->getLoggerInterface()); - $response = $downloader->thumbnail($media, $response, $this->getConfig()->uri('img/error.png', true)); - $this->setNoOutput(true); + $response = $downloader->thumbnail( + $media, + $response, + $this->getConfig()->uri('img/error.png', true) + ); + return $this->render($request, $response); } diff --git a/lib/Controller/MenuBoard.php b/lib/Controller/MenuBoard.php index fbc491a53b..3564bf0f67 100644 --- a/lib/Controller/MenuBoard.php +++ b/lib/Controller/MenuBoard.php @@ -32,37 +32,20 @@ use Xibo\Support\Exception\InvalidArgumentException; use Xibo\Support\Exception\NotFoundException; +/** + * Menu Board Controller + */ class MenuBoard extends Base { - /** - * @var MenuBoardFactory - */ - private $menuBoardFactory; - - /** - * @var UserFactory - */ - private $userFactory; - - /** - * @var FolderFactory - */ - private $folderFactory; - /** * Set common dependencies. * @param MenuBoardFactory $menuBoardFactory - * @param UserFactory $userFactory * @param FolderFactory $folderFactory */ public function __construct( - $menuBoardFactory, - $userFactory, - $folderFactory + private readonly MenuBoardFactory $menuBoardFactory, + private readonly FolderFactory $folderFactory ) { - $this->menuBoardFactory = $menuBoardFactory; - $this->userFactory = $userFactory; - $this->folderFactory = $folderFactory; } /** @@ -329,11 +312,15 @@ public function add(Request $request, Response $response): Response $this->checkRootFolderAllowSave(); } - if (empty($folderId) || $this->getUser()->featureEnabled('folder.view')) { + if (empty($folderId) || !$this->getUser()->featureEnabled('folder.view')) { $folderId = $this->getUser()->homeFolderId; } - $menuBoard = $this->menuBoardFactory->create($name, $description, $code, $folderId); + $folder = $this->folderFactory->getById($folderId, 0); + + $menuBoard = $this->menuBoardFactory->create($name, $description, $code); + $menuBoard->folderId = $folder->getId(); + $menuBoard->permissionsFolderId = $folder->getPermissionFolderIdOrThis(); $menuBoard->save(); // Return diff --git a/lib/Controller/Notification.php b/lib/Controller/Notification.php index 7ce005e30b..b33feb17be 100644 --- a/lib/Controller/Notification.php +++ b/lib/Controller/Notification.php @@ -1,6 +1,6 @@ withHeader('Content-Type', 'application/json'); + return $this->render($request, $response); } diff --git a/lib/Controller/PlayerSoftware.php b/lib/Controller/PlayerSoftware.php index 10873635dc..a9a79d5e41 100644 --- a/lib/Controller/PlayerSoftware.php +++ b/lib/Controller/PlayerSoftware.php @@ -1,6 +1,6 @@ post(); + // Explicitly set the Content-Type header to application/json + $response = $response->withHeader('Content-Type', 'application/json'); + return $this->render($request, $response); } diff --git a/lib/Controller/Preview.php b/lib/Controller/Preview.php index d5a14d0f71..0d6c15aba8 100644 --- a/lib/Controller/Preview.php +++ b/lib/Controller/Preview.php @@ -1,8 +1,8 @@ layoutFactory->concurrentRequestRelease($layout); } + return $this->render($request, $response); } diff --git a/lib/Controller/Task.php b/lib/Controller/Task.php index 56c3b87fbe..dd84124a48 100644 --- a/lib/Controller/Task.php +++ b/lib/Controller/Task.php @@ -1,6 +1,6 @@ format(DateFormatHelper::getSystemFormat())); $this->setNoOutput(); + return $this->render($request, $response); } @@ -573,6 +574,7 @@ public function poll(Request $request, Response $response) $this->getLog()->debug('XTR poll stopped'); $this->setNoOutput(); + return $this->render($request, $response); } diff --git a/lib/Dependencies/Controllers.php b/lib/Dependencies/Controllers.php index 672dfbb3ad..8eef97f395 100644 --- a/lib/Dependencies/Controllers.php +++ b/lib/Dependencies/Controllers.php @@ -1,6 +1,6 @@ function (ContainerInterface $c) { $controller = new \Xibo\Controller\MenuBoard( $c->get('menuBoardFactory'), - $c->get('userFactory'), $c->get('folderFactory') ); $controller->useBaseDependenciesService($c->get('ControllerBaseDependenciesService')); diff --git a/lib/Entity/Layout.php b/lib/Entity/Layout.php index 6214eecd15..671c44630e 100644 --- a/lib/Entity/Layout.php +++ b/lib/Entity/Layout.php @@ -1703,6 +1703,10 @@ public function toXlf() $this->config->getSetting('DEFAULT_TRANSITION_DURATION') ) )); + $optionsNode->appendChild($document->createElement( + 'transInDirection', + $widget->getOptionValue('transInDirection', 'E') + )); } $transOut = $widget->getOptionValue('transOut', null); @@ -1715,6 +1719,10 @@ public function toXlf() $this->config->getSetting('DEFAULT_TRANSITION_DURATION') ) )); + $optionsNode->appendChild($document->createElement( + 'transOutDirection', + $widget->getOptionValue('transOutDirection', 'E') + )); } // If we do not have an update interval, should we set a default one? diff --git a/lib/Factory/MenuBoardFactory.php b/lib/Factory/MenuBoardFactory.php index bc33a21f58..5be43d7f24 100644 --- a/lib/Factory/MenuBoardFactory.php +++ b/lib/Factory/MenuBoardFactory.php @@ -28,6 +28,9 @@ use Xibo\Service\DisplayNotifyServiceInterface; use Xibo\Support\Exception\NotFoundException; +/** + * Menu Board Factory + */ class MenuBoardFactory extends BaseFactory { /** @var ConfigServiceInterface */ @@ -97,21 +100,19 @@ public function createEmpty() } /** - * Create a new action + * Create a new menuboard * @param string $name - * @param string $description - * @param string $code - * @param int $folderId + * @param string|null $description + * @param string|null $code * @return MenuBoard */ - public function create($name, $description, $code, $folderId) + public function create(string $name, ?string $description, ?string $code): MenuBoard { $menuBoard = $this->createEmpty(); $menuBoard->name = $name; $menuBoard->description = $description; $menuBoard->code = $code; $menuBoard->userId = $this->getUser()->userId; - $menuBoard->folderId = $folderId; return $menuBoard; } diff --git a/lib/Factory/ModuleFactory.php b/lib/Factory/ModuleFactory.php index faecaf4d7c..5ea1784838 100644 --- a/lib/Factory/ModuleFactory.php +++ b/lib/Factory/ModuleFactory.php @@ -144,10 +144,7 @@ public function determineCacheKey( ?WidgetProviderInterface $widgetInterface ): string { // Determine the cache key - $cacheKey = null; - if ($widgetInterface !== null) { - $cacheKey = $widgetInterface->getDataCacheKey($dataProvider); - } + $cacheKey = $widgetInterface?->getDataCacheKey($dataProvider); if ($cacheKey === null) { // Determinthe cache key from the setting in XML. @@ -165,6 +162,16 @@ public function determineCacheKey( $module->decorateProperties($widget, true); $properties = $module->getPropertyValues(false); + // Is display location in use? + // We should see if the display location property is set (this is a special property), and if it is + // update the lat/lng with the details stored on the display + $latitude = $properties['latitude'] ?? ''; + $longitude = $properties['longitude'] ?? ''; + if ($dataProvider->getProperty('useDisplayLocation') == 1) { + $latitude = $dataProvider->getDisplayLatitude() ?: $latitude; + $longitude = $dataProvider->getDisplayLongitude() ?: $longitude; + } + // Parse the cache key for variables. $matches = []; preg_match_all('/%(.*?)%/', $cacheKey, $matches); @@ -173,6 +180,10 @@ public function determineCacheKey( $cacheKey = str_replace('%displayId%', $displayId, $cacheKey); } else if ($match === 'widgetId') { $cacheKey = str_replace('%widgetId%', $widget->widgetId, $cacheKey); + } else if ($match === 'latitude') { + $cacheKey = str_replace('%latitude%', $latitude, $cacheKey); + } else if ($match === 'longitude') { + $cacheKey = str_replace('%longitude%', $longitude, $cacheKey); } else { $this->getLog()->debug($match); $cacheKey = str_replace( diff --git a/lib/Helper/DatabaseLogHandler.php b/lib/Helper/DatabaseLogHandler.php index fe3bd48988..b8cf08fc58 100644 --- a/lib/Helper/DatabaseLogHandler.php +++ b/lib/Helper/DatabaseLogHandler.php @@ -1,6 +1,6 @@ prepare('DELETE FROM `log` WHERE logdate < :maxage'); - $statement->execute(['maxage' => $cutOff]); - PdoStorageService::incrementStat('log', 'delete'); + + $statement = self::$pdo->prepare('DELETE FROM `log` WHERE logdate < :maxage LIMIT 10000'); + + do { + // Execute statement + $statement->execute(['maxage' => $cutOff]); + + // initialize number of rows deleted + $rowsDeleted = $statement->rowCount(); + + PdoStorageService::incrementStat('log', 'delete'); + + // pause for a second + sleep(2); + + } while ($rowsDeleted > 0); + } catch (\PDOException $ignored) {} } } diff --git a/lib/Helper/Environment.php b/lib/Helper/Environment.php index 7d7ecb09e6..679b127e3a 100644 --- a/lib/Helper/Environment.php +++ b/lib/Helper/Environment.php @@ -30,7 +30,7 @@ */ class Environment { - public static $WEBSITE_VERSION_NAME = '4.0.11'; + public static $WEBSITE_VERSION_NAME = '4.0.12'; public static $XMDS_VERSION = '7'; public static $XLF_VERSION = 4; public static $VERSION_REQUIRED = '8.1.0'; diff --git a/lib/Helper/XiboUploadHandler.php b/lib/Helper/XiboUploadHandler.php index f5e666445d..aaa9bb2301 100644 --- a/lib/Helper/XiboUploadHandler.php +++ b/lib/Helper/XiboUploadHandler.php @@ -184,12 +184,16 @@ protected function handle_form_data($file, $index) $controller->getLog()->debug('Replace in all Layouts selected. Getting associated widgets'); foreach ($controller->getWidgetFactory()->getByMediaId($oldMedia->mediaId, 0) as $widget) { + $controller->getLog()->debug('Found widgetId ' . $widget->widgetId + . ' to assess, type is ' . $widget->type); + if (!$controller->getUser()->checkEditable($widget)) { // Widget that we cannot update, // this means we can't delete the original mediaId when it comes time to do so. $deleteOldRevisions = false; - $controller->getLog()->info('Media used on Widget that we cannot edit. Delete Old Revisions has been disabled.'); + $controller + ->getLog()->info('Media used on Widget that we cannot edit. Delete Old Revisions has been disabled.'); //phpcs:ignore } // If we are replacing an audio media item, @@ -204,7 +208,45 @@ protected function handle_form_data($file, $index) $widget->unassignAudioById($oldMedia->mediaId); $widget->assignAudioById($media->mediaId); $widget->save(); - } elseif (count($widget->getPrimaryMedia()) > 0 + } else if ($widget->type == 'global') { + // This is a global widget and will have elements which refer to this media id. + $controller->getLog()->debug('This is a global widget, checking for elements.'); + + // We need to load options as that is where we store elements + $widget->load(false); + + // Parse existing elements. + $mediaFoundInElement = false; + $elements = json_decode($widget->getOptionValue('elements', '[]'), true); + foreach ($elements as $index => $widgetElement) { + foreach ($widgetElement['elements'] ?? [] as $elementIndex => $element) { + if (!empty($element['mediaId']) && $element['mediaId'] == $oldMedia->mediaId) { + // We have found an element which uses the mediaId we are replacing + $elements[$index]['elements'][$elementIndex]['mediaId'] = $media->mediaId; + + // Swap the ID on the link record + $widget->unassignMedia($oldMedia->mediaId); + $widget->assignMedia($media->mediaId); + + $mediaFoundInElement = true; + } + } + } + + if ($mediaFoundInElement) { + // Save the new elements + $widget->setOptionValue('elements', 'raw', json_encode($elements)); + + // Raise an event for this media item + $controller->getDispatcher()->dispatch( + new LibraryReplaceWidgetEvent($module, $widget, $media, $oldMedia), + LibraryReplaceWidgetEvent::$NAME + ); + + // Save + $widget->save(['alwaysUpdate' => true]); + } + } else if (count($widget->getPrimaryMedia()) > 0 && $widget->getPrimaryMediaId() == $oldMedia->mediaId ) { // We're only interested in primary media at this point (no audio) diff --git a/lib/Widget/Provider/DataProvider.php b/lib/Widget/Provider/DataProvider.php index 099fc1efd8..d86321eb1b 100644 --- a/lib/Widget/Provider/DataProvider.php +++ b/lib/Widget/Provider/DataProvider.php @@ -162,7 +162,7 @@ public function getDisplayId(): int /** * @inheritDoc */ - public function getDisplayLatitude(): float + public function getDisplayLatitude(): ?float { return $this->latitude; } @@ -170,7 +170,7 @@ public function getDisplayLatitude(): float /** * @inheritDoc */ - public function getDisplayLongitude(): float + public function getDisplayLongitude(): ?float { return $this->longitude; } diff --git a/lib/Widget/Provider/DataProviderInterface.php b/lib/Widget/Provider/DataProviderInterface.php index f0c93434d0..4fd54e61d3 100644 --- a/lib/Widget/Provider/DataProviderInterface.php +++ b/lib/Widget/Provider/DataProviderInterface.php @@ -61,15 +61,15 @@ public function getDisplayId(): int; /** * Get the latitude for this display - * @return float + * @return float|null */ - public function getDisplayLatitude(): float; + public function getDisplayLatitude(): ?float; /** * Get the longitude for this display - * @return float + * @return float|null */ - public function getDisplayLongitude(): float; + public function getDisplayLongitude(): ?float; /** * Get the preview flag diff --git a/lib/Widget/Render/WidgetDownloader.php b/lib/Widget/Render/WidgetDownloader.php index 9aa1e64315..1aeb666997 100644 --- a/lib/Widget/Render/WidgetDownloader.php +++ b/lib/Widget/Render/WidgetDownloader.php @@ -37,30 +37,19 @@ */ class WidgetDownloader { - /** @var string Library location */ - private $libraryLocation; - - /** @var string Send file mode */ - private $sendFileMode; - - /** @var int CMS resize limit */ - private $resizeLimit; - /** @var LoggerInterface */ - private $logger; + private LoggerInterface $logger; /** - * @param string $libraryLocation - * @param string $sendFileMode + * @param string $libraryLocation Library location + * @param string $sendFileMode Send file mode + * @param int $resizeLimit CMS resize limit */ public function __construct( - string $libraryLocation, - string $sendFileMode, - int $resizeLimit + private readonly string $libraryLocation, + private readonly string $sendFileMode, + private readonly int $resizeLimit ) { - $this->libraryLocation = $libraryLocation; - $this->sendFileMode = $sendFileMode; - $this->resizeLimit = $resizeLimit; } /** @@ -182,7 +171,7 @@ public function thumbnail( $img = null; $regenerate = true; if (file_exists($thumbnailFilePath)) { - $img = Img::make($filePath); + $img = Img::make($thumbnailFilePath); if ($img->width() === $width || $img->height() === $height) { // Correct cache $regenerate = false; @@ -190,6 +179,16 @@ public function thumbnail( } if ($regenerate) { + // Check that our source image is not too large + $imageInfo = getimagesize($filePath); + + // Make sure none of the sides are greater than allowed + if ($this->resizeLimit > 0 + && ($imageInfo[0] > $this->resizeLimit || $imageInfo[1] > $this->resizeLimit) + ) { + throw new InvalidArgumentException(__('Image too large')); + } + // Get the full image and make a thumbnail $img = Img::make($filePath); $img->resize($width, $height, function ($constraint) { @@ -202,7 +201,7 @@ public function thumbnail( $response = HttpCacheProvider::withEtag($response, md5_file($thumbnailFilePath)); echo $img->encode(); - } catch (\Exception $e) { + } catch (\Exception) { if ($errorThumb !== null) { echo Img::make($errorThumb)->encode(); } @@ -217,7 +216,7 @@ public function thumbnail( * @param string $filePath * @param \Slim\Http\Response $response * @param string|null $errorThumb - * @return \Slim\Http\Response|\Psr\Http\Message\ResponseInterface + * @return \Slim\Http\Response * @throws \Xibo\Support\Exception\InvalidArgumentException */ public function imagePreview( @@ -231,6 +230,18 @@ public function imagePreview( // an image widget may be aspect, fit or scale try { $filePath = $this->libraryLocation . $filePath; + + // Check that our source image is not too large + $imageInfo = getimagesize($filePath); + + // Make sure none of the sides are greater than allowed + if ($this->resizeLimit > 0 + && ($imageInfo[0] > $this->resizeLimit || $imageInfo[1] > $this->resizeLimit) + ) { + throw new InvalidArgumentException(__('Image too large')); + } + + // Continue to output at the desired size $width = intval($params->getDouble('width')); $height = intval($params->getDouble('height')); $proportional = !$params->hasParam('proportional') diff --git a/lib/XTR/WidgetSyncTask.php b/lib/XTR/WidgetSyncTask.php index e5d4480f19..4b4bdf7681 100644 --- a/lib/XTR/WidgetSyncTask.php +++ b/lib/XTR/WidgetSyncTask.php @@ -125,7 +125,8 @@ public function run() } // Refresh the cache if needed. - $isDisplaySpecific = str_contains($cacheKey, '%displayId%'); + $isDisplaySpecific = str_contains($cacheKey, '%displayId%') + || str_contains($cacheKey, '%useDisplayLocation%'); // We're either assigning all media to all displays, or we're assigning then one by one if ($isDisplaySpecific) { @@ -188,11 +189,17 @@ private function cache( ): array { $this->getLogger()->debug('cache: ' . $widget->widgetId . ' for display: ' . ($display?->displayId ?? 0)); - $mediaIds = []; - // Each time we call this we use a new provider $dataProvider = $module->createDataProvider($widget); $dataProvider->setMediaFactory($this->mediaFactory); + + // Set our provider up for the display + $dataProvider->setDisplayProperties( + $display?->latitude ?: $this->getConfig()->getSetting('DEFAULT_LAT'), + $display?->longitude ?: $this->getConfig()->getSetting('DEFAULT_LONG'), + $display?->displayId ?? 0 + ); + $widgetDataProviderCache = $this->moduleFactory->createWidgetDataProviderCache(); // Get the cache key @@ -204,16 +211,6 @@ private function cache( $widgetInterface ); - // Set our provider up for the displays - if ($display !== null) { - $dataProvider->setDisplayProperties($display->latitude, $display->longitude, $display->displayId); - } else { - $dataProvider->setDisplayProperties( - $this->getConfig()->getSetting('DEFAULT_LAT'), - $this->getConfig()->getSetting('DEFAULT_LONG') - ); - } - // Get the data modified date $dataModifiedDt = null; if ($widgetInterface !== null) { diff --git a/lib/Xmds/Soap.php b/lib/Xmds/Soap.php index c33687bce0..489e4c1cfa 100644 --- a/lib/Xmds/Soap.php +++ b/lib/Xmds/Soap.php @@ -927,6 +927,12 @@ protected function doRequiredFiles( // TODO: Does this need to be the most recent updated date for all the widgets in // this region? $dataProvider = $dataModule->createDataProvider($widget); + $dataProvider->setDisplayProperties( + $this->display->latitude ?: $this->getConfig()->getSetting('DEFAULT_LAT'), + $this->display->longitude ?: $this->getConfig()->getSetting('DEFAULT_LONG'), + $this->display->displayId + ); + try { $widgetDataProviderCache = $this->moduleFactory ->createWidgetDataProviderCache(); @@ -2368,6 +2374,11 @@ protected function doGetResource( if ($dataModule->isDataProviderExpected()) { // We only ever return cache. $dataProvider = $dataModule->createDataProvider($widget); + $dataProvider->setDisplayProperties( + $this->display->latitude ?: $this->getConfig()->getSetting('DEFAULT_LAT'), + $this->display->longitude ?: $this->getConfig()->getSetting('DEFAULT_LONG'), + $this->display->displayId + ); // Use the cache if we can. try { diff --git a/lib/Xmds/Soap7.php b/lib/Xmds/Soap7.php index e469901542..5816045e83 100644 --- a/lib/Xmds/Soap7.php +++ b/lib/Xmds/Soap7.php @@ -128,6 +128,11 @@ public function GetData($serverKey, $hardwareKey, $widgetId) if ($dataModule->isDataProviderExpected()) { // We only ever return cache. $dataProvider = $module->createDataProvider($widget); + $dataProvider->setDisplayProperties( + $this->display->latitude ?: $this->getConfig()->getSetting('DEFAULT_LAT'), + $this->display->longitude ?: $this->getConfig()->getSetting('DEFAULT_LONG'), + $this->display->displayId + ); // We only __ever__ return cache from XMDS. try { diff --git a/locale/af.mo b/locale/af.mo index f5a5bd5e86..a638a5c0ba 100755 Binary files a/locale/af.mo and b/locale/af.mo differ diff --git a/locale/ar.mo b/locale/ar.mo index e9fb2d15fe..fc02ffb2ff 100755 Binary files a/locale/ar.mo and b/locale/ar.mo differ diff --git a/locale/bg.mo b/locale/bg.mo index 3327e187a5..60c388fdb6 100755 Binary files a/locale/bg.mo and b/locale/bg.mo differ diff --git a/locale/ca.mo b/locale/ca.mo index dac344072f..d0653921c0 100755 Binary files a/locale/ca.mo and b/locale/ca.mo differ diff --git a/locale/cs.mo b/locale/cs.mo index ca2c7ea73a..d39d0f190b 100755 Binary files a/locale/cs.mo and b/locale/cs.mo differ diff --git a/locale/da.mo b/locale/da.mo index cd04d597d5..3cc5f69ca0 100755 Binary files a/locale/da.mo and b/locale/da.mo differ diff --git a/locale/de.mo b/locale/de.mo index 91c0aded8f..8af5d52b05 100755 Binary files a/locale/de.mo and b/locale/de.mo differ diff --git a/locale/default.pot b/locale/default.pot index 66472803f5..96430ab31a 100755 --- a/locale/default.pot +++ b/locale/default.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-09 12:57+0100\n" +"POT-Creation-Date: 2024-06-05 17:18+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1726,7 +1726,7 @@ msgid "" msgstr "" #: locale/moduletranslate.php:490 -#: cache/e5/e5c3ab4b73473f74411baea5286e8687.php:130 +#: cache/e5/e5c3ab4b73473f74411baea5286e8687.php:122 #: cache/63/63cb0689ed9b3c5e21eb5af0b40e433a.php:101 #: cache/4a/4a2f889fbf2991697d3f56cba8939557.php:120 msgid "Cache Period" @@ -6723,7 +6723,7 @@ msgstr "" #: cache/10/10b7f3b85c460e6ccc00e28eed2bf591.php:647 #: cache/70/70af2bbd82243291558c9b83caec5b48.php:161 #: lib/Controller/Template.php:220 lib/Controller/DisplayGroup.php:347 -#: lib/Controller/Campaign.php:348 lib/Controller/MenuBoard.php:187 +#: lib/Controller/Campaign.php:348 lib/Controller/MenuBoard.php:170 #: lib/Controller/Playlist.php:408 lib/Controller/Library.php:665 #: lib/Controller/Layout.php:1785 lib/Controller/Display.php:942 msgid "Select Folder" @@ -7073,7 +7073,7 @@ msgstr "" #: lib/Controller/DisplayGroup.php:329 lib/Controller/DataSet.php:250 #: lib/Controller/ScheduleReport.php:216 lib/Controller/Notification.php:217 #: lib/Controller/Campaign.php:327 lib/Controller/Campaign.php:335 -#: lib/Controller/MenuBoard.php:179 lib/Controller/Playlist.php:393 +#: lib/Controller/MenuBoard.php:162 lib/Controller/Playlist.php:393 #: lib/Controller/Transition.php:94 lib/Controller/Library.php:650 #: lib/Controller/SyncGroup.php:170 lib/Controller/DataSetColumn.php:173 #: lib/Controller/Tag.php:230 lib/Controller/Layout.php:1777 @@ -7094,7 +7094,7 @@ msgstr "" #: cache/f9/f92fcbc3e5aadf70527c18c1877f9814.php:56 #: cache/88/880da8bf57750f4e35ce30624c0c6d79.php:170 #: cache/17/17a063cd6b023f6b3259fc5bb6f3383f.php:68 -#: cache/25/257d7652c0b04ca6e480ad5c9beaa3c2.php:242 +#: cache/25/257d7652c0b04ca6e480ad5c9beaa3c2.php:247 #: cache/74/746ec3a82f78da39c0d83b4d24c675b3.php:65 #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:725 #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:818 @@ -7111,7 +7111,7 @@ msgstr "" #: lib/Controller/ScheduleReport.php:242 lib/Controller/Notification.php:224 #: lib/Controller/Campaign.php:393 lib/Controller/Campaign.php:406 #: lib/Controller/SavedReport.php:177 lib/Controller/SavedReport.php:183 -#: lib/Controller/MenuBoard.php:240 lib/Controller/Playlist.php:458 +#: lib/Controller/MenuBoard.php:223 lib/Controller/Playlist.php:458 #: lib/Controller/Playlist.php:469 lib/Controller/Library.php:690 #: lib/Controller/Library.php:696 lib/Controller/SyncGroup.php:184 #: lib/Controller/DataSetColumn.php:181 lib/Controller/Tag.php:237 @@ -11122,36 +11122,26 @@ msgstr "" msgid "Your platform provider has configured this connector for you." msgstr "" -#: cache/e5/e5c3ab4b73473f74411baea5286e8687.php:82 +#: cache/e5/e5c3ab4b73473f74411baea5286e8687.php:92 msgid "Open Weather Map API Key" msgstr "" -#: cache/e5/e5c3ab4b73473f74411baea5286e8687.php:87 +#: cache/e5/e5c3ab4b73473f74411baea5286e8687.php:97 msgid "Enter your API Key from Open Weather Map." msgstr "" -#: cache/e5/e5c3ab4b73473f74411baea5286e8687.php:97 +#: cache/e5/e5c3ab4b73473f74411baea5286e8687.php:107 #: cache/63/63cb0689ed9b3c5e21eb5af0b40e433a.php:86 msgid "Paid plan?" msgstr "" -#: cache/e5/e5c3ab4b73473f74411baea5286e8687.php:102 +#: cache/e5/e5c3ab4b73473f74411baea5286e8687.php:112 msgid "" "Is the above key on an Open Weather Map paid plan? Do NOT tick this if you " "have subscribed to One Call API 3.0." msgstr "" -#: cache/e5/e5c3ab4b73473f74411baea5286e8687.php:112 -msgid "Open Weather Map Version" -msgstr "" - -#: cache/e5/e5c3ab4b73473f74411baea5286e8687.php:117 -msgid "" -"Which version of the Open Weather Map did you choose? If you created your " -"account recently it will be 3.0." -msgstr "" - -#: cache/e5/e5c3ab4b73473f74411baea5286e8687.php:135 +#: cache/e5/e5c3ab4b73473f74411baea5286e8687.php:127 #: cache/63/63cb0689ed9b3c5e21eb5af0b40e433a.php:106 msgid "" "This module uses 3rd party data. Please enter the number of seconds you " @@ -11174,6 +11164,23 @@ msgstr "" msgid "Menu Board Categories for" msgstr "" +#: cache/2d/2d67b2aac34d9a8cd68e4dad8db97260.php:230 +#: cache/09/09fa06e4cbb20e5f65e2075bff1da423.php:566 +#: cache/24/24c5ae3175cea2904ae6bd208e699f50.php:676 +#: cache/04/04b4b8b9bb93bf0580422332c142abff.php:306 +#: cache/25/257d7652c0b04ca6e480ad5c9beaa3c2.php:140 +#: cache/49/49b3c02c876e8a464a75e1682c064115.php:365 +#: cache/49/49b3c02c876e8a464a75e1682c064115.php:371 +#: cache/34/3453edc522f8d2c6d1d154ad55500693.php:334 +#: cache/cb/cbed339b261aade59b9d7cdbdfb46dcc.php:449 +#: cache/cb/cbed339b261aade59b9d7cdbdfb46dcc.php:606 +#: cache/10/10b7f3b85c460e6ccc00e28eed2bf591.php:336 +#: cache/10/10b7f3b85c460e6ccc00e28eed2bf591.php:475 +#: cache/8b/8bc5b04498de39f4571d14d541bd6a91.php:213 +#: cache/8b/8bc5b04498de39f4571d14d541bd6a91.php:323 +msgid "Thumbnail" +msgstr "" + #: cache/0f/0fbcc8521effd4baecae2fe49cee1b76.php:56 msgid "Edit Transition" msgstr "" @@ -11463,7 +11470,7 @@ msgstr "" #: cache/9f/9f9a142004ca4a1c914a4395fe586017.php:125 #: cache/a4/a4b5f52b1992bb349e8a30b19ff24645.php:80 -#: lib/Controller/Playlist.php:1703 lib/Controller/Library.php:2114 +#: lib/Controller/Playlist.php:1703 lib/Controller/Library.php:2128 #: lib/Controller/Layout.php:1657 msgid "Design" msgstr "" @@ -11994,19 +12001,6 @@ msgstr "" msgid "Screen shot?" msgstr "" -#: cache/09/09fa06e4cbb20e5f65e2075bff1da423.php:566 -#: cache/24/24c5ae3175cea2904ae6bd208e699f50.php:676 -#: cache/49/49b3c02c876e8a464a75e1682c064115.php:365 -#: cache/49/49b3c02c876e8a464a75e1682c064115.php:371 -#: cache/cb/cbed339b261aade59b9d7cdbdfb46dcc.php:449 -#: cache/cb/cbed339b261aade59b9d7cdbdfb46dcc.php:606 -#: cache/10/10b7f3b85c460e6ccc00e28eed2bf591.php:336 -#: cache/10/10b7f3b85c460e6ccc00e28eed2bf591.php:475 -#: cache/8b/8bc5b04498de39f4571d14d541bd6a91.php:213 -#: cache/8b/8bc5b04498de39f4571d14d541bd6a91.php:323 -msgid "Thumbnail" -msgstr "" - #: cache/09/09fa06e4cbb20e5f65e2075bff1da423.php:570 #: cache/24/24c5ae3175cea2904ae6bd208e699f50.php:680 msgid "CMS Transfer?" @@ -12654,7 +12648,7 @@ msgid "Add Product" msgstr "" #: cache/04/04b4b8b9bb93bf0580422332c142abff.php:86 -#: lib/Controller/MenuBoard.php:173 +#: lib/Controller/MenuBoard.php:156 msgid "View Categories" msgstr "" @@ -14151,17 +14145,17 @@ msgstr "" msgid "Spots" msgstr "" -#: cache/25/257d7652c0b04ca6e480ad5c9beaa3c2.php:230 +#: cache/25/257d7652c0b04ca6e480ad5c9beaa3c2.php:235 #: cache/1b/1b4d10b8bb67ce8b30ada153b15daf6e.php:196 msgid "Locked" msgstr "" -#: cache/25/257d7652c0b04ca6e480ad5c9beaa3c2.php:325 +#: cache/25/257d7652c0b04ca6e480ad5c9beaa3c2.php:330 #: cache/1b/1b4d10b8bb67ce8b30ada153b15daf6e.php:357 msgid "Add" msgstr "" -#: cache/25/257d7652c0b04ca6e480ad5c9beaa3c2.php:331 +#: cache/25/257d7652c0b04ca6e480ad5c9beaa3c2.php:336 #: lib/Controller/StatusDashboard.php:302 lib/Report/LibraryUsage.php:207 #: lib/Report/LibraryUsage.php:555 msgid "Empty" @@ -16172,7 +16166,7 @@ msgid "Are you sure you want to delete a non-empty Playlist?" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:2940 -#: lib/Connector/OpenWeatherMapConnector.php:507 +#: lib/Connector/OpenWeatherMapConnector.php:500 msgid "Afrikaans" msgstr "" @@ -16201,12 +16195,12 @@ msgid "Arabic (Tunisia)" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:2968 -#: lib/Connector/OpenWeatherMapConnector.php:508 +#: lib/Connector/OpenWeatherMapConnector.php:501 msgid "Arabic" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:2972 -#: lib/Connector/OpenWeatherMapConnector.php:509 +#: lib/Connector/OpenWeatherMapConnector.php:502 msgid "Azerbaijani" msgstr "" @@ -16215,7 +16209,7 @@ msgid "Belarusian" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:2980 -#: lib/Connector/OpenWeatherMapConnector.php:510 +#: lib/Connector/OpenWeatherMapConnector.php:503 msgid "Bulgarian" msgstr "" @@ -16244,12 +16238,12 @@ msgid "Bosnian" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3008 -#: lib/Connector/OpenWeatherMapConnector.php:511 +#: lib/Connector/OpenWeatherMapConnector.php:504 msgid "Catalan" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3012 -#: lib/Connector/OpenWeatherMapConnector.php:514 +#: lib/Connector/OpenWeatherMapConnector.php:507 msgid "Czech" msgstr "" @@ -16262,7 +16256,7 @@ msgid "Welsh" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3024 -#: lib/Connector/OpenWeatherMapConnector.php:515 +#: lib/Connector/OpenWeatherMapConnector.php:508 msgid "Danish" msgstr "" @@ -16275,7 +16269,7 @@ msgid "German (Switzerland)" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3036 -#: lib/Connector/OpenWeatherMapConnector.php:516 +#: lib/Connector/OpenWeatherMapConnector.php:509 msgid "German" msgstr "" @@ -16284,12 +16278,12 @@ msgid "Divehi" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3044 -#: lib/Connector/OpenWeatherMapConnector.php:517 +#: lib/Connector/OpenWeatherMapConnector.php:510 msgid "Greek" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3048 -#: lib/Connector/OpenWeatherMapConnector.php:518 +#: lib/Connector/OpenWeatherMapConnector.php:511 msgid "English" msgstr "" @@ -16343,7 +16337,7 @@ msgid "Spanish (United States)" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3104 -#: lib/Connector/OpenWeatherMapConnector.php:545 +#: lib/Connector/OpenWeatherMapConnector.php:538 msgid "Spanish" msgstr "" @@ -16352,7 +16346,7 @@ msgid "Estonian" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3112 -#: lib/Connector/OpenWeatherMapConnector.php:519 +#: lib/Connector/OpenWeatherMapConnector.php:512 msgid "Basque" msgstr "" @@ -16361,7 +16355,7 @@ msgid "Persian" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3120 -#: lib/Connector/OpenWeatherMapConnector.php:521 +#: lib/Connector/OpenWeatherMapConnector.php:514 msgid "Finnish" msgstr "" @@ -16382,7 +16376,7 @@ msgid "French (Switzerland)" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3140 -#: lib/Connector/OpenWeatherMapConnector.php:522 +#: lib/Connector/OpenWeatherMapConnector.php:515 msgid "French" msgstr "" @@ -16395,7 +16389,7 @@ msgid "Scottish Gaelic" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3152 -#: lib/Connector/OpenWeatherMapConnector.php:523 +#: lib/Connector/OpenWeatherMapConnector.php:516 msgid "Galician" msgstr "" @@ -16408,22 +16402,22 @@ msgid "Gujarati" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3164 -#: lib/Connector/OpenWeatherMapConnector.php:524 +#: lib/Connector/OpenWeatherMapConnector.php:517 msgid "Hebrew" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3168 -#: lib/Connector/OpenWeatherMapConnector.php:525 +#: lib/Connector/OpenWeatherMapConnector.php:518 msgid "Hindi" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3172 -#: lib/Connector/OpenWeatherMapConnector.php:526 +#: lib/Connector/OpenWeatherMapConnector.php:519 msgid "Croatian" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3176 -#: lib/Connector/OpenWeatherMapConnector.php:527 +#: lib/Connector/OpenWeatherMapConnector.php:520 msgid "Hungarian" msgstr "" @@ -16432,7 +16426,7 @@ msgid "Armenian (Armenia)" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3184 -#: lib/Connector/OpenWeatherMapConnector.php:528 +#: lib/Connector/OpenWeatherMapConnector.php:521 msgid "Indonesian" msgstr "" @@ -16445,12 +16439,12 @@ msgid "Italian (Switzerland)" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3196 -#: lib/Connector/OpenWeatherMapConnector.php:529 +#: lib/Connector/OpenWeatherMapConnector.php:522 msgid "Italian" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3200 -#: lib/Connector/OpenWeatherMapConnector.php:530 +#: lib/Connector/OpenWeatherMapConnector.php:523 msgid "Japanese" msgstr "" @@ -16475,7 +16469,7 @@ msgid "Kannada" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3224 -#: lib/Connector/OpenWeatherMapConnector.php:531 +#: lib/Connector/OpenWeatherMapConnector.php:524 msgid "Korean" msgstr "" @@ -16496,12 +16490,12 @@ msgid "Lao" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3244 -#: lib/Connector/OpenWeatherMapConnector.php:533 +#: lib/Connector/OpenWeatherMapConnector.php:526 msgid "Lithuanian" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3248 -#: lib/Connector/OpenWeatherMapConnector.php:532 +#: lib/Connector/OpenWeatherMapConnector.php:525 msgid "Latvian" msgstr "" @@ -16514,7 +16508,7 @@ msgid "Maori" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3260 -#: lib/Connector/OpenWeatherMapConnector.php:534 +#: lib/Connector/OpenWeatherMapConnector.php:527 msgid "Macedonian" msgstr "" @@ -16559,7 +16553,7 @@ msgid "Dutch (Belgium)" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3304 -#: lib/Connector/OpenWeatherMapConnector.php:536 +#: lib/Connector/OpenWeatherMapConnector.php:529 msgid "Dutch" msgstr "" @@ -16572,7 +16566,7 @@ msgid "Punjabi (India)" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3316 -#: lib/Connector/OpenWeatherMapConnector.php:537 +#: lib/Connector/OpenWeatherMapConnector.php:530 msgid "Polish" msgstr "" @@ -16581,17 +16575,17 @@ msgid "Portuguese (Brazil)" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3324 -#: lib/Connector/OpenWeatherMapConnector.php:538 +#: lib/Connector/OpenWeatherMapConnector.php:531 msgid "Portuguese" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3328 -#: lib/Connector/OpenWeatherMapConnector.php:540 +#: lib/Connector/OpenWeatherMapConnector.php:533 msgid "Romanian" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3332 -#: lib/Connector/OpenWeatherMapConnector.php:541 +#: lib/Connector/OpenWeatherMapConnector.php:534 msgid "Russian" msgstr "" @@ -16608,12 +16602,12 @@ msgid "Sinhala" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3348 -#: lib/Connector/OpenWeatherMapConnector.php:543 +#: lib/Connector/OpenWeatherMapConnector.php:536 msgid "Slovak" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3352 -#: lib/Connector/OpenWeatherMapConnector.php:544 +#: lib/Connector/OpenWeatherMapConnector.php:537 msgid "Slovenian" msgstr "" @@ -16626,7 +16620,7 @@ msgid "Serbian (Cyrillic)" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3364 -#: lib/Connector/OpenWeatherMapConnector.php:546 +#: lib/Connector/OpenWeatherMapConnector.php:539 msgid "Serbian" msgstr "" @@ -16635,7 +16629,7 @@ msgid "Swati" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3372 -#: lib/Connector/OpenWeatherMapConnector.php:542 +#: lib/Connector/OpenWeatherMapConnector.php:535 msgid "Swedish" msgstr "" @@ -16660,7 +16654,7 @@ msgid "Tajik" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3396 -#: lib/Connector/OpenWeatherMapConnector.php:547 +#: lib/Connector/OpenWeatherMapConnector.php:540 msgid "Thai" msgstr "" @@ -16677,7 +16671,7 @@ msgid "Klingon" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3412 -#: lib/Connector/OpenWeatherMapConnector.php:548 +#: lib/Connector/OpenWeatherMapConnector.php:541 msgid "Turkish" msgstr "" @@ -16698,7 +16692,7 @@ msgid "Uyghur (China)" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3432 -#: lib/Connector/OpenWeatherMapConnector.php:549 +#: lib/Connector/OpenWeatherMapConnector.php:542 msgid "Ukrainian" msgstr "" @@ -16715,7 +16709,7 @@ msgid "Uzbek" msgstr "" #: cache/74/744308e2456d1f83f205ef9ab9fe3022.php:3448 -#: lib/Connector/OpenWeatherMapConnector.php:550 +#: lib/Connector/OpenWeatherMapConnector.php:543 msgid "Vietnamese" msgstr "" @@ -18116,7 +18110,7 @@ msgid "" msgstr "" #: cache/c5/c52b8109558dd3acc604e183177113c8.php:342 -#: lib/Controller/Library.php:1353 +#: lib/Controller/Library.php:1356 msgid "Sorry, Fonts do not have any editable properties." msgstr "" @@ -19240,7 +19234,7 @@ msgstr "" #: lib/Controller/DisplayGroup.php:428 lib/Controller/DisplayGroup.php:441 #: lib/Controller/DataSet.php:302 lib/Controller/DataSet.php:308 #: lib/Controller/Campaign.php:422 lib/Controller/Campaign.php:428 -#: lib/Controller/MenuBoard.php:211 lib/Controller/MenuBoard.php:219 +#: lib/Controller/MenuBoard.php:194 lib/Controller/MenuBoard.php:202 #: lib/Controller/Playlist.php:489 lib/Controller/Playlist.php:501 #: lib/Controller/Library.php:711 lib/Controller/Library.php:717 #: lib/Controller/Layout.php:1890 lib/Controller/Layout.php:1896 @@ -20742,7 +20736,7 @@ msgstr "" #: lib/Controller/Task.php:215 lib/Controller/Widget.php:298 #: lib/Controller/Template.php:539 lib/Controller/DisplayGroup.php:796 #: lib/Controller/DisplayGroup.php:2664 lib/Controller/DataSet.php:618 -#: lib/Controller/Notification.php:576 lib/Controller/Campaign.php:649 +#: lib/Controller/Notification.php:579 lib/Controller/Campaign.php:649 #: lib/Controller/Campaign.php:1385 lib/Controller/Folder.php:255 #: lib/Controller/Playlist.php:788 lib/Controller/SyncGroup.php:291 #: lib/Controller/DataSetColumn.php:389 lib/Controller/Tag.php:359 @@ -20758,10 +20752,10 @@ msgstr "" #: lib/Controller/Task.php:284 lib/Controller/Widget.php:573 #: lib/Controller/DisplayGroup.php:1025 lib/Controller/DataSet.php:912 -#: lib/Controller/ScheduleReport.php:426 lib/Controller/Notification.php:706 -#: lib/Controller/Campaign.php:959 lib/Controller/MenuBoard.php:459 +#: lib/Controller/ScheduleReport.php:426 lib/Controller/Notification.php:709 +#: lib/Controller/Campaign.php:959 lib/Controller/MenuBoard.php:446 #: lib/Controller/Folder.php:323 lib/Controller/Playlist.php:979 -#: lib/Controller/Transition.php:158 lib/Controller/Library.php:1408 +#: lib/Controller/Transition.php:158 lib/Controller/Library.php:1411 #: lib/Controller/SyncGroup.php:557 lib/Controller/DataSetColumn.php:596 #: lib/Controller/Tag.php:544 lib/Controller/Connector.php:205 #: lib/Controller/Layout.php:667 lib/Controller/Layout.php:789 @@ -20780,9 +20774,9 @@ msgstr "" #: lib/Controller/Task.php:331 lib/Controller/Widget.php:692 #: lib/Controller/DisplayGroup.php:1081 lib/Controller/DataSet.php:1002 -#: lib/Controller/ScheduleReport.php:464 lib/Controller/Notification.php:765 +#: lib/Controller/ScheduleReport.php:464 lib/Controller/Notification.php:768 #: lib/Controller/Campaign.php:1038 lib/Controller/SavedReport.php:283 -#: lib/Controller/MenuBoard.php:536 lib/Controller/Folder.php:405 +#: lib/Controller/MenuBoard.php:523 lib/Controller/Folder.php:405 #: lib/Controller/Playlist.php:1060 lib/Controller/Library.php:1016 #: lib/Controller/SyncGroup.php:635 lib/Controller/DataSetColumn.php:685 #: lib/Controller/Tag.php:629 lib/Controller/Layout.php:1027 @@ -20820,13 +20814,13 @@ msgstr "" #: lib/Controller/Widget.php:191 lib/Controller/Widget.php:456 #: lib/Controller/Widget.php:665 lib/Controller/Widget.php:823 #: lib/Controller/Widget.php:988 lib/Controller/Widget.php:1077 -#: lib/Controller/Widget.php:1444 lib/Controller/Widget.php:1553 -#: lib/Controller/Widget.php:1635 lib/Controller/Playlist.php:1311 +#: lib/Controller/Widget.php:1447 lib/Controller/Widget.php:1556 +#: lib/Controller/Widget.php:1638 lib/Controller/Playlist.php:1311 #: lib/Controller/Playlist.php:1476 lib/Controller/Layout.php:741 #: lib/Controller/Layout.php:844 lib/Controller/Region.php:229 #: lib/Controller/Region.php:376 lib/Controller/Region.php:462 #: lib/Controller/Region.php:527 lib/Controller/Region.php:748 -#: lib/Controller/Region.php:846 lib/Helper/XiboUploadHandler.php:413 +#: lib/Controller/Region.php:846 lib/Helper/XiboUploadHandler.php:455 msgid "This Layout is not a Draft, please checkout." msgstr "" @@ -20857,9 +20851,9 @@ msgstr "" #: lib/Controller/Widget.php:321 lib/Controller/Widget.php:448 #: lib/Controller/Widget.php:720 lib/Controller/Widget.php:815 #: lib/Controller/Widget.php:884 lib/Controller/Widget.php:980 -#: lib/Controller/Widget.php:1069 lib/Controller/Widget.php:1350 -#: lib/Controller/Widget.php:1436 lib/Controller/Widget.php:1545 -#: lib/Controller/Widget.php:1627 +#: lib/Controller/Widget.php:1069 lib/Controller/Widget.php:1353 +#: lib/Controller/Widget.php:1439 lib/Controller/Widget.php:1548 +#: lib/Controller/Widget.php:1630 msgid "This Widget is not shared with you with edit permission" msgstr "" @@ -20962,41 +20956,41 @@ msgstr "" msgid "Problem rendering widget" msgstr "" -#: lib/Controller/Widget.php:1496 +#: lib/Controller/Widget.php:1499 msgid "Edited Expiry" msgstr "" -#: lib/Controller/Widget.php:1560 +#: lib/Controller/Widget.php:1563 msgid "You can only set a target region on a Widget in the drawer." msgstr "" -#: lib/Controller/Widget.php:1584 +#: lib/Controller/Widget.php:1587 msgid "Target region set" msgstr "" -#: lib/Controller/Widget.php:1658 +#: lib/Controller/Widget.php:1661 msgid "Invalid element JSON" msgstr "" -#: lib/Controller/Widget.php:1664 +#: lib/Controller/Widget.php:1667 msgid "" "At least one element is required for this Widget. Please delete it if you no " "longer need it." msgstr "" -#: lib/Controller/Widget.php:1722 +#: lib/Controller/Widget.php:1725 msgid "Saved elements" msgstr "" -#: lib/Controller/Widget.php:1747 +#: lib/Controller/Widget.php:1750 msgid "Please supply a propertyId" msgstr "" -#: lib/Controller/Widget.php:1801 +#: lib/Controller/Widget.php:1804 msgid "Please provide a widgetId" msgstr "" -#: lib/Controller/Widget.php:1820 +#: lib/Controller/Widget.php:1823 msgid "Widget does not have a data type" msgstr "" @@ -21005,7 +20999,7 @@ msgid "Alter Template" msgstr "" #: lib/Controller/Template.php:226 lib/Controller/DisplayGroup.php:360 -#: lib/Controller/Campaign.php:361 lib/Controller/MenuBoard.php:196 +#: lib/Controller/Campaign.php:361 lib/Controller/MenuBoard.php:179 #: lib/Controller/Playlist.php:419 lib/Controller/Library.php:675 #: lib/Controller/Layout.php:1791 lib/Controller/Display.php:956 msgid "Move to Folder" @@ -21185,34 +21179,34 @@ msgstr "" msgid "Copied %s as %s" msgstr "" -#: lib/Controller/DataSet.php:1288 +#: lib/Controller/DataSet.php:1291 msgid "Missing JSON Body" msgstr "" -#: lib/Controller/DataSet.php:1295 +#: lib/Controller/DataSet.php:1298 msgid "Malformed JSON body, rows and uniqueKeys are required" msgstr "" -#: lib/Controller/DataSet.php:1335 +#: lib/Controller/DataSet.php:1338 #, php-format msgid "Incorrect date provided %s, expected date format Y-m-d H:i:s " msgstr "" -#: lib/Controller/DataSet.php:1384 +#: lib/Controller/DataSet.php:1387 msgid "No data found in request body" msgstr "" -#: lib/Controller/DataSet.php:1388 +#: lib/Controller/DataSet.php:1391 #, php-format msgid "Imported JSON into %s" msgstr "" -#: lib/Controller/DataSet.php:1452 +#: lib/Controller/DataSet.php:1455 #, php-format msgid "Run Test-Request for %s" msgstr "" -#: lib/Controller/DataSet.php:1567 +#: lib/Controller/DataSet.php:1570 #, php-format msgid "Cache cleared for %s" msgstr "" @@ -21334,7 +21328,7 @@ msgstr "" msgid "Delete?" msgstr "" -#: lib/Controller/Notification.php:567 +#: lib/Controller/Notification.php:570 msgid "Problem moving uploaded file into the Attachment Folder" msgstr "" @@ -21446,11 +21440,11 @@ msgstr "" msgid "Saved Report Converted to Schema Version 2" msgstr "" -#: lib/Controller/MenuBoard.php:341 +#: lib/Controller/MenuBoard.php:328 msgid "Added Menu Board" msgstr "" -#: lib/Controller/MenuBoard.php:637 +#: lib/Controller/MenuBoard.php:624 #, php-format msgid "Menu Board %s moved to Folder %s" msgstr "" @@ -21460,7 +21454,7 @@ msgid "Please provide LayoutId" msgstr "" #: lib/Controller/Action.php:348 lib/Controller/Action.php:498 -#: lib/Controller/Action.php:562 lib/Controller/Layout.php:2960 +#: lib/Controller/Action.php:562 lib/Controller/Layout.php:2963 msgid "Layout is not checked out" msgstr "" @@ -21501,7 +21495,7 @@ msgstr "" msgid "Please provide an assetId" msgstr "" -#: lib/Controller/Fault.php:109 lib/Entity/Layout.php:1910 +#: lib/Controller/Fault.php:109 lib/Entity/Layout.php:1918 msgid "Can't create ZIP. Error Code: " msgstr "" @@ -21629,7 +21623,7 @@ msgid "" "tab to define" msgstr "" -#: lib/Controller/Playlist.php:1201 lib/Controller/Library.php:2265 +#: lib/Controller/Playlist.php:1201 lib/Controller/Library.php:2279 #: lib/Controller/Layout.php:2182 #, php-format msgid "Copied as %s" @@ -21669,7 +21663,7 @@ msgstr "" msgid "Specified Playlist item is not in use." msgstr "" -#: lib/Controller/Playlist.php:1713 lib/Controller/Library.php:2124 +#: lib/Controller/Playlist.php:1713 lib/Controller/Library.php:2138 #: lib/Controller/Layout.php:1703 msgid "Preview Layout" msgstr "" @@ -21733,97 +21727,97 @@ msgstr "" msgid "This library item is in use." msgstr "" -#: lib/Controller/Library.php:1174 lib/Controller/Library.php:1388 -#: lib/Controller/Library.php:2454 +#: lib/Controller/Library.php:1174 lib/Controller/Library.php:1391 +#: lib/Controller/Library.php:2468 msgid "Cannot set Expiry date in the past" msgstr "" -#: lib/Controller/Library.php:1429 lib/Controller/Library.php:1494 +#: lib/Controller/Library.php:1432 lib/Controller/Library.php:1497 #: lib/Controller/Maintenance.php:97 msgid "Sorry this function is disabled." msgstr "" -#: lib/Controller/Library.php:1526 lib/Controller/Maintenance.php:269 +#: lib/Controller/Library.php:1529 lib/Controller/Maintenance.php:269 msgid "Library Tidy Complete" msgstr "" -#: lib/Controller/Library.php:1609 +#: lib/Controller/Library.php:1612 msgid "Cannot download region specific module" msgstr "" -#: lib/Controller/Library.php:1746 +#: lib/Controller/Library.php:1760 msgid "Route is available through the API" msgstr "" -#: lib/Controller/Library.php:1815 lib/Controller/Layout.php:2247 +#: lib/Controller/Library.php:1829 lib/Controller/Layout.php:2247 msgid "No tags to assign" msgstr "" -#: lib/Controller/Library.php:1826 lib/Controller/Layout.php:2258 +#: lib/Controller/Library.php:1840 lib/Controller/Layout.php:2258 #, php-format msgid "Tagged %s" msgstr "" -#: lib/Controller/Library.php:1889 lib/Controller/Layout.php:2323 +#: lib/Controller/Library.php:1903 lib/Controller/Layout.php:2323 msgid "No tags to unassign" msgstr "" -#: lib/Controller/Library.php:1900 lib/Controller/Layout.php:2333 +#: lib/Controller/Library.php:1914 lib/Controller/Layout.php:2333 #, php-format msgid "Untagged %s" msgstr "" -#: lib/Controller/Library.php:2047 lib/Controller/Library.php:2131 +#: lib/Controller/Library.php:2061 lib/Controller/Library.php:2145 msgid "Specified Media item is not in use." msgstr "" -#: lib/Controller/Library.php:2338 lib/Middleware/Theme.php:143 +#: lib/Controller/Library.php:2352 lib/Middleware/Theme.php:143 #, php-format msgid "This form accepts files up to a maximum size of %s" msgstr "" -#: lib/Controller/Library.php:2462 +#: lib/Controller/Library.php:2476 msgid "Provided URL is invalid" msgstr "" -#: lib/Controller/Library.php:2498 +#: lib/Controller/Library.php:2512 #, php-format msgid "" "Invalid Module type or extension. Module type %s does not allow for %s " "extension" msgstr "" -#: lib/Controller/Library.php:2531 +#: lib/Controller/Library.php:2545 msgid "Download rejected for an unknown reason." msgstr "" -#: lib/Controller/Library.php:2535 +#: lib/Controller/Library.php:2549 #, php-format msgid "Download rejected due to %s" msgstr "" -#: lib/Controller/Library.php:2542 +#: lib/Controller/Library.php:2556 msgid "Media upload from URL was successful" msgstr "" -#: lib/Controller/Library.php:2587 +#: lib/Controller/Library.php:2601 msgid "Invalid image data" msgstr "" -#: lib/Controller/Library.php:2693 +#: lib/Controller/Library.php:2707 #, php-format msgid "Media %s moved to Folder %s" msgstr "" -#: lib/Controller/Library.php:2780 +#: lib/Controller/Library.php:2794 msgid "Not configured by any active connector." msgstr "" -#: lib/Controller/Library.php:2830 +#: lib/Controller/Library.php:2844 msgid "Download failed" msgstr "" -#: lib/Controller/Library.php:2839 +#: lib/Controller/Library.php:2853 msgid "Imported" msgstr "" @@ -21891,9 +21885,9 @@ msgstr "" #: lib/Controller/Layout.php:966 lib/Controller/Layout.php:1068 #: lib/Controller/Layout.php:1116 lib/Controller/Layout.php:1165 #: lib/Controller/Layout.php:1234 lib/Controller/Layout.php:1273 -#: lib/Controller/Layout.php:2686 lib/Controller/Layout.php:2737 -#: lib/Controller/Layout.php:2776 lib/Controller/Layout.php:2845 -#: lib/Controller/Layout.php:2905 lib/Controller/Layout.php:2955 +#: lib/Controller/Layout.php:2689 lib/Controller/Layout.php:2740 +#: lib/Controller/Layout.php:2779 lib/Controller/Layout.php:2848 +#: lib/Controller/Layout.php:2908 lib/Controller/Layout.php:2958 msgid "You do not have permissions to edit this layout" msgstr "" @@ -21989,62 +21983,62 @@ msgstr "" msgid "Cannot export Draft Layout" msgstr "" -#: lib/Controller/Layout.php:2615 +#: lib/Controller/Layout.php:2618 msgid "Layout background must be an image" msgstr "" -#: lib/Controller/Layout.php:2742 +#: lib/Controller/Layout.php:2745 msgid "Layout is already checked out" msgstr "" -#: lib/Controller/Layout.php:2751 +#: lib/Controller/Layout.php:2754 #, php-format msgid "Checked out %s" msgstr "" -#: lib/Controller/Layout.php:2867 +#: lib/Controller/Layout.php:2870 #, php-format msgid "Published %s" msgstr "" -#: lib/Controller/Layout.php:2874 +#: lib/Controller/Layout.php:2877 #, php-format msgid "Layout will be published on %s" msgstr "" -#: lib/Controller/Layout.php:2972 +#: lib/Controller/Layout.php:2975 #, php-format msgid "Discarded %s" msgstr "" -#: lib/Controller/Layout.php:3023 +#: lib/Controller/Layout.php:3026 msgid "" "This function is available only to User who originally locked this Layout." msgstr "" -#: lib/Controller/Layout.php:3112 lib/Entity/Layout.php:2249 +#: lib/Controller/Layout.php:3115 lib/Entity/Layout.php:2257 msgid "Empty Region" msgstr "" -#: lib/Controller/Layout.php:3216 +#: lib/Controller/Layout.php:3219 msgid "Incorrect image data" msgstr "" -#: lib/Controller/Layout.php:3241 +#: lib/Controller/Layout.php:3244 msgid "Thumbnail not found for Layout" msgstr "" -#: lib/Controller/Layout.php:3333 +#: lib/Controller/Layout.php:3336 #, php-format msgid "Please select %s" msgstr "" -#: lib/Controller/Layout.php:3351 +#: lib/Controller/Layout.php:3354 #, php-format msgid "Fetched %s" msgstr "" -#: lib/Controller/Layout.php:3474 +#: lib/Controller/Layout.php:3477 #, php-format msgid "Created %s" msgstr "" @@ -22170,13 +22164,13 @@ msgid "Authentication code incorrect" msgstr "" #: lib/Controller/Font.php:421 lib/Controller/PlayerSoftware.php:630 -#: lib/Helper/XiboUploadHandler.php:398 +#: lib/Helper/XiboUploadHandler.php:440 msgid "" "Sorry this is a corrupted upload, the file size doesn't match what we're " "expecting." msgstr "" -#: lib/Controller/Font.php:579 +#: lib/Controller/Font.php:582 msgid "Unable to write to the library" msgstr "" @@ -22504,77 +22498,77 @@ msgstr "" msgid "%s assigned to Display Groups" msgstr "" -#: lib/Controller/Display.php:2247 +#: lib/Controller/Display.php:2250 msgid "once it has connected for the first time" msgstr "" -#: lib/Controller/Display.php:2314 lib/Controller/Display.php:3029 -#: lib/Controller/Display.php:3153 +#: lib/Controller/Display.php:2317 lib/Controller/Display.php:3032 +#: lib/Controller/Display.php:3156 #, php-format msgid "Request sent for %s" msgstr "" -#: lib/Controller/Display.php:2342 lib/Controller/Display.php:2394 +#: lib/Controller/Display.php:2345 lib/Controller/Display.php:2397 msgid "" "This display has no mac address recorded against it yet. Make sure the " "display is running." msgstr "" -#: lib/Controller/Display.php:2417 +#: lib/Controller/Display.php:2420 #, php-format msgid "Wake on Lan sent for %s" msgstr "" -#: lib/Controller/Display.php:2526 +#: lib/Controller/Display.php:2529 #, php-format msgid "Alert for Display %s" msgstr "" -#: lib/Controller/Display.php:2528 +#: lib/Controller/Display.php:2531 #, php-format msgid "Display ID %d is offline since %s." msgstr "" -#: lib/Controller/Display.php:2627 +#: lib/Controller/Display.php:2630 #, php-format msgid "Authorised set to %d for %s" msgstr "" -#: lib/Controller/Display.php:2728 +#: lib/Controller/Display.php:2731 #, php-format msgid "Default Layout with name %s set for %s" msgstr "" -#: lib/Controller/Display.php:2814 +#: lib/Controller/Display.php:2817 msgid "Provided CMS URL is invalid" msgstr "" -#: lib/Controller/Display.php:2818 +#: lib/Controller/Display.php:2821 msgid "New CMS URL can have maximum of 1000 characters" msgstr "" -#: lib/Controller/Display.php:2822 +#: lib/Controller/Display.php:2825 msgid "Provided CMS Key is invalid" msgstr "" -#: lib/Controller/Display.php:2830 +#: lib/Controller/Display.php:2833 msgid "Invalid Two Factor Authentication Code" msgstr "" -#: lib/Controller/Display.php:2880 +#: lib/Controller/Display.php:2883 #, php-format msgid "Cancelled CMS Transfer for %s" msgstr "" -#: lib/Controller/Display.php:2918 +#: lib/Controller/Display.php:2921 msgid "Code cannot be empty" msgstr "" -#: lib/Controller/Display.php:2946 +#: lib/Controller/Display.php:2949 msgid "Provided user_code does not exist" msgstr "" -#: lib/Controller/Display.php:3022 lib/Controller/Display.php:3146 +#: lib/Controller/Display.php:3025 lib/Controller/Display.php:3149 msgid "XMR is not configured for this Display" msgstr "" @@ -23212,36 +23206,36 @@ msgid "" "edge. Please check the allowed Resize Limit in Administration -> Settings" msgstr "" -#: lib/Entity/Layout.php:1827 +#: lib/Entity/Layout.php:1835 #, php-format msgid "%s is pending conversion" msgstr "" -#: lib/Entity/Layout.php:1832 +#: lib/Entity/Layout.php:1840 #, php-format msgid "" "%s is too large. Please ensure that none of the images in your layout are " "larger than your Resize Limit on their longest edge." msgstr "" -#: lib/Entity/Layout.php:1844 +#: lib/Entity/Layout.php:1852 msgid "Misconfigured Playlist" msgstr "" -#: lib/Entity/Layout.php:2238 +#: lib/Entity/Layout.php:2246 #, php-format msgid "There is an error with this Layout: %s" msgstr "" -#: lib/Entity/Layout.php:2317 lib/Entity/Layout.php:2446 +#: lib/Entity/Layout.php:2325 lib/Entity/Layout.php:2454 msgid "Not a Draft" msgstr "" -#: lib/Entity/Layout.php:2532 +#: lib/Entity/Layout.php:2540 msgid "Draft Layouts must have a parent" msgstr "" -#: lib/Entity/Layout.php:2667 lib/Listener/WidgetListener.php:199 +#: lib/Entity/Layout.php:2675 lib/Listener/WidgetListener.php:199 msgid "Cannot add the same SubPlaylist twice." msgstr "" @@ -23956,42 +23950,42 @@ msgstr "" msgid "Cannot find media" msgstr "" -#: lib/Factory/ModuleFactory.php:381 +#: lib/Factory/ModuleFactory.php:392 #, php-format msgid "Extension %s does not match any enabled Module" msgstr "" -#: lib/Factory/ModuleFactory.php:433 +#: lib/Factory/ModuleFactory.php:444 msgid "DataType not found" msgstr "" -#: lib/Factory/ModuleFactory.php:452 lib/Factory/ModuleFactory.php:471 -#: lib/Factory/ModuleFactory.php:545 lib/Factory/ModuleTemplateFactory.php:120 +#: lib/Factory/ModuleFactory.php:463 lib/Factory/ModuleFactory.php:482 +#: lib/Factory/ModuleFactory.php:556 lib/Factory/ModuleTemplateFactory.php:120 #: lib/Factory/ModuleTemplateFactory.php:138 msgid "Asset not found" msgstr "" -#: lib/Factory/ModuleFactory.php:730 +#: lib/Factory/ModuleFactory.php:741 msgid "Invalid legacyType" msgstr "" -#: lib/Factory/ModuleFactory.php:749 lib/Factory/ModuleTemplateFactory.php:295 +#: lib/Factory/ModuleFactory.php:760 lib/Factory/ModuleTemplateFactory.php:295 msgid "Invalid assets" msgstr "" -#: lib/Factory/ModuleFactory.php:765 +#: lib/Factory/ModuleFactory.php:776 msgid "Invalid settings" msgstr "" -#: lib/Factory/ModuleFactory.php:809 lib/Factory/ModuleTemplateFactory.php:268 +#: lib/Factory/ModuleFactory.php:820 lib/Factory/ModuleTemplateFactory.php:268 msgid "Invalid properties" msgstr "" -#: lib/Factory/ModuleFactory.php:817 lib/Factory/ModuleTemplateFactory.php:277 +#: lib/Factory/ModuleFactory.php:828 lib/Factory/ModuleTemplateFactory.php:277 msgid "Invalid property groups" msgstr "" -#: lib/Factory/ModuleFactory.php:833 lib/Factory/ModuleTemplateFactory.php:286 +#: lib/Factory/ModuleFactory.php:844 lib/Factory/ModuleTemplateFactory.php:286 msgid "Invalid stencils" msgstr "" @@ -24023,7 +24017,7 @@ msgstr "" msgid "Campaign not found" msgstr "" -#: lib/Factory/MenuBoardFactory.php:132 lib/Factory/MenuBoardFactory.php:160 +#: lib/Factory/MenuBoardFactory.php:133 lib/Factory/MenuBoardFactory.php:161 msgid "Menu Board not found" msgstr "" @@ -24617,7 +24611,12 @@ msgstr "" msgid "The iCal provided is not valid, please choose a valid feed" msgstr "" -#: lib/Widget/Render/WidgetDownloader.php:277 +#: lib/Widget/Render/WidgetDownloader.php:189 +#: lib/Widget/Render/WidgetDownloader.php:241 +msgid "Image too large" +msgstr "" + +#: lib/Widget/Render/WidgetDownloader.php:288 msgid "Cannot parse image." msgstr "" @@ -24776,17 +24775,17 @@ msgid "" "Layout code." msgstr "" -#: lib/Xmds/Soap.php:2604 +#: lib/Xmds/Soap.php:2615 #, php-format msgid "Recovery for Display %s" msgstr "" -#: lib/Xmds/Soap.php:2605 +#: lib/Xmds/Soap.php:2616 #, php-format msgid "Display ID %d is now back online %s" msgstr "" -#: lib/Xmds/Soap.php:2676 +#: lib/Xmds/Soap.php:2687 msgid "Bandwidth allowance exceeded" msgstr "" @@ -24987,7 +24986,7 @@ msgstr "" msgid "Access denied replacing old media" msgstr "" -#: lib/Helper/XiboUploadHandler.php:114 lib/Helper/XiboUploadHandler.php:224 +#: lib/Helper/XiboUploadHandler.php:114 lib/Helper/XiboUploadHandler.php:266 msgid "You cannot replace this media with an item of a different type" msgstr "" @@ -25164,31 +25163,31 @@ msgstr "" msgid "Currency data invalid" msgstr "" -#: lib/Connector/OpenWeatherMapConnector.php:129 +#: lib/Connector/OpenWeatherMapConnector.php:128 msgid "Unable to get weather results." msgstr "" -#: lib/Connector/OpenWeatherMapConnector.php:512 +#: lib/Connector/OpenWeatherMapConnector.php:505 msgid "Chinese Simplified" msgstr "" -#: lib/Connector/OpenWeatherMapConnector.php:513 +#: lib/Connector/OpenWeatherMapConnector.php:506 msgid "Chinese Traditional" msgstr "" -#: lib/Connector/OpenWeatherMapConnector.php:520 +#: lib/Connector/OpenWeatherMapConnector.php:513 msgid "Persian (Farsi)" msgstr "" -#: lib/Connector/OpenWeatherMapConnector.php:535 +#: lib/Connector/OpenWeatherMapConnector.php:528 msgid "Norwegian" msgstr "" -#: lib/Connector/OpenWeatherMapConnector.php:539 +#: lib/Connector/OpenWeatherMapConnector.php:532 msgid "Português Brasil" msgstr "" -#: lib/Connector/OpenWeatherMapConnector.php:551 +#: lib/Connector/OpenWeatherMapConnector.php:544 msgid "Zulu" msgstr "" diff --git a/locale/el.mo b/locale/el.mo index 873d91c834..e537158536 100755 Binary files a/locale/el.mo and b/locale/el.mo differ diff --git a/locale/en_GB.mo b/locale/en_GB.mo index 6530aa17db..1d122a14a5 100755 Binary files a/locale/en_GB.mo and b/locale/en_GB.mo differ diff --git a/locale/es.mo b/locale/es.mo index bd0dfdedf6..aefc068e2d 100755 Binary files a/locale/es.mo and b/locale/es.mo differ diff --git a/locale/et.mo b/locale/et.mo index f27d4fd168..5785ec7c2d 100755 Binary files a/locale/et.mo and b/locale/et.mo differ diff --git a/locale/eu.mo b/locale/eu.mo index 97fbb8c865..d9b26f76d4 100755 Binary files a/locale/eu.mo and b/locale/eu.mo differ diff --git a/locale/fa.mo b/locale/fa.mo index a69ff8b2db..eb342cebf4 100755 Binary files a/locale/fa.mo and b/locale/fa.mo differ diff --git a/locale/fi.mo b/locale/fi.mo index 9d706c88e5..21f59c56c1 100755 Binary files a/locale/fi.mo and b/locale/fi.mo differ diff --git a/locale/fr.mo b/locale/fr.mo index 5966304a84..43c6a08032 100755 Binary files a/locale/fr.mo and b/locale/fr.mo differ diff --git a/locale/fr_CA.mo b/locale/fr_CA.mo index ee66da1294..8cd9c6e7aa 100644 Binary files a/locale/fr_CA.mo and b/locale/fr_CA.mo differ diff --git a/locale/he.mo b/locale/he.mo index 433c676636..7c6c4fa669 100755 Binary files a/locale/he.mo and b/locale/he.mo differ diff --git a/locale/hi.mo b/locale/hi.mo index a6bc9b6964..12e508ddb1 100755 Binary files a/locale/hi.mo and b/locale/hi.mo differ diff --git a/locale/hr.mo b/locale/hr.mo index 1af3bcd7c4..8f99b3eab8 100755 Binary files a/locale/hr.mo and b/locale/hr.mo differ diff --git a/locale/hu.mo b/locale/hu.mo index dcb7358308..009cd78681 100755 Binary files a/locale/hu.mo and b/locale/hu.mo differ diff --git a/locale/id.mo b/locale/id.mo index c5eba0dbe7..a4502a2472 100755 Binary files a/locale/id.mo and b/locale/id.mo differ diff --git a/locale/it.mo b/locale/it.mo index 5800b4f6ae..acfe0b18a3 100755 Binary files a/locale/it.mo and b/locale/it.mo differ diff --git a/locale/ja.mo b/locale/ja.mo index 57c5684de4..9ad04dc79a 100755 Binary files a/locale/ja.mo and b/locale/ja.mo differ diff --git a/locale/ko.mo b/locale/ko.mo index 541e2d1841..dd7d3ee54a 100755 Binary files a/locale/ko.mo and b/locale/ko.mo differ diff --git a/locale/ku.mo b/locale/ku.mo index 67b2b68f29..f17fd15081 100755 Binary files a/locale/ku.mo and b/locale/ku.mo differ diff --git a/locale/lb.mo b/locale/lb.mo index bed5f42b74..199a61035e 100755 Binary files a/locale/lb.mo and b/locale/lb.mo differ diff --git a/locale/lo.mo b/locale/lo.mo index 9ed52dd110..2549e95523 100755 Binary files a/locale/lo.mo and b/locale/lo.mo differ diff --git a/locale/lt.mo b/locale/lt.mo index 6a1b6e7fae..9956a3b7e0 100755 Binary files a/locale/lt.mo and b/locale/lt.mo differ diff --git a/locale/nb.mo b/locale/nb.mo index 3c34ae6ec2..938d74b91c 100755 Binary files a/locale/nb.mo and b/locale/nb.mo differ diff --git a/locale/nl.mo b/locale/nl.mo index 89bcdd3d65..33c474b083 100755 Binary files a/locale/nl.mo and b/locale/nl.mo differ diff --git a/locale/nl_NL.mo b/locale/nl_NL.mo index 6e62ea3007..833bd408ab 100755 Binary files a/locale/nl_NL.mo and b/locale/nl_NL.mo differ diff --git a/locale/pl.mo b/locale/pl.mo index 3b6b3cbae5..c46ba557e1 100755 Binary files a/locale/pl.mo and b/locale/pl.mo differ diff --git a/locale/pt.mo b/locale/pt.mo index 367609f21d..c3a46b74fe 100755 Binary files a/locale/pt.mo and b/locale/pt.mo differ diff --git a/locale/pt_BR.mo b/locale/pt_BR.mo index 44b6fa822c..5b280d1f5f 100755 Binary files a/locale/pt_BR.mo and b/locale/pt_BR.mo differ diff --git a/locale/ro.mo b/locale/ro.mo index 0a4bf2b534..bc72b480de 100755 Binary files a/locale/ro.mo and b/locale/ro.mo differ diff --git a/locale/ru.mo b/locale/ru.mo index 3f5e1c8508..c13876d654 100755 Binary files a/locale/ru.mo and b/locale/ru.mo differ diff --git a/locale/sk.mo b/locale/sk.mo index 75e77e162d..83a600e3b8 100755 Binary files a/locale/sk.mo and b/locale/sk.mo differ diff --git a/locale/sl.mo b/locale/sl.mo index 5a5015a975..dc6c24c22d 100755 Binary files a/locale/sl.mo and b/locale/sl.mo differ diff --git a/locale/sr@latin.mo b/locale/sr@latin.mo index 30c8ac90ef..3a599aa201 100755 Binary files a/locale/sr@latin.mo and b/locale/sr@latin.mo differ diff --git a/locale/sv.mo b/locale/sv.mo index 4bd0dc2bb2..eac274a1d7 100755 Binary files a/locale/sv.mo and b/locale/sv.mo differ diff --git a/locale/th.mo b/locale/th.mo index f64b1514e9..144f271bf7 100755 Binary files a/locale/th.mo and b/locale/th.mo differ diff --git a/locale/tr.mo b/locale/tr.mo index 1ba0b9a723..a014c3099c 100755 Binary files a/locale/tr.mo and b/locale/tr.mo differ diff --git a/locale/vi.mo b/locale/vi.mo index c8638e13fc..2cfaf27bd7 100755 Binary files a/locale/vi.mo and b/locale/vi.mo differ diff --git a/locale/zh_CN.mo b/locale/zh_CN.mo index a731f1a78f..d2706b08b8 100755 Binary files a/locale/zh_CN.mo and b/locale/zh_CN.mo differ diff --git a/locale/zh_TW.mo b/locale/zh_TW.mo index a1fd5a414a..1e22ef383f 100755 Binary files a/locale/zh_TW.mo and b/locale/zh_TW.mo differ diff --git a/modules/assets/forecastio/elements/3d_icons/3d-cloudy.png b/modules/assets/forecastio/elements/3d_icons/3d-cloudy.png new file mode 100644 index 0000000000..8155c5551b Binary files /dev/null and b/modules/assets/forecastio/elements/3d_icons/3d-cloudy.png differ diff --git a/modules/assets/forecastio/elements/3d_icons/3d-day-sunny.png b/modules/assets/forecastio/elements/3d_icons/3d-day-sunny.png new file mode 100644 index 0000000000..7a96152ddd Binary files /dev/null and b/modules/assets/forecastio/elements/3d_icons/3d-day-sunny.png differ diff --git a/modules/assets/forecastio/elements/3d_icons/3d-fog.png b/modules/assets/forecastio/elements/3d_icons/3d-fog.png new file mode 100644 index 0000000000..1e6b81203c Binary files /dev/null and b/modules/assets/forecastio/elements/3d_icons/3d-fog.png differ diff --git a/modules/assets/forecastio/elements/3d_icons/3d-hail.png b/modules/assets/forecastio/elements/3d_icons/3d-hail.png new file mode 100644 index 0000000000..e743fd2578 Binary files /dev/null and b/modules/assets/forecastio/elements/3d_icons/3d-hail.png differ diff --git a/modules/assets/forecastio/elements/3d_icons/3d-night-clear.png b/modules/assets/forecastio/elements/3d_icons/3d-night-clear.png new file mode 100644 index 0000000000..252c2ced36 Binary files /dev/null and b/modules/assets/forecastio/elements/3d_icons/3d-night-clear.png differ diff --git a/modules/assets/forecastio/elements/3d_icons/3d-night-partly-cloudy.png b/modules/assets/forecastio/elements/3d_icons/3d-night-partly-cloudy.png new file mode 100644 index 0000000000..927892ccf3 Binary files /dev/null and b/modules/assets/forecastio/elements/3d_icons/3d-night-partly-cloudy.png differ diff --git a/modules/assets/forecastio/elements/3d_icons/3d-rain.png b/modules/assets/forecastio/elements/3d_icons/3d-rain.png new file mode 100644 index 0000000000..ae6c461b11 Binary files /dev/null and b/modules/assets/forecastio/elements/3d_icons/3d-rain.png differ diff --git a/modules/assets/forecastio/elements/3d_icons/3d-snow.png b/modules/assets/forecastio/elements/3d_icons/3d-snow.png new file mode 100644 index 0000000000..f2d9a24192 Binary files /dev/null and b/modules/assets/forecastio/elements/3d_icons/3d-snow.png differ diff --git a/modules/assets/forecastio/elements/3d_icons/3d-windy.png b/modules/assets/forecastio/elements/3d_icons/3d-windy.png new file mode 100644 index 0000000000..a811de2029 Binary files /dev/null and b/modules/assets/forecastio/elements/3d_icons/3d-windy.png differ diff --git a/modules/assets/forecastio/elements/icon_humidity.png b/modules/assets/forecastio/elements/icon_humidity.png new file mode 100644 index 0000000000..fa5853ac82 Binary files /dev/null and b/modules/assets/forecastio/elements/icon_humidity.png differ diff --git a/modules/assets/forecastio/elements/icon_weather.png b/modules/assets/forecastio/elements/icon_weather.png new file mode 100644 index 0000000000..e80816fd9e Binary files /dev/null and b/modules/assets/forecastio/elements/icon_weather.png differ diff --git a/modules/assets/forecastio/elements/icon_wind.png b/modules/assets/forecastio/elements/icon_wind.png new file mode 100644 index 0000000000..9a4218f66c Binary files /dev/null and b/modules/assets/forecastio/elements/icon_wind.png differ diff --git a/modules/assets/forecastio/elements/vector_backgrounds/vector-cloudy.png b/modules/assets/forecastio/elements/vector_backgrounds/vector-cloudy.png new file mode 100644 index 0000000000..67759edc4c Binary files /dev/null and b/modules/assets/forecastio/elements/vector_backgrounds/vector-cloudy.png differ diff --git a/modules/assets/forecastio/elements/vector_backgrounds/vector-day-sunny.png b/modules/assets/forecastio/elements/vector_backgrounds/vector-day-sunny.png new file mode 100644 index 0000000000..68a2c52bb3 Binary files /dev/null and b/modules/assets/forecastio/elements/vector_backgrounds/vector-day-sunny.png differ diff --git a/modules/assets/forecastio/elements/vector_backgrounds/vector-fog.png b/modules/assets/forecastio/elements/vector_backgrounds/vector-fog.png new file mode 100644 index 0000000000..87c86a78ba Binary files /dev/null and b/modules/assets/forecastio/elements/vector_backgrounds/vector-fog.png differ diff --git a/modules/assets/forecastio/elements/vector_backgrounds/vector-hail.png b/modules/assets/forecastio/elements/vector_backgrounds/vector-hail.png new file mode 100644 index 0000000000..0b7725956c Binary files /dev/null and b/modules/assets/forecastio/elements/vector_backgrounds/vector-hail.png differ diff --git a/modules/assets/forecastio/elements/vector_backgrounds/vector-night-clear.png b/modules/assets/forecastio/elements/vector_backgrounds/vector-night-clear.png new file mode 100644 index 0000000000..534f8534ed Binary files /dev/null and b/modules/assets/forecastio/elements/vector_backgrounds/vector-night-clear.png differ diff --git a/modules/assets/forecastio/elements/vector_backgrounds/vector-night-partly-cloudy.png b/modules/assets/forecastio/elements/vector_backgrounds/vector-night-partly-cloudy.png new file mode 100644 index 0000000000..b9781821ad Binary files /dev/null and b/modules/assets/forecastio/elements/vector_backgrounds/vector-night-partly-cloudy.png differ diff --git a/modules/assets/forecastio/elements/vector_backgrounds/vector-rain.png b/modules/assets/forecastio/elements/vector_backgrounds/vector-rain.png new file mode 100644 index 0000000000..38da6276f3 Binary files /dev/null and b/modules/assets/forecastio/elements/vector_backgrounds/vector-rain.png differ diff --git a/modules/assets/forecastio/elements/vector_backgrounds/vector-snow.png b/modules/assets/forecastio/elements/vector_backgrounds/vector-snow.png new file mode 100644 index 0000000000..19e70b55b6 Binary files /dev/null and b/modules/assets/forecastio/elements/vector_backgrounds/vector-snow.png differ diff --git a/modules/assets/forecastio/elements/vector_backgrounds/windy.png b/modules/assets/forecastio/elements/vector_backgrounds/windy.png new file mode 100644 index 0000000000..37cd4ea67c Binary files /dev/null and b/modules/assets/forecastio/elements/vector_backgrounds/windy.png differ diff --git a/modules/assets/template-thumbnails/forecast/elements/forecast-current-1.png b/modules/assets/template-thumbnails/forecast/elements/forecast-current-1.png new file mode 100644 index 0000000000..6f6c8537dc Binary files /dev/null and b/modules/assets/template-thumbnails/forecast/elements/forecast-current-1.png differ diff --git a/modules/assets/template-thumbnails/forecast/elements/forecast-current-2.png b/modules/assets/template-thumbnails/forecast/elements/forecast-current-2.png new file mode 100644 index 0000000000..855c09b711 Binary files /dev/null and b/modules/assets/template-thumbnails/forecast/elements/forecast-current-2.png differ diff --git a/modules/assets/template-thumbnails/forecast/elements/forecast-current-3.png b/modules/assets/template-thumbnails/forecast/elements/forecast-current-3.png new file mode 100644 index 0000000000..834d3a35a5 Binary files /dev/null and b/modules/assets/template-thumbnails/forecast/elements/forecast-current-3.png differ diff --git a/modules/assets/template-thumbnails/forecast/elements/forecast-current-4.png b/modules/assets/template-thumbnails/forecast/elements/forecast-current-4.png new file mode 100644 index 0000000000..9d76194187 Binary files /dev/null and b/modules/assets/template-thumbnails/forecast/elements/forecast-current-4.png differ diff --git a/modules/clock-analogue.xml b/modules/clock-analogue.xml index 29299cd4ff..633a4bb6ee 100644 --- a/modules/clock-analogue.xml +++ b/modules/clock-analogue.xml @@ -103,7 +103,6 @@ h1, h2, h3, h4, p { } .hero-circle { - margin: 0 auto; position: relative; } @@ -209,14 +208,34 @@ if (typeof updateClock === 'function') { var width = $(window).width(); var height = $(window).height(); +// Set content size as the same as window +$(target).find('#content').width(width); +$(target).find('#content').height(height); + // Clock size // Shrink by 2px to get a bit of space to the side. var size = Math.min(width, height) - 2; -$(target).find('.hero-circle').css({ +// Set dimensions +var $clock = $(target).find('.hero-circle'); +$clock.css({ width: size + "px", height: size + "px" }); + +// Horizontal alignment +if (properties.alignmentH === 'right') { + $clock.css('left', width - $clock.width()); +} else if (properties.alignmentH === 'center') { + $clock.css('left', (width / 2) - $clock.width() / 2); +} + +// Vertical alignment +if (properties.alignmentV === 'bottom') { + $clock.css('top', height - $clock.height()); +} else if (properties.alignmentV === 'middle') { + $clock.css('top', (height / 2) - $clock.height() / 2); +} ]]> diff --git a/modules/src/xibo-player.js b/modules/src/xibo-player.js index 1b31e21da1..0ce812238f 100644 --- a/modules/src/xibo-player.js +++ b/modules/src/xibo-player.js @@ -159,6 +159,7 @@ const XiboPlayer = function() { // Compose data elements slots currentWidget.maxSlot = maxSlot; currentWidget.elements = transformedElems; + currentWidget.metaElements = this.composeMetaElements(transformedElems); currentWidget.dataElements = this.initSlots(transformedElems, minSlot, maxSlot); currentWidget.pinnedSlots = @@ -275,6 +276,28 @@ const XiboPlayer = function() { }, {}); }; + /** + * Compose elements that has data from meta + * @param {Object} transformedElems Elements collection + * @return {Object} metaElements + * */ + this.composeMetaElements = function(transformedElems) { + let metaElements = {}; + + if (Object.entries(transformedElems).length > 0) { + metaElements = Object.keys(transformedElems).reduce((a, b) => { + const metaItem = transformedElems[b]; + if (metaItem.dataInMeta) { + a[b] = metaItem; + } + + return a; + }, {}); + } + + return metaElements; + }; + /** * Initialize slots * @param {Object} collection Data elements @@ -302,8 +325,12 @@ const XiboPlayer = function() { if (Object.values(dataSlots).length > 0 && Object.values(collection).length > 0 ) { - Object.keys(collection).forEach(function(itemKey) { - const currentItem = collection[itemKey]; + for (const [itemKey, currentItem] of Object.entries(collection)) { + // Skip item if dataInMeta = true + if (currentItem.dataInMeta) { + continue; + } + const currentSlot = currentItem.slot + 1; if (Boolean(dataSlots[currentSlot])) { dataSlots[currentSlot].items[itemKey] = currentItem; @@ -315,7 +342,7 @@ const XiboPlayer = function() { dataSlots[currentSlot].pinnedItems = PlayerHelper.getPinnedItems(dataSlots[currentSlot].items); } - }); + } } return dataSlots; @@ -1155,87 +1182,61 @@ XiboPlayer.prototype.renderDataElements = function(currentWidget) { } } - $slotItemContent.css({ - width: slotObjItem.width, - height: slotObjItem.height, - position: 'absolute', - top: slotObjItem.top, - left: slotObjItem.left, - overflow: 'hidden', - zIndex: slotObjItem.layer, - }); - - if (isMarquee) { - const $scroller = - $(`
`); - - $scroller.css({ - display: 'flex', - height: slotObjItem.height, - }); - - if (slotObjItem?.templateData?.verticalAlign) { - $scroller.css({ - alignItems: slotObjItem?.templateData?.verticalAlign, - }); - } - - $slotItemContent.wrapInner($scroller.prop('outerHTML')); - } else { - if (!isGroup) { - $slotItemContent.css({ - position: 'absolute', - top: slotObjItem.top, - left: slotObjItem.left, - width: slotObjItem.width, - height: slotObjItem.height, - zIndex: slotObjItem.layer, - }); - } - } - - // Remove data group element if exists to avoid duplicate - if ($content.find('.' + - itemKey + '.cycle-slideshow').length === 1) { - $content.find('.' + - itemKey + '.cycle-slideshow').cycle('destroy'); - } - if ($content.find('.' + itemKey).length === 1) { - $content.find('.' + itemKey).remove(); - } - - $content.append($slotItemContent); - - $slotItemContent.promise().done(function() { - $slotItemContent.xiboElementsRender( - { - ...slotObjItem, - itemsPerPage: currentWidget?.maxSlot, - numItems: data.length, - id: itemKey, - selector: `.${itemKey}`, - }, - $slotItemContent.find(`.${itemKey}--item`), - ); - - const runOnTemplateVisible = function() { - slotObjItem.onTemplateVisible($slotItemContent); - }; - - // Run onTemplateVisible by default if visible - if (xiboIC.checkVisible()) { - runOnTemplateVisible(); - } else { - xiboIC.addToQueue(runOnTemplateVisible); - } - - currentWidget.items.push($slotItemContent); - }); + self.postRenderDataElements( + $slotItemContent, + slotObjItem, + isMarquee, + itemKey, + isGroup, + $content, + currentWidget, + data, + ); }); } }); } + // Render data elements from meta data + if (currentWidget.metaElements && + Object.entries(currentWidget.metaElements).length > 0 + ) { + Object.keys(currentWidget.metaElements).forEach(function(itemKey, slotKey) { + const slotObjItem = currentWidget.metaElements[itemKey]; + const $slotItemContent = $(`
`); + const isMarquee = PlayerHelper.isMarquee(slotObjItem?.efffect); + + // Load element functions + self.loadElementFunctions(slotObjItem, meta); + + PlayerHelper.renderDataItem( + false, + slotObjItem.id, + slotObjItem.onElementParseData(meta), + slotObjItem, + slotKey, + currentWidget.maxSlot, + slotObjItem.pinSlot, + currentWidget.pinnedSlots, + itemKey, + $slotItemContent, + {...slotObjItem, isMarquee}, + meta, + $content, + ); + + self.postRenderDataElements( + $slotItemContent, + slotObjItem, + isMarquee, + itemKey, + false, + $content, + currentWidget, + data, + ); + }); + } // Find and handle any images $content.find('img').xiboImageRender(); @@ -1250,6 +1251,94 @@ XiboPlayer.prototype.renderDataElements = function(currentWidget) { '<<>> of renderDataElements for widget >', currentWidget.widgetId); }; +XiboPlayer.prototype.postRenderDataElements = function( + $slotItemContent, + slotObjItem, + isMarquee, + itemKey, + isGroup, + $content, + currentWidget, + data, +) { + $slotItemContent.css({ + width: slotObjItem.width, + height: slotObjItem.height, + position: 'absolute', + top: slotObjItem.top, + left: slotObjItem.left, + overflow: 'hidden', + zIndex: slotObjItem.layer, + }); + + if (isMarquee) { + const $scroller = + $(`
`); + + $scroller.css({ + display: 'flex', + height: slotObjItem.height, + }); + + if (slotObjItem?.templateData?.verticalAlign) { + $scroller.css({ + alignItems: slotObjItem?.templateData?.verticalAlign, + }); + } + + $slotItemContent.wrapInner($scroller.prop('outerHTML')); + } else { + if (!isGroup) { + $slotItemContent.css({ + position: 'absolute', + top: slotObjItem.top, + left: slotObjItem.left, + width: slotObjItem.width, + height: slotObjItem.height, + zIndex: slotObjItem.layer, + }); + } + } + + // Remove data group element if exists to avoid duplicate + if ($content.find('.' + + itemKey + '.cycle-slideshow').length === 1) { + $content.find('.' + + itemKey + '.cycle-slideshow').cycle('destroy'); + } + if ($content.find('.' + itemKey).length === 1) { + $content.find('.' + itemKey).remove(); + } + + $content.append($slotItemContent); + + $slotItemContent.promise().done(function() { + $slotItemContent.xiboElementsRender( + { + ...slotObjItem, + itemsPerPage: currentWidget?.maxSlot, + numItems: data?.length || 0, + id: itemKey, + selector: `.${itemKey}`, + }, + $slotItemContent.find(`.${itemKey}--item`), + ); + + const runOnTemplateVisible = function() { + slotObjItem.onTemplateVisible($slotItemContent); + }; + + // Run onTemplateVisible by default if visible + if (xiboIC.checkVisible()) { + runOnTemplateVisible(); + } else { + xiboIC.addToQueue(runOnTemplateVisible); + } + + currentWidget.items.push($slotItemContent); + }); +}; + /** * Renders widget with global elements * @param {Object} currentWidget Widget object diff --git a/modules/templates/currency-static.xml b/modules/templates/currency-static.xml index 181d9c0bb5..2b0aabefcf 100644 --- a/modules/templates/currency-static.xml +++ b/modules/templates/currency-static.xml @@ -40,11 +40,6 @@ The selected effect works best with a background colour. Optionally add one here. - - Date Format - The format to apply to all dates returned by the Widget. - #DATE_FORMAT# - Items per Page This is the intended number of items on each page. diff --git a/modules/templates/dataset-static.xml b/modules/templates/dataset-static.xml index d571b881c2..bc80ab7cea 100644 --- a/modules/templates/dataset-static.xml +++ b/modules/templates/dataset-static.xml @@ -66,6 +66,16 @@ + + Date Format + The format to apply to all dates returned by the Widget. + #DATE_FORMAT# + + + + + + Show the table headings? Should the Table headings be shown? @@ -167,9 +177,14 @@ if (items.length <= 0 && properties.noDataMessage && properties.noDataMessage != // Columns to be shown in the table var columnIndex = JSON.parse(properties.columns); -var columns = (meta && meta.mapping) ? meta.mapping.filter(function (column) { - return column.dataSetColumnId !== '' && columnIndex.indexOf(column.dataSetColumnId) !== -1; -}) : []; +var columns = []; +if (meta && meta.mapping) { + meta.mapping.forEach((column) => { + if (column.dataSetColumnId !== '' && columnIndex.indexOf(column.dataSetColumnId) !== -1) { + columns[columnIndex.indexOf(column.dataSetColumnId)] = column; + } + }); +} // Get table element var $datasetTableContainer = $(target).find('#DataSetTableContainer'); @@ -227,6 +242,11 @@ for (var i = 0; i < items.length; i++) { var rowContent = columns.map(function (column, colIdx) { var value = items[i][column.heading]; + // If it's a date and we have date format + if (column.dataTypeId === 3 && properties.dateFormat) { + value = moment(value).format(properties.dateFormat); + } + // If this is an image column, wrap it in an image tag if (column.dataTypeId === 4 || column.dataTypeId === 5) { value = value ? '' : ''; @@ -530,6 +550,16 @@ $(target).xiboLayoutAnimate(properties); + + Date Format + The format to apply to all dates returned by the Widget. + #DATE_FORMAT# + + + + + + Show the table headings? Should the Table headings be shown? @@ -713,9 +743,14 @@ if (items.length <= 0 && properties.noDataMessage && properties.noDataMessage != // Columns to be shown in the table var columnIndex = JSON.parse(properties.columns); -var columns = (meta && meta.mapping) ? meta.mapping.filter(function (column) { - return column.dataSetColumnId !== '' && columnIndex.indexOf(column.dataSetColumnId) !== -1; -}) : []; +var columns = []; +if (meta && meta.mapping) { + meta.mapping.forEach((column) => { + if (column.dataSetColumnId !== '' && columnIndex.indexOf(column.dataSetColumnId) !== -1) { + columns[columnIndex.indexOf(column.dataSetColumnId)] = column; + } + }); +} // Get table element var $datasetTableContainer = $(target).find('.DataSetTableContainer'); @@ -773,6 +808,11 @@ for (var i = 0; i < items.length; i++) { var rowContent = columns.map(function (column, colIdx) { var value = items[i][column.heading]; + // If it's a date and we have date format + if (column.dataTypeId === 3 && properties.dateFormat) { + value = moment(value).format(properties.dateFormat); + } + // If this is an image column, wrap it in an image tag if (column.dataTypeId === 4 || column.dataTypeId === 5) { value = value ? '' : ''; @@ -854,6 +894,16 @@ $datasetTableContainer.find('img').xiboImageRender(properties); + + Date Format + The format to apply to all dates returned by the Widget. + #DATE_FORMAT# + + + + + + Show the table headings? Should the Table headings be shown? @@ -995,9 +1045,14 @@ if (items.length <= 0 && properties.noDataMessage && properties.noDataMessage != // Columns to be shown in the table var columnIndex = JSON.parse(properties.columns); -var columns = (meta && meta.mapping) ? meta.mapping.filter(function (column) { - return column.dataSetColumnId !== '' && columnIndex.indexOf(column.dataSetColumnId) !== -1; -}) : []; +var columns = []; +if (meta && meta.mapping) { + meta.mapping.forEach((column) => { + if (column.dataSetColumnId !== '' && columnIndex.indexOf(column.dataSetColumnId) !== -1) { + columns[columnIndex.indexOf(column.dataSetColumnId)] = column; + } + }); +} // Get table element var $datasetTableContainer = $(target).find('.DataSetTableContainer'); @@ -1055,6 +1110,11 @@ for (var i = 0; i < items.length; i++) { var rowContent = columns.map(function (column, colIdx) { var value = items[i][column.heading]; + // If it's a date and we have date format + if (column.dataTypeId === 3 && properties.dateFormat) { + value = moment(value).format(properties.dateFormat); + } + // If this is an image column, wrap it in an image tag if (column.dataTypeId === 4 || column.dataTypeId === 5) { value = value ? '' : ''; @@ -1136,6 +1196,16 @@ $datasetTableContainer.find('img').xiboImageRender(properties); + + Date Format + The format to apply to all dates returned by the Widget. + #DATE_FORMAT# + + + + + + Show the table headings? Should the Table headings be shown? @@ -1268,9 +1338,14 @@ if (items.length <= 0 && properties.noDataMessage && properties.noDataMessage != // Columns to be shown in the table var columnIndex = JSON.parse(properties.columns); -var columns = (meta && meta.mapping) ? meta.mapping.filter(function (column) { - return column.dataSetColumnId !== '' && columnIndex.indexOf(column.dataSetColumnId) !== -1; -}) : []; +var columns = []; +if (meta && meta.mapping) { + meta.mapping.forEach((column) => { + if (column.dataSetColumnId !== '' && columnIndex.indexOf(column.dataSetColumnId) !== -1) { + columns[columnIndex.indexOf(column.dataSetColumnId)] = column; + } + }); +} // Get table element var $datasetTableContainer = $(target).find('.DataSetTableContainer'); @@ -1328,6 +1403,11 @@ for (var i = 0; i < items.length; i++) { var rowContent = columns.map(function (column, colIdx) { var value = items[i][column.heading]; + // If it's a date and we have date format + if (column.dataTypeId === 3 && properties.dateFormat) { + value = moment(value).format(properties.dateFormat); + } + // If this is an image column, wrap it in an image tag if (column.dataTypeId === 4 || column.dataTypeId === 5) { value = value ? '' : ''; @@ -1409,6 +1489,16 @@ $datasetTableContainer.find('img').xiboImageRender(properties); + + Date Format + The format to apply to all dates returned by the Widget. + #DATE_FORMAT# + + + + + + Show the table headings? Should the Table headings be shown? @@ -1539,9 +1629,14 @@ if (items.length <= 0 && properties.noDataMessage && properties.noDataMessage != // Columns to be shown in the table var columnIndex = JSON.parse(properties.columns); -var columns = (meta && meta.mapping) ? meta.mapping.filter(function (column) { - return column.dataSetColumnId !== '' && columnIndex.indexOf(column.dataSetColumnId) !== -1; -}) : []; +var columns = []; +if (meta && meta.mapping) { + meta.mapping.forEach((column) => { + if (column.dataSetColumnId !== '' && columnIndex.indexOf(column.dataSetColumnId) !== -1) { + columns[columnIndex.indexOf(column.dataSetColumnId)] = column; + } + }); +} // Get table element var $datasetTableContainer = $(target).find('.DataSetTableContainer'); @@ -1599,6 +1694,11 @@ for (var i = 0; i < items.length; i++) { var rowContent = columns.map(function (column, colIdx) { var value = items[i][column.heading]; + // If it's a date and we have date format + if (column.dataTypeId === 3 && properties.dateFormat) { + value = moment(value).format(properties.dateFormat); + } + // If this is an image column, wrap it in an image tag if (column.dataTypeId === 4 || column.dataTypeId === 5) { value = value ? '' : ''; @@ -1680,6 +1780,16 @@ $datasetTableContainer.find('img').xiboImageRender(properties); + + Date Format + The format to apply to all dates returned by the Widget. + #DATE_FORMAT# + + + + + + Show the table headings? Should the Table headings be shown? @@ -1808,9 +1918,14 @@ if (items.length <= 0 && properties.noDataMessage && properties.noDataMessage != // Columns to be shown in the table var columnIndex = JSON.parse(properties.columns); -var columns = (meta && meta.mapping) ? meta.mapping.filter(function (column) { - return column.dataSetColumnId !== '' && columnIndex.indexOf(column.dataSetColumnId) !== -1; -}) : []; +var columns = []; +if (meta && meta.mapping) { + meta.mapping.forEach((column) => { + if (column.dataSetColumnId !== '' && columnIndex.indexOf(column.dataSetColumnId) !== -1) { + columns[columnIndex.indexOf(column.dataSetColumnId)] = column; + } + }); +} // Get table element var $datasetTableContainer = $(target).find('.DataSetTableContainer'); @@ -1868,6 +1983,11 @@ for (var i = 0; i < items.length; i++) { var rowContent = columns.map(function (column, colIdx) { var value = items[i][column.heading]; + // If it's a date and we have date format + if (column.dataTypeId === 3 && properties.dateFormat) { + value = moment(value).format(properties.dateFormat); + } + // If this is an image column, wrap it in an image tag if (column.dataTypeId === 4 || column.dataTypeId === 5) { value = value ? '' : ''; @@ -1949,6 +2069,16 @@ $datasetTableContainer.find('img').xiboImageRender(properties); + + Date Format + The format to apply to all dates returned by the Widget. + #DATE_FORMAT# + + + + + + Show the table headings? Should the Table headings be shown? @@ -2075,9 +2205,14 @@ if (items.length <= 0 && properties.noDataMessage && properties.noDataMessage != // Columns to be shown in the table var columnIndex = JSON.parse(properties.columns); -var columns = (meta && meta.mapping) ? meta.mapping.filter(function (column) { - return column.dataSetColumnId !== '' && columnIndex.indexOf(column.dataSetColumnId) !== -1; -}) : []; +var columns = []; +if (meta && meta.mapping) { + meta.mapping.forEach((column) => { + if (column.dataSetColumnId !== '' && columnIndex.indexOf(column.dataSetColumnId) !== -1) { + columns[columnIndex.indexOf(column.dataSetColumnId)] = column; + } + }); +} // Get table element var $datasetTableContainer = $(target).find('.DataSetTableContainer'); @@ -2135,6 +2270,11 @@ for (var i = 0; i < items.length; i++) { var rowContent = columns.map(function (column, colIdx) { var value = items[i][column.heading]; + // If it's a date and we have date format + if (column.dataTypeId === 3 && properties.dateFormat) { + value = moment(value).format(properties.dateFormat); + } + // If this is an image column, wrap it in an image tag if (column.dataTypeId === 4 || column.dataTypeId === 5) { value = value ? '' : ''; @@ -2216,6 +2356,16 @@ $datasetTableContainer.find('img').xiboImageRender(properties); + + Date Format + The format to apply to all dates returned by the Widget. + #DATE_FORMAT# + + + + + + Show the table headings? Should the Table headings be shown? @@ -2337,9 +2487,14 @@ if (items.length <= 0 && properties.noDataMessage && properties.noDataMessage != // Columns to be shown in the table var columnIndex = JSON.parse(properties.columns); -var columns = (meta && meta.mapping) ? meta.mapping.filter(function (column) { - return column.dataSetColumnId !== '' && columnIndex.indexOf(column.dataSetColumnId) !== -1; -}) : []; +var columns = []; +if (meta && meta.mapping) { + meta.mapping.forEach((column) => { + if (column.dataSetColumnId !== '' && columnIndex.indexOf(column.dataSetColumnId) !== -1) { + columns[columnIndex.indexOf(column.dataSetColumnId)] = column; + } + }); +} // Get table element var $datasetTableContainer = $(target).find('.DataSetTableContainer'); @@ -2397,6 +2552,11 @@ for (var i = 0; i < items.length; i++) { var rowContent = columns.map(function (column, colIdx) { var value = items[i][column.heading]; + // If it's a date and we have date format + if (column.dataTypeId === 3 && properties.dateFormat) { + value = moment(value).format(properties.dateFormat); + } + // If this is an image column, wrap it in an image tag if (column.dataTypeId === 4 || column.dataTypeId === 5) { value = value ? '' : ''; @@ -2478,6 +2638,16 @@ $datasetTableContainer.find('img').xiboImageRender(properties); + + Date Format + The format to apply to all dates returned by the Widget. + #DATE_FORMAT# + + + + + + Show the table headings? Should the Table headings be shown? @@ -2641,9 +2811,14 @@ if (items.length <= 0 && properties.noDataMessage && properties.noDataMessage != // Columns to be shown in the table var columnIndex = JSON.parse(properties.columns); -var columns = (meta && meta.mapping) ? meta.mapping.filter(function (column) { - return column.dataSetColumnId !== '' && columnIndex.indexOf(column.dataSetColumnId) !== -1; -}) : []; +var columns = []; +if (meta && meta.mapping) { + meta.mapping.forEach((column) => { + if (column.dataSetColumnId !== '' && columnIndex.indexOf(column.dataSetColumnId) !== -1) { + columns[columnIndex.indexOf(column.dataSetColumnId)] = column; + } + }); +} // Get table element var $datasetTableContainer = $(target).find('.DataSetTableContainer'); @@ -2701,6 +2876,11 @@ for (var i = 0; i < items.length; i++) { var rowContent = columns.map(function (column, colIdx) { var value = items[i][column.heading]; + // If it's a date and we have date format + if (column.dataTypeId === 3 && properties.dateFormat) { + value = moment(value).format(properties.dateFormat); + } + // If this is an image column, wrap it in an image tag if (column.dataTypeId === 4 || column.dataTypeId === 5) { value = value ? '' : ''; @@ -3419,6 +3599,11 @@ if (items.length <= 0 && properties.noDataMessage && properties.noDataMessage != var itemType = (itemCol) ? columnInfo[itemCol].type : ''; var itemValue = item[itemId]; + // If it's a date and we have date format + if (itemType === 3 && properties.dateFormat) { + itemValue = moment(itemValue).format(properties.dateFormat); + } + // If this is an image column, wrap it in an image tag if (itemType === 4 || itemType === 5) { itemValue = itemValue ? '' : ''; diff --git a/modules/templates/forecast-elements.xml b/modules/templates/forecast-elements.xml index e317d42d8c..09ca752a85 100644 --- a/modules/templates/forecast-elements.xml +++ b/modules/templates/forecast-elements.xml @@ -1,5 +1,5 @@