multiMenu.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. ///import core
  2. ///import uicore
  3. ///commands 表情
  4. (function(){
  5. var utils = baidu.editor.utils,
  6. Popup = baidu.editor.ui.Popup,
  7. SplitButton = baidu.editor.ui.SplitButton,
  8. MultiMenuPop = baidu.editor.ui.MultiMenuPop = function(options){
  9. this.initOptions(options);
  10. this.initMultiMenu();
  11. };
  12. MultiMenuPop.prototype = {
  13. initMultiMenu: function (){
  14. var me = this;
  15. this.popup = new Popup({
  16. content: '',
  17. editor : me.editor,
  18. iframe_rendered: false,
  19. onshow: function (){
  20. if (!this.iframe_rendered) {
  21. this.iframe_rendered = true;
  22. this.getDom('content').innerHTML = '<iframe id="'+me.id+'_iframe" src="'+ me.iframeUrl +'" frameborder="0"></iframe>';
  23. me.editor.container.style.zIndex && (this.getDom().style.zIndex = me.editor.container.style.zIndex * 1 + 1);
  24. }
  25. }
  26. // canSideUp:false,
  27. // canSideLeft:false
  28. });
  29. this.onbuttonclick = function(){
  30. this.showPopup();
  31. };
  32. this.initSplitButton();
  33. }
  34. };
  35. utils.inherits(MultiMenuPop, SplitButton);
  36. })();