Skip to content

Commit

Permalink
Update js/util.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jrowny committed Mar 1, 2012
1 parent b6bc6e8 commit efedd7f
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions js/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ function toPHP(value,parents){


function toEditList(value){
var html = '<li id="item-' + value.id + '"><div><strong>' + value.label + '</strong> : <em>' + value.element.id + '</em>';
html += '<div class="btn-group">';
html += '<a href="#/edit/' + value.id + '" class="btn" title="Edit"><i class="icon-pencil"></i></a>';
html += '<a href="#/remove/' + value.id + '" class="btn" title="Remove"><i class="icon-trash"></i></a>';
html += '</div></div>';
if(value.children.length){
html += "<ol>" + _.map(value.children, function(childVal){return toEditList(childVal);}).join("\n") + "</ol>";
}
html += "</li>";
return html;
var html = '<li id="item-' + value.id + '"><div><strong>' + value.label + '</strong> : <em>' + value.element.id + '</em>';
html += '<div class="btn-group">';
html += '<a href="#/edit/' + value.id + '" class="btn" title="Edit"><i class="icon-pencil"></i></a>';
html += '<a href="#/remove/' + value.id + '" class="btn" title="Remove"><i class="icon-trash"></i></a>';
html += '</div></div>';
if(value.children.length){
html += "<ol>" + _.map(value.children, function(childVal){return toEditList(childVal);}).join("\n") + "</ol>";
}
html += "</li>";
return html;
}

0 comments on commit efedd7f

Please sign in to comment.