2012-02-12 06:55:42 +01:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
|
|
|
|
<%@ include file="/jsp/init.jsp" %>
|
|
|
|
<html>
|
|
|
|
<head>
|
2012-04-14 23:46:07 +02:00
|
|
|
<base href="${pageContext.request.contextPath}/"/>
|
2012-04-06 22:05:42 +02:00
|
|
|
<title><spring:message code="SITE.TITLE"/></title>
|
|
|
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
|
|
|
|
|
|
|
|
<link rel="icon" href="${pageContext.request.contextPath}/images/favicon.ico" type="image/x-icon"/>
|
|
|
|
<link rel="shortcut icon" href="${pageContext.request.contextPath}/images/favicon.ico" type="image/x-icon"/>
|
2012-05-16 06:36:02 +02:00
|
|
|
|
2012-04-06 22:05:42 +02:00
|
|
|
<link rel="stylesheet/less" type="text/css" href="css/mymaps.less"/>
|
|
|
|
<script src="js/less.js" type="text/javascript"></script>
|
|
|
|
|
2012-05-16 06:36:02 +02:00
|
|
|
<script type="text/javascript" language="javascript" src="js/jquery-1.7.2.min.js"></script>
|
|
|
|
<script type="text/javascript" language="javascript" src="bootstrap/js/bootstrap.js"></script>
|
|
|
|
|
2012-04-06 22:05:42 +02:00
|
|
|
|
|
|
|
<!--jQuery DataTables-->
|
2012-05-16 06:36:02 +02:00
|
|
|
<script type="text/javascript" language="javascript" src="js/jquery.dataTables.min.js"></script>
|
2012-04-06 22:05:42 +02:00
|
|
|
<script type="text/javascript" language="javascript" src="js/jquery.dataTables.plugins.js"></script>
|
2012-05-16 06:36:02 +02:00
|
|
|
|
|
|
|
<!-- Update timer plugging -->
|
2012-04-08 02:35:01 +02:00
|
|
|
<script type="text/javascript" language="javascript" src="js/jquery.timeago.js"></script>
|
|
|
|
|
2012-04-06 22:05:42 +02:00
|
|
|
<script type="text/javascript" charset="utf-8">
|
|
|
|
$(function() {
|
|
|
|
|
|
|
|
var jQueryDataTable = $('#mindmapListTable').dataTable({
|
|
|
|
bProcessing : true,
|
|
|
|
sAjaxSource : "../service/maps",
|
|
|
|
sAjaxDataProp: 'mindmapsInfo',
|
2012-05-13 23:28:00 +02:00
|
|
|
fnInitComplete: function() {
|
|
|
|
$('#mindmapListTable tbody').change(updateToolbar);
|
|
|
|
},
|
2012-04-06 22:05:42 +02:00
|
|
|
aoColumns: [
|
|
|
|
{
|
|
|
|
sTitle : '<input type="checkbox" id="selectAll"/>',
|
|
|
|
sWidth : "15px",
|
|
|
|
sClass : "select center",
|
|
|
|
bSortable : false,
|
|
|
|
bSearchable : false,
|
|
|
|
fnRender : function(obj) {
|
|
|
|
return '<input type="checkbox" id="' + obj.aData.id + '"/>';
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
sClass : "columName",
|
|
|
|
sTitle : "Name",
|
|
|
|
bUseRendered : false,
|
2012-04-08 01:05:50 +02:00
|
|
|
mDataProp: "title",
|
|
|
|
fnRender : function(obj) {
|
2012-04-14 23:46:07 +02:00
|
|
|
return '<a href="c/map/' + obj.aData.id + '/edit.htm">' + obj.aData.title + '</a>';
|
2012-04-08 01:05:50 +02:00
|
|
|
}
|
2012-04-06 22:05:42 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
sTitle : "Description",
|
|
|
|
mDataProp : "description"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
sTitle : "Owner",
|
|
|
|
mDataProp :"creator"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
bSearchable : false,
|
|
|
|
sTitle : "Last Modified",
|
|
|
|
bUseRendered: false,
|
2012-04-08 23:36:22 +02:00
|
|
|
sType: "date",
|
2012-04-08 02:35:01 +02:00
|
|
|
mDataProp: "lastModificationTime",
|
2012-04-06 22:05:42 +02:00
|
|
|
fnRender : function(obj) {
|
2012-04-08 02:35:01 +02:00
|
|
|
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>';
|
2012-04-06 22:05:42 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
sTitle: "Details",
|
|
|
|
sClass: "center",
|
|
|
|
sWidth : "15px",
|
|
|
|
bSortable : false,
|
|
|
|
bSearchable : false,
|
|
|
|
fnRender : function(obj) {
|
2012-04-14 23:46:07 +02:00
|
|
|
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>';
|
2012-04-06 22:05:42 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
2012-05-19 07:32:09 +02:00
|
|
|
AutoWidth : false,
|
|
|
|
oLanguage : {
|
2012-04-06 22:05:42 +02:00
|
|
|
"sSearch" : "Search",
|
|
|
|
"sInfo" : "Page _END_ of _TOTAL_"
|
|
|
|
},
|
|
|
|
bStateSave:true
|
|
|
|
});
|
2012-02-12 06:55:42 +01:00
|
|
|
|
2012-04-06 22:05:42 +02:00
|
|
|
$('#mindmapListTable_filter').appendTo("#toolbar");
|
2012-05-13 23:28:00 +02:00
|
|
|
$("#mindmapListTable_length").appendTo("#actionButtons");
|
2012-02-12 06:55:42 +01:00
|
|
|
|
2012-04-06 22:05:42 +02:00
|
|
|
$('input:checkbox[id="selectAll"]').click(function() {
|
|
|
|
$("#mindmapListTable").dataTableExt.selectAllMaps();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
2012-02-12 06:55:42 +01:00
|
|
|
|
2012-04-06 22:05:42 +02:00
|
|
|
<!--Tags-->
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
2012-02-12 06:55:42 +01:00
|
|
|
|
2012-04-06 22:05:42 +02:00
|
|
|
var tags = ['ThinkMapping', 'Akostic', 'Clients', 'Favoris'];
|
2012-02-12 06:55:42 +01:00
|
|
|
|
2012-04-06 22:05:42 +02:00
|
|
|
$(function() {
|
|
|
|
for (i in tags) {
|
|
|
|
var outerDiv = $('<div class="tag">' + tags[i] + '</div>');
|
|
|
|
var icon = $('<span class="ui-icon ui-icon-folder-collapsed"></span>');
|
|
|
|
outerDiv.append(icon);
|
|
|
|
$("#tags-list").append(outerDiv);
|
|
|
|
}
|
2012-02-12 06:55:42 +01:00
|
|
|
|
2012-04-06 22:05:42 +02:00
|
|
|
$("#tags-actions button").button({
|
|
|
|
icons: { primary: "ui-icon-plusthick" }
|
|
|
|
});
|
2012-02-12 06:55:42 +01:00
|
|
|
|
2012-04-06 22:05:42 +02:00
|
|
|
$("#tags-list .tag").each(function(index) {
|
|
|
|
$(this).click(function() {
|
|
|
|
console.log("ddfsfds");
|
|
|
|
})
|
|
|
|
})
|
|
|
|
});
|
|
|
|
</script>
|
2012-02-12 06:55:42 +01:00
|
|
|
|
2012-04-06 22:05:42 +02:00
|
|
|
<!--Buttons-->
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
|
|
|
$(function() {
|
2012-05-13 23:28:00 +02:00
|
|
|
// Creation buttons actions ...
|
2012-05-16 06:36:02 +02:00
|
|
|
$("#newBtn").click(
|
|
|
|
function() {
|
2012-04-08 01:05:50 +02:00
|
|
|
$("#new-dialog-modal").dialogForm({
|
2012-04-07 01:18:25 +02:00
|
|
|
modal: true,
|
2012-04-15 11:59:32 +02:00
|
|
|
redirect: "c/map/{header.resourceId}/edit.htm",
|
2012-04-08 01:05:50 +02:00
|
|
|
url : "../service/maps"
|
2012-04-07 01:18:25 +02:00
|
|
|
});
|
|
|
|
});
|
2012-04-06 22:05:42 +02:00
|
|
|
|
2012-05-19 04:43:22 +02:00
|
|
|
$("#importBtn").click(function() {
|
2012-05-16 06:36:02 +02:00
|
|
|
window.open('c/map/import.htm');
|
|
|
|
});
|
2012-05-13 23:28:00 +02:00
|
|
|
|
2012-05-16 06:36:02 +02:00
|
|
|
$("#duplicateBtn").click(function() {
|
|
|
|
// Map to be cloned ...
|
|
|
|
var tableElem = $('#mindmapListTable');
|
|
|
|
var rows = tableElem.dataTableExt.getSelectedRows();
|
|
|
|
if (rows.length > 0) {
|
2012-04-08 01:05:50 +02:00
|
|
|
|
2012-05-16 06:36:02 +02:00
|
|
|
// Obtain map name ...
|
|
|
|
var rowData = tableElem.dataTable().fnGetData(rows[0]);
|
2012-05-19 04:43:22 +02:00
|
|
|
$('#dupDialogTitle').text("Duplicate '" + rowData.title + "'");
|
2012-04-08 01:05:50 +02:00
|
|
|
|
2012-05-16 06:36:02 +02:00
|
|
|
// Obtains map id ...
|
|
|
|
var mapId = rowData.id;
|
2012-04-08 01:05:50 +02:00
|
|
|
|
2012-05-16 06:36:02 +02:00
|
|
|
// Initialize dialog ...
|
|
|
|
$("#duplicate-dialog-modal").dialogForm({
|
|
|
|
modal: true,
|
|
|
|
redirect: "c/map/{header.resourceId}/edit.htm",
|
|
|
|
url : "../service/maps/" + mapId
|
2012-04-08 01:05:50 +02:00
|
|
|
});
|
2012-05-16 06:36:02 +02:00
|
|
|
}
|
|
|
|
});
|
2012-04-08 01:05:50 +02:00
|
|
|
|
2012-05-19 04:43:22 +02:00
|
|
|
$("#renameBtn").click(function() {
|
2012-05-19 05:13:06 +02:00
|
|
|
// Map to be cloned ...
|
|
|
|
var tableElem = $('#mindmapListTable');
|
|
|
|
var rows = tableElem.dataTableExt.getSelectedRows();
|
|
|
|
if (rows.length > 0) {
|
|
|
|
|
|
|
|
// Obtain map name ...
|
|
|
|
var dataTable = tableElem.dataTable();
|
|
|
|
var rowData = dataTable.fnGetData(rows[0]);
|
2012-04-08 01:05:50 +02:00
|
|
|
|
2012-05-19 05:13:06 +02:00
|
|
|
// Fill dialog with default values ...
|
|
|
|
var mapId = rowData.id;
|
|
|
|
$("#rename-dialog-modal input[name='title']").attr('value', rowData.title);
|
|
|
|
$("#rename-dialog-modal input[name='description']").attr('value', rowData.description);
|
|
|
|
|
|
|
|
// Set title ...
|
|
|
|
$('#renameDialogTitle').text("Rename '" + rowData.title + "'");
|
|
|
|
|
|
|
|
// Initialize dialog ...
|
|
|
|
$("#rename-dialog-modal").dialogForm({
|
|
|
|
modal: true,
|
|
|
|
type: 'PUT',
|
|
|
|
postUpdate: function(reqBodyData) {
|
|
|
|
// Remove old entry ...
|
|
|
|
dataTable.fnDeleteRow(rowData);
|
|
|
|
|
|
|
|
// Add a new one...
|
|
|
|
rowData.title = reqBodyData.title;
|
|
|
|
rowData.description = reqBodyData.description;
|
|
|
|
dataTable.fnAddData(rowData);
|
|
|
|
},
|
|
|
|
url : "../service/maps/" + mapId + "/title"
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
2012-04-06 22:05:42 +02:00
|
|
|
|
2012-05-19 04:43:22 +02:00
|
|
|
$("#deleteBtn").click(function() {
|
|
|
|
var mapIds = $('#mindmapListTable').dataTableExt.getSelectedMapsIds();
|
|
|
|
if (mapIds.length > 0) {
|
|
|
|
var html2 = $('#delete-dialog-modal p span');
|
|
|
|
$("#delete-dialog-modal").dialog({
|
|
|
|
height: 140,
|
|
|
|
modal: true,
|
|
|
|
buttons: {
|
|
|
|
"Delete": function() {
|
|
|
|
$('#mindmapListTable').dataTableExt.removeSelectedRows();
|
|
|
|
$(this).dialog("close");
|
|
|
|
},
|
|
|
|
Cancel: function() {
|
|
|
|
$(this).dialog("close");
|
|
|
|
}
|
2012-02-12 06:55:42 +01:00
|
|
|
}
|
|
|
|
});
|
2012-05-19 04:43:22 +02:00
|
|
|
}
|
|
|
|
});
|
2012-04-08 01:05:50 +02:00
|
|
|
|
2012-05-19 05:13:06 +02:00
|
|
|
$("#printBtn").click(function() {
|
|
|
|
var mapIds = $('#mindmapListTable').dataTableExt.getSelectedMapsIds();
|
|
|
|
if (mapIds.length > 0) {
|
|
|
|
window.open('c/map/' + mapIds[0] + '/print.htm');
|
|
|
|
}
|
|
|
|
});
|
2012-04-15 13:00:51 +02:00
|
|
|
|
2012-05-19 05:13:06 +02:00
|
|
|
$("#actionButtons .publishMap").click(function() {
|
|
|
|
});
|
2012-04-15 13:00:51 +02:00
|
|
|
|
2012-05-19 05:13:06 +02:00
|
|
|
$("#actionButtons .shareMap").click(function() {
|
|
|
|
});
|
|
|
|
|
|
|
|
$("#actionButtons .tagMap").click(function() {
|
|
|
|
});
|
|
|
|
|
|
|
|
$("#actionButtons .share").click(function() {
|
|
|
|
});
|
|
|
|
|
|
|
|
$("#actionButtons .tags").click(function() {
|
|
|
|
});
|
2012-04-15 13:00:51 +02:00
|
|
|
|
2012-04-08 01:05:50 +02:00
|
|
|
});
|
2012-04-08 02:35:01 +02:00
|
|
|
|
|
|
|
// Register time update functions ....
|
|
|
|
setTimeout(function() {
|
|
|
|
jQuery("abbr.timeago").timeago()
|
2012-04-08 23:36:22 +02:00
|
|
|
}, 50000);
|
2012-05-13 23:28:00 +02:00
|
|
|
|
2012-02-12 06:55:42 +01:00
|
|
|
</script>
|
2012-04-06 22:05:42 +02:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<div class="content">
|
|
|
|
<jsp:include page="header.jsp">
|
|
|
|
<jsp:param name="removeSignin" value="false"/>
|
|
|
|
<jsp:param name="showLogout" value="true"/>
|
|
|
|
</jsp:include>
|
|
|
|
|
|
|
|
|
2012-05-16 06:36:02 +02:00
|
|
|
<div id="mindmapListContainer">
|
|
|
|
<div id="buttonsToolbar" class="btn-toolbar">
|
2012-04-06 22:05:42 +02:00
|
|
|
|
2012-05-16 06:36:02 +02:00
|
|
|
<div class="btn-group">
|
|
|
|
<button class="btn" id="newBtn"><i class="icon-file"></i> New</button>
|
|
|
|
<button class="btn" id="importBtn"><i class="icon-upload"></i> Import</button>
|
2012-05-13 23:28:00 +02:00
|
|
|
</div>
|
|
|
|
|
2012-05-16 06:36:02 +02:00
|
|
|
<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">
|
|
|
|
|
|
|
|
<button class="btn dropdown-toggle" data-toggle="dropdown">
|
|
|
|
<i class="icon-asterisk"></i> More
|
|
|
|
<span class="caret"></span>
|
|
|
|
</button>
|
|
|
|
<ul class="dropdown-menu">
|
2012-05-19 05:13:06 +02:00
|
|
|
<li id="duplicateBtn"><a href="#" onclick="return false"><i class="icon-plus-sign"></i>
|
|
|
|
Duplicate</a></li>
|
2012-05-19 04:43:22 +02:00
|
|
|
<li id="renameBtn"><a href="#" onclick="return false"><i class="icon-edit"></i> Rename</a></li>
|
2012-05-19 05:13:06 +02:00
|
|
|
<li id="printBtn"><a href="#" onclick="return false"><i class="icon-print"></i> Print</a></li>
|
2012-05-16 06:36:02 +02:00
|
|
|
<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="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>
|
2012-05-13 23:28:00 +02:00
|
|
|
</div>
|
2012-04-15 13:00:51 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
2012-05-16 06:36:02 +02:00
|
|
|
<!-- New map dialog -->
|
|
|
|
<div id="new-dialog-modal" title="Add new map" class="modal fade" style="display:none">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button class="close" data-dismiss="modal">x</button>
|
|
|
|
<h3>Create a new map</h3>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<div id="errorMessage"></div>
|
|
|
|
<form class="form-horizontal">
|
|
|
|
<fieldset>
|
|
|
|
<div class="control-group">
|
|
|
|
<label class="control-label" for="newTitle"><spring:message code="NAME"/>:</label>
|
|
|
|
<input class="control" name="title" id="newTitle" type="text" required="true"
|
2012-05-19 07:32:09 +02:00
|
|
|
placeholder="Name of the new map to create" autofocus="autofocus"/>
|
2012-05-16 06:36:02 +02:00
|
|
|
</div>
|
|
|
|
<div class="control-group">
|
|
|
|
<label class="control-label" for="newDec"><spring:message code="DESCRIPTION"/>:</label>
|
|
|
|
<input class="control" name="description" id="newDec" type="text"
|
|
|
|
placeholder="Some description for your map"/>
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
2012-05-19 05:13:06 +02:00
|
|
|
<button class="btn btn-primary btn-accept" data-loading-text="Creating ...">Create</button>
|
2012-05-16 06:36:02 +02:00
|
|
|
<button class="btn btn-cancel">Close</button>
|
|
|
|
</div>
|
2012-04-08 01:05:50 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Duplicate map dialog -->
|
2012-05-16 06:36:02 +02:00
|
|
|
<div id="duplicate-dialog-modal" class="modal fade" style="display: none">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button class="close" data-dismiss="modal">X</button>
|
2012-05-19 04:43:22 +02:00
|
|
|
<h3 id="dupDialogTitle"></h3>
|
2012-05-16 06:36:02 +02:00
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<div id="errorMessage"></div>
|
|
|
|
<form class="form-horizontal">
|
|
|
|
<fieldset>
|
|
|
|
<div class="control-group">
|
2012-05-19 07:32:09 +02:00
|
|
|
<label for="title" class="control-label"><spring:message code="NAME" />: </label>
|
|
|
|
<input name="title" id="title" type="text" required="required" placeholder="Name of the new map to create" autofocus="autofocus" class="control"/>
|
2012-05-16 06:36:02 +02:00
|
|
|
</div>
|
|
|
|
<div class="control-group">
|
|
|
|
<label for="description" class="control-label"><spring:message
|
|
|
|
code="DESCRIPTION"/>: </label>
|
|
|
|
<input name="description" id="description" type="text"
|
|
|
|
placeholder="Some description for your map" class="control"/>
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
2012-05-19 06:19:55 +02:00
|
|
|
<button class="btn btn-primary btn-accept" data-loading-text="Duplicating ...">Duplicate</button>
|
2012-05-16 06:36:02 +02:00
|
|
|
<button class="btn btn-cancel">Close</button>
|
|
|
|
</div>
|
2012-04-07 01:18:25 +02:00
|
|
|
</div>
|
2012-04-08 01:05:50 +02:00
|
|
|
|
2012-05-19 04:43:22 +02:00
|
|
|
<!-- Rename map dialog -->
|
|
|
|
<div id="rename-dialog-modal" class="modal fade" style="display: none">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button class="close" data-dismiss="modal">x</button>
|
|
|
|
<h3 id="renameDialogTitle"></h3>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<div id="errorMessage"></div>
|
|
|
|
<form class="form-horizontal">
|
|
|
|
<fieldset>
|
|
|
|
<div class="control-group">
|
|
|
|
<label for="renTitle" class="control-label"><spring:message code="NAME"/>: </label>
|
2012-05-19 07:32:09 +02:00
|
|
|
<input name="title" id="renTitle" required="required" autofocus="autofocus" class="control"/>
|
2012-05-19 04:43:22 +02:00
|
|
|
</div>
|
|
|
|
<div class="control-group">
|
|
|
|
<label for="renDescription" class="control-label"><spring:message
|
|
|
|
code="DESCRIPTION"/>:</label>
|
|
|
|
<input name="description" class="control" id="renDescription"/>
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button class="btn btn-primary btn-accept">Rename</button>
|
|
|
|
<button class="btn btn-cancel">Close</button>
|
|
|
|
</div>
|
2012-04-06 22:05:42 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<div id="map-table">
|
2012-04-07 17:45:35 +02:00
|
|
|
<table class="display" id="mindmapListTable">
|
2012-04-06 22:05:42 +02:00
|
|
|
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2012-02-12 06:55:42 +01:00
|
|
|
<jsp:include page="footer.jsp"/>
|
|
|
|
</body>
|
|
|
|
</html>
|