Fix merge conflict
authorMatthias Schmidt <gravatronics@live.com>
Sun, 6 Dec 2020 14:11:50 +0000 (15:11 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 6 Dec 2020 14:11:50 +0000 (15:11 +0100)
wcfsetup/install/files/js/WoltLabSuite/Core/Media/Manager/Select.js
wcfsetup/install/files/ts/WoltLabSuite/Core/Media/Manager/Select.js

index 21467b2b8b39247e83da092f1cb476c09112f1e9..c1a4ae23166bf45d0508c9931b8fa6080d6f201b 100644 (file)
@@ -96,7 +96,9 @@ define(['Core', 'Dom/Traverse', 'Dom/Util', 'Language', 'ObjectMap', 'Ui/Dialog'
             }
             var media = this._media.get(~~elData(event.currentTarget, 'object-id'));
             // save selected media in store element
-            elById(elData(this._activeButton, 'store')).value = media.mediaID;
+            var input = elById(elData(this._activeButton, 'store'));
+            input.value = media.mediaID;
+            Core.triggerEvent(input, 'change');
             // display selected media
             var display = elData(this._activeButton, 'display');
             if (display) {
@@ -174,7 +176,9 @@ define(['Core', 'Dom/Traverse', 'Dom/Util', 'Language', 'ObjectMap', 'Ui/Dialog'
             var removeButton = event.currentTarget;
             elHide(removeButton);
             var button = removeButton.previousElementSibling;
-            elById(elData(button, 'store')).value = 0;
+            var input = elById(elData(button, 'store'));
+            input.value = '';
+            Core.triggerEvent(input, 'change');
             var display = elData(button, 'display');
             if (display) {
                 var displayElement = elById(display);
index 1a034194336858552fcc401bcb8345d8c0a238fd..d0f397e033e3a4b6fab9896b1ed966e452627a4a 100644 (file)
@@ -110,7 +110,9 @@ define(['Core', 'Dom/Traverse', 'Dom/Util', 'Language', 'ObjectMap', 'Ui/Dialog'
                        var media = this._media.get(~~elData(event.currentTarget, 'object-id'));
                        
                        // save selected media in store element
-                       elById(elData(this._activeButton, 'store')).value = media.mediaID;
+                       var input = elById(elData(this._activeButton, 'store'));
+                       input.value = media.mediaID;
+                       Core.triggerEvent(input, 'change');
                        
                        // display selected media
                        var display = elData(this._activeButton, 'display');
@@ -203,7 +205,9 @@ define(['Core', 'Dom/Traverse', 'Dom/Util', 'Language', 'ObjectMap', 'Ui/Dialog'
                        elHide(removeButton);
                        
                        var button = removeButton.previousElementSibling;
-                       elById(elData(button, 'store')).value = 0;
+                       var input = elById(elData(button, 'store'));
+                       input.value = '';
+                       Core.triggerEvent(input, 'change');
                        var display = elData(button, 'display');
                        if (display) {
                                var displayElement = elById(display);