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;
}
public Calendar getLastEditTime() {
return mindMap.getLastModificationTime();
public String getLastEditTime() {
return DateFormat.getInstance().format(mindMap.getLastModificationTime().getTime());
}
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
CREATOR=Creator
CREATION_TIME=Creation Time
OWNER=Owner
VIEWS=Views
STATE=State
COLLABORATORS=Collaborators
@ -285,6 +286,9 @@ REDO=Redo
BY=By
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.
NO_HISTORY_RESULTS= No History Information was found.
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"/>
</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">
<put name="title" value="SEARCH"/>
@ -110,6 +101,11 @@
<!-- 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">
<put name="title" value="SETTINGS"/>
<put name="details" value="SETTINGS_MSG"/>

View File

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

View File

@ -32,58 +32,6 @@ div#register a {
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 {
margin-left: 12px;

View File

@ -97,7 +97,6 @@ jQuery.fn.dialogForm = function(options) {
var redirectUrl = options.redirect;
redirectUrl = redirectUrl.replace("{header.resourceId}", resourceId);
$(acceptBtn).button('loading');
$("#" + containerId).modal('hide');
window.location = redirectUrl;
} else if (options.postUpdate) {
@ -147,14 +146,21 @@ jQuery.fn.dialogForm = function(options) {
// Update toolbar events ...
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) {
$("#actionsBtn").show();
$("#deleteBtn").show();
$("#infoBtn").show();
} else {
$("#actionsBtn").hide();
$("#deleteBtn").hide();
$("#infoBtn").hide();
}
}

View File

@ -1,174 +1,58 @@
<%@ include file="/jsp/init.jsp" %>
<%--@elvariable id="wisemapDetail" type="com.wisemapping.view.MindMapBean"--%>
<c:url value="mymaps.htm" var="shareMap">
<c:param name="action" value="collaborator"/>
<c:param name="userEmail" value="${pageContext.request.userPrincipal.name}"/>
</c:url>
<div>
<ul class="nav nav-tabs">
<li class="active"><a href="#general" data-toggle="pill">General</a></li>
<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 id="detailTitle">
<c:out value="${wisemapDetail.title}"/>
<c:choose>
<c:when test="${not wisemapDetail.public}">
<img src="../images/key.png" alt="<spring:message code="PRIVATE"/>" title="<spring:message code="PRIVATE"/>"/>
<span>(<spring:message code="PRIVATE"/>)</span>
</c:when>
<c:otherwise>
<img src="../images/world2.png" alt="<spring:message code="PUBLIC"/>" title="<spring:message code="PUBLIC"/>"/>
<span>(<spring:message code="PUBLIC"/>)</span>
</c:otherwise>
</c:choose>
<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="OWNER"/>:</strong> ${wisemapDetail.creationUser}</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="TAGS"/>:</strong> ${wisemapDetail.tags}</li>
</ul>
</div>
<div id="detail" class="sb">
<spring:message code="DETAIL_INFORMATION"/>
<table>
<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/>
<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">
${mindmapCollaborator.username}
<br/>
</c:forEach>
</td>
<td>
<b>
<spring:message code="VIEWERS"/>
</b>
(
<c:out value="${wisemapDetail.countViewers}"/>
)
<br/>
</li>
<li><strong><spring:message code="VIEWERS"/>(${wisemapDetail.countViewers}): </strong>
<c:forEach items="${wisemapDetail.viewers}" var="mindmapViewer">
${mindmapViewer.username}
<br/>
</c:forEach>
</td>
</tr>
</table>
</li>
</ul>
</div>
</td>
</tr>
<tr class="evenRow">
<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>
<div class="tab-pane fade" id="publish">
<ul class="unstyled">
<c:choose>
<c:when test="${wisemapDetail.public}">
<spring:message code="ALL_VIEW_PUBLIC"/>
<br/>
<table class="oddRow">
<colgroup>
<col width="10%"/>
<col width="90%"/>
</colgroup>
<tbody>
<tr>
<td class="formLabel">
<spring:message code="URL"/>
:
</td>
<td>
<li><strong><spring:message code="PUBLIC"/>: </strong><spring:message code="ALL_VIEW_PUBLIC"/>
</li>
<li><<strong><spring:message code="URL"/>: </strong>
<input name="url"
value="http://www.wisemapping.com/c/publicView.htm?mapId=${wisemapDetail.id}"
style="width:400px" readonly="readonly"/>
</td>
</tr>
<tr>
<td class="formLabel">
<spring:message code="DIRECT_LINK"/>
:
</td>
<td>
</li>
<li><strong><spring:message code="DIRECT_LINK"/>: </strong>
<textarea style="width:400px;height:30px;overflow:hidden;" cols="55" rows="3"
readonly="readonly">
&lt;a
href="http://www.wisemapping.com/c/publicView.htm?mapId=${wisemapDetail.id}">${wisemapDetail.title}&lt;/a></textarea>
</td>
</tr>
<tr>
<td class="formLabel" style="white-space:normal;">
<spring:message code="BLOG_INCLUSION"/>
:
</td>
<td>
<li><strong><spring:message code="BLOG_INCLUSION"/>: </strong>
<textarea style="width:400px;height:70px;overflow:hidden;" cols="55" rows="5"
readonly="readonly">
&lt;iframe
@ -176,19 +60,15 @@
src="http://www.wisemapping.com/c/embeddedView.htm?mapId=${wisemapDetail.id}&amp;amzoom=1"&gt;
&lt;/iframe&gt;
</textarea>
<p><spring:message code="EMBEDDED_MAP_SIZE"/></p>
</td>
</tr>
</tbody>
</table>
</li>
<li><spring:message code="EMBEDDED_MAP_SIZE"/></li>
</c:when>
<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:choose>
</td>
</tr>
</table>
</ul>
</div>
</div>
</div>

View File

@ -19,7 +19,7 @@
<!--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.plugins.js"></script>
<script type="text/javascript" language="javascript" src="js/mymaps.js"></script>
<!-- Update timer plugging -->
<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>';
}
},
{
sTitle : "Description",
mDataProp : "description"
},
{
sTitle : "Owner",
mDataProp :"creator"
@ -72,16 +68,6 @@
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>';
}
},
{
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,
@ -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() {
});
@ -270,20 +275,23 @@
<div class="btn-group" id="deleteBtn" style="display:none">
<button class="btn"><i class="icon-trash"></i> Delete</button>
</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">
<i class="icon-asterisk"></i> More
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li id="duplicateBtn"><a href="#" onclick="return false"><i class="icon-plus-sign"></i>
Duplicate</a></li>
<li id="duplicateBtn"><a href="#" onclick="return false"><i class="icon-plus-sign"></i> Duplicate</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="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>
<li id="exportBtn"><a href="#" onclick="return false"><i class="icon-download-alt"></i> Export</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>
</ul>
@ -316,7 +324,7 @@
</div>
<div class="modal-footer">
<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>
@ -347,7 +355,7 @@
</div>
<div class="modal-footer">
<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>
@ -376,7 +384,7 @@
</div>
<div class="modal-footer">
<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>
@ -389,13 +397,40 @@
</div>
<div class="modal-body">
<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 class="modal-footer">
<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>
@ -409,7 +444,6 @@
</div>
</div>
</div>
<jsp:include page="footer.jsp"/>