diff --git a/lib/Controller/Library.php b/lib/Controller/Library.php index 370ec64add..fe7f3666d7 100644 --- a/lib/Controller/Library.php +++ b/lib/Controller/Library.php @@ -1,6 +1,6 @@ str_replace(',', '|', $module->getModule()->validExtensions), 'templatesAvailable' => $templates, 'options' => $options, - 'isTopLevel' => $this->playlistFactory->getById($module->widget->playlistId)->isRegionPlaylist() + 'isTopLevel' => $this->playlistFactory->getById($module->widget->playlistId)->isRegionPlaylist(), ])); return $this->render($request, $response); diff --git a/lib/Entity/Schedule.php b/lib/Entity/Schedule.php index b52f2606d2..fa180b298b 100644 --- a/lib/Entity/Schedule.php +++ b/lib/Entity/Schedule.php @@ -610,9 +610,57 @@ public function validate() if ($this->isPriority < 0) { throw new InvalidArgumentException(__('Priority must be 0 or a positive number'), 'isPriority'); } - // Check recurrenceDetail every is positive - if ($this->recurrenceType != '' && ($this->recurrenceDetail === null || $this->recurrenceDetail <= 0)) { - throw new InvalidArgumentException(__('Repeat every must be a positive number'), 'recurrenceDetail'); + + // Run some additional validation if we have a recurrence type set. + if (!empty($this->recurrenceType)) { + // Check recurrenceDetail every is positive + if ($this->recurrenceDetail === null || $this->recurrenceDetail <= 0) { + throw new InvalidArgumentException(__('Repeat every must be a positive number'), 'recurrenceDetail'); + } + + // Make sure that we don't repeat more frequently than the duration of the event as this is a common + // misconfiguration which results in overlapping repeats + if ($this->eventTypeId !== Schedule::$COMMAND_EVENT) { + $eventDuration = $this->toDt - $this->fromDt; + + // Determine the number of seconds our repeat type/interval represents + switch ($this->recurrenceType) { + case 'Minute': + $repeatDuration = $this->recurrenceDetail * 60; + break; + + case 'Hour': + $repeatDuration = $this->recurrenceDetail * 3600; + break; + + case 'Day': + $repeatDuration = $this->recurrenceDetail * 86400; + break; + + case 'Week': + $repeatDuration = $this->recurrenceDetail * 86400 * 7; + break; + + case 'Month': + $repeatDuration = $this->recurrenceDetail * 86400 * 30; + break; + + case 'Year': + $repeatDuration = $this->recurrenceDetail * 86400 * 365; + break; + + default: + throw new InvalidArgumentException(__('Unknown repeat type'), 'recurrenceType'); + } + + if ($repeatDuration < $eventDuration) { + throw new InvalidArgumentException( + __('An event cannot repeat more often than the interval between its start and end date'), + 'recurrenceDetail', + $eventDuration . ' seconds' + ); + } + } } } diff --git a/lib/Factory/LayoutFactory.php b/lib/Factory/LayoutFactory.php index 9349c13288..d019a35ef6 100644 --- a/lib/Factory/LayoutFactory.php +++ b/lib/Factory/LayoutFactory.php @@ -2276,8 +2276,8 @@ public function query($sortOrder = null, $filterBy = []) $layout->width = $parsedRow->getDouble('width'); $layout->height = $parsedRow->getDouble('height'); $layout->orientation = $layout->width >= $layout->height ? 'landscape' : 'portrait'; - $layout->createdDt = $parsedRow->getDate('createdDt'); - $layout->modifiedDt = $parsedRow->getDate('modifiedDt'); + $layout->createdDt = $parsedRow->getString('createdDt'); + $layout->modifiedDt = $parsedRow->getString('modifiedDt'); $layout->displayOrder = $parsedRow->getInt('displayOrder'); $layout->statusMessage = $parsedRow->getString('statusMessage'); $layout->enableStat = $parsedRow->getInt('enableStat'); diff --git a/lib/Helper/Environment.php b/lib/Helper/Environment.php index d1de1f14ea..ed8b062692 100644 --- a/lib/Helper/Environment.php +++ b/lib/Helper/Environment.php @@ -30,7 +30,7 @@ */ class Environment { - public static $WEBSITE_VERSION_NAME = '3.3.5'; + public static $WEBSITE_VERSION_NAME = '3.3.6'; public static $XMDS_VERSION = '6'; public static $XLF_VERSION = 3; public static $VERSION_REQUIRED = '7.2.9'; diff --git a/lib/Middleware/Theme.php b/lib/Middleware/Theme.php index cace9a31d4..95fbc0e2f1 100644 --- a/lib/Middleware/Theme.php +++ b/lib/Middleware/Theme.php @@ -1,8 +1,8 @@ ByteFormatter::toBytes(Environment::getMaxUploadSize()), 'maxSizeMessage' => sprintf(__('This form accepts files up to a maximum size of %s'), Environment::getMaxUploadSize()), 'validExt' => implode('|', $container->get('moduleFactory')->getValidExtensions()), - 'validImageExt' => implode('|', $container->get('moduleFactory')->getValidExtensions(['type' => 'image'])) + 'validImageExt' => implode('|', $container->get('moduleFactory')->getValidExtensions(['type' => 'image'])), ]; $view['ckeditorConfig'] = $container->get('mediaService')->setUser($container->get('user'))->fontCKEditorConfig(RouteContext::fromRequest($request)->getRouteParser()); $view['version'] = Environment::$WEBSITE_VERSION_NAME; diff --git a/lib/Widget/Agenda.php b/lib/Widget/Agenda.php index 9c12283ec4..2464f8f2e7 100644 --- a/lib/Widget/Agenda.php +++ b/lib/Widget/Agenda.php @@ -1,6 +1,6 @@ defaultDuration = 60; $module->settings = []; $module->viewPath = '../modules'; + $module->installName = 'dashboard'; // Set the newly created module and then call install $this->setModule($module); diff --git a/lib/Widget/PlayerSoftware.php b/lib/Widget/PlayerSoftware.php index 93326d8dff..4943a947ce 100644 --- a/lib/Widget/PlayerSoftware.php +++ b/lib/Widget/PlayerSoftware.php @@ -1,8 +1,8 @@ name !== $media->fileName) { + $playerShowVersion = $media->name; + } + return $factory->create($type, $version, $code, $media->mediaId, $playerShowVersion); } @@ -159,5 +164,4 @@ public function getValidExtensions() { return $this->module->validExtensions; } - -} \ No newline at end of file +} diff --git a/locale/af.mo b/locale/af.mo index 5719d9f81f..f7c3b3630e 100644 Binary files a/locale/af.mo and b/locale/af.mo differ diff --git a/locale/ar.mo b/locale/ar.mo index 81f8d9c4d8..0247bc3399 100644 Binary files a/locale/ar.mo and b/locale/ar.mo differ diff --git a/locale/bg.mo b/locale/bg.mo index 6a71aeaf09..f284226904 100644 Binary files a/locale/bg.mo and b/locale/bg.mo differ diff --git a/locale/ca.mo b/locale/ca.mo index 06022ec599..c0028edf6a 100644 Binary files a/locale/ca.mo and b/locale/ca.mo differ diff --git a/locale/cs.mo b/locale/cs.mo index 1ffc13a67c..01c652c21c 100644 Binary files a/locale/cs.mo and b/locale/cs.mo differ diff --git a/locale/da.mo b/locale/da.mo index 3041b80f7e..613f06d8d0 100644 Binary files a/locale/da.mo and b/locale/da.mo differ diff --git a/locale/de.mo b/locale/de.mo index d7b2872933..703ed6d8a5 100644 Binary files a/locale/de.mo and b/locale/de.mo differ diff --git a/locale/default.pot b/locale/default.pot index 2474d79c53..0874bd417c 100644 --- 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: 2023-05-07 14:10+0100\n" +"POT-Creation-Date: 2023-06-06 11:51+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -2700,7 +2700,7 @@ msgstr "" #: cache/87/87bb46eea86e54a95c60b2d64a19579ae8fe0146413ba08fa309d533f504d763.php:108 #: cache/9a/9a843b09dbb217950e0d2e9b3d5a06cc7d7cd613e158b585fac20ce98fae0f5a.php:254 #: cache/c0/c05179f1fb53774c57bc10e19cec4980afe00e88aaab4011a7207ca03232209c.php:123 -#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:601 +#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:605 #: cache/b0/b02caf5e47c30f5cfda6613de25e8c84b6d96995b182bf079362288f9244e7e6.php:83 #: cache/32/32070772cd97e4d7508d2d6eec949ef1945f951009a6494ccf9752360a72bd76.php:480 #: cache/32/32070772cd97e4d7508d2d6eec949ef1945f951009a6494ccf9752360a72bd76.php:498 @@ -5731,7 +5731,7 @@ msgid "More" msgstr "" #: cache/3c/3cf6e5a03ca0fb6f0bd915ab8c09a8adf18500fd76b9a8cbfa35da8ef0b60cd0.php:128 -#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:576 +#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:580 msgid "Loading..." msgstr "" @@ -8961,7 +8961,7 @@ msgid "Cancel upload" msgstr "" #: cache/6e/6e1ad0ac5a78846d0e3ea98187fedcf718479d729d4565ba34294322780da5d3.php:328 -#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:580 +#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:584 #: cache/fe/fe822a6f5712d67080516d8204b7a7194da01937a981ba4814d089ca458ae973.php:666 #: cache/fe/fe822a6f5712d67080516d8204b7a7194da01937a981ba4814d089ca458ae973.php:1245 #: cache/ec/ec1993f52a7b018be3c1193db714bb4c4190ed85704048ee555d54ec8022e897.php:302 @@ -10904,13 +10904,13 @@ msgstr "" #: cache/b1/b19ea9bbe44b6ed9904afda938cb51ecf849f891c4ab15c756192a46dce379fc.php:138 #: cache/1f/1fd9187e2d4460389b74b86b63e578a124a11de83282c570a4e00a7bb65ba6ca.php:182 -#: lib/Report/TimeDisconnectedSummary.php:374 +#: lib/Report/TimeDisconnectedSummary.php:312 msgid "Minutes" msgstr "" #: cache/b1/b19ea9bbe44b6ed9904afda938cb51ecf849f891c4ab15c756192a46dce379fc.php:143 #: cache/1f/1fd9187e2d4460389b74b86b63e578a124a11de83282c570a4e00a7bb65ba6ca.php:167 -#: lib/Report/TimeDisconnectedSummary.php:371 +#: lib/Report/TimeDisconnectedSummary.php:309 msgid "Hours" msgstr "" @@ -11122,7 +11122,7 @@ msgid "Note: It will only be updated in layouts you have permission to edit." msgstr "" #: cache/d8/d83adfe4494e15657369aac9ec5524a363e8c8e8747514592931189f8724e0d2.php:348 -#: lib/Controller/Library.php:1293 +#: lib/Controller/Library.php:1300 msgid "Sorry, Fonts do not have any editable properties." msgstr "" @@ -12843,7 +12843,7 @@ msgid "" msgstr "" #: cache/9a/9a843b09dbb217950e0d2e9b3d5a06cc7d7cd613e158b585fac20ce98fae0f5a.php:259 -#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:605 +#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:609 #: cache/8d/8d52b54f12c1919f9f39b1ba49ac8ed3caa43fd85bca5f1077ca328ec3f10c8b.php:331 #: cache/8d/8d52b54f12c1919f9f39b1ba49ac8ed3caa43fd85bca5f1077ca328ec3f10c8b.php:365 #: cache/8d/8d52b54f12c1919f9f39b1ba49ac8ed3caa43fd85bca5f1077ca328ec3f10c8b.php:403 @@ -15341,55 +15341,61 @@ msgstr "" msgid "Publish failed." msgstr "" -#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:554 -msgid "No data available in table" +#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:470 +msgid "" +"Warning : Image is too large and will not be displayed on the Players. " +"Please check the allowed Resize Limit in Administration -> Settings" msgstr "" #: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:558 -msgid "Showing _START_ to _END_ of _TOTAL_ entries" +msgid "No data available in table" msgstr "" #: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:562 -msgid "Showing 0 to 0 of 0 entries" +msgid "Showing _START_ to _END_ of _TOTAL_ entries" msgstr "" #: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:566 +msgid "Showing 0 to 0 of 0 entries" +msgstr "" + +#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:570 msgid "(filtered from _MAX_ total entries)" msgstr "" -#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:572 +#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:576 msgid "Show _MENU_ entries" msgstr "" -#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:584 +#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:588 msgid "Search:" msgstr "" -#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:588 +#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:592 msgid "No matching records found" msgstr "" -#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:593 +#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:597 msgid "First" msgstr "" -#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:597 +#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:601 msgid "Last" msgstr "" -#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:611 +#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:615 msgid ": activate to sort column ascending" msgstr "" -#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:615 +#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:619 msgid ": activate to sort column descending" msgstr "" -#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:621 +#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:625 msgid "Column visibility" msgstr "" -#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:625 +#: cache/e1/e12568f445a23579c43fcfebd85ce8eee11d450b2050aad01f770f474b1d3218.php:629 msgid "Print" msgstr "" @@ -16016,7 +16022,7 @@ msgstr "" #: cache/67/67f8d4bfc3d480120c328105ec2fd8ff96194b3ad947cbbd12fc8d3845ef09e4.php:80 #: cache/45/453574373ee821a249b1c16429aa79905b73b4e1d3b6b2f509d42f51751e5522.php:129 -#: lib/Controller/Playlist.php:1690 lib/Controller/Library.php:2032 +#: lib/Controller/Playlist.php:1690 lib/Controller/Library.php:2039 #: lib/Controller/Layout.php:1582 msgid "Design" msgstr "" @@ -18727,7 +18733,7 @@ msgstr "" #: lib/Controller/MenuBoard.php:465 lib/Controller/Module.php:379 #: lib/Controller/Module.php:848 lib/Controller/Folder.php:272 #: lib/Controller/Playlist.php:892 lib/Controller/Transition.php:159 -#: lib/Controller/Library.php:1346 lib/Controller/DataSetColumn.php:594 +#: lib/Controller/Library.php:1353 lib/Controller/DataSetColumn.php:594 #: lib/Controller/Tag.php:506 lib/Controller/Connector.php:201 #: lib/Controller/Layout.php:740 lib/Controller/Layout.php:847 #: lib/Controller/MenuBoardCategory.php:418 lib/Controller/Help.php:223 @@ -19527,7 +19533,7 @@ msgid "" "tab to define" msgstr "" -#: lib/Controller/Playlist.php:1114 lib/Controller/Library.php:2180 +#: lib/Controller/Playlist.php:1114 lib/Controller/Library.php:2187 #: lib/Controller/Layout.php:2121 #, php-format msgid "Copied as %s" @@ -19567,7 +19573,7 @@ msgstr "" msgid "Specified Playlist item is not in use." msgstr "" -#: lib/Controller/Playlist.php:1700 lib/Controller/Library.php:2042 +#: lib/Controller/Playlist.php:1700 lib/Controller/Library.php:2049 #: lib/Controller/Layout.php:1628 msgid "Preview Layout" msgstr "" @@ -19630,97 +19636,97 @@ msgstr "" msgid "This library item is in use." msgstr "" -#: lib/Controller/Library.php:1112 lib/Controller/Library.php:1322 -#: lib/Controller/Library.php:2369 +#: lib/Controller/Library.php:1119 lib/Controller/Library.php:1329 +#: lib/Controller/Library.php:2376 msgid "Cannot set Expiry date in the past" msgstr "" -#: lib/Controller/Library.php:1367 lib/Controller/Library.php:1433 +#: lib/Controller/Library.php:1374 lib/Controller/Library.php:1440 #: lib/Controller/Maintenance.php:101 msgid "Sorry this function is disabled." msgstr "" -#: lib/Controller/Library.php:1465 lib/Controller/Maintenance.php:273 +#: lib/Controller/Library.php:1472 lib/Controller/Maintenance.php:273 msgid "Library Tidy Complete" msgstr "" -#: lib/Controller/Library.php:1576 +#: lib/Controller/Library.php:1583 msgid "Cannot download region specific module" msgstr "" -#: lib/Controller/Library.php:1664 +#: lib/Controller/Library.php:1671 msgid "Route is available through the API" msgstr "" -#: lib/Controller/Library.php:1733 lib/Controller/Layout.php:2186 +#: lib/Controller/Library.php:1740 lib/Controller/Layout.php:2186 msgid "No tags to assign" msgstr "" -#: lib/Controller/Library.php:1744 lib/Controller/Layout.php:2197 +#: lib/Controller/Library.php:1751 lib/Controller/Layout.php:2197 #, php-format msgid "Tagged %s" msgstr "" -#: lib/Controller/Library.php:1807 lib/Controller/Layout.php:2262 +#: lib/Controller/Library.php:1814 lib/Controller/Layout.php:2262 msgid "No tags to unassign" msgstr "" -#: lib/Controller/Library.php:1818 lib/Controller/Layout.php:2272 +#: lib/Controller/Library.php:1825 lib/Controller/Layout.php:2272 #, php-format msgid "Untagged %s" msgstr "" -#: lib/Controller/Library.php:1965 lib/Controller/Library.php:2049 +#: lib/Controller/Library.php:1972 lib/Controller/Library.php:2056 msgid "Specified Media item is not in use." msgstr "" -#: lib/Controller/Library.php:2253 lib/Middleware/Theme.php:129 +#: lib/Controller/Library.php:2260 lib/Middleware/Theme.php:129 #, php-format msgid "This form accepts files up to a maximum size of %s" msgstr "" -#: lib/Controller/Library.php:2377 +#: lib/Controller/Library.php:2384 msgid "Provided URL is invalid" msgstr "" -#: lib/Controller/Library.php:2416 +#: lib/Controller/Library.php:2423 #, php-format msgid "" "Invalid Module type or extension. Module type %s does not allow for %s " "extension" msgstr "" -#: lib/Controller/Library.php:2445 +#: lib/Controller/Library.php:2452 msgid "Download rejected for an unknown reason." msgstr "" -#: lib/Controller/Library.php:2449 +#: lib/Controller/Library.php:2456 #, php-format msgid "Download rejected due to %s" msgstr "" -#: lib/Controller/Library.php:2456 +#: lib/Controller/Library.php:2463 msgid "Media upload from URL was successful" msgstr "" -#: lib/Controller/Library.php:2501 +#: lib/Controller/Library.php:2508 msgid "Invalid image data" msgstr "" -#: lib/Controller/Library.php:2607 +#: lib/Controller/Library.php:2614 #, php-format msgid "Media %s moved to Folder %s" msgstr "" -#: lib/Controller/Library.php:2692 +#: lib/Controller/Library.php:2699 msgid "Not configured by any active connector." msgstr "" -#: lib/Controller/Library.php:2742 +#: lib/Controller/Library.php:2749 msgid "Download failed" msgstr "" -#: lib/Controller/Library.php:2751 +#: lib/Controller/Library.php:2758 msgid "Imported" msgstr "" @@ -20472,13 +20478,13 @@ msgid "Please enter author name" msgstr "" #: lib/Controller/Schedule.php:330 lib/Controller/Schedule.php:344 -#: lib/Entity/Schedule.php:1621 lib/Entity/Schedule.php:1632 +#: lib/Entity/Schedule.php:1669 lib/Entity/Schedule.php:1680 #, php-format msgid "%s scheduled on %s" msgstr "" #: lib/Controller/Schedule.php:339 lib/Controller/Schedule.php:569 -#: lib/Entity/Schedule.php:1630 +#: lib/Entity/Schedule.php:1678 msgid "Private Item" msgstr "" @@ -21253,23 +21259,33 @@ msgstr "" msgid "Priority must be 0 or a positive number" msgstr "" -#: lib/Entity/Schedule.php:615 +#: lib/Entity/Schedule.php:618 msgid "Repeat every must be a positive number" msgstr "" -#: lib/Entity/Schedule.php:921 +#: lib/Entity/Schedule.php:653 +msgid "Unknown repeat type" +msgstr "" + +#: lib/Entity/Schedule.php:658 +msgid "" +"An event cannot repeat more often than the interval between its start and " +"end date" +msgstr "" + +#: lib/Entity/Schedule.php:969 msgid "Cache pool not available" msgstr "" -#: lib/Entity/Schedule.php:924 +#: lib/Entity/Schedule.php:972 msgid "Unable to generate schedule, unknown event" msgstr "" -#: lib/Entity/Schedule.php:1265 lib/Entity/Schedule.php:1560 +#: lib/Entity/Schedule.php:1313 lib/Entity/Schedule.php:1608 msgid "Invalid recurrence type" msgstr "" -#: lib/Entity/Schedule.php:1591 +#: lib/Entity/Schedule.php:1639 msgid "reminderDt not found as next event does not exist" msgstr "" @@ -22298,12 +22314,12 @@ msgid "Please choose a template" msgstr "" #: lib/Widget/ForecastIo.php:992 lib/Widget/MenuBoard.php:763 -#: lib/Widget/Calendar.php:863 lib/Widget/GoogleTraffic.php:243 +#: lib/Widget/Calendar.php:864 lib/Widget/GoogleTraffic.php:243 #: lib/Widget/Stocks.php:697 lib/Widget/Twitter.php:913 #: lib/Widget/Ticker.php:1003 lib/Widget/Hls.php:191 #: lib/Widget/DataSetView.php:919 lib/Widget/TwitterMetro.php:169 #: lib/Widget/Currencies.php:858 lib/Widget/DataSetTicker.php:875 -#: lib/Widget/Agenda.php:784 +#: lib/Widget/Agenda.php:785 msgid "Please enter a duration" msgstr "" @@ -22373,15 +22389,16 @@ msgstr "" msgid "Assignable variable must be a number" msgstr "" -#: lib/Widget/Calendar.php:852 lib/Widget/Agenda.php:713 +#: lib/Widget/Calendar.php:853 lib/Widget/Agenda.php:714 msgid "The iCal provided is not valid, please choose a valid feed" msgstr "" -#: lib/Widget/Calendar.php:868 lib/Widget/Agenda.php:789 +#: lib/Widget/Calendar.php:869 lib/Widget/Agenda.php:790 msgid "Please enter a feed URI containing the events you want to display" msgstr "" -#: lib/Widget/Calendar.php:883 lib/Widget/Agenda.php:804 +#: lib/Widget/Calendar.php:881 lib/Widget/Calendar.php:891 +#: lib/Widget/Agenda.php:802 lib/Widget/Agenda.php:812 msgid "" "That is not a valid date interval, please use natural language such as 1 week" msgstr "" @@ -22661,7 +22678,7 @@ msgstr "" msgid "Please enter countdown date." msgstr "" -#: lib/Widget/Agenda.php:409 +#: lib/Widget/Agenda.php:410 msgid "Configure your feed" msgstr "" @@ -22673,19 +22690,19 @@ msgstr "" msgid "Please Select the sourceId" msgstr "" -#: lib/Widget/Dashboard.php:59 +#: lib/Widget/Dashboard.php:58 msgid "Please supply a URL." msgstr "" -#: lib/Widget/Dashboard.php:65 +#: lib/Widget/Dashboard.php:64 msgid "5 minutes is the lowest update interval allowed" msgstr "" -#: lib/Widget/Dashboard.php:81 +#: lib/Widget/Dashboard.php:80 msgid "Please set a URL" msgstr "" -#: lib/Widget/Dashboard.php:119 +#: lib/Widget/Dashboard.php:118 msgid "No token returned" msgstr "" @@ -23610,25 +23627,25 @@ msgstr "" msgid "Not found" msgstr "" -#: lib/Report/TimeDisconnectedSummary.php:144 +#: lib/Report/TimeDisconnectedSummary.php:164 #, php-format msgid "%s time disconnected summary report" msgstr "" -#: lib/Report/TimeDisconnectedSummary.php:245 +#: lib/Report/TimeDisconnectedSummary.php:265 #: lib/Report/DistributionReport.php:303 msgid "No display groups with View permissions" msgstr "" -#: lib/Report/TimeDisconnectedSummary.php:368 +#: lib/Report/TimeDisconnectedSummary.php:306 msgid "Days" msgstr "" -#: lib/Report/TimeDisconnectedSummary.php:423 +#: lib/Report/TimeDisconnectedSummary.php:453 msgid "Downtime" msgstr "" -#: lib/Report/TimeDisconnectedSummary.php:428 +#: lib/Report/TimeDisconnectedSummary.php:458 msgid "Uptime" msgstr "" diff --git a/locale/el.mo b/locale/el.mo index 571eba8918..3d39a75e12 100644 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 43c92b08b9..17d14a8fb9 100644 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 4a6b96d13b..0afd6a2a6d 100644 Binary files a/locale/es.mo and b/locale/es.mo differ diff --git a/locale/et.mo b/locale/et.mo index 53fe7a85a7..ba796677f4 100644 Binary files a/locale/et.mo and b/locale/et.mo differ diff --git a/locale/eu.mo b/locale/eu.mo index aa6cf66e17..5c62b96cf9 100644 Binary files a/locale/eu.mo and b/locale/eu.mo differ diff --git a/locale/fa.mo b/locale/fa.mo index cb91b6b5b6..c87e4fe7a3 100644 Binary files a/locale/fa.mo and b/locale/fa.mo differ diff --git a/locale/fi.mo b/locale/fi.mo index 4e98c9c010..0f08a2cb18 100644 Binary files a/locale/fi.mo and b/locale/fi.mo differ diff --git a/locale/fr.mo b/locale/fr.mo index db199324f9..2056e7982f 100644 Binary files a/locale/fr.mo and b/locale/fr.mo differ diff --git a/locale/he.mo b/locale/he.mo index 55bc10f5ad..5d1aa234bb 100644 Binary files a/locale/he.mo and b/locale/he.mo differ diff --git a/locale/hi.mo b/locale/hi.mo index accd9a874f..17cbb3f601 100644 Binary files a/locale/hi.mo and b/locale/hi.mo differ diff --git a/locale/hr.mo b/locale/hr.mo index 58a3433035..d89d99dd50 100644 Binary files a/locale/hr.mo and b/locale/hr.mo differ diff --git a/locale/hu.mo b/locale/hu.mo index 2198e1c44b..a5f11eff67 100644 Binary files a/locale/hu.mo and b/locale/hu.mo differ diff --git a/locale/id.mo b/locale/id.mo index 372eb689bb..333bda53a9 100644 Binary files a/locale/id.mo and b/locale/id.mo differ diff --git a/locale/it.mo b/locale/it.mo index 644f4448cc..fe76ea3647 100644 Binary files a/locale/it.mo and b/locale/it.mo differ diff --git a/locale/ja.mo b/locale/ja.mo index 52ac461cd6..0ceb682eb0 100644 Binary files a/locale/ja.mo and b/locale/ja.mo differ diff --git a/locale/ko.mo b/locale/ko.mo index 61fbdc587a..65c394dd1e 100644 Binary files a/locale/ko.mo and b/locale/ko.mo differ diff --git a/locale/ku.mo b/locale/ku.mo index 7e23daabbc..aaeaa3cd7f 100644 Binary files a/locale/ku.mo and b/locale/ku.mo differ diff --git a/locale/lb.mo b/locale/lb.mo index f07a45c186..ccd16398d7 100644 Binary files a/locale/lb.mo and b/locale/lb.mo differ diff --git a/locale/lo.mo b/locale/lo.mo index f320e9d3aa..7a1ca2330a 100644 Binary files a/locale/lo.mo and b/locale/lo.mo differ diff --git a/locale/lt.mo b/locale/lt.mo index 61237f9ac1..7abba8fb7e 100644 Binary files a/locale/lt.mo and b/locale/lt.mo differ diff --git a/locale/nb.mo b/locale/nb.mo index daaeb7cdcb..5cdeaa326a 100644 Binary files a/locale/nb.mo and b/locale/nb.mo differ diff --git a/locale/nl.mo b/locale/nl.mo index d696d89083..4e3deeb097 100644 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 35ab903a23..cf227bb8fa 100644 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 5d3dc8fdd3..31063c75d6 100644 Binary files a/locale/pl.mo and b/locale/pl.mo differ diff --git a/locale/pt.mo b/locale/pt.mo index f7eb1a41bd..ca42986b93 100644 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 0b1d58786a..74cf380188 100644 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 fa01a981f3..b557edd0bf 100644 Binary files a/locale/ro.mo and b/locale/ro.mo differ diff --git a/locale/ru.mo b/locale/ru.mo index aea7fd9bd3..f2279a204b 100644 Binary files a/locale/ru.mo and b/locale/ru.mo differ diff --git a/locale/sk.mo b/locale/sk.mo index 3f62a4225e..ce9d5ee00b 100644 Binary files a/locale/sk.mo and b/locale/sk.mo differ diff --git a/locale/sl.mo b/locale/sl.mo index 670d379294..97696f9d4f 100644 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 8d288550d9..8424738c40 100644 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 e960965c08..63f71cdecf 100644 Binary files a/locale/sv.mo and b/locale/sv.mo differ diff --git a/locale/th.mo b/locale/th.mo index ea0ef33e0e..7ba91676da 100644 Binary files a/locale/th.mo and b/locale/th.mo differ diff --git a/locale/tr.mo b/locale/tr.mo index 91fabf8ccd..20e9d60cee 100644 Binary files a/locale/tr.mo and b/locale/tr.mo differ diff --git a/locale/vi.mo b/locale/vi.mo index d3883701a6..c8d3e0774e 100644 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 fa587425fe..144e174b40 100644 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 3e1a25b33a..a098ad1ca9 100644 Binary files a/locale/zh_TW.mo and b/locale/zh_TW.mo differ diff --git a/ui/src/core/file-upload.js b/ui/src/core/file-upload.js index cdf182ba5b..82fac54dab 100644 --- a/ui/src/core/file-upload.js +++ b/ui/src/core/file-upload.js @@ -1,7 +1,7 @@ /* - * Copyright (C) 2020 Xibo Signage Ltd + * Copyright (C) 2023 Xibo Signage Ltd * - * Xibo - Digital Signage - http://www.xibo.org.uk + * Xibo - Digital Signage - https://xibosignage.com * * This file is part of Xibo. * @@ -85,6 +85,10 @@ function openUploadForm(options) { $(dialog).find('#files').on('change', handleVideoCoverImage); } + if (maxImagePixelSize > 0) { + $(dialog).find('#files').on('change', checkImagePixelSize); + } + // If we are not a multi-upload, then limit to 1 if (!options.templateOptions.multi) { uploadOptions = $.extend({}, uploadOptions, { @@ -185,7 +189,15 @@ function openUploadForm(options) { $button.attr('disabled', 'disabled'); } }) - .bind('fileuploaddrop', handleVideoCoverImage); + .bind('fileuploaddrop', function (e, data) { + if (options.videoImageCovers) { + handleVideoCoverImage(e, data) + } + + if (maxImagePixelSize > 0) { + checkImagePixelSize(e, data) + } + }) if (options.templateOptions.folderSelector) { // Handle creating a folder selector @@ -319,4 +331,47 @@ function saveVideoCoverImage(data) { data: thumbnailData }); } -} \ No newline at end of file +} + +function checkImagePixelSize(e, data) { + let files = data === undefined ? this.files : data.files; + + let $existingFiles = $('.template-upload canvas') + .closest('tr') + .find('td span.info') + + const checkExist = setInterval(function() { + if ($('.preview').find('canvas').length) { + // iterate through our files + Array.from(files).forEach(function(file, index) { + if (!file.error && file.type.includes('image')) { + // if we have existing files, adjust index + // to ensure we put the warning in the right place + if ($existingFiles.length > 0) { + if (index === 0) { + index = $existingFiles.length + } else { + index += $existingFiles.length + } + } + img = new Image(); + let objectUrl = URL.createObjectURL(file); + img.onload = function() { + if (this.width > maxImagePixelSize || this.height > maxImagePixelSize) { + const helpText = translations.imagePixelSizeTooLarge; + const $helpTextSelector = $('.template-upload canvas') + .closest('tr') + .find('td span.info')[index] + .append(helpText) + } + + URL.revokeObjectURL(objectUrl); + }; + img.src = objectUrl; + } + }); + + clearInterval(checkExist); + } + }, 300); +} diff --git a/ui/src/core/xibo-cms.js b/ui/src/core/xibo-cms.js index 4c419f3c39..e37c72217a 100644 --- a/ui/src/core/xibo-cms.js +++ b/ui/src/core/xibo-cms.js @@ -3648,7 +3648,7 @@ function initJsTreeAjax(container, id, isForm, ttl, onReady = null, onSelected = // check state let currentState = localStorage.getItem(id+'_folder_tree') // if we have no state saved, select the homeFolderId in the tree. - if (currentState === undefined || currentState === null) { + if ((currentState === undefined || currentState === null) && !isForm) { $(container).jstree(true).select_node(homeNodeId) } } @@ -3664,7 +3664,7 @@ function initJsTreeAjax(container, id, isForm, ttl, onReady = null, onSelected = folderIdInputSelector = '#formFolderId'; } - var selectedFolder = $(folderIdInputSelector).val(); + var selectedFolder = !$(folderIdInputSelector).val() ? homeNodeId : $(folderIdInputSelector).val(); if (selectedFolder !== undefined && selectedFolder !== '') { $(this).jstree('select_node', selectedFolder); diff --git a/ui/src/editor-core/toolbar.js b/ui/src/editor-core/toolbar.js index 0b7e31a2a5..b79be94ea8 100644 --- a/ui/src/editor-core/toolbar.js +++ b/ui/src/editor-core/toolbar.js @@ -1,3 +1,24 @@ +/* + * Copyright (C) 2023 Xibo Signage Ltd + * + * Xibo - Digital Signage - https://xibosignage.com + * + * This file is part of Xibo. + * + * Xibo is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * Xibo is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Xibo. If not, see . + */ + // NAVIGATOR Module // Load templates diff --git a/ui/src/helpers/form-helpers.js b/ui/src/helpers/form-helpers.js index 193c5d920b..08ece38aaa 100644 --- a/ui/src/helpers/form-helpers.js +++ b/ui/src/helpers/form-helpers.js @@ -1,3 +1,24 @@ +/* + * Copyright (C) 2023 Xibo Signage Ltd + * + * Xibo - Digital Signage - https://xibosignage.com + * + * This file is part of Xibo. + * + * Xibo is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * Xibo is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Xibo. If not, see . + */ + // Include templates const templates = { dataSetOrderClauseTemplate: require("../templates/form-helpers-data-set-order-clause.hbs"), @@ -890,7 +911,6 @@ let formHelpers = function() { var mediaId = dialog.find('form').data().mediaId; var widgetId = dialog.find('form').data().widgetId; var validExtensions = dialog.find('form').data().validExtensions; - // Append var replaceButton = $('