国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.5KB

  1. CKEDITOR.plugins.add("ddfilebrowser", {
  2. icons: "ddfilebrowser",
  3. init: function (a) {
  4. a.addCommand("openDDFileBrowser",
  5. {
  6. exec: function (a) {
  7. var w = 800;
  8. var h = 600;
  9. var dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX;
  10. var dualScreenTop = window.screenTop !== undefined ? window.screenTop : window.screenY;
  11. var width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;
  12. var height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;
  13. var systemZoom = width / window.screen.availWidth;
  14. var posLeft = (width - w) / 2 / systemZoom + dualScreenLeft;
  15. var posTop = (height - h) / 2 / systemZoom + dualScreenTop;
  16. window.open("./dialog/select_soft.php?f=" + a.name, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + posLeft + ", top=" + posTop);
  17. }
  18. });
  19. a.ui.addButton("DDFileBrowser",
  20. {
  21. label: "插入附件",
  22. command: "openDDFileBrowser",
  23. toolbar: "insert"
  24. })
  25. }
  26. });