mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-09-11 23:00:06 +02:00
insert tag on table load
This commit is contained in:
parent
eff063ca37
commit
ed55fd824f
@ -1,7 +1,4 @@
|
||||
function createLabelItem(data) {
|
||||
if (data.color == "") {
|
||||
data.color = "#000000";
|
||||
}
|
||||
$("#foldersContainer").find("ul").append(
|
||||
$("<li data-filter=\"" + data.title + "\">").append(
|
||||
"<a href=\"#\"> <i class=\"icon-tag\"></i>" +
|
||||
@ -10,7 +7,15 @@ function createLabelItem(data) {
|
||||
"</a>"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
function labelTagsAsHtml(labels) {
|
||||
var result = "";
|
||||
for (var i = 0; i<labels.length; i++) {
|
||||
var label = labels[i];
|
||||
result+= "<div class='labelTag' style='background-color:" + label.color + "'>"+ label.title + "</div>"
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function fetchLabels(options) {
|
||||
|
@ -62,7 +62,7 @@
|
||||
bUseRendered:false,
|
||||
mDataProp:"title",
|
||||
fnRender:function (obj) {
|
||||
return '<span class="icon-file icon-blue"></span>' + '<a href="c/maps/' + obj.aData.id + '/edit">' + $('<span></span>').text(obj.aData.title).html() + '</a>';
|
||||
return '<span class="icon-file icon-blue"></span>' + '<a href="c/maps/' + obj.aData.id + '/edit">' + $('<span></span>').text(obj.aData.title).html() + labelTagsAsHtml(obj.aData.labels) + '</a>';
|
||||
}
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user