X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/84196c824e6a337a58b9c0a00c124c5e629d02b4..b2ed6c0477904d9bcbf8494043f231a5197f6b78:/modules/documentCanvas/canvas/widgets.js?ds=sidebyside diff --git a/modules/documentCanvas/canvas/widgets.js b/modules/documentCanvas/canvas/widgets.js index cedf16d..033feda 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-1.9.1.min', +'utils/wlxml' +], function($, wlxmlUtils) { 'use strict'; @@ -8,7 +9,7 @@ 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) { @@ -17,7 +18,8 @@ return { .css('display', 'inline') .show(); - mydom.click(function() { + mydom.click(function(e) { + e.stopPropagation(); clickHandler(); }); @@ -27,7 +29,10 @@ return { hideButton: function(clickHandler) { var mydom = $('x') .addClass('canvas-widget canvas-widget-hide-button'); - mydom.click(clickHandler); + mydom.click(function(e) { + e.stopPropagation(); + clickHandler(); + }); return mydom; }