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,16 +35,22 @@
$('#rangeSubpath').isChecked()) { $('#rangeSubpath').isChecked()) {
// restrict to sub-path / domain // restrict to sub-path / domain
$('#mustmatch').disable(); $('#mustmatch').disable();
// skip these on initial load
if (typeof cId !== 'undefined') {
$('#deleteoldoff, #deleteoldage').uncheck(); $('#deleteoldoff, #deleteoldage').uncheck();
$('#deleteoldon').check(); $('#deleteoldon').check();
}
} else if ($('#rangeWide').isChecked()) { } else if ($('#rangeWide').isChecked()) {
// use Filter // use Filter
$('#mustmatch').enable(); $('#mustmatch').enable();
// skip these on initial load
if (typeof cId !== 'undefined') {
$('#deleteoldon, #deleteoldage').uncheck(); $('#deleteoldon, #deleteoldage').uncheck();
$('#deleteoldoff').check(); $('#deleteoldoff').check();
if (cId === "rangeWide") { $('#mustmatch').focus(); } if (cId === "rangeWide") { $('#mustmatch').focus(); }
} }
} }
}
// crawl start: From File // crawl start: From File
if ($("#sitelist").isChecked()) { if ($("#sitelist").isChecked()) {
@ -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