Skip to content
Code-Schnipsel Gruppen Projekte
Commit aff1dc5b erstellt von Michael Danielczok's avatar Michael Danielczok
Dateien durchsuchen

#97

Übergeordneter b141672b
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
......@@ -21,7 +21,6 @@
</label>
<label>
<span class="entry-title">{{review}}</span>
<input name="content" class="field-container-field field-description" data-qui="controls/editors/Input"/>
<input name="customerReviewsContent" class="field-container-field field-description" data-qui="controls/editors/Input"/>
</label>
</div>
\ No newline at end of file
......@@ -52,6 +52,35 @@ define('package/quiqqer/bricks/bin/Controls/CustomerReviews', [
});
},
/**
* @event on import
*
* https://dev.quiqqer.com/quiqqer/package-bricks/issues/97
*/
$onImport: function () {
// look if some value exist
var value = this.getElm().value;
if (value === '') {
return;
}
value = JSON.decode(value);
if (typeOf(value) !== 'array') {
return;
}
for (var i = 0, len = value.length; i < len; i++) {
if (typeof value[i].content !== 'undefined') {
value[i].customerReviewsContent = value[i].content;
}
}
this.getElm().value = JSON.encode(value);
this.parent();
},
/**
* set the project to the control
*
......
......@@ -25,7 +25,14 @@
<div class="customer-review customer-review-{$modKey} control-template" {if $title}title="{$title}"{/if}>
<div class="customer-review-content">
{$entry.content}
{* Fix content issue *}
{* https://dev.quiqqer.com/quiqqer/package-bricks/issues/97 *}
{if isset($entry['content']) && $entry['content']}
{$entry['content']}
{else if isset($entry['customerReviewsContent']) && $entry['customerReviewsContent']}
{$entry['customerReviewsContent']}
{/if}
{* end fix *}
</div>
<div class="customer-review-footer">
<div class="customer-review-footer-image">
......
......@@ -32,7 +32,14 @@
</div>
<div class="customer-review-content">
<div class="customer-review-content-text">
{$entry.content}
{* Fix content issue *}
{* https://dev.quiqqer.com/quiqqer/package-bricks/issues/97 *}
{if isset($entry['content']) && $entry['content']}
{$entry['content']}
{else if isset($entry['customerReviewsContent']) && $entry['customerReviewsContent']}
{$entry['customerReviewsContent']}
{/if}
{* end fix *}
</div>
<div class="customer-review-content-footer">
{if $entry.userName}
......@@ -45,6 +52,7 @@
{$entry.jobTitle}
</span>
{/if}
{if $entry.url}
<span class="customer-review-content-footer-url">
<a href="{$entry.url}" title="{$entry.url}" target="_blank" rel="nofollow">
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren