[DE] Fix handler of insert smart art
This commit is contained in:
parent
4e4f6f94bc
commit
6fe53f9357
|
@ -120,6 +120,7 @@ define([
|
||||||
'add:chart' : this.onSelectChart,
|
'add:chart' : this.onSelectChart,
|
||||||
'insert:textart' : this.onInsertTextart,
|
'insert:textart' : this.onInsertTextart,
|
||||||
'generate:smartart' : this.generateSmartArt,
|
'generate:smartart' : this.generateSmartArt,
|
||||||
|
'insert:smartart' : this.onInsertSmartArt
|
||||||
},
|
},
|
||||||
'FileMenu': {
|
'FileMenu': {
|
||||||
'menu:hide': this.onFileMenu.bind(this, 'hide'),
|
'menu:hide': this.onFileMenu.bind(this, 'hide'),
|
||||||
|
@ -3343,25 +3344,16 @@ define([
|
||||||
} else {
|
} else {
|
||||||
menu.store.add(arr);
|
menu.store.add(arr);
|
||||||
}
|
}
|
||||||
menu.on('item:click', function(picker, item, record, e) {
|
|
||||||
if (record) {
|
|
||||||
me.api.asc_createSmartArt(record.get('value'));
|
|
||||||
}
|
|
||||||
me.toolbar.btnInsertSmartArt.toggle(false, true);
|
|
||||||
if (me.toolbar.btnInsertText.pressed) {
|
|
||||||
me.toolbar.btnInsertText.toggle(false, true);
|
|
||||||
}
|
|
||||||
if (me.toolbar.btnInsertShape.pressed) {
|
|
||||||
me.toolbar.btnInsertShape.toggle(false, true);
|
|
||||||
}
|
|
||||||
if (e.type !== 'click')
|
|
||||||
me.toolbar.btnInsertSmartArt.menu.hide();
|
|
||||||
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}, this));
|
}, this));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onInsertSmartArt: function (value) {
|
||||||
|
if (this.api) {
|
||||||
|
this.api.asc_createSmartArt(value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
textEmptyImgUrl : 'You need to specify image URL.',
|
textEmptyImgUrl : 'You need to specify image URL.',
|
||||||
textWarning : 'Warning',
|
textWarning : 'Warning',
|
||||||
textFontSizeErr : 'The entered value is incorrect.<br>Please enter a numeric value between 1 and 300',
|
textFontSizeErr : 'The entered value is incorrect.<br>Please enter a numeric value between 1 and 300',
|
||||||
|
|
|
@ -2247,6 +2247,21 @@ define([
|
||||||
delayRenderTips: true,
|
delayRenderTips: true,
|
||||||
scrollAlwaysVisible: true
|
scrollAlwaysVisible: true
|
||||||
});
|
});
|
||||||
|
item.menuPicker.on('item:click', function(picker, item, record, e) {
|
||||||
|
if (record) {
|
||||||
|
me.fireEvent('insert:smartart', [record.get('value')]);
|
||||||
|
}
|
||||||
|
me.btnInsertSmartArt.toggle(false, true);
|
||||||
|
if (me.btnInsertText.pressed) {
|
||||||
|
me.btnInsertText.toggle(false, true);
|
||||||
|
}
|
||||||
|
if (me.btnInsertShape.pressed) {
|
||||||
|
me.btnInsertShape.toggle(false, true);
|
||||||
|
}
|
||||||
|
if (e.type !== 'click')
|
||||||
|
me.btnInsertSmartArt.menu.hide();
|
||||||
|
Common.NotificationCenter.trigger('edit:complete', me);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
me.fireEvent('generate:smartart');
|
me.fireEvent('generate:smartart');
|
||||||
menu.off('show:before', onShowBeforeSmartArt);
|
menu.off('show:before', onShowBeforeSmartArt);
|
||||||
|
|
Loading…
Reference in a new issue