2 <h1>[% l('Virtual Field Data Providers') %]</h1> <br/>
4 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" class='oils-header-panel'>
5 <div>[% l('Virtual Field Data Providers') %]</div>
7 <button dojoType='dijit.form.Button' onClick='cmfvmGrid.showCreateDialog()'>[% l('New Map') %]</button>
8 <button dojoType='dijit.form.Button' onClick='cmfvmGrid.deleteSelected()'>[% l('Delete Selected') %]</button>
9 <button dojoType='dijit.form.Button' onClick='cmfvmGrid.showClonePane()'>[% l('Clone Selected') %]</button>
13 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
14 <span>[% l('Record Attribute Type: ') %]</span><div id='attr-def-div'></div>
17 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
18 <table jsId="cmfvmGrid"
20 dojoType="openils.widget.AutoGrid"
21 fieldOrder="['id', 'real', 'virtual', 'weight']"
23 defaultCellWidth='"25%"'
30 <script type ="text/javascript">
32 dojo.require('dijit.form.FilteringSelect');
33 dojo.require('openils.widget.AutoGrid');
34 dojo.require('openils.widget.AutoFieldWidget');
35 dojo.require('openils.PermaCrud');
37 var cmfId = '[% ctx.page_args.0 %]';
39 openils.Util.addOnLoad(
42 var selector = new openils.widget.AutoFieldWidget({
45 parentNode : dojo.byId('attr-def-div')
50 dojo.connect(w, 'onChange',
53 // see if this attr def supports composite entries
55 query : {virtual : ''+newVal}
58 cmfvmGrid.resetStore();
59 cmfvmGrid.loadAll({order_by : {cmfvm : 'id'}}, {virtual : newVal});
60 cmfvmGrid.overrideWidgetArgs.vritual = {dijitArgs : {value : newVal}};
61 // ^-- why is this not working?
65 // if a cmf is already selected via URL, fetch the cmfvm's
66 if (cmfId) w.attr('value', cmfId);
70 // hide the progress indicator since we're not loading any data up front
71 dojo.style(cmfvmGrid.loadProgressIndicator, 'visibility', 'hidden');