o2.more.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628
  1. /** ***** BEGIN LICENSE BLOCK *****
  2. * |------------------------------------------------------------------------------|
  3. * | O2OA 活力办公 创意无限 o2.core.js |
  4. * |------------------------------------------------------------------------------|
  5. * | Distributed under the AGPL license: |
  6. * |------------------------------------------------------------------------------|
  7. * | Copyright © 2018, o2oa.net, o2server.io O2 Team |
  8. * | All rights reserved. |
  9. * |------------------------------------------------------------------------------|
  10. *
  11. * This file is part of O2OA.
  12. *
  13. * O2OA is free software: you can redistribute it and/or modify
  14. * it under the terms of the GNU Affero General Public License as published by
  15. * the Free Software Foundation, either version 3 of the License, or
  16. * (at your option) any later version.
  17. *
  18. * O2OA is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU Affero General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU General Public License
  24. * along with Foobar. If not, see <https://www.gnu.org/licenses/>.
  25. *
  26. * ***** END LICENSE BLOCK ******/
  27. (function (){
  28. o2.getCenterPosition = function(el, width, height){
  29. var elPositon = $(el).getPosition();
  30. var elSize = $(el).getSize();
  31. var node = $("layout");
  32. var size = (node) ? $(node).getSize() : $(document.body).getSize();
  33. var top = (elPositon.y+elSize.y)/2 - (height/2);
  34. var left = (elPositon.x+elSize.x)/2-(width/2);
  35. if ((left+width)>size.x){
  36. left = size.x-width-10;
  37. }
  38. if ((top+height)>size.y){
  39. top = size.y-height-10;
  40. }
  41. return {"x": left, "y": top};
  42. };
  43. o2.getMarkSize = function(node){
  44. var size;
  45. if (!node){
  46. size = $(document.body).getSize();
  47. var winSize = $(window).getSize();
  48. var height = size.y;
  49. var width = size.x;
  50. if (height<winSize.y) height = winSize.y;
  51. if (width<winSize.x) width = winSize.x;
  52. return {x: size.x, y: height};
  53. }else{
  54. size = $(node).getSize();
  55. return {x: size.x, y: size.y};
  56. }
  57. };
  58. o2.json = function(jsonString, fun){
  59. var obj = JSON.decode(jsonString);
  60. var p = fun.split(".");
  61. var tmp = obj;
  62. p.each(function(item){
  63. if (item.indexOf("[")!==-1){
  64. var x = item.split("[");
  65. var i = parseInt(x[1].substr(0, x[1].indexOf("]")));
  66. tmp = tmp[x[0]][i];
  67. }else{
  68. tmp = tmp[item];
  69. }
  70. });
  71. return tmp;
  72. };
  73. o2.getHTMLTemplate = function(url, callback, async){
  74. var loadAsync = (async !== false);
  75. var res = new Request.HTML({
  76. url: url,
  77. async: loadAsync,
  78. method: "get",
  79. onSuccess: function(responseTree, responseElements, responseHTML, responseJavaScript){
  80. o2.runCallback(callback, "success", [responseTree, responseElements, responseHTML, responseJavaScript]);
  81. }.bind(this),
  82. onFailure: function(xhr){
  83. o2.runCallback(callback, "requestFailure", [xhr]);
  84. }
  85. });
  86. res.send();
  87. };
  88. o2.getRequestText = function(url, callback, async){
  89. var loadAsync = (async !== false);
  90. url = (url.indexOf("?")!==-1) ? url+"&v="+o2.version.v : url+"?v="+o2.version.v;
  91. var res = new Request({
  92. url: url,
  93. async: loadAsync,
  94. method: "get",
  95. onSuccess: function(responseText, responseXML){
  96. o2.runCallback(callback, "success",[responseText, responseXML]);
  97. }.bind(this),
  98. onFailure: function(xhr){
  99. o2.runCallback(callback, "requestFailure",[xhr]);
  100. }
  101. });
  102. res.send();
  103. };
  104. o2.encodeJsonString = function(str){
  105. var tmp = [str];
  106. var dataStr = (JSON.encode(tmp));
  107. return dataStr.substr(2, dataStr.length-4);
  108. };
  109. o2.decodeJsonString = function(str){
  110. var tmp = "[\""+str+"\"]";
  111. var dataObj = (JSON.decode(tmp));
  112. return dataObj[0];
  113. };
  114. o2.getTextSize = function(text, styles){
  115. var tmpSpan = new Element("span", {
  116. "text": text,
  117. "styles": styles
  118. }).inject($(document.body));
  119. var size = tmpSpan.getSize();
  120. tmpSpan.destroy();
  121. return size;
  122. };
  123. o2.getCenter = function(size, target, offset){
  124. if (!target) target = document.body;
  125. var targetSize = target.getSize();
  126. var targetPosition = target.getPosition(offset);
  127. var targetScroll = target.getScroll();
  128. var x = targetSize.x/2;
  129. var y = targetSize.y/2;
  130. x = x-(size.x/2);
  131. y = y-(size.y/2);
  132. x = x+targetPosition.x;
  133. y = y+targetPosition.y;
  134. x = x+targetScroll.x;
  135. y = y+targetScroll.y;
  136. return {"x": x, "y": y};
  137. };
  138. o2.getEPointer = function(e){
  139. var x = 0;
  140. var y = 0;
  141. if (typeOf(e)=="element"){
  142. var position = e.getPosition(this.content);
  143. x = position.x;
  144. y = position.y;
  145. }else{
  146. if (Browser.name=="firefox"){
  147. x = parseFloat(e.event.clientX || e.event.x);
  148. y = parseFloat(e.event.clientY || e.event.y);
  149. }else{
  150. x = parseFloat(e.event.x);
  151. y = parseFloat(e.event.y);
  152. }
  153. if (e.target){
  154. var position = e.target.getPosition(this.content);
  155. x = position.x;
  156. y = position.y;
  157. }
  158. // }
  159. }
  160. return {"x": x, "y": y};
  161. };
  162. o2.getParent = function(node, tag){
  163. var pNode = node.parentElement;
  164. while(pNode && pNode.tagName.toString().toLowerCase() !== tag.toString().toLowerCase()){
  165. pNode = pNode.parentElement;
  166. }
  167. return pNode;
  168. };
  169. o2.getOffset = function(evt){
  170. if (Browser.name==="firefox"){
  171. return {
  172. "offsetX": evt.layerX,
  173. "offsetY": evt.layerY
  174. };
  175. }else{
  176. return {
  177. "offsetX": evt.offsetX,
  178. "offsetY": evt.offsetY
  179. }
  180. }
  181. };
  182. String.implement({
  183. "getAllIndexOf": function(str){
  184. var idxs= [];
  185. var idx = this.indexOf(str);
  186. while (idx !== -1){
  187. idxs.push(idx);
  188. idx = this.indexOf(str, idx+1);
  189. }
  190. return idxs;
  191. }
  192. });
  193. Array.implement({
  194. "trim": function(){
  195. var arr = [];
  196. this.each(function(v){
  197. if (v) arr.push(v);
  198. });
  199. return v;
  200. },
  201. "isIntersect": function(arr){
  202. return this.some(function(item){ return (arr.indexOf(item)!==-1); })
  203. }
  204. });
  205. Element.implement({
  206. "isIntoView": function() {
  207. var pNode = this.getParent();
  208. while (pNode && ((pNode.getScrollSize().y-(pNode.getComputedSize().height+1)<=0) || pNode.getStyle("overflow")==="visible")) pNode = pNode.getParent();
  209. if (!pNode) pNode = document.body;
  210. var size = pNode.getSize();
  211. var srcoll = pNode.getScroll();
  212. var p = (pNode == window) ? {"x":0, "y": 0} : this.getPosition(pNode);
  213. var nodeSize = this.getSize();
  214. return (p.x-srcoll.x>=0 && p.y-srcoll.y>=0) && (p.x+nodeSize.x<size.x+srcoll.x && p.y+nodeSize.y<size.y+srcoll.y)
  215. },
  216. "appendHTML": function(html, where){
  217. if (this.insertAdjacentHTML){
  218. var whereText = "beforeEnd";
  219. if (where==="before") whereText = "beforeBegin";
  220. if (where==="after") whereText = "afterEnd";
  221. if (where==="bottom") whereText = "beforeEnd";
  222. if (where==="top") whereText = "afterBegin";
  223. this.insertAdjacentHTML(whereText, html);
  224. }else {
  225. if (where==="bottom") this.innerHTML = this.innerHTML+html;
  226. if (where==="top") this.innerHTML = html+this.innerHTML;
  227. }
  228. },
  229. "positionTo": function(x,y){
  230. var left = x.toFloat();
  231. var top = y.toFloat();
  232. var offsetNode = this.getOffsetParent();
  233. if (offsetNode){
  234. var offsetPosition = offsetNode.getPosition();
  235. left = left-offsetPosition.x;
  236. top = top-offsetPosition.y;
  237. }
  238. this.setStyles({"top": top, "left": left});
  239. return this;
  240. },
  241. "getBorder": function(){
  242. var positions = ["top", "left", "right", "bottom"];
  243. var styles = ["color", "style", "width"];
  244. var obj = {};
  245. positions.each(function (position){
  246. styles.each(function(style){
  247. var key = "border-"+position+"-"+style;
  248. obj[key] = this.getStyle(key);
  249. }.bind(this));
  250. }.bind(this));
  251. return obj;
  252. },
  253. "isOutside": function(e){
  254. var elementCoords = this.getCoordinates();
  255. var targetCoords = this.getCoordinates();
  256. if(((e.page.x < elementCoords.left || e.page.x > (elementCoords.left + elementCoords.width)) ||
  257. (e.page.y < elementCoords.top || e.page.y > (elementCoords.top + elementCoords.height))) &&
  258. ((e.page.x < targetCoords.left || e.page.x > (targetCoords.left + targetCoords.width)) ||
  259. (e.page.y < targetCoords.top || e.page.y > (targetCoords.top + targetCoords.height))) ) return true;
  260. return false;
  261. },
  262. "getAbsolutePosition":function(){
  263. var styleLeft = 0;
  264. var styleTop = 0;
  265. var node = this;
  266. styleLeft = node.offsetLeft;
  267. styleTop = node.offsetTop;
  268. node = node.parentElement;
  269. while (node && node.tagName.toString().toLowerCase()!=="body"){
  270. styleLeft += node.offsetLeft;
  271. styleTop += node.offsetTop;
  272. node = node.offsetParent;
  273. }
  274. return {x: styleLeft, y: styleTop};
  275. },
  276. "tweenScroll": function(to, time){
  277. if (!this.tweenScrollQueue){
  278. this.tweenScrollQueue = [];
  279. }
  280. if (this.tweenScrollQueue.length){
  281. this.tweenScrollQueue.push(to);
  282. }else{
  283. this.tweenScrollQueue.push(to);
  284. this.doTweenScrollQueue(time);
  285. }
  286. },
  287. "doTweenScrollQueue": function(time){
  288. if (this.tweenScrollQueue.length){
  289. var i = this.tweenScrollQueue.length;
  290. var to = this.tweenScrollQueue[this.tweenScrollQueue.length-1];
  291. var scroll = this.getScroll();
  292. var dy = to - scroll.y;
  293. var step = dy/time;
  294. var count = 0;
  295. var move = 0;
  296. var id = window.setInterval(function(){
  297. this.scrollTo(0, scroll.y+count*step);
  298. count++;
  299. if (count>time){
  300. window.clearInterval(id);
  301. for (var x=1; x<=i; x++) this.tweenScrollQueue.shift();
  302. if (this.tweenScrollQueue.length) this.doTweenScrollQueue(time);
  303. }
  304. }.bind(this), 1);
  305. }
  306. },
  307. "isPointIn": function(px, py, offX, offY, el){
  308. if (!offX) offX = 0;
  309. if (!offY) offY = 0;
  310. var position = this.getPosition(el);
  311. var size = this.getSize();
  312. return (position.x-offX<=px && position.x+size.x+offX>=px && position.y-offY<=py && position.y+size.y+offY>=py);
  313. },
  314. "isInPointInRect": function(sx, sy, ex, ey){
  315. var position = this.getPosition();
  316. var size = this.getSize();
  317. var p1 = {"x": position.x, "y": position.y};
  318. var p2 = {"x": position.x+size.x, "y": position.y};
  319. var p3 = {"x": position.x+size.x, "y": position.y+size.y};
  320. var p4 = {"x": position.x, "y": position.y+size.y};
  321. var sp = {"x": Math.min(sx, ex), "y": Math.min(sy, ey)};
  322. var ep = {"x": Math.max(sx, ex), "y": Math.max(sy, ey)};
  323. if (p1.x>=sp.x && p1.y>=sp.y && p1.x<=ep.x && p1.y<=ep.y) return true;
  324. if (p2.x>=sp.x && p2.y>=sp.y && p2.x<=ep.x && p2.y<=ep.y) return true;
  325. if (p3.x>=sp.x && p3.y>=sp.y && p3.x<=ep.x && p3.y<=ep.y) return true;
  326. if (p4.x>=sp.x && p4.y>=sp.y && p4.x<=ep.x && p4.y<=ep.y) return true;
  327. if (p3.x>=sp.x && p3.y>=sp.y && p1.x<=sp.x && p1.y<=sp.y) return true;
  328. if (p3.x>=ep.x && p3.y>=ep.y && p1.x<=ep.x && p1.y<=ep.y) return true;
  329. if (p1.x<=sp.x && p2.x>=sp.x && p1.y>=sp.y && p4.y<=ep.y) return true;
  330. if (p1.y<=sp.y && p4.y>=sp.y && p1.x>=sp.x && p2.x<=ep.x) return true;
  331. return false;
  332. },
  333. "isOverlap": function(node){
  334. var p = node.getPosition();
  335. var s = node.getSize();
  336. return this.isInPointInRect(p.x, p.y, p.x+s.x, p.y+s.y);
  337. },
  338. "getUsefulSize": function(){
  339. var size = this.getSize();
  340. var borderLeft = this.getStyle("border-left").toInt();
  341. var borderBottom = this.getStyle("border-bottom").toInt();
  342. var borderTop = this.getStyle("border-top").toInt();
  343. var borderRight = this.getStyle("border-right").toInt();
  344. var paddingLeft = this.getStyle("padding-left").toInt();
  345. var paddingBottom = this.getStyle("padding-bottom").toInt();
  346. var paddingTop = this.getStyle("padding-top").toInt();
  347. var paddingRight = this.getStyle("padding-right").toInt();
  348. var x = size.x-paddingLeft-paddingRight;
  349. var y = size.y-paddingTop-paddingBottom;
  350. return {"x": x, "y": y};
  351. },
  352. "clearStyles": function(isChild){
  353. this.removeProperty("style");
  354. if (isChild){
  355. var subNode = this.getFirst();
  356. while (subNode){
  357. subNode.clearStyles(isChild);
  358. subNode = subNode.getNext();
  359. }
  360. }
  361. },
  362. "maskIf": function(styles, click){
  363. var style = {
  364. "background-color": "#666666",
  365. "opacity": 0.4,
  366. "z-index":100
  367. };
  368. if (styles){
  369. style = Object.merge(style, styles);
  370. }
  371. var position = this.getPosition(this.getOffsetParent());
  372. this.mask({
  373. "destroyOnHide": true,
  374. "style": style,
  375. "useIframeShim": true,
  376. "iframeShimOptions": {"browsers": true},
  377. "onShow": function(){
  378. this.shim.shim.setStyles({
  379. "opacity": 0,
  380. "top": ""+position.y+"px",
  381. "left": ""+position.x+"px"
  382. });
  383. },
  384. "onClick": click
  385. });
  386. },
  387. scrollToNode: function(el, where){
  388. var scrollSize = this.getScrollSize();
  389. if (!scrollSize.y) return true;
  390. var wh = (where) ? where.toString().toLowerCase() : "bottom";
  391. var node = $(el);
  392. var size = el.getComputedSize();
  393. var p = el.getPosition(this);
  394. var thisSize = this.getComputedSize();
  395. var scroll = this.getScroll();
  396. if (wh==="top"){
  397. var n = (p.y-thisSize.computedTop);
  398. if (n<0) this.scrollTo(scroll.x, scroll.y+n);
  399. n = (size.totalHeight+p.y-thisSize.computedTop)-thisSize.height;
  400. if (n>0) this.scrollTo(scroll.x, scroll.y+n);
  401. }else{
  402. var n = (size.totalHeight+p.y-thisSize.computedTop)-thisSize.height;
  403. if (n>0) this.scrollTo(scroll.x, scroll.y+n);
  404. n = p.y-thisSize.computedTop;
  405. if (n<0) this.scrollTo(scroll.x, scroll.y+n);
  406. }
  407. },
  408. "getInnerStyles": function(){
  409. var styles = {};
  410. style = this.get("style");
  411. if (style){
  412. var styleArr = style.split(/\s*\;\s*/g);
  413. styleArr.each(function(s){
  414. if (s){
  415. var sarr = s.split(/\s*\:\s*/g);
  416. styles[sarr[0]] = (sarr.length>1) ? sarr[1]: ""
  417. }
  418. }.bind(this));
  419. }
  420. return styles;
  421. },
  422. "getInnerProperties": function(){
  423. var properties = {};
  424. if (this.attributes.length){
  425. for (var i=0; i<this.attributes.length; i++){
  426. properties[this.attributes[i].nodeName] = this.attributes[i].nodeValue;
  427. }
  428. }
  429. return properties;
  430. }
  431. });
  432. Object.copy = function(from, to){
  433. Object.each(from, function(value, key){
  434. switch (typeOf(value)){
  435. case "object":
  436. if (!to[key]) to[key]={};
  437. Object.copy(value, to[key]);
  438. break;
  439. default:
  440. to[key] = value;
  441. }
  442. });
  443. };
  444. JSON.format = JSON.encode;
  445. Slick.definePseudo('src', function(value){
  446. return Element.get(this,"src").indexOf(value) !== -1;
  447. });
  448. Slick.definePseudo('srcarr', function(value){
  449. var vList = value.split(",");
  450. var src = Element.get(this,"src");
  451. var flag = false;
  452. for (var i=0; i<vList.length; i++){
  453. if (src.indexOf(vList[i])!==-1){
  454. flag = true;
  455. break;
  456. }
  457. }
  458. return flag;
  459. });
  460. Slick.definePseudo('ahref', function(value){
  461. var href = Element.get(this,"href");
  462. if (!href) href = "";
  463. href = href.toString().toLowerCase();
  464. return (href.indexOf(value)!==-1);
  465. });
  466. Slick.definePseudo('rowspanBefore', function(line){
  467. var tr = MWF.getParent(this, "tr");
  468. var rowspan = this.get("rowspan").toInt() || 1;
  469. var currentRowIndex = tr.rowIndex.toInt();
  470. return rowspan>1 && currentRowIndex<line.toInt() && currentRowIndex+rowspan-1>=line;
  471. });
  472. Slick.definePseudo('rowspan', function(){
  473. var rowspan = this.get("rowspan").toInt() || 1;
  474. return rowspan>1;
  475. });
  476. Slick.definePseudo('colspanBefore', function(col){
  477. var tr = MWF.getParent(this, "tr");
  478. var colspan = this.get("colspan").toInt() || 1;
  479. var currentColIndex = this.cellIndex.toInt();
  480. return colspan>1 && currentColIndex<col.toInt() && currentColIndex+colspan-1>=col.toInt();
  481. });
  482. Slick.definePseudo('colspan', function(){
  483. var colspan = this.get("colspan").toInt() || 1;
  484. return colspan>1;
  485. });
  486. o2.common = o2.common || {};
  487. o2.common.getResponseTextPost = function(path, body, contentType){
  488. var returnText = "";
  489. var options = {
  490. url: path,
  491. async: false,
  492. data: body,
  493. method: "post",
  494. onSuccess: function(esponseTree, responseElements, responseHTML, responseJavaScript){
  495. returnText = responseHTML;
  496. }
  497. };
  498. var r = new Request.HTML(options);
  499. r.send();
  500. return returnText;
  501. };
  502. o2.common.getResponseText = function(path){
  503. var returnText = "";
  504. var options = {
  505. url: path,
  506. async: false,
  507. method: "get",
  508. onSuccess: function(esponseTree, responseElements, responseHTML, responseJavaScript){
  509. returnText = responseHTML;
  510. }
  511. };
  512. var r = new Request.HTML(options);
  513. r.send();
  514. return returnText;
  515. };
  516. o2.common.toDate = function(str){
  517. var tmpArr = str.split(" ");
  518. if (!tmpArr[1]) tmpArr.push("0:0:0");
  519. var dateArr = tmpArr[0].split("-");
  520. var timeArr = tmpArr[1].split(":");
  521. return new Date(dateArr[0],parseInt(dateArr[1])-1,dateArr[2],timeArr[0],timeArr[1],timeArr[2]);
  522. };
  523. o2.common.toDate = function(str){
  524. var tmpArr = str.split(" ");
  525. if (!tmpArr[1]) tmpArr.push("0:0:0");
  526. var dateArr = tmpArr[0].split("-");
  527. var timeArr = tmpArr[1].split(":");
  528. return new Date(dateArr[0],parseInt(dateArr[1])-1,dateArr[2],timeArr[0],timeArr[1],timeArr[2]);
  529. };
  530. o2.grayscale = function(src, width, height, callback){
  531. try {
  532. var canvas = document.createElement('canvas');
  533. var ctx = canvas.getContext('2d');
  534. var imgObj = new Image();
  535. imgObj.src = src;
  536. canvas.width = width || imgObj.width;
  537. canvas.height = height || imgObj.height;
  538. ctx.drawImage(imgObj, 0, 0);
  539. var imgPixels = ctx.getImageData(0, 0, canvas.width, canvas.height);
  540. for(var y = 0; y < imgPixels.height; y++){
  541. for(var x = 0; x < imgPixels.width; x++){
  542. var i = (y * 4) * imgPixels.width + x * 4;
  543. var avg = (imgPixels.data[i] + imgPixels.data[i + 1] + imgPixels.data[i + 2]) / 3;
  544. imgPixels.data[i] = avg;
  545. imgPixels.data[i + 1] = avg;
  546. imgPixels.data[i + 2] = avg;
  547. }
  548. }
  549. ctx.putImageData(imgPixels, 0, 0, 0, 0, imgPixels.width, imgPixels.height);
  550. var src1 = canvas.toDataURL();
  551. //var blob = canvas.toBlob();
  552. canvas.destroy();
  553. return {"status": "success", "src": src1};
  554. }catch(e){
  555. return {"status": "error", "src": src}
  556. }
  557. };
  558. o2.eventPosition = function(e){
  559. var x = 0;
  560. var y = 0;
  561. if (Browser.name=="firefox"){
  562. x = parseFloat(e.event.clientX || e.event.x);
  563. y = parseFloat(e.event.clientY || e.event.y);
  564. }else{
  565. x = parseFloat(e.event.x);
  566. y = parseFloat(e.event.y);
  567. }
  568. return {"x": x, "y": y};
  569. };
  570. if (Browser.name==="ie" && Browser.version<9){
  571. Browser.ieuns = true;
  572. }else if(Browser.name==="ie" && Browser.version<10){
  573. Browser.iecomp = true;
  574. }
  575. if (Browser.iecomp){
  576. o2.load("ie_adapter", null, false);
  577. layout["debugger"] = true;
  578. }
  579. })();
  580. o2.more = true;