Browse Source

Cleanup/tweaks, mainly to rendering.

copyvios-ng
Ben Kurtovic 8 years ago
parent
commit
0692227496
4 changed files with 14 additions and 12 deletions
  1. +1
    -0
      README.md
  2. +1
    -1
      copyvios/turnitin.py
  3. +5
    -6
      static/style.css
  4. +7
    -5
      templates/index.mako

+ 1
- 0
README.md View File

@@ -14,6 +14,7 @@ Dependencies
* [mako](http://www.makotemplates.org/) >= 0.7.2 * [mako](http://www.makotemplates.org/) >= 0.7.2
* [mwparserfromhell](https://github.com/earwig/mwparserfromhell) >= 0.3 * [mwparserfromhell](https://github.com/earwig/mwparserfromhell) >= 0.3
* [oursql](http://packages.python.org/oursql/) >= 0.9.3.1 * [oursql](http://packages.python.org/oursql/) >= 0.9.3.1
* [requests](http://python-requests.org/) >= 2.9.1
* [SQLAlchemy](http://sqlalchemy.org/) >= 0.9.6 * [SQLAlchemy](http://sqlalchemy.org/) >= 0.9.6
* [uglifycss](https://github.com/fmarcia/UglifyCSS/) * [uglifycss](https://github.com/fmarcia/UglifyCSS/)
* [uglifyjs](https://github.com/mishoo/UglifyJS/) >= 1.3.3 * [uglifyjs](https://github.com/mishoo/UglifyJS/) >= 1.3.3


+ 1
- 1
copyvios/turnitin.py View File

@@ -31,7 +31,7 @@ def _make_api_request(page_title, lang):
'report': 1} 'report': 1}


result = requests.get(TURNITIN_API_ENDPOINT, params=api_parameters) result = requests.get(TURNITIN_API_ENDPOINT, params=api_parameters)
# use literal_eval to *safely* parse the resulting dict-containing string
# use json.loads to *safely* parse the resulting dict-containing string
parsed_api_result = json.loads(result.text) parsed_api_result = json.loads(result.text)
return parsed_api_result return parsed_api_result




+ 5
- 6
static/style.css View File

@@ -111,7 +111,7 @@ table#heading {
} }


table#cv-form-outer { table#cv-form-outer {
width: 750px;
width: 800px;
} }


table#cv-form-inner { table#cv-form-inner {
@@ -314,14 +314,13 @@ input.cv-text {
width: 100%; width: 100%;
} }


input#cv-cb-engine {
margin-left: 0;
input.cv-search {
margin-left: 20px;
margin-right: 5px; margin-right: 5px;
} }


input#cv-cb-links {
margin-left: 20px;
margin-right: 5px;
input.cv-search:first-of-type {
margin-left: 0;
} }


span.cv-hl { span.cv-hl {


+ 7
- 5
templates/index.mako View File

@@ -107,15 +107,17 @@
</td> </td>
<td id="cv-inner-col2"><label for="action-search">Copyvio&nbsp;search:</label></td> <td id="cv-inner-col2"><label for="action-search">Copyvio&nbsp;search:</label></td>
<td id="cv-inner-col3"> <td id="cv-inner-col3">
<input class="cv-search" type="hidden" name="use_engine" value="0" />
<input type="hidden" name="use_engine" value="0" />
<input id="cv-cb-engine" class="cv-search" type="checkbox" name="use_engine" value="1" ${'checked="checked"' if query.use_engine not in ("0", "false") else ""} /> <input id="cv-cb-engine" class="cv-search" type="checkbox" name="use_engine" value="1" ${'checked="checked"' if query.use_engine not in ("0", "false") else ""} />
<label for="cv-cb-engine">Use&nbsp;search&nbsp;engine</label> <label for="cv-cb-engine">Use&nbsp;search&nbsp;engine</label>
<input class="cv-search" type="hidden" name="use_links" value="0" />

<input type="hidden" name="use_links" value="0" />
<input id="cv-cb-links" class="cv-search" type="checkbox" name="use_links" value="1" ${'checked="checked"' if query.use_links not in ("0", "false") else ""} /> <input id="cv-cb-links" class="cv-search" type="checkbox" name="use_links" value="1" ${'checked="checked"' if query.use_links not in ("0", "false") else ""} />
<label for="cv-cb-links">Use&nbsp;links&nbsp;in&nbsp;page</label> <label for="cv-cb-links">Use&nbsp;links&nbsp;in&nbsp;page</label>
<input class="cv-search" type="hidden" name="use_links" value="0" />
<span style="white-space:nowrap"><input id="cv-cb-turnitin" class="cv-search" type="checkbox" name="turnitin" value="1" ${'checked="checked"' if query.turnitin in ("1", "true") else ""}/>
<label for="cv-cb-turnitin">Use&nbsp;Turnitin&nbsp;database</label></span>

<input type="hidden" name="turnitin" value="0" />
<input id="cv-cb-turnitin" class="cv-search" type="checkbox" name="turnitin" value="1" ${'checked="checked"' if query.turnitin in ("1", "true") else ""}/>
<label for="cv-cb-turnitin">Use&nbsp;Turnitin</label>
</td> </td>
</tr> </tr>
<tr> <tr>


Loading…
Cancel
Save