123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
- <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
- <xhtml:head>
- <xhtml:title>식사횟수관리</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <data>
- <check/>
- <code>1</code>
- <cnt>1회</cnt>
- </data>
- <data>
- <check/>
- <code>2</code>
- <cnt>2회</cnt>
- </data>
- <data>
- <check/>
- <code>3</code>
- <cnt>3회</cnt>
- </data>
- <data>
- <check/>
- <code>4</code>
- <cnt>4회</cnt>
- </data>
- <data>
- <check/>
- <code>5</code>
- <cnt>5회</cnt>
- </data>
- <data>
- <check/>
- <code>6</code>
- <cnt>6회</cnt>
- </data>
- </main>
- <send/>
- <init/>
- <temp>
- <receivedata/>
- </temp>
- </root>
- </instance>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- var cnt = model.getValue("/root/temp/receivedata/cnt");
- if ( cnt != "" ) {
- for ( i = 0; i < cnt.length; i+=2 ) {
- if (cnt.substr(i,1) != "" && cnt.substr(i,1)=="1") {
- model.setValue("/root/main/data[1]/check", "Y");
- } else if (cnt.substr(i,1) != "" && cnt.substr(i,1)=="2") {
- model.setValue("/root/main/data[2]/check", "Y");
- } else if (cnt.substr(i,1) != "" && cnt.substr(i,1)=="3") {
- model.setValue("/root/main/data[3]/check", "Y");
- } else if (cnt.substr(i,1) != "" && cnt.substr(i,1)=="4") {
- model.setValue("/root/main/data[4]/check", "Y");
- } else if (cnt.substr(i,1) != "" && cnt.substr(i,1)=="5") {
- model.setValue("/root/main/data[5]/check", "Y");
- } else if (cnt.substr(i,1) != "" && cnt.substr(i,1)=="6") {
- model.setValue("/root/main/data[6]/check", "Y");
- }
- }
- model.refresh();
- }
- ]]>
- </script>
- </model>
- </xhtml:head>
- <xhtml:body pagewidth="350" pageheight="343" guideline="2,13;1,1194;2,784;2,757;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="grp_biz" scroll="auto" style="left:10px; top:0px; width:301px; height:206px; ">
- <caption id="caption1" class="tit_2" style="left:5px; top:11px; width:135px; height:13px; ">식사횟수관리</caption>
- <line id="line1" class="line_1" style="x1:0px; y1:26px; x2:300px; y2:26px; "/>
- <datagrid id="grd_data" nodeset="/root/main/data" caption="선택^코드^식사횟수" colsep="^" colwidth="40, 40, 130" dataheight="25" extendlastcol="scroll" mergecells="byrow" rowheader="seq" rowheight="25" rowsep="|" style="left:0px; top:31px; width:300px; height:175px; text-align:center; ">
- <col checkvalue="Y,N" ref="check" type="checkbox"/>
- <col ref="code" visibility="hidden"/>
- <col ref="cnt"/>
- </datagrid>
- </group>
- <group id="grp_btn" scroll="auto" style="left:0px; top:221px; width:310px; height:27px; ">
- <button id="btn_cfm" class="btn4_letter2" style="left:195px; top:5px; width:56px; height:22px; ">
- <caption>확인</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var check = "";
- var val = "";
- for ( i = 1; i <= 6; i++ ) {
- check = model.getValue("/root/main/data["+ i +"]/check");
- if (check=="Y") {
- val += model.getValue("/root/main/data["+ i +"]/code");
- val = val + "^";
- }
- }
- if ( val != "" ) {
- val = val.substr(0, val.length-1);
- }
- var row = opener.grd_mealprcpcd.row - 1;
- opener.model.setValue("/root/main/mealprcpcd/data["+ row +"]/cnt", val);
- //opener.model.refresh();
- window.close();
- ]]>
- </script>
- </button>
- <button id="btn_can" class="btn4_letter2" style="left:254px; top:5px; width:56px; height:22px; ">
- <caption>취소</caption>
- <script type="javascript" ev:event="xforms-activate">
- <![CDATA[
- window.close();
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|