fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Simplifying toolbar list button
[fnpeditor.git]
/
modules
/
documentCanvas
/
canvas
/
widgets.js
diff --git
a/modules/documentCanvas/canvas/widgets.js
b/modules/documentCanvas/canvas/widgets.js
index
cedf16d
..
033feda
100644
(file)
--- a/
modules/documentCanvas/canvas/widgets.js
+++ b/
modules/documentCanvas/canvas/widgets.js
@@
-1,6
+1,7
@@
define([
define([
-'libs/jquery-1.9.1.min'
-], function($) {
+'libs/jquery-1.9.1.min',
+'utils/wlxml'
+], function($, wlxmlUtils) {
'use strict';
'use strict';
@@
-8,7
+9,7
@@
return {
labelWidget: function(tag, klass) {
return $('<span>')
.addClass('canvas-widget canvas-widget-label')
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) {
},
footnoteHandler: function(clickHandler) {
@@
-17,7
+18,8
@@
return {
.css('display', 'inline')
.show();
.css('display', 'inline')
.show();
- mydom.click(function() {
+ mydom.click(function(e) {
+ e.stopPropagation();
clickHandler();
});
clickHandler();
});
@@
-27,7
+29,10
@@
return {
hideButton: function(clickHandler) {
var mydom = $('<span>x</span>')
.addClass('canvas-widget canvas-widget-hide-button');
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;
}
return mydom;
}