dojo.require("openils.widget.OrgUnitFilteringSelect");
dojo.require("openils.widget.FlattenerGrid");
+ /* We're going to supress copy_circ_lib from the actual filter dialog later,
+ but we still want it here so we can use a special widget ot filter on
+ it. This is the widget that's basically saying, "show me the pull list
+ for /what/ library." */
var map_extras = {
"copy_circ_lib": {
"path": "current_copy.circ_lib",
fmClass="'ahopl'"
defaultSort="['copy_location_order_position','call_number_sort_key']"
mapExtras="map_extras"
+ suppressFilterFields="['copy_circ_lib']"
sortFieldReMap="{call_number_label:'call_number_sort_key',shelving_loc:'copy_location_order_position'}"
fetchLock="true"
query="{}">
<thead>
<tr>
<th field="shelving_loc" fpath="current_copy.location.name" ffilter="true">Shelving Location</th>
- <th field="call_number_label" fpath="call_number_label"></th>
- <th field="author" fpath="current_copy.call_number.record.simple_record.author">Author</th>
- <th field="title" fpath="current_copy.call_number.record.simple_record.title">Title</th>
- <th field="barcode" fpath="current_copy.barcode"></th>
+ <th field="call_number_label" fpath="call_number_label" ffilter="true"></th>
+ <th field="author" fpath="current_copy.call_number.record.simple_record.author" ffilter="true">Author</th>
+ <th field="title" fpath="current_copy.call_number.record.simple_record.title" ffilter="true">Title</th>
+ <th field="barcode" fpath="current_copy.barcode" ffilter="true"></th>
<th field="parts" fpath="current_copy.parts.label" fsort="false">Parts</th>
<th field="notes" fpath="notes.body" fsort="false" _visible="false">Hold Notes</th>
- <th field="patron_barcode" fpath="usr.card.barcode" _visible="false">Patron Barcode</th>
- <th field="pickup_lib_name" fpath="pickup_lib.name" _visible="false">Pickup Library</th>
- <th field="pickup_lib_shortname" fpath="pickup_lib.shortname" _visible="false">Pickup Library (Shortname)</th>
- <th field="request_lib_name" fpath="request_lib.name" _visible="false">Request Library</th>
- <th field="request_lib_shortname" fpath="request_lib.shortname" _visible="false">Request Library (Shortname)</th>
- <th field="selection_ou" fpath="selection_ou.shortname" _visible="false">Selection Locus</th>
- <th field="sms_carrier_name" fpath="sms_carrier.name" _visible="false">SMS Carrier</th>
+ <th field="patron_barcode" fpath="usr.card.barcode" _visible="false" ffilter="true">Patron Barcode</th>
+ <th field="pickup_lib_name" fpath="pickup_lib.name" _visible="false" ffilter="true">Pickup Library</th>
+ <th field="pickup_lib_shortname" fpath="pickup_lib.shortname" _visible="false" ffilter="true">Pickup Library (Shortname)</th>
+ <th field="request_lib_name" fpath="request_lib.name" _visible="false" ffilter="true">Request Library</th>
+ <th field="request_lib_shortname" fpath="request_lib.shortname" _visible="false" ffilter="true">Request Library (Shortname)</th>
+ <th field="selection_ou" fpath="selection_ou.shortname" _visible="false" ffilter="true">Selection Locus</th>
+ <th field="sms_carrier_name" fpath="sms_carrier.name" _visible="false" ffilter="true">SMS Carrier</th>
</tr>
</thead>
</table>
oncomplete(openils.Util.readResponse(r, false, true));
};
+ /* XXX LFW: I want to uncomment the following three lines that refer to ob, but haven't had the time to properly test. */
+
+ //var ob = {};
+ //ob[linkClass] = vfield.selector || vfield.name;
+
this.searchOptions = dojo.mixin(
- {async : !this.forceSync, oncomplete : _cb},
- this.searchOptions
+ {
+ async : !this.forceSync,
+ oncomplete : _cb
+ //order_by : ob
+ }, this.searchOptions
);
if (this.searchFilter) {
var self = this;
new openils.PermaCrud().search('acpl', {owning_lib : orgs}, {
async : !this.forceSync,
+ order_by : {"acpl": "name"},
oncomplete : function(r) {
var list = openils.Util.readResponse(r, false, true);
if(!list) return;
"editStyle": "dialog", /* "dialog" or "pane" */
"requiredFields": null, /* affects create/edit dialogs */
"suppressEditFields": null, /* affects create/edit dialogs */
+ "suppressFilterFields": null, /* affects filter dialog */
/* _generateMap() lives to interpret the attributes of the
* FlattenerGrid dijit itself plus those definined in
"useDiv": this.filterAlwaysInDiv,
"compact": true,
"initializers": this.filterInitializers,
- "widgetBuilders": this.filterWidgetBuilders
+ "widgetBuilders": this.filterWidgetBuilders,
+ "suppressFilterFields": this.suppressFilterFields
});
this.filterUi.onApply = dojo.hitch(
* the right place. */
function _clause_was_negative(clause) {
/* clause objects really only ever have one property */
+ if (clause === null) return false; /* early out for special operator */
+
var ops = openils.Util.objectProperties(clause);
var op = ops.pop();
var matches = op.match(/^not (\w+)$/);
}
};
- /* for ugly special cases in compliation */
+ /* for ugly special cases in compilation */
this._null_clause = function() {
var opname = this.get_selected_operator_name();
if (opname == "not null")
"initializers": null,
"compact": false,
"widgetBuilders": null,
+ "suppressFilterFields": null,
"constructor": function(args) {
for(var k in args)