mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-24 23:17:56 +01:00
animation on create an delete tags
This commit is contained in:
parent
1444be36ce
commit
a3c6ce10c2
@ -476,7 +476,11 @@ $(function () {
|
|||||||
type:'DELETE',
|
type:'DELETE',
|
||||||
contentType:"application/json; charset=utf-8",
|
contentType:"application/json; charset=utf-8",
|
||||||
success: function() {
|
success: function() {
|
||||||
me.closest("table").remove();
|
var tag = me.closest("table");
|
||||||
|
$(tag).fadeOut('fast', function () {
|
||||||
|
$(this).remove();
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -547,18 +551,15 @@ function fetchLabels(options) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function tagMindmaps(id, labelName, labelColor) {
|
function tagMindmaps(label) {
|
||||||
//tag selected mindmaps...
|
//tag selected mindmaps...
|
||||||
var rows = $('#mindmapListTable').dataTableExt.getSelectedRows();
|
var rows = $('#mindmapListTable').dataTableExt.getSelectedRows();
|
||||||
for (var i = 0; i < rows.length; i++) {
|
for (var i = 0; i < rows.length; i++) {
|
||||||
if ($(rows[i]).find(".labelTag:contains('" + labelName + "')").length == 0) {
|
var row = $(rows[i]);
|
||||||
$(rows[i]).find('.mindmapName').parent().append(
|
if (row.find(".labelTag:contains('" + label.title + "')").length == 0) {
|
||||||
labelTagsAsHtml([{
|
var tag = $(labelTagsAsHtml([label]));
|
||||||
id: id,
|
tag.hide().appendTo(row.find('.mindmapName').parent());
|
||||||
title: labelName,
|
tag.fadeIn('fast');
|
||||||
color: labelColor
|
|
||||||
}])
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -589,7 +590,7 @@ function prepareLabelList(labels) {
|
|||||||
|
|
||||||
function linkLabelToMindmap(mapIds, label) {
|
function linkLabelToMindmap(mapIds, label) {
|
||||||
var onSuccess = function () {
|
var onSuccess = function () {
|
||||||
tagMindmaps(label.id, label.title, label.color);
|
tagMindmaps(label);
|
||||||
};
|
};
|
||||||
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',
|
||||||
|
Loading…
Reference in New Issue
Block a user