Commit 6842d21e1a291429d5faeafdd7a413344c629411
Exists in
master
and in
1 other branch
Merge branch 'master' of github.com:tassia/AppRecommender
Showing
4 changed files
with
50 additions
and
66 deletions
Show diff stats
src/web/static/css/style.css
@@ -442,7 +442,7 @@ cursor: pointer; | @@ -442,7 +442,7 @@ cursor: pointer; | ||
442 | 442 | ||
443 | #advanced-button:hover { color: black; } | 443 | #advanced-button:hover { color: black; } |
444 | 444 | ||
445 | - | 445 | +#upload-slide, |
446 | #advanced-slide { display: none; } | 446 | #advanced-slide { display: none; } |
447 | 447 | ||
448 | #advanced-slide legend { | 448 | #advanced-slide legend { |
@@ -0,0 +1,23 @@ | @@ -0,0 +1,23 @@ | ||
1 | +#upload-slide { | ||
2 | +display: block; | ||
3 | +position: absolute; | ||
4 | +top: 10px; | ||
5 | +left: 10px; | ||
6 | +} | ||
7 | + | ||
8 | +#header, | ||
9 | +#recommender-box { | ||
10 | +height: 80px; | ||
11 | +} | ||
12 | + | ||
13 | +.innertube { | ||
14 | +margin: 50px; | ||
15 | +} | ||
16 | + | ||
17 | +/* Display None itens Survey */ | ||
18 | +#recommender-box #upfile, | ||
19 | +#advanced-button, | ||
20 | +#copyright span, | ||
21 | +#pkgs_list { | ||
22 | +display: none; | ||
23 | +} |
src/web/templates/layout.html
@@ -38,10 +38,11 @@ window.onload = function() { | @@ -38,10 +38,11 @@ window.onload = function() { | ||
38 | 38 | ||
39 | function validateForm() | 39 | function validateForm() |
40 | { | 40 | { |
41 | +var u=document.forms["weboptions"]["pkgs_file"].value | ||
41 | var x=document.forms["weboptions"]["pkgs_list"].value | 42 | var x=document.forms["weboptions"]["pkgs_list"].value |
42 | -if (x==null || x=="Write your list App here or send a file list this icon:") | 43 | +if ((u==null) && (x==null) || (x=="Write your list App here or send a file list this icon:") && (u=="") ) |
43 | { | 44 | { |
44 | - alert("Write your list App!"); | 45 | + alert("Choice your list App or create a list!"); |
45 | return false; | 46 | return false; |
46 | } | 47 | } |
47 | } | 48 | } |
@@ -51,6 +52,9 @@ if (x==null || x=="Write your list App here or send a file list this icon:") | @@ -51,6 +52,9 @@ if (x==null || x=="Write your list App here or send a file list this icon:") | ||
51 | $$("#advanced-button").click(function () { | 52 | $$("#advanced-button").click(function () { |
52 | $$("#advanced-slide").toggle("slow"); | 53 | $$("#advanced-slide").toggle("slow"); |
53 | }); | 54 | }); |
55 | + $$("#upfile").click(function () { | ||
56 | + $$("#upload-slide").toggle("slow"); | ||
57 | + }); | ||
54 | }); | 58 | }); |
55 | </script> | 59 | </script> |
56 | 60 | ||
@@ -66,10 +70,10 @@ if (x==null || x=="Write your list App here or send a file list this icon:") | @@ -66,10 +70,10 @@ if (x==null || x=="Write your list App here or send a file list this icon:") | ||
66 | <fieldset> | 70 | <fieldset> |
67 | <div id="submit-box"> | 71 | <div id="submit-box"> |
68 | <input type="submit" value="RECOMMENDER" id="submit-button"><br /> | 72 | <input type="submit" value="RECOMMENDER" id="submit-button"><br /> |
69 | - <!--<a id="advanced-button">advanced query?</a>--> | 73 | + <a id="advanced-button">advanced query?</a> |
70 | </div> | 74 | </div> |
71 | <div id="input-box"> | 75 | <div id="input-box"> |
72 | - <a href="#attachfile" rel="facebox" id="upfile"><span style="display: none;">Upload a file.</span></a> | 76 | + <a id="upfile"><span style="display: none;">Upload a file.</span></a> |
73 | <label title="App list"><textarea class="focused" onfocus="this.form.className='focused'; | 77 | <label title="App list"><textarea class="focused" onfocus="this.form.className='focused'; |
74 | if(this.value=='Write your list App here or send a file list this icon:'){this.value=''}" onblur="this.form.className=''; | 78 | if(this.value=='Write your list App here or send a file list this icon:'){this.value=''}" onblur="this.form.className=''; |
75 | if(/^\s*$$/.test(this.value)){ this.value='Write your list App here or send a file list this icon:'; | 79 | if(/^\s*$$/.test(this.value)){ this.value='Write your list App here or send a file list this icon:'; |
@@ -125,45 +129,24 @@ if (x==null || x=="Write your list App here or send a file list this icon:") | @@ -125,45 +129,24 @@ if (x==null || x=="Write your list App here or send a file list this icon:") | ||
125 | </div> | 129 | </div> |
126 | </div> | 130 | </div> |
127 | </fieldset> | 131 | </fieldset> |
128 | - <fieldset> | ||
129 | - <legend>Your packages</legend> | ||
130 | - <div> | ||
131 | - <label>Upload file<input type="file" id="pkgs_file" name="pkgs_file" size="18"/></label> | ||
132 | - </div> | ||
133 | - </fieldset> | ||
134 | </div><!-- id="advanced-slide" --> | 132 | </div><!-- id="advanced-slide" --> |
135 | - | 133 | + <div id="upload-slide"> |
134 | + <fieldset> | ||
135 | + <p> | ||
136 | + <label title="Upload file">Upload file: <input type="file" name="pkgs_file" size="18" /></label> | ||
137 | + </p> | ||
138 | + <p> | ||
139 | + You can use file <strong>/var/log/popularity-contest</strong> or create a with <strong>dpkg</strong>, use: | ||
140 | + </p> | ||
141 | + <p> | ||
142 | + <code> # dpkg -l > blih.list </code> | ||
143 | + </p> | ||
144 | + </fieldset> | ||
145 | + </div><!-- id="upload-slide" --> | ||
136 | </form> | 146 | </form> |
137 | </div> | 147 | </div> |
138 | 148 | ||
139 | 149 | ||
140 | - | ||
141 | -<!-- BOX ATTACHMENT FILE --> | ||
142 | -<div id="attachfile" style="display: none;"> | ||
143 | -<h2>Recommendation with file list</h2> | ||
144 | -<form action="apprec" enctype="multipart/form-data" method="post" name="uploadform"> | ||
145 | - <fieldset> | ||
146 | - <label title="Upload file">Upload file: <input type="file" name="pkgs_file" size="18"/></label> | ||
147 | -<p> | ||
148 | -You can use file <strong>/var/log/popularity-contest</strong> or create a with <strong>dpkg</strong>, use: | ||
149 | -<code> | ||
150 | -# dpkg -l > blih | ||
151 | -</code> | ||
152 | -</p> | ||
153 | -<p> | ||
154 | - <p align="center"><input type="submit" value="Recommender!"></p> | ||
155 | - <input type="hidden" name="weight" value="BM25" checked="checked"> | ||
156 | - <input type="hidden" name="strategy" value="content" checked="checked"> | ||
157 | - <input type="hidden" name="profile_size" value="10" size="4"> | ||
158 | - <input type="hidden" name="limit" value="10" size="4"> | ||
159 | - <input type="hidden" name="neighbours" class="DEPENDS ON strategy BEING hybrid" value="50" size="4"> | ||
160 | - </fieldset> | ||
161 | -</form> | ||
162 | -</p> | ||
163 | -</div><!-- id="attachfile" --> | ||
164 | -<!-- END BOX ATTACHMENT FILE --> | ||
165 | - | ||
166 | - | ||
167 | </div><!-- id="header" --> | 150 | </div><!-- id="header" --> |
168 | <div id="content"> | 151 | <div id="content"> |
169 | 152 | ||
@@ -178,9 +161,9 @@ $:content | @@ -178,9 +161,9 @@ $:content | ||
178 | <li><a href="http://github.com/tassia/AppRecommender">Development</a></li> | 161 | <li><a href="http://github.com/tassia/AppRecommender">Development</a></li> |
179 | </ul> | 162 | </ul> |
180 | </div><!-- id="navbar" --> | 163 | </div><!-- id="navbar" --> |
181 | -<!-- <p id="copyright"> | ||
182 | - Copyright © 2011 AppRecommender team. | ||
183 | - </p> --> | 164 | + <div id="copyright"> <span> Copyright © 2011 AppRecommender team. </span> |
165 | + </div><!-- id="copyright" --> | ||
166 | +<br style="clear: both;" /> | ||
184 | </div><!-- id="footer" --> | 167 | </div><!-- id="footer" --> |
185 | 168 | ||
186 | 169 |
src/web/templates/survey_index.html
1 | $var title: Survey | 1 | $var title: Survey |
2 | $var mod = 'index'; | 2 | $var mod = 'index'; |
3 | -$var cssfiles: static/css/tabs.css static/css/debtags.css static/css/facebox.css | ||
4 | -$var jsfiles: static/js/facebox.js | 3 | +$var cssfiles: static/css/tabs.css static/css/debtags.css static/css/facebox.css static/css/survey.css |
4 | +$var jsfiles: | ||
5 | 5 | ||
6 | 6 | ||
7 | <!-- Dynamic form --> | 7 | <!-- Dynamic form --> |
@@ -11,28 +11,6 @@ window.onload = function() { | @@ -11,28 +11,6 @@ window.onload = function() { | ||
11 | }; | 11 | }; |
12 | </script> | 12 | </script> |
13 | 13 | ||
14 | -<script type="application/x-javascript"> | ||
15 | -$$(document).ready(function() { | ||
16 | - $$('a[rel*=facebox]').facebox({ | ||
17 | - loadingImage : '/static/images/loading.gif', | ||
18 | - closeImage : '/static/images/closelabel.png' | ||
19 | - }); | ||
20 | - $$("#tags-box").click(function () { | ||
21 | - $$("#tags-box").hide(1000); | ||
22 | - }); | ||
23 | - | ||
24 | -}); | ||
25 | -</script> | ||
26 | - | ||
27 | - | ||
28 | -<div id="sidebar"> | ||
29 | -<div class="innertube"> | ||
30 | - | ||
31 | - | ||
32 | -<br style="clear: both" /> | ||
33 | -</div><!-- class="innertube" --> | ||
34 | -</div><!-- id="sidebar" --> | ||
35 | - | ||
36 | <div id="maincontent"> | 14 | <div id="maincontent"> |
37 | <div class="innertube"> | 15 | <div class="innertube"> |
38 | 16 |