equal
deleted
inserted
replaced
324 prevTagNode.get('parentNode').replaceChild(newTagNode, prevTagNode) ; |
324 prevTagNode.get('parentNode').replaceChild(newTagNode, prevTagNode) ; |
325 // NO TAG ? |
325 // NO TAG ? |
326 if (comment.tags == "") |
326 if (comment.tags == "") |
327 newTagNode.addClass('displaynone') ; |
327 newTagNode.addClass('displaynone') ; |
328 |
328 |
|
329 // CATEGORY |
|
330 var newCatNode = CY.Node.create('<div class="c-cat">' + gettext("category") + ': <span class="c-cat-val c-cat-' + comment.category + '">' + categories[comment.category] + '</span></div>') ; |
|
331 var prevCatNode = boundingBoxNode.query(".c-cat") ; |
|
332 if (prevCatNode == null) |
|
333 boundingBoxNode.query('.icomment-header').appendChild(newCatNode) ; |
|
334 else |
|
335 prevCatNode.get('parentNode').replaceChild(newCatNode, prevCatNode) ; |
|
336 // NO CATEGORY ? |
|
337 if (comment.category == 0) |
|
338 newCatNode.addClass('displaynone') ; |
|
339 |
329 // CONTENT |
340 // CONTENT |
330 var newContentNode = CY.Node.create('<span class="c-content">' + comment.content_html + '</span>') ; |
341 var newContentNode = CY.Node.create('<span class="c-content">' + comment.content_html + '</span>') ; |
331 var prevContentNode = boundingBoxNode.query(".c-content") ; |
342 var prevContentNode = boundingBoxNode.query(".c-content") ; |
332 if (prevContentNode == null) |
343 if (prevContentNode == null) |
333 boundingBoxNode.query('.icomment-body').appendChild(newContentNode) ; |
344 boundingBoxNode.query('.icomment-body').appendChild(newContentNode) ; |