mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-05 07:03:24 +01:00
Rename and delete actions working ...
This commit is contained in:
parent
391c523b43
commit
5498c681a4
@ -33,7 +33,7 @@ mindplot.RESTPersistenceManager = new Class({
|
|||||||
};
|
};
|
||||||
|
|
||||||
var request = new Request({
|
var request = new Request({
|
||||||
url:this.saveUrl + mapId + "?minor=" + !saveHistory,
|
url:this.saveUrl.replace("{id}", mapId) + "?minor=" + !saveHistory,
|
||||||
method: 'put',
|
method: 'put',
|
||||||
onSuccess:function(responseText, responseXML) {
|
onSuccess:function(responseText, responseXML) {
|
||||||
events.onSuccess();
|
events.onSuccess();
|
||||||
|
@ -54,9 +54,9 @@ public class MindmapController extends BaseController {
|
|||||||
return new ModelAndView("mapsView", "list", restMindmapList);
|
return new ModelAndView("mapsView", "list", restMindmapList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}", consumes = {"application/xml", "application/json"}, produces = {"application/json", "text/html", "application/xml"})
|
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/document", consumes = {"application/xml", "application/json"}, produces = {"application/json", "text/html", "application/xml"})
|
||||||
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
||||||
public void updateMap(@RequestBody RestMindmap restMindmap, @PathVariable int id, @RequestParam(required = false) boolean minor) throws IOException, WiseMappingException {
|
public void updateDocument(@RequestBody RestMindmap restMindmap, @PathVariable int id, @RequestParam(required = false) boolean minor) throws IOException, WiseMappingException {
|
||||||
|
|
||||||
final MindMap mindMap = mindmapService.getMindmapById(id);
|
final MindMap mindMap = mindmapService.getMindmapById(id);
|
||||||
final User user = Utils.getUser();
|
final User user = Utils.getUser();
|
||||||
@ -79,6 +79,58 @@ public class MindmapController extends BaseController {
|
|||||||
updateMindmap(minor, mindMap, user);
|
updateMindmap(minor, mindMap, user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The intention of this method is the update of several properties at once ...
|
||||||
|
*/
|
||||||
|
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}", consumes = {"application/xml", "application/json"}, produces = {"application/json", "text/html", "application/xml"})
|
||||||
|
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
||||||
|
public void updateMap(@RequestBody RestMindmap restMindmap, @PathVariable int id, @RequestParam(required = false) boolean minor) throws IOException, WiseMappingException {
|
||||||
|
|
||||||
|
final MindMap mindMap = mindmapService.getMindmapById(id);
|
||||||
|
final User user = Utils.getUser();
|
||||||
|
|
||||||
|
// Update document properties ...
|
||||||
|
final String properties = restMindmap.getProperties();
|
||||||
|
if (properties != null) {
|
||||||
|
mindMap.setProperties(properties);
|
||||||
|
}
|
||||||
|
final String xml = restMindmap.getXml();
|
||||||
|
if (xml != null) {
|
||||||
|
mindMap.setXmlStr(xml);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update title ...
|
||||||
|
final String title = restMindmap.getTitle();
|
||||||
|
if (title != null && !title.equals(mindMap.getTitle())) {
|
||||||
|
if (mindmapService.getMindmapByTitle(title, user) != null) {
|
||||||
|
throw buildValidationException("title", "You already have a map with this title");
|
||||||
|
}
|
||||||
|
mindMap.setTitle(title);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update description ...
|
||||||
|
final String description = restMindmap.getDescription();
|
||||||
|
if (description != null) {
|
||||||
|
mindMap.setDescription(description);
|
||||||
|
}
|
||||||
|
|
||||||
|
final String tags = restMindmap.getTags();
|
||||||
|
if (tags != null) {
|
||||||
|
mindMap.setTags(tags);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update map ...
|
||||||
|
updateMindmap(minor, mindMap, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ValidationException buildValidationException(@NotNull String fieldName, @NotNull String message) throws ValidationException {
|
||||||
|
final BindingResult result = new BeanPropertyBindingResult(new RestMindmap(), "");
|
||||||
|
result.rejectValue(fieldName, "error.not-specified", null, message);
|
||||||
|
return new ValidationException(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/title", consumes = {"text/plain"}, produces = {"application/json", "text/html", "application/xml"})
|
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/title", consumes = {"text/plain"}, produces = {"application/json", "text/html", "application/xml"})
|
||||||
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
||||||
public void changeMapTitle(@RequestBody String title, @PathVariable int id) throws WiseMappingException {
|
public void changeMapTitle(@RequestBody String title, @PathVariable int id) throws WiseMappingException {
|
||||||
@ -88,7 +140,8 @@ public class MindmapController extends BaseController {
|
|||||||
|
|
||||||
// Is there a map with the same name ?
|
// Is there a map with the same name ?
|
||||||
if (mindmapService.getMindmapByTitle(title, user) != null) {
|
if (mindmapService.getMindmapByTitle(title, user) != null) {
|
||||||
throw new IllegalArgumentException("Map already exists with this title");
|
|
||||||
|
throw buildValidationException("title", "You already have a mindmap with this title");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update map ...
|
// Update map ...
|
||||||
@ -129,7 +182,7 @@ public class MindmapController extends BaseController {
|
|||||||
|
|
||||||
@RequestMapping(method = RequestMethod.DELETE, value = "/maps/{id}")
|
@RequestMapping(method = RequestMethod.DELETE, value = "/maps/{id}")
|
||||||
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
||||||
public void updateMap( @PathVariable int id) throws IOException, WiseMappingException {
|
public void updateMap(@PathVariable int id) throws IOException, WiseMappingException {
|
||||||
final User user = Utils.getUser();
|
final User user = Utils.getUser();
|
||||||
final MindMap mindmap = mindmapService.getMindmapById(id);
|
final MindMap mindmap = mindmapService.getMindmapById(id);
|
||||||
mindmapService.removeMindmap(mindmap, user);
|
mindmapService.removeMindmap(mindmap, user);
|
||||||
|
@ -224,6 +224,7 @@ COLOR=Color
|
|||||||
SHARE=Share
|
SHARE=Share
|
||||||
UNEXPECTED_ERROR=Outch!!. An unexpected error has occurred.
|
UNEXPECTED_ERROR=Outch!!. An unexpected error has occurred.
|
||||||
UNEXPECTED_ERROR_DETAILS=We're sorry, an error has occurred and we can't process your request. Please try again, or go to the home page.
|
UNEXPECTED_ERROR_DETAILS=We're sorry, an error has occurred and we can't process your request. Please try again, or go to the home page.
|
||||||
|
UNEXPECTED_ERROR_SERVER_ERROR=We're sorry, an error has occurred and we can't process your request. Refresh the page and try again. If the problem persist, contact the administrator.
|
||||||
NO_ENOUGH_PERMISSIONS=Outch!!. This map is not available anymore.
|
NO_ENOUGH_PERMISSIONS=Outch!!. This map is not available anymore.
|
||||||
NO_ENOUGH_PERMISSIONS_DETAILS=You do not have enough right access to see this map. This map has been changed to private or deleted.
|
NO_ENOUGH_PERMISSIONS_DETAILS=You do not have enough right access to see this map. This map has been changed to private or deleted.
|
||||||
SHARING=Sharing
|
SHARING=Sharing
|
||||||
|
@ -53,6 +53,7 @@ jQuery.fn.dataTableExt.removeSelectedRows = function() {
|
|||||||
trs.each(function() {
|
trs.each(function() {
|
||||||
$('#mindmapListTable').dataTable().fnDeleteRow(this);
|
$('#mindmapListTable').dataTable().fnDeleteRow(this);
|
||||||
});
|
});
|
||||||
|
updateStatus();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -62,18 +63,24 @@ jQuery.fn.dialogForm = function(options) {
|
|||||||
var url = options.url;
|
var url = options.url;
|
||||||
|
|
||||||
// Clear previous state ...
|
// Clear previous state ...
|
||||||
$("#" + containerId + " .errorMessage").text("").removeClass("alert alert-error");
|
$("#" + containerId).find('.errorMessage').text("").removeClass("alert alert-error");
|
||||||
$("#" + containerId + " .control-group").removeClass('error');
|
$("#" + containerId).find('.control-group').removeClass('error');
|
||||||
$("#" + containerId + " input").attr('value', '');
|
|
||||||
|
|
||||||
|
// Clear form values ...
|
||||||
|
if (options.clearForm == undefined || options.clearForm) {
|
||||||
|
$("#" + containerId).find('input').attr('value', '');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reset button state ...
|
||||||
var acceptBtn = $('#' + containerId + ' .btn-accept');
|
var acceptBtn = $('#' + containerId + ' .btn-accept');
|
||||||
|
acceptBtn.button('reset');
|
||||||
|
|
||||||
acceptBtn.click(function() {
|
acceptBtn.click(function() {
|
||||||
var formData = {};
|
var formData = {};
|
||||||
$('#' + containerId + ' input').each(function(index, elem) {
|
$('#' + containerId + ' input').each(function(index, elem) {
|
||||||
formData[elem.name] = elem.value;
|
formData[elem.name] = elem.value;
|
||||||
});
|
});
|
||||||
|
$(acceptBtn).button('loading');
|
||||||
var dialogElem = this;
|
var dialogElem = this;
|
||||||
jQuery.ajax(url, {
|
jQuery.ajax(url, {
|
||||||
async:false,
|
async:false,
|
||||||
@ -86,7 +93,6 @@ jQuery.fn.dialogForm = function(options) {
|
|||||||
var resourceId = jqXHR.getResponseHeader("ResourceId");
|
var resourceId = jqXHR.getResponseHeader("ResourceId");
|
||||||
var redirectUrl = options.redirect;
|
var redirectUrl = options.redirect;
|
||||||
redirectUrl = redirectUrl.replace("{header.resourceId}", resourceId);
|
redirectUrl = redirectUrl.replace("{header.resourceId}", resourceId);
|
||||||
$(acceptBtn).button('loading');
|
|
||||||
window.location = redirectUrl;
|
window.location = redirectUrl;
|
||||||
|
|
||||||
} else if (options.postUpdate) {
|
} else if (options.postUpdate) {
|
||||||
@ -105,14 +111,18 @@ jQuery.fn.dialogForm = function(options) {
|
|||||||
var message = fieldErrors[fieldName];
|
var message = fieldErrors[fieldName];
|
||||||
var inputField = $("#" + containerId + " input[name='" + fieldName + "']");
|
var inputField = $("#" + containerId + " input[name='" + fieldName + "']");
|
||||||
|
|
||||||
$("#" + containerId + " .errorMessage").text(message).addClass("alert alert-error");
|
$("#" + containerId).find(".errorMessage").text(message).addClass("alert alert-error");
|
||||||
inputField.parent().addClass('error');
|
inputField.parent().addClass('error');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
alert("Unexpected error removing maps. Refresh before continue.");
|
console.log(errorThrown);
|
||||||
|
console.log(jqXHR);
|
||||||
|
|
||||||
|
dialogElem.modal('hide');
|
||||||
|
$('#messagesPanel div').text(errorThrown).parent().show();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -136,22 +146,19 @@ function updateStatus() {
|
|||||||
$("#mindmapListTable tbody input:checked").parent().parent().addClass('row-selected');
|
$("#mindmapListTable tbody input:checked").parent().parent().addClass('row-selected');
|
||||||
$("#mindmapListTable tbody input:not(:checked)").parent().parent().removeClass('row-selected');
|
$("#mindmapListTable tbody input:not(:checked)").parent().parent().removeClass('row-selected');
|
||||||
|
|
||||||
$("#buttonsToolbar .act-multiple").hide();
|
$('#buttonsToolbar').find('.act-single').hide().end().find('.act-multiple').hide();
|
||||||
$("#buttonsToolbar .act-single").hide();
|
|
||||||
|
|
||||||
var tableElem = $('#mindmapListTable');
|
var tableElem = $('#mindmapListTable');
|
||||||
var selectedRows = tableElem.dataTableExt.getSelectedRows();
|
var selectedRows = tableElem.dataTableExt.getSelectedRows();
|
||||||
|
|
||||||
if (selectedRows.length > 0) {
|
if (selectedRows.length > 0) {
|
||||||
if (selectedRows.length == 1) {
|
if (selectedRows.length == 1) {
|
||||||
$("#buttonsToolbar .act-single").show();
|
$('#buttonsToolbar').find('.act-single').show().end().find('.act-multiple').show();
|
||||||
$("#buttonsToolbar .act-multiple").show();
|
|
||||||
|
|
||||||
// Can be executed by the owner ?
|
// Can be executed by the owner ?
|
||||||
var rowData = tableElem.dataTable().fnGetData(selectedRows[0]);
|
var rowData = tableElem.dataTable().fnGetData(selectedRows[0]);
|
||||||
if (rowData.ownerEmail != principalEmail) {
|
if (rowData.ownerEmail != principalEmail) {
|
||||||
$("#buttonsToolbar #publishBtn").hide();
|
$("#buttonsToolbar").find('#publishBtn').hide().end().find('#shareBtn').hide();
|
||||||
$("#buttonsToolbar #shareBtn").hide();
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$("#buttonsToolbar .act-multiple").show();
|
$("#buttonsToolbar .act-multiple").show();
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
// Configure designer options ...
|
// Configure designer options ...
|
||||||
var options = loadDesignerOptions();
|
var options = loadDesignerOptions();
|
||||||
options.persistenceManager = new mindplot.RESTPersistenceManager("service/maps/");
|
options.persistenceManager = new mindplot.RESTPersistenceManager("service/maps/{id}/document");
|
||||||
var userOptions = ${mindmap.properties};
|
var userOptions = ${mindmap.properties};
|
||||||
options.zoom = userOptions.zoom;
|
options.zoom = userOptions.zoom;
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="formLabel">
|
<td class="formLabel">
|
||||||
<span class="fieldRequired">*</span>
|
|
||||||
<spring:message code="NAME"/>:
|
<spring:message code="NAME"/>:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@ -34,8 +33,8 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td>
|
<td>
|
||||||
<input type="submit" value="<spring:message code="IMPORT"/>" class="btn-primary">
|
<input type="submit" value="<spring:message code="IMPORT"/>" class="btn btn-primary">
|
||||||
<input type="button" value="<spring:message code="CANCEL"/>" class="btn-secondary"
|
<input type="button" value="<spring:message code="CANCEL"/>" class="btn"
|
||||||
onclick="window.location='/c/mymaps.htm'">
|
onclick="window.location='/c/mymaps.htm'">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -78,7 +78,7 @@
|
|||||||
oLanguage : {
|
oLanguage : {
|
||||||
"sSearch" : "",
|
"sSearch" : "",
|
||||||
"sInfo" : "_START_-_END_ of _TOTAL_",
|
"sInfo" : "_START_-_END_ of _TOTAL_",
|
||||||
"sEmptyTable": "Hey, you don't have any mindmap. Go head and create one clicking the 'New' button !!!"
|
"sEmptyTable": "Hey, you don't have any mindmap. Go ahead and create one clicking on the 'New' button !!!"
|
||||||
},
|
},
|
||||||
bStateSave:true
|
bStateSave:true
|
||||||
});
|
});
|
||||||
@ -167,16 +167,15 @@
|
|||||||
// Initialize dialog ...
|
// Initialize dialog ...
|
||||||
$("#rename-dialog-modal").dialogForm({
|
$("#rename-dialog-modal").dialogForm({
|
||||||
type: 'PUT',
|
type: 'PUT',
|
||||||
|
clearForm: false,
|
||||||
postUpdate: function(reqBodyData) {
|
postUpdate: function(reqBodyData) {
|
||||||
// Remove old entry ...
|
tableElem.dataTableExt.removeSelectedRows();
|
||||||
dataTable.fnDeleteRow(rowData);
|
|
||||||
|
|
||||||
// Add a new one...
|
|
||||||
rowData.title = reqBodyData.title;
|
rowData.title = reqBodyData.title;
|
||||||
rowData.description = reqBodyData.description;
|
rowData.description = reqBodyData.description;
|
||||||
dataTable.fnAddData(rowData);
|
dataTable.fnAddData(JSON.parse(JSON.stringify(rowData)));
|
||||||
},
|
},
|
||||||
url : "../service/maps/" + mapId + "/title"
|
url : "../service/maps/" + mapId
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -251,201 +250,207 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div style="min-height: 500px">
|
<div style="min-height: 500px">
|
||||||
<jsp:include page="header.jsp">
|
<jsp:include page="header.jsp">
|
||||||
<jsp:param name="removeSignin" value="false"/>
|
<jsp:param name="removeSignin" value="false"/>
|
||||||
<jsp:param name="showLogout" value="true"/>
|
<jsp:param name="showLogout" value="true"/>
|
||||||
</jsp:include>
|
</jsp:include>
|
||||||
|
|
||||||
|
<div id="mindmapListContainer">
|
||||||
|
<div id="messagesPanel" class="alert alert-error alert-block fade in hide" style="margin-top: 10px">
|
||||||
|
<strong><spring:message code="UNEXPECTED_ERROR"/></strong>
|
||||||
|
|
||||||
<div id="mindmapListContainer">
|
<p><spring:message code="UNEXPECTED_ERROR_SERVER_ERROR"/></p>
|
||||||
<div id="buttonsToolbar" class="btn-toolbar">
|
|
||||||
|
|
||||||
<div class="btn-group">
|
|
||||||
<button class="btn btn-info" id="newBtn"><i class="icon-file icon-white"></i> New</button>
|
|
||||||
<button class="btn btn-info" id="importBtn"><i class="icon-upload icon-white"></i> Import</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="btn-group act-multiple" id="deleteBtn" style="display:none">
|
|
||||||
<button class="btn btn-info"><i class="icon-trash icon-white"></i> Delete</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="btn-group act-single" id="infoBtn" style="display:none">
|
|
||||||
<button class="btn btn-info"><i class="icon-exclamation-sign icon-white"></i> Info</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="btn-group act-single" id="actionsBtn" style="display:none">
|
|
||||||
<button class="btn btn-info dropdown-toggle" data-toggle="dropdown">
|
|
||||||
<i class="icon-asterisk icon-white"></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="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="publishBtn"><a href="#" onclick="return false"><i class="icon-globe"></i>Publish</a></li>
|
|
||||||
<li id="shareBtn"><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>
|
|
||||||
</div>
|
|
||||||
<div id="tableActions" class="btn-toolbar">
|
|
||||||
<div class="btn-group" id="pageButtons">
|
|
||||||
<button class="btn" id="pPageBtn"><strong><</strong></button>
|
|
||||||
<button class="btn" id="nPageBtn"><strong>></strong></button>
|
|
||||||
</div>
|
|
||||||
<div id="pageInfo"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<!-- 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 class="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"
|
|
||||||
placeholder="Name of the new map to create" autofocus="autofocus"/>
|
|
||||||
</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">
|
|
||||||
<button class="btn btn-primary btn-accept" data-loading-text="Creating ...">Create</button>
|
|
||||||
<button class="btn btn-cancel" data-dismiss="modal">Cancel</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Duplicate map dialog -->
|
|
||||||
<div id="duplicate-dialog-modal" class="modal fade" style="display: none">
|
|
||||||
<div class="modal-header">
|
|
||||||
<button class="close" data-dismiss="modal">X</button>
|
|
||||||
<h3 id="dupDialogTitle"></h3>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="errorMessage"></div>
|
|
||||||
<form class="form-horizontal">
|
|
||||||
<fieldset>
|
|
||||||
<div class="control-group">
|
|
||||||
<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"/>
|
|
||||||
</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">
|
|
||||||
<button class="btn btn-primary btn-accept" data-loading-text="Duplicating ...">Duplicate</button>
|
|
||||||
<button class="btn btn-cancel" data-dismiss="modal">Cancel</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 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 class="errorMessage"></div>
|
|
||||||
<form class="form-horizontal">
|
|
||||||
<fieldset>
|
|
||||||
<div class="control-group">
|
|
||||||
<label for="renTitle" class="control-label"><spring:message code="NAME"/>: </label>
|
|
||||||
<input name="title" id="renTitle" required="required" autofocus="autofocus"
|
|
||||||
class="control"/>
|
|
||||||
</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" data-dismiss="modal">Cancel</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Delete map dialog -->
|
|
||||||
<div id="delete-dialog-modal" class="modal fade" style="display: none">
|
|
||||||
<div class="modal-header">
|
|
||||||
<button class="close" data-dismiss="modal">x</button>
|
|
||||||
<h3>Delete MindMap</h3>
|
|
||||||
</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 ?.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button class="btn btn-primary btn-accept">Delete</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>
|
|
||||||
|
|
||||||
<!-- Publish Dialog Config -->
|
|
||||||
<div id="publish-dialog-modal" class="modal fade" style="display: none">
|
|
||||||
<div class="modal-header">
|
|
||||||
<button class="close" data-dismiss="modal">x</button>
|
|
||||||
<h3>Publish</h3>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button class="btn btn-primary btn-accept" data-loading-text="Saving...">Accept</button>
|
|
||||||
<button class="btn btn-cancel" data-dismiss="modal">Cancel</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="map-table">
|
|
||||||
<table class="table table-bordered" id="mindmapListTable">
|
|
||||||
|
|
||||||
</table>
|
|
||||||
<div id="tableFooter" class="form-inline"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
<div></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
<div id="buttonsToolbar" class="btn-toolbar">
|
||||||
|
|
||||||
|
<div class="btn-group">
|
||||||
|
<button id="newBtn" class="btn btn-info"><i class="icon-file icon-white"></i> New</button>
|
||||||
|
<button id="importBtn" class="btn btn-info"><i class="icon-upload icon-white"></i> Import</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group act-multiple" id="deleteBtn" style="display:none">
|
||||||
|
<button class="btn btn-info"><i class="icon-trash icon-white"></i> Delete</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="infoBtn" class="btn-group act-single" style="display:none">
|
||||||
|
<button class="btn btn-info"><i class="icon-exclamation-sign icon-white"></i> Info</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="actionsBtn" class="btn-group act-single" style="display:none">
|
||||||
|
<button class="btn btn-info dropdown-toggle" data-toggle="dropdown">
|
||||||
|
<i class="icon-asterisk icon-white"></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="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="publishBtn"><a href="#" onclick="return false"><i class="icon-globe"></i>Publish</a></li>
|
||||||
|
<li id="shareBtn"><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>
|
||||||
|
</div>
|
||||||
|
<div id="tableActions" class="btn-toolbar">
|
||||||
|
<div class="btn-group" id="pageButtons">
|
||||||
|
<button class="btn" id="pPageBtn"><strong><</strong></button>
|
||||||
|
<button class="btn" id="nPageBtn"><strong>></strong></button>
|
||||||
|
</div>
|
||||||
|
<div id="pageInfo"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<!-- 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 class="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"
|
||||||
|
placeholder="Name of the new map to create" autofocus="autofocus"/>
|
||||||
|
</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">
|
||||||
|
<button class="btn btn-primary btn-accept" data-loading-text="Saving ...">Create</button>
|
||||||
|
<button class="btn btn-cancel" data-dismiss="modal">Cancel</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Duplicate map dialog -->
|
||||||
|
<div id="duplicate-dialog-modal" class="modal fade" style="display: none">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button class="close" data-dismiss="modal">X</button>
|
||||||
|
<h3 id="dupDialogTitle"></h3>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="errorMessage"></div>
|
||||||
|
<form class="form-horizontal">
|
||||||
|
<fieldset>
|
||||||
|
<div class="control-group">
|
||||||
|
<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"/>
|
||||||
|
</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">
|
||||||
|
<button class="btn btn-primary btn-accept" data-loading-text="Saving ...">Duplicate</button>
|
||||||
|
<button class="btn btn-cancel" data-dismiss="modal">Cancel</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 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 class="errorMessage"></div>
|
||||||
|
<form class="form-horizontal">
|
||||||
|
<fieldset>
|
||||||
|
<div class="control-group">
|
||||||
|
<label for="renTitle" class="control-label"><spring:message code="NAME"/>: </label>
|
||||||
|
<input name="title" id="renTitle" required="required" autofocus="autofocus"
|
||||||
|
class="control"/>
|
||||||
|
</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" data-loading-text="Saving ...">Rename</button>
|
||||||
|
<button class="btn btn-cancel" data-dismiss="modal">Cancel</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Delete map dialog -->
|
||||||
|
<div id="delete-dialog-modal" class="modal fade" style="display: none">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button class="close" data-dismiss="modal">x</button>
|
||||||
|
<h3>Delete MindMap</h3>
|
||||||
|
</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 ?.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button class="btn btn-primary btn-accept" data-loading-text="Saving ...">Delete</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>
|
||||||
|
|
||||||
|
<!-- Publish Dialog Config -->
|
||||||
|
<div id="publish-dialog-modal" class="modal fade" style="display: none">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button class="close" data-dismiss="modal">x</button>
|
||||||
|
<h3>Publish</h3>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button class="btn btn-primary btn-accept" data-loading-text="Saving...">Accept</button>
|
||||||
|
<button class="btn btn-cancel" data-dismiss="modal">Cancel</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="map-table">
|
||||||
|
<table class="table table-bordered" id="mindmapListTable">
|
||||||
|
|
||||||
|
</table>
|
||||||
|
<div id="tableFooter" class="form-inline"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<jsp:include page="footer.jsp"/>
|
<jsp:include page="footer.jsp"/>
|
||||||
</body>
|
</body>
|
||||||
|
@ -219,7 +219,7 @@ public class RestMindmapTCase {
|
|||||||
mapToUpdate.setProperties("{zoom:x}");
|
mapToUpdate.setProperties("{zoom:x}");
|
||||||
|
|
||||||
// Update map ...
|
// Update map ...
|
||||||
final String resourceUrl = HOST_PORT + resourceUri.toString();
|
final String resourceUrl = HOST_PORT + resourceUri.toString() + "/document";
|
||||||
requestHeaders.setContentType(MediaType.APPLICATION_XML);
|
requestHeaders.setContentType(MediaType.APPLICATION_XML);
|
||||||
final HttpEntity<RestMindmap> updateEntity = new HttpEntity<RestMindmap>(mapToUpdate, requestHeaders);
|
final HttpEntity<RestMindmap> updateEntity = new HttpEntity<RestMindmap>(mapToUpdate, requestHeaders);
|
||||||
template.put(resourceUrl, updateEntity);
|
template.put(resourceUrl, updateEntity);
|
||||||
|
Loading…
Reference in New Issue
Block a user