<links>
<link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
- <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
+ <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" /><!-- surprise! -->
<link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
</links>
<script type="text/javascript">
dojo.require("dijit.form.Button");
dojo.require("openils.widget.FlattenerGrid");
+ dojo.require("openils.Util");
+ dojo.require("openils.CGI");
+
+ /* XXX TODO move everything except the require's above and the addOnLoad
+ below into a dojo module */
+ var initial_query = {};
+
+ openils.Util.addOnLoad(
+ function() {
+ var cgi = new openils.CGI();
+
+ initial_query.session_id = cgi.param("session_id");
+
+ grid.refresh();
+ // XXX Instead of grid.refresh(), once filter stuff is done:
+ // grid.fetchLock = false;
+ // grid.filterUi.doApply();
+ }
+ );
</script>
<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
<div dojoType="dijit.layout.ContentPane"
layoutAlign="top" class="oils-header-panel">
<div>[% ctx.page_title %]</div>
<div>
- <!-- XXX any buttons needed go here -->
+ <span id="select-all-indicator"></span>
</div>
</div>
<!-- <div class="oils-acq-basic-roomy">
columnPersistKey='"url_verify.select_url"'
autoHeight="10"
editOnEnter="false"
+ autoFieldFields="null"
autoCoreFields="true"
- autoFieldFields="[]"
+ autoCoreFieldsUnsorted="true"
+ fetchLock="true"
+ mapExtras="{session_id: {path: 'item.session.id', filter: true}}"
showLoadFilter="true"
- fmClass="'uvsbrem'" >
+ query="initial_query"
+ fmClass="'uvu'">
<thead>
<tr>
+ <th field="title" fpath="item.target_biblio_record_entry.simple_record.title"></th>
+ <th field="author" fpath="item.target_biblio_record_entry.simple_record.author"></th>
+ <th field="isbn" fpath="item.target_biblio_record_entry.simple_record.isbn" _visible="false"></th>
+ <th field="issn" fpath="item.target_biblio_record_entry.simple_record.issn" _visible="false"></th>
+ <th field="bib_id" fpath="item.target_biblio_record_entry.id" _visible="false"></th>
</tr>
</thead>
</table>
"columnReordering": true,
"columnPersistKey": null,
"autoCoreFields": false,
+ "autoCoreFieldsUnsorted": false,
"autoFieldFields": null,
"showLoadFilter": false, /* use FlattenerFilter(Dialog|Pane) */
"filterAlwaysInDiv": null, /* use FlattenerFilterPane and put its
var cell_list = this.structure[0].cells[0];
var fields = dojo.clone(
fieldmapper.IDL.fmclasses[this.fmClass].fields
- ).sort(
- function(a, b) { return a.label > b.label ? 1 : -1; }
);
+ if (!this.autoCoreFieldsUnsorted) {
+ fields = fields.sort(
+ function(a, b) { return a.label > b.label ? 1 : -1; }
+ );
+ }
+
dojo.forEach(
fields, function(f) {
if (f.datatype == "link" || f.virtual)
cell_list.push({
"field": f.name,
"name": f.label,
- "fsort": true,
- "_visible": false
+ "fsort": true /*,
+ "_visible": false */
});
}
);
);
},
+ /* Return true if every row known to the grid is selected. Code
+ * that calls this function will do so when it thinks the user
+ * might actually mean "select everything this grid could show"
+ * even though we don't necessarily know (and the user hasn't
+ * necessarily noticed) whether the grid has been scrolled as far
+ * down as possible and all the possible results have been
+ * fetched by the grid's store. */
+ "everythingSeemsSelected": function() {
+ return dojo.query(
+ "[name=autogrid.selector]", this.domNode
+ ).filter(
+ function(c) { return (!c.disabled && !c.checked) }
+ ).length == 0;
+ },
+
/* Print the same data that the Flattener is feeding to the
* grid, sorted the same way too. Remove limit and offset (i.e.,
* print it all) unless those are passed in to the print() method.