quieter debug console logs and a little cleanup ahead of next task
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Fri, 30 Mar 2012 19:30:42 +0000 (15:30 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Fri, 30 Mar 2012 19:30:42 +0000 (15:30 -0400)
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/templates/conify/flattener_test.tt2
Open-ILS/web/js/dojo/openils/FlattenerStore.js
Open-ILS/web/js/dojo/openils/widget/FlattenerGrid.js

index e6788f9..8f610f6 100644 (file)
@@ -19,7 +19,8 @@
     </div>
     <!-- <div class="oils-acq-basic-roomy">
         blah, a dropdown or something here (optional; typical interfaces might
-        have a filtering org select here.
+        have a filtering org select here. Then again, why not use
+        showLoadFilter on the Grid instead?)
     </div> -->
     <table
         id="gridNode"
index ad8ec29..7c8f4ae 100644 (file)
@@ -13,17 +13,6 @@ if (!dojo._hasResource["openils.FlattenerStore"]) {
         return "openils.FlattenerStore: " + this.message;
     };
 
-    function lazy(o) {
-        if (typeof o == "object") {
-            if (o.part_num)
-                return "[object with part_num: " + o.part_num + "]";
-            else
-                return "[object with keys: " + openils.Util.objectProperties(o).join(",") + "]";
-        } else {
-            return o;
-        }
-    }
-
     dojo.declare(
         "openils.FlattenerStore", null, {
 
@@ -114,7 +103,7 @@ if (!dojo._hasResource["openils.FlattenerStore"]) {
         },
 
         "_get_map_key": function() {
-            console.debug("mapClause: " + dojo.toJson(this.mapClause));
+            //console.debug("mapClause: " + dojo.toJson(this.mapClause));
             this.mapKey = fieldmapper.standardRequest(
                 ["open-ils.fielder",
                     "open-ils.fielder.flattened_search.prepare"], {
@@ -242,7 +231,7 @@ if (!dojo._hasResource["openils.FlattenerStore"]) {
             //  callback to the *req* object for the caller's use, but
             //  the one we provide does nothing but issue an alert().
 
-            console.info("fetch(" + dojo.toJson(req) + ")");
+            //console.log("fetch(" + dojo.toJson(req) + ")");
             var self = this;
             var callback_scope = req.scope || dojo.global;
 
@@ -424,27 +413,12 @@ if (!dojo._hasResource["openils.FlattenerStore"]) {
             });
         },
 
-        /* dojo.data.api.Write */
-
-/* to add:
- * ------
- * newItem  -> call onNew(newitem)
- * deleteItem -> call onDelete(deleteditem)
- * setValue -> call  onSet(item, attr, oldval, newval)
- * setValues -> ditto
- */
-
-        "newItem": function(keywordArgs, parentInfo) {
-            if (parentInfo)
-                throw new FlattenerStoreError("not a hierarchical datastore");
-
+        /* dojo.data.api.Write - only very partially implemented, because
+         * for FlattenerGrid, the intended client of this store, we don't
+         * need most of the methods. */
 
-            /* we need to get new item by calling a fetch or something, because
-             * the new fmobj as result of createpane or something is not enough
-             * (we need the data the flattener would return about it)
-             *
-             * finish when editing is figured out */
-            //this.onNew(myNewItem, parentInfo)
+        "deleteItem": function(item) {
+            console.warn("[unimplemented] deleteItem() XXX TODO");
         },
 
         "setValue": function(item, attribute, value) {
@@ -460,23 +434,23 @@ if (!dojo._hasResource["openils.FlattenerStore"]) {
         },
 
         "setValues": function(item, attribute, values) {
-            console.warn("[unimplemented] setValues(); unneeded or TODO?");
+            console.warn("[unimplemented] setValues()");    /* unneeded */
         },
 
-        "deleteItem": function(item) {
-            console.warn("[unimplemented] deleteItem() XXX TODO");
+        "newItem": function(keywordArgs, parentInfo) {
+            console.warn("[unimplemented] newItem()");    /* unneeded */
         },
 
         "unsetAttribute": function() {
-            console.warn("[unimplemented] unsetAttribute()");
+            console.warn("[unimplemented] unsetAttribute()");   /* unneeded */
         },
 
         "save": function() {
-            console.warn("[unimplemented] save()");
+            console.warn("[unimplemented] save()"); /* unneeded */
         },
 
         "revert": function() {
-            console.warn("[unimplemented] revert()");
+            console.warn("[unimplemented] revert()");   /* unneeded */
         },
 
         "isDirty": function() { /* I /think/ this will be ok for our purposes */
@@ -485,11 +459,12 @@ if (!dojo._hasResource["openils.FlattenerStore"]) {
             return false;
         },
 
-        /* dojo.data.api.Notification */
+        /* dojo.data.api.Notification - Keep these no-op methods because
+         * clients will dojo.connect() to them.  */
 
-        "onNew" : function(item) { /* no-op, but keep */ },
-        "onDelete" : function(item) { /* no-op, keep */ },
-        "onSet": function(item, attr, oldval, newval) { /* no-op, but keep */ },
+        "onNew" : function(item) { /* no-op */ },
+        "onDelete" : function(item) { /* no-op */ },
+        "onSet": function(item, attr, oldval, newval) { /* no-op */ },
 
         /* *** Classes implementing any Dojo APIs do this to list which
          *     APIs they're implementing. *** */
index da5ff05..df9c0d5 100644 (file)
@@ -205,7 +205,6 @@ if (!dojo._hasResource["openils.widget.FlattenerGrid"]) {
 
                     this.mapTerminii.push(terminus);
                 }
-                console.log(dojo.toJson(this.mapTerminii));
             },
 
             "_supplementHeaderNames": function() {
@@ -411,7 +410,6 @@ if (!dojo._hasResource["openils.widget.FlattenerGrid"]) {
                     "requiredFields": this.requiredFields,
                     "suppressFields": this.suppressEditFields,
                     "onPostSubmit": function() {
-                        console.log("onPostSubmit");
                         /* ask the store to call flattener specially to get
                          * the flat row related to only this fmobj */
                         grid.store.loadItem({"force": true, "item": storeItem});
@@ -432,7 +430,6 @@ if (!dojo._hasResource["openils.widget.FlattenerGrid"]) {
                             onPostSubmit();
                     },
                     "onCancel": function() {
-                        console.info("onCancel");
                         setTimeout(
                             function() {
                                 grid.views.views[0].getCellNode(