Browse Source

Better grouping for actions.

pull/24/head
Ben Kurtovic 10 years ago
parent
commit
d4283fca3e
2 changed files with 9 additions and 11 deletions
  1. +4
    -6
      static/script.js
  2. +5
    -5
      templates/index.mako

+ 4
- 6
static/script.js View File

@@ -90,14 +90,12 @@ function delete_cookie(name) {


$(document).ready(function() { $(document).ready(function() {
$("#action-search").change(function() { $("#action-search").change(function() {
$("#cv-cb-engine").prop("disabled", false);
$("#cv-cb-links").prop("disabled", false);
$("#url-box").prop("disabled", true);
$(".cv-search").prop("disabled", false);
$(".cv-compare").prop("disabled", true);
}); });
$("#action-compare").change(function() { $("#action-compare").change(function() {
$("#cv-cb-engine").prop("disabled", true);
$("#cv-cb-links").prop("disabled", true);
$("#url-box").prop("disabled", false);
$(".cv-search").prop("disabled", true);
$(".cv-compare").prop("disabled", false);
}); });
if ($("#action-search" ).is(":checked")) $("#action-search" ).change(); if ($("#action-search" ).is(":checked")) $("#action-search" ).change();
if ($("#action-compare").is(":checked")) $("#action-compare").change(); if ($("#action-compare").is(":checked")) $("#action-compare").change();


+ 5
- 5
templates/index.mako View File

@@ -105,11 +105,11 @@
</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 type="hidden" name="use_engine" value="0" />
<input type="hidden" name="use_links" value="0" />
<input id="cv-cb-engine" type="checkbox" name="use_engine" value="1" ${'checked="checked"' if (query.use_engine != "0") else ""} />
<input class="cv-search" type="hidden" name="use_engine" value="0" />
<input class="cv-search" type="hidden" name="use_links" value="0" />
<input id="cv-cb-engine" class="cv-search" type="checkbox" name="use_engine" value="1" ${'checked="checked"' if (query.use_engine != "0") else ""} />
<label for="cv-cb-engine">Use&nbsp;search&nbsp;engine</label> <label for="cv-cb-engine">Use&nbsp;search&nbsp;engine</label>
<input id="cv-cb-links" type="checkbox" name="use_links" value="1" ${'checked="checked"' if (query.use_links != "0") else ""} />
<input id="cv-cb-links" class="cv-search" type="checkbox" name="use_links" value="1" ${'checked="checked"' if (query.use_links != "0") 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>
</td> </td>
</tr> </tr>
@@ -119,7 +119,7 @@
</td> </td>
<td><label for="action-compare">URL&nbsp;comparison:</label></td> <td><label for="action-compare">URL&nbsp;comparison:</label></td>
<td> <td>
<input id="url-box" class="cv-text" type="text" name="url"
<input class="cv-compare cv-text" type="text" name="url"
% if query.url: % if query.url:
value="${query.url | h}" value="${query.url | h}"
% endif % endif


Loading…
Cancel
Save