123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758 |
- /**
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- 진료 - XSLT ( SSMRF001200.xrw - JScript )
-
- * Version :
- - Ver.1.00.01
-
- * 개발자: 이경희
-
- * 최초작성일:
- - 2008/02/28
-
- * 수정이력:
- 2009-01
- - fDrawHTMLImge 함수 수정
-
- 2008-12-29
- - getNewXSLTStyleVal() 함수 내에 SSL 체크루틴 삭제
- - fDrawHTMLImge() 함수 내에 가계도 스타일정보 수정
-
- 2008-12-24
- - getNewXSLTStyleVal() 함수 수정
- (- 컨트롤에서 폰트 설정을 가져올때 '#' 문자 처리 추가
- - Border-Width 속성이 들어간 경우 vertical-align 속성 추가.)
-
- 2008-12-22
- - fDrawHTMLGrd() 함수내 그리드 타입이 X, T 인 경우 빈공간 처리 추가
- (GetDegnitemnmTrans() 함수 추가)
-
- 2008-12-19
- - getNewXSLTStyleVal() 함수 실행시 컨트롤이 그리드인 경우 Style 좌표의 height는 ctrlheight로 변경
- - getImgXSLTStyleVal() 함수 생성.
-
- 2008-12
- - 테이블에 Style 좌표 삽입
-
- 2008-11-28
- - CAL 아이템 생성시 파라미터 변경
- - LBL 생성시 label.width, height 좌표 조건 변경
- - 배경색이 있는 RCT 생성시 좌표 수정
-
- - 확장컨트롤 생성시 extn.border-style, width 속성을 기본으로 추가함
- - getPreXSLTStyle() 파라미터 변경(ctrl.width 값이 없는 경우 width:px로 떨어지는 문제점)
-
- 2008-11-27
- - AddBorderStyle() 함수 수정.
- - STX 아이템 생성시 좌표 파라미터 수정(parseInt(ctrlPosition.width) -> 0)
- - getXSLTStyleVal() 함수에 ISU 아이템 추가.
- - LBL 아이템 생성시 Border-Style을 없애고, left, top좌표를 모두 0으로 변경
- - ********** STX 아이템 생성시 패턴이 있는 경우 format-number를 사용함. ********* ==> 당분간 삭제
- (기존에 저장된 값이 19.6139383202.. 이고 패턴이 '##.99' 인 경우 소수점 3째자리에서 반올림된 값이 나타남.
- 저장된 값이 패턴의 자리수와 동일한 경우는 그대로 표현됨.)
-
- 2008-11-26
- - STX 아이템의 단위 표현시 위치 수정(Div태그를 추가)
- - STX 아이템의 확장컨트롤 표현 시 좌표가 맞지 않는 부분을 수정
- - SSL의 확장컨트롤 표현 시 Border-Style을 sunken으로 수정
-
- 2008-11-24
- - STX 아이템를 MTX처럼 동일하게 만듬.(Div태그를 추가)
- - STX 아이템 normalize-space를 추가
- - LBL 아이템에 Div태그를 추가.(엔터없이 내용을 입력한 경우 줄바꿈이 되지 않는 문제)
-
- 2008-11-21
- - 단위 태그를 DIV => PRE로 변경
- - MTX 아이템 생성시 Pre 태그에 BoederStyle 정보 추가
- - CMB 아이템 생성시 Pre 태그에 BoederStyle 정보 추가
-
- 2008-11-20
- - MTX 아이템 생성시 Pre 태그에도 좌표정보를 추가
- 추가 함수(getPreXSLTStyle)
-
- 2008-11-14
- - X축 그리드의 컬럼에 2줄이 있을 경우 한줄로 보이던 문제점 수정
- - 일반 테이블의 컬럼이 기록된 줄만 보이던 문제점 수정
- - 콤보의 rectermnm 에 normalize-space() 사용
-
- 2008-11-12
- - STX/MTX 아이템이 디자인속성에 border-style:solid 속성이 없는 경우 기본으로 넣어주도록 수정
- 추가 함수(fCheckDefaultDegnAttr)
-
- 2008-11-12
- - 서식내에 Y축 누적 그리드가 있는 경우 간격 조정 로직 추가
-
- 2008-11-10
- - Y축 누적 그리드(그리드타입:Y) 수정
-
- 2008-11-08
- - 그리드 생성시 정렬 태그 수정
- - X축 누적 그리드 수정
-
- 2008-11-07
- - BOL 아이템의 디자인아이템명에 '&' 기호가 들어간 서식의 경우 뷰어에서 보이지 않던 문제점 수정(해당 서식 재저장 필요)
-
- 2008-10-30
- - 모든 그리드(진단명, 주호소, 수술명, 기타 그리드)의 경우 그리드내용 미입력 시
- Height 사이즈가 서식디자인에서 지정한 컨트롤의 사이즈에 맞추어 나오던 문제 수정
- - 진단명 수정(R/O, 주진단 조건)
-
- 2008-10-28
- - 진단명에서 주진단이 체크되지 않는 부분 수정
- - 수술명에서 수술코드가 나오는 부분 삭제
- - 그리드 및 진단명, 주호소, 수술명에서 컬럼이 가운데 정렬이 되지 않던 문제 수정
-
- 2008-10-27
- - STX 아이템 표현 시 디자인아이템명의 길이에 따라 INPUT아이템의 좌표가 옮겨지도록 수정
- - Radio 버튼 미 작성시 Radio 버튼이 아예 보이지 않는 현상 수정
-
- 2008-10-24
- - RDO 확장컨트롤 위치 수정
- - X축 누적 입력width 수정
-
- 2008-10-23
- - 주호소란에서 주호소 코드가 나오는 부분 삭제
- - 진단명의 진단코드가 나오는 컬럼 삭제
- - 디자인 레벨이 1인 아이템의 경우 굵게 설정
-
- 2008-10-22
- - CHK 아이템의 체크박스에 체크한 부분이 나타나지 않는 문제점 수정
- - CHK 아이템의 체크박스 확장 컨트롤의 좌표 수정
- - MSL_SSU 아이템의 체크박스 확장 컨트롤에 값이 나오지 않는 문제 수정
-
- 2008-10-16
- - 선 두께 미지정 시 1px로 설정
- - STX컨트롤에 단위가 붙은 경우 단위 띄어쓰기 수정(space 2칸 적용)
- - 이미지 사이즈 수정
- - 가계도 이미지 지원
- - 숨긴 컨트롤(Width, Height 가 모두 0 또는 1인 컨트롤)은 안보이게 수정
- - 단위 컨트롤(Width, Height 가 모두 0 또는 1인 컨트롤)도 안보이도록 수정
- - 그리드 타입(T)인 경우 수정.
-
- 2008-10-15
- - 진단명 수정(R/O, 주 모두 체크가 안된 경우 문제점이 발견되어 수정)
- - 숨긴 컨트롤(Width, Height 가 모두 0 인 컨트롤)은 안보이게 수정
-
- 2008-10-10
- - rdo, sel 컨트롤에 title 삭제
- - css 수정 com->emr
-
- * 기타:
-
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- */
- var sXSLTInfo = "";
- var sDivHeight = 0;
- var sDivWidth = 0;
- // Match Template 배열
- var g_MatchTemplate = new Array();
- // 그리드 컬럼 기본 width
- //var g_Base_GrdColWidth = 53;
- var g_Base_GrdColWidth = 100;
- var g_Base_GrdColHeight = 23;
- // 이전 아이템에 Y축 누적 그리드 아이템이 있을 경우 ctrl.top 좌표에 추가로 더해주는 값.
- var g_PrevCtrlItemHeightSum = 0;
- var g_PrevCtrlItemHeight = 0;
- var g_PrevCtrlItemTop = 0;
- //var g_PrevItemCnt = 0;
- var g_PrevItemGrdTypeY = false;
- var g_PreDegnitemKind = "";
- /**
- * @desc : 위치정보를 변수에 저장
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function Position(xObj, yObj, widthObj, heightObj){
- this.x = xObj;
- this.y = yObj;
- this.width = widthObj;
- this.height = heightObj;
- }
- /**
- * @desc : Empty XSLT 디자인 생성
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fCreateXSLTDegnBySelfInfo()
- {
- // 초기화
- g_PrevItemGrdTypeY = false;
- g_PrevCtrlItemHeightSum = 0;
- g_PrevCtrlItemHeight = 0;
- g_PrevCtrlItemTop = 0;
-
- for(var tidx = 0; tidx < g_MatchTemplate.length; tidx++)
- {
- g_MatchTemplate[tidx] = "";
- }
-
- var formnm = model.getValue(g_pageInfo.formmastRef + "/formnm");
- //model.getValue("");
-
- g_pageInfo = new PAGEINFO();
- sXSLTInfo = "<?xml version=\"1.0\" encoding=\"euc-kr\"?>\n";
- sXSLTInfo += "<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" version=\"1.0\">\n";
- sXSLTInfo += "<xsl:template match=\"/\">\n";
- sXSLTInfo += "<html>\n";
- sXSLTInfo += "\t<head>\n";
- if(formnm != "")
- sXSLTInfo += "\t\t<title><![CDATA[" + formnm + "]]></title>\n";
- else
- sXSLTInfo += "\t\t<title>Preview</title>\n";
- sXSLTInfo += getStyleCss();
- sXSLTInfo += "\t</head>\n";
- sXSLTInfo += "\t<body>\n";
- //sXSLTInfo += "\t\t<div id=\"page\" style=\"position:absolute; top:5px; border-style:solid; border-width:1px;\">\n";
- sXSLTInfo += "\t\t<div id=\"page\" style=\"position:absolute; width:680px; top:5px;\">\n";
-
- var itemcnt = getNodesetCnt(model, g_pageInfo.formdegnRef);
- var prevrowno = 0;
- // var ctrlSize = new SIZE(0, 0);
- var ctrlPosition = new Position(0, 0, 0, 0);
- var prevypos = g_pageInfo.curypos;
- for(var i=1; i<= itemcnt; i++)
- {
- var degnitemcd = model.getValue(g_pageInfo.formdegnRef + "[" + i + "]/degnitemcd");
- var degnitemno = model.getValue(g_pageInfo.formdegnRef +"[" + i + "]/degnitemno");
- var supdegnitemno = model.getValue(g_pageInfo.formdegnRef +"[" + i + "]/supdegnitemno");
- var degnitemkind = model.getValue(g_pageInfo.formdegnRef +"[" + i + "]/degnitemkind");
- var degnitemnm = model.getValue(g_pageInfo.formdegnRef +"[" + i + "]/degnitemnm");
- var degnitemlevlno = model.getValue(g_pageInfo.formdegnRef +"[" + i + "]/degnitemlevlno");
- var degncntrviewflag = model.getValue(g_pageInfo.formdegnRef +"[" + i + "]/degncntrviewflag");
- var instcd = model.getValue(g_pageInfo.formdegnRef +"[" + i + "]/instcd");
- var degnitemlevlcd = model.getValue(g_pageInfo.formdegnRef +"[" + i + "]/degnitemlevlcd");
- var unitnm = model.getValue(g_pageInfo.formdegnRef +"[" + i + "]/unitnm");
- var degnxval = model.getValue(g_pageInfo.formdegnRef +"[" + i + "]/degnxval");
- var degnrowno = model.getValue(g_pageInfo.formdegnRef +"[" + i + "]/degnrowno");
- var itemuseflag = model.getValue(g_pageInfo.formdegnRef +"[" + i + "]/itemuseflag");
- var itemattrval = model.getValue(g_pageInfo.formdegnRef + "[" + i + "]/itemattrval");
- var degnattrval = model.getValue(g_pageInfo.formdegnRef + "[" + i + "]/degnattrval");
-
- if ( getStyleValue(degnattrval, "ctrl._printable") == "false" )
- continue;
-
- if(degnitemkind == "GSU" || degnitemkind == "SSU" || degnitemkind == "ISU")
- continue;
-
- if(degnitemkind == "FRM" && itemuseflag != "F0")
- continue;
-
- // degn X좌표가 없는 경우
- if(degnxval == '')
- degnxval = (parseInt(degnitemlevlno) - 1) * g_pageInfo.indentwidth;
-
- // 디자인아이템 번호가 이전과 다른 경우
- if(degnrowno != prevrowno)
- {
- g_pageInfo.curxpos = g_pageInfo.leftmargin + parseInt(degnxval);
- g_pageInfo.rowheight = 20;
- }
- else
- g_pageInfo.curypos = prevypos;
-
- var sDivEndTag = null;
-
- if(degnitemkind != "LNE" && degnitemkind != "RCT" && degnitemkind != "RRT" && degnitemkind != "ELL")
- {
- //fDrawHTMLDIV(i);
- //sDivEndTag = "\t\t\t</div>\n";
- }
-
- if(degnitemkind == "RCT")
- {
- fDrawHTMLObject(i);
- //sDivEndTag = "\t\t\t</div>\n";
- //sDivEndTag = null;
- }
-
- var visible = "visible";
-
- if(degncntrviewflag == "A" || degncntrviewflag == "L") // 컨트롤 보기값이 전체, 라벨
- visible = "visible";
- else
- visible = "hidden";
-
- // caption 처리
- if(visible == "visible" && degnitemkind != "FRM" && degnitemkind != "LBL" &&
- degnitemkind != "LNE" && degnitemkind != "RCT" && degnitemkind != "RRT" &&
- degnitemkind != "ELL" && degnitemkind != "BOL")
- ctrlPosition = fDrawHTMLCap(0, 0, i,"label");
-
- if(degncntrviewflag == "L")
- {
- prevypos = g_pageInfo.curypos;
- prevrowno = degnrowno;
- g_pageInfo.curxpos += parseInt(g_pageInfo.offsetx) + sDivWidth;
- g_pageInfo.curypos += parseInt(g_pageInfo.offsety) + sDivHeight;
-
- if(sDivEndTag != null){
- sXSLTInfo += sDivEndTag;
- }
- //g_PreDegnitemKind = degnitemkind;
- continue;
- }
-
- switch(degnitemkind)
- {
- case "RDO":
- case "CHK" :
- if(ctrlPosition != null)
- ctrlPosition = fDrawHTMLRdo(ctrlPosition.width+g_pageInfo.offsetx, 0, i); // O
- break;
- case "CMB" :
- if(ctrlPosition != null)
- ctrlPosition = fDrawHTMLCmb(parseInt(ctrlPosition.width) +g_pageInfo.offsetx, 0, i); // O
- break;
- case "MTX":
- if(ctrlPosition != null)
- ctrlPosition = fDrawHTMLMtx(parseInt(ctrlPosition.width) +g_pageInfo.offsetx, 0, i);
- break;
- case "STX" :
- // 2008-11-08
- // 파라미터 변경 parseInt(ctrlPosition.width) +g_pageInfo.offsetx -> parseInt(ctrlPosition.left)
- // 테스트 서식(BPPV 치료기록, Systemic Sclerosis)
- if(ctrlPosition != null)
- ctrlPosition = fDrawHTMLStx(0, 0, 100, ctrlPosition.height, i, "ctrl"); // O
- //ctrlPosition = fDrawHTMLStx(parseInt(ctrlPosition.width), 0, 100, ctrlPosition.height, i, "ctrl"); // O
- //ctrlPosition = fDrawHTMLStx(parseInt(ctrlPosition.width) +g_pageInfo.offsetx, 0, 100, ctrlPosition.height, i, "ctrl"); // O
- break;
- case "CAL" :
- if(ctrlPosition != null)
- ctrlPosition = fDrawHTMLStx(g_pageInfo.offsetx, 0, 100, ctrlPosition.height, i, "ctrl");
- //ctrlPosition = fDrawHTMLStx(parseInt(ctrlPosition.width) +g_pageInfo.offsetx, 0, 100, ctrlPosition.height, i, "ctrl");
- break;
- case "MSK" :
- if(ctrlPosition != null)
- ctrlPosition = fDrawHTMLMsk(parseInt(ctrlPosition.width) +g_pageInfo.offsetx, 0, 100, ctrlPosition.height, i);
- break;
- case "IMG" :
- if(ctrlPosition != null)
- ctrlPosition = fDrawHTMLImge(0, 0, i);
- break;
- case "GRD" :
- if(ctrlPosition != null)
- ctrlPosition = fDrawHTMLGrd(0, ctrlPosition.height + g_pageInfo.offsety, i);
- break;
- case "LBL":
- if(ctrlPosition != null)
- ctrlPosition = fDrawHTMLCap(0, 0, i, "label");
- break;
- case "LNE":
- break;
- case "RCT":
- break;
- case "RRT":
- break;
- case "ELL":
- break;
- case "FRM" :
- break;
- case "FDG" :
- if(ctrlPosition != null)
- ctrlPosition = fDrawHTMLImge(0, 0, i);
- break;
- case "MSL" :
- case "SSL" :
- if(ctrlPosition != null)
- ctrlPosition = fDrawHTMLSel(parseInt(ctrlPosition.width) +g_pageInfo.offsetx, 0, i);
- break;
- case "BOL" :
- if(ctrlPosition != null)
- ctrlPosition = fDrawHTMLBool(parseInt(ctrlPosition.width) +g_pageInfo.offsetx, 0, i);
- break;
- case "DGN" ://진단명
- if(ctrlPosition != null)
- ctrlPosition = fDrawXSLTDiagName(0, ctrlPosition.height + g_pageInfo.offsety, i);
- break;
- case "OPN" ://수술명
- if(ctrlPosition != null)
- ctrlPosition = fDrawXSLTOpName(0, ctrlPosition.height + g_pageInfo.offsety, i);
- break;
- case "CCN" ://주호소
- if(ctrlPosition != null)
- ctrlPosition = fDrawXSLTCCName(0, ctrlPosition.height + g_pageInfo.offsety, i);
- break;
- }
-
- /*
- if(sDivEndTag != null){
- sXSLTInfo += sDivEndTag;
- }
- */
-
- if(degnitemkind != "LNE" && degnitemkind != "RCT" && degnitemkind != "RRT" && degnitemkind != "ELL")
- {
- prevypos = g_pageInfo.curypos;
- prevrowno = degnrowno;
- g_pageInfo.curxpos = parseInt(g_pageInfo.offsetx) + parseInt(sDivWidth) + 80;
-
- if(g_pageInfo.rowheight < parseInt(sDivHeight))
- g_pageInfo.rowheight = parseInt(sDivHeight);
-
- g_pageInfo.curypos += parseInt(g_pageInfo.offsety) + g_pageInfo.rowheight;
- }
- //g_PreDegnitemKind = degnitemkind;
- }
- sXSLTInfo += "\t\t</div>\n";
- sXSLTInfo += "\t</body>\n";
- sXSLTInfo += "</html>\n";
- sXSLTInfo += "</xsl:template>\n";
-
- for(var idx = 0; idx < g_MatchTemplate.length; idx++)
- {
- sXSLTInfo += g_MatchTemplate[idx];
- }
- sXSLTInfo += "</xsl:stylesheet>";
- return sXSLTInfo;
- }
- /**
- * @desc : DIV 생성
- * @
- * @param: 1) row - 줄
- * @return :
- * @---------------------------------------------------
- */
- function fDrawHTMLDIV(row)
- {
- var degnitemno = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemno");
- var degnattrval = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval");
- var degnitemkind = model.getValue(g_pageInfo.formdegnRef +"[" + row + "]/degnitemkind");
-
- var divid = "DIV_"+ degnitemno;
- var ctrlPosition = new Position(g_pageInfo.curxpos, g_pageInfo.curypos, 400, g_pageInfo.ctrlheight);
- var sStyle = "";
-
- sStyle = "style=\"position:absolute; left:0px; top:0px; border-style:none; \"";
-
- /*
- if(degnitemkind != "CHK" && degnitemkind != "RDO")
- sStyle = "style=\"position:absolute; left:0px; top:0px; border-style:none; \"";
- else
- sStyle = getXSLTStyleVal(ctrlPosition, degnattrval, "grp");
- */
- sXSLTInfo += "\t\t\t<div id=\""+divid+"\" "+sStyle+">\n";
- sDivWidth = ctrlPosition.width;
- sDivHeight = ctrlPosition.height;
- }
- /**
- * @desc : 선, 사각형, 둥근사각형, 타원 생성
- * @
- * @param: 1) row - 줄
- * @return :
- * @테스트 서식: 2640
- * @---------------------------------------------------
- */
- function fDrawHTMLObject(row)
- {
- var degnitemno = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemno");
- var degnattrval = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval");
- var degnitemkind = model.getValue(g_pageInfo.formdegnRef +"[" + row + "]/degnitemkind");
-
- var divid = "DIV_"+ degnitemno;
- var ctrlid = "";
-
- var ctrlPosition = new Position(g_pageInfo.curxpos, g_pageInfo.curypos, 400, g_pageInfo.ctrlheight);
-
- var sShapeStyle = ""; //getXSLTStyleVal(ctrlPosition, degnattrval, "ctrl");
-
- if(degnitemkind == "RCT")
- {
- ctrlid = "SHP_" + degnitemno;
- }
- else if(degnitemkind == "LNE")
- {
- ctrlid = "LINE" + degnitemno;
- }
-
- sShapeStyle = getShapeXSLTStyleVal(ctrlid, ctrlPosition, degnattrval, "ctrl");
-
- var preid= "RCT_" + degnitemno;
-
- sXSLTInfo += "\t\t\t\t<pre id=\""+preid+"\" "+ sShapeStyle +" ></pre>\n";
- /*
- sDivWidth = ctrlPosition.width;
- sDivHeight = ctrlPosition.height;
-
- var tmpLeft = getStyleValue(degnattrval, "left", "ctrl");
- var tmpTop = getStyleValue(degnattrval, "top", "ctrl");
- var tmpWidth = getStyleValue(degnattrval, "width", "ctrl");
- var tmpHeight = getStyleValue(degnattrval, "height", "ctrl");
-
- sDivStyle = "style=\"position:absolute; left:" + tmpLeft + "px; top:" + tmpTop + "px; width:" + tmpWidth + "px; height:"+ tmpHeight + "px; border-style:solid; border-width:1; \"";
-
- sXSLTInfo += "\t\t\t<div id=\""+divid+"\" "+sDivStyle+">\n";
-
- if(isSearchString(degnattrval, "ctrl.border-style") == false)
- {
- degnattrval += "ctrl.border-style:solid;";
- }
-
- if(isSearchString(degnattrval, "ctrl.border-width") == false)
- {
- degnattrval += "ctrl.border-width:1;";
- }
-
- var sPreStyle = getPreXSLTStyle(null, ctrlPosition, degnattrval, "ctrl");
- var preid= "RCT_" + degnitemno;
-
- sXSLTInfo += "\t\t\t\t<pre id=\""+preid+"\" "+ sPreStyle +" ></pre>\n";
- */
- }
- function fDrawHTMLObject_old(row)
- {
- var degnitemno = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemno");
- var degnattrval = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval");
- var degnitemkind = model.getValue(g_pageInfo.formdegnRef +"[" + row + "]/degnitemkind");
-
- var divid = "DIV_"+ degnitemno;
-
- var ctrlPosition = new Position(g_pageInfo.curxpos, g_pageInfo.curypos, 400, g_pageInfo.ctrlheight);
-
- /*
- var sDivStyle = ""; //getXSLTStyleVal(ctrlPosition, degnattrval, "ctrl");
-
- sDivWidth = ctrlPosition.width;
- sDivHeight = ctrlPosition.height;
-
- var tmpLeft = getStyleValue(degnattrval, "left", "ctrl");
- var tmpTop = getStyleValue(degnattrval, "top", "ctrl");
- var tmpWidth = getStyleValue(degnattrval, "width", "ctrl");
- var tmpHeight = getStyleValue(degnattrval, "height", "ctrl");
-
- sDivStyle = "style=\"position:absolute; left:" + tmpLeft + "px; top:" + tmpTop + "px; width:" + tmpWidth + "px; top:"+ tmpHeight + "px; border-style:solid; border-width:1; \"";
- */
- if(isSearchString(degnattrval, "ctrl.border-style") == false)
- {
- degnattrval += "ctrl.border-style:solid;";
- }
-
- if(isSearchString(degnattrval, "ctrl.border-width") == false)
- {
- degnattrval += "ctrl.border-width:1;";
- }
-
- var sPreStyle = getXSLTStyleVal(ctrlPosition, degnattrval, "ctrl"); //getPreXSLTStyle(ctrlPosition, degnattrval, "ctrl");
- /*
- var ctrlLeft = "left:" + tmpLeft + "px";
- var ctrlTop = " top:" + tmpTop + "px";
-
- sPreStyle = sPreStyle.setReplaceWord(ctrlLeft, "left:0px");
- sPreStyle = sPreStyle.setReplaceWord(ctrlTop, "top:0px");
- */
- //position:absolute;
- //position:absolute; border-style:none;
- //sStyle = sStyle.setReplaceWord("position:absolute;", "position:absolute; border-style:none;");
- //sXSLTInfo += "\t\t\t<div id=\""+divid+"\" "+sDivStyle+">\n";
-
- /*
- sDivWidth = ctrlPosition.width;
- sDivHeight = ctrlPosition.height;
-
- var tmpWidth = getStyleValue(degnattrval, "width", "ctrl");
- var tmpHeight = getStyleValue(degnattrval, "height", "ctrl");
-
- var ctrlWidth = "width:" + tmpWidth + "px;";
- var ctrlHeight = " height:" + tmpHeight + "px;";
-
- sStyle = "style=\"position:absolute; left:0px; top:0px; " + ctrlWidth + ctrlHeight + "border-style:solid; border-width:1; \"";
- */
- var preid= "RCT_" + degnitemno;
-
- //sStyle = AddBorderStyle(sStyle, degnattrval, "label");
-
- sXSLTInfo += "\t\t\t\t<pre id=\""+preid+"\" "+ sPreStyle +" ></pre>\n";
-
- /*
- <div id="DIV_90" style="position:absolute; left:49px; top:50px; border-style:none ">
- <pre id="RCT_90" style="position:absolute; left:0px; top:0px; width:115px; height:22px; border-style:solid; border-width:1; "></pre>
- </div>
- */
- }
- /**
- * @desc : Pre 생성
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDrawHTMLCap( x, y, row, ctrltype)
- {
- var degnitemno = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemno");
- var degnitemnm = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemnm");
- var degnattrval = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval");
-
- var ctrlPosition = new Position(x,y,0,sDivHeight);
- ctrlPosition.width += fGetLblWidth(degnitemno, degnitemnm);
- if(ctrlPosition.width < 120)
- ctrlPosition.width = 120;
-
- /* if(ctrlSize.cx < g_pageInfo.ctrlwidth)
- ctrlSize.cx = g_pageInfo.ctrlwidth;
- else
- ctrlSize.cx += Math.round((10 - (ctrlSize.cx % 10)) / 10) * 10; */
-
- // 디자인 레벨이 1인 아이템의 속성에 Bold가 빠져있으면 추가
- var degnitemlevlno = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemlevlno");
-
- if(degnitemlevlno == "1")
- {
- if(isSearchString(degnattrval, "label.font-weight:bold") == false)
- {
- degnattrval += "label.font-weight:bold;";
- }
- }
-
- var captionid= "LBL_" + degnitemno;
-
- var sLBLDivStyle = getNewXSLTStyleVal(captionid, ctrlPosition, degnattrval, ctrltype);
-
- // 숨겨진 컨트롤 확인
- if(isSearchString(degnattrval, "label.width") == true || isSearchString(degnattrval, "label.height") == true)
- {
- var tmpWidth = getStyleValue(degnattrval, "width", "label");
- var tmpHeight = getStyleValue(degnattrval, "height", "label");
-
- if(tmpWidth == "" && tmpHeight == "")
- {
- return ctrlPosition;
- }
- else if(tmpWidth == "")
- {
- if(parseInt(tmpHeight) < 2)
- return ctrlPosition;
- }
- else if(tmpHeight == "")
- {
- if(parseInt(tmpWidth) < 2)
- return ctrlPosition;
- }
- else if(tmpWidth != "" && tmpHeight != "")
- {
- if(parseInt(tmpWidth) < 2 || parseInt(tmpHeight) < 2)
- {
- return ctrlPosition;
- }
- }
- }
- var sLBLPreStyle = sLBLDivStyle;
- /*
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Border-Style이 들어간 버전
- var sLBLPreStyle = sLBLDivStyle;
- var sLabelLeft = getStyleValue(degnattrval, "left", "label");
- var sLabelTop = getStyleValue(degnattrval, "top", "label");
-
- if(sLabelLeft != "")
- {
- var tmpLeft = "left:" + sLabelLeft + "px";
-
- sLBLPreStyle = sLBLPreStyle.setReplaceWord(tmpLeft, "left:0px");
- }
-
- if(sLabelTop != "")
- {
- var tmpTop = "top:" + sLabelTop + "px";
-
- sLBLPreStyle = sLBLPreStyle.setReplaceWord(tmpTop, "top:0px");
- }
- sLBLPreStyle = AddBorderStyle(sLBLPreStyle, degnattrval, "label");
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- */
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Div에 Border-Style 정보를 삭제
- var sLabelLeft = 0;
- var sLabelTop = 0;
- /*
- var sLabelLeft = getStyleValue(degnattrval, "left", "label");
-
- if(sLabelLeft == "")
- sLabelLeft = 0;
- else
- {
- sLabelLeft = parseInt(sLabelLeft);
- }
- var sLabelTop = getStyleValue(degnattrval, "top", "label");
-
- if(sLabelTop == "")
- sLabelTop = 0;
- else
- {
- sLabelTop = parseInt(sLabelTop);
- }
- */
-
- var sLabelWidth = getStyleValue(degnattrval, "width", "label");
-
- if(sLabelWidth == "")
- sLabelWidth = fGetLblWidth(degnitemno, degnitemnm);
- else
- {
- sLabelWidth = parseInt(sLabelWidth);
- }
-
- var sLabelHeight = getStyleValue(degnattrval, "height", "label");
-
- if(sLabelHeight == "")
- sLabelHeight = 20;
- else
- {
- sLabelHeight = parseInt(sLabelHeight);
- }
-
- var sLBLDivStyle = "style=\"position:absolute; left:" + sLabelLeft + "px; top:" + sLabelTop + "px; width:" + sLabelWidth + "px; height:" + sLabelHeight + "px; \"";
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- //var captionid= "LBL_" + degnitemno;
-
- /*
- if(isSearchString(degnitemnm, "\n") == true)
- {
- degnitemnm = degnitemnm.setReplaceWord("\n", "]]><br/><![CDATA[");
- }
- */
- // 2008-12-30 ( ) 안에 아이템이 들어가는 경우 공백에 따라 잘 맞지 않는 경우가 생김에 따라 '(' 또는 ')'를 변경해줌.
- if(isSearchString(degnitemnm, " \\( ") == true)
- degnitemnm = degnitemnm.setReplaceWord(" ( ", " ( ");
-
- if(isSearchString(degnitemnm, " \\) ") == true)
- degnitemnm = degnitemnm.setReplaceWord(" ) ", " ) ");
- // 텍스트가 MultiLine인 경우 정해진 좌표를 벗어나게 됨에 따라 Pre -> Div 태그로 변경함.
- sXSLTInfo += "\t\t\t\t<div id=\""+captionid+"\" "+ sLBLDivStyle +">\n"
- + "\t\t\t\t\t<pre id=\""+captionid+"\" "+ sLBLPreStyle +"><![CDATA["+degnitemnm+"]]></pre>\n";
- sXSLTInfo += "\t\t\t\t</div>\n";
-
- //sXSLTInfo += "\t\t\t\t<pre id=\""+preid+"\" "+ sStyle +" ><![CDATA["+degnitemnm+"]]></pre>\n";
- return ctrlPosition;
- }
- /**
- * @desc : Radio 버튼 생성
- * @
- * @param :
- * @return :
- *@history:
- 2008-10-21 인쇄시 체크박스 및 라디오버튼이 비활성화된 상태이기 때문에 인쇄가 흐릿하여 비활성화를 삭제함.
- 2008-10-22 체크박스된 recitem노드를 찾는 조건 변경
- * @---------------------------------------------------
- */
- function fDrawHTMLRdo( x, y, row)
- {
- var width = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval"), "width");
- if(width != "")
- width = parseInt(width);
-
- var height = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval"), "height");
- if(height != "")
- height = parseInt(height);
-
- if(width == "")
- width = 0;
- if(height == "")
- height = sDivHeight;
-
- var ctrlPosition = new Position(x, y, width, height);
- var cellspacing = 10; // 가로 간격 기본값
- var vcellspacing = 0; // 세로 간격 기본값
-
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Degnitemno => Degnitemlevlcd 로 변경
- var degnitemno = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemno");
- var degnitemlevlcd = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemlevlcd");
-
- var degnitemkind = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemkind");
- var valgrupcd = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/valgrupcd");
- var degnattrval = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval");
- var itemattrval = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/itemattrval");
- var ctrlid = "";
- var ctrlname = "";
-
- if(degnitemkind == "RDO")
- ctrlname = "type=\"radio\"";
- else if(degnitemkind == "CHK")
- ctrlname = "type=\"checkbox\"";
-
- var cnt = getNodesetCnt(model, g_pageInfo.vallistRef + "[grupcd='" + valgrupcd + "']");
- var cols = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval"), "cols");
-
- if(cols == "")
- cols = cnt;
-
- // 아이템 간격
- cellspacing = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval"), "ctrl.subcellspacing");
- vcellspacing = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval"), "ctrl.subvcellspacing");
-
- if(cellspacing == "")
- cellspacing = 0;
- if(vcellspacing == "")
- vcellspacing = 0;
-
- // 아이템 라벨 보이기/숨기기 옵션 확인
- var sLabelhidden = "on"; // 기본값 보이기
- if(isSearchString(degnattrval, "ctrl.sublabel") == true)
- {
- sLabelhidden = getStyleValue(degnattrval, "ctrl.sublabel");
- }
- var sLabel = "";
- var sValue = "";
- var lineWidth = 0;
- var lineHeight = 0;
- var sComStyle = getXSLTStyleVal(ctrlPosition, degnattrval, degnitemkind);
-
- ctrlid = degnitemkind + "_" + degnitemno;
-
- var sTmpComStyle = getSelXSLTStyleVal(ctrlid, ctrlPosition, degnattrval, degnitemkind);
- var sStyle = "";
- var sFontStyle = "";
- var sLastStyle = "";
- var tmplineWidth = 0;
- var tmpValueWidth = 0;
-
- var strRdoStyle = new Array(2);
- // position
- var sLeft = "";
- var sTop = "";
- var sWidth = "";
- var sHeight = "";
- var sCols = false;
- var sRows = false;
-
- if(document.controls(ctrlid) != null)
- {
- sLeft = document.controls(ctrlid).attribute("left");
- sTop = document.controls(ctrlid).attribute("top");
- sWidth = document.controls(ctrlid).attribute("width");
- sHeight = document.controls(ctrlid).attribute("height");
-
- sCols = document.controls(ctrlid).attribute("cols");
- sRows = document.controls(ctrlid).attribute("rows");
-
- // FontName
- var fontfamilyArr = document.controls(ctrlid).attribute("font-family").split(",");
-
- if(fontfamilyArr.length > 0)
- {
- sFontStyle += getXSLTCtrlAttribute("font-family", fontfamilyArr[0]);
- }
- else
- sFontStyle += getXSLTCtrlAttribute("font-family", getStyleValue(degnattrval, "font-family", sCtrlType));
-
- // FontSize
- var fontSize = document.controls(ctrlid).attribute("font-size");
-
- if(fontSize != "")
- sFontStyle += getXSLTCtrlAttribute("font-size", (parseInt(fontSize) - 3));
- else
- sFontStyle += getXSLTCtrlAttribute("font-size", "9");
-
- sFontStyle += getXSLTCtrlAttribute("font-weight", document.controls(ctrlid).attribute("font-weight"));
- sFontStyle += getXSLTCtrlAttribute("font-style", document.controls(ctrlid).attribute("font-style"));
- sFontStyle += getXSLTCtrlAttribute("text-decoration", document.controls(ctrlid).attribute("text-decoration"));
-
- var fontColor = document.controls(ctrlid).attribute("color");
- if(fontColor != "")
- {
- if(fontColor.charAt(0) != "#")
- sFontStyle += getXSLTCtrlAttribute("color", "#" + fontColor);
- else
- sFontStyle += getXSLTCtrlAttribute("color", fontColor);
- }
- }
- else
- {
- sLeft = getStyleValue(degnattrval, "left", sCtrlType);
- sTop= getStyleValue(degnattrval, "top", sCtrlType);
- sWidth = getStyleValue(degnattrval, "width", sCtrlType);
- sHeight = getStyleValue(degnattrval, "height", sCtrlType);
-
- sFontStyle += getXSLTCtrlAttribute("font-family", getStyleValue(degnattrval, "font-family", sCtrlType));
-
- var fontSize = getStyleValue(degnattrval, "font-size", sCtrlType);
-
- if(fontSize != "")
- sFontStyle += getXSLTCtrlAttribute("font-size", (parseInt(fontSize) - 3));
- else
- sFontStyle += getXSLTCtrlAttribute("font-size", "9");
-
- sFontStyle += getXSLTCtrlAttribute("font-weight", getStyleValue(degnattrval, "font-weight", sCtrlType));
- sFontStyle += getXSLTCtrlAttribute("font-style", getStyleValue(degnattrval, "font-style", sCtrlType));
- sFontStyle += getXSLTCtrlAttribute("text-decoration", getStyleValue(degnattrval, "text-decoration", sCtrlType));
- sFontStyle += getXSLTCtrlAttribute("color", getStyleValue(degnattrval, "color", sCtrlType));
- }
- if(sLeft == "") sLeft = ctrlPosition.x;
- else{
- sLeft = parseInt(sLeft);
- ctrlPosition.x = sLeft;
- }
-
- if(sTop=="")
- sTop = ctrlPosition.y;
- else{
- sTop = parseInt(sTop);
- ctrlPosition.y = sTop;
- }
-
- for(var i =0; i< cnt; i++)
- {
- sLabel = model.instances(0).selectNodes(g_pageInfo.vallistRef +"[grupcd='" + valgrupcd + "']/valitemnm").item(i).text;
- sValue = model.instances(0).selectNodes(g_pageInfo.vallistRef +"[grupcd='" + valgrupcd + "']/valcd").item(i).text;
-
- ctrlid = degnitemkind + "_" + degnitemno+"_"+ i;
-
- //strRdoStyle = getSelSSUXSLTStyleVal(degnitemkind + "_" + degnitemno, ctrlPosition, degnattrval, degnitemkind);
-
- if(degnitemkind == "RDO")
- {
- sXSLTInfo += "\t\t\t\t<xsl:choose>\n";
- sXSLTInfo += "\t\t\t\t\t<xsl:when test=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcd + "']/rectermcd = '" + sValue + "'\">\n";
- }
- else
- {
- sXSLTInfo += "\t\t\t\t<xsl:choose>\n";
- sXSLTInfo += "\t\t\t\t\t<xsl:when test=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcd + "' and rectermcd='" + sValue + "']/rectermnm[not(.='')]\">\n";
- }
-
- //sStyle = sComStyle + "left:"+(parseInt(ctrlPosition.x)+lineWidth) +"px; top:"+ ctrlPosition.y +"px; \"";
- sStyle = sComStyle + "left:"+(parseInt(sLeft)+lineWidth) +"px; top:"+ sTop +"px; \"";
-
- sXSLTInfo += "\t\t\t\t\t\t<input " + ctrlname + " id=\"" + ctrlid + "\" "+sStyle+" value=\"" + sValue + "\" checked = \"true\" />\n";
- sXSLTInfo += "\t\t\t\t\t</xsl:when>\n";
-
- sXSLTInfo += "\t\t\t\t\t<xsl:otherwise>\n";
- sXSLTInfo += "\t\t\t\t\t\t<input "+ctrlname+" id=\""+ctrlid+"\" "+ sStyle +" value=\""+sValue+ "\" /> \n";
- sXSLTInfo += "\t\t\t\t\t</xsl:otherwise>\n";
- sXSLTInfo += "\t\t\t\t</xsl:choose>\n";
-
- // RDO 및 CHK컨트롤 간격을 20px 줌..
- //lineWidth += 20;
- lineHeight += 15;
- lineWidth += 15;
- //sStyle = sComStyle + "top:"+ctrlPosition.y+"px; left:"+(parseInt(ctrlPosition.x)+lineWidth)+"px;\"";
- sStyle = sComStyle + "left:"+ (parseInt(sLeft)+lineWidth) +"px; top:"+ sTop +"px;\"";
-
- if(sLabelhidden == "off") {
- sLabel = " ";
- }
- sXSLTInfo += "\t\t\t\t<pre id=\""+ctrlid+"\" "+ sStyle +"><![CDATA["+sLabel+"]]></pre>\n";
-
- var ctrlSpace = parseInt(fGetLblWidth(degnitemno, sLabel)) + parseInt(cellspacing);
- lineWidth += ctrlSpace;
-
- tmplineWidth = lineWidth;
- if((i + 1) % cols == 0)
- {
- if(ctrlPosition.width < lineWidth)
- ctrlPosition.width = lineWidth;
- lineWidth = 0;
- tmpValueWidth = fGetLblWidth(degnitemno, sLabel);
-
- if(vcellspacing > 0)
- {
- sTop += parseInt(vcellspacing);
- }
- }
-
- // 체크박스 아이템이 한줄이 가득차 다음줄로 넘김.
- if(cols != cnt)
- {
- // 다음줄로 넘기되 마지막 체크박스 아이템이 확장컨트롤을 가진경우
- // 확장컨트롤만 다음줄로 넘어가는 경우를 방지하기 위해 마지막 체크 아이템인 경우 생략함.
- if( (i+1) < cnt && ((i+1) % cols) == 0)
- //ctrlPosition.y += g_pageInfo.ctrlheight;
- //sTop += g_pageInfo.ctrlheight;
- sTop += 15; // 세로로 컨트롤을 그릴때 간격을 15로 수정.
-
- // 마지막 체크 아이템의 확장 컨트롤의 가로 좌표 보정
- if((i+1) == cnt && degnitemkind == "CHK")
- {
- if(((i+1) % cols) == 0)
- ctrlPosition.x += (fGetLblWidth(degnitemno, sLabel) + cellspacing);
- else
- ctrlPosition.x -= (fGetLblWidth(degnitemno, sLabel) + cellspacing);
- }
- }
- }
- //sLastStyle = sComStyle + "top:"+ctrlPosition.y+"px; left:"+(parseInt(ctrlPosition.x)+lineWidth)+"px;\"";
-
- // 확장 컨트롤 좌표 처리
- if(degnitemkind == "RDO")
- sLastStyle = sComStyle + "top:"+ctrlPosition.y+"px; left:"+(parseInt(ctrlPosition.x)+tmplineWidth)+"px;\"";
- else
- sLastStyle = sComStyle + "top:"+ctrlPosition.y+"px; left:"+(parseInt(ctrlPosition.x)+lineWidth)+"px;\"";
-
- ctrlPosition.width += ctrlPosition.x;
-
- if(cols == "0")
- ctrlPosition.height = g_pageInfo.ctrlheight;
- else
- ctrlPosition.height = (Math.ceil(cnt / cols) * 15) + Math.ceil(cnt / cols) + 2;
-
- sDivWidth = ctrlPosition.x + parseInt(ctrlPosition.width);
-
- if(ctrlPosition.height > sDivHeight) sDivHeight = ctrlPosition.height;
-
- g_pageInfo.curxpos += parseInt(ctrlPosition.width) +g_pageInfo.offsetx;
-
- if(getStyleValue(itemattrval, "extn") == "visible")
- {
- var top = ctrlPosition.height - 15;
- if(top < 0)
- top = 0;
- //fDrawHTMLStx(parseInt(ctrlPosition.width) +g_pageInfo.offsetx, top, 100, 20, row, "extn");
- var extnWidth = 0;
- extnWidth = getStyleValue(degnattrval, "width", "extn");
- var extnHeight = 0;
- extnHeight = getStyleValue(degnattrval, "height", "extn");
-
- if(lineWidth == 0)
- lineWidth = (tmplineWidth -tmpValueWidth); //;
-
- fDrawHTMLStx(degnitemkind == "RDO" ? (parseInt(ctrlPosition.x)+tmplineWidth) : (parseInt(ctrlPosition.x)+lineWidth), ctrlPosition.y, extnWidth != 0 ? extnWidth : 100 , extnHeight != 0 ? extnHeight : 20, row, "extn");
- }
- return ctrlPosition;
- }
-
- /**
- * @desc : input 박스 생성
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDrawHTMLStx(x, y, cx, cy, row, ctrltype)
- {
- var width = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval"), "width");
- if(width != "")
- width = parseInt(width);
-
- var height = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval"), "height");
- if(height != "")
- height = parseInt(height);
-
- if(width == "")
- width = cx;
-
- if(height == "")
- height = cy;
-
- if(ctrltype == null)
- ctrltype = "ctrl";
-
- var ctrlPosition = new Position(x, y, width, height);
-
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Degnitemno => Degnitemlevlcd 로 변경
- var degnitemno = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemno");
- var degnitemlevlcd = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemlevlcd");
-
- var degnitemnm = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemnm");
- var degnattrval = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval");
- var degnitemkind = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemkind");
- var degnitemlevlcd = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemlevlcd");
- var unitnm = model.getValue(g_pageInfo.formdegnRef + "[degnitemlevlcd = '" + degnitemlevlcd + "']/unitnm"); // 단위명
- var itemattrval = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/itemattrval");
-
- var supdegnitemno = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/supdegnitemno");
- var supdegnitemkind = model.getValue(g_pageInfo.formdegnRef + "[degnitemno = '" + supdegnitemno + "']/degnitemkind");
- var suprectermcd = model.getValue(g_pageInfo.formdegnRef + "[degnitemkind='SSU' and degnitemno='" + degnitemno + "' and supdegnitemno='"+ supdegnitemno +"']/termcd");
-
- var ctrlid = "STX_" + degnitemno;
- var ref = g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcd + "']/reccnts";
-
- degnattrval = fCheckDefaultDegnAttr(model, degnattrval, "STX", row);
-
- var Pattern = "";
- if(isSearchString(degnattrval, "ctrl.format") == true)
- {
- var roundmode = "";
- var roundpos = "";
-
- if(document.controls(ctrlid) != null)
- {
- roundmode = document.controls(ctrlid).attribute("roundmode");
- roundpos = document.controls(ctrlid).attribute("roundposition");
- }
- else
- {
- roundmode = getStyleValue(degnattrval, "roundmode", "ctrl");
- roundpos = getStyleValue(degnattrval, "roundposition", "ctrl");
- }
-
- if(roundmode != "" && roundpos != "")
- Pattern = getPatternXSLTStyleVal(ctrlid, ctrlPosition, degnattrval, ctrltype);
- }
-
- if(supdegnitemkind == "SSL")
- {
- ref = g_pageInfo.xsltRecinfoRecitemRef + "[rectermcd='"+ suprectermcd +"' and degnitemno='" + supdegnitemno + "']/reccnts";
- }
- else if(supdegnitemkind == "MSL")
- {
- var mslctrl = document.controls("SSU_" + degnitemno);
- var colno = mslctrl.attribute("colno");
- ref = g_pageInfo.xsltRecinfoRecitemRef + "[degnitemno='" + supdegnitemno + "' and colno = '" + colno + "']/reccnts";
- }
- else if(supdegnitemkind == "IMG")
- {
- ref = g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcd + "']/reccnts";
- }
-
- ctrlPosition.width = g_pageInfo.ctrlwidth;
- //ctrlPosition.width += fGetLblWidth(degnitemno, degnitemnm);
-
- if(ctrltype == "extn")
- {
- ctrlid = "STX_" + degnitemno;
-
- // 2008-11-28
- // extn.visible 인 것들은 아이템 구분없이 extn.border-style값이 없는건 기본으로 extn.border-style:solid 속성을 추가
- if(isSearchString(itemattrval, "extn:visible") == true)
- {
- if(isSearchString(degnattrval, "extn.border-style") == false)
- {
- degnattrval += "extn.border-style:solid;";
- }
-
- if(isSearchString(degnattrval, "extn.border-width") == false)
- {
- degnattrval += "extn.border-width:1;";
- }
- }
- }
-
- //var sStyle = getXSLTStyleVal(ctrlPosition, degnattrval, ctrltype);
- var sStyle = getNewXSLTStyleVal(ctrlid, ctrlPosition, degnattrval, ctrltype);
-
- //sStyle = AddBorderStyle(sStyle, degnattrval, ctrltype);
-
- // 숨겨진 단위 컨트롤 확인
- var UnitDivStyle = "";
- var UnitPreStyle = "";
- var unitid = "UNIT_" + degnitemno;
-
- //var sPreStyle = getPreXSLTStyle(ctrlPosition, degnattrval, ctrltype);
- var sPreStyle = getPreXSLTStyle(ctrlid, ctrlPosition, degnattrval, ctrltype);
-
- //sPreStyle = AddBorderStyle(sPreStyle, degnattrval, ctrltype);
-
- if(unitnm != "")
- {
- var tmpLeft = "";
- var tmpTop = "";
- var tmpWidth = "";
- var tmpHeight = "";
-
- if(document.controls(unitid) != null)
- {
- tmpLeft = parseInt(document.controls(unitid).attribute("left"));
- tmpTop = parseInt(document.controls(unitid).attribute("top"));
- tmpWidth = parseInt(document.controls(unitid).attribute("width"));
- tmpHeight = parseInt(document.controls(unitid).attribute("height"));
- }
- else
- {
- tmpLeft = parseInt(getStyleValue(degnattrval, "left", "unit"));
- tmpTop = parseInt(getStyleValue(degnattrval, "top", "unit"));
- tmpWidth = parseInt(getStyleValue(degnattrval, "width", "unit"));
- tmpHeight = parseInt(getStyleValue(degnattrval, "height", "unit"));
- }
- // 단위를 숨기지 않았는지 확인.
- //if(isSearchString(degnattrval, "unit.width") == true || isSearchString(degnattrval, "unit.height") == true)
- //{
- if(tmpWidth < 2 || tmpHeight < 2)
- {
- unitnm = "";
- }
- else
- {
- if(tmpWidth == "")
- tmpWidth = 120;
-
- if(tmpHeight == "")
- tmpHeight = 20;
-
- if(tmpLeft == "")
- tmpLeft = 0;
-
- if(tmpTop == "")
- tmpRight = 0;
-
- //UnitDivStyle = getXSLTStyleVal(ctrlPosition, degnattrval, "unit");
- UnitDivStyle = getNewXSLTStyleVal(unitid, ctrlPosition, degnattrval, "unit");
-
- UnitPreStyle = "style=\"position:absolute; left:0px; top:0px; width:" + tmpWidth + "; height:" + tmpHeight + "; \"";
- }
- //}
- }
-
- if(degnitemkind == "CAL") // 달력형식
- {
- // 아이템이 STX인 경우 정해진 좌표를 벗어나게 됨에 따라 Pre -> Div 태그로 변경함.
- sXSLTInfo += "\t\t\t\t<div id=\""+ctrlid+"\" "+ sStyle +">\n"
- + "\t\t\t\t\t<pre id=\""+ctrlid+"\" "+ sPreStyle +"><xsl:value-of select=\"normalize-space("+ref+")\"/></pre>\n";
- sXSLTInfo += "\t\t\t\t</div>\n";
- }
- else
- {
- if(Pattern != "")
- {
- sXSLTInfo += "\t\t\t\t<div id=\""+ctrlid+"\" "+ sStyle +">\n"
- + "\t\t\t\t\t<pre id=\""+ctrlid+"\" "+ sPreStyle +">\n";
- sXSLTInfo +="\t\t\t\t\t<xsl:choose>\n";
- sXSLTInfo +="\t\t\t\t\t\t<xsl:when test=\"" + ref + "[not(.='')]\">\n";
- //sXSLTInfo +="\t\t\t\t\t\t\t<xsl:value-of select=\"format-number(normalize-space("+ref+"), '" + Pattern + ";(" + Pattern + "')\"/>\n";
- //sXSLTInfo +="\t\t\t\t\t\t\t<xsl:value-of select=\"format-number(normalize-space("+ref+"), '" + Pattern + ";(" + Pattern + ")')\"/>\n";
- sXSLTInfo +="\t\t\t\t\t\t\t<xsl:value-of select=\"format-number(normalize-space("+ref+"), '" + Pattern + "')\"/>\n";
- sXSLTInfo +="\t\t\t\t\t\t</xsl:when>\n";
- sXSLTInfo +="\t\t\t\t\t\t<xsl:otherwise>\n";
- sXSLTInfo +="\t\t\t\t\t\t\t<xsl:value-of select=\"normalize-space("+ref+")\"/>\n";
- sXSLTInfo +="\t\t\t\t\t\t</xsl:otherwise>\n";
- sXSLTInfo +="\t\t\t\t\t</xsl:choose>\n";
- sXSLTInfo += "\t\t\t\t\t</pre>\n";
- sXSLTInfo += "\t\t\t\t</div>\n";
- }
- else
- {
- sXSLTInfo += "\t\t\t\t<div id=\""+ctrlid+"\" "+ sStyle +">\n"
- + "\t\t\t\t\t<pre id=\""+ctrlid+"\" "+ sPreStyle +"><xsl:value-of select=\"normalize-space("+ref+")\"/></pre>\n";
- sXSLTInfo += "\t\t\t\t</div>\n";
- }
- /*
- sXSLTInfo += "\t\t\t\t<div id=\""+ctrlid+"\" "+ sStyle +">\n"
- + "\t\t\t\t\t<pre id=\""+ctrlid+"\" "+ sPreStyle +"><xsl:value-of select=\"normalize-space("+ref+")\"/></pre>\n";
- sXSLTInfo += "\t\t\t\t</div>\n";
- */
- if(unitnm != "")
- {
- sXSLTInfo += "\t\t\t\t<div id=\""+ unitid +"\" "+ UnitDivStyle +">\n";
- sXSLTInfo += "\t\t\t\t\t<pre id=\""+ unitid +"\" "+ UnitPreStyle +"><![CDATA[" + unitnm + "]]></pre>\n";
- sXSLTInfo += "\t\t\t\t</div>\n";
- }
- }
-
- g_pageInfo.curxpos += parseInt(ctrlPosition.x) + parseInt(ctrlPosition.width) + g_pageInfo.offsetx;
-
- return ctrlPosition;
- }
- /**
- * @desc : combo 생성
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDrawHTMLCmb(x, y, row)
- {
- var width = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval"), "width");
- if(width != "")
- width = parseInt(width);
- var height = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval"), "height");
- if(height != "")
- height = parseInt(height);
-
- if(width == "")
- width = 100;
- if(height == "")
- height = 20;
-
- var ctrlPosition = new Position(x, y, width, height);
-
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Degnitemno => Degnitemlevlcd 로 변경
- var degnitemno = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemno");
- var degnitemlevlcd = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemlevlcd");
-
- var degnattrval = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval");
- var itemattrval = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/itemattrval");
-
- var valgrupcd = model.getValue(g_pageInfo.formdegnRef + "[degnitemno='" + degnitemno + "']/valgrupcd");
- var cnt = getNodesetCnt(model, g_pageInfo.vallistRef + "[grupcd='" + valgrupcd + "']");
- var ctrlid = "CMB_" + degnitemno;
-
- var sLabel = "";
- var sValue = "";
- var sLblWidth = 0;
- var sStyle = "";
-
- // combo 리스트 중에서 최대 길이 체크
- for(var i =0; i< cnt; i++)
- {
- sLabel = model.instances(0).selectNodes(g_pageInfo.vallistRef + "[grupcd='" + valgrupcd + "']/valitemnm").item(i).text;
- sLblWidth = fGetLblWidth(degnitemno, sLabel);
-
- if(ctrlPosition.width < sLblWidth)
- ctrlPosition.width = sLblWidth
- }
- //sStyle = getXSLTStyleVal(ctrlPosition, degnattrval, "ctrl");
- //sStyle = AddBorderStyle(sStyle, degnattrval, "ctrl");
-
- sStyle = getNewXSLTStyleVal(ctrlid, ctrlPosition, degnattrval, "ctrl");
-
- sXSLTInfo +="\t\t\t\t<pre id=\""+ctrlid+"\" "+ sStyle+ "> \n";
-
- sXSLTInfo +="\t\t\t\t\t<xsl:value-of select=\"normalize-space("+ g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcd + "']/rectermnm)\"/> \n"
- //sXSLTInfo +="\t\t\t\t\t<xsl:value-of select=\""+ g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcd + "']/rectermnm\"/> \n"
-
- sXSLTInfo +="\t\t\t\t</pre> \n";
- sDivWidth = ctrlPosition.x + parseInt(ctrlPosition.width);
-
- if(ctrlPosition.width > sDivHeight)
- sDivHeight = ctrlPosition.height;
-
- if(getStyleValue(itemattrval, "extn") == "visible")
- {
- ctrlPosition.x = parseInt(ctrlPosition.x) + parseInt(ctrlPosition.width) + g_pageInfo.offsetx;
- // 참고
- var ctrlPosition = fDrawHTMLStx(ctrlPosition.x, 0, 100, 20, row, "extn");
-
- //var ctrlPosition = fDrawHTMLStx(parseInt(ctrlPosition.width) +g_pageInfo.offsetx, 0, 100, 20, row, "extn");
- }
-
- g_pageInfo.curxpos += parseInt(ctrlPosition.width) +g_pageInfo.offsetx;
-
- return ctrlPosition;
- }
- /**
- * @desc : textarea 생성
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDrawHTMLMtx(x, y, row)
- {
- var width = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval"), "width");
- if(width != "")
- width = parseInt(width);
-
- var height = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval"), "height");
- if(height != "")
- height = parseInt(height);
-
- if(width == "")
- width = 400;
-
- if(height == "")
- height = 300;
-
- var ctrlPosition = new Position(x, y, width, height);
-
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Degnitemno => Degnitemlevlcd 로 변경
- var degnitemno = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemno");
- var degnitemlevlcd = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemlevlcd");
-
- var degnattrval = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval");
- var fstlevlitemcd = model.getValue(g_pageInfo.recItemRef + "[degnitemno='" + degnitemno + "']/fstlevlitemcd");
- var comuseyn = model.getValue(g_pageInfo.formdegnRef + "[degnitemcd='" + fstlevlitemcd + "' and degnitemlevlno='1']/comuseyn");
- var ctrlid = "";
-
- ctrlid = "MTX_" + degnitemno;
- ctrlPosition.width = g_pageInfo.ctrlwidth;
-
- degnattrval = fCheckDefaultDegnAttr(model, degnattrval, "MTX", row);
-
- //var sStyle = getXSLTStyleVal(ctrlPosition, degnattrval, "ctrl");
- //sStyle = AddBorderStyle(sStyle, degnattrval, "label");
-
- var sStyle = getNewXSLTStyleVal(ctrlid, ctrlPosition, degnattrval, "ctrl");
-
- //var sPreStyle = getPreXSLTStyle(null, ctrlPosition, degnattrval, "ctrl");
- var sPreStyle = getPreXSLTStyle(ctrlid, ctrlPosition, degnattrval, "ctrl");
-
- sPreStyle = AddBorderStyle(sPreStyle, degnattrval, "ctrl");
-
- // 텍스트가 MultiLine인 경우 정해진 좌표를 벗어나게 됨에 따라 Pre -> Div 태그로 변경함.
- sXSLTInfo += "\t\t\t\t<div id=\""+ctrlid+"\" "+ sStyle +"> \n"
- + "\t\t\t\t\t<pre id=\""+ctrlid+"\" "+ sPreStyle +"><xsl:value-of select=\""+g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcd + "']/reccnts\"/></pre>\n";
- sXSLTInfo += "\t\t\t\t</div>\n";
- sDivWidth = ctrlPosition.x + parseInt(ctrlPosition.width);
-
- if(ctrlPosition.height > sDivHeight)
- sDivHeight = ctrlPosition.height;
-
- g_pageInfo.curxpos += parseInt(ctrlPosition.width) +g_pageInfo.offsetx;
-
- return ctrlPosition;
- }
- /**
- * @desc : 기본 속성 추가 로직.
- * @
- * @param :
- * @return :
- * @history:
- 2008-11-13 STX, MTX에 border-style이 없는 경우 기본으로 넣어주도록 수정
-
- * @---------------------------------------------------
- */
- function fCheckDefaultDegnAttr(model, degnattrval, degnitemkind, row)
- {
- switch(degnitemkind)
- {
- case "RDO":
- break;
- case "STX":
- case "MTX":
- {
- if(isSearchString(degnattrval, "ctrl.border-style") == false)
- {
- degnattrval += "ctrl.border-style:solid;"
- }
- }
- break;
- }
-
- // 디자인 속성 변경
- model.setValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval", degnattrval, true);
- model.refresh();
-
- return degnattrval;
- }
- /**
- * @desc : input(hidden) 생성 (secret을 pre으로 처리할 경우 자리수를 어떻게 처리할 것인지..)
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDrawHTMLMsk(x, y, cx, cy, row)
- {
- var width = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval"), "width");
- if(width != "")
- width = parseInt(width);
-
- var height = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval"), "height");
- if(height != "")
- height = parseInt(height);
-
- if(width == "")
- width = cx;
- if(height == "")
- height = cy;
- var ctrlPosition = new Position(x, y, width, height);
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Degnitemno => Degnitemlevlcd 로 변경
- var degnitemno = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemno");
- var degnitemlevlcd = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemlevlcd");
- var degnattrval = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval");
- var degnitemkind = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemkind");
- var ctrlid = "MSK_" + degnitemno;
- var ref = g_pageInfo.recItemRef + "[degnitemlevlcd='" + degnitemlevlcd + "']/reccnts";
- ctrlPosition.width = g_pageInfo.ctrlwidth;
- var sStyle = getXSLTStyleVal(ctrlPosition, degnattrval, "ctrl");
-
- sXSLTInfo += "\t\t\t\t<pre id=\""+ctrlid+"\" "+ sStyle +" >*******</pre> \n";
-
- sDivWidth = ctrlPosition.x + parseInt(ctrlPosition.width);
- if(ctrlPosition.height = sDivHeight)
- sDivHeight = ctrlPosition.height;
-
- g_pageInfo.curxpos += ctrlPosition.x + parseInt(ctrlPosition.width) +g_pageInfo.offsetx;
-
- return ctrlPosition;
- }
- /**
- * @desc : 이미지 생성
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDrawHTMLImge(x, y, row)
- {
- var width = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval"), "width");
- if(width != "")
- width = parseInt(width);
-
- var height = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval"), "height");
- if(height != "")
- height = parseInt(height);
-
- if(width == "")
- width = 300;
- if(height == "")
- height = 300;
-
- var ctrlPosition = new Position(x, y, width, height);
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Degnitemno => Degnitemlevlcd 로 변경
- var degnitemno = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemno");
- var degnitemlevlcd = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemlevlcd");
-
- var degnitemcd = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemcd");
- var degnattrval = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval");
- var degnitemkind = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemkind");
- var imgedit = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/itemattrval"), "imgedit");
-
- var formdegnseq = model.getValue(g_pageInfo.formmastRef + "/formdegnseq");
-
- var ctrlid = ""
- var ImgUrl = "";
-
- if(degnitemkind == "IMG")
- {
- ctrlid = "IMG_" + degnitemno;
- if(imgedit == "Y")
- ImgUrl = getRecImgUrl(degnitemlevlcd);
- else
- ImgUrl = getImgUrl(degnitemcd);
- }
- else if(degnitemkind == "FDG")
- {
- ctrlid = "FDG_" + degnitemno;
- ImgUrl = getRecImgUrl(degnitemlevlcd);
- }
-
- ImgUrl = ImgUrl.setReplaceWord("&", "&");
-
- //var sStyle = getXSLTStyleVal(ctrlPosition, degnattrval, "ctrl");
- var sPosStyle = getImgXSLTStylePos(ctrlid, ctrlPosition, degnattrval, "ctrl"); // 위치좌표
- var sStyle = getImgXSLTStyleVal(ctrlid, ctrlPosition, degnattrval, "ctrl"); // Style 정보
-
- //IMG Width, Height
- var ImgSize = "";
- var sImgWidth = "";
- var sImgHeight = "";
-
- if(document.controls(ctrlid) != null)
- {
- sImgWidth = document.controls(ctrlid).attribute("width");
- sImgHeight = document.controls(ctrlid).attribute("height");
-
- if(document.controls(ctrlid).attribute("border-style") != "")
- {
- var BdWidth = 0;
- if(getStyleValue(degnattrval, "border-width", "ctrl") != "")
- BdWidth = getStyleValue(degnattrval, "border-width", "ctrl");
- else
- BdWidth = 1;
-
- sImgHeight = parseInt(sImgHeight) - BdWidth;
- }
- }
- else
- {
- if(degnitemkind == "IMG")
- {
- sImgWidth = getStyleValue(degnattrval, "width", "ctrl");
- sImgHeight = getStyleValue(degnattrval, "height", "ctrl");
- }
- if(degnitemkind == "FDG")
- {
- sImgWidth = getStyleValue(degnattrval, "width", "label");
- sImgHeight = getStyleValue(degnattrval, "height", "label");
- }
-
- if(getStyleValue(degnattrval, "border-style", "ctrl") != "")
- {
- var BdWidth = 0;
- if(getStyleValue(degnattrval, "border-width", "ctrl") != "")
- BdWidth = getStyleValue(degnattrval, "border-width", "ctrl");
- else
- BdWidth = 1;
-
- sImgHeight = parseInt(sImgHeight) - BdWidth;
- }
- }
-
- if(sImgWidth != "")
- ImgSize += " width=\""+sImgWidth+"\" ";
-
- if(sImgHeight != "")
- ImgSize += " height=\""+sImgHeight+"\"";
-
- if(degnitemkind == "IMG")
- {
- if(imgedit == "Y")
- {
- sXSLTInfo += "\t\t\t\t<xsl:choose>\n";
- sXSLTInfo += "\t\t\t\t\t<xsl:when test=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemkind='IMG' and degnitemlevlcd='" + degnitemlevlcd + "' and degnitemno='" + degnitemno + "']/unitnm[not(.='')]\">\n";
-
- // XSLT 변수로 사용되는 이미지url 전달인자는 해당 컨트롤ID 앞에 v를 붙임
- sXSLTInfo += "\t\t\t\t\t\t<xsl:variable name=\"" + "v" + ctrlid + "_width\" select=\"substring-before(" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemkind='IMG' and degnitemlevlcd='" + degnitemlevlcd + "' and degnitemno='" + degnitemno + "']/unitnm, '|')\"/>\n";
- sXSLTInfo += "\t\t\t\t\t\t<xsl:variable name=\"" + "v" + ctrlid + "_height\" select=\"substring-after(" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemkind='IMG' and degnitemlevlcd='" + degnitemlevlcd + "' and degnitemno='" + degnitemno + "']/unitnm, '|')\"/>\n";
- sXSLTInfo += "\t\t\t\t\t\t<xsl:variable name=\"" + "v" + ctrlid + "\">" + ImgUrl + "</xsl:variable>\n";
- sXSLTInfo += "\t\t\t\t\t\t<div " + sPosStyle + ">\n";
- sXSLTInfo += "\t\t\t\t\t\t\t<img id=\"" + ctrlid + "\" " + sStyle + " >\n";
-
- sXSLTInfo += "\t\t\t\t\t\t\t\t<xsl:attribute name=\"src\">\n";
- sXSLTInfo += "\t\t\t\t\t\t\t\t<xsl:copy-of select=\"$" + "v" + ctrlid + "\"/>\n";
- sXSLTInfo += "\t\t\t\t\t\t\t\t</xsl:attribute>\n";
-
- sXSLTInfo += "\t\t\t\t\t\t\t\t<xsl:attribute name=\"width\">\n";
- sXSLTInfo += "\t\t\t\t\t\t\t\t<xsl:copy-of select=\"$" + "v" + ctrlid + "_width\"/>\n";
- sXSLTInfo += "\t\t\t\t\t\t\t\t</xsl:attribute>\n";
-
- sXSLTInfo += "\t\t\t\t\t\t\t\t<xsl:attribute name=\"height\">\n";
- sXSLTInfo += "\t\t\t\t\t\t\t\t<xsl:copy-of select=\"$" + "v" + ctrlid + "_height\"/>\n";
- sXSLTInfo += "\t\t\t\t\t\t\t\t</xsl:attribute>\n";
- sXSLTInfo += "\t\t\t\t\t\t\t</img>\n";
- sXSLTInfo += "\t\t\t\t\t\t</div>\n";
-
- sXSLTInfo += "\t\t\t\t\t</xsl:when>\n";
-
- sXSLTInfo += "\t\t\t\t\t<xsl:otherwise>\n";
- sXSLTInfo += "\t\t\t\t\t\t<xsl:variable name=\"" + "v" + ctrlid + "\">" + ImgUrl + "</xsl:variable>\n";
- sXSLTInfo += "\t\t\t\t\t\t<div " + sPosStyle + ">\n";
-
- // IMG 태그는 Style이 안 먹히므로 Width, Height를 명시해줘야 함.
- sXSLTInfo += "\t\t\t\t\t\t\t<img id=\"" + ctrlid + "\" " + ImgSize + " " + sStyle + " >\n";
-
- sXSLTInfo += "\t\t\t\t\t\t\t\t<xsl:attribute name=\"src\">\n";
- sXSLTInfo += "\t\t\t\t\t\t\t\t<xsl:copy-of select=\"$" + "v" + ctrlid + "\"/>\n";
- sXSLTInfo += "\t\t\t\t\t\t\t\t</xsl:attribute>\n";
- sXSLTInfo += "\t\t\t\t\t\t\t</img>\n";
- sXSLTInfo += "\t\t\t\t\t\t</div>\n";
- sXSLTInfo += "\t\t\t\t\t</xsl:otherwise>\n";
- sXSLTInfo += "\t\t\t\t</xsl:choose>\n";
- }
- else
- {
- // XSLT 변수로 사용되는 이미지url 전달인자는 해당 컨트롤ID 앞에 v를 붙임
- sXSLTInfo += "\t\t\t\t<xsl:variable name=\"" + "v" + ctrlid + "\">" + ImgUrl + "</xsl:variable>\n";
- sXSLTInfo += "\t\t\t\t\t<div " + sPosStyle + ">\n";
- sXSLTInfo += "\t\t\t\t\t\t<img id=\"" + ctrlid + "\" " + ImgSize + " " + sStyle + " >\n";
-
- sXSLTInfo += "\t\t\t\t\t\t\t<xsl:attribute name=\"src\">\n";
- sXSLTInfo += "\t\t\t\t\t\t\t<xsl:copy-of select=\"$" + "v" + ctrlid + "\"/>\n";
- sXSLTInfo += "\t\t\t\t\t\t\t</xsl:attribute>\n";
- sXSLTInfo += "\t\t\t\t\t\t</img>\n";
- sXSLTInfo += "\t\t\t\t\t</div>\n";
- }
- }
- else if(degnitemkind == "FDG")
- {
- // XSLT 변수로 사용되는 이미지url 전달인자는 해당 컨트롤ID 앞에 v를 붙임
- sXSLTInfo += "\t\t\t\t<xsl:variable name=\"" + "v" + ctrlid + "\">" + ImgUrl + "</xsl:variable>\n";
- sXSLTInfo += "\t\t\t\t\t<div " + sPosStyle + ">\n";
- sXSLTInfo += "\t\t\t\t\t\t<img id=\"" + ctrlid + "\" " + ImgSize + " " + sStyle + " >\n";
- sXSLTInfo += "\t\t\t\t\t\t\t<xsl:attribute name=\"src\">\n";
- sXSLTInfo += "\t\t\t\t\t\t\t<xsl:copy-of select=\"$" + "v" + ctrlid + "\"/>\n";
- sXSLTInfo += "\t\t\t\t\t\t\t</xsl:attribute>\n";
- sXSLTInfo += "\t\t\t\t\t\t</img>\n";
- sXSLTInfo += "\t\t\t\t\t</div>\n";
- }
-
- sDivWidth = ctrlPosition.x + parseInt(ctrlPosition.width);
-
- if(ctrlPosition.height > sDivHeight)
- sDivHeight = ctrlPosition.height;
-
- g_pageInfo.curxpos += parseInt(ctrlPosition.width) +g_pageInfo.offsetx;
-
- // ISU 를 그리는 로직
- var elementName = "";
- var ref = "";
-
- elementName = "type=\"checkbox\"";
-
- var cellspacing = 15;
- var lblWidth = 0;
- var subcnt = getNodesetCnt(model, g_pageInfo.formdegnRef + "[degnitemkind='ISU' and supdegnitemno='" + degnitemno + "']");
- var sStyle = "";
-
- var ISUArr = new Array(2);
-
- for(var j = 0; j < subcnt; j++)
- {
- var subtermcd = instance1.selectNodes(g_pageInfo.formdegnRef + "[degnitemkind='ISU' and supdegnitemno='" + degnitemno + "']/termcd").item(j).text;
- var subdegnitemno = instance1.selectNodes(g_pageInfo.formdegnRef + "[degnitemkind='ISU' and supdegnitemno='" + degnitemno + "']/degnitemno").item(j).text;
- var subdegnitemkind = instance1.selectNodes(g_pageInfo.formdegnRef + "[degnitemkind='ISU' and supdegnitemno='" + degnitemno + "']/degnitemkind").item(j).text;
- var subdegnitemnm = instance1.selectNodes(g_pageInfo.formdegnRef + "[degnitemkind='ISU' and supdegnitemno='" + degnitemno + "']/degnitemnm").item(j).text;
- var subdegnitemlevlcd = instance1.selectNodes(g_pageInfo.formdegnRef + "[degnitemkind='ISU' and supdegnitemno='" + degnitemno + "']/degnitemlevlcd").item(j).text;
- var subitemattrval = instance1.selectNodes(g_pageInfo.formdegnRef + "[degnitemkind='ISU' and supdegnitemno='" + degnitemno + "']/itemattrval").item(j).text;
- var subdegnattrval = instance1.selectNodes(g_pageInfo.formdegnRef + "[degnitemkind='ISU' and supdegnitemno='" + degnitemno + "']/degnattrval").item(j).text;
-
- ref = g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + subdegnitemlevlcd + "']/rectermcd";
- //var cvrtRef = ref.setReplaceWord("#colno#", j);
-
- // DIV를 그린다.
- //var divid = "DIV_" + subdegnitemno;
-
- var ISURow = row + (j+1);
-
- lblWidth = fGetLblWidth(degnitemno, subdegnitemnm);
- var ctrlPosition = new Position(x, y, 10 + parseInt(lblWidth), 20);
- var ctrlid = subdegnitemkind + "_" + subdegnitemno;
-
- //var sISUStyle = getXSLTStyleVal(ctrlPosition, subdegnattrval, "ctrl");
- ISUArr = getSelSSUXSLTStyleVal(ctrlid, ctrlPosition, subdegnattrval, "ctrl");
- ctrlPosition.width = lblWidth;
-
- //sXSLTInfo += "\t\t\t\t<div id=\""+divid+"\" "+sISUStyle+">\n";
- sXSLTInfo += "\t\t\t\t\t<xsl:choose>\n";
- sXSLTInfo += "\t\t\t\t\t\t<xsl:when test=\""+ ref +" = '"+ subtermcd +"'\"> \n";
- //sXSLTInfo += "\t\t\t\t\t\t<input "+elementName+" id=\""+ctrlid+"\" "+ sISUStyle +" value=\""+subtermcd+ "\" checked = \"true\" /><![CDATA["+subdegnitemnm+"]]>\n";
- sXSLTInfo += "\t\t\t\t\t\t<input "+elementName+" id=\""+ctrlid+"\" " + ISUArr[0] + " value=\""+subtermcd+ "\" checked = \"true\" />\n";
- sXSLTInfo += "\t\t\t\t\t\t</xsl:when>\n";
- sXSLTInfo += "\t\t\t\t\t\t<xsl:otherwise>\n";
- //sXSLTInfo += "\t\t\t\t\t\t<input "+elementName+" id=\""+ctrlid+"\" "+ sISUStyle +" value=\""+subtermcd+ "\" /><![CDATA["+subdegnitemnm+"]]>\n";
- sXSLTInfo += "\t\t\t\t\t\t<input "+elementName+" id=\""+ctrlid+"\" " + ISUArr[0] + " value=\""+subtermcd+ "\" />\n";
- sXSLTInfo += "\t\t\t\t\t\t</xsl:otherwise>\n";
- sXSLTInfo += "\t\t\t\t\t</xsl:choose>\n";
- sXSLTInfo += "\t\t\t\t\t<pre id=\""+ctrlid+"\" " + ISUArr[1] + "><![CDATA["+subdegnitemnm+"]]></pre>\n";
- //sXSLTInfo += "\t\t\t\t</div>\n";
-
- //sXSLTInfo += "\t\t\t\t<pre "+sISUStyle+"><![CDATA["+subdegnitemnm+"]]></pre> \n";
- }
-
- return ctrlPosition;
- }
-
- /**
- * @desc : 그리드 생성
- * @
- * @param :
- * @return :
- * @history: 2008-10-30 이경희 - 테이블 좌표 생성 시 컨트롤의 크기대로 됨에 따라 사이즈가 컨트롤의 height로 맞춰지는 것을
- Div로 한번 더 감싸는 것으로 수정
-
- * @---------------------------------------------------
- */
- function fDrawHTMLGrd(x, y, row)
- {
- var width = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval"), "width");
- if(width != "")
- width = parseInt(width);
-
- var height = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval"), "height");
- if(height != "")
- height = parseInt(height);
-
- if(width == "")
- width = 500;
- if(height == "")
- height = 300;
-
- var ctrlPosition = new Position(x, y, width, height);
-
- var degnitemno = model.getValue(g_pageInfo.formdegnRef +"[" + row + "]/degnitemno");
- var degnitemnm = model.getValue(g_pageInfo.formdegnRef +"[" + row + "]/degnitemnm");
-
- var degnitemlevlcd = "";
- if(g_pageInfo.fstLevlItemCd != "")
- degnitemlevlcd = g_pageInfo.fstLevlItemCd + "." + model.getValue(g_pageInfo.formdegnRef +"[" + row + "]/degnitemlevlcd");
- else
- degnitemlevlcd = model.getValue(g_pageInfo.formdegnRef +"[" + row + "]/degnitemlevlcd");
-
- var degnattrval = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval");
- var gridtype = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/itemattrval"), "gridtype");
- var subcnt = getNodesetCnt(model, g_pageInfo.formdegnRef + "[degnitemkind='GSU' and supdegnitemno='" + degnitemno + "']");
-
- var degnitemlevlcdArr = getDegnitemlevlcd(gridtype, degnitemlevlcd);
- var degnitemcd = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemcd");
-
- var ctrlid = "GRD_" + degnitemno;
- var grdcaption = "";
- var grdcolwidth = "";
- var grdcolheight = g_Base_GrdColHeight;
-
- var recItemCnt = getNodesetCnt(model, g_pageInfo.recItemRef);
-
- //var sStyle = getXSLTStyleVal(ctrlPosition, degnattrval, "ctrl");
- var sStyle = getNewXSLTStyleVal(ctrlid, ctrlPosition, degnattrval, "ctrl");
-
- var TdFontStyle = getTableXSLTStyleVal(ctrlid, ctrlPosition, degnattrval, "ctrl");
-
- // 2008-10-30
- //sXSLTInfo += "\t\t\t\t<div id=\"C_"+ctrlid+"\" "+sStyle+">\n";
- var tmpWidth = getStyleValue(degnattrval, "ctrl.width");
- var tmpHeight = getStyleValue(degnattrval, "ctrl.height");
- sXSLTInfo += "\t\t\t\t<div id=\"C_"+ctrlid+"\" style=\"position:absolute; left:0px; top:0px; width:" + tmpWidth + "px; height:" + tmpHeight + "px; \">\n";
-
- // Table 에 Style 정보를 추가
- sXSLTInfo += "\t\t\t\t<table id=\""+ctrlid+"\" "+sStyle+" border=\"1\" frame=\"box\" bordercolor=\"silver\" cellspacing=\"0\">\n";
- //sXSLTInfo += "\t\t\t\t<table id=\""+ctrlid+"\" border=\"1\" frame=\"box\" bordercolor=\"silver\" cellspacing=\"0\">\n";
-
- var StyleArr = new Array();
-
- if(gridtype == "Y" || gridtype == "G") //Y축 누적
- {
- degnitemcd = getDegnitemcd(gridtype, degnitemlevlcd);
- /*
- if(degnitemlevlcdArr[1] != null)
- {
- var tmpArray = degnitemlevlcdArr[1].split(".");
- var length = tmpArray.length;
- degnitemcd = tmpArray[length-1];
- }
- */
- var colWidths = getStyleValue(degnattrval, "colwidth", "ctrl").split("^");
- var colHeights = getStyleValue(degnattrval, "rowheight", "ctrl").split("^");
- var sTdStyle = "";
-
- sXSLTInfo += "\t\t\t\t\t<tr bgColor=\"#e0e0e0\">\n";
- for(var j = 0; j < subcnt; j++)
- {
- var subdegnitemnm = instance1.selectNodes(g_pageInfo.formdegnRef + "[degnitemkind='GSU' and supdegnitemno='" + degnitemno + "']/degnitemnm").item(j).text;
-
- sTdStyle = "style=\"";
-
- if(colWidths.length == subcnt)
- sTdStyle += "width:"+ colWidths[j] +"px; ";
- else
- sTdStyle += "width:"+ fGetLblWidth(degnitemno, subdegnitemnm) +"px; ";
- if(colHeights.length == subcnt)
- sTdStyle += "height:"+ colHeights[j] +"px; ";
- else
- sTdStyle += "height:"+ grdcolheight +"px; ";
-
- sTdStyle = sTdStyle + TdFontStyle + "\"";
-
- StyleArr[j] = sTdStyle;
-
- sXSLTInfo += "\t\t\t\t\t\t<td "+ sTdStyle +" align=\"center\"><![CDATA["+subdegnitemnm+"]]></td> \n";
- }
- sXSLTInfo += "\t\t\t\t\t</tr>\n";
-
- if(gridtype == "Y")
- sXSLTInfo += "\t\t\t\t\t<xsl:apply-templates select=\"" +g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[1] + "' and degnitemcd='" + degnitemcd + "']\"/>\n";
- else
- sXSLTInfo += "\t\t\t\t\t<xsl:apply-templates select=\"" +g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[1] + "']\"/>\n";
- }
- else if(gridtype == "X") //X축 누적
- {
- var sColCnt = subcnt; //10;
- var colwidth = g_Base_GrdColWidth;
- var sTdStyle = "";
-
- var colWidths = getStyleValue(degnattrval, "colwidth", "ctrl").split("^");
- var colHeights = getStyleValue(degnattrval, "rowheight", "ctrl").split("^");
-
- if(colWidths.length == 0)
- {
- colWidths[0] = colwidth;
- }
-
- sTdStyle = "style=\"";
- sTdStyle += "width:"+ colWidths[0] +"px; ";
-
- if(colHeights.length == (subcnt + 1))
- sTdStyle += "height:"+ colHeights[0] +"px; ";
- else
- sTdStyle += "height:"+ grdcolheight +"px; ";
-
- //sTdStyle += "\"";
- sTdStyle = sTdStyle + TdFontStyle + "\"";
-
- var Onerow = degnitemlevlcdArr[0];
-
- // 테이블 컬럼 생성
- // 전체 Table 사이즈에서 colwidth 값으로 Table을 여러개 생성함.
- var totalwidth = getStyleValue(degnattrval, "width", "ctrl");
- var cnt = (totalwidth - colwidth) / g_Base_GrdColWidth;
-
- sXSLTInfo += "\t\t\t\t\t<tr bgColor=\"#e0e0e0\">\n";
-
- ///////////////////////////////////////////////////////////////////////////////////////////////////////
- // 1. 첫줄 - 빈 컬럼 만들기
-
- // column 0
- sXSLTInfo += "\t\t\t\t\t\t<td "+sTdStyle+ " align=\"center\">※</td> \n";
-
- StyleArr[0] = sTdStyle;
-
- sTdStyle = "style=\"width:"+ g_Base_GrdColWidth +"px; " + "height:"+ grdcolheight +"px; \"";
-
- // column 1~ 마지막까지
- for(var rowidx = 1; rowidx <= cnt; rowidx++)
- {
- sXSLTInfo += "\t\t\t\t\t\t<td "+sTdStyle+ " align=\"center\"></td> \n";
- }
- sXSLTInfo += "\t\t\t\t\t</tr>\n";
-
- var tmpwidth = getStyleValue(degnattrval, "width", "");
-
- // 전체 row 만큼 반복
- for(var rowidx = 0; rowidx < sColCnt; rowidx++)
- {
- sXSLTInfo += "\t\t\t\t\t<tr>\n";
-
- var nodelist = findNodeset(model, g_pageInfo.recRef + "/grid/recitem[degnitemlevlcd='" + degnitemlevlcdArr[rowidx][1] + "']");
- var degnitemnm = "";
-
- if(nodelist != null)
- {
- for(var i = 1; i < nodelist.length; i++)
- {
- var itemNode = nodelist.item(i);
- degnitemnm = itemNode.selectSingleNode("degnitemnm").text;
-
- if(degnitemnm != "")
- {
- if(isSearchString(degnitemnm, " ") == true)
- {
- degnitemnm = GetDegnitemnmTrans(degnitemnm);
- }
- else
- {
- degnitemnm = "<![CDATA[" + degnitemnm + "]]>";
- }
- break;
- }
- }
- }
-
- // 한줄씩 column을 생성
- for(var colidx = 0; colidx < cnt; colidx++)
- {
- if(colidx == 0)
- {
- sTdStyle = "style=\"width:"+ colWidths[0] +"px; " + "height:"+ colHeights[rowidx+1] +"px; " + TdFontStyle + " \"";
-
- //sXSLTInfo += "\t\t\t\t\t\t<td " + sTdStyle + " bgColor=\"#e0e0e0\" align=\"center\"><![CDATA[" + degnitemnm + "]]></td>\n";
- sXSLTInfo += "\t\t\t\t\t\t<td " + sTdStyle + " bgColor=\"#e0e0e0\" align=\"center\">" + degnitemnm + "</td>\n";
- }
- else
- {
- sTdStyle = "style=\"width:"+ g_Base_GrdColWidth +"px; " + "height:"+ colHeights[rowidx+1] +"px; " + TdFontStyle + " \"";
-
- sXSLTInfo += "\t\t\t\t\t\t<td " + sTdStyle + ">\n";
-
- sXSLTInfo += "\t\t\t\t\t\t\t<xsl:value-of select=\"normalize-space(" +g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[rowidx][1] + "' and rowno='" + rowidx + "' and colno='" + colidx + "']/reccnts)\"/>\n";
-
- sXSLTInfo += "\t\t\t\t\t\t</td>\n";
- }
- }
- sXSLTInfo += "\t\t\t\t\t</tr>\n";
- }
- }
- else if(gridtype =="T") //Table
- {
- // itemattrval 단일화
- var subcntList = model.instances(0).selectNodes(g_pageInfo.formdegnRef + "[degnitemkind='GSU' and supdegnitemno='" + degnitemno + "']");
-
- for(var subidx = 0; subidx < subcntList.length; subidx++)
- {
- var subNode = subcntList.item(subidx);
- var subitemattrval = subNode.selectSingleNode("itemattrval").text;
-
- if(isSearchString(subitemattrval, "axtype") == true)
- {
- var subColumnType = getStyleValue(subitemattrval, "axflag");
-
- if(subColumnType == "X")
- {
- subNode.selectSingleNode("itemattrval").text = "axflag:X;";
- }
- else
- {
- subNode.selectSingleNode("itemattrval").text = "axflag:Y;";
- }
- }
- }
-
- var subcntXrow = getNodesetCnt(model, g_pageInfo.formdegnRef + "[degnitemkind='GSU' and supdegnitemno='" + degnitemno + "' and itemattrval='axflag:X;']");
- var subcntYrow = getNodesetCnt(model, g_pageInfo.formdegnRef + "[degnitemkind='GSU' and supdegnitemno='" + degnitemno + "' and itemattrval='axflag:Y;']");
-
- var subXList = model.instances(0).selectNodes(g_pageInfo.formdegnRef + "[degnitemkind='GSU' and supdegnitemno='" + degnitemno + "' and itemattrval='axflag:X;']");
- var subYList = model.instances(0).selectNodes(g_pageInfo.formdegnRef + "[degnitemkind='GSU' and supdegnitemno='" + degnitemno + "' and itemattrval='axflag:Y;']");
-
- var colWidths = getStyleValue(degnattrval, "colwidth", "ctrl").split("^");
- var colHeights = getStyleValue(degnattrval, "rowheight", "ctrl").split("^");
- var colcaption = getStyleValue(degnattrval, "caption", "ctrl");
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // 1. X축 컬럼을 만듬.
-
- // ※컬럼 Style을 만듬.
- sTdStyle = "style=\"";
- if(colWidths.length > 0)
- sTdStyle += "width:"+ colWidths[0] +"px; ";
- else
- sTdStyle += "width:"+ colWidths[0] +"px; ";
-
- //if(colHeights.length == subcntrow)
- if(colHeights.length > 0)
- sTdStyle += "height:"+ colHeights[0] +"px; ";
- else
- sTdStyle += "height:"+ grdcolheight +"px; ";
-
- //sTdStyle += "\"";
- sTdStyle = sTdStyle + TdFontStyle + "\"";
-
- StyleArr[0] = sTdStyle;
-
- //sXSLTInfo += "\t\t\t\t\t<tr bgColor=\"#BBDBFF\">\n"; // css 그리드 배경색 적용 시
- sXSLTInfo += "\t\t\t\t\t<tr bgColor=\"#e0e0e0\">\n";
-
- if(colcaption != "")
- sXSLTInfo += "\t\t\t\t\t\t<td "+sTdStyle+" align=\"center\"><![CDATA[" + colcaption + "]]></td> \n";
- else
- sXSLTInfo += "\t\t\t\t\t\t<td "+sTdStyle+" align=\"center\"><![CDATA[※]]></td> \n";
-
- var rowidx = 0;
-
- // 테이블의 컬럼을 먼저 표현
- for(var j = 1; j <= subcntXrow; j++)
- {
- var label = subXList.item(j-1).selectSingleNode("degnitemnm").text;
-
- sTdStyle = "style=\"";
- if(colWidths[j] == "")
- sTdStyle += "width:"+ fGetLblWidth(degnitemno, label) +"px; ";
- else
- sTdStyle += "width:"+ colWidths[j] +"px; ";
-
- if(colHeights[j] != null)
- sTdStyle += "height:"+ colHeights[j] +"px; ";
- else
- sTdStyle += "height:"+ grdcolheight +"px; ";
-
- //sTdStyle += "\"";
- sTdStyle = sTdStyle + TdFontStyle + "\"";
-
- StyleArr[j] = sTdStyle;
-
- sXSLTInfo += "\t\t\t\t\t\t<td "+ StyleArr[j] +" align=\"center\"><![CDATA["+label+"]]></td> \n";
- }
- sXSLTInfo += "\t\t\t\t\t</tr> \n";
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // 2. Y축 컬럼을 만듬.
- var colidx = "";
-
- for(var row = 0; row < subcntYrow; row++)
- {
- var Ylabel = subYList.item(row).selectSingleNode("degnitemnm").text;
-
- colidx = degnitemlevlcdArr[row];
-
- sXSLTInfo += "\t\t\t\t\t<tr>\n";
-
- for(var col = 0; col < colidx.length; col++)
- {
- if(col == 0)
- {
- Ylabel = GetDegnitemnmTrans(Ylabel);
- sXSLTInfo += "\t\t\t\t\t\t<td "+StyleArr[col] + " bgColor=\"#e0e0e0\" align=\"center\">"+Ylabel+"</td>\n";
- /*
- var temp = fGetLblWidth(degnitemno, Ylabel);
-
- if(parseInt(colWidths[0]) < parseInt(temp))
- {
-
- }
- if(Ylabel != "")
- {
- lblWidth = fGetLblWidth(degnitemno, subdegnitemnm);
- if(isSearchString(Ylabel, " ") == true)
- {
- Ylabel = GetDegnitemnmTrans(Ylabel);
- }
- }
- sXSLTInfo += "\t\t\t\t\t\t<td "+StyleArr[col] + " bgColor=\"#e0e0e0\" align=\"center\">"+Ylabel+"</td>\n";
- */
-
-
- //sXSLTInfo += "\t\t\t\t\t\t<td "+StyleArr[col] +" bgColor=\"#e0e0e0\" align=\"center\"><xsl:value-of select=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + colidx[col] + "' and rowno='" + row + "' and colno='" + col + "']/degnitemnm\"/></td>\n";
- //sXSLTInfo += "\t\t\t\t\t\t<td "+StyleArr[col] + " bgColor=\"#e0e0e0\" align=\"center\"><![CDATA["+Ylabel+"]]></td>\n";
- }
- else
- {
- sXSLTInfo += "\t\t\t\t\t\t<td "+StyleArr[col] +"><pre><xsl:value-of select=\"normalize-space(" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + colidx[col] + "' and rowno='" + row + "' and colno='" + col + "']/reccnts)\"/></pre></td>\n";
- }
- }
- sXSLTInfo += "\t\t\t\t\t</tr>\n";
- }
- }
-
- sXSLTInfo += "\t\t\t\t</table>\n ";
- sXSLTInfo += "\t\t\t\t</div>\n ";
-
- var Grdmode = "GRD:" + gridtype;
-
- fMakeXSLTMatchTemplate(Grdmode, degnitemlevlcdArr, degnitemcd, StyleArr);
-
- sDivWidth = ctrlPosition.x + parseInt(ctrlPosition.width);
- if(ctrlPosition.height > sDivHeight)
- sDivHeight = y + ctrlPosition.height;
-
- g_pageInfo.curxpos += parseInt(ctrlPosition.width) +g_pageInfo.offsetx;
-
- return ctrlPosition;
- }
- /**
- * @desc : 멀티 checkbox, radio 버튼 생성
- * @
- * @param :
- * @return :
- *@history:
- 2008-10-21 인쇄시 체크박스 및 라디오버튼이 비활성화된 상태이기 때문에 인쇄가 흐릿하여 비활성화를 삭제함.
- * @---------------------------------------------------
- */
- function fDrawHTMLSel(x, y, row)
- {
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Degnitemno => Degnitemlevlcd 로 변경
- var degnitemno = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemno");
- var degnitemlevlcd = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemlevlcd");
- var degnitemkind = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemkind");
- var elementName = "";
- var ref = "";
-
- if(degnitemkind == "MSL") // checkbox
- {
- elementName = "type=\"checkbox\"";
- ref = g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcd + "' and colno = '#colno#']/rectermcd";
- }
- else if(degnitemkind == "SSL") //radio
- {
- elementName = "type=\"radio\"";
- ref = g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcd + "']/rectermcd";
- }
- else
- return;
-
- var cellspacing = 15;
- var lblWidth = 0;
- var subcnt = getNodesetCnt(model, g_pageInfo.formdegnRef + "[degnitemkind='SSU' and supdegnitemno='" + degnitemno + "']");
- var sStyle = "";
-
- for(var j = 0; j < subcnt; j++)
- {
- var cvrtRef = ref.setReplaceWord("#colno#", j);
- var subtermcd = instance1.selectNodes(g_pageInfo.formdegnRef + "[degnitemkind='SSU' and supdegnitemno='" + degnitemno + "']/termcd").item(j).text;
- var subdegnitemno = instance1.selectNodes(g_pageInfo.formdegnRef + "[degnitemkind='SSU' and supdegnitemno='" + degnitemno + "']/degnitemno").item(j).text;
- var subdegnitemkind = instance1.selectNodes(g_pageInfo.formdegnRef + "[degnitemkind='SSU' and supdegnitemno='" + degnitemno + "']/degnitemkind").item(j).text;
- var subdegnitemnm = instance1.selectNodes(g_pageInfo.formdegnRef + "[degnitemkind='SSU' and supdegnitemno='" + degnitemno + "']/degnitemnm").item(j).text;
-
- var subitemattrval = instance1.selectNodes(g_pageInfo.formdegnRef + "[degnitemkind='SSU' and supdegnitemno='" + degnitemno + "']/itemattrval").item(j).text;
- var subdegnattrval = instance1.selectNodes(g_pageInfo.formdegnRef + "[degnitemkind='SSU' and supdegnitemno='" + degnitemno + "']/degnattrval").item(j).text;
-
- lblWidth = fGetLblWidth(degnitemno, subdegnitemnm);
- var ctrlid = subdegnitemkind + "_" + subdegnitemno;
- var ctrlPosition = new Position(x, y, 100, 20);
-
- /*
- var sComStyle = getNewXSLTStyleVal(ctrlid, ctrlPosition, subdegnattrval, degnitemkind);
- ctrlPosition.width = lblWidth;
- sStyle = sComStyle+"top:"+ctrlPosition.y+"px; left:"+ctrlPosition.x+"px;\"";
- */
- //var sComStyle = getSelXSLTStyleVal(ctrlid, ctrlPosition, subdegnattrval, degnitemkind);
-
- var sTmpStyle = "style=\"position:absolute; ";
- var sStyle = "";
- var ssuLeft = "";
- var ssuTop = "";
- var ssuWidth = "";
- var ssuHeight = "";
- /*
- var FontStyle = "";
- if(document.controls(ctrlid) != null)
- {
- // FontName
- var fontfamilyArr = document.controls(ctrlid).attribute("font-family").split(",");
-
- if(fontfamilyArr.length > 0)
- {
- FontStyle += getXSLTCtrlAttribute("font-family", fontfamilyArr[0]);
- }
- else
- FontStyle += getXSLTCtrlAttribute("font-family", getStyleValue(degnattrval, "font-family", sCtrlType));
-
- // FontSize
- var fontSize = document.controls(ctrlid).attribute("font-size");
-
- if(fontSize != "")
- FontStyle += getXSLTCtrlAttribute("font-size", (parseInt(fontSize) - 3));
- else
- FontStyle += getXSLTCtrlAttribute("font-size", "9");
-
- FontStyle += getXSLTCtrlAttribute("font-weight", document.controls(ctrlid).attribute("font-weight"));
- FontStyle += getXSLTCtrlAttribute("font-style", document.controls(ctrlid).attribute("font-style"));
- FontStyle += getXSLTCtrlAttribute("text-decoration", document.controls(ctrlid).attribute("text-decoration"));
-
- var fontColor = document.controls(ctrlid).attribute("color");
- if(fontColor != "")
- {
- if(fontColor.charAt(0) != "#")
- FontStyle += getXSLTCtrlAttribute("color", "#" + fontColor);
- else
- FontStyle += getXSLTCtrlAttribute("color", fontColor);
- }
- }
- else
- {
- FontStyle += getXSLTCtrlAttribute("font-family", getStyleValue(degnattrval, "font-family", sCtrlType));
-
- var fontSize = getStyleValue(degnattrval, "font-size", sCtrlType);
-
- if(fontSize != "")
- FontStyle += getXSLTCtrlAttribute("font-size", (parseInt(fontSize) - 3));
- else
- FontStyle += getXSLTCtrlAttribute("font-size", "9");
-
- FontStyle += getXSLTCtrlAttribute("font-weight", getStyleValue(degnattrval, "font-weight", sCtrlType));
- FontStyle += getXSLTCtrlAttribute("font-style", getStyleValue(degnattrval, "font-style", sCtrlType));
- FontStyle += getXSLTCtrlAttribute("text-decoration", getStyleValue(degnattrval, "text-decoration", sCtrlType));
- FontStyle += getXSLTCtrlAttribute("color", getStyleValue(degnattrval, "color", sCtrlType));
- }
-
-
- // position
- if(document.controls(ctrlid) != null)
- {
- ssuLeft = document.controls(ctrlid).attribute("left");
- }
- else
- ssuLeft = getStyleValue(degnattrval, "left", sCtrlType);
-
- if(ssuLeft == "") sLeft = pCtrlPosition.x;
- else{
- ssuLeft = parseInt(ssuLeft);
- }
-
- if(document.controls(ctrlid) != null)
- {
- ssuTop = document.controls(ctrlid).attribute("top");
- }
- else
- ssuTop= getStyleValue(degnattrval, "top", sCtrlType);
-
- if(ssuTop=="")
- ssuTop = pCtrlPosition.y;
- else{
- ssuTop = parseInt(ssuTop);
- }
-
- if(document.controls(ctrlid) != null)
- {
- ssuWidth = document.controls(ctrlid).attribute("width");
- }
- else
- ssuWidth= getStyleValue(degnattrval, "width", sCtrlType);
-
- if(ssuWidth=="")
- ssuWidth = pCtrlPosition.width;
- else{
- ssuWidth = parseInt(ssuWidth);
- }
-
- if(document.controls(ctrlid) != null)
- {
- ssuHeight = document.controls(ctrlid).attribute("height");
- }
- else
- ssuHeight= getStyleValue(degnattrval, "height", sCtrlType);
-
- if(ssuHeight=="")
- ssuHeight = pCtrlPosition.height;
- else{
- ssuHeight = parseInt(ssuHeight);
- }
-
- sStyle = sTmpStyle + FontStyle + "left:" + ssuLeft + "px; top:" + ssuTop + "px; width:" + ssuWidth + "px; height:" + ssuHeight + "px; \"";
- */
- var sStyleArr = new Array(2);
- sStyleArr = getSelSSUXSLTStyleVal(ctrlid, ctrlPosition, subdegnattrval, degnitemkind);
-
- ctrlPosition.width = lblWidth;
-
- sXSLTInfo += "\t\t\t\t\t<xsl:choose>\n";
- sXSLTInfo += "\t\t\t\t\t\t<xsl:when test=\""+cvrtRef+" = '"+subtermcd+"'\"> \n";
-
- // 체크박스 및 라디오버튼 비활성화 삭제
- //sXSLTInfo += "\t\t\t\t\t\t<input "+elementName+" id=\""+ctrlid+"\" "+ sStyle +" value=\""+subtermcd+ "\" checked = \"true\" /> \n";
- sXSLTInfo += "\t\t\t\t\t\t<input "+elementName+" id=\""+ctrlid+"\" "+ sStyleArr[0] +" value=\""+subtermcd+ "\" checked = \"true\" /> \n";
-
- sXSLTInfo += "\t\t\t\t\t\t</xsl:when>\n";
- sXSLTInfo += "\t\t\t\t\t\t<xsl:otherwise>\n";
-
- //sXSLTInfo += "\t\t\t\t\t\t<input "+elementName+" id=\""+ctrlid+"\" "+ sStyle +" value=\""+subtermcd+ "\" /> \n";
- sXSLTInfo += "\t\t\t\t\t\t<input "+elementName+" id=\""+ctrlid+"\" "+ sStyleArr[0] +" value=\""+subtermcd+ "\" /> \n";
-
- sXSLTInfo += "\t\t\t\t\t\t</xsl:otherwise>\n";
- sXSLTInfo += "\t\t\t\t\t</xsl:choose>\n";
-
- ctrlPosition.x += 20;
- //sStyle = sComStyle+"top:"+ctrlPosition.y+"px; left:"+ctrlPosition.x+"px;\"";
- //sStyle = sTmpStyle + FontStyle + "left:" + (parseInt(ssuLeft)+20) + "px; top:" + ssuTop + "px; width:" + ssuWidth + "px; height:" + ssuHeight + "px; \"";
- //sXSLTInfo += "\t\t\t\t<pre "+sStyle+"><![CDATA["+subdegnitemnm+"]]></pre> \n";
-
- sXSLTInfo += "\t\t\t\t<pre id=\""+ctrlid+"\" "+sStyleArr[1]+"><![CDATA["+subdegnitemnm+"]]></pre> \n";
- x = parseInt(ctrlPosition.x) + parseInt(ctrlPosition.width) + cellspacing;
-
- if(getStyleValue(subitemattrval, "extn") == "visible")
- {
- ctrlPosition.x = parseInt(ctrlPosition.x) + parseInt(ctrlPosition.width) + g_pageInfo.offsetx;
- var ctrlPosition = fDrawHTMLStx(ctrlPosition.x, ctrlPosition.y, 100, ctrlPosition.height, row + j + 1, "extn");
- x = parseInt(ctrlPosition.x) + parseInt(ctrlPosition.width) +g_pageInfo.offsetx;
- }
- }
-
- return ctrlPosition;
- }
- /**
- * @desc : <xsl:if> -> <csl:choose> 로 변경
- * @
- * @param :
- * @return :
- * @history : 2008-11-07 이경희 => xpath 비교 조건을 기존의 rectermnm 에서 rectermcd 로 변경, disabled=true 삭제
- * @---------------------------------------------------
- */
- function fDrawHTMLBool(x, y, row)
- {
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Degnitemno => Degnitemlevlcd 로 변경
- var degnitemno = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemno");
- var degnitemlevlcd = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemlevlcd");
-
- var degnitemnm = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemnm");
- var degnitemcd = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemcd");
- var termcd = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/termcd");
- var itemattrval = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/itemattrval");
- var degnattrval = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval");
- var ctrlPosition = new Position(x, y, 0, parseInt(sDivHeight));
- ctrlPosition.width += fGetLblWidth(degnitemno, degnitemnm);
- if(ctrlPosition.width < 120)
- ctrlPosition.width = 120;
- var ctrlid = "BOL_" + degnitemno;
- //var sStyle = getXSLTStyleVal(ctrlPosition, degnattrval, "BOL");
- //sStyle += "top:"+ctrlPosition.y+"px; left:"+ctrlPosition.x+"px; \"";
- var sStyle = getSelXSLTStyleVal(ctrlid, ctrlPosition, degnattrval, "BOL");
-
- sXSLTInfo += "\t\t\t\t<xsl:choose>\n";
- sXSLTInfo += "\t\t\t\t\t<xsl:when test=\""+ g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcd + "']/rectermcd = '"+termcd+"'\"> \n";
-
- sXSLTInfo += "\t\t\t\t\t\t<input type=\"checkbox\" id=\""+ctrlid+"\" "+sStyle+" value=\""+termcd+ "\" checked = \"true\" /> \n";
- sXSLTInfo += "\t\t\t\t\t</xsl:when> \n";
-
- sXSLTInfo += "\t\t\t\t\t<xsl:otherwise> \n";
-
- sXSLTInfo += "\t\t\t\t\t\t<input type=\"checkbox\" id=\""+ctrlid+"\" "+sStyle+" value=\""+termcd+ "\" checked = \"false\"/> \n";
- sXSLTInfo += "\t\t\t\t\t</xsl:otherwise> \n";
- sXSLTInfo += "\t\t\t\t</xsl:choose>\n";
- ctrlPosition.x += 20;
- sXSLTInfo += "\t\t\t\t<pre style=\"position:absolute; top:"+ ctrlPosition.y +"px; left:"+ ctrlPosition.x +"px; \"><![CDATA["+degnitemnm+"]]></pre> \n";
-
- sDivWidth = ctrlPosition.x + parseInt(ctrlPosition.width);
-
- if(ctrlPosition.height > sDivHeight)
- sDivHeight = ctrlPosition.height;
-
- g_pageInfo.curxpos += parseInt(ctrlPosition.width) +g_pageInfo.offsetx;
-
- if(getStyleValue(itemattrval, "extn") == "visible")
- {
- var subleft = ctrlPosition.x + parseInt(ctrlPosition.width) +g_pageInfo.offsetx;
- var top = ctrlPosition.height - 20;
- if(top < 0)
- top = 0;
- fDrawHTMLStx(subleft, top, 100, 20, row, "extn");
- }
-
- return ctrlPosition;
- }
-
- /**
- * @desc : 그리드의 컬럼명을 배열로 저장하여 반환한다.
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function getDegnitemlevlcd(grdtype, degnitemlevlcd)
- {
- // degnitemlevlcd 를 저장해둔다.
- var degnitemlevlcdArr = new Array();
-
- // 그리드구조이므로 해당 컬럼의 degnitemlevelcd를 얻어오는 작업
- var GridNodeList = findNodeset(model, g_pageInfo.RecinfoGridRef + "[degnitemlevlcd = '" + degnitemlevlcd + "']");
-
- if(GridNodeList.length == 0)
- GridNodeList = findNodeset(model, g_pageInfo.initRecinfoGridRef + "[degnitemlevlcd = '" + degnitemlevlcd + "']");
-
- if(GridNodeList.length > 0)
- {
- if(grdtype == "Y" || grdtype == "G") //Y축 누적
- {
- var subgrdNode = GridNodeList.item(0);
- var recitemNodeList = subgrdNode.selectNodes("recitem");
-
- for(var idx = 0; idx < recitemNodeList.length; idx++)
- {
- var subrecitemNode = recitemNodeList.item(idx);
-
- degnitemlevlcdArr[idx] = subrecitemNode.selectSingleNode("degnitemlevlcd").text;
- }
- }
- else if(grdtype == "X") //X축 누적
- {
- for(var row = 0; row < GridNodeList.length; row++)
- {
- var subgrdNode = GridNodeList.item(row);
- var recitemNodeList = subgrdNode.selectNodes("recitem");
-
- degnitemlevlcdArr[row] = new Array(recitemNodeList.length);
-
- for(var col = 0; col < recitemNodeList.length; col++)
- {
- var subrecitemNode = recitemNodeList.item(col);
-
- degnitemlevlcdArr[row][col] = subrecitemNode.selectSingleNode("degnitemlevlcd").text;
- }
- }
- }
- else if(grdtype == "T") //테이블
- {
- for(var row = 0; row < GridNodeList.length; row++)
- {
- var subgrdNode = GridNodeList.item(row);
- var recitemNodeList = subgrdNode.selectNodes("recitem");
-
- degnitemlevlcdArr[row] = new Array(recitemNodeList.length-1);
-
- for(var col = 0; col < recitemNodeList.length-1; col++)
- {
- var subrecitemNode = recitemNodeList.item(col+1);
-
- degnitemlevlcdArr[row][col] = subrecitemNode.selectSingleNode("degnitemlevlcd").text;
- }
- }
-
- }
- else if(grdtype == "CCN" || grdtype == "DIAG" || grdtype == "OPN")
- {
- var subgrdNode = GridNodeList.item(0);
- var recitemNodeList = subgrdNode.selectNodes("recitem");
-
- for(var idx = 0; idx < recitemNodeList.length; idx++)
- {
- var subrecitemNode = recitemNodeList.item(idx);
-
- degnitemlevlcdArr[idx] = subrecitemNode.selectSingleNode("degnitemlevlcd").text;
- }
- }
- }
- return degnitemlevlcdArr;
- }
- /**
- * @desc : 그리드의 컬럼명을 배열로 저장하여 반환한다.
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function getDegnitemcd(grdtype, degnitemlevlcd)
- {
- // degnitemlevlcd 를 저장해둔다.
- var degnitemcd = "";
-
- // 그리드구조이므로 해당 컬럼의 degnitemlevelcd를 얻어오는 작업
- var GridNodeList = findNodeset(model, g_pageInfo.RecinfoGridRef + "[degnitemlevlcd = '" + degnitemlevlcd + "']");
-
- if(GridNodeList.length == 0)
- GridNodeList = findNodeset(model, g_pageInfo.initRecinfoGridRef + "[degnitemlevlcd = '" + degnitemlevlcd + "']");
-
- if(GridNodeList.length > 0)
- {
- if(grdtype == "Y" || grdtype == "G") //Y축 누적
- {
- var subgrdNode = GridNodeList.item(0);
- var recitemNodeList = subgrdNode.selectNodes("recitem");
-
- for(var idx = 0; idx < recitemNodeList.length; idx++)
- {
- var subrecitemNode = recitemNodeList.item(idx);
-
- var rowno = subrecitemNode.selectSingleNode("rowno").text;
- var colno = subrecitemNode.selectSingleNode("colno").text;
- var degnitemkind = subrecitemNode.selectSingleNode("degnitemkind").text;
-
- if(rowno == 0 && colno == 0)
- {
- degnitemcd = subrecitemNode.selectSingleNode("degnitemcd").text;
- break;
- }
- }
- }
- else if(grdtype == "X") //X축 누적
- {
- for(var row = 0; row < GridNodeList.length; row++)
- {
- var subgrdNode = GridNodeList.item(row);
- var recitemNodeList = subgrdNode.selectNodes("recitem");
-
- degnitemlevlcdArr[row] = new Array(recitemNodeList.length);
-
- for(var col = 0; col < recitemNodeList.length; col++)
- {
- var subrecitemNode = recitemNodeList.item(col);
-
- degnitemlevlcdArr[row][col] = subrecitemNode.selectSingleNode("degnitemlevlcd").text;
- }
- }
- }
- else if(grdtype == "T") //테이블
- {
- for(var row = 0; row < GridNodeList.length; row++)
- {
- var subgrdNode = GridNodeList.item(row);
- var recitemNodeList = subgrdNode.selectNodes("recitem");
-
- degnitemlevlcdArr[row] = new Array(recitemNodeList.length-1);
-
- for(var col = 0; col < recitemNodeList.length-1; col++)
- {
- var subrecitemNode = recitemNodeList.item(col+1);
-
- degnitemlevlcdArr[row][col] = subrecitemNode.selectSingleNode("degnitemlevlcd").text;
- }
- }
-
- }
- else if(grdtype == "CCN" || grdtype == "DIAG" || grdtype == "OPN")
- {
- var subgrdNode = GridNodeList.item(0);
- var recitemNodeList = subgrdNode.selectNodes("recitem");
-
- for(var idx = 0; idx < recitemNodeList.length; idx++)
- {
- var subrecitemNode = recitemNodeList.item(idx);
-
- degnitemcd = subrecitemNode.selectSingleNode("degnitemlevlcd").text;
- }
- }
- }
- return degnitemcd;
- }
- /**
- * @desc : 진단명 XSLT 생성
- * @
- * @param :
- * @return :
- * @history : 2008-07-25 배경색이 검정색으로 되어 있어 글자가 보이지 않아 삭제.
- 2008-10-23 진단명에서 진단코드 컬럼 삭제
- * @---------------------------------------------------
- */
- function fDrawXSLTDiagName(x, y, row)
- {
- var width = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval"), "width");
- if(width != "")
- width = parseInt(width);
-
- var height = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval"), "height");
- if(height != "")
- height = parseInt(height);
-
- if(width == "")
- width = 500;
- if(height == "")
- height = 300;
-
- // var ctrlSize = new SIZE(width, height);
- var ctrlPosition = new Position(x, y, width, height);
-
- var degnitemno = model.getValue(g_pageInfo.formdegnRef +"[" + row + "]/degnitemno");
- var degnitemkind = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemkind");
- var degnitemlevlcd = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemlevlcd");
- var degnattrval = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval");
- var degnitemcd = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemcd");
-
- var degnitemlevlcdArr = getDegnitemlevlcd("DIAG", degnitemlevlcd);
- var type = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/itemattrval"), "type");
- var ctrlid = "DGN_" + degnitemno;
-
- if(type != "btn")
- {
- var grdcaption = new Array("R/O","주","진단명", "Comments");
- //var grdcolwidth = new Array(30,30,360,150);
- var grdcolwidth = new Array(30,30,400,180);
-
- var grdcolheight = g_Base_GrdColHeight;
- var colWidths = getStyleValue(degnattrval, "colwidth", "ctrl").split("^");
- var colHeights = getStyleValue(degnattrval, "rowheight", "ctrl").split("^");
- /*
- var tmpHeight = getStyleValue(degnattrval, "rowheight", "ctrl");
- if(tmpHeight == "")
- {
- for(var pos=0; pos < grdcaption.length; pos++)
- {
- colHeights[pos] = "23";
- }
- }
- */
- var sTdStyle = "";
-
- //var sStyle = getXSLTStyleVal(ctrlPosition, degnattrval, "ctrl");
- var sStyle = getNewXSLTStyleVal(ctrlid, ctrlPosition, degnattrval, "ctrl");
-
- var tmpWidth = getStyleValue(degnattrval, "ctrl.width");
- var tmpHeight = getStyleValue(degnattrval, "ctrl.height");
- sXSLTInfo += "\t\t\t\t<div id=\"C_"+ctrlid+"\" style=\"position:absolute; left:0px; top:0px; width:" + tmpWidth + "px; height:" + tmpHeight + "px; \">\n";
- //sXSLTInfo += "\t\t\t\t<div id=\"C_"+ctrlid+"\" style=\"position:absolute; left:0px; top:0px; \">\n";
-
- // Table 에 Style 정보를 추가
- sXSLTInfo += "\t\t\t\t<table id=\""+ctrlid+"\" "+sStyle+" border=\"1\" frame=\"box\" bordercolor=\"silver\" cellspacing=\"0\">\n";
- //sXSLTInfo += "\t\t\t\t<table id=\""+ctrlid+"\" border=\"1\" frame=\"box\" bordercolor=\"silver\" cellspacing=\"0\">\n";
- sXSLTInfo += "\t\t\t\t\t<tr bgColor=\"#e0e0e0\">\n";
-
- var StyleArr = new Array();
-
- var TdFontStyle = getTableXSLTStyleVal(ctrlid, ctrlPosition, degnattrval, "ctrl");
-
- for(var j=0; j<grdcaption.length; j++){
- sTdStyle = "style=\"";
- if(colWidths.length == grdcaption.length)
- sTdStyle += "width:"+ colWidths[j] +"px; ";
- else
- sTdStyle += "width:"+ grdcolwidth[j] +"px; ";
- if(colHeights.length == grdcaption.length)
- sTdStyle += "height:"+ colHeights[j] +"px; ";
- else
- sTdStyle += "height:"+ grdcolheight +"px; ";
-
- sTdStyle = sTdStyle + TdFontStyle + "\"";
-
- StyleArr[j] = sTdStyle;
-
- sXSLTInfo += "\t\t\t\t\t\t<td "+ sTdStyle +" align=\"center\"><![CDATA["+grdcaption[j]+"]]></td>\n";
- }
- sXSLTInfo += "\t\t\t\t\t</tr>\n";
-
- sXSLTInfo += "\t\t\t\t\t<xsl:apply-templates select=\"" +g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[3] + "']\"/>\n";
- //sXSLTInfo += "\t\t\t\t\t<xsl:apply-templates select=\"" +g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[1] + "']\"/>\n";
- sXSLTInfo += "\t\t\t\t</table>\n";
- sXSLTInfo += "\t\t\t\t</div>\n";
- }
-
- fMakeXSLTMatchTemplate("DIAG", degnitemlevlcdArr, degnitemcd, StyleArr);
-
- sDivWidth = ctrlPosition.x + parseInt(ctrlPosition.width);
-
- if(ctrlPosition.height > sDivHeight)
- sDivHeight = ctrlPosition.height;
-
- g_pageInfo.curxpos += parseInt(ctrlPosition.width) +g_pageInfo.offsetx;
-
- return ctrlPosition;
- }
- /**
- * @group :
- * @ver : 2008.07.24
- * @by : 이경희
- * @modify:
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : mode에 따라 match template를 생성한다.
- * @param : mode (GRD: 그리드, DIAG: 진단명, CCN: 주호소, OPN: 수술명)
- * @param : degnitemlevlcdArr (degnitemlevlcd의 배열)
- * @return :
- * @---------------------------------------------------
- */
- function fMakeXSLTMatchTemplate(mode, degnitemlevlcdArr, degnitemcd, StyleArr)
- {
- var grdMode = mode.split(":")[0];
- var grdType = mode.split(":")[1];
-
- for(var idx = 0; idx < g_MatchTemplate.length; idx++)
- {
- var strTemplate = g_MatchTemplate[idx];
-
- if(strTemplate == "")
- break;
- }
-
- switch(grdMode)
- {
- case "GRD":
- g_MatchTemplate[idx] = fMakeGridTemplate(grdType, degnitemlevlcdArr, degnitemcd, StyleArr);
- break;
- case "DIAG":
- g_MatchTemplate[idx] = fMakeDiagTemplate(degnitemlevlcdArr, StyleArr);
- break;
- case "CCN":
- g_MatchTemplate[idx] = fMakeCCNTemplate(degnitemlevlcdArr, StyleArr);
- break;
- case "OPN":
- g_MatchTemplate[idx] = fMakeOPNTemplate(degnitemlevlcdArr, StyleArr);
- break;
- }
- }
- function fMakeGridTemplate(gridtype, degnitemlevlcdArr, degnitemcd, StyleArr)
- {
- g_pageInfo = new PAGEINFO();
-
- var TemplateInfo = "";
-
- if(gridtype == "Y") //Y축 누적
- {
- TemplateInfo += "\n<xsl:template match=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[1] + "' and degnitemcd = '" + degnitemcd + "']\">\n";
- TemplateInfo += "\t<xsl:variable name=\"rowno\" select=\"rowno\"/>\n";
- TemplateInfo += "\t<tr>\n";
-
- for(var idx = 1; idx < degnitemlevlcdArr.length; idx++)
- {
- TemplateInfo += "\t\t<td " + StyleArr[idx-1] + "><pre><xsl:value-of select=\"normalize-space(" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[idx] + "' and rowno=$rowno and colno='" + (idx-1) + "']/reccnts)\"/></pre></td>\n";
-
- //TemplateInfo += "\t\t<td " + StyleArr[idx-1] + "><pre><xsl:value-of select=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[idx] + "' and rowno=$rowno and colno='" + (idx-1) + "']/reccnts\"/></pre></td>\n";
- //TemplateInfo += "\t\t<td><pre><xsl:value-of select=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[idx] + "' and rowno=$rowno and colno='" + (idx-1) + "']/reccnts\"/></pre></td>\n";
- }
- TemplateInfo += "\t</tr>\n";
- TemplateInfo += "</xsl:template>\n";
- }
- else if(gridtype == "G") //G축 누적
- {
- TemplateInfo += "\n<xsl:template match=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[1] + "']\">\n";
- TemplateInfo += "\t<xsl:variable name=\"rowno\" select=\"rowno\"/>\n";
- TemplateInfo += "\t<tr>\n";
-
- for(var idx = 1; idx < degnitemlevlcdArr.length; idx++)
- {
- TemplateInfo += "\t\t<td " + StyleArr[idx-1] + "><pre><xsl:value-of select=\"normalize-space(" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[idx] + "' and rowno=$rowno and colno='" + (idx-1) + "']/reccnts)\"/></pre></td>\n";
- //TemplateInfo += "\t\t<td " + StyleArr[idx-1] + "><pre><xsl:value-of select=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[idx] + "' and rowno=$rowno and colno='" + (idx-1) + "']/reccnts\"/></pre></td>\n";
- //TemplateInfo += "\t\t<td><pre><xsl:value-of select=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[idx] + "' and rowno=$rowno and colno='" + (idx-1) + "']/reccnts\"/></pre></td>\n";
- }
- TemplateInfo += "\t</tr>\n";
- TemplateInfo += "</xsl:template>\n";
- }
- return TemplateInfo;
- }
- /**
- * @group :
- * @ver : 2008.07.24
- * @by : 이경희
- * @modify:
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 진단명의 match template를 생성하여 반환한다.
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fMakeDiagTemplate(degnitemlevlcdArr, StyleArr)
- {
- g_pageInfo = new PAGEINFO();
-
- var TemplateInfo = "";
- // CheckBox에 Pre 태그 없는 버전
- // 첫번째 loop는 주진단, 두번째 loop는 R/O
- //for(var idx=0; idx < 2; idx++)
- //{
- TemplateInfo += "\n<xsl:template match=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[3] + "']\">\n";
- TemplateInfo += "\t<xsl:variable name=\"rowno\" select=\"rowno\"/>\n";
- TemplateInfo += "\t<tr>\n";
-
- // R/O
- TemplateInfo += "\t\t<td "+ StyleArr[0] + ">\n";
-
- /*
- TemplateInfo += "\t\t\t<xsl:if test=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[1] +"' and rowno=$rowno and colno='0']/reccnts = 'R'\">\n";
- TemplateInfo += "\t\t\t\t<input type=\"checkbox\" name=\"RO\" checked=\"true\"/></xsl:if>\n";
- TemplateInfo += "\t\t\t<xsl:if test=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[1] +"' and rowno=$rowno and colno='0']/reccnts != 'R'\">\n";
- TemplateInfo += "\t\t\t\t<input type=\"checkbox\" name=\"RO\"/></xsl:if>\n";
- */
- TemplateInfo += "\t\t\t<xsl:choose>\n";
- TemplateInfo += "\t\t\t\t<xsl:when test=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[1] +"' and rowno=$rowno and colno='0']/reccnts[(.=\'R')] \">\n";
- TemplateInfo += "\t\t\t\t\t<input type=\"checkbox\" name=\"RO\" checked=\"true\"/>\n";
- TemplateInfo += "\t\t\t\t</xsl:when>\n";
- TemplateInfo += "\t\t\t\t<xsl:otherwise>\n";
- TemplateInfo += "\t\t\t\t\t<input type=\"checkbox\" name=\"RO\"/>\n";
- TemplateInfo += "\t\t\t\t</xsl:otherwise>\n";
- TemplateInfo += "\t\t\t</xsl:choose>\n";
- TemplateInfo += "\t\t</td>\n";
- //}
- //else
- //{
- // 주
- TemplateInfo += "\t\t<td "+ StyleArr[1] + ">\n";
- /*
- TemplateInfo += "\t\t\t<xsl:if test=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[2] +"' and rowno=$rowno and colno='1']/reccnts = 'M'\">\n";
- TemplateInfo += "\t\t\t\t<input type=\"checkbox\" name=\"MS\" checked=\"true\"/></xsl:if>\n";
- TemplateInfo += "\t\t\t<xsl:if test=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[2] +"' and rowno=$rowno and colno='1']/reccnts != 'M'\">\n";
- TemplateInfo += "\t\t\t\t<input type=\"checkbox\" name=\"MS\"/></xsl:if>\n";
- */
- TemplateInfo += "\t\t\t<xsl:choose>\n";
- TemplateInfo += "\t\t\t\t<xsl:when test=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[2] +"' and rowno=$rowno and colno='1']/reccnts[(.=\'M')] \">\n";
- TemplateInfo += "\t\t\t\t\t<input type=\"checkbox\" name=\"MS\" checked=\"true\"/>\n";
- TemplateInfo += "\t\t\t\t</xsl:when>\n";
- TemplateInfo += "\t\t\t\t<xsl:otherwise>\n";
- TemplateInfo += "\t\t\t\t\t<input type=\"checkbox\" name=\"MS\"/>\n";
- TemplateInfo += "\t\t\t\t</xsl:otherwise>\n";
- TemplateInfo += "\t\t\t</xsl:choose>\n";
- TemplateInfo += "\t\t\t</td>\n";
- //}
-
- // 진단코드
- // 2008-10-23 진단코드 삭제
- //TemplateInfo += "\t\t<td "+ StyleArr[2] + "><xsl:value-of select=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[3] + "' and rowno=$rowno and colno='2']/rectermcd\"/></td>\n";
-
- // 진단명
- TemplateInfo += "\t\t<td "+ StyleArr[2] + "><xsl:value-of select=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[3] + "' and rowno=$rowno and colno='2']/rectermnm\"/></td>\n";
-
- // Comments
- TemplateInfo += "\t\t<td "+ StyleArr[3] + "><xsl:value-of select=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[3] + "' and rowno=$rowno and colno='2']/reccnts\"/></td>\n";
-
- TemplateInfo += "\t</tr>\n";
- TemplateInfo += "</xsl:template>\n";
- //}
- return TemplateInfo;
- }
- /**
- * @group :
- * @ver : 2008.07.24
- * @by : 이경희
- * @modify:
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 주호소의 match template를 생성하여 반환한다.
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fMakeCCNTemplate(degnitemlevlcdArr, StyleArr)
- {
- g_pageInfo = new PAGEINFO();
- var TemplateInfo = "";
-
- //TemplateInfo += "\n<xsl:template match=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[0] + "']\">\n";
- TemplateInfo += "\n<xsl:template match=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[1] + "']\">\n";
- TemplateInfo += "\t<xsl:variable name=\"rowno\" select=\"rowno\"/>\n";
- TemplateInfo += "\t<tr>\n";
-
- // 빈칸
- //TemplateInfo += "\t\t<td " + StyleArr[0] + "><pre></pre></td>\n";
-
- // 주호소코드
- //TemplateInfo += "\t\t<td " + StyleArr[0] + "><pre><xsl:value-of select=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[1] + "' and rowno=$rowno and colno='0']/rectermcd\"/></pre></td>\n";
- /*
- if(StyleArr[0] == null)
- {
- TemplateInfo += "\t\t<td><xsl:value-of select=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[1] + "' and rowno=$rowno and colno='0']/rectermcd\"/></td>\n";
- }
- else
- {
- TemplateInfo += "\t\t<td " + StyleArr[0] + "><xsl:value-of select=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[1] + "' and rowno=$rowno and colno='0']/rectermcd\"/></td>\n";
- }*/
-
- // 주호소명
- if(StyleArr[0] == null)
- {
- //TemplateInfo += "\t\t<td " + StyleArr[1] + "><pre><xsl:value-of select=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[1] + "' and rowno=$rowno and colno='0']/rectermnm\"/></pre></td>\n";
- TemplateInfo += "\t\t<td><xsl:value-of select=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[1] + "' and rowno=$rowno and colno='0']/rectermnm\"/></td>\n";
- }
- else
- {
- TemplateInfo += "\t\t<td " + StyleArr[0] + "><xsl:value-of select=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[1] + "' and rowno=$rowno and colno='0']/rectermnm\"/></td>\n";
- }
-
- // Comments
- if(StyleArr[1] == null)
- {
- //TemplateInfo += "\t\t<td " + StyleArr[2] + "><pre><xsl:value-of select=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[1] + "' and rowno=$rowno and colno='0']/reccnts\"/></pre></td>\n";
- TemplateInfo += "\t\t<td><xsl:value-of select=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[1] + "' and rowno=$rowno and colno='0']/reccnts\"/></td>\n";
- }
- else
- {
- TemplateInfo += "\t\t<td " + StyleArr[1] + "><xsl:value-of select=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[1] + "' and rowno=$rowno and colno='0']/reccnts\"/></td>\n";
- }
-
- // 발생일
- if(StyleArr[2] == null)
- {
- //TemplateInfo += "\t\t<td " + StyleArr[3] + "><pre><xsl:value-of select=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[2] + "' and rowno=$rowno and colno='1']/reccnts\"/></pre></td>\n";
- TemplateInfo += "\t\t<td><xsl:value-of select=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[2] + "' and rowno=$rowno and colno='1']/reccnts\"/></td>\n";
- }
- else
- {
- TemplateInfo += "\t\t<td " + StyleArr[2] + "><xsl:value-of select=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[2] + "' and rowno=$rowno and colno='1']/reccnts\"/></td>\n";
- }
-
- TemplateInfo += "\t</tr>\n";
- TemplateInfo += "</xsl:template>\n";
-
- return TemplateInfo;
- }
- /**
- * @group :
- * @ver : 2008.07.24
- * @by : 이경희
- * @modify:
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 수술명의 match template를 생성하여 반환한다.
- * @param :
- * @param :
- * @return :
- * @history : 2008-10-28 수술코드 삭제
- * @---------------------------------------------------
- */
- function fMakeOPNTemplate(degnitemlevlcdArr, StyleArr)
- {
- g_pageInfo = new PAGEINFO();
-
- var TemplateInfo = "";
-
- TemplateInfo += "\n<xsl:template match=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[1] + "']\">\n";
- TemplateInfo += "\t<xsl:variable name=\"rowno\" select=\"rowno\"/>\n";
- TemplateInfo += "\t<tr>\n";
-
- // 빈칸
- //TemplateInfo += "\t\t<td " + StyleArr[0] + "><pre></pre></td>\n";
-
- // 수술코드
- //TemplateInfo += "\t\t<td " + StyleArr[0] + "><pre><xsl:value-of select=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[1] + "' and rowno=$rowno and colno='0']/rectermcd\"/></pre></td>\n";
-
- // 수술명
- TemplateInfo += "\t\t<td " + StyleArr[0] + "><pre><xsl:value-of select=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[1] + "' and rowno=$rowno and colno='0']/rectermnm\"/></pre></td>\n";
-
- // Comments
- TemplateInfo += "\t\t<td " + StyleArr[1] + "><pre><xsl:value-of select=\"" + g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[1] + "' and rowno=$rowno and colno='0']/reccnts\"/></pre></td>\n";
-
- TemplateInfo += "\t</tr>\n";
- TemplateInfo += "</xsl:template>\n";
-
- return TemplateInfo;
- }
- /**
- * @desc : 수술 XSLT 생성
- * @
- * @param :
- * @return :
- * @history : 2008-10-28 수술코드 삭제
- * @---------------------------------------------------
- */
- function fDrawXSLTOpName(x, y, row)
- {
- var width = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval"), "width");
- if(width != "")
- width = parseInt(width);
-
- var height = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval"), "height");
- if(height != "")
- height = parseInt(height);
-
- if(width == "")
- width = 500;
- if(height == "")
- height = 300;
- // var ctrlSize = new SIZE(width, height);
- var ctrlPosition = new Position(x, y, width, height);
- var degnitemno = model.getValue(g_pageInfo.formdegnRef +"[" + row + "]/degnitemno");
- var degnitemkind = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemkind");
- var degnitemlevlcd = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemlevlcd");
- var degnattrval = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval");
- var degnitemcd = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemcd");
- var degnitemlevlcdArr = getDegnitemlevlcd("OPN", degnitemlevlcd);
-
- var ctrlid = "OPN_" + degnitemno;
-
- // 2008-10-28 수술코드 삭제
- //var grdcaption = new Array("수술코드","수술명", "Comments");
- //var grdcolwidth = new Array(85,325, 80); // 20, 85, 301, 79
- //var grdcolheight = 23;
-
- // 2008-10-28 Comments 삭제
- var grdcaption = new Array("수술명", "Comments");
- var grdcolwidth = new Array(470, 170); // 20, 85, 301, 79
-
- //var grdcaption = new Array("수술명");
- //var OPNCtrlWidth = getStyleValue(degnattrval, "width", "ctrl");
- //var grdcolwidth = new Array(OPNCtrlWidth);
- var grdcolheight = g_Base_GrdColHeight;
-
-
- var colWidths = getStyleValue(degnattrval, "colwidth", "ctrl").split("^");
- var colHeights = getStyleValue(degnattrval, "rowheight", "ctrl").split("^");
- var sTdStyle = "";
- //var sStyle = getXSLTStyleVal(ctrlPosition, degnattrval, "ctrl");
- var sStyle = getNewXSLTStyleVal(ctrlid, ctrlPosition, degnattrval, "ctrl");
-
- //sXSLTInfo += "\t\t\t\t<div id=\"COV_"+ctrlid+"\" "+sStyle+" >\n";
- //sXSLTInfo += "\t\t\t\t<div id=\"C_"+ctrlid+"\" style=\"position:absolute; left:0px; top:0px; \">\n";
- var tmpWidth = getStyleValue(degnattrval, "ctrl.width");
- var tmpHeight = getStyleValue(degnattrval, "ctrl.height");
- sXSLTInfo += "\t\t\t\t<div id=\"C_"+ctrlid+"\" style=\"position:absolute; left:0px; top:0px; width:" + tmpWidth + "px; height:" + tmpHeight + "px; \">\n";
-
- // Table 에 Style 정보를 추가
- sXSLTInfo += "\t\t\t\t<table id=\""+ctrlid+"\" "+sStyle+" border=\"1\" frame=\"box\" bordercolor=\"silver\" cellspacing=\"0\">\n";
- //sXSLTInfo += "\t\t\t\t<table id=\""+ctrlid+"\" border=\"1\" frame=\"box\" bordercolor=\"silver\" cellspacing=\"0\">\n";
- sXSLTInfo += "\t\t\t\t\t<tr bgColor=\"#e0e0e0\">\n";
-
- var StyleArr = new Array();
- var TdFontStyle = getTableXSLTStyleVal(ctrlid, ctrlPosition, degnattrval, "ctrl");
-
- for(var j=0; j<grdcaption.length; j++)
- {
- sTdStyle = "style=\"";
- if(colWidths.length == grdcaption.length)
- sTdStyle += "width:"+ colWidths[j] +"px; ";
- else
- sTdStyle += "width:"+ grdcolwidth[j] +"px; ";
-
- if(colHeights.length == grdcaption.length)
- sTdStyle += "height:"+ colHeights[j] +"px; ";
- else
- sTdStyle += "height:"+ grdcolheight +"px; ";
-
- //sTdStyle += "\"";
- sTdStyle = sTdStyle + TdFontStyle + "\"";
-
- StyleArr[j] = sTdStyle;
-
- sXSLTInfo += "\t\t\t\t\t\t<td "+sTdStyle+" align=\"center\"><![CDATA["+grdcaption[j]+"]]></td>\n";
- }
- sXSLTInfo += "\t\t\t\t\t</tr>\n";
- sXSLTInfo += "\t\t\t\t\t<xsl:apply-templates select=\"" +g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[1] + "']\"/>\n";
- sXSLTInfo += "\t\t\t\t</table>\n";
- sXSLTInfo += "\t\t\t\t</div>\n";
-
- fMakeXSLTMatchTemplate("OPN", degnitemlevlcdArr, degnitemcd, StyleArr);
-
- sDivWidth = ctrlPosition.x + parseInt(ctrlPosition.width);
-
- if(ctrlPosition.height > sDivHeight)
- sDivHeight = ctrlPosition.height;
- g_pageInfo.curxpos += parseInt(ctrlPosition.width) +g_pageInfo.offsetx;
- return ctrlPosition;
- }
- /**
- * @desc : 주호소 XSLT 생성
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDrawXSLTCCName(x, y, row)
- {
- var width = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval"), "width");
- if(width != "")
- width = parseInt(width);
-
- var height = getStyleValue(model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval"), "height");
- if(height != "")
- height = parseInt(height);
-
- if(width == "")
- width = 500;
- if(height == "")
- height = 300;
- var ctrlPosition = new Position(x, y, width, height);
- var degnitemno = model.getValue(g_pageInfo.formdegnRef +"[" + row + "]/degnitemno");
- var degnitemkind = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemkind");
- var degnitemlevlcd = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemlevlcd");
- var degnattrval = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnattrval");
- var degnitemcd = model.getValue(g_pageInfo.formdegnRef + "[" + row + "]/degnitemcd");
- var degnitemlevlcdArr = getDegnitemlevlcd("CCN", degnitemlevlcd);
-
- var ctrlid = "CCN_" + degnitemno;
-
- // 주호소 사이즈 조절
- //var grdcaption = new Array("주호소코드","주호소명","Comments","발생일");
- //var grdcolwidth = new Array(120,180,130,100);
-
- // ctrl.width 590
- var grdcaption = new Array("주호소명","Comments","발생일");
- var grdcolwidth = new Array(260,230,110);
- var grdcolheight = g_Base_GrdColHeight;
-
- var colWidths = getStyleValue(degnattrval, "colwidth", "ctrl").split("^");
- var colHeights = getStyleValue(degnattrval, "rowheight", "ctrl").split("^");
- var sTdStyle = "";
- //var sStyle = getXSLTStyleVal(ctrlPosition, degnattrval, "ctrl");
- var sStyle = getNewXSLTStyleVal(ctrlid, ctrlPosition, degnattrval, "ctrl");
-
- //sXSLTInfo += "\t\t\t\t<div id=\"COV_"+ctrlid+"\" "+sStyle+" >\n";
- //sXSLTInfo += "\t\t\t\t<div id=\"C_"+ctrlid+"\" style=\"position:absolute; left:0px; top:0px; \">\n";
- var tmpWidth = getStyleValue(degnattrval, "ctrl.width");
- var tmpHeight = getStyleValue(degnattrval, "ctrl.height");
- sXSLTInfo += "\t\t\t\t<div id=\"C_"+ctrlid+"\" style=\"position:absolute; left:0px; top:0px; width:" + tmpWidth + "px; height:" + tmpHeight + "px; \">\n";
-
- // Table 에 Style 정보를 추가
- sXSLTInfo += "\t\t\t\t<table id=\""+ctrlid+"\" "+sStyle+" border=\"1\" frame=\"box\" bordercolor=\"silver\" cellspacing=\"0\">\n";
- //sXSLTInfo += "\t\t\t\t<table id=\""+ctrlid+"\" border=\"1\" frame=\"box\" bordercolor=\"silver\" cellspacing=\"0\">\n";
- sXSLTInfo += "\t\t\t\t\t<tr bgColor=\"#e0e0e0\">\n";
-
- var StyleArr = new Array();
- var TdFontStyle = getTableXSLTStyleVal(ctrlid, ctrlPosition, degnattrval, "ctrl");
-
- for(var j=0; j<grdcaption.length; j++)
- {
- sTdStyle = "style=\"";
- if(colWidths.length == grdcaption.length)
- sTdStyle += "width:"+ colWidths[j] +"px; ";
- else
- sTdStyle += "width:"+ grdcolwidth[j] +"px; ";
- if(colHeights.length == grdcaption.length)
- sTdStyle += "height:"+ colHeights[j] +"px; ";
- else
- sTdStyle += "height:"+ grdcolheight +"px; ";
-
- //sTdStyle += "\"";
- sTdStyle = sTdStyle + TdFontStyle + "\"";
- StyleArr[j] = sTdStyle;
-
- sXSLTInfo += "\t\t\t\t\t\t<td "+sTdStyle+" align=\"center\"><![CDATA["+grdcaption[j]+"]]></td>\n";
- }
- sXSLTInfo += "\t\t\t\t\t</tr>\n";
-
- sXSLTInfo += "\t\t\t\t\t<xsl:apply-templates select=\"" +g_pageInfo.xsltRecinfoRecitemRef + "[degnitemlevlcd='" + degnitemlevlcdArr[1] + "']\"/>\n";
- sXSLTInfo += "\t\t\t\t</table>\n";
- sXSLTInfo += "\t\t\t\t</div>\n";
-
- fMakeXSLTMatchTemplate("CCN", degnitemlevlcdArr, degnitemcd, StyleArr);
-
- sDivWidth = ctrlPosition.x + parseInt(ctrlPosition.width);
-
- if(ctrlPosition.height < sDivHeight)
- sDivHeight = ctrlPosition.height;
-
- g_pageInfo.curxpos += parseInt(ctrlPosition.width) +g_pageInfo.offsetx;
-
- return ctrlPosition;
- }
- /**
- * @desc : XSLT 스타일 값을 얻어온다.
- * @
- * @param :
- * @return :
- * @history : 2008-12-10 컨트롤의 폰트 정보를 얻어온다.
- * @---------------------------------------------------
- */
- function getTableXSLTStyleVal(ctrlid, pCtrlPosition, degnattrval, sCtrlType)
- {
- var sStyleMsg = "";
-
- // Font Style
- if(document.controls(ctrlid) != null)
- {
- // FontName
- var fontfamilyArr = document.controls(ctrlid).attribute("font-family").split(",");
-
- if(fontfamilyArr.length > 0)
- {
- sStyleMsg += getXSLTCtrlAttribute("font-family", fontfamilyArr[0]);
- }
- else
- sStyleMsg += getXSLTCtrlAttribute("font-family", getStyleValue(degnattrval, "font-family", sCtrlType));
-
- // FontSize
- var fontSize = document.controls(ctrlid).attribute("font-size");
-
- if(fontSize != "")
- sStyleMsg += getXSLTCtrlAttribute("font-size", (parseInt(fontSize) - 3));
- else
- sStyleMsg += getXSLTCtrlAttribute("font-size", "9");
-
- sStyleMsg += getXSLTCtrlAttribute("font-weight", document.controls(ctrlid).attribute("font-weight"));
- sStyleMsg += getXSLTCtrlAttribute("font-style", document.controls(ctrlid).attribute("font-style"));
- sStyleMsg += getXSLTCtrlAttribute("text-decoration", document.controls(ctrlid).attribute("text-decoration"));
- sStyleMsg += getXSLTCtrlAttribute("color", document.controls(ctrlid).attribute("color"));
- }
- else
- {
- var fontName = getStyleValue(degnattrval, "font-family", sCtrlType);
-
- if(fontName != "")
- sStyleMsg += getXSLTCtrlAttribute("font-family", getStyleValue(degnattrval, "font-family", sCtrlType));
- else
- sStyleMsg += getXSLTCtrlAttribute("font-family", "돋움");
-
- var fontSize = getStyleValue(degnattrval, "font-size", sCtrlType);
-
- if(fontSize != "")
- sStyleMsg += getXSLTCtrlAttribute("font-size", (parseInt(fontSize) - 3));
- else
- sStyleMsg += getXSLTCtrlAttribute("font-size", "9");
-
- //sStyleMsg += getXSLTCtrlAttribute("font-size", getStyleValue(degnattrval, "font-size", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("font-weight", getStyleValue(degnattrval, "font-weight", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("font-style", getStyleValue(degnattrval, "font-style", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("text-decoration", getStyleValue(degnattrval, "text-decoration", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("color", getStyleValue(degnattrval, "color", sCtrlType));
- }
-
- //Text
- sStyleMsg += getXSLTCtrlAttribute("text-align", getStyleValue(degnattrval, "text-align", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("vertical-align", getStyleValue(degnattrval, "vertical-align", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("word-wrap", getStyleValue(degnattrval, "word-wrap", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("line-spacing", getStyleValue(degnattrval, "line-spacing", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("letter-spacing", getStyleValue(degnattrval, "letter-spacing", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("text-select", getStyleValue(degnattrval, "text-select", sCtrlType));
-
- //Padding
- sStyleMsg += getXSLTCtrlAttribute("padding", getStyleValue(degnattrval, "padding", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("padding-left", getStyleValue(degnattrval, "padding-left", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("padding-top", getStyleValue(degnattrval, "padding-top", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("padding-right", getStyleValue(degnattrval, "padding-right", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("padding-bottom", getStyleValue(degnattrval, "padding-bottom", sCtrlType));
-
- //Background
- sStyleMsg += getXSLTCtrlAttribute("background-color", getStyleValue(degnattrval, "background-color", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("background-image", getStyleValue(degnattrval, "background-image", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("background-repeat", getStyleValue(degnattrval, "background-repeat", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("background-stretch", getStyleValue(degnattrval, "background-stretch", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("background-position", getStyleValue(degnattrval, "background-position", sCtrlType));
-
- //Border
- sStyleMsg += getXSLTCtrlAttribute("border-color", getStyleValue(degnattrval, "border-color", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("border-width", getStyleValue(degnattrval, "border-width", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("border-style", getStyleValue(degnattrval, "border-style", sCtrlType));
-
- //Margin
- sStyleMsg += getXSLTCtrlAttribute("margin", getStyleValue(degnattrval, "margin", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("margin-left", getStyleValue(degnattrval, "margin-left", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("margin-top", getStyleValue(degnattrval, "margin-top", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("margin-right", getStyleValue(degnattrval, "margin-right", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("margin-bottom", getStyleValue(degnattrval, "margin-bottom", sCtrlType));
-
- return sStyleMsg;
- }
- /**
- * @desc : XSLT 스타일 값을 얻어온다.(폰트정보는 컨트롤에서)
- * @
- * @param :
- * @return :
- * @history : 2008-12-10 컨트롤의 폰트 정보를 얻어온다.
- * @---------------------------------------------------
- */
- function getNewXSLTStyleVal(ctrlid, pCtrlPosition, degnattrval, pCtrlType)
- {
- var sLeft = "";
- var sTop= "";
- var sWidth = "";
- var sHeight = "";
- var sStyleMsg = "style=\"position:absolute; ";
- var sCtrlType = null;
- if(pCtrlType != "grp") sCtrlType = pCtrlType;
-
- if(pCtrlType == "RDO" || pCtrlType == "CHK" || pCtrlType == "BOL" || pCtrlType == "MSL" || pCtrlType == "SSL")
- sCtrlType = "ctrl";
-
- // position
- if(document.controls(ctrlid) != null)
- {
- sLeft = document.controls(ctrlid).attribute("left");
- }
- else
- sLeft = getStyleValue(degnattrval, "left", sCtrlType);
-
- if(sLeft == "") sLeft = pCtrlPosition.x;
- else{
- sLeft = parseInt(sLeft);
- pCtrlPosition.x = sLeft;
- }
-
- //if(pCtrlType != "RDO" && pCtrlType != "CHK" && pCtrlType != "BOL" && pCtrlType != "MSL" && pCtrlType != "SSL")
- if(pCtrlType != "CHK" && pCtrlType != "BOL" && pCtrlType != "MSL")
- sStyleMsg += "left:"+sLeft+"px; ";
-
- if(document.controls(ctrlid) != null)
- {
- sTop = document.controls(ctrlid).attribute("top");
- }
- else
- sTop= getStyleValue(degnattrval, "top", sCtrlType);
-
- if(sTop=="")
- sTop = pCtrlPosition.y;
- else{
- sTop = parseInt(sTop);
- pCtrlPosition.y = sTop;
- }
-
- //if(pCtrlType != "RDO" && pCtrlType != "CHK" && pCtrlType != "BOL" && pCtrlType != "MSL")
- if(pCtrlType != "CHK" && pCtrlType != "BOL" && pCtrlType != "MSL")
- sStyleMsg += "top:"+sTop+"px; ";
-
-
- if(document.controls(ctrlid) != null)
- {
- sWidth = document.controls(ctrlid).attribute("width");
- }
- else
- sWidth = getStyleValue(degnattrval, "width", sCtrlType);
-
- if(sWidth == "") sWidth = pCtrlPosition.width;
- else
- {
- var strBorderStyle = "";
-
- if(document.controls(ctrlid) != null)
- strBorderStyle = document.controls(ctrlid).attribute("border-style");
-
- if(strBorderStyle != "")
- {
- sWidth = parseInt(sWidth) - 1;
- }
- else
- {
- sWidth = parseInt(sWidth);
- }
- pCtrlPosition.width = sWidth;
- }
-
- //if(pCtrlType != "grp" && pCtrlType != "RDO" && pCtrlType != "CHK" && pCtrlType != "BOL" && pCtrlType != "MSL")
- if(pCtrlType != "grp" && pCtrlType != "CHK" && pCtrlType != "BOL" && pCtrlType != "MSL")
- sStyleMsg += "width:"+sWidth+"px; ";
-
- if(document.controls(ctrlid) != null)
- {
- sHeight = document.controls(ctrlid).attribute("height");
- }
- else
- sHeight = getStyleValue(degnattrval, "height", sCtrlType);
-
- if(sHeight == "") sHeight = pCtrlPosition.height;
- else
- {
- var strBorderStyle = "";
-
- if(document.controls(ctrlid) != null)
- strBorderStyle = document.controls(ctrlid).attribute("border-style");
-
- if(strBorderStyle != "")
- {
- sHeight = parseInt(sHeight) - 1;
- }
- else
- {
- sHeight = parseInt(sHeight);
- }
-
- pCtrlPosition.height = sHeight;
- }
-
- //if(pCtrlType != "grp" && pCtrlType != "RDO" && pCtrlType != "CHK" && pCtrlType != "BOL" && pCtrlType != "MSL")
- if(pCtrlType != "grp" && pCtrlType != "CHK" && pCtrlType != "BOL" && pCtrlType != "MSL")
- {
- //sStyleMsg += "height:"+sHeight+"px; ";
-
- // 테이블 전체 크기를 ctrlheight로 받으면 변경할것.
- // 테이블 전체 크기를 ctrlheight로 받도록 하지 않은 이전 버전에 미리 적용할 경우 테이블이 일그러져 보임.
- var tmpCtrlType ="";
- if(ctrlid != "")
- {
- tmpCtrlType = ctrlid.split("_")[0];
- }
-
- if(tmpCtrlType == "GRD" || tmpCtrlType == "DGN" || tmpCtrlType == "OPN" || tmpCtrlType == "CCN")
- sStyleMsg += "ctrlheight:"+sHeight+"px; ";
- //sStyleMsg += "height:"+sHeight+"px; ";
- else
- sStyleMsg += "height:"+sHeight+"px; ";
- }
-
- // Font Style
- if(document.controls(ctrlid) != null)
- {
- // FontName
- var fontfamilyArr = document.controls(ctrlid).attribute("font-family").split(",");
-
- if(fontfamilyArr.length > 0)
- {
- sStyleMsg += getXSLTCtrlAttribute("font-family", fontfamilyArr[0]);
- }
- else
- sStyleMsg += getXSLTCtrlAttribute("font-family", getStyleValue(degnattrval, "font-family", sCtrlType));
-
- // FontSize
- var fontSize = document.controls(ctrlid).attribute("font-size");
-
- if(fontSize != "")
- sStyleMsg += getXSLTCtrlAttribute("font-size", (parseInt(fontSize) - 3));
- else
- sStyleMsg += getXSLTCtrlAttribute("font-size", "9");
-
- sStyleMsg += getXSLTCtrlAttribute("font-weight", document.controls(ctrlid).attribute("font-weight"));
- sStyleMsg += getXSLTCtrlAttribute("font-style", document.controls(ctrlid).attribute("font-style"));
- sStyleMsg += getXSLTCtrlAttribute("text-decoration", document.controls(ctrlid).attribute("text-decoration"));
-
- var fontColor = document.controls(ctrlid).attribute("color");
- if(fontColor != "")
- {
- if(fontColor.charAt(0) != "#")
- sStyleMsg += getXSLTCtrlAttribute("color", "#" + fontColor);
- else
- sStyleMsg += getXSLTCtrlAttribute("color", fontColor);
- }
- }
- else
- {
- sStyleMsg += getXSLTCtrlAttribute("font-family", getStyleValue(degnattrval, "font-family", sCtrlType));
-
- var fontSize = getStyleValue(degnattrval, "font-size", sCtrlType);
-
- if(fontSize != "")
- sStyleMsg += getXSLTCtrlAttribute("font-size", (parseInt(fontSize) - 3));
- else
- sStyleMsg += getXSLTCtrlAttribute("font-size", "9");
-
- //sStyleMsg += getXSLTCtrlAttribute("font-size", getStyleValue(degnattrval, "font-size", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("font-weight", getStyleValue(degnattrval, "font-weight", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("font-style", getStyleValue(degnattrval, "font-style", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("text-decoration", getStyleValue(degnattrval, "text-decoration", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("color", getStyleValue(degnattrval, "color", sCtrlType));
- }
-
- //Text
- if(document.controls(ctrlid) != null)
- {
- var Halign = document.controls(ctrlid).attribute("text-align");
- var Valign = document.controls(ctrlid).attribute("vertical-align");
-
- if(Halign != "")
- sStyleMsg += getXSLTCtrlAttribute("text-align", Halign);
- else
- sStyleMsg += getXSLTCtrlAttribute("text-align", getStyleValue(degnattrval, "text-align", sCtrlType));
-
- if(Valign != "")
- sStyleMsg += getXSLTCtrlAttribute("vertical-align", Valign);
- else
- sStyleMsg += getXSLTCtrlAttribute("vertical-align", getStyleValue(degnattrval, "vertical-align", sCtrlType));
- }
- else
- {
- sStyleMsg += getXSLTCtrlAttribute("text-align", getStyleValue(degnattrval, "text-align", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("vertical-align", getStyleValue(degnattrval, "vertical-align", sCtrlType));
- }
-
- sStyleMsg += getXSLTCtrlAttribute("word-wrap", getStyleValue(degnattrval, "word-wrap", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("line-spacing", getStyleValue(degnattrval, "line-spacing", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("letter-spacing", getStyleValue(degnattrval, "letter-spacing", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("text-select", getStyleValue(degnattrval, "text-select", sCtrlType));
-
-
- //Padding
- sStyleMsg += getXSLTCtrlAttribute("padding", getStyleValue(degnattrval, "padding", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("padding-left", getStyleValue(degnattrval, "padding-left", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("padding-top", getStyleValue(degnattrval, "padding-top", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("padding-right", getStyleValue(degnattrval, "padding-right", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("padding-bottom", getStyleValue(degnattrval, "padding-bottom", sCtrlType));
-
- //Background
- sStyleMsg += getXSLTCtrlAttribute("background-color", getStyleValue(degnattrval, "background-color", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("background-image", getStyleValue(degnattrval, "background-image", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("background-repeat", getStyleValue(degnattrval, "background-repeat", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("background-stretch", getStyleValue(degnattrval, "background-stretch", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("background-position", getStyleValue(degnattrval, "background-position", sCtrlType));
-
- //Border
- var strBorderStyle = "";
-
- if(document.controls(ctrlid) != null)
- strBorderStyle = document.controls(ctrlid).attribute("border-style");
-
- if(strBorderStyle != "")
- {
- sStyleMsg += getXSLTCtrlAttribute("border-style", strBorderStyle);
-
- if(getStyleValue(degnattrval, "border-width", sCtrlType) != "")
- sStyleMsg += getXSLTCtrlAttribute("border-width", getStyleValue(degnattrval, "border-width", sCtrlType));
- else
- sStyleMsg += getXSLTCtrlAttribute("border-width", "1");
- }
- else
- {
- sStyleMsg += getXSLTCtrlAttribute("border-style", getStyleValue(degnattrval, "border-style", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("border-width", getStyleValue(degnattrval, "border-width", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("border-color", getStyleValue(degnattrval, "border-color", sCtrlType));
- }
-
- //Margin
- sStyleMsg += getXSLTCtrlAttribute("margin", getStyleValue(degnattrval, "margin", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("margin-left", getStyleValue(degnattrval, "margin-left", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("margin-top", getStyleValue(degnattrval, "margin-top", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("margin-right", getStyleValue(degnattrval, "margin-right", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("margin-bottom", getStyleValue(degnattrval, "margin-bottom", sCtrlType));
-
- //if(pCtrlType != "RDO" && pCtrlType != "CHK" && pCtrlType != "BOL" && pCtrlType != "MSL" && pCtrlType != "SSL" && pCtrlType != "IMG")
- if(pCtrlType != "RDO" && pCtrlType != "CHK" && pCtrlType != "BOL" && pCtrlType != "MSL" && pCtrlType != "IMG")
- sStyleMsg += "\"";
-
- return sStyleMsg;
- }
-
- /**
- * @desc : XSLT 스타일 값을 얻어온다.
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function getXSLTStyleVal(pCtrlPosition, degnattrval, pCtrlType)
- {
- var sLeft = "";
- var sTop= "";
- var sWidth = "";
- var sHeight = "";
- var sStyleMsg = "style=\"position:absolute; ";
- var sCtrlType = null;
- if(pCtrlType != "grp") sCtrlType = pCtrlType;
-
- if(pCtrlType == "RDO" || pCtrlType == "CHK" || pCtrlType == "BOL" || pCtrlType == "MSL" || pCtrlType == "SSL")
- sCtrlType = "ctrl";
-
- // position
- sLeft = getStyleValue(degnattrval, "left", sCtrlType);
-
- if(sLeft == "") sLeft = pCtrlPosition.x;
- else{
- sLeft = parseInt(sLeft);
- pCtrlPosition.x = sLeft;
- }
-
- if(pCtrlType != "RDO" && pCtrlType != "CHK" && pCtrlType != "BOL" && pCtrlType != "MSL" && pCtrlType != "SSL")
- sStyleMsg += "left:"+sLeft+"px; ";
-
- sTop= getStyleValue(degnattrval , "top", sCtrlType);
-
- if(sTop=="")
- sTop = pCtrlPosition.y;
- else{
- sTop = parseInt(sTop);
- pCtrlPosition.y = sTop;
- }
-
- if(pCtrlType != "RDO" && pCtrlType != "CHK" && pCtrlType != "BOL" && pCtrlType != "MSL" && pCtrlType != "SSL")
- sStyleMsg += "top:"+sTop+"px; ";
-
- sWidth = getStyleValue(degnattrval, "width", sCtrlType);
- if(sWidth == "") sWidth = pCtrlPosition.width;
- else{
- sWidth = parseInt(sWidth);
- pCtrlPosition.width = sWidth;
- }
-
- if(pCtrlType != "grp" && pCtrlType != "RDO" && pCtrlType != "CHK" && pCtrlType != "BOL" && pCtrlType != "MSL" && pCtrlType != "SSL")
- sStyleMsg += "width:"+sWidth+"px; ";
-
- sHeight = getStyleValue(degnattrval, "height", sCtrlType);
- if(sHeight == "") sHeight = pCtrlPosition.height;
- else{
- sHeight = parseInt(sHeight);
- pCtrlPosition.height = sHeight;
- }
-
- if(pCtrlType != "grp" && pCtrlType != "RDO" && pCtrlType != "CHK" && pCtrlType != "BOL" && pCtrlType != "MSL" && pCtrlType != "SSL")
- sStyleMsg += "height:"+sHeight+"px; ";
-
-
- // Font
- sStyleMsg += getXSLTCtrlAttribute("font-family", getStyleValue(degnattrval, "font-family", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("font-size", getStyleValue(degnattrval, "font-size", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("font-weight", getStyleValue(degnattrval, "font-weight", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("font-style", getStyleValue(degnattrval, "font-style", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("text-decoration", getStyleValue(degnattrval, "text-decoration", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("color", getStyleValue(degnattrval, "color", sCtrlType));
-
- //Text
- sStyleMsg += getXSLTCtrlAttribute("text-align", getStyleValue(degnattrval, "text-align", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("vertical-align", getStyleValue(degnattrval, "vertical-align", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("word-wrap", getStyleValue(degnattrval, "word-wrap", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("line-spacing", getStyleValue(degnattrval, "line-spacing", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("letter-spacing", getStyleValue(degnattrval, "letter-spacing", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("text-select", getStyleValue(degnattrval, "text-select", sCtrlType));
-
- //Padding
- sStyleMsg += getXSLTCtrlAttribute("padding", getStyleValue(degnattrval, "padding", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("padding-left", getStyleValue(degnattrval, "padding-left", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("padding-top", getStyleValue(degnattrval, "padding-top", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("padding-right", getStyleValue(degnattrval, "padding-right", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("padding-bottom", getStyleValue(degnattrval, "padding-bottom", sCtrlType));
-
- //Background
- sStyleMsg += getXSLTCtrlAttribute("background-color", getStyleValue(degnattrval, "background-color", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("background-image", getStyleValue(degnattrval, "background-image", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("background-repeat", getStyleValue(degnattrval, "background-repeat", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("background-stretch", getStyleValue(degnattrval, "background-stretch", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("background-position", getStyleValue(degnattrval, "background-position", sCtrlType));
-
- //Border
- sStyleMsg += getXSLTCtrlAttribute("border-color", getStyleValue(degnattrval, "border-color", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("border-width", getStyleValue(degnattrval, "border-width", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("border-style", getStyleValue(degnattrval, "border-style", sCtrlType));
-
- //Margin
- sStyleMsg += getXSLTCtrlAttribute("margin", getStyleValue(degnattrval, "margin", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("margin-left", getStyleValue(degnattrval, "margin-left", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("margin-top", getStyleValue(degnattrval, "margin-top", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("margin-right", getStyleValue(degnattrval, "margin-right", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("margin-bottom", getStyleValue(degnattrval, "margin-bottom", sCtrlType));
-
- if(pCtrlType != "RDO" && pCtrlType != "CHK" && pCtrlType != "BOL" && pCtrlType != "MSL" && pCtrlType != "SSL" && pCtrlType != "IMG")
- sStyleMsg += "\"";
-
- return sStyleMsg;
- }
- /**
- * @desc : 이미지 컨트롤의 XSLT 스타일 값을 얻어온다.
- * @
- * @param :
- * @return :
- * @history : 2008-12-19 left, top 좌표는 ctrl.left, ctrl.top 좌표가 있어도 0으로 처리함.
- * @---------------------------------------------------
- */
- function getImgXSLTStylePos(ctrlid, pCtrlPosition, degnattrval, pCtrlType)
- {
- var sLeft = "";
- var sTop= "";
- var sWidth = "";
- var sHeight = "";
- var sStyleMsg = "style=\"position:absolute; ";
- var sCtrlType = null;
- if(pCtrlType != "grp") sCtrlType = pCtrlType;
- if(pCtrlType == "RDO" || pCtrlType == "CHK" || pCtrlType == "BOL" || pCtrlType == "MSL" || pCtrlType == "SSL")
- sCtrlType = "ctrl";
-
- // position
- if(document.controls(ctrlid) != null)
- {
- sLeft = document.controls(ctrlid).attribute("left");
- sTop = document.controls(ctrlid).attribute("top");
- sWidth = document.controls(ctrlid).attribute("width");
- sHeight = document.controls(ctrlid).attribute("height");
-
- if(document.controls(ctrlid).attribute("border-style") != "")
- {
- var BdWidth = 0;
- if(getStyleValue(degnattrval, "border-width", sCtrlType) != "")
- BdWidth = getStyleValue(degnattrval, "border-width", sCtrlType);
- else
- BdWidth = 1;
-
- sHeight = parseInt(sHeight) - BdWidth;
- }
- }
- else
- {
- sLeft = getStyleValue(degnattrval, "left", sCtrlType);
- sTop= getStyleValue(degnattrval, "top", sCtrlType);
- sWidth = getStyleValue(degnattrval, "width", sCtrlType);
- sHeight = getStyleValue(degnattrval, "height", sCtrlType);
-
- if(getStyleValue(degnattrval, "border-style", sCtrlType) != "")
- {
- var BdWidth = 0;
- if(getStyleValue(degnattrval, "border-width", sCtrlType) != "")
- BdWidth = getStyleValue(degnattrval, "border-width", sCtrlType);
- else
- BdWidth = 1;
-
- sHeight = parseInt(sHeight) - BdWidth;
- }
- }
-
- if(sLeft == "") sLeft = pCtrlPosition.x;
- else{
- sLeft = parseInt(sLeft);
- pCtrlPosition.x = sLeft;
- }
-
- if(sTop=="") sTop = pCtrlPosition.y;
- else{
- sTop = parseInt(sTop);
- pCtrlPosition.y = sTop;
- }
-
- if(sWidth == "") sWidth = pCtrlPosition.width;
- else{
- sWidth = parseInt(sWidth);
- pCtrlPosition.width = sWidth;
- }
-
- if(sHeight == "") sHeight = pCtrlPosition.height;
- else{
- sHeight = parseInt(sHeight);
- pCtrlPosition.height = sHeight;
- }
-
- if(pCtrlType != "RDO" && pCtrlType != "CHK" && pCtrlType != "BOL" && pCtrlType != "MSL" && pCtrlType != "SSL")
- sStyleMsg += "left:"+sLeft+"px; ";
-
- if(pCtrlType != "RDO" && pCtrlType != "CHK" && pCtrlType != "BOL" && pCtrlType != "MSL" && pCtrlType != "SSL")
- sStyleMsg += "top:"+sTop+"px; ";
-
- if(pCtrlType != "grp" && pCtrlType != "RDO" && pCtrlType != "CHK" && pCtrlType != "BOL" && pCtrlType != "MSL" && pCtrlType != "SSL")
- sStyleMsg += "width:"+sWidth+"px; ";
-
- if(pCtrlType != "grp" && pCtrlType != "RDO" && pCtrlType != "CHK" && pCtrlType != "BOL" && pCtrlType != "MSL" && pCtrlType != "SSL")
- sStyleMsg += "height:"+sHeight+"px; ";
- sStyleMsg += "\"";
-
- return sStyleMsg;
- }
- /**
- * @desc : 이미지 컨트롤의 XSLT 스타일 값을 얻어온다.
- * @
- * @param :
- * @return :
- * @history : 2008-12-19 left, top 좌표는 ctrl.left, ctrl.top 좌표가 있어도 0으로 처리함.
- * @---------------------------------------------------
- */
- function getImgXSLTStyleVal(ctrlid, pCtrlPosition, degnattrval, pCtrlType)
- {
- var sLeft = "";
- var sTop= "";
- var sWidth = "";
- var sHeight = "";
- var sStyleMsg = "style=\"position:absolute; ";
- var sCtrlType = null;
- if(pCtrlType != "grp") sCtrlType = pCtrlType;
- if(pCtrlType == "RDO" || pCtrlType == "CHK" || pCtrlType == "BOL" || pCtrlType == "MSL" || pCtrlType == "SSL")
- sCtrlType = "ctrl";
-
- //Text
- sStyleMsg += getXSLTCtrlAttribute("text-align", getStyleValue(degnattrval, "text-align", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("vertical-align", getStyleValue(degnattrval, "vertical-align", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("word-wrap", getStyleValue(degnattrval, "word-wrap", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("line-spacing", getStyleValue(degnattrval, "line-spacing", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("letter-spacing", getStyleValue(degnattrval, "letter-spacing", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("text-select", getStyleValue(degnattrval, "text-select", sCtrlType));
-
- //Padding
- sStyleMsg += getXSLTCtrlAttribute("padding", getStyleValue(degnattrval, "padding", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("padding-left", getStyleValue(degnattrval, "padding-left", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("padding-top", getStyleValue(degnattrval, "padding-top", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("padding-right", getStyleValue(degnattrval, "padding-right", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("padding-bottom", getStyleValue(degnattrval, "padding-bottom", sCtrlType));
-
- //Background
- sStyleMsg += getXSLTCtrlAttribute("background-color", getStyleValue(degnattrval, "background-color", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("background-image", getStyleValue(degnattrval, "background-image", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("background-repeat", getStyleValue(degnattrval, "background-repeat", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("background-stretch", getStyleValue(degnattrval, "background-stretch", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("background-position", getStyleValue(degnattrval, "background-position", sCtrlType));
-
- //Border
- var strBorderStyle = "";
-
- if(document.controls(ctrlid) != null)
- {
- if(document.controls(ctrlid).attribute("border-color") != "")
- sStyleMsg += "border-color:"+document.controls(ctrlid).attribute("border-color")+"; ";
-
- strBorderStyle = document.controls(ctrlid).attribute("border-style");
-
- if(strBorderStyle != "")
- {
- sStyleMsg += "border-style:"+document.controls(ctrlid).attribute("border-style")+"; ";
-
- if(getStyleValue(degnattrval, "border-width", sCtrlType) != "")
- sStyleMsg += getXSLTCtrlAttribute("border-width", getStyleValue(degnattrval, "border-width", sCtrlType));
- else
- sStyleMsg += getXSLTCtrlAttribute("border-width", "1");
- }
- }
- else
- {
- sStyleMsg += getXSLTCtrlAttribute("border-style", getStyleValue(degnattrval, "border-style", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("border-width", getStyleValue(degnattrval, "border-width", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("border-color", getStyleValue(degnattrval, "border-color", sCtrlType));
- }
-
- //Margin
- sStyleMsg += getXSLTCtrlAttribute("margin", getStyleValue(degnattrval, "margin", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("margin-left", getStyleValue(degnattrval, "margin-left", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("margin-top", getStyleValue(degnattrval, "margin-top", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("margin-right", getStyleValue(degnattrval, "margin-right", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("margin-bottom", getStyleValue(degnattrval, "margin-bottom", sCtrlType));
-
- sStyleMsg += "\"";
-
- return sStyleMsg;
- }
- /**
- * @desc : XSLT 스타일 값을 얻어온다.
- * @
- * @param :
- * @return :
- * @history : 2008-12-10 컨트롤의 폰트 정보를 얻어온다.
- * @---------------------------------------------------
- */
- function getPatternXSLTStyleVal(ctrlid, pCtrlPosition, degnattrval, sCtrlType)
- {
- var sStyleMsg = "";
-
- var pattern = "#0.";
- var roundmode = "";
- var roundposition = "";
- var format = "";
-
- if(document.controls(ctrlid) != null)
- {
- roundmode = document.controls(ctrlid).attribute("roundmode");
- roundposition = document.controls(ctrlid).attribute("roundposition");
- //format = document.controls(ctrlid).attribute("format").split(".");
-
- if(parseInt(roundposition) < 0)
- roundposition = parseInt(roundposition) * (-1);
- else
- roundposition = parseInt(roundposition);
-
- for(var idx=0; idx < roundposition; idx++)
- {
- pattern += "0";
- }
- }
- return pattern ;
- }
- /**
- * @desc : XSLT 속성을 얻어온다.
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function getXSLTCtrlAttribute(type, value){
-
- if(value != "") return type+":"+value+"; ";
-
- return "";
- }
- /**
- * @desc : StyleCss 를 반환한다.
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function getStyleCss()
- {
- //var styleCss = "<style type=\"text/css\">body, input, select, table, textarea, IMG {border: 0;}, .vs_button {font-family:돋움, Arial ; font-size:12px; } </style>\n";
- //var styleCss = "\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"../../../com/commonweb/css/common.css\" />\n";
-
- var styleCss = "\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"../../../emr/commonweb/css/emr.css\" />\n";
-
- return styleCss;
- }
- /**
- * @desc : 편집가능한 이미지 URL을 반환한다.
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function getRecImgUrl(degnitemlevlcd)
- {
- return getActionURI("TRMRF01213") + getUserSessionString() + "&pid=<xsl:value-of select=\"/recinfo/formrec/pid\"/>&orddd=<xsl:value-of select=\"/recinfo/formrec/orddd\"/>&cretno=<xsl:value-of select=\"/recinfo/formrec/cretno\"/>&formrecdd=<xsl:value-of select=\"/recinfo/formrec/formrecdd\"/>&formcd=<xsl:value-of select=\"/recinfo/formrec/formcd\"/>°nitemlevlcd=" + degnitemlevlcd + "&formrechm=<xsl:value-of select=\"/recinfo/formrec/formrechm\"/>";
- //return getActionURI("TRMRF01213") + getUserSessionString() + "&formdegnseq=" + formdegnseq + "°nitemlevlcd=" + degnitemlevlcd;
- }
- /**
- * @desc : 편집불가능한 이미지 URL을 반환한다.
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function getImgUrl(imgecd)
- {
- return getActionURI("TRMRF01212") + getUserSessionString() + "&imgecd=" + imgecd;
- }
- /**
- * @desc : Border 속성이 없을 경우 추가한다.
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function AddBorderStyle(sStyle, degnattrval, ctrlType)
- {
- var tmpDegnattrval = degnattrval;
-
- var borderStyle = getStyleValue(tmpDegnattrval, "border-style", ctrlType);
-
- if(borderStyle == "solid" || borderStyle == "dotted" || borderStyle == "dashed" || borderStyle == "outset")
- {
- var pxSize = "";
- pxSize = getStyleValue(tmpDegnattrval, "border-width", ctrlType);
-
- if(pxSize == "")
- {
- pxSize = 1; // 기본 두께
-
- var pxStyle= borderStyle + "; border-width:" + pxSize;
-
- sStyle = sStyle.setReplaceWord(borderStyle, pxStyle);
- }
- }
-
- /*
- else if(borderStyle == "none")
- {
- sStyle += "border-style:none; ";
- }
- */
- return sStyle;
- }
- /**
- * @desc : Pre태그에 포함될 style 정보를 가져온다.
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function getPreXSLTStyle(ctrlid, pCtrlPosition, degnattrval, sCtrlType)
- {
- var ctrlWidth = "";
- var ctrlHeight = "";
-
- if(document.controls(ctrlid) != null)
- {
- ctrlWidth = document.controls(ctrlid).attribute("width");
- ctrlHeight = document.controls(ctrlid).attribute("height");
- }
- else
- {
- ctrlWidth = getStyleValue(degnattrval, "width", sCtrlType);
- ctrlHeight = getStyleValue(degnattrval, "height", sCtrlType);
- }
-
- if(ctrlWidth == "") ctrlWidth = pCtrlPosition.width;
- else
- {
- var strBorderStyle = "";
-
- if(document.controls(ctrlid) != null)
- strBorderStyle = document.controls(ctrlid).attribute("border-style");
-
- if(strBorderStyle != "")
- {
- ctrlWidth = parseInt(ctrlWidth) - 1;
- }
- else
- {
- ctrlWidth = parseInt(ctrlWidth);
- }
- pCtrlPosition.width = ctrlWidth;
- }
-
- if(ctrlHeight == "") ctrlHeight = pCtrlPosition.height;
- else
- {
- var strBorderStyle = "";
-
- if(document.controls(ctrlid) != null)
- strBorderStyle = document.controls(ctrlid).attribute("border-style");
-
- if(strBorderStyle != "")
- {
- ctrlHeight = parseInt(ctrlHeight) - 1;
- }
- else
- {
- ctrlHeight = parseInt(ctrlHeight);
- }
-
- pCtrlPosition.height = ctrlHeight;
- }
-
- var preStyle = "style=\"position:absolute; left:0px; top:0px; width:" + parseInt(ctrlWidth) + "px; height:" + parseInt(ctrlHeight) + "px; ";
-
- // Font Style
- if(document.controls(ctrlid) != null)
- {
- // FontName
- var fontfamilyArr = document.controls(ctrlid).attribute("font-family").split(",");
-
- if(fontfamilyArr.length > 0)
- {
- preStyle += getXSLTCtrlAttribute("font-family", fontfamilyArr[0]);
- }
- else
- preStyle += getXSLTCtrlAttribute("font-family", getStyleValue(degnattrval, "font-family", sCtrlType));
-
- // FontSize
- var fontSize = document.controls(ctrlid).attribute("font-size");
-
- if(fontSize != "")
- preStyle += getXSLTCtrlAttribute("font-size", (parseInt(fontSize) - 3));
- else
- preStyle += getXSLTCtrlAttribute("font-size", "9");
-
- preStyle += getXSLTCtrlAttribute("font-weight", document.controls(ctrlid).attribute("font-weight"));
- preStyle += getXSLTCtrlAttribute("font-style", document.controls(ctrlid).attribute("font-style"));
- preStyle += getXSLTCtrlAttribute("text-decoration", document.controls(ctrlid).attribute("text-decoration"));
-
- var fontColor = document.controls(ctrlid).attribute("color");
- if(fontColor != "")
- {
- if(fontColor.charAt(0) != "#")
- preStyle += getXSLTCtrlAttribute("color", "#" + fontColor);
- else
- preStyle += getXSLTCtrlAttribute("color", fontColor);
- }
- }
- else
- {
- preStyle += getXSLTCtrlAttribute("font-family", getStyleValue(degnattrval, "font-family", sCtrlType));
-
- var fontSize = getStyleValue(degnattrval, "font-size", sCtrlType);
-
- if(fontSize != "")
- preStyle += getXSLTCtrlAttribute("font-size", (parseInt(fontSize) - 3));
- else
- preStyle += getXSLTCtrlAttribute("font-size", "9");
-
- //sStyleMsg += getXSLTCtrlAttribute("font-size", getStyleValue(degnattrval, "font-size", sCtrlType));
- preStyle += getXSLTCtrlAttribute("font-weight", getStyleValue(degnattrval, "font-weight", sCtrlType));
- preStyle += getXSLTCtrlAttribute("font-style", getStyleValue(degnattrval, "font-style", sCtrlType));
- preStyle += getXSLTCtrlAttribute("text-decoration", getStyleValue(degnattrval, "text-decoration", sCtrlType));
- preStyle += getXSLTCtrlAttribute("color", getStyleValue(degnattrval, "color", sCtrlType));
- }
-
- //Text
- if(document.controls(ctrlid) != null)
- {
- var Halign = document.controls(ctrlid).attribute("text-align");
- var Valign = document.controls(ctrlid).attribute("vertical-align");
-
- if(Halign != "")
- preStyle += getXSLTCtrlAttribute("text-align", Halign);
- else
- preStyle += getXSLTCtrlAttribute("text-align", getStyleValue(degnattrval, "text-align", sCtrlType));
-
- if(Valign != "")
- preStyle += getXSLTCtrlAttribute("vertical-align", Valign);
- else
- preStyle += getXSLTCtrlAttribute("vertical-align", getStyleValue(degnattrval, "vertical-align", sCtrlType));
- }
- else
- {
- preStyle += getXSLTCtrlAttribute("text-align", getStyleValue(degnattrval, "text-align", sCtrlType));
- preStyle += getXSLTCtrlAttribute("vertical-align", getStyleValue(degnattrval, "vertical-align", sCtrlType));
- }
-
- preStyle += getXSLTCtrlAttribute("word-wrap", getStyleValue(degnattrval, "word-wrap", sCtrlType));
- preStyle += getXSLTCtrlAttribute("line-spacing", getStyleValue(degnattrval, "line-spacing", sCtrlType));
- preStyle += getXSLTCtrlAttribute("letter-spacing", getStyleValue(degnattrval, "letter-spacing", sCtrlType));
- preStyle += getXSLTCtrlAttribute("text-select", getStyleValue(degnattrval, "text-select", sCtrlType));
-
-
- //Padding
- preStyle += getXSLTCtrlAttribute("padding", getStyleValue(degnattrval, "padding", sCtrlType));
- preStyle += getXSLTCtrlAttribute("padding-left", getStyleValue(degnattrval, "padding-left", sCtrlType));
- preStyle += getXSLTCtrlAttribute("padding-top", getStyleValue(degnattrval, "padding-top", sCtrlType));
- preStyle += getXSLTCtrlAttribute("padding-right", getStyleValue(degnattrval, "padding-right", sCtrlType));
- preStyle += getXSLTCtrlAttribute("padding-bottom", getStyleValue(degnattrval, "padding-bottom", sCtrlType));
-
- //Background
- preStyle += getXSLTCtrlAttribute("background-color", getStyleValue(degnattrval, "background-color", sCtrlType));
- preStyle += getXSLTCtrlAttribute("background-image", getStyleValue(degnattrval, "background-image", sCtrlType));
- preStyle += getXSLTCtrlAttribute("background-repeat", getStyleValue(degnattrval, "background-repeat", sCtrlType));
- preStyle += getXSLTCtrlAttribute("background-stretch", getStyleValue(degnattrval, "background-stretch", sCtrlType));
- preStyle += getXSLTCtrlAttribute("background-position", getStyleValue(degnattrval, "background-position", sCtrlType));
-
- //Border
- var strBorderStyle = "";
-
- if(document.controls(ctrlid) != null)
- strBorderStyle = document.controls(ctrlid).attribute("border-style");
-
- if(strBorderStyle != "")
- {
- preStyle += getXSLTCtrlAttribute("border-style", strBorderStyle);
-
- if(getStyleValue(degnattrval, "border-width", sCtrlType) != "")
- preStyle += getXSLTCtrlAttribute("border-width", getStyleValue(degnattrval, "border-width", sCtrlType));
- else
- preStyle += getXSLTCtrlAttribute("border-width", "1");
- }
- else
- {
- preStyle += getXSLTCtrlAttribute("border-style", getStyleValue(degnattrval, "border-style", sCtrlType));
- preStyle += getXSLTCtrlAttribute("border-width", getStyleValue(degnattrval, "border-width", sCtrlType));
- preStyle += getXSLTCtrlAttribute("border-color", getStyleValue(degnattrval, "border-color", sCtrlType));
- }
-
- //Margin
- preStyle += getXSLTCtrlAttribute("margin", getStyleValue(degnattrval, "margin", sCtrlType));
- preStyle += getXSLTCtrlAttribute("margin-left", getStyleValue(degnattrval, "margin-left", sCtrlType));
- preStyle += getXSLTCtrlAttribute("margin-top", getStyleValue(degnattrval, "margin-top", sCtrlType));
- preStyle += getXSLTCtrlAttribute("margin-right", getStyleValue(degnattrval, "margin-right", sCtrlType));
- preStyle += getXSLTCtrlAttribute("margin-bottom", getStyleValue(degnattrval, "margin-bottom", sCtrlType));
-
- /*
- // Font
- preStyle += getXSLTCtrlAttribute("font-family", getStyleValue(degnattrval, "font-family", sCtrlType));
- preStyle += getXSLTCtrlAttribute("font-size", getStyleValue(degnattrval, "font-size", sCtrlType));
- preStyle += getXSLTCtrlAttribute("font-weight", getStyleValue(degnattrval, "font-weight", sCtrlType));
- preStyle += getXSLTCtrlAttribute("font-style", getStyleValue(degnattrval, "font-style", sCtrlType));
- preStyle += getXSLTCtrlAttribute("text-decoration", getStyleValue(degnattrval, "text-decoration", sCtrlType));
- preStyle += getXSLTCtrlAttribute("color", getStyleValue(degnattrval, "color", sCtrlType));
-
- //Text
- preStyle += getXSLTCtrlAttribute("text-align", getStyleValue(degnattrval, "text-align", sCtrlType));
- preStyle += getXSLTCtrlAttribute("vertical-align", getStyleValue(degnattrval, "vertical-align", sCtrlType));
- preStyle += getXSLTCtrlAttribute("word-wrap", getStyleValue(degnattrval, "word-wrap", sCtrlType));
- preStyle += getXSLTCtrlAttribute("line-spacing", getStyleValue(degnattrval, "line-spacing", sCtrlType));
- preStyle += getXSLTCtrlAttribute("letter-spacing", getStyleValue(degnattrval, "letter-spacing", sCtrlType));
- preStyle += getXSLTCtrlAttribute("text-select", getStyleValue(degnattrval, "text-select", sCtrlType));
-
- //Padding
- preStyle += getXSLTCtrlAttribute("padding", getStyleValue(degnattrval, "padding", sCtrlType));
- preStyle += getXSLTCtrlAttribute("padding-left", getStyleValue(degnattrval, "padding-left", sCtrlType));
- preStyle += getXSLTCtrlAttribute("padding-top", getStyleValue(degnattrval, "padding-top", sCtrlType));
- preStyle += getXSLTCtrlAttribute("padding-right", getStyleValue(degnattrval, "padding-right", sCtrlType));
- preStyle += getXSLTCtrlAttribute("padding-bottom", getStyleValue(degnattrval, "padding-bottom", sCtrlType));
-
- //Background
- preStyle += getXSLTCtrlAttribute("background-color", getStyleValue(degnattrval, "background-color", sCtrlType));
- preStyle += getXSLTCtrlAttribute("background-image", getStyleValue(degnattrval, "background-image", sCtrlType));
- preStyle += getXSLTCtrlAttribute("background-repeat", getStyleValue(degnattrval, "background-repeat", sCtrlType));
- preStyle += getXSLTCtrlAttribute("background-stretch", getStyleValue(degnattrval, "background-stretch", sCtrlType));
- preStyle += getXSLTCtrlAttribute("background-position", getStyleValue(degnattrval, "background-position", sCtrlType));
-
- //Border
- preStyle += getXSLTCtrlAttribute("border-color", getStyleValue(degnattrval, "border-color", sCtrlType));
- preStyle += getXSLTCtrlAttribute("border-width", getStyleValue(degnattrval, "border-width", sCtrlType));
- preStyle += getXSLTCtrlAttribute("border-style", getStyleValue(degnattrval, "border-style", sCtrlType));
-
- //Margin
- preStyle += getXSLTCtrlAttribute("margin", getStyleValue(degnattrval, "margin", sCtrlType));
- preStyle += getXSLTCtrlAttribute("margin-left", getStyleValue(degnattrval, "margin-left", sCtrlType));
- preStyle += getXSLTCtrlAttribute("margin-top", getStyleValue(degnattrval, "margin-top", sCtrlType));
- preStyle += getXSLTCtrlAttribute("margin-right", getStyleValue(degnattrval, "margin-right", sCtrlType));
- preStyle += getXSLTCtrlAttribute("margin-bottom", getStyleValue(degnattrval, "margin-bottom", sCtrlType));
- */
- preStyle += " \"";
-
- return preStyle;
- }
- /**
- * @desc : degnitemnm 에 공백처리를 한다.
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function GetDegnitemnmTrans(degnitemnm)
- {
- var spaceStart = false;
- var spaceEnd = false;
- var tempDegnitemnm = "";
- var spaceheader = "<xsl:text disable-output-escaping=\"yes\"><![CDATA[";
- var spacefooter = "]]></xsl:text>";
- var spacetext = " ";
- var space = "";
- var strStlen = 0;
- var strEdlen = 0;
- var strtext = "";
-
- for(var spaceidx = 0; spaceidx < degnitemnm.length; spaceidx++)
- {
- if(degnitemnm.charAt(spaceidx) == " ")
- {
- if(parseInt(degnitemnm.length) <= parseInt(spaceidx+1))
- {
- if(spaceStart == true)
- {
- space += spacetext; // 문자가 빈칸이고 spaceStart -> true이면 빈칸Text를 붙임.
- space += spacefooter;
- tempDegnitemnm += space;
-
- spaceStart = false;
- strStlen = strEdlen;
- strEdlen++;
- }
- }
- else
- {
- if(degnitemnm.charAt(spaceidx+1) == " ") // 연속 공백인 경우
- {
- if(spaceStart == false) // 문자가 빈칸이고 spaceStart -> false이면 헤더를 붙임.
- {
- // 텍스트 저장하기
- strEdlen = spaceidx;
- strtext = degnitemnm.substring(parseInt(strStlen), parseInt(strEdlen));
-
- if(isSearchString(strtext, "\n") == true)
- {
- tempDegnitemnm += "<br/>";
- strtext = strtext.setReplaceWord("\n", "");
- }
-
- tempDegnitemnm += "<![CDATA[";
- tempDegnitemnm += strtext;
- tempDegnitemnm += "]]>";
- strStlen = strEdlen;
-
- space = spaceheader;
- spaceStart = true;
- }
- space += spacetext; // 문자가 빈칸이고 spaceStart -> true이면 빈칸Text를 붙임.
- strEdlen++;
- }
- else
- {
- if(spaceStart == true) // 문자가 빈칸이고 spaceStart -> true이면 빈칸Text를 붙임.
- {
- space += spacetext;
- }
-
- strEdlen++;
- continue;
- }
- }
- }
- else
- {
- // 문자열이 빈칸이 아니고 일반 텍스트인 경우
- if(spaceStart == true)
- {
- // 빈칸을 2개 더 붙인다.
- space += spacetext;
- //space += spacetext;
-
- // Space 텍스트에 footer를 붙이고 임시 디자인아이템명에 붙인다.
- space += spacefooter;
- tempDegnitemnm += space;
-
- spaceStart = false;
- strStlen = strEdlen;
- }
-
- continue;
- }
- }
-
- if(parseInt(strEdlen) < parseInt(degnitemnm.length))
- {
- if(tempDegnitemnm == "")
- {
- strEdlen = 0;
-
- if(isSearchString(degnitemnm, "\n") == true)
- {
- degnitemnm = degnitemnm.setReplaceWord("\n", "]]><br/><![CDATA[");
- }
- }
- tempDegnitemnm += "<![CDATA[";
- tempDegnitemnm += degnitemnm.substring(parseInt(strEdlen), parseInt(degnitemnm.length));
- tempDegnitemnm += "]]>";
- }
-
- return tempDegnitemnm;
- }
- /**
- * @desc : RDO, CHK의 XSLT 스타일 값을 얻어온다.(폰트정보는 컨트롤에서)
- * @
- * @param :
- * @return :
- * @history :
- * @---------------------------------------------------
- */
- function getSelXSLTStyleVal(ctrlid, pCtrlPosition, degnattrval, pCtrlType)
- {
- var sLeft = "";
- var sTop= "";
- var sWidth = "";
- var sHeight = "";
- var sStyleMsg = "style=\"position:absolute; ";
- var sCtrlType = null;
- if(pCtrlType != "grp") sCtrlType = pCtrlType;
-
- if(pCtrlType == "RDO" || pCtrlType == "CHK" || pCtrlType == "BOL" || pCtrlType == "MSL" || pCtrlType == "SSL")
- sCtrlType = "ctrl";
-
- // position
- if(document.controls(ctrlid) != null)
- {
- sLeft = document.controls(ctrlid).attribute("left")
- }
- else
- sLeft = getStyleValue(degnattrval, "left", sCtrlType);
-
- if(sLeft == "") sLeft = pCtrlPosition.x;
- else{
- sLeft = parseInt(sLeft);
- pCtrlPosition.x = sLeft;
- }
- sStyleMsg += "left:"+sLeft+"px; ";
-
-
- if(document.controls(ctrlid) != null)
- {
- sTop = document.controls(ctrlid).attribute("top")
- }
- else
- sTop= getStyleValue(degnattrval, "top", sCtrlType);
-
- if(sTop=="")
- sTop = pCtrlPosition.y;
- else{
- sTop = parseInt(sTop);
- pCtrlPosition.y = sTop;
- }
- sStyleMsg += "top:"+sTop+"px; ";
- /*
- if(document.controls(ctrlid) != null)
- {
- sWidth = document.controls(ctrlid).attribute("width")
- }
- else
- sWidth = getStyleValue(degnattrval, "width", sCtrlType);
-
- if(sWidth == "") sWidth = pCtrlPosition.width;
- else{
- sWidth = parseInt(sWidth);
- pCtrlPosition.width = sWidth;
- }
- sStyleMsg += "width:"+sWidth+"px; ";
-
- if(document.controls(ctrlid) != null)
- {
- sHeight = document.controls(ctrlid).attribute("height")
- }
- else
- sHeight = getStyleValue(degnattrval, "height", sCtrlType);
-
- if(sHeight == "") sHeight = pCtrlPosition.height;
- else{
- sHeight = parseInt(sHeight);
- pCtrlPosition.height = sHeight;
- }
- sStyleMsg += "height:"+sHeight+"px; ";
- */
- if(pCtrlType != "grp" && pCtrlType != "RDO" && pCtrlType != "CHK" && pCtrlType != "BOL" && pCtrlType != "MSL" && pCtrlType != "SSL")
- {
- // 테이블 전체 크기를 ctrlheight로 받으면 변경할것.
- // 테이블 전체 크기를 ctrlheight로 받도록 하지 않은 이전 버전에 미리 적용할 경우 테이블이 일그러져 보임.
- /*
- var tmpCtrlType ="";
- if(ctrlid != "")
- {
- tmpCtrlType = ctrlid.split("_")[0];
- }
-
- if(tmpCtrlType == "TBL" || tmpCtrlType == "DGN" || tmpCtrlType == "OPN" || tmpCtrlType == "CCN")
- sStyleMsg += "ctrlheight:"+sHeight+"px; ";
- else
- sStyleMsg += "height:"+sHeight+"px; ";
- */
- }
-
- if(document.controls(ctrlid) != null)
- {
- // FontName
- var fontfamilyArr = document.controls(ctrlid).attribute("font-family").split(",");
-
- if(fontfamilyArr.length > 0)
- {
- sStyleMsg += getXSLTCtrlAttribute("font-family", fontfamilyArr[0]);
- }
- else
- sStyleMsg += getXSLTCtrlAttribute("font-family", getStyleValue(degnattrval, "font-family", sCtrlType));
-
- // FontSize
- var fontSize = document.controls(ctrlid).attribute("font-size");
-
- if(fontSize != "")
- sStyleMsg += getXSLTCtrlAttribute("font-size", (parseInt(fontSize) - 3));
- else
- sStyleMsg += getXSLTCtrlAttribute("font-size", "9");
-
- sStyleMsg += getXSLTCtrlAttribute("font-weight", document.controls(ctrlid).attribute("font-weight"));
- sStyleMsg += getXSLTCtrlAttribute("font-style", document.controls(ctrlid).attribute("font-style"));
- sStyleMsg += getXSLTCtrlAttribute("text-decoration", document.controls(ctrlid).attribute("text-decoration"));
-
- var fontColor = document.controls(ctrlid).attribute("color");
- if(fontColor != "")
- {
- if(fontColor.charAt(0) != "#")
- sStyleMsg += getXSLTCtrlAttribute("color", "#" + fontColor);
- else
- sStyleMsg += getXSLTCtrlAttribute("color", fontColor);
- }
- }
- else
- {
- sStyleMsg += getXSLTCtrlAttribute("font-family", getStyleValue(degnattrval, "font-family", sCtrlType));
-
- var fontSize = getStyleValue(degnattrval, "font-size", sCtrlType);
-
- if(fontSize != "")
- sStyleMsg += getXSLTCtrlAttribute("font-size", (parseInt(fontSize) - 3));
- else
- sStyleMsg += getXSLTCtrlAttribute("font-size", "9");
-
- //sStyleMsg += getXSLTCtrlAttribute("font-size", getStyleValue(degnattrval, "font-size", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("font-weight", getStyleValue(degnattrval, "font-weight", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("font-style", getStyleValue(degnattrval, "font-style", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("text-decoration", getStyleValue(degnattrval, "text-decoration", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("color", getStyleValue(degnattrval, "color", sCtrlType));
- }
-
- sStyleMsg += "\"";
-
- return sStyleMsg;
- }
- /**
- * @desc : SSU의 XSLT 스타일 값을 얻어온다.(폰트정보는 컨트롤에서)
- * @
- * @param :
- * @return :
- * @history :
- * @---------------------------------------------------
- */
- function getSelSSUXSLTStyleVal(ctrlid, pCtrlPosition, degnattrval, pCtrlType)
- {
- var strArr = new Array(2);
- var sLeft = "";
- var sLabelLeft = "";
- var sTop = "";
- var sWidth = "";
- var sHeight = "";
- var sStyleMsg = "style=\"position:absolute; ";
- var sLabelStyleMsg = "style=\"position:absolute; ";
- var sCtrlType = null;
- if(pCtrlType != "grp") sCtrlType = pCtrlType;
-
- if(pCtrlType == "RDO" || pCtrlType == "CHK" || pCtrlType == "BOL" || pCtrlType == "MSL" || pCtrlType == "SSL")
- sCtrlType = "ctrl";
-
- // position
- if(document.controls(ctrlid) != null)
- {
- sLeft = document.controls(ctrlid).attribute("left");
- sTop = document.controls(ctrlid).attribute("top");
- sWidth = document.controls(ctrlid).attribute("width");
- sHeight = document.controls(ctrlid).attribute("height");
- }
- else
- {
- sLeft = getStyleValue(degnattrval, "left", sCtrlType);
- sTop= getStyleValue(degnattrval, "top", sCtrlType);
- sWidth = getStyleValue(degnattrval, "width", sCtrlType);
- sHeight = getStyleValue(degnattrval, "height", sCtrlType);
- }
- if(sLeft == "") sLeft = pCtrlPosition.x;
- else{
- sLeft = parseInt(sLeft);
- pCtrlPosition.x = sLeft;
- }
-
- if(sTop=="")
- sTop = pCtrlPosition.y;
- else{
- sTop = parseInt(sTop);
- pCtrlPosition.y = sTop;
- }
-
- if(sWidth == "") sWidth = pCtrlPosition.width;
- else{
- sWidth = parseInt(sWidth);
- pCtrlPosition.width = sWidth;
- }
-
- if(sHeight == "") sHeight = pCtrlPosition.height;
- else{
- sHeight = parseInt(sHeight);
- pCtrlPosition.height = sHeight;
- }
-
- sStyleMsg += "left:"+sLeft+"px; ";
- sLabelStyleMsg += "left:"+(parseInt(sLeft)+15)+"px; ";
-
- sStyleMsg += "top:"+sTop+"px; ";
- sLabelStyleMsg += "top:"+sTop+"px; ";
- sStyleMsg += "width:"+sWidth+"px; ";
- sLabelStyleMsg += "width:"+sWidth+"px; ";
-
- sStyleMsg += "height:"+sHeight+"px; ";
- sLabelStyleMsg += "height:"+sHeight+"px; ";
-
- // Font
- if(document.controls(ctrlid) != null)
- {
- // FontName
- var fontfamilyArr = document.controls(ctrlid).attribute("font-family").split(",");
-
- if(fontfamilyArr.length > 0)
- {
- sLabelStyleMsg += getXSLTCtrlAttribute("font-family", fontfamilyArr[0]);
- }
- else
- sLabelStyleMsg += getXSLTCtrlAttribute("font-family", getStyleValue(degnattrval, "font-family", sCtrlType));
-
- // FontSize
- var fontSize = document.controls(ctrlid).attribute("font-size");
-
- if(fontSize != "")
- sLabelStyleMsg += getXSLTCtrlAttribute("font-size", (parseInt(fontSize) - 3));
- else
- sLabelStyleMsg += getXSLTCtrlAttribute("font-size", "9");
-
- sLabelStyleMsg += getXSLTCtrlAttribute("font-weight", document.controls(ctrlid).attribute("font-weight"));
- sLabelStyleMsg += getXSLTCtrlAttribute("font-style", document.controls(ctrlid).attribute("font-style"));
- sLabelStyleMsg += getXSLTCtrlAttribute("text-decoration", document.controls(ctrlid).attribute("text-decoration"));
-
- var fontColor = document.controls(ctrlid).attribute("color");
- if(fontColor != "")
- {
- if(fontColor.charAt(0) != "#")
- sLabelStyleMsg += getXSLTCtrlAttribute("color", "#" + fontColor);
- else
- sLabelStyleMsg += getXSLTCtrlAttribute("color", fontColor);
- }
- }
- else
- {
- sLabelStyleMsg += getXSLTCtrlAttribute("font-family", getStyleValue(degnattrval, "font-family", sCtrlType));
-
- var fontSize = getStyleValue(degnattrval, "font-size", sCtrlType);
-
- if(fontSize != "")
- sLabelStyleMsg += getXSLTCtrlAttribute("font-size", (parseInt(fontSize) - 3));
- else
- sLabelStyleMsg += getXSLTCtrlAttribute("font-size", "9");
-
- sLabelStyleMsg += getXSLTCtrlAttribute("font-weight", getStyleValue(degnattrval, "font-weight", sCtrlType));
- sLabelStyleMsg += getXSLTCtrlAttribute("font-style", getStyleValue(degnattrval, "font-style", sCtrlType));
- sLabelStyleMsg += getXSLTCtrlAttribute("text-decoration", getStyleValue(degnattrval, "text-decoration", sCtrlType));
- sLabelStyleMsg += getXSLTCtrlAttribute("color", getStyleValue(degnattrval, "color", sCtrlType));
- }
-
- sStyleMsg += "\"";
- sLabelStyleMsg += "\"";
-
- strArr[0] = sStyleMsg;
- strArr[1] = sLabelStyleMsg;
-
- return strArr;
- }
- /**
- * @desc : XSLT 스타일 값을 얻어온다.(폰트정보는 컨트롤에서)
- * @
- * @param :
- * @return :
- * @history : 2008-12-10 컨트롤의 폰트 정보를 얻어온다.
- * @---------------------------------------------------
- */
- function getShapeXSLTStyleVal(ctrlid, pCtrlPosition, degnattrval, pCtrlType)
- {
- var sLeft = "";
- var sTop= "";
- var sWidth = "";
- var sHeight = "";
- var sStyleMsg = "style=\"position:absolute; ";
- var sCtrlType = null;
- if(pCtrlType != "grp") sCtrlType = pCtrlType;
-
- if(pCtrlType == "RDO" || pCtrlType == "CHK" || pCtrlType == "BOL" || pCtrlType == "MSL" || pCtrlType == "SSL")
- sCtrlType = "ctrl";
-
- // position
- if(document.controls(ctrlid) != null)
- {
- sLeft = document.controls(ctrlid).attribute("left");
- }
- else
- sLeft = getStyleValue(degnattrval, "left", sCtrlType);
-
- if(sLeft == "") sLeft = pCtrlPosition.x;
- else{
- sLeft = parseInt(sLeft);
- pCtrlPosition.x = sLeft;
- }
-
- if(pCtrlType != "CHK" && pCtrlType != "BOL" && pCtrlType != "MSL")
- sStyleMsg += "left:"+sLeft+"px; ";
-
- if(document.controls(ctrlid) != null)
- {
- sTop = document.controls(ctrlid).attribute("top");
- }
- else
- sTop= getStyleValue(degnattrval, "top", sCtrlType);
-
- if(sTop=="")
- sTop = pCtrlPosition.y;
- else{
- sTop = parseInt(sTop);
- pCtrlPosition.y = sTop;
- }
-
- if(pCtrlType != "CHK" && pCtrlType != "BOL" && pCtrlType != "MSL")
- sStyleMsg += "top:"+sTop+"px; ";
-
-
- if(document.controls(ctrlid) != null)
- {
- sWidth = document.controls(ctrlid).attribute("width");
- }
- else
- sWidth = getStyleValue(degnattrval, "width", sCtrlType);
-
- if(sWidth == "") sWidth = pCtrlPosition.width;
- else{
- sWidth = parseInt(sWidth) - 1;
- pCtrlPosition.width = sWidth;
- }
-
- if(pCtrlType != "grp" && pCtrlType != "CHK" && pCtrlType != "BOL" && pCtrlType != "MSL")
- sStyleMsg += "width:"+sWidth+"px; ";
-
- if(document.controls(ctrlid) != null)
- {
- sHeight = document.controls(ctrlid).attribute("height");
- }
- else
- sHeight = getStyleValue(degnattrval, "height", sCtrlType);
-
- if(sHeight == "") sHeight = pCtrlPosition.height;
- else{
- sHeight = parseInt(sHeight) - 1;
- pCtrlPosition.height = sHeight;
- }
-
- if(pCtrlType != "grp" && pCtrlType != "CHK" && pCtrlType != "BOL" && pCtrlType != "MSL")
- {
- sStyleMsg += "height:"+sHeight+"px; ";
- }
-
- //Background
- sStyleMsg += getXSLTCtrlAttribute("background-color", getStyleValue(degnattrval, "background-color", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("background-image", getStyleValue(degnattrval, "background-image", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("background-repeat", getStyleValue(degnattrval, "background-repeat", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("background-stretch", getStyleValue(degnattrval, "background-stretch", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("background-position", getStyleValue(degnattrval, "background-position", sCtrlType));
-
- //Border
- var strBorderStyle = "";
-
- if(document.controls(ctrlid) != null)
- strBorderStyle = document.controls(ctrlid).attribute("border-style");
-
- if(strBorderStyle != "")
- {
- sStyleMsg += getXSLTCtrlAttribute("border-style", strBorderStyle);
-
- if(getStyleValue(degnattrval, "border-width", sCtrlType) != "")
- sStyleMsg += getXSLTCtrlAttribute("border-width", getStyleValue(degnattrval, "border-width", sCtrlType));
- else
- sStyleMsg += getXSLTCtrlAttribute("border-width", "1");
- }
- else
- {
- sStyleMsg += getXSLTCtrlAttribute("border-style", getStyleValue(degnattrval, "border-style", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("border-width", getStyleValue(degnattrval, "border-width", sCtrlType));
- sStyleMsg += getXSLTCtrlAttribute("border-color", getStyleValue(degnattrval, "border-color", sCtrlType));
- }
- if(pCtrlType != "RDO" && pCtrlType != "CHK" && pCtrlType != "BOL" && pCtrlType != "MSL" && pCtrlType != "IMG")
- sStyleMsg += "\"";
-
- return sStyleMsg;
- }
|