multiMenu.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 =
  23. '<iframe id="' +
  24. me.id +
  25. '_iframe" src="' +
  26. me.iframeUrl +
  27. '" frameborder="0"></iframe>';
  28. me.editor.container.style.zIndex &&
  29. (this.getDom().style.zIndex =
  30. me.editor.container.style.zIndex * 1 + 1);
  31. }
  32. }
  33. // canSideUp:false,
  34. // canSideLeft:false
  35. });
  36. this.onbuttonclick = function() {
  37. this.showPopup();
  38. };
  39. this.initSplitButton();
  40. }
  41. };
  42. utils.inherits(MultiMenuPop, SplitButton);
  43. })();