[Fusionforge-commits] r10942 - trunk/src/plugins/wiki/www/themes/fusionforge

Alain Peyrat aljeux at libremir.placard.fr.eu.org
Mon Oct 11 21:17:35 CEST 2010


Author: aljeux
Date: 2010-10-11 21:17:35 +0200 (Mon, 11 Oct 2010)
New Revision: 10942

Modified:
   trunk/src/plugins/wiki/www/themes/fusionforge/wikilens-min.js
Log:
Minimize wikilens.js

Modified: trunk/src/plugins/wiki/www/themes/fusionforge/wikilens-min.js
===================================================================
--- trunk/src/plugins/wiki/www/themes/fusionforge/wikilens-min.js	2010-10-11 19:17:25 UTC (rev 10941)
+++ trunk/src/plugins/wiki/www/themes/fusionforge/wikilens-min.js	2010-10-11 19:17:35 UTC (rev 10942)
@@ -1 +1 @@
-var rating=new Array;var prediction=new Array;var avg=new Array;var numusers=new Array;var canRate=new Array;var msg_rating_votes="Rating: %.1f (%d votes)";var msg_curr_rating="Your current rating: ";var msg_curr_prediction="Your current prediction: ";var msg_to=" to ";var msg_add_rating="Add your rating: ";var msg_thanks="Thanks!";var msg_rating_deleted="Rating deleted!";var rateit_imgsrc="/plugins/wiki/themes/fusionforge/images/RateIt";var rateit_action="RateIt";var idTop="";function displayRating(a,d,k,b,q){var c=new Array("Not Rated","Awful","Very Poor","Poor","Below Average","Average","Above Average","Good","Very Good","Excellent","Outstanding");var r=a+d+"Cancel";var n=rating[a];var h=prediction[a];var m="";var p=rateit_imgsrc;if(q){m=msg_curr_rating+n+" "+c[n*2];var o=". ";if(b){m=m+" "+msg_curr_prediction+h+" "+c[h*2]}if(canRate[a]){if(n){document[r].style.display="inline"}else{document[r].style.display="none"}}}for(var g=1;g<=10;g++){var l=a+g;if(q){var f=g/2;if(k>0){if(n){document[l].onmouseout=function(){displayRating(a,d,avg[a],0,0)}}else{if(h){document[l].onmouseout=function(){displayRating(a,d,h,1,0)}}}if(n!=k&&typeof(msg_chg_rating)!="undefined"){document[l].title=msg_chg_rating+n+" "+c[n*2]+msg_to+f+" "+c[g]}}else{document[l].onmouseout=function(){displayRating(a,d,avg[a],0,0)};document[l].title=msg_add_rating+f+" "+c[g]}}var e="N";if(b){if(q){document[l].title=m+o+msg_add_rating+c[g]}e="R"}else{if(g<=(k*2)){e="O"}}document[l].src=p+d+e+((g%2)?"k1":"k0")+".png"}}function displayRating2(a,d,k,b,q){var c=new Array("Not Rated","Awful","Very Poor","Poor","Below Average","Average","Above Average","Good","Very Good","Excellent","Outstanding");var r=a+d+"Cancel";var n=rating[a];var h=prediction[a];var m="";var p=rateit_imgsrc;if(q){m=msg_curr_rating+n+" "+c[n*2];var o=". ";if(b){m=m+" "+msg_curr_prediction+h+" "+c[h*2]}if(n){document[r].style.display="inline"}else{document[r].style.display="none"}}for(var g=1;g<=10;g++){var l=a+g;if(q){var f=g/2;if(k>0){if(n){document[l].onmouseout=function(){displayRating(a,d,avg[a],0,0)}}else{if(h){document[l].onmouseout=function(){displayRating(a,d,h,1,0)}}}if(n!=k&&typeof(msg_chg_rating)!="undefined"){document[l].title=msg_chg_rating+n+" "+c[n*2]+msg_to+f+" "+c[g]}}else{document[l].onmouseout=function(){displayRating(a,d,avg[a],0,0)};document[l].title=msg_add_rating+f+" "+c[g]}}var e="N";if(b){if(q){document[l].title=m+o+msg_add_rating+c[g]}e="R"}else{if(k<=n){if(g<=(k*2)){e="Rp"}else{if(g<=(n*2)){e="R"}}}else{if(g<=(n*2)){e="Rp"}else{if(g<=(k*2)){e="Rm"}}}}document[l].src=p+d+e+((g%2)?"k1":"k0")+".png"}}function sprintfRating(b,a,c){var d=Math.round(a*10)/10;if(c<2){b=b.replace(/votes/,"vote")}return b.replace(/\%.1f/,d).replace(/\%d/,c)}function clickRating(c,f,i,a,e,g){var h=a+"Action";var j=document.getElementById("rateit-widget-top");var k=numusers[a];var b=rating[a];if(g=="X"){deleteRating(h,f,e);if(j&&k){var d=avg[a]*k;var l;if(b&&b>0){if(k>1){l=(d-b)/(k-1);numusers[a]--}else{l=0;numusers[a]=0}}if(l.toString()!="NaN"&&idTop==a){avg[a]=l;j.childNodes[0].innerHTML=sprintfRating(msg_rating_votes,l,k-1)}}rating[a]=0;displayRating2(a,c,0,0,1)}else{submitRating(h,f,i,e,g);if(j&&k){var d=avg[a]*k;var l;if(b&&(b>0)){l=(d+g-b)/k}else{l=(d+g)/(k+1);numusers[a]++}if(l.toString()!="NaN"&&idTop==a){avg[a]=l;if(g!=rating[a]){j.childNodes[0].innerHTML=sprintfRating(msg_rating_votes,l,numusers[a])}}}else{if(j&&idTop==a){j.childNodes[0].innerHTML=sprintfRating(msg_rating_votes,g,1);avg[a]=g;numusers[a]=1}}rating[a]=g;displayRating2(a,c,g,0,1)}}function submitRating(d,e,a,f,g){var c=Math.round(Math.random()*(1000000));var b=WikiURL(e)+"version="+a+"&action="+rateit_action+"&mode=add&rating="+g+"&dimension="+f+"&nocache=1&nopurge=1&rand="+c;document[d].title=msg_thanks;document[d].src=b}function deleteRating(c,d,e){var b=Math.round(Math.random()*(1000000));var a=WikiURL(d)+"action="+rateit_action+"&mode=delete&dimension="+e+"&nocache=1&nopurge=1&rand="+b;document[c].title=msg_rating_deleted;document[c].src=a};
\ No newline at end of file
+var rating=new Array;var prediction=new Array;var avg=new Array;var numusers=new Array;var canRate=new Array;var msg_rating_votes="Rating: %.1f (%d votes)";var msg_curr_rating="Your current rating: ";var msg_curr_prediction="Your current prediction: ";var msg_to=" to ";var msg_add_rating="Add your rating: ";var msg_thanks="Thanks!";var msg_rating_deleted="Rating deleted!";var rateit_imgsrc="/wiki/themes/fusionforge/images/RateIt";var rateit_action="RateIt";var idTop="";function displayRating(a,d,k,b,q){var c=new Array("Not Rated","Awful","Very Poor","Poor","Below Average","Average","Above Average","Good","Very Good","Excellent","Outstanding");var r=a+d+"Cancel";var n=rating[a];var h=prediction[a];var m="";var p=rateit_imgsrc;if(q){m=msg_curr_rating+n+" "+c[n*2];var o=". ";if(b){m=m+" "+msg_curr_prediction+h+" "+c[h*2]}if(canRate[a]){if(n){document[r].style.display="inline"}else{document[r].style.display="none"}}}for(var g=1;g<=10;g++){var l=a+g;if(q){var f=g/2;if(k>0){if(n){document[l].onmouseout=function(){displayRating(a,d,avg[a],0,0)}}else{if(h){document[l].onmouseout=function(){displayRating(a,d,h,1,0)}}}if(n!=k&&typeof(msg_chg_rating)!="undefined"){document[l].title=msg_chg_rating+n+" "+c[n*2]+msg_to+f+" "+c[g]}}else{document[l].onmouseout=function(){displayRating(a,d,avg[a],0,0)};document[l].title=msg_add_rating+f+" "+c[g]}}var e="N";if(b){if(q){document[l].title=m+o+msg_add_rating+c[g]}e="R"}else{if(g<=(k*2)){e="O"}}document[l].src=p+d+e+((g%2)?"k1":"k0")+".png"}}function displayRating2(a,d,k,b,q){var c=new Array("Not Rated","Awful","Very Poor","Poor","Below Average","Average","Above Average","Good","Very Good","Excellent","Outstanding");var r=a+d+"Cancel";var n=rating[a];var h=prediction[a];var m="";var p=rateit_imgsrc;if(q){m=msg_curr_rating+n+" "+c[n*2];var o=". ";if(b){m=m+" "+msg_curr_prediction+h+" "+c[h*2]}if(n){document[r].style.display="inline"}else{document[r].style.display="none"}}for(var g=1;g<=10;g++){var l=a+g;if(q){var f=g/2;if(k>0){if(n){document[l].onmouseout=function(){displayRating(a,d,avg[a],0,0)}}else{if(h){document[l].onmouseout=function(){displayRating(a,d,h,1,0)}}}if(n!=k&&typeof(msg_chg_rating)!="undefined"){document[l].title=msg_chg_rating+n+" "+c[n*2]+msg_to+f+" "+c[g]}}else{document[l].onmouseout=function(){displayRating(a,d,avg[a],0,0)};document[l].title=msg_add_rating+f+" "+c[g]}}var e="N";if(b){if(q){document[l].title=m+o+msg_add_rating+c[g]}e="R"}else{if(k<=n){if(g<=(k*2)){e="Rp"}else{if(g<=(n*2)){e="R"}}}else{if(g<=(n*2)){e="Rp"}else{if(g<=(k*2)){e="Rm"}}}}document[l].src=p+d+e+((g%2)?"k1":"k0")+".png"}}function sprintfRating(b,a,c){var d=Math.round(a*10)/10;if(c<2){b=b.replace(/votes/,"vote")}return b.replace(/\%.1f/,d).replace(/\%d/,c)}function clickRating(c,f,i,a,e,g){var h=a+"Action";var j=document.getElementById("rateit-widget-top");var k=numusers[a];var b=rating[a];if(g=="X"){deleteRating(h,f,e);if(j&&k){var d=avg[a]*k;var l;if(b&&b>0){if(k>1){l=(d-b)/(k-1);numusers[a]--}else{l=0;numusers[a]=0}}if(l.toString()!="NaN"&&idTop==a){avg[a]=l;j.childNodes[0].innerHTML=sprintfRating(msg_rating_votes,l,k-1)}}rating[a]=0;displayRating2(a,c,0,0,1)}else{submitRating(h,f,i,e,g);if(j&&k){var d=avg[a]*k;var l;if(b&&(b>0)){l=(d+g-b)/k}else{l=(d+g)/(k+1);numusers[a]++}if(l.toString()!="NaN"&&idTop==a){avg[a]=l;if(g!=rating[a]){j.childNodes[0].innerHTML=sprintfRating(msg_rating_votes,l,numusers[a])}}}else{if(j&&idTop==a){j.childNodes[0].innerHTML=sprintfRating(msg_rating_votes,g,1);avg[a]=g;numusers[a]=1}}rating[a]=g;displayRating2(a,c,g,0,1)}}function submitRating(d,e,a,f,g){var c=Math.round(Math.random()*(1000000));var b=WikiURL(e)+"version="+a+"&action="+rateit_action+"&mode=add&rating="+g+"&dimension="+f+"&nocache=1&nopurge=1&rand="+c;document[d].title=msg_thanks;document[d].src=b}function deleteRating(c,d,e){var b=Math.round(Math.random()*(1000000));var a=WikiURL(d)+"action="+rateit_action+"&mode=delete&dimension="+e+"&nocache=1&nopurge=1&rand="+b;document[c].title=msg_rating_deleted;document[c].src=a};
\ No newline at end of file




More information about the Fusionforge-commits mailing list