Office.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
  2. MWF.xApplication.process.Xform.Office = MWF.APPOffice = new Class({
  3. Extends: MWF.APP$Module,
  4. isActive: false,
  5. _loadUserInterface: function(){
  6. this.node.empty();
  7. this.node.setStyles({
  8. "min-height": "100px"
  9. });
  10. alert(Browser.name);
  11. if (Browser.name=="ie") this.isActive = true;
  12. },
  13. _afterLoaded: function(){
  14. if (!this.isActive){
  15. this.loadOfficeNotActive();
  16. }else{
  17. this.loadOffice();
  18. }
  19. },
  20. loadOffice: function(){
  21. this.node.set("text", "office");
  22. },
  23. loadOfficeNotActive: function(){
  24. this.node.setStyles({
  25. "background-color": "#EEE"
  26. });
  27. var icon = new Element("div", {
  28. "styles": {
  29. "width": "24px",
  30. "height": "24px",
  31. "float": "left",
  32. "background": "url("+this.form.path+""+this.form.options.style+"/icon/warning.png"+") no-repeat center center"
  33. }
  34. }).inject(this.node);
  35. var div = new Element("div", {
  36. "text": MWF.xApplication.process.Xform.LP.browserNotActiveX,
  37. "styles": {
  38. "height": "24px",
  39. "line-height": "24px",
  40. "float": "left",
  41. "font-size": "12px"
  42. }
  43. }).inject(this.node);
  44. }
  45. });