]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/web/js/ui/default/conify/global/vandelay/import_bib_trash_group.js
Replace deprecated javascript escape() with encodeURIComponent()
[Evergreen.git] / Open-ILS / web / js / ui / default / conify / global / vandelay / import_bib_trash_group.js
1 dojo.require('openils.Util');
2 dojo.require('openils.PermaCrud');
3 dojo.require('openils.widget.FlattenerGrid');
4 dojo.require('openils.widget.OrgUnitFilteringSelect');
5
6
7 function init() {
8     if (!grp_id) return;
9
10     new openils.PermaCrud().retrieve(
11         'vibtg', grp_id, {
12             oncomplete : function(r) {
13                 init2(openils.Util.readResponse(r));
14             }
15         }
16     );
17 }
18
19 function init2(grp) {
20     dojo.byId('trash-group-name').innerHTML = grp.label();
21     tfGrid.overrideEditWidgets.grp = new dijit.form.TextBox({
22         value : grp.id(),
23         disabled : true
24     });
25 }
26
27 function format_grp(val) {
28     return '<a href="' + location.href + 
29         '/' + encodeURIComponent(val) + '">' + val + '</a>';
30 }
31
32 openils.Util.addOnLoad(init);