[open-ils-commits] r19608 - trunk/Open-ILS/web/templates/default/conify/global/config (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Mar 7 11:03:09 EST 2011
Author: miker
Date: 2011-03-07 11:03:07 -0500 (Mon, 07 Mar 2011)
New Revision: 19608
Added:
trunk/Open-ILS/web/templates/default/conify/global/config/coded_value_map.tt2
Log:
code value map admin page, filtered by record attr def
Added: trunk/Open-ILS/web/templates/default/conify/global/config/coded_value_map.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/conify/global/config/coded_value_map.tt2 (rev 0)
+++ trunk/Open-ILS/web/templates/default/conify/global/config/coded_value_map.tt2 2011-03-07 16:03:07 UTC (rev 19608)
@@ -0,0 +1,61 @@
+[% WRAPPER default/base.tt2 %]
+<h1>Code Value Maps</h1> <br/>
+
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client" class='oils-header-panel'>
+ <div>Coded Value Maps</div>
+ <div>
+ <button dojoType='dijit.form.Button' onClick='ccvmGrid.showCreateDialog()'>New Map</button>
+ <button dojoType='dijit.form.Button' onClick='ccvmGrid.deleteSelected()'>Delete Selected</button>
+ </div>
+</div>
+
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+ <span>Record Attribute Type: </span><div id='attr-def-div'/>
+</div>
+
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+ <table jsId="ccvmGrid"
+ autoHeight='true'
+ dojoType="openils.widget.AutoGrid"
+ fieldOrder="['ctype', 'code', 'value', 'description']"
+ query="{code: '*'}"
+ defaultCellWidth='"25%"'
+ fmClass='ccvm'
+ showPaginator='true'
+ editOnEnter='true'/>
+ </div>
+
+<script type ="text/javascript">
+
+ dojo.require('dijit.form.FilteringSelect');
+ dojo.require('openils.widget.AutoGrid');
+ dojo.require('openils.widget.AutoFieldWidget');
+
+ var firstRun = true;
+ openils.Util.addOnLoad(
+ function() {
+
+ var selector = new openils.widget.AutoFieldWidget({
+ fmClass : 'ccvm',
+ fmField : 'ctype',
+ parentNode : dojo.byId('attr-def-div')
+ });
+
+ selector.build(
+ function(w, ww) {
+ dojo.connect(w, 'onChange',
+ function(newVal) {
+ ccvmGrid.resetStore();
+ ccvmGrid.loadAll({order_by : {ccvm : 'code'}}, {ctype : newVal});
+ }
+ );
+ // start with something arbitrary that has some data
+ w.attr('value', 'audience');
+ }
+ );
+ }
+ );
+
+</script>
+
+[% END %]
More information about the open-ils-commits
mailing list