Commit be3fa4bbea37450a0b3cf230218cb5f6c9e2734d
1 parent
2e6c8806
Exists in
master
and in
1 other branch
Fix bug validateForm JS. Thanks path: Caio S. de B. Almeida <caiosba@gmail.com>
Showing
2 changed files
with
19 additions
and
17 deletions
Show diff stats
src/web/templates/layout.html
... | ... | @@ -27,22 +27,22 @@ $ url_base = "http://localhost:8080" |
27 | 27 | <script type="text/javascript"> |
28 | 28 | window.onload = function() { |
29 | 29 | setupDependencies('weboptions'); //name of form(s). Seperate each with a comma (ie: 'weboptions', 'myotherform' ) |
30 | - }; | |
30 | +}; | |
31 | 31 | |
32 | 32 | function validateForm() |
33 | -{ | |
34 | -var u=document.forms["weboptions"]["pkgs_file"].value | |
35 | -var x=document.forms["weboptions"]["pkgs_list"].value | |
36 | -if ((u==null) && (x==null) || (x=="Write your list App here or send a file list this icon:") && (u=="") ) | |
37 | - { | |
38 | - alert("Choice your list App or create a list!"); | |
39 | - return false; | |
40 | - } | |
41 | -else { | |
42 | - if (x=='Write your list App here or send a file list this icon:') {x=''} | |
43 | - } | |
44 | -}; | |
45 | -</script> | |
33 | + { | |
34 | + var t = $$("#pkgs_list"); | |
35 | + var i = $$("input[name=pkgs_file]"); | |
36 | + if (!i.val() && ( !t.val() || t.val() == "Write your list App here or send a file list this icon:")) { | |
37 | + alert("Choose your list app or create a list!"); | |
38 | + return false; | |
39 | + } else { | |
40 | + if (i.val()) t.val(""); | |
41 | + return true; | |
42 | + } | |
43 | +} | |
44 | + </script> | |
45 | + | |
46 | 46 | |
47 | 47 | <script type="text/javascript"> |
48 | 48 | $$(document).ready(function() { |
... | ... | @@ -158,7 +158,6 @@ else { |
158 | 158 | </div> |
159 | 159 | </noscript> |
160 | 160 | |
161 | - | |
162 | 161 | $:content |
163 | 162 | |
164 | 163 | <div id="footer"> | ... | ... |
src/web/templates/survey.html
... | ... | @@ -7,6 +7,9 @@ $var jsfiles: static/coda-slider-2.0/javascripts/jquery-1.3.2.min.js static/coda |
7 | 7 | |
8 | 8 | <script type="text/javascript"> |
9 | 9 | $$(document).ready(function() { |
10 | + $$("#bar-header").click(function () { | |
11 | + $$("#header").slideToggle("slow"); | |
12 | + }); | |
10 | 13 | $$('a[rel*=facebox]').facebox({ |
11 | 14 | loadingImage : '/static/images/loading.gif', |
12 | 15 | closeImage : '/static/images/closelabel.png' |
... | ... | @@ -18,7 +21,7 @@ $var jsfiles: static/coda-slider-2.0/javascripts/jquery-1.3.2.min.js static/coda |
18 | 21 | <div id="sidebar"> |
19 | 22 | <div class="innertube"> |
20 | 23 | |
21 | -<div id="details_box" class="graybox align-left glass_blue"> | |
24 | +<div id="details_box" class="graybox align-left"> | |
22 | 25 | <h2>Recommendation strategy details</h2> |
23 | 26 | <ul class="toc"> |
24 | 27 | $for key, value in request.get_details().items(): |
... | ... | @@ -80,7 +83,7 @@ $for pkg in pkg_details: |
80 | 83 | <a href="#finish" id="finish-button" class="glass">Finish |
81 | 84 | <div class="tip important" id="tip-finish"><p>Tem certeza que não gostaria de avaliar uma nova estratégia? </p></div> |
82 | 85 | </a> |
83 | -<label for="strategy_button" id="tip-strategy"><div class="tip note"><p> Gerar um novo resultado com uma estratégia diferente para mesma lista de pacotes. </p></div><input id="strategy-button" name="strategy_button" type="submit" value="New Strategy" class="glass" /></label> | |
86 | +<label for="strategy_button" id="tip-strategy"><div class="tip note"><p> Gerar um novo resultado com uma estratégia diferente para mesma lista de pacotes ou <a id="bar-header">envie uma nova lista de pacotes</a>. </p></div><input id="strategy-button" name="strategy_button" type="submit" value="New Strategy" class="glass" /></label> | |
84 | 87 | </div> |
85 | 88 | |
86 | 89 | </form> | ... | ... |