}
);
- if (typeof req.onComplete == "function") {
- console.debug(
- "here goes onComplete, with " + obj + " and " +
- dojo.toJson(req)
- );
+ if (typeof req.onComplete == "function")
req.onComplete.call(callback_scope, obj, req);
- }
};
var process_error = dojo.hitch(
};
module.verify_selected = function() {
- var really_everything = false;
-
if (module.grid.getSelectedItems().length < 1) {
alert(localeStrings.NOTHING_SELECTED);
return;
}
- if (module.grid.everythingSeemsSelected())
- really_everything = confirm(localeStrings.VERIFY_ALL);
-
- /* XXX TODO really_everything needs to change from meaning every
- * URL belonging to the session to every URL matching grid filter
- * terms
- */
-
- openils.URLVerify.Verify.go(
- module.session_id,
- really_everything ? null : module.grid.getSelectedIDs(),
- module.progress_dialog
- );
+ if (module.grid.everythingSeemsSelected() &&
+ confirm(localeStrings.VERIFY_ALL)) {
+ /* If we're here, the user wants to verify all URLs matching
+ * the grid's current filters. We need to reach down to the
+ * grid's store to do a special fetch to get all those IDs. */
+
+ module.grid.store.fetch({
+ "query": dojo.clone(module.grid.query),
+ "queryOptions": {"all": true},
+ "onComplete": function(rows) {
+ openils.URLVerify.Verify.go(
+ module.session_id,
+ dojo.map(rows, function(row) { return row.id; }),
+ module.progress_dialog
+ );
+ }
+ });
+ } else {
+ /* If we're here, the user wants to verify just the rows he
+ * specifically selected with the checkboxes. */
+ openils.URLVerify.Verify.go(
+ module.session_id,
+ module.grid.getSelectedIDs(),
+ module.progress_dialog
+ );
+ }
};
}());
"SAVING_TAGS": "Saving tag/subfield selectors ...",
"PERFORMING_SEARCH": "Performing search ...",
"EXTRACTING_URLS": "Extracting URLs ...",
- "NEED_UVUS": "You must add some tag and subfield combinations",
+ "NEED_UVUS": "You must add some tag and subfield combinations.",
"REDIRECTING": "Loading next interface ...",
"INTERFACE_SETUP": "Setting up interface ...",
- "VERIFY_ALL": "Click 'OK' to verify ALL the URLs found in this session. Click 'Cancel' if the selected, visible URLs are the only ones you want verified.",
+ "VERIFY_ALL": "Click 'OK' to verify ALL the URLs that belong to this session and match all your search terms. Click 'Cancel' if the selected, visible URLs are the only ones you want verified.",
"VERIFICATION_DIALOG": "Verifying URLs ...",
"VERIFICATION_ATTEMPT_ID": "Verification attempt ID: ${0}",
"NOTHING_SELECTED": "No rows are selected, so no action will be taken."