aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default/template/picture.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/template/picture.tpl')
-rw-r--r--themes/default/template/picture.tpl12
1 files changed, 8 insertions, 4 deletions
diff --git a/themes/default/template/picture.tpl b/themes/default/template/picture.tpl
index 6ea497112..00e548609 100644
--- a/themes/default/template/picture.tpl
+++ b/themes/default/template/picture.tpl
@@ -208,11 +208,15 @@ y.callService(
<input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}">
{/if}
{/foreach}
- <script type="text/javascript" src="{$ROOT_URL}themes/default/js/rating.js"></script>
<script type="text/javascript">
- makeNiceRatingForm( {ldelim}rootUrl: '{$ROOT_URL|@escape:"javascript"}', image_id: {$current.id},
- updateRateText: "{'Update your rating'|@translate|@escape:'javascript'}", updateRateElement: document.getElementById("updateRate"),
- ratingSummaryText: "{'%.2f (rated %d times)'|@translate|@escape:'javascript'}", ratingSummaryElement: document.getElementById("ratingSummary") {rdelim} );
+ var _pwgRatingAutoQueue = _pwgRatingAutoQueue || [];
+ _pwgRatingAutoQueue.push( {ldelim}rootUrl: '{$ROOT_URL|@escape:"javascript"}', image_id: {$current.id},
+ updateRateText: "{'Update your rating'|@translate|@escape:'javascript'}", updateRateElement: document.getElementById("updateRate"),
+ ratingSummaryText: "{'%.2f (rated %d times)'|@translate|@escape:'javascript'}", ratingSummaryElement: document.getElementById("ratingSummary") {rdelim} );
+ (function () {ldelim}
+ var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = '{$ROOT_URL}themes/default/js/rating.js';
+ var s0 = document.getElementsByTagName('script')[0]; s0.parentNode.insertBefore(s, s0);
+ })();
</script>
</div>
</form>