ソースを参照

Better grouping for actions.

pull/24/head
Ben Kurtovic 9年前
コミット
d4283fca3e
2個のファイルの変更9行の追加11行の削除
  1. +4
    -6
      static/script.js
  2. +5
    -5
      templates/index.mako

+ 4
- 6
static/script.js ファイルの表示

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

$(document).ready(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() {
$("#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-compare").is(":checked")) $("#action-compare").change();


+ 5
- 5
templates/index.mako ファイルの表示

@@ -105,11 +105,11 @@
</td>
<td id="cv-inner-col2"><label for="action-search">Copyvio&nbsp;search:</label></td>
<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>
<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>
</td>
</tr>
@@ -119,7 +119,7 @@
</td>
<td><label for="action-compare">URL&nbsp;comparison:</label></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:
value="${query.url | h}"
% endif


読み込み中…
キャンセル
保存