View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006763 | module Visual CMS | module Visual CMS - sub | public | 2018-01-10 13:11 | 2018-01-11 12:02 |
Reporter | Hausenberg_Acando | Assigned To | |||
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | duplicate | ||
Product Version | 3.0.0 | ||||
Summary | 0006763: Mehrfachverwenung von Bildeingabekomponenten in einem Formular nicht möglich | ||||
Description | Es können pro Formular für ein Widget nur eine Bildeingabekomponente verwendet werden. Sobald man mehrere Bild-Eingabefelder definiert hat und bei der Pflege das erste Feld befüllt, sind nach dem Speichern alle Bild-Eingabefelder mit dem zuerst gewählten Bild belegt. | ||||
Steps To Reproduce | 1. Widget-Formular erstellen mit mindestens zwei Bild-Eingabefeldern. Z.B. 'image_desktop' => array( 'type' => 'image', 'label' => $this->trans('SHORTCODE_SERVICE_TEASER_DESKTOP_IMAGE'), 'preview' => true, 'validation' => 'required', 'validationErrorMsg' => $this->trans('SHORTCODE_VALIDATION_REQUIRED'), ), 'image_mobile' => array( 'type' => 'image', 'label' => $this->trans('SHORTCODE_SERVICE_TEASER_MOBILE_IMAGE'), 'preview' => true, 'validation' => 'required', 'validationErrorMsg' => $this->trans('SHORTCODE_VALIDATION_REQUIRED'), ), 2. Widget über das OXID User Interface anlegen und in beiden Eingabefeldern ein unterschiedliches Bild auswählen. Dann speichern. Sobald man wieder in den Bearbeitungsmodus wechselt, sieht man in den Preview-Feld bereits, dass in beiden Fällen dasselbe Bild angezeigt wird. | ||||
Additional Information | Ich habe eine Anpassung in der Datei visualeditor.js vorgenommen um das Problem zu lösen. Die Anpassungen müssten im Grunde nur übernommen und getestet werden. Bei uns funktioniert die Anpassung ohne Problem. 1) Zeile 1033 VisualEditor.prototype.serializeInputImages = function ( $target ) { var data = []; if ( $target.data( 'multi' ) === '1' ) { $( '.dd-widget-item-col', $target ).each( function () { data.push( $( '.dd-widget-image-item', this ).data( 'file' ) ); } ); } else { $($target).each(function (){ data.push( $( '.dd-widget-item-col .dd-widget-image-item', this ).first().data( 'file' ) ); }) } return data; }; 2) Zeile 1479 if ( $imageList.length ) { $imageList.each( function (index) { var type_match = $( this ).data( 'input-name' ).match( new RegExp( "^" + type + "\\\[([^\\\]]*)\\\](\\\[?)" ) ); if( type_match ) { params[ type_match[ 1 ] ] = self.serializeInputImages($imageList)[index]; } } ); } | ||||
Tags | No tags attached. | ||||
duplicate of | 0006764 | resolved | benjamin.joerger | Multiple usage of input fields of type image not possible within one widget-form |
|
Thank you for your help and the detailed information. I have to ask you for 2 small additions. First we would need the entry to be in english to make it easier for our developers to work with it. Second, can you provide some more in depth information about how exactly to reproduce this issue? Like which widget got used, etc. Thanks alot in advance. |
|
I cloned this issue and translated it to english as I could not find an editing button https://bugs.oxid-esales.com/view.php?id=6764 Feel free to close this one |