Fixed template vars for "deleteold". Fixed parsing "deleteold" parameter. Stop "setState" overwriting "deletold" state on load.

pull/1/head
bhoerdzn 11 years ago
parent a6a62986d4
commit 98f5c9018d

@ -35,14 +35,20 @@
$('#rangeSubpath').isChecked()) {
// restrict to sub-path / domain
$('#mustmatch').disable();
$('#deleteoldoff, #deleteoldage').uncheck();
$('#deleteoldon').check();
// skip these on initial load
if (typeof cId !== 'undefined') {
$('#deleteoldoff, #deleteoldage').uncheck();
$('#deleteoldon').check();
}
} else if ($('#rangeWide').isChecked()) {
// use Filter
$('#mustmatch').enable();
$('#deleteoldon, #deleteoldage').uncheck();
$('#deleteoldoff').check();
if (cId === "rangeWide") { $('#mustmatch').focus(); }
// skip these on initial load
if (typeof cId !== 'undefined') {
$('#deleteoldon, #deleteoldage').uncheck();
$('#deleteoldoff').check();
if (cId === "rangeWide") { $('#mustmatch').focus(); }
}
}
}
@ -499,7 +505,7 @@
</dl>
</fieldset>
<dt><input type="submit" name=countryMustMatchSwitch"crawlingstart" value="Start New Crawl Job" class="submitready"/></dt><dd></dd>
<dt><input type="submit" name=countryMustdMatchSwitch"crawlingstart" value="Start New Crawl Job" class="submitready"/></dt><dd></dd>
</dl>
</fieldset>
</form>

@ -365,13 +365,13 @@ public class CrawlStartExpert_p {
// delete any document before the crawl is started?
if (post != null && post.containsKey("deleteold")) {
final String deleteold = post.get("deletold", "");
final String deleteold = post.get("deleteold", "");
if (deleteold.equalsIgnoreCase("on")){
post.put("deleteold_on", "1");
prop.put("deleteold_on", "1");
} else if (deleteold.equalsIgnoreCase("age")) {
post.put("deleteold_age", "1");
prop.put("deleteold_age", "1");
} else {
post.put("deleteold_off", "1");
prop.put("deleteold_off", "1");
}
} else {
prop.put("deleteold_off", "1");

Loading…
Cancel
Save