mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-09-12 07:10:07 +02: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"})
|
@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 {
|
public void addLabel(@RequestBody RestLabel restLabel, @RequestParam(required = true) String ids) throws WiseMappingException {
|
||||||
int labelId = restLabel.getId();
|
int labelId = restLabel.getId();
|
||||||
for (String id : ids.split(",")) {
|
for (String id : ids.split(",")) {
|
||||||
|
@ -585,6 +585,9 @@ function prepareLabelList(labels) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function linkLabelToMindmap(mapIds, label) {
|
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(','), {
|
jQuery.ajax("c/restful/labels/maps?ids=" + jQuery.makeArray(mapIds).join(','), {
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
@ -594,8 +597,8 @@ function linkLabelToMindmap(mapIds, label) {
|
|||||||
title: label.title,
|
title: label.title,
|
||||||
color: label.color
|
color: label.color
|
||||||
}),
|
}),
|
||||||
success: function () {
|
statusCode: {
|
||||||
tagMindmaps(label.id, label.title, label.color);
|
200: onSuccess
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user