Commit 6d65b551639dd848ddaa20fb9ae34bda7df78f80

  • avatar
  • Ajay kulkarni <ajaykools @gm…l.com>
  • Thu Jun 14 12:24:32 IST 2012
Replaced tree structure with form (1)
  
44 <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.min.js"></script>
55 <script type="text/javascript">
66 function annotationTree() {
7 $('#annotation-tree').show();
7 $('#annotation-overlay').show();
88 }
99
1010 function closeForm() {
11 $('#annotation-tree').hide();
11 $('#annotation-overlay').hide();
1212 }
1313
1414 function faceOrnament() {
1515 x = document.getElementsByClassName('annotate');
16 if(x[0].checked == true && x[0].value == 'face') {
17 $('face').show();
16 $('#face').hide(); $('#ornament').hide();
17 if(x[0].checked == true) {
18 $('#face').show();
1819 }
19 else if (x[1].checked == true && x[1].value == 'ornament') {
20 $('ornament').show();
20 else if (x[1].checked == true) {
21 $('#ornament').show();
2122 }
2223 else {
2324 alert('Please select any one of the option')
2626 }
2727 </script>
2828 <style type='text/css'>
29 #annotation-tree {
29 #annotation-overlay {
3030 position:fixed;
3131 top:0px;
3232 left:0px;
3636 display:none;
3737 z-index:99999;
3838 }
39
40 #container {
41 position:absolute;
42 top:10%;
43 left:20%;
44 width:60%;
45 height:90%;
46 background-color:#ffa;
47 }
48
3949 #face, #ornament {
4050 display:none;
4151 }
6666 <script type="text/javascript">
6767 function treeClose()
6868 {
69 $('#annotation-tree').hide();
69 $('#annotation-overlay').hide();
7070 attribs["character"] = $("#character-value").text();
7171 attribs["material"] = $("#material-value").text();
7272 myJSON.push(attribs);
9999 </ul>
100100 </div>
101101 <script type="text/javascript" >resize()</script>
102 <div id="annotation-tree">
103 <input id="close-form" type="submit" onClick="closeForm();" value="Close" title="Close this form" />
104 <div id="annotate" name="annotateForm" >
105 Choose a category for annotated part : <br />
106 <input type="radio" class="annotate" name="annotate" value="face" /> Face <br />
107 <input type="radio" class="annotate" name="annotate" value="ornament" /> Ornament <br />
108 <input type="submit" name="annotate" value="Next" onclick="faceOrnament();" />
109 </div>
110 <div id="face" name="faceForm">
111 Choose whose face is it : <br>
112 <input type="radio" name="face" value="Shiva" /> Shiva <br />
113 <input type="radio" name="face" value="Vishnu" /> Vishnu <br />
114 <input type="radio" name="face" value="Krishna" /> Krishna <br />
115 <input type="radio" name="face" value="Parvati" /> Parvati <br />
116 <input type="radio" name="face" value="Lakshmi" /> Lakshmi <br />
117 <input type="radio" name="face" value="Saraswati" /> Saraswati <br />
102 <div id="annotation-overlay">
103 <div id="container">
104 <input id="close-form" type="submit" onClick="closeForm();" value="Close" title="Close this form" />
105 <div id="annotate" name="annotateForm" >
106 Choose a category for annotated part : <br />
107 <input type="radio" class="annotate" name="annotate" value="face" /> Face <br />
108 <input type="radio" class="annotate" name="annotate" value="ornament" /> Ornament <br />
109 <input type="submit" name="annotate" value="Next" onclick="faceOrnament();" />
118110 </div>
119
120 <div id="ornament" name="ornamentForm" >
121 Choose what jewellery is it : <br />
122 <input type="radio" name="jewellery" value="Neckless" /> Neckless <br />
123 <input type="radio" name="jewellery" value="Bangles" /> Bangles <br />
124 <input type="radio" name="jewellery" value="Ear-ring" /> Ear-ring <br />
125 <input type="radio" name="jewellery" value="Nose-ring" /> Nose-ring <br />
126 <input type="radio" name="jewellery" value="Waistlet" /> Waistlet <br />
127 <input type="radio" name="jewellery" value="Ankalet" /> Ankalet <br />
128 <br />
129 Choose what materal of an ornament : <br />
130 <input type="radio" name="material" value="Gold" /> Gold <br />
131 <input type="radio" name="material" value="Silver" /> Silver <br />
132 <input type="radio" name="material" value="Bronze" /> Bronze <br />
133 <input type="radio" name="material" value="Ruby" /> Ruby <br />
134 <input type="radio" name="material" value="Diamond" /> Diamond <br />
135 <input type="radio" name="material" value="Platinum" /> Platinum <br />
111 <div id="face" name="faceForm">
112 Choose whose face is it : <br>
113 <input type="radio" name="face" value="Shiva" /> Shiva <br />
114 <input type="radio" name="face" value="Vishnu" /> Vishnu <br />
115 <input type="radio" name="face" value="Krishna" /> Krishna <br />
116 <input type="radio" name="face" value="Parvati" /> Parvati <br />
117 <input type="radio" name="face" value="Lakshmi" /> Lakshmi <br />
118 <input type="radio" name="face" value="Saraswati" /> Saraswati <br />
119 </div>
120
121 <div id="ornament" name="ornamentForm" >
122 Choose what jewellery is it : <br />
123 <input type="radio" name="jewellery" value="Neckless" /> Neckless <br />
124 <input type="radio" name="jewellery" value="Bangles" /> Bangles <br />
125 <input type="radio" name="jewellery" value="Ear-ring" /> Ear-ring <br />
126 <input type="radio" name="jewellery" value="Nose-ring" /> Nose-ring <br />
127 <input type="radio" name="jewellery" value="Waistlet" /> Waistlet <br />
128 <input type="radio" name="jewellery" value="Ankalet" /> Ankalet <br />
129 <br />
130 Choose what materal of an ornament : <br />
131 <input type="radio" name="material" value="Gold" /> Gold <br />
132 <input type="radio" name="material" value="Silver" /> Silver <br />
133 <input type="radio" name="material" value="Bronze" /> Bronze <br />
134 <input type="radio" name="material" value="Ruby" /> Ruby <br />
135 <input type="radio" name="material" value="Diamond" /> Diamond <br />
136 <input type="radio" name="material" value="Platinum" /> Platinum <br />
137 </div>
136138 </div>
137
138139 </div>
139140 </body>
140141</html>