Index: lams_tool_kaltura/web/pages/learning/learning.jsp =================================================================== diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -rff911101cbe92d6813691c20c292fa04519820b4 --- lams_tool_kaltura/web/pages/learning/learning.jsp (.../learning.jsp) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80) +++ lams_tool_kaltura/web/pages/learning/learning.jsp (.../learning.jsp) (revision ff911101cbe92d6813691c20c292fa04519820b4) @@ -1,433 +1,455 @@ + <%@ include file="/common/taglibs.jsp"%> - <%@ page import="org.lamsfoundation.lams.util.Configuration" %> <%@ page import="org.lamsfoundation.lams.util.ConfigurationKeys" %> -<%=Configuration.get(ConfigurationKeys.KALTURA_SERVER)%> -<%=Configuration.get(ConfigurationKeys.KALTURA_PARTNER_ID)%> -<%=Configuration.get(ConfigurationKeys.KALTURA_SUB_PARTNER_ID)%> -<%=Configuration.get(ConfigurationKeys.KALTURA_USER_SECRET)%> -<%=Configuration.get(ConfigurationKeys.KALTURA_KCW_UI_CONF_ID)%> -<%=Configuration.get(ConfigurationKeys.KALTURA_KDP_UI_CONF_ID)%> - - - - - - - - - - - - - - - - - - - - - - - - + + + + + <%=Configuration.get(ConfigurationKeys.KALTURA_SERVER)%> + <%=Configuration.get(ConfigurationKeys.KALTURA_PARTNER_ID)%> + <%=Configuration.get(ConfigurationKeys.KALTURA_SUB_PARTNER_ID)%> + <%=Configuration.get(ConfigurationKeys.KALTURA_USER_SECRET)%> + <%=Configuration.get(ConfigurationKeys.KALTURA_KCW_UI_CONF_ID)%> + <%=Configuration.get(ConfigurationKeys.KALTURA_KDP_UI_CONF_ID)%> + + + + + + + + + + + + + + + + + + + + + + + + + - - - -
- -
- - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
- -
- - - -
- -
-
+ function addNewComment(comment){ + $("#comments-area").load( + "", + { + itemUid: ${item.uid}, + comment: comment, + sessionMapID: "${sessionMapID}" + } + ); + } -
+ function hideItem(itemUid, toHide){ + $.post( + "", + { + itemUid: itemUid, + isHiding: toHide + }, + function(data) { + + //replace item-hide span + var itemHideText = ''; + if (toHide) { + $("#previewItem" + itemUid).addClass("item-hidden"); + itemHideText += '
' + + '' + + '' + + ''; + } else { + $("#previewItem" + itemUid).removeClass("item-hidden"); + itemHideText += ''; + } + itemHideText += '
'; + $("#previewItem" + itemUid + " .item-hide-management").replaceWith(itemHideText); + } + ); + + return false; + } - <%--"Check for new" and "Add new image" buttons---------------%> - -
- - - - - + function hideComment(commentUid, toHide){ + $.post( + "", + { + commentUid: commentUid, + isHiding: toHide + }, + function(data) { + + //replace comment-hide span + var commentHideText = '
'; + if (toHide) { + $("#comment" + commentUid).addClass("item-hidden"); + commentHideText += '' + + '' + + '' + + ''; + } else { + $("#comment" + commentUid).removeClass("item-hidden"); + commentHideText += ''; + } + commentHideText += '
'; + $("#comment" + commentUid + " .comment-hide-management").replaceWith(commentHideText); + } + ); - - - + return false; + } + + $(document).ready(function(){ + $(".rating-stars").jRating({ + phpPath : "?sessionMapID=${sessionMapID}", + rateMax : 5, + decimalLength : 1, + onSuccess : function(data, itemUid){ + $("#averageRating" + itemUid).html(data.averageRating); + $("#numberOfVotes" + itemUid).html(data.numberOfVotes); + }, + onError : function(){ + jError('Error submitting rating, please retry'); + } + }); + $(".rating-stars-disabled").jRating({ + rateMax : 5, + isDisabled : true + }); + $(".rating-stars-disabled-small").jRating({ + rateMax : 5, + type: 'small', + isDisabled : true + }); + + //edit mark + setVarsForm("dispatch=markItem&itemUid=${item.uid}"); + $('#editItemMark').click(function() { + editBox(document.getElementById( "itemMark" )); + }); + + }); + + + + + +
+ +
+ + + + + + + + + + + - - + + - + - ${itemMark} - - - -
- - - - - <%@ include file="/pages/learning/ratingStars.jsp"%> + -
- - <%--Comments area----------------------------------------------%> - - -
- <%@ include file="/pages/learning/commentlist.jsp"%> -
-
- -
- -
- -
- - <%--Reflection--------------------------------------------------%> - - -
-
-
- +
+ + + + +
- -
+ + + <%--Bottom buttons-------------------------------------------%> + + +
- - - - + + - + + + + + + + + + + + +
- - - - - - -
- -
- - <%--Bottom buttons-------------------------------------------%> + + +
+ + - -
- - - - - - - - - - - - - - - - - - - - - -
-
- - + +