X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/1d56a243018175d9f384e995e1cf4531fcf0c648..412e60ded1457ec0f408e2234c9dd60122929bac:/modules/documentCanvas/canvas/widgets.js?ds=sidebyside diff --git a/modules/documentCanvas/canvas/widgets.js b/modules/documentCanvas/canvas/widgets.js index 9563785..408d2c0 100644 --- a/modules/documentCanvas/canvas/widgets.js +++ b/modules/documentCanvas/canvas/widgets.js @@ -1,6 +1,7 @@ define([ -'libs/jquery-1.9.1.min' -], function($) { +'libs/jquery', +'utils/wlxml' +], function($, wlxmlUtils) { 'use strict'; @@ -8,8 +9,33 @@ return { labelWidget: function(tag, klass) { return $('') .addClass('canvas-widget canvas-widget-label') - .text(tag + (klass ? ' / ' + klass : '')); + .text(wlxmlUtils.wlxmlTagNames[tag] + (klass ? ' / ' + wlxmlUtils.wlxmlClassNames[klass] : '')); + }, + + footnoteHandler: function(clickHandler) { + var mydom = $('') + .addClass('canvas-widget canvas-widget-footnote-handle') + .css('display', 'inline') + .show(); + + mydom.click(function(e) { + e.stopPropagation(); + clickHandler(); + }); + + return mydom; + }, + + hideButton: function(clickHandler) { + var mydom = $('x') + .addClass('canvas-widget canvas-widget-hide-button'); + mydom.click(function(e) { + e.stopPropagation(); + clickHandler(); + }); + return mydom; } + }; }); \ No newline at end of file