comparison buy.pl @ 47:4431dc7d4bb5 laserkard

[svn r48] almost fixed "hover over" bug
author rlm
date Sun, 31 Jan 2010 14:21:14 -0500
parents 1045db9799e3
children 95fa4bcc5d67
comparison
equal deleted inserted replaced
46:26c2b3ad21c7 47:4431dc7d4bb5
14 14
15 15
16 my %hash = ( 16 my %hash = (
17 17
18 'material' => \&material, 18 'material' => \&material,
19 'pokedex' => \&pokedex, 19
20 'template' => \&template, 20 'template' => \&template,
21 'inputbox' => \&inputbox, 21 'inputbox' => \&inputbox,
22 'display' => \&display, 22 'display' => \&display,
23 'change_rules' => \&change_rules, 23 'change_rules' => \&change_rules,
24 'vanish' => \&vanish, 24 'vanish' => \&vanish,
25 'updateForm' => \&updateForm 25 'updateForm' => \&updateForm,
26 'cardType' => \&cardType
26 ); 27 );
27 28
28 29
29 30
30 my $pjx = CGI::Ajax->new(%hash); 31 my $pjx = CGI::Ajax->new(%hash);
31 32
32 33
33 # this outputs the html for the page 34 # this outputs the html for the page
34 print $pjx->build_html($q,\&gen,{-Cache_Control => 'no-store, no-cache, must-revalidate', -Pragma => 'no-cache'}); 35 print $pjx->build_html($q,\&gen,{-Cache_Control => 'no-store, no-cache, must-revalidate', -Pragma => 'no-cache'});
36
37
38
39 sub cardType
40 {
41
42 return $_[0];
43
44 }
35 45
36 46
37 47
38 sub updateForm 48 sub updateForm
39 49
121 <div id = "i_templates"><div class = 'ttyl'> <titletron>Select Style.</titletron></div> 131 <div id = "i_templates"><div class = 'ttyl'> <titletron>Select Style.</titletron></div>
122 <div id = 'stupid'> 132 <div id = 'stupid'>
123 133
124 134
125 <input TYPE="image" src = "./images/templates/big_$materialcolor.jpg" 135 <input TYPE="image" src = "./images/templates/big_$materialcolor.jpg"
126 onmouseover="pokedex(['args__big'],['pokedex']);" 136 onmouseover="pokedex('big_$materialcolor');"
137 onmouseout = "pokedex(document.getElementById('currentSpec').innerHTML);"
138
139
140
127 onclick= 141 onclick=
128 "display(['template2'], ['display']); 142 "display(['template2'], ['display']);
129 inputbox(['template2', 'formValues'], ['inputbox']); 143 inputbox(['template2', 'formValues'], ['inputbox']);
130 material(['template2'], ['materials']); 144 material(['template2'], ['materials']);
131 redraw('bold');" ID="template2" NAME="template2" VALUE="big_$materialcolor"> 145 cardType(['template2'], ['currentSpec']);
146 redraw('bold');"
147 ID="template2" NAME="template2" VALUE="big_$materialcolor">
132 <br> 148 <br>
133 149
134 150
135 151
136 <input TYPE="image" src = "./images/templates/basic_$materialcolor.jpg" 152 <input TYPE="image" src = "./images/templates/basic_$materialcolor.jpg"
137 onmouseover="pokedex(['args__basic'],['pokedex']);" 153 onmouseover="pokedex('basic_$materialcolor');"
154 onmouseout = "pokedex(document.getElementById('currentSpec').innerHTML);"
138 onclick= 155 onclick=
139 "display(['template3'], ['display']); 156 "display(['template3'], ['display']);
140 inputbox(['template3', 'formValues'], ['inputbox']); 157 inputbox(['template3', 'formValues'], ['inputbox']);
141 material(['template3'], ['materials']); 158 material(['template3'], ['materials']);
142 redraw('arrow');" ID="template3" NAME="template3" VALUE="basic_$materialcolor" ><br> 159 cardType(['template3'], ['currentSpec']);
160 redraw('arrow');"
161 ID="template3" NAME="template3" VALUE="basic_$materialcolor" ><br>
143 162
144 163
145 164
146 <input TYPE="image" src = "./images/templates/classic_$materialcolor.jpg" 165 <input TYPE="image" src = "./images/templates/classic_$materialcolor.jpg"
147 onmouseover="pokedex(['args__classic'],['pokedex']);" 166 onmouseover="pokedex('classic_$materialcolor');"
167 onmouseout = "pokedex(document.getElementById('currentSpec').innerHTML);"
148 onclick= 168 onclick=
149 "display(['template1'], ['display']); 169 "display(['template1'], ['display']);
150 inputbox(['template1', 'formValues'], ['inputbox']); 170 inputbox(['template1', 'formValues'], ['inputbox']);
151 material(['template1'], ['materials']); 171 material(['template1'], ['materials']);
152 redraw('classic');" ID="template1" NAME="template1" VALUE="classic_$materialcolor" ><br> 172 cardType(['template1'], ['currentSpec']);
173 redraw('classic');"
174 ID="template1" NAME="template1" VALUE="classic_$materialcolor" ><br>
153 175
154 176
155 177
156 <input TYPE="image" src = "./images/templates/lines_$materialcolor.jpg" 178 <input TYPE="image" src = "./images/templates/lines_$materialcolor.jpg"
157 onmouseover="pokedex(['args__lines'],['pokedex']);" 179 onmouseover="pokedex('lines_$materialcolor');"
180 onmouseout = "pokedex(document.getElementById('currentSpec').innerHTML);"
158 onclick= 181 onclick=
159 "display(['template4'], ['display']); 182 "display(['template4'], ['display']);
160 inputbox(['template4', 'formValues'], ['inputbox']); 183 inputbox(['template4', 'formValues'], ['inputbox']);
161 material(['template4'], ['materials']); 184 material(['template4'], ['materials']);
162 redraw('direct');" ID="template4" NAME="template4" VALUE="lines_$materialcolor" > 185 cardType(['template4'], ['currentSpec']);
186 redraw('direct');"
187 ID="template4" NAME="template4" VALUE="lines_$materialcolor" >
163 188
164 </div> 189 </div>
165 </div> 190 </div>
166 191
167 HERE 192 HERE
222 } 247 }
223 248
224 249
225 #every type has it's own associated paylist file the contains the things we need 250 #every type has it's own associated paylist file the contains the things we need
226 251
227 $z = '<div id = "whatever" onmouseover='."\"pokedex([\'args__$type\'],[\'pokedex\']);\">".$z.'</div>'; 252 $z = <<HERE . $z;
253 <div id = "whatever" onmouseover = "pokedex(document.getElementById('currentSpec').innerHTML);">
254 HERE
255
256
257
258
259 $z = $z.'</div>';
228 260
229 261
230 foreach my $key ( keys %fieldHash ) 262 foreach my $key ( keys %fieldHash )
231 { 263 {
232 264
271 #~ 303 #~
272 #~ 304 #~
273 #~ $t =~ s/PERL::PIC/$all/g; 305 #~ $t =~ s/PERL::PIC/$all/g;
274 306
275 $t = <<HERE; 307 $t = <<HERE;
276 <image src = "./images/display/blank.jpg" onmouseover="pokedex(['args__PERL::PIC'],['pokedex']);"> 308 <image src = "./images/display/blank.jpg"
309 onmouseover = "pokedex(document.getElementById('currentSpec').innerHTML);"
310 >
277 311
278 <div id = overlay> 312 <div id = overlay>
279 313
280 314
281 </div> 315 </div>
314 348
315 349
316 $a =~ s/PERL-REPLACE::TOP_MENU/$b/; #equivalent to <?php include("top_menu.html"); ?>, but in perl and with more memory problems :) 350 $a =~ s/PERL-REPLACE::TOP_MENU/$b/; #equivalent to <?php include("top_menu.html"); ?>, but in perl and with more memory problems :)
317 $b = &material("void_acrylic_clear",1); 351 $b = &material("void_acrylic_clear",1);
318 $a =~ s/PERL-REPLACE::MATERIALS/$b/; #let's do it again!!! :) 352 $a =~ s/PERL-REPLACE::MATERIALS/$b/; #let's do it again!!! :)
353
354
355
356 $b = "big_acrylic_clear";
357 $a =~ s/PERL::INITIALCARD/$b/;
319 $b = &template("big_acrylic_clear"); 358 $b = &template("big_acrylic_clear");
320
321
322
323
324
325 $a =~ s/PERL-REPLACE::TEMPLATES/$b/; 359 $a =~ s/PERL-REPLACE::TEMPLATES/$b/;
326 360
327 $b = &display("big_acrylic_clear"); 361 $b = &display("big_acrylic_clear");
328 $a =~ s/PERL-REPLACE::DISPLAY/$b/; 362 $a =~ s/PERL-REPLACE::DISPLAY/$b/;
329 363