Displaying fund code instead of name in details grid
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 14 Jul 2008 15:08:35 +0000 (15:08 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 14 Jul 2008 15:08:35 +0000 (15:08 +0000)
Displaying barcode, callnumber, and location columns in read-only view

git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@10026 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/common/jubgrid.js
Open-ILS/web/oilsweb/oilsweb/templates/oils/default/common/jubgrid.html

index 4ae3e31..72b5036 100644 (file)
@@ -69,6 +69,15 @@ var JUBGrid = {
             return data.fund;
         }
     },
+    getLIDFundCode : function(rowIndex) {
+        var data = JUBGrid.jubDetailGrid.model.getRow(rowIndex);
+        if (!data || !data.fund) return;
+        try {
+            return openils.acq.Fund.retrieve(data.fund).code();
+        } catch (evt) {
+            return data.fund;
+        }
+    },
     getLIDLibName : function(rowIndex) {
         var data = JUBGrid.jubDetailGrid.model.getRow(rowIndex);
         if (!data || !data.owning_lib) return;
index f989e3e..197fa51 100644 (file)
@@ -70,7 +70,7 @@ pointing to the JUB model (and store) that you have created.
         cells: [[
             {name:"ID", field:"id"},
             {name:"Fund", field:"fund",
-                get:JUBGrid.getLIDFundName,
+                get:JUBGrid.getLIDFundCode,
                 editor: openils.editors.FundSelectEditor,
             },
             {name:"Branch", field:"owning_lib",
@@ -96,11 +96,15 @@ pointing to the JUB model (and store) that you have created.
         cells: [[
             {name:"ID", field:"id"},
             {name:"Fund", field:"fund",
-             get:JUBGrid.getLIDFundName,
+             get:JUBGrid.getLIDFundCode,
             },
             {name:"Branch", field:"owning_lib",
-            get:JUBGrid.getLIDLibName,
-           },
+                   get:JUBGrid.getLIDLibName,
+               },
+            {name:"Barcode", field:"barcode", width:'auto'},
+            {name:"Call Number", field:"cn_label", width:'auto'},
+            {name:"Shelving Location", field:"location", 
+                width:'auto', get:JUBGrid.getCopyLocation},
         ]]
     }];
     </script>