X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/2eac26a1b1fc8995dcebeba22f6991ef3542a886..78f57106d86fd31156033dce3d4fa9d8df5361fa:/src/editor/modules/documentCanvas/canvas/widgets.js diff --git a/src/editor/modules/documentCanvas/canvas/widgets.js b/src/editor/modules/documentCanvas/canvas/widgets.js index 77dd0fd..aecb199 100644 --- a/src/editor/modules/documentCanvas/canvas/widgets.js +++ b/src/editor/modules/documentCanvas/canvas/widgets.js @@ -34,6 +34,30 @@ return { clickHandler(); }); return mydom; + }, + + commentAdnotation: function(node) { + var widget = { + DOM: $('
').addClass('canvas-widget canvas-widget-comment-adnotation'), + update: function(node) { + var parts = [], + metadata = node.getMetadata(), + dt; + metadata.forEach(function(row) { + parts.push(row.getValue()); + }, 'creator'); + metadata.some(function(row) { + dt = row.getValue(); + return true; // break + }, 'date'); + if(dt) { + parts.push(dt); + } + this.DOM.text(parts.join(', ')); + } + }; + widget.update(node); + return widget; } };