<field reporter:label="Page" name="page" reporter:datatype="text"/>
<field reporter:label="Query" name="query" reporter:datatype="text"/>
<field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
+ <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
</fields>
<links>
<link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
<link field="item" reltype="has_a" key="id" map="" class="uvsbrem" /><!-- surprise! -->
<link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
+ <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
</links>
<permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
module.grid = grid;
- module.grid.attr("query", {"session_id": module.session_id});
+ module.grid.setBaseQuery({"session_id": module.session_id});
+
module.grid.refresh();
// Alternative to grid.refresh() once filter is set up
//module.grid.fetchLock = false;
//module.grid.filterUi.doApply();
+
+ module.progress_dialog = progress_dialog;
};
module.verify_selected = function() {
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
+ */
+
module.clear_attempt_display();
- progress_dialog.attr("title", localeStrings.VERIFICATION_BEGIN);
- progress_dialog.show();
+ module.progress_dialog.attr("title", localeStrings.VERIFICATION_DIALOG);
+ module.progress_dialog.show();
fieldmapper.standardRequest(
["open-ils.url_verify", "open-ils.url_verify.session.verify"], {
"async": true,
"onresponse": function(r) {
if (r = openils.Util.readResponse(r)) {
- progress_dialog.attr(
- "title",
- dojo.string.substitute(
- localeStrings.VERIFICATION_PROGRESS,
- [r.total_processed]
- )
- );
- progress_dialog.update({
+ module.progress_dialog.update({
"maximum": r.url_count,
"progress": r.total_excluding_redirects
});
if (r.attempt)
module.update_attempt_display(r.attempt);
}
+ },
+ "oncomplete": function() {
+ module.progress_dialog.attr(
+ "title", localeStrings.REDIRECTING
+ );
+ module.progress_dialog.show(true);
+ console.error("would redirect here XXX TODO"); // XXX TODO
}
}
)
-
- module.grid.getSelectedIDs();
};
module.clear_attempt_display = function() {
dojo.empty(dojo.byId("url-verify-attempt-finish"));
};
+ /* This gives the user a way to know the verification attempt
+ * information for the theoretical purposes of restarting it
+ * later, although we don't give them a way to do that yet, and
+ * when we do, it really shouldn't involve the user remembering
+ * an ID number. */
module.update_attempt_display = function(attempt) {
dojo.byId("url-verify-attempt-id").innerHTML =
dojo.string.substitute(
"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.",
- "VERIFICATION_BEGIN": "Verifying URLs. This can take a moment ...",
- "VERIFICATION_PROGRESS": "Verifying URLs: ${0} URLs processed ...",
+ "VERIFICATION_DIALOG": "Verifying URLs ...",
"VERIFICATION_ATTEMPT_ID": "Last verification attempt ID: ${0}",
"VERIFICATION_ATTEMPT_START": "Attempt start time: ${0}",
"VERIFICATION_ATTEMPT_FINISH": "Attempt finish time: ${0}"
"columnPersistKey": null,
"autoCoreFields": false,
"autoCoreFieldsUnsorted": false,
+ "autoCoreFieldsFilter": false,
"autoFieldFields": null,
"showLoadFilter": false, /* use FlattenerFilter(Dialog|Pane) */
"filterAlwaysInDiv": null, /* use FlattenerFilterPane and put its
cell_list.push({
"field": f.name,
"name": f.label,
- "fsort": true /*,
- "_visible": false */
+ "fsort": true,
+ "ffilter": this.autoCoreFieldsFilter
});
}
);
this.getSelectedIDs();
this.print(null, null, id_blob);
+ },
+
+ "setBaseQuery": function(query) { /* sets a persistent query
+ that always gets mixed in
+ with whatever you do in the
+ filter dialog */
+ this._baseQuery = dojo.clone(this.attr("query", query));
}
}
);