adding delete X button

This commit is contained in:
Ezequiel Bergamaschi 2014-02-01 01:42:36 -03:00 committed by Ezequiel Bergamaschi
parent 640b8d7ed0
commit a4ae253ae3

View File

@ -1,9 +1,12 @@
function createLabelItem(data) { function createLabelItem(data, id) {
var labelId = data.id || id;
$("#foldersContainer").find("ul").append( $("#foldersContainer").find("ul").append(
$("<li data-filter=\"" + data.title + "\">").append( $("<li data-filter=\"" + data.title + "\">").append(
"<a href=\"#\"> <i class=\"icon-tag\"></i>" + "<a href=\"#\"> " +
"<i class=\"icon-tag\"></i>" +
"<div class='labelColor' style='background: " + data.color + "'></div>" + "<div class='labelColor' style='background: " + data.color + "'></div>" +
"<div class='labelName'>" + data.title + "</div>" + "<div class='labelName'>" + data.title + "</div>" +
"<button id='deleteLabelBtn' class='close closeLabel' labelid=\""+ labelId +"\">x</button>" +
"</a>" "</a>"
) )
) )