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()) { $('#rangeSubpath').isChecked()) {
// restrict to sub-path / domain // restrict to sub-path / domain
$('#mustmatch').disable(); $('#mustmatch').disable();
$('#deleteoldoff, #deleteoldage').uncheck(); // skip these on initial load
$('#deleteoldon').check(); if (typeof cId !== 'undefined') {
$('#deleteoldoff, #deleteoldage').uncheck();
$('#deleteoldon').check();
}
} else if ($('#rangeWide').isChecked()) { } else if ($('#rangeWide').isChecked()) {
// use Filter // use Filter
$('#mustmatch').enable(); $('#mustmatch').enable();
$('#deleteoldon, #deleteoldage').uncheck(); // skip these on initial load
$('#deleteoldoff').check(); if (typeof cId !== 'undefined') {
if (cId === "rangeWide") { $('#mustmatch').focus(); } $('#deleteoldon, #deleteoldage').uncheck();
$('#deleteoldoff').check();
if (cId === "rangeWide") { $('#mustmatch').focus(); }
}
} }
} }
@ -499,7 +505,7 @@
</dl> </dl>
</fieldset> </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> </dl>
</fieldset> </fieldset>
</form> </form>

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

Loading…
Cancel
Save