[DE] debug

This commit is contained in:
Maxim Kadushkin 2017-03-31 13:55:10 +03:00
parent 8765f5cc44
commit a90af06647

View file

@ -2800,8 +2800,7 @@ define([
var slots = me.toolbar.$el.find('.slot-comment'); var slots = me.toolbar.$el.find('.slot-comment');
slots.each(function(index, el) { slots.each(function(index, el) {
var _cls = 'btn-toolbar'; var _cls = 'btn-toolbar';
/x-huge/.test(el.className) && /x-huge/.test(el.className) && (_cls += ' x-huge icon-top');
(_cls += ' x-huge icon-top');
var button = new Common.UI.Button({ var button = new Common.UI.Button({
cls: _cls, cls: _cls,
@ -2812,11 +2811,14 @@ define([
_btnsComment.push(button); _btnsComment.push(button);
}); });
_btnsComment.forEach(function(btn) { if ( _btnsComment.length ) {
btn.on('click', function (btn, e) { Array.prototype.push.apply(me.toolbar.toolbarControls, _btnsComment);
Common.NotificationCenter.trigger('app:comment:add', 'toolbar'); _btnsComment.forEach(function (btn) {
}); btn.on('click', function (btn, e) {
}, this); Common.NotificationCenter.trigger('app:comment:add', 'toolbar');
});
}, this);
}
} }
}, },