Mercurial > laserkard
changeset 94:0f19af92260e laserkard
saving progress.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Mon, 26 Jul 2010 20:33:17 -0400 |
parents | 69b4defd835d |
children | 5fb202915c11 |
files | css/buy3.css js-lib/buy3.js stack.css stack.html |
diffstat | 4 files changed, 99 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
1.1 --- a/css/buy3.css Mon Jul 26 18:19:34 2010 -0400 1.2 +++ b/css/buy3.css Mon Jul 26 20:33:17 2010 -0400 1.3 @@ -9,7 +9,6 @@ 1.4 font: bold 15px "helvetica","arial", "sans-serif"; 1.5 color: white; 1.6 height: 200px; 1.7 - 1.8 } 1.9 1.10 div#text-entry { 1.11 @@ -17,7 +16,6 @@ 1.12 top : 15%; 1.13 left : 25%; 1.14 width : 150px; 1.15 - 1.16 } 1.17 1.18 .hidden {
2.1 --- a/js-lib/buy3.js Mon Jul 26 18:19:34 2010 -0400 2.2 +++ b/js-lib/buy3.js Mon Jul 26 20:33:17 2010 -0400 2.3 @@ -16,10 +16,30 @@ 2.4 2.5 2.6 2.7 + 2.8 + 2.9 + 2.10 2.11 Buy = (function (){ 2.12 + 2.13 + //Cards drawing functions: 2.14 + 2.15 + var Cards = 2.16 + {"bold" : { 2.17 + "name" :(function (text, display){ 2.18 + return display.print(10,10,text,helvetica, 25).attr( 2.19 + {"fill" : "#FFFFFF"}); 2.20 + })}}; 2.21 + 2.22 + 2.23 + 2.24 + 2.25 // Utility Functinos 2.26 2.27 + 2.28 + 2.29 + 2.30 + 2.31 var switchText = (function (){ 2.32 if ($(this).val() == $(this).attr('title')) 2.33 $(this).val('').removeClass('exampleText'); 2.34 @@ -48,6 +68,8 @@ 2.35 var display; 2.36 var color; 2.37 var style; 2.38 + var helvetica; 2.39 + var helvetica_I; 2.40 2.41 var state_map = { 2.42 green : {ref : null, 2.43 @@ -107,12 +129,15 @@ 2.44 display = Raphael("card-display", 340 ,215); 2.45 color = Raphael("color-select", 300, 100); 2.46 style = Raphael("style-select", 200, 70); 2.47 + helvetica = display.getFont('HelveticaNeue', 700); 2.48 + helvetica_I = display.getFont('HelveticaNeue', 800); 2.49 + 2.50 color_select_init(); 2.51 display_init(); 2.52 card_init(); 2.53 text_entry_init(); 2.54 key_handling(); 2.55 - 2.56 + update(); 2.57 }); 2.58 2.59 2.60 @@ -180,28 +205,19 @@ 2.61 assoc('#user-company', card.company); 2.62 assoc('#user-occupation', card.occupation); 2.63 assoc('#user-website', card.website); 2.64 + }); 2.65 2.66 2.67 -}); 2.68 - 2.69 - 2.70 - 2.71 var display_text_update = (function (){ 2.72 var name = null; 2.73 2.74 - return (function () { 2.75 - 2.76 + var check_text = (function () { 2.77 if (name !== card.name.text){ 2.78 - 2.79 card.name.ref.remove(); 2.80 - card.name.ref = 2.81 - display.print(10,10,card.name.text, 2.82 - display.getFont('HelveticaNeue',700), 25).attr( 2.83 - {"fill" : "#FFFFFF"}); 2.84 - 2.85 - //card.name.ref.animate({"fill" : Raphael.getColor()} ,1000); 2.86 + card.name.ref = Cards[order.style].name(card.name.text, display); 2.87 name = card.name.text; 2.88 }}); 2.89 + return check_text; 2.90 2.91 2.92 })();
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/stack.css Mon Jul 26 20:33:17 2010 -0400 3.3 @@ -0,0 +1,24 @@ 3.4 +.transparentDiv 3.5 +{ 3.6 + /* IE */ 3.7 + filter:alpha(opacity=50); 3.8 + /* CSS3 standard */ 3.9 + opacity:0.5; 3.10 + background-color:#000000; 3.11 + height:800px; 3.12 + width:300px; 3.13 +} 3.14 + 3.15 +/* 3.16 +.transparentDiv { 3.17 + width:400px; 3.18 + height:180px; 3.19 + margin:30px 50px; 3.20 + background-color:#ffffff; 3.21 + border:1px solid black; 3.22 + /* for IE */ 3.23 + filter:alpha(opacity=60); 3.24 + /* CSS3 standard */ 3.25 + opacity:0.6; 3.26 +} 3.27 +*/
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/stack.html Mon Jul 26 20:33:17 2010 -0400 4.3 @@ -0,0 +1,45 @@ 4.4 +<html> 4.5 + <head> 4.6 + <link type="text/css" href="./stack.css" rel="stylesheet"/> 4.7 + </head> 4.8 + 4.9 + <body> 4.10 + <input type="button" id='btn1' value="Hide Something" /> 4.11 + <div style=" background-image:url('./buy-images/select-blue.png'); background-repeat:repeat-x; border-style:solid;height:1000px;width:100%"> 4.12 + <div id="div3" class="transparentDiv" style=" margin-top:30px; padding-left:300px;background-color: #4ddfff; height: 100px;position:absolute; width:950px"> 4.13 + <br /> 4.14 + <br /> 4.15 + <br /> 4.16 + 4.17 + </div> 4.18 + <div id="div2" class="transparentDiv"> 4.19 + 4.20 + 4.21 + 4.22 + 4.23 + <h1></h1> 4.24 + 4.25 + 4.26 + 4.27 + </div> 4.28 + 4.29 + </div> 4.30 + 4.31 + 4.32 + <script src="http://jquery.com/src/jquery-latest.js"></script> 4.33 + <script type="text/javascript"> 4.34 + 4.35 + $(function() { 4.36 + 4.37 + $("#table1 tbody tr:even").addClass('zebra'); 4.38 + $("#btn1").click(function() { 4.39 + 4.40 + $('#div2').toggle(400); return false; 4.41 + }); 4.42 + 4.43 + }); 4.44 + 4.45 + 4.46 + </script> 4.47 + </body> 4.48 +</html>