Index: lams_central/web/css/jquery.jRating.css =================================================================== diff -u -rc993832c9fac9e3dbb22576536fff2aa82a81c97 -rf7d806b0ab4f783c2dd89e920d7f6edf370c04db --- lams_central/web/css/jquery.jRating.css (.../jquery.jRating.css) (revision c993832c9fac9e3dbb22576536fff2aa82a81c97) +++ lams_central/web/css/jquery.jRating.css (.../jquery.jRating.css) (revision f7d806b0ab4f783c2dd89e920d7f6edf370c04db) @@ -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 =================================================================== diff -u -rc993832c9fac9e3dbb22576536fff2aa82a81c97 -rf7d806b0ab4f783c2dd89e920d7f6edf370c04db --- lams_central/web/includes/javascript/jquery.jRating.js (.../jquery.jRating.js) (revision c993832c9fac9e3dbb22576536fff2aa82a81c97) +++ lams_central/web/includes/javascript/jquery.jRating.js (.../jquery.jRating.js) (revision f7d806b0ab4f783c2dd89e920d7f6edf370c04db) @@ -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 =================================================================== diff -u -r35a0e719d061c08b52e705135bb2f2126079ed21 -rf7d806b0ab4f783c2dd89e920d7f6edf370c04db --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/ForumBundler.java (.../ForumBundler.java) (revision 35a0e719d061c08b52e705135bb2f2126079ed21) +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/ForumBundler.java (.../ForumBundler.java) (revision f7d806b0ab4f783c2dd89e920d7f6edf370c04db) @@ -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); } Index: lams_tool_forum/web/images/bg_jRatingInfos.png =================================================================== diff -u -r8a8c14627918cc58fa845c2369937bc482d2f6b9 -rf7d806b0ab4f783c2dd89e920d7f6edf370c04db Binary files differ Index: lams_tool_forum/web/images/small.png =================================================================== diff -u -r8a8c14627918cc58fa845c2369937bc482d2f6b9 -rf7d806b0ab4f783c2dd89e920d7f6edf370c04db Binary files differ Index: lams_tool_forum/web/images/stars.png =================================================================== diff -u -r8a8c14627918cc58fa845c2369937bc482d2f6b9 -rf7d806b0ab4f783c2dd89e920d7f6edf370c04db Binary files differ Fisheye: Tag f7d806b0ab4f783c2dd89e920d7f6edf370c04db 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 f7d806b0ab4f783c2dd89e920d7f6edf370c04db 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 f7d806b0ab4f783c2dd89e920d7f6edf370c04db 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 =================================================================== diff -u -rbf1c66f82afbc349f5702f29a0c6ab6ff9add34a -rf7d806b0ab4f783c2dd89e920d7f6edf370c04db --- lams_tool_forum/web/jsps/export/exportportfolio.jsp (.../exportportfolio.jsp) (revision bf1c66f82afbc349f5702f29a0c6ab6ff9add34a) +++ lams_tool_forum/web/jsps/export/exportportfolio.jsp (.../exportportfolio.jsp) (revision f7d806b0ab4f783c2dd89e920d7f6edf370c04db) @@ -14,17 +14,16 @@ - - + - + - + - + - - + - - + - - + - - - - + + + - - - + + @@ -87,13 +87,13 @@ - +