Missing comments and code style adjustments
authorAlexander Ebert <ebert@woltlab.com>
Sat, 13 Jun 2020 10:16:20 +0000 (12:16 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 13 Jun 2020 10:16:20 +0000 (12:16 +0200)
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/UserConsent.js
wcfsetup/install/files/lib/data/bbcode/media/provider/BBCodeMediaProvider.class.php
wcfsetup/install/files/style/ui/messageUserConsent.scss

index 348e99dd1e58eca3ea1f3c9abe9f09c2a318e8fe..59c10ce8c1a2e31e5be188a746c33a4ce46057b8 100644 (file)
@@ -1,3 +1,11 @@
+/**
+ * Prompts the user for their consent before displaying external media.
+ * 
+ * @author      Alexander Ebert
+ * @copyright   2001-2020 WoltLab GmbH
+ * @license     GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @module      WoltLabSuite/Core/Ui/Message/UserConsent
+ */
 define(['Ajax', 'Core', 'User', 'Dom/ChangeListener', 'Dom/Util'], function (Ajax, Core, User, DomChangeListener, DomUtil) {
        var _enableAll = false;
        var _knownButtons = (typeof window.WeakSet === 'function') ? new window.WeakSet() : new window.Set();
@@ -30,6 +38,9 @@ define(['Ajax', 'Core', 'User', 'Dom/ChangeListener', 'Dom/Util'], function (Aja
                        }
                },
                
+               /**
+                * @param {Event} event
+                */
                _click: function (event) {
                        event.preventDefault();
                        
@@ -51,6 +62,9 @@ define(['Ajax', 'Core', 'User', 'Dom/ChangeListener', 'Dom/Util'], function (Aja
                        }
                },
                
+               /**
+                * @param {Element} container
+                */
                _enableExternalMedia: function (container) {
                        var payload = atob(elData(container, 'payload'));
                        
index b3e9d91d3b8d58fd98e9493ceb30a4b01550252d..9d74756472372729d647c20a800a1ac378c607f7 100644 (file)
@@ -100,7 +100,7 @@ class BBCodeMediaProvider extends DatabaseObject implements IRouteController {
                        if (!$regex->match($url)) continue;
                        
                        if ($this->getCallback() !== null) {
-                               return $this->getOutputForUserConsent($url, $this->getCallback()->parse($url, $regex->getMatches()) );
+                               return $this->getOutputForUserConsent($url, $this->getCallback()->parse($url, $regex->getMatches()));
                        }
                        else {
                                $output = $this->html;
index a51d26645c95c4aadec4c4930a2ec7ca67b7b2e3..8413d5a3e21684c5a5e82d21ca2d9f2e582d86d9 100644 (file)
@@ -12,7 +12,7 @@
 }
 
 .messageUserConsentHeader {
-       display:flex;
+       display: flex;
        justify-content: space-between;
 }