internal.js 742 B

1234567891011121314151617181920212223242526272829303132333435
  1. (function(){
  2. var parent = window.parent;
  3. //dialog对象
  4. dialog = parent.$EDITORUI[window.frameElement.id.replace(/_iframe$/, '')];
  5. //当前打开dialog的编辑器实例
  6. editor = dialog.editor;
  7. UE = parent.UE;
  8. domUtils = UE.dom.domUtils;
  9. utils = UE.utils;
  10. browser = UE.browser;
  11. ajax = UE.ajax;
  12. $G = function(id){return document.getElementById(id)};
  13. //focus元素
  14. $focus = function(node){
  15. setTimeout(function(){
  16. if(browser.ie){
  17. var r = node.createTextRange();
  18. r.collapse(false);
  19. r.select();
  20. }else{
  21. node.focus()
  22. }
  23. },0)
  24. }
  25. })();