Index: lams_central/web/css/jquery.jRating.css =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/css/jquery.jRating.css,v diff -u -r1.1 -r1.2 --- lams_central/web/css/jquery.jRating.css 15 Nov 2012 14:35:17 -0000 1.1 +++ lams_central/web/css/jquery.jRating.css 19 Feb 2013 10:51:09 -0000 1.2 @@ -46,5 +46,5 @@ } /** Please, note this is a LAMS customization. In case of library upgrade copy these lines manually. **/ -.rating-stars-div {float:left; padding-right: 12px; margin-top: -8px;} +.rating-stars-div {float:right; padding-right: 10px; margin-top: -8px; min-height: 45px;} .rating-stars-caption {text-align: center; padding-top: 6px;} Index: lams_central/web/includes/javascript/jquery.jRating.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/jquery.jRating.js,v diff -u -r1.1 -r1.2 --- lams_central/web/includes/javascript/jquery.jRating.js 15 Nov 2012 14:35:17 -0000 1.1 +++ lams_central/web/includes/javascript/jquery.jRating.js 19 Feb 2013 10:51:09 -0000 1.2 @@ -1,8 +1,8 @@ /************************************************************************ ************************************************************************* @Name : jRating - jQuery Plugin -@Revison : 2.3 -@Date : 07/09/2012 +@Revison : 3.0 +@Date : 28/01/2013 @Author: ALPIXEL - (www.myjqueryplugins.com - www.alpixel.fr) @License : Open Source - MIT License : http://www.opensource.org/licenses/mit-license.php @@ -26,13 +26,15 @@ step:false, // if true, mouseover binded star by star, isDisabled:false, showRateInfo: true, + canRateAgain : false, /** Integer vars **/ length:5, // number of star to display decimalLength : 0, // number of decimals.. Max 3, but you can complete the function 'getNote' rateMax : 20, // maximal rate - integer from 0 to 9999 (or more) rateInfosX : -45, // relative position in X axis of the info box when mouseover rateInfosY : 5, // relative position in Y axis of the info box when mouseover + nbRates : 1, /** Functions **/ onSuccess : null, @@ -41,11 +43,15 @@ if(this.length>0) return this.each(function() { + /*vars*/ var opts = $.extend(defaults, op), newWidth = 0, starWidth = 0, starHeight = 0, - bgPath = ''; + bgPath = '', + hasRated = false, + globalWidth = 0, + nbOfRates = opts.nbRates; if($(this).hasClass('jDisabled') || opts.isDisabled) var jDisabled = true; @@ -55,8 +61,8 @@ getStarWidth(); $(this).height(starHeight); - var average = parseFloat($(this).attr('id').split('_')[0]), - idBox = parseInt($(this).attr('id').split('_')[1]), // get the id of the box + var average = parseFloat($(this).attr('data-average')), // get the average of all rates + idBox = parseInt($(this).attr('data-id')), // get the id of the box widthRatingContainer = starWidth*opts.length, // Width of the Container widthColor = average/opts.rateMax*widthRatingContainer, // Width of the color Container @@ -115,7 +121,8 @@ }, mouseout : function(){ $(this).css('cursor','default'); - average.width(0); + if(hasRated) average.width(globalWidth); + else average.width(0); }, mousemove : function(e){ var realOffsetLeft = findRealLeft(this); @@ -135,7 +142,14 @@ }, click : function(e){ var element = this; - $(this).unbind().css('cursor','default').addClass('jDisabled'); + + /*set vars*/ + hasRated = true; + globalWidth = newWidth; + nbOfRates--; + + if(!opts.canRateAgain || parseInt(nbOfRates) <= 0) $(this).unbind().css('cursor','default').addClass('jDisabled'); + if (opts.showRateInfo) $("p.jRatingInfos").fadeOut('fast',function(){$(this).remove();}); e.preventDefault(); var rate = getNote(newWidth); Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/ForumBundler.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/ForumBundler.java,v diff -u -r1.2 -r1.3 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/ForumBundler.java 29 Sep 2012 13:58:45 -0000 1.2 +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/ForumBundler.java 19 Feb 2013 10:51:12 -0000 1.3 @@ -79,32 +79,26 @@ } this.createDirectories(directories); - String[] imageNames = new String[] { "bg_jRatingInfos.png", "small.png", "stars.png" }; + String[] imageNames = new String[] { "jquery.jRating-background.png", "jquery.jRating-stars.png", "jquery.jRating-small.png" }; for (String imageName : imageNames) { - String urlToConnectTo = getToolFolder() + "images" + URL_SEPARATOR + imageName; + String urlToConnectTo = getServerUrl() + "images" + URL_SEPARATOR + "css" + URL_SEPARATOR + imageName; String directoryToStoreFile = outputDirectory + File. separator + "images"; HttpUrlConnectionUtil.writeResponseToFile(urlToConnectTo, directoryToStoreFile, imageName, cookies);// cookies aren't really needed here. } - final String includesFolder = getToolFolder() + "includes" + URL_SEPARATOR; - // JS files String urlToConnectTo = getServerUrl() + "includes" + URL_SEPARATOR + "javascript" + URL_SEPARATOR + "jquery.js"; String directoryToStoreFile = outputDirectory + File.separator + "javascript"; HttpUrlConnectionUtil.writeResponseToFile(urlToConnectTo, directoryToStoreFile, "jquery.js", cookies); - urlToConnectTo = includesFolder + "javascript" + URL_SEPARATOR + "jRating.jquery.js"; + urlToConnectTo = getServerUrl() + "includes" + URL_SEPARATOR + "javascript" + URL_SEPARATOR + "jquery.jRating.js"; directoryToStoreFile = outputDirectory + File.separator + "javascript"; - HttpUrlConnectionUtil.writeResponseToFile(urlToConnectTo, directoryToStoreFile, "jRating.jquery.js", cookies); + HttpUrlConnectionUtil.writeResponseToFile(urlToConnectTo, directoryToStoreFile, "jquery.jRating.js", cookies); //CSS files - urlToConnectTo = includesFolder + "css" + URL_SEPARATOR + "jRating.jquery.css"; + urlToConnectTo = getServerUrl() + "css" + URL_SEPARATOR + "jquery.jRating.css"; directoryToStoreFile = outputDirectory + File.separator + "css"; - HttpUrlConnectionUtil.writeResponseToFile(urlToConnectTo, directoryToStoreFile, "jRating.jquery.css", cookies); - - urlToConnectTo = includesFolder + "css" + URL_SEPARATOR + "ratingStars.css"; - directoryToStoreFile = outputDirectory + File.separator + "css"; - HttpUrlConnectionUtil.writeResponseToFile(urlToConnectTo, directoryToStoreFile, "ratingStars.css", cookies); + HttpUrlConnectionUtil.writeResponseToFile(urlToConnectTo, directoryToStoreFile, "jquery.jRating.css", cookies); } Fisheye: Tag 1.3 refers to a dead (removed) revision in file `lams_tool_forum/web/includes/css/jRating.jquery.css'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `lams_tool_forum/web/includes/css/ratingStars.css'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `lams_tool_forum/web/includes/javascript/jRating.jquery.js'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_forum/web/jsps/export/exportportfolio.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/jsps/export/exportportfolio.jsp,v diff -u -r1.25 -r1.26 --- lams_tool_forum/web/jsps/export/exportportfolio.jsp 15 Aug 2012 10:59:14 -0000 1.25 +++ lams_tool_forum/web/jsps/export/exportportfolio.jsp 19 Feb 2013 10:51:12 -0000 1.26 @@ -14,17 +14,16 @@ - - + - + - + - + - - + - - + - - + - - - - + + + - - - + + @@ -87,13 +87,13 @@ - +