Commit 5e2dde0a24588abe8f582859983359c59ab88a6d
1 parent
af80bfe9
Exists in
master
and in
1 other branch
New form.
Showing
3 changed files
with
112 additions
and
47 deletions
Show diff stats
src/web/static/css/style.css
src/web/templates/index.html
... | ... | @@ -8,53 +8,118 @@ $var mod = 'index'; |
8 | 8 | a list of suggested packages automatically computed by AppRecommender. You can |
9 | 9 | customize the recommender setup or let it randomly choose a setup for you.</p> |
10 | 10 | |
11 | -<p>Please fill in the form that follows the recommendation results. Your | |
12 | -feedback is very much appreciated!</p> | |
13 | - | |
14 | 11 | <p>Enjoy it :)</p> |
15 | 12 | </div> |
16 | 13 | |
17 | 14 | <!--<div class="align-right"><img alt="AppRecommender logo" |
18 | 15 | src="/static/images/AppRecommender-logo.jpg" width="320" /></div>--> |
19 | 16 | |
17 | +<script language="javascript"> | |
18 | +function toggle() { | |
19 | + var ele = document.getElementById("toggleText"); | |
20 | + var text = document.getElementById("displayText"); | |
21 | + if(ele.style.display == "block") { | |
22 | + ele.style.display = "none"; | |
23 | + text.innerHTML = "custom"; | |
24 | + } | |
25 | + else { | |
26 | + ele.style.display = "block"; | |
27 | + text.innerHTML = "random"; | |
28 | + } | |
29 | +} | |
30 | +</script> | |
31 | + | |
32 | +<p>Please fill in the form that follows the recommendation results. Your | |
33 | +feedback is very much appreciated!</p> Or want to try a <a id="displayText" | |
34 | +href="javascript:toggle();">custom</a> query setup...? | |
35 | + | |
20 | 36 | <form action="apprec" enctype="multipart/form-data" method="post" name="weboptions"> |
21 | - <p> | |
22 | - <label>Upload file:<input type="file" id="pkgs_file" name="pkgs_file" size="35"/></label><br /> | |
23 | - <label>Packages list:<textarea rows="2" cols="40" name="pkgs_list" id="pkgs_list"></textarea><label><br /> | |
24 | - <label>Profile size: <input type="text" name="profile_size" value="10"></label><br /> | |
25 | - <label>Recommendation size: <input type="text" name="limit" value="10"></label><br /> | |
26 | - <label>Weighting scheme:<br /> | |
27 | - <input type="radio" name="weight" value="BM25" checked >BM25<br /> | |
28 | - <input type="radio" name="weight" value="trad">Traditional<br /> | |
29 | - </label> | |
30 | - <label>Strategy: <br /> | |
31 | - <input type="radio" name="strategy" value="content" checked> Content-based<br /> | |
32 | - <input type="radio" name="strategy" value="collab"> Collaborative<br /> | |
33 | - <input type="radio" name="strategy" value="hybrid"> Hybrid<br /> | |
34 | - </label> | |
35 | - <!-- <label>Password:<input type="password" name="pass"></label> --> | |
36 | - <!-- <label style="margin-bottom: 1em; padding-bottom: 1em; border-bottom: 3px silver groove;"><input type="hidden" class="DEPENDS ON strategy BEING content OR strategy BEING hybrid"></label> --> | |
37 | - </p><p> | |
38 | - <label>Content attributes: | |
39 | - <input type="radio" name="content" value="tag" class="DEPENDS ON strategy BEING content OR strategy BEING hybrid" checked> tag | |
40 | - <input type="radio" name="content" value="desc" class="DEPENDS ON strategy BEING content OR strategy BEING hybrid"> description | |
41 | - <input type="radio" name="content" value="full" class="DEPENDS ON strategy BEING content OR strategy BEING hybrid"> both | |
42 | - </label><br /> | |
43 | - <label>Clustering | |
44 | - <input type="radio" name="cluster" value="True" class="DEPENDS ON strategy BEING collab OR strategy BEING hybrid" checked> Yes | |
45 | - <input type="radio" name="cluster" value="False" class="DEPENDS ON strategy BEING collab OR strategy BEING hybrid"> No | |
46 | - </label><br /> | |
47 | - <label>Neighbours: | |
48 | - <input type="text" name="neighbours" class="DEPENDS ON strategy BEING collab OR strategy BEING hybrid" value="50"> | |
49 | - </label><br /> | |
50 | - <label>Personal profile: | |
51 | - <input type="checkbox" name="profile_desktop" class="DEPENDS ON strategy BEING hybrid" checked>Desktop | |
52 | - <input type="checkbox" name="profile_admin" class="DEPENDS ON strategy BEING hybrid">Admin | |
53 | - <input type="checkbox" name="profile_devel" class="DEPENDS ON strategy BEING hybrid">Devel | |
54 | - <input type="checkbox" name="profile_science" class="DEPENDS ON strategy BEING hybrid">Science | |
55 | - <input type="checkbox" name="profile_arts" class="DEPENDS ON strategy BEING hybrid">Arts | |
56 | - </label> | |
57 | - </p> | |
58 | -<input type="submit" /> | |
59 | -</form> | |
37 | + <fieldset> | |
38 | + <legend>Your packages</legend> | |
39 | + <div> | |
40 | + <label>Upload file</label><input type="file" id="pkgs_file" name="pkgs_file" size="18"/> | |
41 | + </div> | |
42 | + <div> | |
43 | + <label>Packages list</label><textarea rows="2" cols="33" name="pkgs_list" id="pkgs_list"></textarea> | |
44 | + </div> | |
45 | + <div> | |
46 | + <label>Profile size</label><input type="text" name="profile_size" value="10" size="4"> | |
47 | + </div> | |
48 | + <div> | |
49 | + <label>Recommendations</label><input type="text" name="limit" value="10" size="4"> | |
50 | + </div> | |
51 | + </fieldset> | |
60 | 52 | |
53 | +<div id="toggleText" style="display: none"> | |
54 | + <fieldset> | |
55 | + <legend>Weighting scheme</legend> | |
56 | + <div> | |
57 | + <input type="radio" name="weight" value="BM25" checked ><label> BM25</label> | |
58 | + </div> | |
59 | + <div> | |
60 | + <input type="radio" name="weight" value="trad"><label> Traditional</label> | |
61 | + </div> | |
62 | + </fieldset> | |
63 | + <fieldset> | |
64 | + <legend>Strategy</legend> | |
65 | + <div> | |
66 | + <input type="radio" name="strategy" value="content" checked><label> Content-based</label> | |
67 | + </div> | |
68 | + <div> | |
69 | + <input type="radio" name="strategy" value="collab"><label> Collaborative</label> | |
70 | + </div> | |
71 | + <div> | |
72 | + <input type="radio" name="strategy" value="hybrid"><label> Hybrid</label> | |
73 | + </div> | |
74 | + </fieldset> | |
75 | + <fieldset> | |
76 | + <legend>Tuning up</legend> | |
77 | + <div> | |
78 | + <label><input type="hidden" class="DEPENDS ON strategy BEING content OR strategy BEING hybrid"><b>Content representation:</b></label> | |
79 | + </div> | |
80 | + <div> | |
81 | + <label class="special"><input type="radio" name="content" value="tag" class="DEPENDS ON strategy BEING content OR strategy BEING hybrid"> tag</label> | |
82 | + </div> | |
83 | + <div> | |
84 | + <label class="special"><input type="radio" name="content" value="desc" class="DEPENDS ON strategy BEING content OR strategy BEING hybrid"> description</label> | |
85 | + </div> | |
86 | + <div> | |
87 | + <label class="special"><input type="radio" name="content" value="full" class="DEPENDS ON strategy BEING content OR strategy BEING hybrid"> both</label> | |
88 | + </div> | |
89 | + <div> | |
90 | + <label><input type="hidden" class="DEPENDS ON strategy BEING collab OR strategy BEING hybrid"><b>Clustering:</b></label> | |
91 | + </div> | |
92 | + <div> | |
93 | + <label class="special"><input type="radio" name="cluster" value="True" class="DEPENDS ON strategy BEING collab OR strategy BEING hybrid"> yes</label> | |
94 | + </div> | |
95 | + <div> | |
96 | + <label class="special"><input type="radio" name="cluster" value="False" class="DEPENDS ON strategy BEING collab OR strategy BEING hybrid"> no</label> | |
97 | + </div> | |
98 | + <div> | |
99 | + <label><input type="hidden" class="DEPENDS ON strategy BEING hybrid"><b>Neighborhood:</b></label> | |
100 | + </div> | |
101 | + <div> | |
102 | + <label class="special"><input type="text" name="neighbours" class="DEPENDS ON strategy BEING collab OR strategy BEING hybrid" value="50" size="4"></label> | |
103 | + </div> | |
104 | + <div> | |
105 | + <label><input type="hidden" class="DEPENDS ON strategy BEING hybrid"><b>Personal profile:</b></label> | |
106 | + </div> | |
107 | + <div> | |
108 | + <label class=special><input type="checkbox" name="profile_desktop" class="DEPENDS ON strategy BEING hybrid"> Desktop</label> | |
109 | + </div> | |
110 | + <div> | |
111 | + <label class=special><input type="checkbox" name="profile_admin" class="DEPENDS ON strategy BEING hybrid"> Admin</label> | |
112 | + </div> | |
113 | + <div> | |
114 | + <label class=special><input type="checkbox" name="profile_devel" class="DEPENDS ON strategy BEING hybrid"> Devel</label> | |
115 | + </div> | |
116 | + <div> | |
117 | + <label class=special><input type="checkbox" name="profile_science" class="DEPENDS ON strategy BEING hybrid"> Science</label> | |
118 | + </div> | |
119 | + <div> | |
120 | + <label class=special><input type="checkbox" name="profile_arts" class="DEPENDS ON strategy BEING hybrid"> Arts</label> | |
121 | + </div> | |
122 | + </fieldset> | |
123 | +</div> | |
124 | + <div class="align-right"><input type="submit"></div> | |
125 | + </form> | ... | ... |
src/web/templates/layout.html
... | ... | @@ -12,6 +12,9 @@ $ url_base = "http://localhost:8080" |
12 | 12 | <link href="/static/css/local.css" media="screen" rel="stylesheet" type="text/css" /> |
13 | 13 | <link href="/static/css/thickbox.css" media="screen" rel="stylesheet" type="text/css" /> |
14 | 14 | <link href="/static/css/voting.css" media="screen" rel="stylesheet" type="text/css" /> |
15 | + <link href="/static/css/quimby.css" media="screen" rel="stylesheet" type="text/css" /> | |
16 | + <link href="/static/css/screen.css" media="screen" rel="stylesheet" type="text/css" /> | |
17 | + <link href="/static/css/dropdown.css" media="screen" rel="stylesheet" type="text/css" /> | |
15 | 18 | |
16 | 19 | <script src="/static/js/jquery.js" type="text/javascript"></script> |
17 | 20 | <script src="/static/js/jquery.autocomplete.js" type="text/javascript"></script> |
... | ... | @@ -28,6 +31,8 @@ $ url_base = "http://localhost:8080" |
28 | 31 | |
29 | 32 | <script type="text/javascript" src="/static/js/FormManager.js"></script> |
30 | 33 | |
34 | + | |
35 | + | |
31 | 36 | <!-- Dynamic form --> |
32 | 37 | <script type="text/javascript"> |
33 | 38 | window.onload = function() { | ... | ... |