[open-ils-commits] r12080 - in trunk/Open-ILS/web: js/dojo/openils/widget templates/default/conify/global/acq
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Feb 5 11:21:45 EST 2009
Author: erickson
Date: 2009-02-05 11:21:43 -0500 (Thu, 05 Feb 2009)
New Revision: 12080
Modified:
trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
trunk/Open-ILS/web/templates/default/conify/global/acq/exchange_rate.tt2
Log:
allow for definition of default cell width. (can still be overridden by defining cell widths in the grid)
Modified: trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js 2009-02-05 16:04:36 UTC (rev 12079)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js 2009-02-05 16:21:43 UTC (rev 12080)
@@ -13,6 +13,7 @@
/* if true, pop up an edit dialog when user hits Enter on a give row */
editOnEnter : false,
+ defaultCellWidth : null,
startup : function() {
@@ -33,6 +34,8 @@
fields.push(entry);
if(!entry.get)
entry.get = openils.widget.AutoGrid.defaultGetter
+ if(!entry.width && this.defaultCellWidth)
+ entry.width = this.defaultCellWidth;
}
this.setStructure([{cells: [fields]}]);
Modified: trunk/Open-ILS/web/templates/default/conify/global/acq/exchange_rate.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/conify/global/acq/exchange_rate.tt2 2009-02-05 16:04:36 UTC (rev 12079)
+++ trunk/Open-ILS/web/templates/default/conify/global/acq/exchange_rate.tt2 2009-02-05 16:21:43 UTC (rev 12080)
@@ -21,35 +21,6 @@
}
openils.Util.addOnLoad(renderGrid);
</script>
-
-<style>
-
-.oils-header-panel {
- width:99%;
- margin-top:20px;
-}
-.oils-header-panel div:first-child {
- width:48%;
- text-align:left;
- float:left;
- font-size:130%;
- font-weight: bold;
- vertical-align:bottom;
- position:relative;
- bottom:0px;
- left:5px;
-}
-.oils-header-panel div:last-child {
- width:48%;
- text-align:right;
- float:right;
- vertical-align:bottom;
- position:relative;
- bottom:0px;
- right:5px;
-}
-</style>
-
<div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
<div>Exchange Rates</div>
<div><button dojoType='dijit.form.Button' onClick='erGrid.showCreateDialog()'>New</button></div>
@@ -57,7 +28,7 @@
<div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
<table jsId="erGrid" dojoType="openils.widget.AutoGrid"
- fieldOrder="['id', 'from_currency', 'to_currency', 'ratio']"
+ fieldOrder="['id', 'from_currency', 'to_currency', 'ratio']" defaultCellWidth='12'
query="{id: '*'}" rowSelector='20px' fmClass='acqexr' editOnEnter='true'>
</table>
</div>
More information about the open-ils-commits
mailing list