mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 14:17:57 +01:00
fix add label UI
This commit is contained in:
parent
668506ceb8
commit
efb7e0cc3b
@ -631,7 +631,7 @@ public class MindmapController extends BaseController {
|
||||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.POST, value = "/labels/maps", consumes = {"application/json"})
|
||||
@ResponseStatus(value = HttpStatus.ACCEPTED)
|
||||
@ResponseStatus(value = HttpStatus.OK)
|
||||
public void addLabel(@RequestBody RestLabel restLabel, @RequestParam(required = true) String ids) throws WiseMappingException {
|
||||
int labelId = restLabel.getId();
|
||||
for (String id : ids.split(",")) {
|
||||
|
@ -585,6 +585,9 @@ function prepareLabelList(labels) {
|
||||
}
|
||||
|
||||
function linkLabelToMindmap(mapIds, label) {
|
||||
var onSuccess = function () {
|
||||
tagMindmaps(label.id, label.title, label.color);
|
||||
};
|
||||
jQuery.ajax("c/restful/labels/maps?ids=" + jQuery.makeArray(mapIds).join(','), {
|
||||
type: 'POST',
|
||||
dataType: "json",
|
||||
@ -594,8 +597,8 @@ function linkLabelToMindmap(mapIds, label) {
|
||||
title: label.title,
|
||||
color: label.color
|
||||
}),
|
||||
success: function () {
|
||||
tagMindmaps(label.id, label.title, label.color);
|
||||
statusCode: {
|
||||
200: onSuccess
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user