rate-recipe.html 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html><head><title>Hummus</title>
  3. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
  4. <link media="screen" href="rate-recipe_files/global.css" type="text/css" rel="stylesheet"/>
  5. <script type="text/javascript"><!--
  6. var MAX_RATING = 5;
  7. function StarSet(imagePath, setNumber,currentRating) {
  8. this.imgArray = new Array();
  9. this.imgPath = imagePath;
  10. this.setNum = setNumber;
  11. this.currRating = currentRating;
  12. for ( var i = 1; i <= MAX_RATING; i++ ) {
  13. var starImg = document.getElementById('star.'+this.setNum+'.'+i);
  14. if ( !starImg ) {
  15. alert("Can't find star " +this.setNum +'.' +i);
  16. return;
  17. }
  18. this.imgArray[(i-1)] = starImg;
  19. starImg.onmouseover = handleStarMouseOver
  20. starImg.onmouseout = handleStarMouseOut
  21. starImg.onclick = handleStarClick
  22. starImg.rating = i;
  23. starImg.starSet = this;
  24. // little hack to remove extra text from between img tags, as
  25. // browsers render whitespace if it's there
  26. if ( starImg.previousSibling && starImg.previousSibling.nodeType == Node.TEXT_NODE ) {
  27. starImg.parentNode.removeChild(starImg.previousSibling);
  28. }
  29. /*var starLink = document.getElementById('starLink.'+this.setNum+'.'+i);
  30. if ( !starLink ) {
  31. alert("can't find star link " +this.setNum +'.' +i);
  32. return;
  33. }
  34. starLink.onmouseover = handleStarMouseOver
  35. starLink.onmouseout = handleStarMouseOut
  36. starLink.rating = i;
  37. starLink.starSet = this;
  38. */
  39. }
  40. // now make stars visible by setting parent node to visible
  41. this.imgArray[0].parentNode.style.visibility = 'visible';
  42. }
  43. function setRating(rating) {
  44. alert("settting rating to " +rating);
  45. }
  46. function highlightRating(rating) {
  47. for ( var i = 0; i < rating; i++ ) {
  48. this.imgArray[i].src = this.imgPath + 'star-active.png';
  49. }
  50. for ( var i = rating; i < MAX_RATING; i++ ) {
  51. this.imgArray[i].src = this.imgPath + 'star-off.png';
  52. }
  53. }
  54. function resetRating() {
  55. for ( var i = 0; i < this.currRating; i++ ) {
  56. this.imgArray[i].src = this.imgPath + 'star-on.png';
  57. }
  58. for ( var i = this.currRating; i < MAX_RATING; i++ ) {
  59. this.imgArray[i].src = this.imgPath + 'star-off.png';
  60. }
  61. }
  62. StarSet.prototype.setRating = setRating;
  63. StarSet.prototype.highlightRating = highlightRating;
  64. StarSet.prototype.resetRating = resetRating;
  65. //--></script>
  66. <script type="text/javascript"><!--
  67. function handleStarMouseOver() {
  68. this.starSet.highlightRating(this.rating);
  69. }
  70. function handleStarMouseOut() {
  71. this.starSet.resetRating();
  72. }
  73. function handleStarClick() {
  74. this.starSet.setRating(this.rating);
  75. }
  76. var W3CDOM = (document.createElement && document.getElementsByTagName);
  77. var STAR_SETS = new Array();
  78. window.onload = init;
  79. function init() {
  80. if ( !W3CDOM ) {
  81. alert("Your browser does not support DOM.");
  82. return;
  83. }
  84. STAR_SETS[0] = new StarSet('rate-recipe_files/',0,0);
  85. }
  86. //--></script>
  87. <style type="text/css">
  88. img.star-rating {
  89. border: none;
  90. margin: 0px;
  91. padding: 0px;
  92. cursor: pointer;
  93. }
  94. </style>
  95. </head>
  96. <body>
  97. <div class="nav-banner">
  98. <a title="iEat homepage" href="http://localhost:8080/ieat/home.do">Home</a> - <a title="Browse index of available recipies." href="http://localhost:8080/ieat/index.do">A-Z</a> - <a title="Search for recipes" href="http://localhost:8080/ieat/search.do">Search</a> - <a title="Add a new recipe to iEat." href="http://localhost:8080/ieat/addRecipe.do">New Recipe</a> - <a title="View your saved meals, or create new meals." href="http://localhost:8080/ieat/meals.do">Meals</a> - <a title="iEat system administration" href="http://localhost:8080/ieat/admin.do">Admin</a> - <a title="Logout of iEat" href="http://localhost:8080/ieat/logoff.do">Logout</a> (Matt)</div>
  99. <h1>Hummus</h1>
  100. <div class="edit-banner">
  101. <span class="rating-stars" style="visibility: hidden;">
  102. <img class="star-rating" id="star.0.1" src="rate-recipe_files/star-off.png" alt="1" width="13" height="13" />
  103. <img class="star-rating" id="star.0.2" src="rate-recipe_files/star-off.png" alt="2" width="13" height="13" />
  104. <img class="star-rating" id="star.0.3" src="rate-recipe_files/star-off.png" alt="3" width="13" height="13" />
  105. <img class="star-rating" id="star.0.4" src="rate-recipe_files/star-off.png" alt="4" width="13" height="13" />
  106. <img class="star-rating" id="star.0.5" src="rate-recipe_files/star-off.png" alt="5" width="13" height="13" />
  107. </span>
  108. <a title="Convert this recipe to a different measurement system." href="http://localhost:8080/ieat/convertRecipe.do?recipeId=1&amp;index.displaySection=h&amp;index.pageSize=10">Convert</a> - <a title="Alter the recipe size, i.e. half, double, etc." href="http://localhost:8080/ieat/alterRecipe.do?recipeId=1&amp;index.displaySection=h&amp;index.pageSize=10">Alter Size</a> - <a title="Add this recipe to a meal." href="http://localhost:8080/ieat/addRecipeToMeal.do?recipeId=1">Add to Meal</a> - <a title="Make changes to this recipe." href="http://localhost:8080/ieat/editRecipe.do?recipeId=1&amp;index.displaySection=h&amp;index.pageSize=10">Edit Recipe</a> - <a title="Delete this recipe." href="http://localhost:8080/ieat/deleteRecipe.do?recipeId=1&amp;index.displaySection=h&amp;index.pageSize=10">Delete Recipe</a>
  109. </div>
  110. <div class="return-nav">
  111. <a class="back" href="http://localhost:8080/ieat/index.do?&amp;displaySection=h&amp;pageSize=10">Back to <span class="index-link">h</span>
  112. </a>
  113. </div>
  114. <div class="recipe-view">
  115. <p>This hummus is made with canned chick peas, so is immediately gratifying.</p>
  116. <p>You
  117. can vary this recipe by adding 2 T chopped cilantro. Or, substitute an
  118. aromatic sesame oil for the olive oil. Season the spread with cumin,
  119. finely diced jalapeño pepper, or scallions.</p>
  120. <table class="view">
  121. <tbody><tr>
  122. <th>Source:</th>
  123. <td>
  124. </td><th>Difficulty:</th>
  125. <td>Easy</td>
  126. </tr>
  127. <tr>
  128. <th>Base:</th>
  129. <td>Vegetable</td>
  130. <th>Ethnicity:</th>
  131. <td>Middle Eastern</td>
  132. </tr>
  133. <tr>
  134. <th>Course:</th>
  135. <td>Appetizer</td>
  136. <th>Servings:</th>
  137. <td>6</td>
  138. </tr>
  139. </tbody></table>
  140. <div class="viewLabel">Ingredients:
  141. </div>
  142. <table class="view">
  143. <tbody><tr>
  144. <td>15</td>
  145. <td> ounces chick pea - <i>one can</i>
  146. </td>
  147. </tr>
  148. <tr>
  149. <td> &#8531;</td>
  150. <td> cup water - <i>hot</i>
  151. </td>
  152. </tr>
  153. <tr>
  154. <td>1</td>
  155. <td> large lemon - <i>squeezed</i>
  156. </td>
  157. </tr>
  158. <tr>
  159. <td>2</td>
  160. <td> cloves garlic</td>
  161. </tr>
  162. <tr>
  163. <td>1</td>
  164. <td> tablespoon olive oil (extra virgin)</td>
  165. </tr>
  166. <tr>
  167. <td> 1/8</td>
  168. <td> teaspoon salt</td>
  169. </tr>
  170. <tr>
  171. <td>1</td>
  172. <td> pinch chili (red, ground)</td>
  173. </tr>
  174. <tr>
  175. <td> ¼</td>
  176. <td> teaspoon salt</td>
  177. </tr>
  178. </tbody></table>
  179. <div class="viewLabel">Instructions:
  180. </div>
  181. <div class="viewBox">
  182. <ol>
  183. <li>Drain the chick peas, rince well, and put them into the work bowl of a food processor.</li>
  184. <li>Begin to process, gradually adding the hot water to make a light, spreadable consistency.</li>
  185. </ol>
  186. </div>
  187. <br style="clear: both;" />
  188. <div class="recipe-footer">Created on 16 Oct 2004 by Matt</div>
  189. </div>
  190. </body></html>