Anpassung Pfad zu public Ressourcen

This commit is contained in:
Carsten Götzinger 2018-02-14 16:17:58 +01:00
parent 9cef234103
commit 38d4df8232
12 changed files with 78 additions and 78 deletions

View File

@ -90,15 +90,15 @@ class RateItArticle extends RateItFrontend {
$objTemplate->rateit_rating_after = true;
}
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/public/js/onReadyRateIt.js|static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/public/js/rateit.js|static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/public/css/rateit.min.css||static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/onReadyRateIt.js|static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/rateit.js|static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/rateit.min.css||static';
switch ($GLOBALS['TL_CONFIG']['rating_type']) {
case 'hearts' :
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/public/css/heart.min.css||static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/heart.min.css||static';
break;
default:
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/public/css/star.min.css||static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/star.min.css||static';
}
}
@ -148,15 +148,15 @@ class RateItArticle extends RateItFrontend {
$article['rateit_rating_after'] = true;
}
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/public/js/onReadyRateIt.js|static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/public/js/rateit.js|static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/public/css/rateit.min.css||static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/onReadyRateIt.js|static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/rateit.js|static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/rateit.min.css||static';
switch ($GLOBALS['TL_CONFIG']['rating_type']) {
case 'hearts' :
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/public/css/heart.min.css||static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/heart.min.css||static';
break;
default:
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/public/css/star.min.css||static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/star.min.css||static';
}
}
@ -232,15 +232,15 @@ class RateItArticle extends RateItFrontend {
$objTemplate->arrRating = $arrRating;
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/public/js/onReadyRateIt.js|static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/public/js/rateit.js|static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/public/css/rateit.min.css||static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/onReadyRateIt.js|static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/rateit.js|static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/rateit.min.css||static';
switch ($GLOBALS['TL_CONFIG']['rating_type']) {
case 'hearts' :
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/public/css/heart.min.css||static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/heart.min.css||static';
break;
default:
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/public/css/star.min.css||static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/star.min.css||static';
}
}

View File

@ -59,15 +59,15 @@ class RateItFaq extends RateItFrontend {
$strBuffer = $this->generateForFaqPage($objModule, $strBuffer);
}
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/public/js/onReadyRateIt.js|static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/public/js/rateit.js|static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/public/css/rateit.min.css||static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/onReadyRateIt.js|static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/rateit.js|static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/rateit.min.css||static';
switch ($GLOBALS['TL_CONFIG']['rating_type']) {
case 'hearts' :
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/public/css/heart.min.css||static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/heart.min.css||static';
break;
default:
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/public/css/star.min.css||static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/star.min.css||static';
}
}
}

View File

@ -66,15 +66,15 @@ abstract class RateItHybrid extends RateItFrontend
$this->strType = $GLOBALS['TL_CONFIG']['rating_type'];
$this->strTextPosition = $GLOBALS['TL_CONFIG']['rating_textposition'];
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/public/js/onReadyRateIt.js|static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/public/js/rateit.js|static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/public/css/rateit.min.css||static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/onReadyRateIt.js|static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/rateit.js|static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/rateit.min.css||static';
switch ($this->strType) {
case 'hearts' :
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/public/css/heart.min.css||static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/heart.min.css||static';
break;
default:
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/public/css/star.min.css||static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/star.min.css||static';
}
return parent::generate();

View File

@ -69,15 +69,15 @@ class RateItNews extends RateItFrontend {
$objTemplate->rateit_rating_after = true;
}
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/public/js/onReadyRateIt.js|static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/public/js/rateit.js|static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/public/css/rateit.min.css||static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/onReadyRateIt.js|static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/rateit.js|static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/rateit.min.css||static';
switch ($GLOBALS['TL_CONFIG']['rating_type']) {
case 'hearts' :
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/public/css/heart.min.css||static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/heart.min.css||static';
break;
default:
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/public/css/star.min.css||static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/star.min.css||static';
}
}
}

View File

@ -76,7 +76,7 @@ class RateItPage extends \Frontend {
$strHeadTags = '';
if (is_array($GLOBALS['TL_CSS'])) {
foreach ($GLOBALS['TL_CSS'] as $script) {
if ($this->startsWith($script, 'bundles/cgoitrateit/public/css/rateit') === true) {
if ($this->startsWith($script, 'bundles/cgoitrateit/css/rateit') === true) {
$included = true;
break;
}
@ -84,13 +84,13 @@ class RateItPage extends \Frontend {
}
if (!$included) {
$strHeadTags = '<link rel="stylesheet" href="'.$this->addStaticUrlTo('bundles/cgoitrateit/public/css/rateit.min.css').'">';
$strHeadTags = '<link rel="stylesheet" href="'.$this->addStaticUrlTo('bundles/cgoitrateit/css/rateit.min.css').'">';
switch ($GLOBALS['TL_CONFIG']['rating_type']) {
case 'hearts' :
$strHeadTags .= '<link rel="stylesheet" href="'.$this->addStaticUrlTo('bundles/cgoitrateit/public/css/heart.min.css').'">';
$strHeadTags .= '<link rel="stylesheet" href="'.$this->addStaticUrlTo('bundles/cgoitrateit/css/heart.min.css').'">';
break;
default:
$strHeadTags .= '<link rel="stylesheet" href="'.$this->addStaticUrlTo('bundles/cgoitrateit/public/css/star.min.css').'">';
$strHeadTags .= '<link rel="stylesheet" href="'.$this->addStaticUrlTo('bundles/cgoitrateit/css/star.min.css').'">';
}
}
return $strHeadTags;
@ -101,7 +101,7 @@ class RateItPage extends \Frontend {
$strHeadTags = '';
if (is_array($GLOBALS['TL_JAVASCRIPT'])) {
foreach ($GLOBALS['TL_JAVASCRIPT'] as $script) {
if ($this->startsWith($script, 'bundles/cgoitrateit/public/js/rateit') === true) {
if ($this->startsWith($script, 'bundles/cgoitrateit/js/rateit') === true) {
$included = true;
break;
}
@ -109,8 +109,8 @@ class RateItPage extends \Frontend {
}
if (!$included) {
$strHeadTags = '<script' . (($objPage->outputFormat == 'xhtml') ? ' type="text/javascript"' : '') . ' src="' . $this->addStaticUrlTo('bundles/cgoitrateit/public/js/onReadyRateIt.js') . '"></script>' . "\n";
$strHeadTags .= '<script' . (($objPage->outputFormat == 'xhtml') ? ' type="text/javascript"' : '') . ' src="' . $this->addStaticUrlTo('bundles/cgoitrateit/public/js/rateit.js') . '"></script>' . "\n";
$strHeadTags = '<script' . (($objPage->outputFormat == 'xhtml') ? ' type="text/javascript"' : '') . ' src="' . $this->addStaticUrlTo('bundles/cgoitrateit/js/onReadyRateIt.js') . '"></script>' . "\n";
$strHeadTags .= '<script' . (($objPage->outputFormat == 'xhtml') ? ' type="text/javascript"' : '') . ' src="' . $this->addStaticUrlTo('bundles/cgoitrateit/js/rateit.js') . '"></script>' . "\n";
}
return $strHeadTags;
}

View File

@ -67,15 +67,15 @@ class RateItTopRatingsModule extends RateItFrontend
$this->arrTypes = deserialize($this->rateit_types);
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/public/js/onReadyRateIt.js|static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/public/js/rateit.js|static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/public/css/rateit.min.css||static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/onReadyRateIt.js|static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/rateit.js|static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/rateit.min.css||static';
switch ($GLOBALS['TL_CONFIG']['rating_type']) {
case 'hearts' :
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/public/css/heart.min.css||static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/heart.min.css||static';
break;
default:
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/public/css/star.min.css||static';
$GLOBALS['TL_CSS'][] = 'bundles/cgoitrateit/css/star.min.css||static';
}
return parent::generate();

View File

@ -2,7 +2,7 @@
// Add the colorbox style sheet and javascript
$GLOBALS['TL_CSS'][] = 'assets/jquery/colorbox/'. COLORBOX .'/css/colorbox.min.css||static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/public/js/jquery/colorbox/colorbox-rateit.min.js|static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/jquery/colorbox/colorbox-rateit.min.js|static';
?>

View File

@ -2,7 +2,7 @@
// Add the colorbox style sheet and javascript
$GLOBALS['TL_CSS'][] = 'assets/jquery/colorbox/'. COLORBOX .'/css/colorbox.min.css||static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/public/js/jquery/colorbox/colorbox-rateit.min.js|static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/jquery/colorbox/colorbox-rateit.min.js|static';
?>

View File

@ -2,7 +2,7 @@
// Add the mediabox style sheet and javascript
$GLOBALS['TL_CSS'][] = 'assets/mootools/mediabox/'. MEDIABOX .'/css/mediaboxAdvBlack21.css||static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/public/js/mootools/mediabox/mediabox-rateit.js|static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/mootools/mediabox/mediabox-rateit.js|static';
?>

View File

@ -2,7 +2,7 @@
// Add the mediabox style sheet
$GLOBALS['TL_CSS'][] = 'assets/mootools/mediabox/'. MEDIABOX .'/css/mediaboxAdvBlack21.css||static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/public/js/mootools/mediabox/mediabox-rateit.js|static';
$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/cgoitrateit/js/mootools/mediabox/mediabox-rateit.js|static';
?>

View File

@ -567,14 +567,14 @@ function doRateIt() {
jQuery(document).ready(function() {
jQuery.ajax({
type: "GET",
url: "bundles/cgoitrateit/public/js/jquery-ui-effects.custom.min.js",
url: "bundles/cgoitrateit/js/jquery-ui-effects.custom.min.js",
dataType: "script",
async: false,
cache: true
});
jQuery.ajax({
type: "GET",
url: "bundles/cgoitrateit/public/js/helper.min.js",
url: "bundles/cgoitrateit/js/helper.min.js",
dataType: "script",
async: false,
cache: true

View File

@ -20,5 +20,5 @@ el.data('selected').css('width',el.data('newFill'));},mouseCrap:function(event){
var fillPercent=self.getVotePercent(fill);var nextStep=Math.ceil((fillPercent/100)*self.options.max);var w=nextStep*self.options.starwidth;if(parseInt(el.data('hover').css('width'))!=w){el.data('selected').css('display','none');el.data('hover').css('width',Math.min(w,self.options.starwidth*self.options.max));el.data('hover').css('display','block');}
var newFill=nextStep/self.options.max*100;self.fillVote(newFill,el);},getStarPercent:function(id){var stars=id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/);if(stars!=null){var score=parseFloat(stars[3]);var scale=parseFloat(stars[4]);var percent=(score/scale)*100;return percent;}else{return 0;}},getFillPercent:function(starPercent){return(starPercent/100)*(this.options.starwidth*this.options.max);},getVotePercent:function(actVote){var starsWidth=this.options.starwidth*this.options.max;var percent=(actVote/starsWidth*100).toFixed(2);return percent;},getRatableId:function(id){var stars=id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/);return stars!=null?stars[1]:'';},getRatableType:function(id){var stars=id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/);return stars!=null?stars[2]:'';},getRatableMaxValue:function(id){var stars=id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/);return stars!=null?parseInt(stars[4]):0;},setBackgroundPosition:function(el,pos){el.css('background-position','0% '+pos+'px');},getBackgroundImagePath:function(el){return el.css("background-image");},getBackgroundImage:function(el){var dfd=jQuery.Deferred();var backgroundImageSize=new Array();var reg_imgFile=/url\s*\(["']?(.*)["']?\)/i;var string=this.getBackgroundImagePath(el);string=string.match(reg_imgFile)[1];string=string.replace('\"','');jQuery('<img/>').attr('src',string).load(function(){backgroundImageSize.push(this.width);backgroundImageSize.push(this.height);dfd.resolve(backgroundImageSize);});return dfd.promise();},updateText:function(el,text){error=text.split('ERROR:')[1];el.data('textEl').removeClass('loading');if(error){this.RateItRating.showError(el,error);return false;}
el.data('textEl').text(text);if(typeof(jQuery('.mbrateItRating'))!='undefined'&&el.data('id').indexOf('mb')==0){var mbid=el.attr('id');mbid=mbid.replace('mb','');if(typeof(arrRatings)=='object'){for(var ri=0;ri<arrRatings.length;ri++){if(arrRatings[ri].rateItID==mbid){arrRatings[ri].description=text;break;}}}
if(typeof(jQuery('#'+jEscape(mbid)))!='undefined'){jQuery('#'+jEscape(mbid)).find('.ratingText').text(text);}}else{if(typeof(arrRatings)=='object'){for(var ri=0;ri<arrRatings.length;ri++){if(arrRatings[ri].rateItID==el.data('id')){arrRatings[ri].description=text;break;}}}}},showError:function(el,error){el.data('textEl').addClass('ratingError');el.data('textEl').text(error);setTimeout(function(){el.data('textEl').text(el.data('oldTxt'));el.data('textEl').removeClass('ratingError');},2000);}};})(jQuery);jQuery(document).ready(function(){jQuery.ajax({type:"GET",url:"bundles/cgoitrateit/public/js/jquery-ui-effects.custom.min.js",dataType:"script",async:false,cache:true});jQuery.ajax({type:"GET",url:"bundles/cgoitrateit/public/js/helper.min.js",dataType:"script",async:false,cache:true});RateItRating=Object.create(RateItRatings).initialize({url:'SimpleAjaxFrontend.php?do=rateit'});});var jEscape=function(jquery){jquery=jquery.replace(new RegExp("\\$","g"),"\\$");jquery=jquery.replace(new RegExp("\~","g"),"\\~");jquery=jquery.replace(new RegExp("\\[","g"),"\\[");jquery=jquery.replace(new RegExp("\\]","g"),"\\]");jquery=jquery.replace(new RegExp("\\|","g"),"\\|");jquery=jquery.replace(new RegExp("\\.","g"),"\\.");jquery=jquery.replace(new RegExp("#","g"),"\\#");return jquery;};}}
if(typeof(jQuery('#'+jEscape(mbid)))!='undefined'){jQuery('#'+jEscape(mbid)).find('.ratingText').text(text);}}else{if(typeof(arrRatings)=='object'){for(var ri=0;ri<arrRatings.length;ri++){if(arrRatings[ri].rateItID==el.data('id')){arrRatings[ri].description=text;break;}}}}},showError:function(el,error){el.data('textEl').addClass('ratingError');el.data('textEl').text(error);setTimeout(function(){el.data('textEl').text(el.data('oldTxt'));el.data('textEl').removeClass('ratingError');},2000);}};})(jQuery);jQuery(document).ready(function(){jQuery.ajax({type:"GET",url:"bundles/cgoitrateit/js/jquery-ui-effects.custom.min.js",dataType:"script",async:false,cache:true});jQuery.ajax({type:"GET",url:"bundles/cgoitrateit/js/helper.min.js",dataType:"script",async:false,cache:true});RateItRating=Object.create(RateItRatings).initialize({url:'SimpleAjaxFrontend.php?do=rateit'});});var jEscape=function(jquery){jquery=jquery.replace(new RegExp("\\$","g"),"\\$");jquery=jquery.replace(new RegExp("\~","g"),"\\~");jquery=jquery.replace(new RegExp("\\[","g"),"\\[");jquery=jquery.replace(new RegExp("\\]","g"),"\\]");jquery=jquery.replace(new RegExp("\\|","g"),"\\|");jquery=jquery.replace(new RegExp("\\.","g"),"\\.");jquery=jquery.replace(new RegExp("#","g"),"\\#");return jquery;};}}
onReadyRateIt(function(){doRateIt();});