Add info button to the toolbar.

This commit is contained in:
Paulo Gustavo Veiga 2012-05-20 02:25:54 -03:00
parent b534fce00f
commit fe688be593
8 changed files with 154 additions and 282 deletions

View File

@ -83,8 +83,8 @@ public class MindMapBean {
return result; return result;
} }
public Calendar getLastEditTime() { public String getLastEditTime() {
return mindMap.getLastModificationTime(); return DateFormat.getInstance().format(mindMap.getLastModificationTime().getTime());
} }
public String getCreationTime() { public String getCreationTime() {

View File

@ -105,6 +105,7 @@ CAPTCHA_ERROR=Enter the letters as they are shown in the image above.
DETAIL_INFORMATION=Detail Information DETAIL_INFORMATION=Detail Information
CREATOR=Creator CREATOR=Creator
CREATION_TIME=Creation Time CREATION_TIME=Creation Time
OWNER=Owner
VIEWS=Views VIEWS=Views
STATE=State STATE=State
COLLABORATORS=Collaborators COLLABORATORS=Collaborators
@ -285,6 +286,9 @@ REDO=Redo
BY=By BY=By
MODIFIED=Modified MODIFIED=Modified
LAST_UPDATE=Last Update
LAST_UPDATE_BY=Last Updated By
HISTORY_MSG=Looking for an old modification of you map?. Here is the place. HISTORY_MSG=Looking for an old modification of you map?. Here is the place.
NO_HISTORY_RESULTS= No History Information was found. NO_HISTORY_RESULTS= No History Information was found.
HISTORY_INFO = Here is the list of the last revisions of you map. HISTORY_INFO = Here is the list of the last revisions of you map.

View File

@ -81,15 +81,6 @@
<put name="body" value="/jsp/login.jsp"/> <put name="body" value="/jsp/login.jsp"/>
</definition> </definition>
<definition name="browserNotSupported" extends="pageTemplate">
<put name="title" value="USUPPORTED_BROWSER"/>
<put name="body" value="/jsp/browserNotSupported.jsp"/>
</definition>
<definition name="mindmapDetail" extends="pageTemplate">
<put name="title" value="MINDMAP_DETAIL"/>
<put name="body" value="/jsp/mindmapDetail.jsp"/>
</definition>
<definition name="search" extends="pageTemplate"> <definition name="search" extends="pageTemplate">
<put name="title" value="SEARCH"/> <put name="title" value="SEARCH"/>
@ -110,6 +101,11 @@
<!-- Dialog Forms --> <!-- Dialog Forms -->
<definition name="mindmapDetail" extends="formDialogTemplate">
<put name="title" value="MINDMAP_DETAIL"/>
<put name="body" value="/jsp/mindmapDetail.jsp"/>
</definition>
<definition name="setting" extends="formDialogTemplate"> <definition name="setting" extends="formDialogTemplate">
<put name="title" value="SETTINGS"/> <put name="title" value="SETTINGS"/>
<put name="details" value="SETTINGS_MSG"/> <put name="details" value="SETTINGS_MSG"/>

View File

@ -319,3 +319,7 @@ td.details {
background-color: #ccc; background-color: #ccc;
} }
.row-selected {
background-color: #f5f5f5;
}

View File

@ -32,58 +32,6 @@ div#register a {
font-weight: bold; font-weight: bold;
} }
/* WiseMap details */
#detailContent {
width: 700px;
height: 100%;
padding: 10px;
}
#detail {
margin: 10px auto;
height: 100%;
padding: 8px;
}
#detail table {
background-color: white;
width: 100%;
}
#detail td {
padding: 5px;
vertical-align: top;
}
#detailTitle {
color: #093A9D;
font-weight: bold;
font-size: 14px;
padding-left: 5px;
}
#detailTitle img {
padding-left: 5px;
}
#detailTitle span {
color: #8e9181;
font-weight: normal;
font-size: 14px;
}
#detail h1 {
color: black;
font-weight: bolder;
}
#detail .evenRow {
background-color: #ebeef1;
}
#detail .oddRow {
background-color: #eff3f5;
}
div.pageBodyContent ol { div.pageBodyContent ol {
margin-left: 12px; margin-left: 12px;

View File

@ -97,7 +97,6 @@ jQuery.fn.dialogForm = function(options) {
var redirectUrl = options.redirect; var redirectUrl = options.redirect;
redirectUrl = redirectUrl.replace("{header.resourceId}", resourceId); redirectUrl = redirectUrl.replace("{header.resourceId}", resourceId);
$(acceptBtn).button('loading'); $(acceptBtn).button('loading');
$("#" + containerId).modal('hide');
window.location = redirectUrl; window.location = redirectUrl;
} else if (options.postUpdate) { } else if (options.postUpdate) {
@ -147,14 +146,21 @@ jQuery.fn.dialogForm = function(options) {
// Update toolbar events ... // Update toolbar events ...
function updateToolbar() { function updateToolbar() {
var selected = $("#mindmapListTable tbody input:checked").length > 0;
$("#mindmapListTable tbody input:checked").parent().parent().addClass('row-selected');
$("#mindmapListTable tbody input:not(:checked)").parent().parent().removeClass('row-selected');
var inputs = $("#mindmapListTable tbody input:checked");
var selected = inputs.length > 0;
if (selected) { if (selected) {
$("#actionsBtn").show(); $("#actionsBtn").show();
$("#deleteBtn").show(); $("#deleteBtn").show();
$("#infoBtn").show();
} else { } else {
$("#actionsBtn").hide(); $("#actionsBtn").hide();
$("#deleteBtn").hide(); $("#deleteBtn").hide();
$("#infoBtn").hide();
} }
} }

View File

@ -1,174 +1,58 @@
<%@ include file="/jsp/init.jsp" %> <%@ include file="/jsp/init.jsp" %>
<%--@elvariable id="wisemapDetail" type="com.wisemapping.view.MindMapBean"--%> <%--@elvariable id="wisemapDetail" type="com.wisemapping.view.MindMapBean"--%>
<c:url value="mymaps.htm" var="shareMap"> <div>
<c:param name="action" value="collaborator"/> <ul class="nav nav-tabs">
<c:param name="userEmail" value="${pageContext.request.userPrincipal.name}"/> <li class="active"><a href="#general" data-toggle="pill">General</a></li>
</c:url> <li><a href="#collaborators" data-toggle="pill">Collaborators</a></li>
<li><a href="#publish" data-toggle="pill">Publish</a></li>
</ul>
<div id="detailContent" class="sb"> <div class="tab-content">
<div id="detailTitle"> <div class="tab-pane fade active in" id="general">
<c:out value="${wisemapDetail.title}"/> <ul class="unstyled">
<c:choose> <li><strong><spring:message code="NAME"/>:</strong> ${wisemapDetail.title}</li>
<c:when test="${not wisemapDetail.public}"> <li><strong><spring:message code="DESCRIPTION"/>:</strong> ${wisemapDetail.description}</li>
<img src="../images/key.png" alt="<spring:message code="PRIVATE"/>" title="<spring:message code="PRIVATE"/>"/> <li><strong><spring:message code="OWNER"/>:</strong> ${wisemapDetail.creationUser}</li>
<span>(<spring:message code="PRIVATE"/>)</span> <li><strong><spring:message code="CREATION_TIME"/>:</strong> ${wisemapDetail.creationTime}</li>
</c:when> <li><strong><spring:message code="LAST_UPDATE"/>:</strong> ${wisemapDetail.lastEditTime}</li>
<c:otherwise> <li><strong><spring:message code="LAST_UPDATE_BY"/>:</strong> ${wisemapDetail.lastEditor}</li>
<img src="../images/world2.png" alt="<spring:message code="PUBLIC"/>" title="<spring:message code="PUBLIC"/>"/> <li><strong> <spring:message code="TAGS"/>:</strong> ${wisemapDetail.tags}</li>
<span>(<spring:message code="PUBLIC"/>)</span> </ul>
</c:otherwise>
</c:choose>
</div> </div>
<div class="tab-pane fade" id="collaborators">
<div id="detail" class="sb"> <ul class="unstyled">
<spring:message code="DETAIL_INFORMATION"/> <li><strong><spring:message
<table> code="EDITORS"/>(${wisemapDetail.countColaborators}): </strong>
<tr class="evenRow">
<td class="formLabel">
<spring:message code="CREATOR"/>
:
</td>
<td>${wisemapDetail.creationUser}</td>
</tr>
<tr class="oddRow">
<td class="formLabel">
<a href="renameMap.htm?mapId=${wisemapDetail.id}"
rel="moodalbox 400px 200px wizard"
title="<spring:message code="RENAME_DETAILS"/>">
<spring:message code="DESCRIPTION"/>
:
</a>
</td>
<td>${wisemapDetail.description}</td>
</tr>
<tr class="evenRow">
<td class="formLabel">
<spring:message code="CREATION_TIME"/>
:
</td>
<td>${wisemapDetail.creationTime}</td>
</tr>
<tr class="oddRow">
<td class="formLabel">
<c:choose>
<c:when test="${wisemapDetail.owner==requestScope.user}">
<a href="<c:out value="${shareMap}"/>&amp;mapId=${wisemapDetail.id}" rel="moodalbox 780px 530px wizard"
title="<spring:message code="SHARE_DETAILS"/>">
<spring:message code="COLLABORATORS"/>
</a>
</c:when>
<c:otherwise>
<spring:message code="COLLABORATORS"/>
</c:otherwise>
</c:choose>:<br/>
</td>
<td>
<div id="divCollaboratorsList">
<table>
<tr>
<td>
<b>
<spring:message code="EDITORS"/>
</b>
(
<c:out value="${wisemapDetail.countColaborators}"/>
)
<br/>
<c:forEach items="${wisemapDetail.collaborators}" var="mindmapCollaborator"> <c:forEach items="${wisemapDetail.collaborators}" var="mindmapCollaborator">
${mindmapCollaborator.username} ${mindmapCollaborator.username}
<br/>
</c:forEach> </c:forEach>
</td> </li>
<td> <li><strong><spring:message code="VIEWERS"/>(${wisemapDetail.countViewers}): </strong>
<b>
<spring:message code="VIEWERS"/>
</b>
(
<c:out value="${wisemapDetail.countViewers}"/>
)
<br/>
<c:forEach items="${wisemapDetail.viewers}" var="mindmapViewer"> <c:forEach items="${wisemapDetail.viewers}" var="mindmapViewer">
${mindmapViewer.username} ${mindmapViewer.username}
<br/>
</c:forEach> </c:forEach>
</td> </li>
</tr> </ul>
</table>
</div> </div>
</td>
</tr> <div class="tab-pane fade" id="publish">
<tr class="evenRow"> <ul class="unstyled">
<td class="formLabel">
<a href="tags.htm?mapId=${wisemapDetail.id}"
rel="moodalbox 400px 200px wizard"
title="<spring:message code="TAGS_DETAILS"/>">
<spring:message code="TAGS"/>
</a>
:
</td>
<td>
<c:out value="${wisemapDetail.tags}"/>
</td>
</tr>
<tr class="oddRow">
<td class="formLabel">
<c:choose>
<c:when test="${wisemapDetail.owner==requestScope.user}">
<a href="publish.htm?mapId=${wisemapDetail.id}" rel="moodalbox 600px 400px wizard"
title="<spring:message code="PUBLISH_MSG"/>">
<spring:message code="PUBLISH"/>
</a>
</c:when>
<c:otherwise>
<spring:message code="PUBLISH"/>
</c:otherwise>
</c:choose>
:
<div id="divSendLink"></div>
</td>
<td>
<c:choose> <c:choose>
<c:when test="${wisemapDetail.public}"> <c:when test="${wisemapDetail.public}">
<spring:message code="ALL_VIEW_PUBLIC"/> <li><strong><spring:message code="PUBLIC"/>: </strong><spring:message code="ALL_VIEW_PUBLIC"/>
<br/> </li>
<li><<strong><spring:message code="URL"/>: </strong>
<table class="oddRow">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody>
<tr>
<td class="formLabel">
<spring:message code="URL"/>
:
</td>
<td>
<input name="url" <input name="url"
value="http://www.wisemapping.com/c/publicView.htm?mapId=${wisemapDetail.id}" value="http://www.wisemapping.com/c/publicView.htm?mapId=${wisemapDetail.id}"
style="width:400px" readonly="readonly"/> style="width:400px" readonly="readonly"/>
</td> </li>
</tr> <li><strong><spring:message code="DIRECT_LINK"/>: </strong>
<tr>
<td class="formLabel">
<spring:message code="DIRECT_LINK"/>
:
</td>
<td>
<textarea style="width:400px;height:30px;overflow:hidden;" cols="55" rows="3" <textarea style="width:400px;height:30px;overflow:hidden;" cols="55" rows="3"
readonly="readonly"> readonly="readonly">
&lt;a &lt;a
href="http://www.wisemapping.com/c/publicView.htm?mapId=${wisemapDetail.id}">${wisemapDetail.title}&lt;/a></textarea> href="http://www.wisemapping.com/c/publicView.htm?mapId=${wisemapDetail.id}">${wisemapDetail.title}&lt;/a></textarea>
</td> <li><strong><spring:message code="BLOG_INCLUSION"/>: </strong>
</tr>
<tr>
<td class="formLabel" style="white-space:normal;">
<spring:message code="BLOG_INCLUSION"/>
:
</td>
<td>
<textarea style="width:400px;height:70px;overflow:hidden;" cols="55" rows="5" <textarea style="width:400px;height:70px;overflow:hidden;" cols="55" rows="5"
readonly="readonly"> readonly="readonly">
&lt;iframe &lt;iframe
@ -176,19 +60,15 @@
src="http://www.wisemapping.com/c/embeddedView.htm?mapId=${wisemapDetail.id}&amp;amzoom=1"&gt; src="http://www.wisemapping.com/c/embeddedView.htm?mapId=${wisemapDetail.id}&amp;amzoom=1"&gt;
&lt;/iframe&gt; &lt;/iframe&gt;
</textarea> </textarea>
</li>
<p><spring:message code="EMBEDDED_MAP_SIZE"/></p> <li><spring:message code="EMBEDDED_MAP_SIZE"/></li>
</td>
</tr>
</tbody>
</table>
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<spring:message code="ONLY_VIEW_PRIVATE"/> <li><strong><spring:message code="PUBLIC"/>:</strong><spring:message code="ONLY_VIEW_PRIVATE"/>
</li>
</c:otherwise> </c:otherwise>
</c:choose> </c:choose>
</td> </ul>
</tr> </div>
</table>
</div> </div>
</div> </div>

View File

@ -19,7 +19,7 @@
<!--jQuery DataTables--> <!--jQuery DataTables-->
<script type="text/javascript" language="javascript" src="js/jquery.dataTables.min.js"></script> <script type="text/javascript" language="javascript" src="js/jquery.dataTables.min.js"></script>
<script type="text/javascript" language="javascript" src="js/jquery.dataTables.plugins.js"></script> <script type="text/javascript" language="javascript" src="js/mymaps.js"></script>
<!-- Update timer plugging --> <!-- Update timer plugging -->
<script type="text/javascript" language="javascript" src="js/jquery.timeago.js"></script> <script type="text/javascript" language="javascript" src="js/jquery.timeago.js"></script>
@ -54,10 +54,6 @@
return '<a href="c/map/' + obj.aData.id + '/edit.htm">' + obj.aData.title + '</a>'; return '<a href="c/map/' + obj.aData.id + '/edit.htm">' + obj.aData.title + '</a>';
} }
}, },
{
sTitle : "Description",
mDataProp : "description"
},
{ {
sTitle : "Owner", sTitle : "Owner",
mDataProp :"creator" mDataProp :"creator"
@ -72,16 +68,6 @@
var time = obj.aData.lastModificationTime; var time = obj.aData.lastModificationTime;
return '<abbr class="timeago" title="' + time + '">' + jQuery.timeago(time) + '</abbr>' + ' ' + '<span style="color: #777;font-size: 75%;padding-left: 5px;">' + obj.aData.lastModifierUser + '</span>'; return '<abbr class="timeago" title="' + time + '">' + jQuery.timeago(time) + '</abbr>' + ' ' + '<span style="color: #777;font-size: 75%;padding-left: 5px;">' + obj.aData.lastModifierUser + '</span>';
} }
},
{
sTitle: "Details",
sClass: "center",
sWidth : "15px",
bSortable : false,
bSearchable : false,
fnRender : function(obj) {
return '<a href="c/map/' + obj.aData.id + '/details.htm"><span class="ui-icon ui-icon-circle-triangle-e" style="margin: 0 auto;"></span></a>';
}
} }
], ],
AutoWidth : false, AutoWidth : false,
@ -226,6 +212,25 @@
} }
}); });
$("#infoBtn").click(function() {
var mapIds = $('#mindmapListTable').dataTableExt.getSelectedMapsIds();
if (mapIds.length > 0) {
$('#info-dialog-modal .modal-body').load("c/map/" + mapIds[0] + "/details.htm", function() {
$('#info-dialog-modal').modal();
});
}
});
$("#exportBtn").click(function() {
var mapIds = $('#mindmapListTable').dataTableExt.getSelectedMapsIds();
if (mapIds.length > 0) {
$('#export-dialog-modal .modal-body').load("c/map/" + mapIds[0] + "/export.htm", function() {
$('#export-dialog-modal').modal();
});
}
});
$("#actionButtons .publishMap").click(function() { $("#actionButtons .publishMap").click(function() {
}); });
@ -270,20 +275,23 @@
<div class="btn-group" id="deleteBtn" style="display:none"> <div class="btn-group" id="deleteBtn" style="display:none">
<button class="btn"><i class="icon-trash"></i> Delete</button> <button class="btn"><i class="icon-trash"></i> Delete</button>
</div> </div>
<div class="btn-group" id="actionsBtn" style="display:none">
<div class="btn-group" id="infoBtn" style="display:none">
<button class="btn"><i class="icon-exclamation-sign"></i> Info</button>
</div>
<div class="btn-group" id="actionsBtn" style="display:none">
<button class="btn dropdown-toggle" data-toggle="dropdown"> <button class="btn dropdown-toggle" data-toggle="dropdown">
<i class="icon-asterisk"></i> More <i class="icon-asterisk"></i> More
<span class="caret"></span> <span class="caret"></span>
</button> </button>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li id="duplicateBtn"><a href="#" onclick="return false"><i class="icon-plus-sign"></i> <li id="duplicateBtn"><a href="#" onclick="return false"><i class="icon-plus-sign"></i> Duplicate</a></li>
Duplicate</a></li>
<li id="renameBtn"><a href="#" onclick="return false"><i class="icon-edit"></i> Rename</a></li> <li id="renameBtn"><a href="#" onclick="return false"><i class="icon-edit"></i> Rename</a></li>
<li id="printBtn"><a href="#" onclick="return false"><i class="icon-print"></i> Print</a></li> <li id="printBtn"><a href="#" onclick="return false"><i class="icon-print"></i> Print</a></li>
<li id="publishMap"><a href="#" onclick="return false"><i class="icon-globe"></i>Publish</a></li> <li id="publishMap"><a href="#" onclick="return false"><i class="icon-globe"></i>Publish</a></li>
<li id="exportMap"><a href="#" onclick="return false"><i class="icon-download-alt"></i> Export</a> <li id="exportBtn"><a href="#" onclick="return false"><i class="icon-download-alt"></i> Export</a></li>
</li>
<li id="shareMap"><a href="#" onclick="return false"><i class="icon-share"></i> Share</a></li> <li id="shareMap"><a href="#" onclick="return false"><i class="icon-share"></i> Share</a></li>
<li id="tagMap"><a href="#" onclick="return false"><i class="icon-tags"></i> Tag</a></li> <li id="tagMap"><a href="#" onclick="return false"><i class="icon-tags"></i> Tag</a></li>
</ul> </ul>
@ -316,7 +324,7 @@
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button class="btn btn-primary btn-accept" data-loading-text="Creating ...">Create</button> <button class="btn btn-primary btn-accept" data-loading-text="Creating ...">Create</button>
<button class="btn btn-cancel">Close</button> <button class="btn btn-cancel" data-dismiss="modal">Cancel</button>
</div> </div>
</div> </div>
@ -347,7 +355,7 @@
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button class="btn btn-primary btn-accept" data-loading-text="Duplicating ...">Duplicate</button> <button class="btn btn-primary btn-accept" data-loading-text="Duplicating ...">Duplicate</button>
<button class="btn btn-cancel">Close</button> <button class="btn btn-cancel" data-dismiss="modal">Cancel</button>
</div> </div>
</div> </div>
@ -376,7 +384,7 @@
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button class="btn btn-primary btn-accept">Rename</button> <button class="btn btn-primary btn-accept">Rename</button>
<button class="btn btn-cancel">Close</button> <button class="btn btn-cancel" data-dismiss="modal">Cancel</button>
</div> </div>
</div> </div>
</div> </div>
@ -389,13 +397,40 @@
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="alert alert-block"> <div class="alert alert-block">
<h4 class="alert-heading">Warning!</h4>Deleted mindmap can not be recovered. Do you want to continue <h4 class="alert-heading">Warning!</h4>Deleted mindmap can not be recovered. Do you want to
? continue ?.
</div> </div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button class="btn btn-primary btn-accept">Delete</button> <button class="btn btn-primary btn-accept">Delete</button>
<button class="btn btn-cancel">Close</button> <button class="btn btn-cancel" data-dismiss="modal">Cancel</button>
</div>
</div>
<!-- Info map dialog -->
<div id="info-dialog-modal" class="modal fade" style="display: none">
<div class="modal-header">
<button class="close" data-dismiss="modal">x</button>
<h3>Info</h3>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button class="btn btn-cancel" data-dismiss="modal">Close</button>
</div>
</div>
<div id="export-dialog-modal" class="modal fade" style="display: none">
<div class="modal-header">
<button class="close" data-dismiss="modal">x</button>
<h3>Export</h3>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button class="btn btn-cancel" data-dismiss="modal">Close</button>
</div> </div>
</div> </div>
@ -409,7 +444,6 @@
</div> </div>
</div> </div>
</div>
<jsp:include page="footer.jsp"/> <jsp:include page="footer.jsp"/>