Changeset 991
- Timestamp:
- 11/20/08 22:10:36 (7 weeks ago)
- Location:
- huginmunin/trunk/web/hm/app
- Files:
-
- 12 modified
-
lib/params.py (modified) (1 diff)
-
media/css/general.css (modified) (2 diffs)
-
media/css/quickrate.css (modified) (1 diff)
-
media/js/blocks.js (modified) (2 diffs)
-
templates/base.html (modified) (2 diffs)
-
templates/browse/browse_list.html (modified) (1 diff)
-
templates/browse/node_listing_expanded.html (modified) (2 diffs)
-
templates/graph/page.html (modified) (1 diff)
-
templates/node/page.html (modified) (1 diff)
-
templates/quickrate/quickrate_extension.html (modified) (1 diff)
-
templates/quickrate/rate_review.html (modified) (1 diff)
-
views/main.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
huginmunin/trunk/web/hm/app/lib/params.py
r565 r991 2 2 3 3 import re 4 param_re = re.compile(r'^(?:([a-z_]+)|\[(\d*)\]|\[([a-z_0-9]*)\])') 4 # i added the \. so that input type=image would work 5 # since that creates name.x and name.y parameters 6 param_re = re.compile(r'^(?:([a-z_\.]+)|\[(\d*)\]|\[([a-z_0-9]*)\])') 5 7 6 8 class InvalidParameter(Exception): pass -
huginmunin/trunk/web/hm/app/media/css/general.css
r990 r991 38 38 margin: 0; 39 39 padding: 0; 40 border: 0; 40 /* border: 0; otherwise inputs are grey rectangles instead of round buttons */ 41 41 } 42 42 … … 564 564 565 565 input, #submit, select, textarea, button { 566 border:.10em #d0d0dd solid; 566 /* border:.10em #d0d0dd solid; otherwise inputs are grey rectangles instead of round buttons */ 567 567 } 568 568 -
huginmunin/trunk/web/hm/app/media/css/quickrate.css
r990 r991 36 36 .rating_choice {padding: 1.1em .58em 5.8em .58em; margin: auto; 37 37 } 38 39 .star { width: 4em; padding: 0em; margin: 0em; } 38 40 39 41 -
huginmunin/trunk/web/hm/app/media/js/blocks.js
r990 r991 61 61 62 62 // add tag edit in place 63 /* $(".edit").editable( 64 function(value, settings) { 65 var id = $(this).attr("id"); 66 $.post("/Main/save_text/", { 'oid': 'ADDTAG', 'text': value, 'node_id': id }, 67 function() { 68 $(".edit").removeClass("edit"); 69 // err, need to then apply editable. loop. 70 //.after("<li class='edit cursor link' id=\'id\'>add tag</li>"); 71 }); 72 return(value); 73 }, 74 { 75 type : 'textarea', 76 tooltip : 'Click to edit', 77 indicator : 'Saving...', 78 submit : 'save', 79 cancel : 'cancel', 80 style: 'inherit', 81 } 82 ); 83 */ 63 64 // $(".edit").editable( 65 // function(value, settings) { 66 // var id = $(this).attr("id"); 67 // $.post("/Main/save_text/", { 'oid': 'ADDTAG', 'text': value, 'node_id': id }, 68 // function() { 69 // $(".edit").removeClass("edit"); 70 // // err, need to then apply editable. loop. 71 // //.after("<li class='edit cursor link' id=\'id\'>add tag</li>"); 72 // } 73 // ); 74 // return(value); 75 // }, 76 // { 77 // type : 'textarea', 78 // tooltip : 'Click to edit', 79 // indicator : 'Saving...', 80 // submit : 'save', 81 // cancel : 'cancel', 82 // style: 'inherit', 83 // } 84 // ); 84 85 }); 85 86 … … 88 89 // help buttons 89 90 90 $("#turn_on_help").hide();91 92 $("#turn_on_help").click( function() {93 $(".help").show();94 $("#turn_off_help").toggle();95 $("#turn_on_help").toggle();96 });97 98 $("#turn_off_help").click( function() {99 $(".help").hide();100 $("#turn_off_help").toggle();101 $("#turn_on_help").toggle();102 });91 // $("#turn_on_help").hide(); 92 // 93 // $("#turn_on_help").click( function() { 94 // $(".help").show(); 95 // $("#turn_off_help").toggle(); 96 // $("#turn_on_help").toggle(); 97 // }); 98 // 99 // $("#turn_off_help").click( function() { 100 // $(".help").hide(); 101 // $("#turn_off_help").toggle(); 102 // $("#turn_on_help").toggle(); 103 // }); 103 104 104 105 -
huginmunin/trunk/web/hm/app/templates/base.html
r976 r991 39 39 <!--<script type="text/javascript" charset="utf-8" src="/Main/media/js/jquery.min.js"></script> old --> 40 40 <script type="text/javascript" charset="utf-8" src="/Main/media/js/jquery-1.2.6.pack.js"></script> 41 <script type="text/javascript" charset="utf-8" src="/Main/media/js/jquery.tablesorter.js"></script>41 {# i don't think we use this anymore <script type="text/javascript" charset="utf-8" src="/Main/media/js/jquery.tablesorter.js"></script> #} 42 42 {# i don't think we use this anymore <script type="text/javascript" charset="utf-8" src="/Main/media/js/jquery.jtageditor.js"></script> #} 43 43 <script type="text/javascript" charset="utf-8" src="/Main/media/js/jquery.rte.js"></script> 44 44 <script type="text/javascript" charset="utf-8" src="/Main/media/js/jquery.rater.js"></script> 45 <script type="text/javascript" charset="utf-8" src="/Main/media/js/jquery.jeditable.pack.js"></script>45 {# file appears to be unused <script type="text/javascript" charset="utf-8" src="/Main/media/js/jquery.jeditable.pack.js"></script> #} 46 46 {# file appears not to exist <script type="text/javascript" charset="utf-8" src="/Main/media/js/jquery.form.js"></script> #} 47 47 … … 65 65 <script type="text/javascript" charset="utf-8" src="/Main/media/js/main.js"></script> 66 66 <script type="text/javascript" charset="utf-8" src="/Main/media/js/slide.js"></script> 67 <script type="text/javascript" charset="utf-8" src="/Main/media/js/blocks.js"></script>67 {# we don't use this anymore <script type="text/javascript" charset="utf-8" src="/Main/media/js/blocks.js"></script> #} 68 68 <!--script type="text/javascript" charset="utf-8" src="/Main/media/js/node_list.js"></script--> 69 69 <script type="text/javascript" charset="utf-8" src="/Main/media/js/behavior.js"></script> -
huginmunin/trunk/web/hm/app/templates/browse/browse_list.html
r963 r991 14 14 {% include 'graph/nodes.html' %} 15 15 16 {% block javascript_includes %}17 {{ block.super }}18 <script type="text/javascript" charset="utf-8" src="/Main/media/js/filter_nodes.js"></script>19 {% endblock %}20 21 16 {% endblock %} 22 17 -
huginmunin/trunk/web/hm/app/templates/browse/node_listing_expanded.html
r953 r991 1 1 {% extends "browse_extension.html" %} 2 2 3 {% block title %}4 BuyItLikeYouMeanIt.org - Information about {{ node.label }}5 {% for tag in node.information %}: {{ tab.label }}; {% endfor %}6 {% endblock %}3 {% block title %} 4 BuyItLikeYouMeanIt.org - Information about {{ node.label }} 5 {% for tag in node.information %}: {{ tab.label }}; {% endfor %} 6 {% endblock %} 7 7 8 8 {% block big_box %} … … 12 12 13 13 {% include 'node/behaviors.html' %} 14 15 <SCRIPT type="text/javascript"> 16 $(document).ready(function() { 17 // show rating guide 18 $(".rating_guide_show").click( function() { 19 $(this).siblings(".rating_guide").html(" \ 20 <ol> \ 21 <li value='9 -' class='bold'>Amazing. <span class='normal'>Uniquely allows others to improve even while continuing to be great.</span></li> \ 22 <li value='8 -' class='bold'>Excellent. <span class='normal'>Extremely helpful and the result of deliberate and lasting effort.</span></li> \ 23 <li value='7 -' class='bold'>Very Good. <span class='normal'>Shows how much can be accomplished through concern and compromise.</span></li> \ 24 <li value='6 -' class='bold'>Good. <span class='normal'>Beginning to be on the right track, but could certainly stand to improve. </span></li> \ 25 <li value='5 -' class='bold'>Marginal. <span class='normal'>Neither good nor bad. Perhaps its effect is legitamately unknown.</span></li> \ 26 <li value='4 -' class='bold'>Bad. <span class='normal'>Cause for very real concern and should be improved.</span></li> \ 27 <li value='3 -' class='bold'>Very Bad. <span class='normal'>Represents irresponsible neglect of a serious issue.</span></li> \ 28 <li value='2 -' class='bold'>Terrible. <span class='normal'>As bad as a behavior can get without deliberately trying for The Worst.</span></li> \ 29 <li value='1 -' class='bold'>Dreadful. <span class='normal'>Deliberately, effectively and cruelly harmful. It can seem overwhelming.</span></li> \ 30 </ol> \ 31 "); 32 $(this).hide(); 33 $(this).siblings(".rating_guide_hide").show(); 34 }); 35 // hide rating guide 36 $(".rating_guide_hide").click( function() { 37 $(this).siblings(".rating_guide").html(""); // this could be hidden if show knows to check 38 $(this).hide(); 39 $(this).siblings(".rating_guide_show").show(); 40 }); 41 42 $(".rating_guide_hide").hide(); 43 }); 44 </SCRIPT> 14 45 {% endblock %} 15 16 17 {% block javascript_includes %}18 {{ block.super }}19 {% endblock %} -
huginmunin/trunk/web/hm/app/templates/graph/page.html
r953 r991 29 29 {% endblock %} 30 30 31 32 {% block javascript_includes %}33 {{ block.super }}34 <script type="text/javascript" charset="utf-8" src="/Main/media/js/filter_nodes.js"></script>35 36 {% endblock %} -
huginmunin/trunk/web/hm/app/templates/node/page.html
r968 r991 36 36 {# endpane #} 37 37 {% endblock %} 38 39 40 {% block javascript_includes %}41 {{ block.super }}42 43 {% endblock %}44 45 -
huginmunin/trunk/web/hm/app/templates/quickrate/quickrate_extension.html
r990 r991 11 11 12 12 <link rel="stylesheet" type="text/css" href="/Main/media/css/quickrate.css"></link> 13 <script type="text/javascript" charset="utf-8" src="/Main/media/js/jquery.min.js"></script>14 13 15 14 <h1> -
huginmunin/trunk/web/hm/app/templates/quickrate/rate_review.html
r990 r991 15 15 {% block form %} 16 16 <div class="rating_choice"> 17 <form method="post" action=""> 17 <form method="post" action="" class="stars"> 18 {% spaceless %} {# to prevent spaces getting added between stars and messing up hover experience #} 18 19 {% for rating in ratings %} 19 <input type="submit" name="rating" value="{{ rating }}" />20 <input class="star" type="image" name="rating" value="{{ rating }}" src="/Main/media/img/stars/BlankStar{{ rating }}.png" /> 20 21 {% endfor %} 22 {% endspaceless %} 21 23 </form> 24 <div class="rating_guide"> 25 <!-- javascript puts text here when hover on input star --> 26 </div> 22 27 </div> 28 29 <SCRIPT type="text/javascript"> 30 $(document).ready(function() { 31 $(".star").hover( 32 function() { // over 33 var current_rating = $(this).attr("value"); 34 $(".stars").children().each( function() { 35 var rating = $(this).attr("value"); 36 if (rating <= current_rating) { 37 $(this).attr("src", "/Main/media/img/stars/Star"+rating+".png"); 38 } else { 39 $(this).attr("src", "/Main/media/img/stars/BlankStar"+rating+".png"); 40 } 41 }); 42 // add rating guide text 43 $(".rating_guide").html(text[9-current_rating]); 44 }, 45 function() { // out 46 $(".stars").children().each( function() { 47 var rating = $(this).attr("value"); 48 $(this).attr("src", "/Main/media/img/stars/BlankStar"+rating+".png"); 49 }); 50 $(".rating_guide").html(""); 51 } 52 ); 53 54 var text = [ 55 "<p value='9 -' class='bold'>Amazing. <span class='normal'>Uniquely allows others to improve even while continuing to be great.</span></p>", 56 "<p value='8 -' class='bold'>Excellent. <span class='normal'>Extremely helpful and the result of deliberate and lasting effort.</span></p>", 57 "<p value='7 -' class='bold'>Very Good. <span class='normal'>Shows how much can be accomplished through concern and compromise.</span></p>", 58 "<p value='6 -' class='bold'>Good. <span class='normal'>Beginning to be on the right track, but could certainly stand to improve. </span></p>", 59 "<p value='5 -' class='bold'>Marginal. <span class='normal'>Neither good nor bad. Perhaps its effect is legitamately unknown.</span></p>", 60 "<p value='4 -' class='bold'>Bad. <span class='normal'>Cause for very real concern and should be improved.</span></p>", 61 "<p value='3 -' class='bold'>Very Bad. <span class='normal'>Represents irresponsible neglect of a serious issue.</span></p>", 62 "<p value='2 -' class='bold'>Terrible. <span class='normal'>As bad as a behavior can get without deliberately trying for The Worst.</span></p>", 63 "<p value='1 -' class='bold'>Dreadful. <span class='normal'>Deliberately, effectively and cruelly harmful. It can seem overwhelming.</span></p>" 64 ]; 65 }); 66 </SCRIPT> 23 67 {% endblock %} -
huginmunin/trunk/web/hm/app/views/main.py
r989 r991 1110 1110 try: 1111 1111 if request.POST: 1112 print request.POST1113 1112 page = request.POST.get('page', 'unknown') 1114 1113 user_id = request.POST.get('user_id', 'no user id')