changeset 47:4431dc7d4bb5 laserkard

[svn r48] almost fixed "hover over" bug
author rlm
date Sun, 31 Jan 2010 14:21:14 -0500
parents 26c2b3ad21c7
children b2a11435a89b
files awesome_js/robert.js buy.html buy.pl log/error_log.log sexy.css
diffstat 5 files changed, 130 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/awesome_js/robert.js	Sun Jan 31 12:33:33 2010 -0500
     1.2 +++ b/awesome_js/robert.js	Sun Jan 31 14:21:14 2010 -0500
     1.3 @@ -1,4 +1,35 @@
     1.4  
     1.5 +descHash = new Object();
     1.6 +
     1.7 +
     1.8 +
     1.9 +
    1.10 +descHash.classic_acrylic_clear = 
    1.11 +"<h1>The Classic LaserKard.</h1>Balanced and Complete.  The original LaserKard.  For those that wish to leave no stone unturned.  It's all there.";
    1.12 +
    1.13 +descHash.big_acrylic_clear = 
    1.14 +"<h1>The Bold Kard.</h1>Austere and Iconic.  For those that wish to leave an impression with the power of their name accompanied only by their main method of contact.  Bold, period.";
    1.15 +
    1.16 +descHash.basic_acrylic_clear = 
    1.17 +"<h1>The Arrow Kard.</h1>Precise and Straightforward.  For those that seek to make a statement while being clear and concise. Straight as an arrow.";
    1.18 +
    1.19 +descHash.lines_acrylic_clear = 
    1.20 +"<h1>The Direct Kard.</h1>Thorough and Distinct.  For those that aim to demonstrate their professionalism with style.  Push the envelope.  Be Direct.";
    1.21 +
    1.22 +
    1.23 +
    1.24 +
    1.25 +
    1.26 +
    1.27 +function pokedex(target)
    1.28 +{
    1.29 +
    1.30 +
    1.31 +var description = eval ("descHash." + target);
    1.32 +
    1.33 +document.getElementById('pokedex').innerHTML = description;
    1.34 +	
    1.35 +}
    1.36  
    1.37  
    1.38  
     2.1 --- a/buy.html	Sun Jan 31 12:33:33 2010 -0500
     2.2 +++ b/buy.html	Sun Jan 31 14:21:14 2010 -0500
     2.3 @@ -87,12 +87,28 @@
     2.4  PERL::INITIALVALUES
     2.5  </div>
     2.6  
     2.7 +<div id = "currentSpec">
     2.8 +PERL::INITIALCARD
     2.9 +</div>
    2.10 +
    2.11  
    2.12  <div id = "cardDefs">
    2.13  PERL::DEFS
    2.14  </div>
    2.15  
    2.16  
    2.17 +<div id = "descriptions">
    2.18 +{
    2.19 +"big_acrylic_clear" : "bold",
    2.20 +"basic_acrylic_clear" : "wwx",
    2.21 +"classic_acrylic_clear" : "fuck",
    2.22 +"lines_acrylic_clear" : "damn"
    2.23 +}
    2.24 +
    2.25 +</div>
    2.26 +
    2.27 +
    2.28 +
    2.29  <script language="javascript">
    2.30  //this is the main painting object, established here and created with Initial painting values
    2.31  
     3.1 --- a/buy.pl	Sun Jan 31 12:33:33 2010 -0500
     3.2 +++ b/buy.pl	Sun Jan 31 14:21:14 2010 -0500
     3.3 @@ -16,13 +16,14 @@
     3.4  my %hash = ( 
     3.5  
     3.6  'material' => \&material,
     3.7 -'pokedex'  => \&pokedex,
     3.8 +
     3.9  'template'	=> \&template, 
    3.10  'inputbox'	=> \&inputbox,
    3.11  'display'	=> \&display,
    3.12  'change_rules' => \&change_rules,
    3.13  'vanish'      => \&vanish,
    3.14 -'updateForm'  => \&updateForm
    3.15 +'updateForm'  => \&updateForm,
    3.16 +'cardType'    => \&cardType
    3.17  );
    3.18  
    3.19   
    3.20 @@ -33,6 +34,15 @@
    3.21  # this outputs the html for the page
    3.22  print $pjx->build_html($q,\&gen,{-Cache_Control => 'no-store, no-cache, must-revalidate', -Pragma => 'no-cache'}); 
    3.23  
    3.24 +
    3.25 +
    3.26 +sub cardType
    3.27 +{
    3.28 +
    3.29 +return $_[0];
    3.30 +	
    3.31 +}
    3.32 +
    3.33   
    3.34  
    3.35  sub updateForm
    3.36 @@ -123,43 +133,58 @@
    3.37  
    3.38  
    3.39  <input TYPE="image" src = "./images/templates/big_$materialcolor.jpg" 	
    3.40 -onmouseover="pokedex(['args__big'],['pokedex']);" 	
    3.41 +onmouseover="pokedex('big_$materialcolor');"
    3.42 +onmouseout = "pokedex(document.getElementById('currentSpec').innerHTML);"
    3.43 +
    3.44 +
    3.45 + 	
    3.46  onclick=
    3.47  "display(['template2'], ['display']); 
    3.48  inputbox(['template2', 'formValues'], ['inputbox']);
    3.49  material(['template2'], ['materials']);
    3.50 -redraw('bold');" ID="template2" NAME="template2" VALUE="big_$materialcolor">
    3.51 +cardType(['template2'], ['currentSpec']);
    3.52 +redraw('bold');" 
    3.53 +ID="template2" NAME="template2" VALUE="big_$materialcolor">
    3.54  <br>
    3.55  
    3.56    
    3.57  
    3.58  <input TYPE="image" src = "./images/templates/basic_$materialcolor.jpg"
    3.59 -onmouseover="pokedex(['args__basic'],['pokedex']);"	
    3.60 +onmouseover="pokedex('basic_$materialcolor');" 
    3.61 +onmouseout = "pokedex(document.getElementById('currentSpec').innerHTML);"
    3.62  onclick=
    3.63  "display(['template3'], ['display']); 
    3.64  inputbox(['template3', 'formValues'], ['inputbox']);
    3.65  material(['template3'], ['materials']);
    3.66 -redraw('arrow');" ID="template3" NAME="template3" VALUE="basic_$materialcolor"          ><br>
    3.67 +cardType(['template3'], ['currentSpec']);
    3.68 +redraw('arrow');" 
    3.69 +ID="template3" NAME="template3" VALUE="basic_$materialcolor"          ><br>
    3.70  
    3.71   
    3.72  
    3.73  <input TYPE="image" src = "./images/templates/classic_$materialcolor.jpg"  
    3.74 -onmouseover="pokedex(['args__classic'],['pokedex']);"	
    3.75 +onmouseover="pokedex('classic_$materialcolor');" 
    3.76 +onmouseout = "pokedex(document.getElementById('currentSpec').innerHTML);"
    3.77  onclick=
    3.78  "display(['template1'], ['display']); 
    3.79  inputbox(['template1', 'formValues'], ['inputbox']);
    3.80  material(['template1'], ['materials']);
    3.81 -redraw('classic');" ID="template1" NAME="template1" VALUE="classic_$materialcolor"    ><br>
    3.82 +cardType(['template1'], ['currentSpec']);
    3.83 +redraw('classic');" 
    3.84 +ID="template1" NAME="template1" VALUE="classic_$materialcolor"    ><br>
    3.85  
    3.86   
    3.87  
    3.88  <input TYPE="image" src = "./images/templates/lines_$materialcolor.jpg" 
    3.89 -onmouseover="pokedex(['args__lines'],['pokedex']);"	
    3.90 +onmouseover="pokedex('lines_$materialcolor');" 	
    3.91 +onmouseout = "pokedex(document.getElementById('currentSpec').innerHTML);"
    3.92  onclick=
    3.93  "display(['template4'], ['display']); 
    3.94  inputbox(['template4', 'formValues'], ['inputbox']);
    3.95  material(['template4'], ['materials']);
    3.96 -redraw('direct');" ID="template4" NAME="template4" VALUE="lines_$materialcolor"           > 
    3.97 +cardType(['template4'], ['currentSpec']);
    3.98 +redraw('direct');" 
    3.99 +ID="template4" NAME="template4" VALUE="lines_$materialcolor"           > 
   3.100  
   3.101  	</div>
   3.102  	</div>
   3.103 @@ -224,7 +249,14 @@
   3.104  
   3.105  #every type has it's own associated paylist file the contains the things we need
   3.106  
   3.107 -$z = '<div id = "whatever" onmouseover='."\"pokedex([\'args__$type\'],[\'pokedex\']);\">".$z.'</div>';
   3.108 +$z = <<HERE . $z;
   3.109 +<div id = "whatever" onmouseover = "pokedex(document.getElementById('currentSpec').innerHTML);">
   3.110 +HERE
   3.111 +
   3.112 +
   3.113 +
   3.114 +
   3.115 +$z = $z.'</div>';
   3.116  
   3.117  
   3.118  foreach my $key ( keys %fieldHash )
   3.119 @@ -273,7 +305,9 @@
   3.120  #~ $t =~ s/PERL::PIC/$all/g;
   3.121  
   3.122  	$t = <<HERE;
   3.123 -	<image src = "./images/display/blank.jpg" 	onmouseover="pokedex(['args__PERL::PIC'],['pokedex']);">
   3.124 +	<image src = "./images/display/blank.jpg" 	
   3.125 +	onmouseover = "pokedex(document.getElementById('currentSpec').innerHTML);"
   3.126 +	>
   3.127  	
   3.128  	<div id = overlay>
   3.129  
   3.130 @@ -316,12 +350,12 @@
   3.131  $a =~ s/PERL-REPLACE::TOP_MENU/$b/; #equivalent to <?php include("top_menu.html"); ?>, but in perl and with more memory problems :)
   3.132  $b = &material("void_acrylic_clear",1);
   3.133  $a =~ s/PERL-REPLACE::MATERIALS/$b/; #let's do it again!!! :)
   3.134 +
   3.135 +
   3.136 +
   3.137 +$b = "big_acrylic_clear";
   3.138 +$a =~ s/PERL::INITIALCARD/$b/;
   3.139  $b = &template("big_acrylic_clear");
   3.140 -
   3.141 -
   3.142 -
   3.143 -
   3.144 -
   3.145  $a =~ s/PERL-REPLACE::TEMPLATES/$b/; 
   3.146  
   3.147  $b = &display("big_acrylic_clear");
     4.1 --- a/log/error_log.log	Sun Jan 31 12:33:33 2010 -0500
     4.2 +++ b/log/error_log.log	Sun Jan 31 14:21:14 2010 -0500
     4.3 @@ -262,3 +262,9 @@
     4.4  [Fri Jan 29 16:00:22 2010] [error] [client 18.238.1.90] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
     4.5  [Sun Jan 31 12:15:38 2010] [error] [client 18.238.1.90] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
     4.6  [Sun Jan 31 12:15:41 2010] [error] [client 18.238.1.90] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
     4.7 +[Sun Jan 31 12:57:02 2010] [error] [client 18.238.1.90] POSSIBLE SECURITY INCIDENT! Browser from 18.238.1.90, referer: http://laserkard.rlmcintyre.com/buy.pl
     4.8 +[Sun Jan 31 12:57:02 2010] [error] [client 18.238.1.90] \trequested URL: http://laserkard.rlmcintyre.com/buy.pl\tfname request: pokedex -- returning Bad Request status 400, referer: http://laserkard.rlmcintyre.com/buy.pl
     4.9 +[Sun Jan 31 12:57:02 2010] [error] [client 18.238.1.90] POSSIBLE SECURITY INCIDENT! Browser from 18.238.1.90, referer: http://laserkard.rlmcintyre.com/buy.pl
    4.10 +[Sun Jan 31 12:57:02 2010] [error] [client 18.238.1.90] \trequested URL: http://laserkard.rlmcintyre.com/buy.pl\tfname request: pokedex -- returning Bad Request status 400, referer: http://laserkard.rlmcintyre.com/buy.pl
    4.11 +[Sun Jan 31 13:36:39 2010] [error] [client 18.111.71.28] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
    4.12 +[Sun Jan 31 13:36:42 2010] [error] [client 18.111.71.28] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
     5.1 --- a/sexy.css	Sun Jan 31 12:33:33 2010 -0500
     5.2 +++ b/sexy.css	Sun Jan 31 14:21:14 2010 -0500
     5.3 @@ -153,7 +153,7 @@
     5.4  margin-left:auto;
     5.5  margin-right: auto;
     5.6  clear:left;
     5.7 -
     5.8 +display:none;
     5.9  }
    5.10  
    5.11  /*************************************************************************/
    5.12 @@ -227,7 +227,7 @@
    5.13  titletron
    5.14  {
    5.15  color: white;
    5.16 -background-color:#00000;
    5.17 +background-color:#000000;
    5.18  font: bold 32px "arial", "sans-serif";
    5.19  }
    5.20  
    5.21 @@ -258,7 +258,7 @@
    5.22  {
    5.23  color:white;
    5.24  position: absolute;
    5.25 -top:45px;
    5.26 +top:30px;
    5.27  left: 15px;
    5.28  
    5.29  }
    5.30 @@ -268,8 +268,30 @@
    5.31  color:green;
    5.32  position: absolute;
    5.33  width: 200px;
    5.34 -top: 70px;
    5.35 +top: 90px;
    5.36  left: 10px;
    5.37  
    5.38  }
    5.39  
    5.40 +div#currentSpec
    5.41 +{
    5.42 +color:red;
    5.43 +position: absolute;
    5.44 +width: 200px;
    5.45 +top: 90px;
    5.46 +right: 10px;
    5.47 +
    5.48 +}
    5.49 +
    5.50 +div#descriptions
    5.51 +{
    5.52 +color:blue;
    5.53 +position: absolute;
    5.54 +width: 200px;
    5.55 +top: 130px;
    5.56 +right: 10px;
    5.57 +
    5.58 +}
    5.59 +
    5.60 +
    5.61 +