Finish mindmapHistory rest service.
This commit is contained in:
@@ -106,12 +106,6 @@
|
||||
<put-attribute name="body" value="/jsp/editProfile.jsp"/>
|
||||
</definition>
|
||||
|
||||
<definition name="changePassword" extends="dialogTemplate">
|
||||
<put-attribute name="title" value="CHANGE_PASSWORD"/>
|
||||
<put-attribute name="details" value="FIELD_REQUIRED_MSG"/>
|
||||
<put-attribute name="body" value="/jsp/changePassword.jsp"/>
|
||||
</definition>
|
||||
|
||||
<definition name="mindmapExport" extends="dialogTemplate">
|
||||
<put-attribute name="title" value=""/>
|
||||
<put-attribute name="details" value=""/>
|
||||
@@ -148,16 +142,22 @@
|
||||
<put-attribute name="body" value="/jsp/mindmapShare.jsp"/>
|
||||
</definition>
|
||||
|
||||
<definition name="keyboard" extends="dialogTemplate">
|
||||
<put-attribute name="title" value="KEYBOARD"/>
|
||||
<put-attribute name="details" value="KEYBOARD_MSG"/>
|
||||
<put-attribute name="body" value="/jsp/keyboard.jsp"/>
|
||||
</definition>
|
||||
|
||||
<definition name="mindmapImport" extends="dialogTemplate">
|
||||
<put-attribute name="body" value="/jsp/mindmapImport.jsp"/>
|
||||
</definition>
|
||||
|
||||
<definition name="mindmapHistory" extends="dialogTemplate">
|
||||
<put-attribute name="title" value="HISTORY"/>
|
||||
<put-attribute name="details" value="HISTORY_INFO"/>
|
||||
<put-attribute name="body" value="/jsp/mindmapHistory.jsp"/>
|
||||
</definition>
|
||||
|
||||
<definition name="mindmapHistoryFull" extends="dialogFullTemplate">
|
||||
<put-attribute name="title" value="HISTORY"/>
|
||||
<put-attribute name="details" value="HISTORY_INFO"/>
|
||||
<put-attribute name="body" value="/jsp/mindmapHistory.jsp"/>
|
||||
</definition>
|
||||
|
||||
<definition name="activationAccountConfirmation" extends="pageTemplate">
|
||||
<put-attribute name="title" value="ACCOUNT_ACTIVED"/>
|
||||
<put-attribute name="body" value="/jsp/activationAccountConfirmation.jsp"/>
|
||||
@@ -168,9 +168,16 @@
|
||||
<put-attribute name="body" value="/jsp/activationAccountConfirmationFail.jsp"/>
|
||||
</definition>
|
||||
|
||||
<definition name="mindmapHistory" extends="dialogTemplate">
|
||||
<put-attribute name="title" value="HISTORY"/>
|
||||
<put-attribute name="details" value="HISTORY_INFO"/>
|
||||
<put-attribute name="body" value="/jsp/mindmapHistory.jsp"/>
|
||||
<definition name="keyboard" extends="dialogTemplate">
|
||||
<put-attribute name="title" value="KEYBOARD"/>
|
||||
<put-attribute name="details" value="KEYBOARD_MSG"/>
|
||||
<put-attribute name="body" value="/jsp/keyboard.jsp"/>
|
||||
</definition>
|
||||
|
||||
<definition name="changePassword" extends="dialogTemplate">
|
||||
<put-attribute name="title" value="CHANGE_PASSWORD"/>
|
||||
<put-attribute name="details" value="FIELD_REQUIRED_MSG"/>
|
||||
<put-attribute name="body" value="/jsp/changePassword.jsp"/>
|
||||
</definition>
|
||||
|
||||
</tiles-definitions>
|
||||
|
@@ -3,6 +3,11 @@
|
||||
|
||||
<beans>
|
||||
|
||||
<bean id="userValidator" class="com.wisemapping.validator.UserValidator">
|
||||
<property name="userService" ref="userService"/>
|
||||
<property name="captchaService" ref="reCaptcha"/>
|
||||
</bean>
|
||||
|
||||
<bean id="settingResolver" class="org.springframework.web.servlet.mvc.multiaction.PropertiesMethodNameResolver">
|
||||
<property name="mappings">
|
||||
<props>
|
||||
|
@@ -433,6 +433,10 @@ $(function() {
|
||||
showEmbeddedDialog("c/maps/{mapId}/details", 'info-dialog-modal');
|
||||
});
|
||||
|
||||
$("#historyBtn").click(function() {
|
||||
showEmbeddedDialog("c/maps/{mapId}/history", 'history-dialog-modal');
|
||||
});
|
||||
|
||||
$("#publishBtn").click(function() {
|
||||
showEmbeddedDialog("c/maps/{mapId}/publish", "publish-dialog-modal");
|
||||
});
|
||||
|
@@ -13,6 +13,7 @@
|
||||
<script type="text/javascript" language="javascript" src="bootstrap/js/bootstrap.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap-responsive.min.css"/>
|
||||
<script type="text/javascript" language="javascript" src="js/jquery.timeago.js"></script>
|
||||
<body>
|
||||
<div style="padding-top:20px">
|
||||
<tiles:insertAttribute name="body"/>
|
||||
|
@@ -15,7 +15,7 @@
|
||||
<div class="loginNews">
|
||||
<h1>What is New: </h1>
|
||||
<ul>
|
||||
<li>Complerly new UI</li>
|
||||
<li>New User Interface</li>
|
||||
<li>FreeMind 0.9 Update</li>
|
||||
<li>Improved HTML 5.0 Support</li>
|
||||
<li>Firefox 12 officially supported</li>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<%@ include file="/jsp/init.jsp" %>
|
||||
<%--@elvariable id="wisemapDetail" type="com.wisemapping.view.MindMapBean"--%>
|
||||
<%--@elvariable id="mindmap" type="com.wisemapping.view.MindMapBean"--%>
|
||||
|
||||
<div>
|
||||
<ul class="nav nav-tabs">
|
||||
@@ -11,25 +11,25 @@
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade active in" id="general">
|
||||
<ul class="unstyled">
|
||||
<li><strong><spring:message code="NAME"/>:</strong> ${wisemapDetail.title}</li>
|
||||
<li><strong><spring:message code="DESCRIPTION"/>:</strong> ${wisemapDetail.description}</li>
|
||||
<li><strong><spring:message code="CREATOR"/>:</strong> ${wisemapDetail.creator.username}</li>
|
||||
<li><strong><spring:message code="CREATION_TIME"/>:</strong> ${wisemapDetail.creationTime}</li>
|
||||
<li><strong><spring:message code="LAST_UPDATE"/>:</strong> ${wisemapDetail.lastEditTime}</li>
|
||||
<li><strong><spring:message code="LAST_UPDATE_BY"/>:</strong> ${wisemapDetail.lastEditor}</li>
|
||||
<li><strong> <spring:message code="STARRED"/>:</strong> ${wisemapDetail.starred}</li>
|
||||
<li><strong><spring:message code="NAME"/>:</strong> ${mindmap.title}</li>
|
||||
<li><strong><spring:message code="DESCRIPTION"/>:</strong> ${mindmap.description}</li>
|
||||
<li><strong><spring:message code="CREATOR"/>:</strong> ${mindmap.creator.username}</li>
|
||||
<li><strong><spring:message code="CREATION_TIME"/>:</strong> ${mindmap.creationTime}</li>
|
||||
<li><strong><spring:message code="LAST_UPDATE"/>:</strong> ${mindmap.lastEditTime}</li>
|
||||
<li><strong><spring:message code="LAST_UPDATE_BY"/>:</strong> ${mindmap.lastEditor}</li>
|
||||
<li><strong> <spring:message code="STARRED"/>:</strong> ${mindmap.starred}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="collaborators">
|
||||
<ul class="unstyled">
|
||||
<li><strong><spring:message
|
||||
code="EDITORS"/>(${wisemapDetail.countColaborators}): </strong>
|
||||
<c:forEach items="${wisemapDetail.collaborators}" var="mindmapCollaborator">
|
||||
code="EDITORS"/>(${mindmap.countCollaborators}): </strong>
|
||||
<c:forEach items="${mindmap.collaborators}" var="mindmapCollaborator">
|
||||
${mindmapCollaborator.username}
|
||||
</c:forEach>
|
||||
</li>
|
||||
<li><strong><spring:message code="VIEWERS"/>(${wisemapDetail.countViewers}): </strong>
|
||||
<c:forEach items="${wisemapDetail.viewers}" var="mindmapViewer">
|
||||
<li><strong><spring:message code="VIEWERS"/>(${mindmap.countViewers}): </strong>
|
||||
<c:forEach items="${mindmap.viewers}" var="mindmapViewer">
|
||||
${mindmapViewer.username}
|
||||
</c:forEach>
|
||||
</li>
|
||||
@@ -38,17 +38,17 @@
|
||||
|
||||
<div class="tab-pane fade" id="publish">
|
||||
<c:choose>
|
||||
<c:when test="${wisemapDetail.public}">
|
||||
<c:when test="${mindmap.public}">
|
||||
<ul class="unstyled">
|
||||
<p><spring:message code="ALL_VIEW_PUBLIC"/></p>
|
||||
|
||||
<li><strong><spring:message code="URL"/>:</strong>
|
||||
<li><input name="url"
|
||||
value="http://www.wisemapping.com/c/publicView?mapId=${wisemapDetail.id}"
|
||||
value="http://www.wisemapping.com/c/publicView?mapId=${mindmap.id}"
|
||||
style="width:400px" readonly="readonly"/>
|
||||
</li>
|
||||
<li><strong><spring:message code="BLOG_SNIPPET"/></strong>
|
||||
<pre><iframe style="border:0;width:600px;height:400px;border: 1px solid black" src="http://www.wisemapping.com/c/embeddedView?mapId=${wisemapDetail.id}&amzoom=1"></iframe></pre>
|
||||
<pre><iframe style="border:0;width:600px;height:400px;border: 1px solid black" src="http://www.wisemapping.com/c/embeddedView?mapId=${mindmap.id}&amzoom=1"></iframe></pre>
|
||||
</li>
|
||||
<li><spring:message code="EMBEDDED_MAP_SIZE"/></li>
|
||||
</ul>
|
||||
|
@@ -75,7 +75,7 @@
|
||||
|
||||
<div id="headerMapTitle">Title: <span>${mindmap.title}</span></div>
|
||||
</div>
|
||||
<%@ include file="/jsp/toolbar.jsf" %>
|
||||
<%@ include file="/jsp/mindmapEditorToolbar.jsf" %>
|
||||
</div>
|
||||
|
||||
<div id="mindplot"></div>
|
||||
|
@@ -1,3 +1,5 @@
|
||||
<%--@elvariable id="mindmap" type="com.wisemapping.model.MindMap"--%>
|
||||
|
||||
<div id="toolbar">
|
||||
<div id="persist" class="buttonContainer">
|
||||
<div id="save" class="buttonOn">
|
||||
@@ -75,13 +77,16 @@
|
||||
<img src="../images/font-color.png"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="collaboration" class="buttonContainer">
|
||||
<div id="shareIt" class="buttonOn">
|
||||
<img src="../images/share.png"/>
|
||||
</div>
|
||||
<div id="publishIt" class="buttonOn">
|
||||
<img src="../images/public.png"/>
|
||||
</div>
|
||||
<c:if test="${mindmap.owner}">
|
||||
<div id="shareIt" class="buttonOn">
|
||||
<img src="../images/share.png"/>
|
||||
</div>
|
||||
<div id="publishIt" class="buttonOn">
|
||||
<img src="../images/public.png"/>
|
||||
</div>
|
||||
</c:if>
|
||||
<div id="history" class="buttonOn">
|
||||
<img src="../images/history.png"/>
|
||||
</div>
|
@@ -1,74 +1,62 @@
|
||||
<%@ page import="java.util.List" %>
|
||||
<%@ page import="com.wisemapping.view.HistoryBean" %>
|
||||
<%@ include file="/jsp/init.jsp" %>
|
||||
<script type="text/javascript">
|
||||
function revertHistory(mapId, historyId)
|
||||
{
|
||||
document.revertForm.mapId.value = mapId;
|
||||
document.revertForm.historyId.value = historyId;
|
||||
document.revertForm.submit();
|
||||
return false;
|
||||
|
||||
<style type="text/css">
|
||||
#historyContainer {
|
||||
overflow-y: scroll;
|
||||
max-height: 400px;
|
||||
}
|
||||
</script>
|
||||
<table style="border:1px gray dashed;width:100%;margin-top:10px;">
|
||||
<thead>
|
||||
<tr style="border:1px gray dashed;color:white;background:black;">
|
||||
<td>
|
||||
<spring:message code="MODIFIED"/>
|
||||
</td>
|
||||
<td>
|
||||
<spring:message code="BY"/>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<%
|
||||
final List<HistoryBean> list = (List<HistoryBean>) request.getAttribute("historyBeanList");
|
||||
if (list != null && !list.isEmpty()) {
|
||||
%>
|
||||
<%
|
||||
for (HistoryBean history : list) {
|
||||
|
||||
%>
|
||||
#historyContainer table {
|
||||
font-size: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<%=history.getCreation(request.getLocale())%>
|
||||
</td>
|
||||
<td>
|
||||
<%=history.getAuthor()%>
|
||||
</td>
|
||||
<td>
|
||||
<a onclick="return revertHistory('<%=history.getMindMapId()%>',<%=history.getHistoryId()%>)" href=""><spring:message code="REVERT"/></a>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
} else {
|
||||
%>
|
||||
|
||||
<td colspan="3">
|
||||
<spring:message code="NO_HISTORY_RESULTS"/>
|
||||
</td>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</tbody>
|
||||
</table>
|
||||
<form name="revertForm" action="<c:url value="history"/>">
|
||||
<input type="hidden" name="action" value="revert"/>
|
||||
<%
|
||||
if (request.getAttribute("goToMindmapList") != null)
|
||||
{
|
||||
%>
|
||||
<input type="hidden" name="goToMindmapList"/>
|
||||
<%
|
||||
<div id="historyContainer">
|
||||
<table class="table table-condensed" id="historyTable">
|
||||
<colgroup>
|
||||
<col width="50%"/>
|
||||
<col width="30%"/>
|
||||
<col width="10%"/>
|
||||
<col width="10%"/>
|
||||
</colgroup>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var tableElem = $('#historyTable');
|
||||
jQuery.ajax("service/maps/${mindmapId}/history", {
|
||||
async:false,
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
contentType:"text/plain",
|
||||
success : function(data, textStatus, jqXHR) {
|
||||
$(data.changes).each(function() {
|
||||
tableElem.append('\
|
||||
<tr data-history-id="' + this.id + '">\
|
||||
<td>' + this.creator + '</td>\
|
||||
<td><abbr class="timeago" title="' + this.creationTime + '">' + jQuery.timeago(this.creationTime) + '</abbr></td>\
|
||||
<td><a class="view" href="#">view</a></td>\
|
||||
<td><a class="revert" href="#">revert</a></td>\
|
||||
</tr>');
|
||||
});
|
||||
|
||||
tableElem.find('tr a.view').each(function() {
|
||||
$(this).click(function(event) {
|
||||
window.open("/c/maps/${mindmapId}/view");
|
||||
event.preventDefault();
|
||||
});
|
||||
});
|
||||
tableElem.find('tr a.revert').each(function() {
|
||||
$(this).click(function(event) {
|
||||
window.location = "/c/maps/${mindmapId}/edit";
|
||||
event.preventDefault();
|
||||
});
|
||||
});
|
||||
|
||||
},
|
||||
error:function(jqXHR, textStatus, errorThrown) {
|
||||
alert(textStatus);
|
||||
}
|
||||
%>
|
||||
<input type="hidden" name="mapId"/>
|
||||
<input type="hidden" name="historyId"/>
|
||||
</form>
|
||||
|
||||
});
|
||||
</script>
|
||||
|
@@ -295,6 +295,19 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- History Dialog Config -->
|
||||
<div id="history-dialog-modal" class="modal fade" style="display: none">
|
||||
<div class="modal-header">
|
||||
<button class="close" data-dismiss="modal">x</button>
|
||||
<h3>History</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-cancel" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -5,10 +5,6 @@
|
||||
<%--@elvariable id="editorTryMode" type="java.lang.String"--%>
|
||||
<%--@elvariable id="mapXml" type="com.wisemapping.model.User"--%>
|
||||
|
||||
<%@ page import="java.text.DateFormat" %>
|
||||
<%@ page import="java.text.SimpleDateFormat" %>
|
||||
<%@ page import="java.util.Calendar" %>
|
||||
|
||||
|
||||
<%@ include file="/jsp/init.jsp" %>
|
||||
|
||||
|
@@ -231,8 +231,6 @@ $("#addBtn").click(function(event) {
|
||||
email = emails[i];
|
||||
addCollaboration(email, role, 'New');
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user