DOM cleanup on circ_matrix.
authorJoseph Lewis <joehms22@gmail.com>
Tue, 21 Jun 2011 17:26:16 +0000 (11:26 -0600)
committerJoseph Lewis <joehms22@gmail.com>
Tue, 21 Jun 2011 17:26:16 +0000 (11:26 -0600)
Signed-off-by: Joseph Lewis <joehms22@gmail.com>
Open-ILS/web/js/ui/default/conify/global/config/circ_matrix_matchpoint.js
Open-ILS/web/templates/default/conify/global/config/circ_matrix_matchpoint.tt2

index 6e8dd50..1549e5c 100644 (file)
@@ -207,3 +207,17 @@ function applyCircModChanges() {
 
 openils.Util.addOnLoad(load);
 
+function format_hard_due_date(name, id) {
+    var item=this.grid.getItem(id);
+    if(!item) return name;
+    switch (this.grid.store.getValue(this.grid.getItem(id), 'hard_due_date')) {
+        case null :
+        case undefined :
+        case 'unset' :
+            return name;
+        default:
+            return "<a href='" + oilsBasePath +
+                "/conify/global/config/hard_due_date?name=" +
+                encodeURIComponent(name) + "'>" + name + "</a>";
+    }
+}
\ No newline at end of file
index bd19e7e..6941bce 100644 (file)
@@ -1,7 +1,7 @@
 [% ctx.page_title = 'Circulation Policy Configuration' %]
 [% WRAPPER default/base.tt2 %]
-<script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/conify/global/config/circ_matrix_matchpoint.js'> </script>
-<div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
+<script type='text/javascript' src='[% ctx.media_prefix %]/js/ui/default/conify/global/config/circ_matrix_matchpoint.js' />
+<div dojoType='dijit.layout.ContentPane' layoutAlign='top' class='oils-header-panel'>
     <div>Circulation Policy Configuration</div>
     <div><button dojoType='dijit.form.Button' onClick='cmGrid.showCreatePane()'>New</button></div>
 </div>
@@ -19,8 +19,7 @@
             columnPickerPrefix='"conify.config.circ_matrix_matchpoint"'>
             <thead>
                 <tr>
-                    <th field="hard_due_date" formatter="format_hard_due_date">
-                    </th>
+                    <th field="hard_due_date" formatter="format_hard_due_date" />
                 </tr>
             </thead>
     </table>
     <div id='circ-mod-editor' style='border:1px solid #aaa'>
         <h3>Circ Modifier Count Groups</h3>
         <table class='oils-generic-table' name='circ-mod-group-table'>
-            <tbody><tr>
-                <td>Total items out</td>
-                <td><input type='text' size='3' name='circ-mod-count'></div></td>
-            </tr><tbody>
+            <tbody>
+                <tr>
+                    <td>Total items out</td>
+                    <td><input type='text' size='3' name='circ-mod-count' /></div></td>
+                </tr>
+            <tbody>
             <tbody name='circ-mod-entry-tbody'>
                 <tr name='circ-mod-entry-row'>
                     <td name='circ-mod'/>
             </tbody>
         </table>
         <span name='add-circ-mod-group-span'>
-        <a href='javascript:void(0);' name='add-circ-mod-group'>Create New Group</a>
-        </span>&nbsp;&nbsp;<span>
-        <a href='javascript:void(0);' onclick='applyCircModChanges()'>Apply Circ Modifier Changes</a>
+            <a href='javascript:void(0);' name='add-circ-mod-group'>Create New Group</a>
+        </span>
+        &nbsp;&nbsp;
+        <span>
+            <a href='javascript:void(0);' onclick='applyCircModChanges()'>Apply Circ Modifier Changes</a>
         </span>
     </div>
 </div>
 
 <div class='hidden'><div dojoType='openils.widget.ProgressDialog' jsId='progressDialog'/></div>
 
-<script type="text/javascript">
-    function format_hard_due_date(name, id) {
-        var item=this.grid.getItem(id);
-        if(!item) return name;
-        switch (this.grid.store.getValue(this.grid.getItem(id), 'hard_due_date')) {
-            case null :
-            case undefined :
-            case 'unset' :
-                return name;
-            default:
-                return "<a href='" + oilsBasePath +
-                    "/conify/global/config/hard_due_date?name=" +
-                    encodeURIComponent(name) + "'>" + name + "</a>";
-        }
-    }
-</script>
 [% END %]