[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,12 +2811,15 @@ define([
_btnsComment.push(button); _btnsComment.push(button);
}); });
if ( _btnsComment.length ) {
Array.prototype.push.apply(me.toolbar.toolbarControls, _btnsComment);
_btnsComment.forEach(function (btn) { _btnsComment.forEach(function (btn) {
btn.on('click', function (btn, e) { btn.on('click', function (btn, e) {
Common.NotificationCenter.trigger('app:comment:add', 'toolbar'); Common.NotificationCenter.trigger('app:comment:add', 'toolbar');
}); });
}, this); }, this);
} }
}
}, },
textEmptyImgUrl : 'You need to specify image URL.', textEmptyImgUrl : 'You need to specify image URL.',