[open-ils-commits] r13326 - in trunk/Open-ILS/web: js/ui/default/conify/global/acq templates/default/conify/global/acq (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jun 5 11:35:19 EDT 2009
Author: erickson
Date: 2009-06-05 11:35:17 -0400 (Fri, 05 Jun 2009)
New Revision: 13326
Modified:
trunk/Open-ILS/web/js/ui/default/conify/global/acq/distribution_formula.js
trunk/Open-ILS/web/templates/default/conify/global/acq/distribution_formula.tt2
Log:
grid getter fixes for 1.3
Modified: trunk/Open-ILS/web/js/ui/default/conify/global/acq/distribution_formula.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/conify/global/acq/distribution_formula.js 2009-06-05 15:00:30 UTC (rev 13325)
+++ trunk/Open-ILS/web/js/ui/default/conify/global/acq/distribution_formula.js 2009-06-05 15:35:17 UTC (rev 13326)
@@ -51,10 +51,3 @@
return count;
}
-function getFormulaName(rowIndex, item) {
- if(!item) return '';
- return '<a href="' + location.href + '/' +
- this.grid.store.getValue(item, 'id') + '">' +
- this.grid.store.getValue(item, 'name') + '</a>';
-}
-
Modified: trunk/Open-ILS/web/templates/default/conify/global/acq/distribution_formula.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/conify/global/acq/distribution_formula.tt2 2009-06-05 15:00:30 UTC (rev 13325)
+++ trunk/Open-ILS/web/templates/default/conify/global/acq/distribution_formula.tt2 2009-06-05 15:35:17 UTC (rev 13326)
@@ -1,8 +1,26 @@
[% WRAPPER default/base.tt2 %]
<script src='[% ctx.media_prefix %]/js/ui/default/conify/global/acq/distribution_formula.js'> </script>
-<script> var formulaId = '[% ctx.page_args.0 %]';</script>
+<script> var formulaId = '[% ctx.page_args.0 %]';
+function getFormulaName(rowIndex, item) {
+ if(!item) return '';
+ var name = this.grid.store.getValue(item, 'name');
+ var id = this.grid.store.getValue(item, 'id');
+ return id + ':' + name;
+ }
+function formatName(value) {
+ if(value) {
+ var vals = value.split(/:/);
+ return '<a href="'+location.href+ '/'+vals[0]+'">'+vals[1]+'</a>';
+ }
+}
+
+</script>
+
+
+
+
<div id='formula-list-div'>
<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
<div dojoType="dijit.layout.ContentPane" layoutAlign="client" class='oils-header-panel'>
@@ -22,7 +40,7 @@
editOnEnter='true'>
<thead>
<tr>
- <th field='name' get='getFormulaName'/>
+ <th field='name' get='getFormulaName' formatter='formatName'/>
<th field='item_count' get='getItemCount'/>
</tr>
</thead>
@@ -38,9 +56,9 @@
</div>
<div dojoType="dijit.layout.ContentPane" layoutAlign="client" class='oils-header-panel'>
<div id="formula_head"></div>
- <div>
+ <div>
<button dojoType='dijit.form.Button' onClick='dfeListGrid.showCreateDialog()'>New Formula Entry</button>
- <button dojoType='dijit.form.Button' onClick='dfeListGrid.deleteSelected()'>Delete Selected</button>
+ <button dojoType='dijit.form.Button' onClick='dfeListGrid.deleteSelected()'>Delete Selected</button>
</div>
</div>
<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
@@ -55,11 +73,10 @@
editOnEnter='true'>
<thead>
<tr>
- <th field='formula' get='getFormulaId'/>
+ <th field='formula' get='getFormulaId' formatter='formatName'/>
</tr>
</thead>
</table>
- <div/>
</div>
</div>
</div>
More information about the open-ils-commits
mailing list