define([
-'libs/jquery-1.9.1.min'
-], function($) {
+'libs/jquery-1.9.1.min',
+'utils/wlxml'
+], function($, wlxmlUtils) {
'use strict';
labelWidget: function(tag, klass) {
return $('<span>')
.addClass('canvas-widget canvas-widget-label')
- .text(tag + (klass ? ' / ' + klass : ''));
+ .text(wlxmlUtils.wlxmlTagNames[tag] + (klass ? ' / ' + wlxmlUtils.wlxmlClassNames[klass] : ''));
},
footnoteHandler: function(clickHandler) {
.css('display', 'inline')
.show();
- mydom.click(function() {
+ mydom.click(function(e) {
+ e.stopPropagation();
clickHandler();
});
hideButton: function(clickHandler) {
var mydom = $('<span>x</span>')
.addClass('canvas-widget canvas-widget-hide-button');
- mydom.click(clickHandler);
+ mydom.click(function(e) {
+ e.stopPropagation();
+ clickHandler();
+ });
return mydom;
}