So ich bin etwas weiter gekommen, ich hab damals im attribute template ein Global eingefügt, weis aber bei Gott nichtmehr warum
Ich hab das mal auskommentiert und als Alternative den vendor Pfad genommen.
Leider bekomme ich immernoch den selben Fehler im Web Inspector:
Code:
Die Ressource von "http://c4.alpin-welt.at/vendor/metamodels/attribute_rating/src/Resources/public/moostarrating.js" wurde wegen eines MIME-Typ-Konfliktes ("text/html") blockiert (X-Content-Type-Options: nosniff).
Laden fehlgeschlagen für das <script> mit der Quelle "http://c4.alpin-welt.at/vendor/metamodels/attribute_rating/src/Resources/public/moostarrating.js".
templates/mm_attr_rating.html5
Code:
<?php #$GLOBALS['TL_JAVASCRIPT']['metamodelsattribute_rating'] = 'system/modules/metamodelsattribute_rating/html/moostarrating.js'; ?>
<?php $GLOBALS['TL_JAVASCRIPT']['metamodelsattribute_rating'] = 'vendor/metamodels/attribute_rating/src/Resources/public/moostarrating.js'; ?>
<script type="text/javascript>
(function($) {
window.addEvent("domready",function() {
// Create our instance
var starRater = new MooStarRating({
<?php if ($this->ratingDisabled): ?>disabled: true,<?php endif; ?>
form: "<?php echo $this->name; ?>",
radios: "<?php echo $this->name; ?>_rating",
half: <?php echo $this->rateHalf; ?>,
imageEmpty: '<?php echo $this->imageEmpty; ?>',
imageFull: '<?php echo $this->imageFull; ?>',
imageHover: '<?php echo $this->imageHover; ?>',
width: <?php echo $this->imageWidth; ?>,
tip: "<?php echo $this->tipText; ?></i>",
tipTarget: $('<?php echo $this->name; ?>_tip'),
tipTargetType: "html"
});
<?php if (TL_MODE == 'FE'): ?>
// Listen for star clicks
starRater.addEvent("click",function(value) {
// Send ajax request to server
new Request({
'url': "<?php echo $this->ajaxUrl; ?>",
//'data': { 'rating': value, data: <?php echo $this->ajaxData; ?> }
'data': { 'rating': value, data: <?php echo $this->ajaxData; ?>, REQUEST_TOKEN: "<?php echo REQUEST_TOKEN; ?>" }
}).send();
});
<?php endif; ?>
});
})(document.id);
</script>
<form name="<?php echo $this->name; ?>" class="<?php echo $this->additional_class; ?>">
<?php foreach ($this->options as $value): ?>
<input type="radio" name="<?php echo $this->name; ?>_rating"<?php if ($this->currentValue==$value): ?> checked="checked" <?php endif; ?> value="<?php echo $value ?>">
<?php endforeach; ?>
<span id="<?php echo $this->name; ?>_tip" class="ajax_rating_tip"></span>
<?php //Anzeigen wie oft gevotet wurde!
//echo $this->raw['votecount']; //Anzeige wie oft gevotet wurde
?>
</form>
Lesezeichen