merging
This commit is contained in:
khaydarov 2016-05-12 21:32:32 +03:00
commit d5540b7834

View file

@ -218,16 +218,10 @@ cEditor.ui = {
cEditor.callback.redactorInputEvent(event);
}, false );
/** Bind click listeners on toolbar buttons */
for (button in cEditor.nodes.toolbarButtons){
cEditor.nodes.toolbarButtons[button].addEventListener('click', function (event) {
console.log(this.dataset.type);
cEditor.toolbar.current = this.dataset.type;
cEditor.toolbar.toolClicked(event);
cEditor.toolbar.close();
cEditor.callback.toolbarButtonClicked(event, this);
}, false);
}
@ -316,6 +310,19 @@ cEditor.callback = {
},
/**
* Toolbar button click handler
* @param this - cursor to the button
*/
toolbarButtonClicked : function (event, button) {
cEditor.toolbar.current = button.dataset.type;
cEditor.toolbar.toolClicked(event);
cEditor.toolbar.close();
},
redactorInputEvent : function (event) {
/**