XFormsWindow.js 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449
  1. /**
  2. * 브라우저의 window 객체를 확장한다.
  3. *
  4. * @author 김지환
  5. * @since TrustForm Soonsu 0.0.1
  6. */
  7. window.bParsed = false;
  8. window.bDragDrop = false;
  9. window.unlock = false;
  10. if (is_ie && window == window.top)window.eval("var parent;");
  11. function XFormsWindow ()
  12. {
  13. };
  14. XFormsWindow.getCurrentEvent = function ()
  15. {
  16. return window.m_event;
  17. };
  18. XFormsWindow.dummyEvent = function ()
  19. {
  20. window.alert("dummy");
  21. };
  22. XFormsWindow.onProcessEvent = function (e, strEventName, strId)
  23. {
  24. if (!window.bParsed)
  25. {
  26. return;
  27. }
  28. if (m_event.name == "onfocus")
  29. {
  30. return;
  31. }
  32. if (null == strEventName && null == strId)
  33. {
  34. strEventName = XFormsWindow.getEventName(e);
  35. strId = "body";
  36. }
  37. window.initEvent(e, strId);
  38. var strEvent =strEventName;// XFormsWindow.getEventName(e);
  39. var objControl = document.allElement.item(strId);
  40. if (null != objControl)
  41. {
  42. if (null != objControl.vscroll)
  43. {
  44. objControl.vscroll.refresh();
  45. objControl.hscroll.refresh();
  46. }
  47. objControl.dispatch(strEvent, window.m_event);
  48. // 스마트 폰 브라우저에서 그리드를 위한 Body Scroll 처리
  49. if (is_smartphone && "onscroll" == strEvent && objControl instanceof XHtmlBody)
  50. {
  51. var arKeyset = document.allElement.keys();
  52. for (var i=0; i<arKeyset.length; i++)
  53. {
  54. var strChildId = arKeyset[i];
  55. var objChildControl = document.allElement.item(strChildId);
  56. if (null != objChildControl && objChildControl instanceof XFormsDataGrid)
  57. {
  58. objChildControl.moveGridExpansion();
  59. }
  60. else if (null != objChildControl && objChildControl instanceof XFormsTreeView)
  61. {
  62. objChildControl.moveTreeViewExpansion();
  63. }
  64. else if ("xforms:group" == objChildControl.elementName)
  65. {
  66. objChildControl.moveGroupExpansion();
  67. }
  68. }
  69. }
  70. }
  71. };
  72. XFormsWindow.onResize = function (e)
  73. {
  74. if (!window.bParsed)
  75. {
  76. return;
  77. }
  78. window.initEvent(e, "body");
  79. var arKeyset = document.allElement.keys();
  80. for (var i=0; i<arKeyset.length; i++)
  81. {
  82. var strId = arKeyset[i];
  83. var objControl = document.allElement.item(strId);
  84. if (null != objControl && (objControl instanceof XFormsLine || objControl instanceof XFormsShape || objControl instanceof XFormsDataGrid))
  85. {
  86. // TODO redraw
  87. objControl.resize();
  88. }
  89. }
  90. //XFormsDocument.widnowSizeCapture();
  91. body.dispatch("onwindowresize", window.m_event);
  92. };
  93. XFormsWindow.onProcessMouseEvent = function (e)
  94. {
  95. if (!window.bParsed || null != window.m_objModal)
  96. {
  97. return;
  98. }
  99. var strEvent = XFormsWindow.getEventName(e);
  100. var heEventTarget;
  101. if (is_ie)
  102. {
  103. heEventTarget = e.srcElement;
  104. }
  105. else
  106. {
  107. heEventTarget = e.target;
  108. }
  109. var objElement = XFormsWindow.findEventElement(heEventTarget);
  110. if (null != objElement)
  111. {
  112. // Context Menu는 제외한다.
  113. if (objElement instanceof XFormsContextMenu)
  114. {
  115. return;
  116. }
  117. var strId = objElement.getId();
  118. window.initEvent(e, strId);
  119. if ("onmousedown" == strEvent)
  120. {
  121. try
  122. {
  123. if (null != window.opener)
  124. {
  125. if (null != window.opener.m_objModal && window != window.opener)
  126. {
  127. window.opener.m_objModal = window;
  128. }
  129. }
  130. }
  131. catch (e)
  132. {
  133. // pass시키기
  134. }
  135. // NavIndex 초기화
  136. }
  137. objElement.dispatch(strEvent, window.m_event);
  138. }
  139. };
  140. XFormsWindow.onProcessFocusedEvent = function (e)
  141. {
  142. if (!window.bParsed)
  143. {
  144. return;
  145. }
  146. var strEvent = XFormsWindow.getEventName(e);
  147. var strFocusId = window.m_event.focus;
  148. if (null != strFocusId && !strFocusId.isEmpty())
  149. {
  150. window.initEvent(e, strFocusId);
  151. var objFocused = document.allElement.item(strFocusId);
  152. if (objFocused instanceof XFormsCell)
  153. {
  154. objFocused = objFocused.getElement();
  155. }
  156. if (null != objFocused)
  157. {
  158. objFocused.dispatch(strEvent, window.m_event);
  159. }
  160. }
  161. };
  162. XFormsWindow.getEventName = function (e)
  163. {
  164. switch (e.type)
  165. {
  166. // MouseEvent
  167. case "mousedown" : return "onmousedown";
  168. case "mousemove" : return "onmousemove";
  169. case "mouseup" : return "onmouseup";
  170. case "dblclick" : return "ondblclick";
  171. // KeyEvent
  172. case "keydown" : return "onkeydown";
  173. case "keypress" : return "onkeypress";
  174. case "keyup" : return "onkeyup";
  175. case "mousewheel" : return "onmousewheel";
  176. case "DOMMouseScroll" : return "onmousewheel";
  177. // scroll
  178. case "scroll" : return "onscroll";
  179. // Drag & Drop
  180. // dragstart
  181. case "dragstart" : return "ondragstart"; // IE, Chrome, Safari, FireFox from 3.5
  182. case "draggesture" : return "ondragstart"; // Firefox earlier than version 3.5
  183. // dragenter
  184. case "dragenter" : return "ondragenter"; // IE, Chrome, Safari, FireFox
  185. // dragover
  186. case "dragover" : return "ondragover"; // IE, Chrome, Safari, FireFox
  187. // dragleave
  188. case "dragleave" : return "ondragleave"; // IE, Chrome, Safari, FireFox from 3.5
  189. case "dragexit" : return "ondragleave"; // Firefox earlier than version 3.5
  190. // drop
  191. case "drop" : return "ondrop"; // IE, Chrome, Safari, FireFox from 3.5
  192. case "dragdrop" : return "ondrop"; // Firefox earlier than version 3.5
  193. }
  194. };
  195. XFormsWindow.findEventElement = function (heEventTarget)
  196. {
  197. if (null != heEventTarget)
  198. {
  199. var strElementId;
  200. var strIsParentId;
  201. var bIsScroll;
  202. var heParentElement = heEventTarget;
  203. while (null != heParentElement && heParentElement.getAttribute)
  204. {
  205. var strId = heParentElement.getAttribute("id");
  206. if (strId)
  207. {
  208. strElementId = strId.replace("HE_", "");
  209. if (strElementId == "__TF_ContextMenu") return null;
  210. if (null != strElementId)
  211. {
  212. strIsParentId = heParentElement.getAttribute("parentId");
  213. if (null != strIsParentId)
  214. {
  215. bIsScroll = true;
  216. }
  217. else
  218. {
  219. bIsScroll = false;
  220. }
  221. var objElement = document.allElement.item(strElementId);
  222. if (null != objElement)
  223. {
  224. if ((objElement instanceof XFormsCell) ||
  225. (objElement instanceof XFormsTreeViewItem) ||
  226. (objElement instanceof XFormsSelectItem))
  227. {
  228. var objParent = objElement.parent;
  229. if (null != objParent)
  230. {
  231. objParent.setAttribute("row", objElement.row);
  232. objParent.setAttribute("col", objElement.col);
  233. }
  234. }
  235. else if (objElement instanceof XFormsDataGrid)
  236. {
  237. objElement.mouseCol = -1;
  238. objElement.mouseRow = -1;
  239. }
  240. else if ((objElement instanceof XFormsSelect) || (objElement instanceof XFormsTreeView))
  241. {
  242. objElement.m_nSelectedRow = -1;
  243. objElement.m_nSelectedCol = -1;
  244. objElement.m_bScoll = bIsScroll;
  245. }
  246. return objElement.getElement();
  247. }
  248. }
  249. }
  250. if (is_firefox)
  251. {
  252. heParentElement = heParentElement.parentNode;
  253. }
  254. else
  255. {
  256. heParentElement = heParentElement.parentElement;
  257. }
  258. }
  259. }
  260. return null;
  261. };
  262. window.initEvent = function (e, strId)
  263. {
  264. window.m_event.name = XFormsWindow.getEventName(e);
  265. window.m_event.target = strId;
  266. window.m_event.altKey = e.altKey;
  267. window.m_event.ctrlKey = e.ctrlKey;
  268. window.m_event.shiftKey = e.shiftKey;
  269. window.m_event.metaKey = e.metaKey;
  270. window.m_event.keyCode = e.keyCode;
  271. if(is_ie)
  272. {
  273. switch (e.button)
  274. {
  275. case 1 : window.m_event.button = TFEvent.BUTTON_LEFT; break;
  276. case 2 : window.m_event.button = TFEvent.BUTTON_RIGHT; break;
  277. case 4 : window.m_event.button = TFEvent.BUTTON_MIDDLE; break;
  278. }
  279. }
  280. else
  281. {
  282. switch (e.button)
  283. {
  284. case 0 : window.m_event.button = TFEvent.BUTTON_LEFT; break;
  285. case 1 : window.m_event.button = TFEvent.BUTTON_MIDDLE; break;
  286. case 2 : window.m_event.button = TFEvent.BUTTON_RIGHT; break;
  287. }
  288. }
  289. var objTarget = document.allElement.item(strId);
  290. if (null != objTarget.m_heControl)
  291. {
  292. window.m_event.targetX = e.clientX - objTarget.getClientLeft(true) - objTarget.m_heControl.scrollLeft;
  293. window.m_event.targetY = e.clientY - objTarget.getClientTop(true) - objTarget.m_heControl.scrollTop;
  294. }
  295. window.m_event.screenX = e.screenX;
  296. window.m_event.screenY = e.screenY;
  297. window.m_event.clientX = e.clientX;
  298. window.m_event.clientY = e.clientY;
  299. window.m_event.m_nRef = 0;
  300. window.m_event.m_browserEvent = e;
  301. window.m_event.ptarget = objTarget;
  302. if (e.wheelDelta) // IE, Opera
  303. {
  304. window.m_event.mouseWheel = e.wheelDelta / 120;
  305. }
  306. else // Mozilla
  307. {
  308. window.m_event.mouseWheel = -(e.detail / 3);
  309. }
  310. };
  311. XFormsWindow.pause = function (iMilliseconds)
  312. {
  313. var startTime = new Date().getTime();
  314. while (new Date().getTime() < startTime + iMilliseconds);
  315. };
  316. /**
  317. * Property
  318. */
  319. function __initWindow ()
  320. {
  321. // window에 event를 설정한다.
  322. if (window.attachEvent)
  323. {
  324. // MouseEvent
  325. document.body.attachEvent("onmousedown", XFormsWindow.onProcessMouseEvent);
  326. document.body.attachEvent("onmousemove", XFormsWindow.onProcessMouseEvent);
  327. document.body.attachEvent("onmouseup", XFormsWindow.onProcessMouseEvent);
  328. document.body.attachEvent("ondblclick", XFormsWindow.onProcessMouseEvent);
  329. // KeyEvent
  330. document.body.attachEvent("onkeydown", XFormsWindow.onProcessFocusedEvent);
  331. document.body.attachEvent("onkeypress", XFormsWindow.onProcessFocusedEvent);
  332. document.body.attachEvent("onkeyup", XFormsWindow.onProcessFocusedEvent);
  333. document.body.attachEvent("onmousewheel", XFormsWindow.onProcessFocusedEvent);
  334. // resize
  335. //document.body.attachEvent("onresize", XFormsWindow.onResize);
  336. window.attachEvent("onresize", XFormsWindow.onResize);
  337. // scroll
  338. document.body.attachEvent("onscroll", XFormsWindow.onProcessEvent);
  339. // Drag & Drop
  340. document.body.attachEvent("ondragstart", XFormsWindow.onProcessMouseEvent);
  341. document.body.attachEvent("ondragenter", XFormsWindow.onProcessMouseEvent);
  342. document.body.attachEvent("ondragover", XFormsWindow.onProcessMouseEvent);
  343. document.body.attachEvent("ondragleave", XFormsWindow.onProcessMouseEvent);
  344. document.body.attachEvent("ondrop", XFormsWindow.onProcessMouseEvent);
  345. }
  346. else
  347. {
  348. // MouseEvent
  349. window.addEventListener("mousedown", XFormsWindow.onProcessMouseEvent, false);
  350. window.addEventListener("mousemove", XFormsWindow.onProcessMouseEvent, false);
  351. window.addEventListener("mouseup", XFormsWindow.onProcessMouseEvent, false);
  352. window.addEventListener("dblclick", XFormsWindow.onProcessMouseEvent, false);
  353. // KeyEvent
  354. window.addEventListener("keydown", XFormsWindow.onProcessFocusedEvent, false);
  355. window.addEventListener("keypress", XFormsWindow.onProcessFocusedEvent, false);
  356. window.addEventListener("keyup", XFormsWindow.onProcessFocusedEvent, false);
  357. window.addEventListener("mousewheel", XFormsWindow.onProcessFocusedEvent, false);
  358. window.addEventListener("DOMMouseScroll", XFormsWindow.onProcessFocusedEvent, false);
  359. // resize
  360. window.addEventListener("resize", XFormsWindow.onResize, false);
  361. // scroll
  362. window.addEventListener("scroll", XFormsWindow.onProcessEvent, false);
  363. // Drag & Drop
  364. window.addEventListener("dragstart", XFormsWindow.onProcessMouseEvent, false);
  365. window.addEventListener("draggesture", XFormsWindow.onProcessMouseEvent, false);
  366. window.addEventListener("dragenter", XFormsWindow.onProcessMouseEvent, false);
  367. window.addEventListener("dragover", XFormsWindow.onProcessMouseEvent, false);
  368. window.addEventListener("dragleave", XFormsWindow.onProcessMouseEvent, false);
  369. window.addEventListener("dragexit", XFormsWindow.onProcessMouseEvent, false);
  370. window.addEventListener("drop", XFormsWindow.onProcessMouseEvent, false);
  371. window.addEventListener("dragdrop", XFormsWindow.onProcessMouseEvent, false);
  372. }
  373. window.children = new Collection();
  374. window.clipBoardData;
  375. window.m_strClipBoardData = "";
  376. window.hint;
  377. window.mdi;
  378. window.mdiChildren = new Collection();
  379. window.mdiTopmost;
  380. window.modelessTopmost;
  381. window.type = "main";
  382. window.topPos;
  383. window.left;
  384. window.width = document.body.offsetWidth;
  385. window.height = document.body.offsetHeight;
  386. window.visible = true;
  387. window.m_nDelayTime = null;
  388. // Document
  389. window.m_objDoc;// TODO
  390. //modal
  391. window.m_objModal = null;
  392. // Event
  393. window.m_arGlobalEventFireList = window.makeGlobalEventFireList();
  394. window.m_event = {
  395. name : "",
  396. target : "",
  397. currentTarget : "",
  398. relatedTarget : "",
  399. propagate : "",
  400. defaultAction : "",
  401. description : "",
  402. hover : "",
  403. down : "",
  404. focus : "",
  405. drag : "",
  406. capture : "",
  407. altKey : "",
  408. ctrlKey : "",
  409. shiftKey : "",
  410. metaKey : "",
  411. keyCode : "",
  412. button : "",
  413. x : -1,
  414. y : -1,
  415. clientX : -1,
  416. clientY : -1,
  417. screenX : -1,
  418. screenY : -1,
  419. targetX : -1,
  420. targetY : -1,
  421. pTarget : null,
  422. dropData : "",
  423. dropDataType : "",
  424. m_nRef : 0,
  425. m_browserEvent : null,
  426. preventDefault : function ()
  427. {
  428. this.defaultAction = "cancel";
  429. if (is_ie)
  430. {
  431. this.m_browserEvent.returnValue = false;
  432. }
  433. else
  434. {
  435. this.m_browserEvent.preventDefault();
  436. }
  437. },
  438. routeDefault : function ()
  439. {
  440. this.defaultAction = "perform";
  441. },
  442. stopPropagation : function ()
  443. {
  444. this.propagate = "stop";
  445. }
  446. };
  447. window.m_bReady = false;
  448. // window.bChildReady = false;
  449. // if (window.opener && false == window.opener.bChildReady)
  450. // {
  451. // window.opener.bChildReady = true;
  452. // }
  453. window.bParsed = true;
  454. window.m_strPrevClickElement;
  455. window.m_objPrevClickDate;
  456. //htmlwindow, htmldocument 을 정의한다
  457. var objTempWindow = window;
  458. try
  459. {
  460. while(true)
  461. {
  462. if (objTempWindow.opener)
  463. {
  464. if (objTempWindow == objTempWindow.opener)
  465. {
  466. htmlwindow = objTempWindow;
  467. htmldocument = objTempWindow.document;
  468. break;
  469. }
  470. objTempWindow = objTempWindow.opener;
  471. if (objTempWindow.__SoonsuViewer)
  472. {
  473. continue;
  474. }
  475. else
  476. {
  477. htmlwindow = objTempWindow;
  478. htmldocument = objTempWindow.document;
  479. break;
  480. }
  481. }
  482. else
  483. {
  484. if (objTempWindow == objTempWindow.parent)
  485. {
  486. htmlwindow = objTempWindow;
  487. htmldocument = objTempWindow.document;
  488. break;
  489. }
  490. objTempWindow = objTempWindow.parent;
  491. if (objTempWindow.__SoonsuViewer )
  492. {
  493. continue;
  494. }
  495. else
  496. {
  497. htmlwindow = objTempWindow;
  498. htmldocument = objTempWindow.document;
  499. break;
  500. }
  501. }
  502. }
  503. }
  504. catch (err)
  505. {
  506. htmlwindow = window.top;
  507. htmldocument = window.top.document;
  508. }
  509. //부모 관계를 체크하여 값을 설정함
  510. if (window.opener)
  511. {
  512. if (window.parent != window.opener)
  513. {
  514. if (is_ie|| is_opera)
  515. {
  516. parent = window.opener;
  517. }
  518. else
  519. {
  520. window.parent = window.opener;
  521. }
  522. }
  523. }
  524. else
  525. {
  526. if (is_firefox)
  527. {
  528. opener = window.parent;
  529. }
  530. else
  531. {
  532. window.opener = window.parent;
  533. }
  534. }
  535. };
  536. // TODO 임시
  537. window.getClipBoardData = function ()
  538. {
  539. var strData = "";
  540. if (is_ie)
  541. {
  542. strData = window.clipboardData.getData("Text");
  543. }
  544. return strData;
  545. };
  546. window.setClipBoardData = function (strData)
  547. {
  548. if (is_ie)
  549. {
  550. window.clipboardData.clearData("Text");
  551. window.clipboardData.setData("Text", strData);
  552. }
  553. };
  554. //
  555. //-----------------------------------------------------------------//
  556. window.setWidth = function (nValue)
  557. {
  558. window.width = nValue;
  559. body.style.width = nValue + "px";
  560. };
  561. window.setHeight = function (nValue)
  562. {
  563. window.height = nValue;
  564. body.style.height = nValue + "px";
  565. };
  566. window.isReady = function ()
  567. {
  568. return window.m_bReady;
  569. };
  570. /**
  571. * Function
  572. */
  573. window.about = function ()
  574. {
  575. window.showModalDialog(__getAppName() + "/kr/comsquare/html/About.html", null, "dialogHeight:130px;dialogWidth:350px;resizable:no;scroll:no;");
  576. };
  577. window.activate = function ()
  578. {
  579. window.setActive();
  580. };
  581. window.showMessageBox = function (strMessage, strTitle, nType)
  582. {
  583. if (null == strTitle && null == nType)
  584. {
  585. alert(strMessage);
  586. return 1;
  587. }
  588. else
  589. {
  590. var nButtonType = nType & 0XF;
  591. if (0 == nButtonType)
  592. {
  593. alert(strMessage);
  594. return 1;
  595. }
  596. else if (1 == nButtonType)
  597. {
  598. bReturnValue = confirm(strMessage);
  599. return (bReturnValue) ? 1 : 2;
  600. }
  601. else if (4 == nButtonType)
  602. {
  603. bReturnValue = confirm(strMessage);
  604. return (bReturnValue) ? 6 : 7;
  605. }
  606. if (2 == nButtonType || 3 == nButtonType || 5 == nButtonType)
  607. {
  608. var htMessage = new Hashtable();
  609. htMessage["message"] = strMessage;
  610. htMessage["title"] = strTitle;
  611. htMessage["type"] = nType;
  612. return window.showModalDialog(__getAppName() + "/kr/comsquare/html/Alert.html", htMessage, "dialogHeight:120px;dialogWidth:200px;resizable:yes;scroll:no;scrollbars:no;");
  613. }
  614. }
  615. };
  616. window.docProperty = function ()
  617. {
  618. // TODO
  619. if (null != window.console)
  620. {
  621. console.log("Unimplemented docProperty()");
  622. }
  623. };
  624. window.exec = function (strAppName, strParam, strWorkDirectory)
  625. {
  626. // TODO signed applet 또는 ActiveX 아니면 안될듯
  627. if (null != window.console)
  628. {
  629. console.log("Unimplemented exec()");
  630. }
  631. };
  632. window.fileDialog = function ()
  633. {
  634. // TODO
  635. if (null != window.console)
  636. {
  637. console.log("Unimplemented fileDialog()");
  638. }
  639. };
  640. window.load = function (strUrl, strType, strID, strProperty, strRef, strResultRef)
  641. {
  642. strUrl = strUrl.replace(".xrw", ".html");
  643. var newWindow;
  644. var strStatus;
  645. if (strType == "html")
  646. {
  647. strStatus = window.makeWindowStatus(strProperty);
  648. newWindow = window.open(strUrl, "_blank", strStatus);
  649. }
  650. else if (strType == "htmlreplace")
  651. {
  652. newWindow = window.open(strUrl, "_self");
  653. }
  654. else
  655. {
  656. if (null != strRef && !strRef.isEmpty()
  657. && null != strResultRef && !strResultRef.isEmpty())
  658. {
  659. // 자식윈도우로 전달할 부모윈도우의 인스턴스를 세팅한다.
  660. window.setParentData(strRef, strResultRef);
  661. }
  662. var strTarget = "_self";
  663. strStatus = window.makeWindowStatus(strProperty);
  664. if (null == strType || strType.isEmpty() || "replace" == strType)
  665. {
  666. strTarget = "_self";
  667. window.location.href = strUrl;
  668. newWindow = window;
  669. }
  670. else
  671. {
  672. strTarget = "_blank";
  673. newWindow = window.open(strUrl, strTarget, strStatus, false);
  674. }
  675. if (is_ie)
  676. {
  677. while (strTarget != "_self" && (!newWindow || !newWindow.isReady || !newWindow.isReady()))
  678. {
  679. XFormsWindow.pause(100);
  680. }
  681. }
  682. switch (strType)
  683. {
  684. case "modeless" :
  685. {
  686. newWindow.type = "modeless";
  687. break;
  688. }
  689. case "modal" :
  690. {
  691. newWindow.type = "modal";
  692. break;
  693. }
  694. case "mdi" :
  695. {
  696. newWindow.type = "mdi";
  697. break;
  698. }
  699. case "replace" :
  700. {
  701. newWindow.type = "main";
  702. break;
  703. }
  704. case "modeless_topmost" :
  705. {
  706. newWindow.type = "modeless";
  707. break;
  708. }
  709. case "mdichild_topmost" :
  710. {
  711. newWindow.type = "mdi";
  712. break;
  713. }
  714. }
  715. if ("replace" != strType)
  716. {
  717. window.children.add(strID, newWindow);
  718. }
  719. if ("mdi" == strType || "mdichild" == strType || "mdichild_topmost" == strType)
  720. {
  721. window.mdiChildren.add(strID, newWindow);
  722. }
  723. else if ("modal" == strType)
  724. {
  725. if (!is_opera)
  726. {
  727. var objTargetWindow = window;
  728. var objTargetDocument = document;
  729. if (null != window.parent)
  730. {
  731. var objParentWindow = window.parent;
  732. var objParentDocument = window.parent.document;
  733. while(objTargetWindow != objParentWindow)
  734. {
  735. if (null != objParentDocument.userAgent)
  736. {
  737. objTargetWindow = objParentWindow;
  738. objTargetDocument = objParentDocument;
  739. if (null != objParentWindow.parent)
  740. {
  741. objParentWindow = objParentWindow.parent;
  742. objParentDocument = objParentWindow.parent.document;
  743. }
  744. else
  745. {
  746. break;
  747. }
  748. }
  749. else
  750. {
  751. break;
  752. }
  753. }
  754. }
  755. if (null == objTargetDocument.getElementById("Soonsu_Create_Modal"))
  756. {
  757. var heModalDiv = objTargetDocument.createElement("div");
  758. heModalDiv.id = "Soonsu_Create_Modal";
  759. heModalDiv.style.left = "0px";
  760. heModalDiv.style.top = "0px";
  761. heModalDiv.style.width = "100%";
  762. heModalDiv.style.height = "100%";
  763. heModalDiv.style.position = "absolute";
  764. heModalDiv.style.zIndex = 1000;
  765. heModalDiv.style.backgroundColor = "#ffffff";
  766. $(heModalDiv).css({ opacity: 0 });
  767. heModalDiv.onmousedown = XFormsWindow.shiftModalFocus;
  768. heModalDiv.onclick = XFormsWindow.shiftModalFocus;
  769. heModalDiv.ondblclick = XFormsWindow.shiftModalFocus;
  770. objTargetDocument.body.appendChild(heModalDiv);
  771. }
  772. objTargetWindow.m_objModal = newWindow;
  773. newWindow.openerTargetWindow = objTargetWindow;
  774. window.m_objModal = newWindow;
  775. }
  776. }
  777. }
  778. return newWindow;
  779. };
  780. XFormsWindow.shiftModalFocus = function ()
  781. {
  782. if (null != window.m_objModal)
  783. {
  784. window.m_objModal.focus();
  785. }
  786. else
  787. {
  788. var heModalDiv = document.getElementById("Soonsu_Create_Modal");
  789. if (null != heModalDiv)
  790. {
  791. body.m_heControl.removeChild(heModalDiv);
  792. }
  793. }
  794. };
  795. window.maximize = function ()
  796. {
  797. // TODO
  798. if (null != window.console)
  799. {
  800. console.log("Unimplemented window.maximize()");
  801. }
  802. };
  803. window.minimize = function ()
  804. {
  805. // TODO
  806. if (null != window.console)
  807. {
  808. console.log("Unimplemented window.minimize()");
  809. }
  810. };
  811. window.nextPage = function ()
  812. {
  813. if(history)
  814. {
  815. history.forward();
  816. }
  817. else
  818. {
  819. window.forward();
  820. }
  821. };
  822. window.prevPage = function ()
  823. {
  824. if(history)
  825. {
  826. history.back();
  827. }
  828. else
  829. {
  830. window.back();
  831. }
  832. };
  833. window.refreshScrollbar = function ()
  834. {
  835. if (null != window.console)
  836. {
  837. console.log("There is no need to run a window.refreshScrollBar()");
  838. }
  839. };
  840. window.reload = function ()
  841. {
  842. window.location.reload(false);
  843. };
  844. window.restore = function ()
  845. {
  846. window.location.reload(false);
  847. };
  848. /**
  849. * R.G.B. 로 조합한 색상의 색상값을 10진수 정수 형태로 반환한다.
  850. */
  851. window.rgb = function (nRed, nGreen, nBlue)
  852. {
  853. return ((nRed & 0xFF) << 0) | ((nGreen & 0xFF) << 8) | ((nBlue & 0xFF) << 16);
  854. };
  855. window.setIEResizable = function (bResize)
  856. {
  857. // TODO
  858. if (null != window.console)
  859. {
  860. console.log("Unimplemented window.setIEResizable()");
  861. }
  862. };
  863. window.setPopupMenu = function (bShow, strNodeset, strLabel, strFunctionName, bEvent)
  864. {
  865. body.m_bSetPopupMenu = bShow;
  866. if (bShow)
  867. {
  868. new XFormsContextMenu ("body", "__TF_ContextMenu", "xforms:contextmenu", strNodeset, strLabel, strFunctionName, bEvent);
  869. }
  870. else
  871. {
  872. body.removeChild("__TF_ContextMenu");
  873. }
  874. };
  875. window.setSize = function (nWidth, nHeight)
  876. {
  877. window.resizeTo(nWidth, nHeight);
  878. };
  879. window.showIEMenu = function (bShow)
  880. {
  881. // TODO
  882. if (null != window.console)
  883. {
  884. console.log("Unimplemented window.showIEMenu()");
  885. }
  886. };
  887. window.showPopupMenu = function (bShow)
  888. {
  889. body.m_bShowPopupMenu = bShow;
  890. };
  891. window.viewInstance = function ()
  892. {
  893. // TODO 임시코드
  894. var strValue = "";
  895. var arKeyset = model.instances.keys();
  896. for (var i=0; i<arKeyset.length; i++)
  897. {
  898. var strKey = arKeyset[i];
  899. var objInstance = model.instances.item(strKey);
  900. strValue += objInstance.getXml() + "\n";
  901. }
  902. alert(strValue);
  903. };
  904. window.viewLog = function ()
  905. {
  906. // TODO
  907. if (null != window.console)
  908. {
  909. console.log("Unimplemented window.viewLog()");
  910. }
  911. };
  912. window.zoom = function ()
  913. {
  914. return null;
  915. };
  916. window.setZoom = function (nScale)
  917. {
  918. if (null == nScale)
  919. {
  920. return;
  921. }
  922. nScale = nScale / 100;
  923. if(is_ie || is_webkit)
  924. {
  925. document.body.style.zoom = nScale;
  926. }
  927. else if (is_firefox)
  928. {
  929. $('body').css('-moz-transform','scale('+(nScale)+')');
  930. $('body').css('-moz-transform-origin','0 0');
  931. }
  932. else if (is_opera)
  933. {
  934. $('body').css('-o-transform','scale('+(nScale)+')');
  935. $('body').css('-o-transform-origin','0 0');
  936. }
  937. };
  938. window.viewSource = function ()
  939. {
  940. // TODO
  941. if (null != window.console)
  942. {
  943. console.log("Unimplemented window.viewSource()");
  944. }
  945. };
  946. window.getHostURL = function ()
  947. {
  948. return window.location.protocol + "//" + window.location.host;
  949. };
  950. window.getTrustFormURL = function ()
  951. {
  952. return window.location.protocol + "//" + window.location.host + __getAppName();
  953. };
  954. window.makeWindowStatus = function (strProperty)
  955. {
  956. var strWindowStatus = "";
  957. if (null == strProperty || 0 == strProperty.length)
  958. {
  959. return null;
  960. }
  961. var arStatus = strProperty.split(";");
  962. for (var i=0; i<arStatus.length; i++)
  963. {
  964. var strStatus = arStatus[i];
  965. if (null != strStatus)
  966. {
  967. var arUnit = strStatus.split(":");
  968. if (2 == arUnit.length)
  969. {
  970. var strPropertyName = arUnit[0].trim();
  971. var strPropertyValue = arUnit[1].trim();
  972. switch (strPropertyName)
  973. {
  974. case "left" :
  975. {
  976. if (is_ie)
  977. {
  978. strWindowStatus += "left=" + strPropertyValue + ",";
  979. }
  980. else
  981. {
  982. strWindowStatus += "screenX=" + strPropertyValue + ",";
  983. }
  984. break;
  985. }
  986. case "top" :
  987. {
  988. if (is_ie)
  989. {
  990. strWindowStatus += "top=" + strPropertyValue + ",";
  991. }
  992. else
  993. {
  994. strWindowStatus += "screenY=" + strPropertyValue + ",";
  995. }
  996. break;
  997. }
  998. case "width" :
  999. {
  1000. strWindowStatus += "width=" + strPropertyValue + ",";
  1001. break;
  1002. }
  1003. case "height" :
  1004. {
  1005. strWindowStatus += "height=" + strPropertyValue + ",";
  1006. break;
  1007. }
  1008. case "sysmenu" :
  1009. {
  1010. break;
  1011. }
  1012. case "min" :
  1013. {
  1014. break;
  1015. }
  1016. case "max" :
  1017. {
  1018. break;
  1019. }
  1020. case "resize" :
  1021. {
  1022. strPropertyValue = ("true" == strPropertyValue)? "yes" : "no";
  1023. strWindowStatus += "resizable=" + strPropertyValue + ",";
  1024. break;
  1025. }
  1026. case "caption" :
  1027. {
  1028. strPropertyValue = ("visible" == strPropertyValue)? "yes" : "no";
  1029. strWindowStatus += "titlebar=" + strPropertyValue + ",";
  1030. strWindowStatus += "location=" + strPropertyValue + ",";
  1031. break;
  1032. }
  1033. case "align" :
  1034. {
  1035. strPropertyValue = ("center" == strPropertyValue) ? "yes" : "no";
  1036. strWindowStatus += "center=" + strPropertyValue + ",";
  1037. break;
  1038. }
  1039. case "icon" :
  1040. {
  1041. break;
  1042. }
  1043. case "menubar" :
  1044. {
  1045. if ("yes" == strPropertyValue)
  1046. {
  1047. strWindowStatus += "menubar=yes,";
  1048. }
  1049. break;
  1050. }
  1051. }
  1052. }
  1053. }
  1054. }
  1055. if (0 > strWindowStatus.indexOf("resizable"))
  1056. {
  1057. strWindowStatus += "resizable=yes,";
  1058. }
  1059. if (0 > strWindowStatus.indexOf("menubar"))
  1060. {
  1061. strWindowStatus += "menbar=no,";
  1062. }
  1063. strWindowStatus += "copyhistory=yes";
  1064. return strWindowStatus;
  1065. };
  1066. window.removeChildWindow = function (objWindow, bMdi)
  1067. {
  1068. if (!is_opera)
  1069. {
  1070. if (window.m_objModal == objWindow)
  1071. {
  1072. for (var i=0; i<window.children.length; i++)
  1073. {
  1074. if (window.children.item(i) == objWindow)
  1075. {
  1076. window.children.remove(window.children.m_arOrder[i]);
  1077. break;
  1078. }
  1079. }
  1080. if (window.children.length > 0)
  1081. {
  1082. window.m_objModal = window.children.item(window.children.length - 1);
  1083. }
  1084. else
  1085. {
  1086. window.m_objModal = null;
  1087. var heModalDiv = document.getElementById("Soonsu_Create_Modal");
  1088. if (null != heModalDiv)
  1089. {
  1090. body.m_heControl.removeChild(heModalDiv);
  1091. }
  1092. }
  1093. }
  1094. else
  1095. {
  1096. for (var i=0; i<window.children.length; i++)
  1097. {
  1098. if (window.children.item(i) == objWindow)
  1099. {
  1100. window.children.remove(window.children.m_arOrder[i]);
  1101. break;
  1102. }
  1103. }
  1104. }
  1105. }
  1106. };
  1107. window.removeBodyHiddenDiv = function ()
  1108. {
  1109. var heModalDiv = document.getElementById("Soonsu_Create_Modal");
  1110. if (null != heModalDiv)
  1111. {
  1112. body.m_heControl.removeChild(heModalDiv);
  1113. }
  1114. };
  1115. window.getFocus = function ()
  1116. {
  1117. return window.m_event.focus;
  1118. };
  1119. window.setFocus = function (strId)
  1120. {
  1121. var strOldId = window.m_event.focus;
  1122. if (strOldId == strId)
  1123. {
  1124. return;
  1125. }
  1126. var objOldControl = document.allElement.item(strOldId);
  1127. if (null != objOldControl)
  1128. {
  1129. objOldControl = objOldControl.getElement();
  1130. window.m_event.relatedTarget = strId;
  1131. objOldControl.dispatch("onblur", window.m_event);
  1132. objOldControl.dispatch("DOMFocusOut", window.m_event);
  1133. if (objOldControl.getState(FCS_DISABLE))
  1134. {
  1135. window.m_event.focus = "";
  1136. }
  1137. if (!window.m_event.focus.isEmpty())
  1138. {
  1139. return;
  1140. }
  1141. }
  1142. var objControl = document.allElement.item(strId);
  1143. if (null != objControl)
  1144. {
  1145. objControl = objControl.getElement();
  1146. window.m_event.relatedTarget = strOldId;
  1147. objControl.dispatch("onfocus", window.m_event);
  1148. objControl.dispatch("DOMFocusIn", window.m_event);
  1149. if (window.m_event.focus != strId)
  1150. {
  1151. return;
  1152. }
  1153. // TODO navIndex 처리
  1154. }
  1155. window.m_event.relatedTarget = "";
  1156. };
  1157. window.getParentData = function ()
  1158. {
  1159. var strData = unescape(model.getProperty("__TF_PARENT_DATA_REF_"));
  1160. if (null != strData && !strData.isEmpty())
  1161. {
  1162. var xnData = XmlLib.loadXMLFromString(strData);
  1163. var strResultRef = model.getProperty("__TF_PARENT_DATA_RESULT_REF_");
  1164. if (null != xnData && null != strResultRef && !strResultRef.isEmpty())
  1165. {
  1166. model.setParentData(xnData, strResultRef);
  1167. }
  1168. model.deleteProperty("__TF_PARENT_DATA_REF_");
  1169. model.deleteProperty("__TF_PARENT_DATA_RESULT_REF_");
  1170. }
  1171. };
  1172. window.setParentData = function (strRef, strResultRef)
  1173. {
  1174. var xnRefNode = model.getInstanceSinglePart(null, strRef);
  1175. model.setProperty("__TF_PARENT_DATA_REF_", escape(XmlLib.serializeToString(xnRefNode)));
  1176. model.setProperty("__TF_PARENT_DATA_RESULT_REF_", strResultRef);
  1177. };
  1178. // 스마트폰에서 일어난 클릭이 더블클릭인지 판단한다.
  1179. window.isSmartPhoneDblClick = function (strId)
  1180. {
  1181. var bResult = false;
  1182. if (is_smartphone)
  1183. {
  1184. var lCurrentTime = new Date().getTime();
  1185. if (window.m_strPrevClickElement == strId && lCurrentTime < window.m_objPrevClickDate + 1000)
  1186. {
  1187. bResult = true;
  1188. }
  1189. }
  1190. return bResult;
  1191. };
  1192. window.setPermitResize = function (bStatus)
  1193. {
  1194. window.bParsed = bStatus;
  1195. };
  1196. // 더블클릭을 위하여 스마트폰에서 일어난 클릭정보를 저장한다.
  1197. window.setPrevClickInfo = function (strId, lTime)
  1198. {
  1199. if (is_smartphone)
  1200. {
  1201. window.m_strPrevClickElement = strId;
  1202. window.m_objPrevClickDate = lTime;
  1203. }
  1204. };
  1205. // 더블클릭을 위하여 스마트폰에서 일어난 클릭정보를 지운다.
  1206. window.removePrevClickInfo = function ()
  1207. {
  1208. if (is_smartphone)
  1209. {
  1210. window.m_strPrevClickElement = null;
  1211. window.m_objPrevClickDate = null;
  1212. }
  1213. };
  1214. window.makeGlobalEventFireList = function ()
  1215. {
  1216. var arGlobalEventFireList = new Hashtable();
  1217. if (window.DOMFocusIn) arGlobalEventFireList["DOMFocusIn"] = true;
  1218. if (window.DOMFocusOut) arGlobalEventFireList["DOMFocusOut"] = true;
  1219. if (window.onaccesskey) arGlobalEventFireList["onaccesskey"] = true;
  1220. if (window.onblur) arGlobalEventFireList["onblur"] = true;
  1221. if (window.onclick) arGlobalEventFireList["onclick"] = true;
  1222. if (window.ondblclick) arGlobalEventFireList["ondblclick"] = true;
  1223. if (window.ondelayclick) arGlobalEventFireList["ondelayclick"] = true;
  1224. if (window.onfocus) arGlobalEventFireList["onfocus"] = true;
  1225. if (window.onhidehint) arGlobalEventFireList["onhidehint"] = true;
  1226. if (window.onload) arGlobalEventFireList["onload"] = true;
  1227. if (window.onmousedown) arGlobalEventFireList["onmousedown"] = true;
  1228. if (window.onmouseup) arGlobalEventFireList["onmouseup"] = true;
  1229. if (window.onmousemove) arGlobalEventFireList["onmousemove"] = true;
  1230. if (window.onmouseout) arGlobalEventFireList["onmouseout"] = true;
  1231. if (window.onmouseover) arGlobalEventFireList["onmouseover"] = true;
  1232. if (window.onmousewheel) arGlobalEventFireList["onmousewheel"] = true;
  1233. // if (window.onscroll) arGlobalEventFireList["onscroll"] = true;
  1234. if (window.onscrolldown) arGlobalEventFireList["onscrolldown"] = true;
  1235. if (window.onscrollpagedown) arGlobalEventFireList["onscrollpagedown"] = true;
  1236. if (window.onscrollpageup) arGlobalEventFireList["onscrollpageup"] = true;
  1237. if (window.onscrollpos) arGlobalEventFireList["onscrollpos"] = true;
  1238. if (window.onscrolltrack) arGlobalEventFireList["onscrolltrack"] = true;
  1239. if (window.onscrollup) arGlobalEventFireList["onscrollup"] = true;
  1240. if (window.onshowhint) arGlobalEventFireList["onshowhint"] = true;
  1241. if (window.xforms_help) arGlobalEventFireList["xforms_help"] = true;
  1242. if (window.xforms_hint) arGlobalEventFireList["xforms_hint"] = true;
  1243. if (window.xforms_invalid) arGlobalEventFireList["xforms_invalid"] = true;
  1244. if (window.xforms_next) arGlobalEventFireList["xforms_next"] = true;
  1245. if (window.xforms_optional) arGlobalEventFireList["xforms_optional"] = true;
  1246. if (window.xforms_previous) arGlobalEventFireList["xforms_previous"] = true;
  1247. if (window.xforms_readonly) arGlobalEventFireList["xforms_readonly"] = true;
  1248. if (window.xforms_readwrite) arGlobalEventFireList["xforms_readwrite"] = true;
  1249. if (window.rms_required) arGlobalEventFireList["rms_required"] = true;
  1250. if (window.xforms_required_error) arGlobalEventFireList["xforms_required_error"] = true;
  1251. if (window.xforms_valid) arGlobalEventFireList["xforms_valid"] = true;
  1252. if (window.DOMActivate) arGlobalEventFireList["DOMActivate"] = true;
  1253. if (window.ondayselect) arGlobalEventFireList["ondayselect"] = true;
  1254. if (window.onnextmonth) arGlobalEventFireList["onnextmonth"] = true;
  1255. if (window.onprevmonth) arGlobalEventFireList["onprevmonth"] = true;
  1256. if (window.onaftermovecolumn) arGlobalEventFireList["onaftermovecolumn"] = true;
  1257. if (window.onafteruserresize) arGlobalEventFireList["onafteruserresize"] = true;
  1258. if (window.onbeforemovecolumn) arGlobalEventFireList["onbeforemovecolumn"] = true;
  1259. if (window.onbeforeuserresize) arGlobalEventFireList["onbeforeuserresize"] = true;
  1260. if (window.onbuttonclick) arGlobalEventFireList["onbuttonclick"] = true;
  1261. if (window.onendedit) arGlobalEventFireList["onendedit"] = true;
  1262. if (window.onentercell) arGlobalEventFireList["onentercell"] = true;
  1263. if (window.onstartedit) arGlobalEventFireList["onstartedit"] = true;
  1264. if (window.onrowchanged) arGlobalEventFireList["onrowchanged"] = true;
  1265. if (window.xforms_rebuild) arGlobalEventFireList["xforms_rebuild"] = true;
  1266. if (window.xforms_select) arGlobalEventFireList["xforms_select"] = true;
  1267. if (window.xforms_value_changed) arGlobalEventFireList["xforms_value_changed"] = true;
  1268. if (window.onbuttonclick) arGlobalEventFireList["onbuttonclick"] = true;
  1269. if (window.onkeypress) arGlobalEventFireList["onkeypress"] = true;
  1270. if (window.onkeydown) arGlobalEventFireList["onkeydown"] = true;
  1271. if (window.onkeyup) arGlobalEventFireList["onkeyup"] = true;
  1272. if (window.oninvalidformat) arGlobalEventFireList["oninvalidformat"] = true;
  1273. if (window.onmaxlength) arGlobalEventFireList["onmaxlength"] = true;
  1274. if (window.onvalidformat) arGlobalEventFireList["onvalidformat"] = true;
  1275. if (window.xforms_close) arGlobalEventFireList["xforms_close"] = true;
  1276. if (window.xforms_model_construct) arGlobalEventFireList["xforms_model_construct"] = true;
  1277. if (window.xforms_model_construct_done) arGlobalEventFireList["xforms_model_construct_done"] = true;
  1278. if (window.xforms_model_destruct) arGlobalEventFireList["xforms_model_destruct"] = true;
  1279. if (window.xforms_ready) arGlobalEventFireList["xforms_ready"] = true;
  1280. if (window.xforms_refresh) arGlobalEventFireList["xforms_refresh"] = true;
  1281. if (window.xforms_recalculate) arGlobalEventFireList["xforms_recalculate"] = true;
  1282. if (window.xforms_revalidate) arGlobalEventFireList["xforms_revalidate"] = true;
  1283. if (window.xforms_deselect) arGlobalEventFireList["xforms_deselect"] = true;
  1284. if (window.xforms_select) arGlobalEventFireList["xforms_select"] = true;
  1285. if (window.xforms_submit) arGlobalEventFireList["xforms_submit"] = true;
  1286. if (window.xforms_submit_cancel) arGlobalEventFireList["xforms_submit_cancel"] = true;
  1287. if (window.xforms_submit_done) arGlobalEventFireList["xforms_submit_done"] = true;
  1288. if (window.xforms_submit_error) arGlobalEventFireList["xforms_submit_error"] = true;
  1289. if (window.upload_ext_error) arGlobalEventFireList["upload_ext_error"] = true;
  1290. if (window.upload_filecount_error) arGlobalEventFireList["upload_filecount_error"] = true;
  1291. if (window.upload_filesize_error) arGlobalEventFireList["upload_filesize_error"] = true;
  1292. if (window.upload_revalidate) arGlobalEventFireList["upload_revalidate"] = true;
  1293. return arGlobalEventFireList;
  1294. };