GridColumnPicker terminology repairs
authorBill Erickson <berick@esilibrary.com>
Tue, 27 Mar 2012 19:37:40 +0000 (15:37 -0400)
committerBill Erickson <berick@esilibrary.com>
Wed, 28 Mar 2012 15:48:33 +0000 (11:48 -0400)
Change the configuration attribute columnPickerPrefix to
columnPersistKey.  Most notably, it's not a prefix (it's a suffix), nor
is its pre/suffixiness relevant to the user.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/templates/acq/picklist/user_request.tt2
Open-ILS/src/templates/conify/flattener_test.tt2
Open-ILS/src/templates/conify/global/config/barcode_completion.tt2
Open-ILS/src/templates/conify/global/config/circ_limit_set.tt2
Open-ILS/src/templates/conify/global/config/circ_matrix_matchpoint.tt2
Open-ILS/src/templates/conify/global/config/hold_matrix_matchpoint.tt2
Open-ILS/src/templates/vandelay/inc/import_errors.tt2
Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
Open-ILS/web/js/dojo/openils/widget/FlattenerGrid.js
Open-ILS/web/js/dojo/openils/widget/GridColumnPicker.js

index 2a392c0..9518f3c 100644 (file)
@@ -51,7 +51,7 @@
                     defaultCellWidth='"auto"'
                     showPaginator='true'
                     showColumnPicker='true'
-                    columnPickerPrefix='"acq.picklist.user_request"'>
+                    columnPersistKey='"acq.picklist.user_request"'>
                     <thead>
                         <tr>
                             <th field='title' get='getTitle' formatter='formatTitle'/>
index 0bcad40..b7404f4 100644 (file)
@@ -23,7 +23,7 @@
         id="gridNode"
         jsid="grid"
         dojoType="openils.widget.FlattenerGrid"
-        columnPickerPrefix='"conify.flattener_test"'
+        columnPersistKey='"conify.flattener_test"'
         fmClass="'acp'"
         autoHeight="10"
         editOnEnter="true"
index 6928b94..593d578 100644 (file)
@@ -16,7 +16,7 @@
             editStyle='pane'
             editOnEnter='true'
             showColumnPicker='true'
-            columnPickerPrefix='"conify.config.barcode_completion"'>
+            columnPersistKey='"conify.config.barcode_completion"'>
     </table>
 </div>
 
index 2138706..9f9b90f 100644 (file)
@@ -19,7 +19,7 @@
             editStyle='pane'
             editOnEnter='true'
             showColumnPicker='true'
-            columnPickerPrefix='"conify.config.circ_limit_set"'>
+            columnPersistKey='"conify.config.circ_limit_set"'>
     </table>
 </div>
 
index 67386f0..6bdfced 100644 (file)
@@ -16,7 +16,7 @@
             editStyle='pane'
             editOnEnter='true'
             showColumnPicker='true'
-            columnPickerPrefix='"conify.config.circ_matrix_matchpoint"'>
+            columnPersistKey='"conify.config.circ_matrix_matchpoint"'>
             <thead>
                 <tr>
                     <th field="hard_due_date" formatter="format_hard_due_date">
index 0823484..def6292 100644 (file)
@@ -15,7 +15,7 @@
             editStyle='pane'
             editOnEnter='true'
             showColumnPicker='true'
-            columnPickerPrefix='"conify.config.hold_matrix_matchpoint"'>
+            columnPersistKey='"conify.config.hold_matrix_matchpoint"'>
     </table>
     <div></div>
 </div>
index 821363c..bf5e639 100644 (file)
@@ -31,7 +31,7 @@
                 query="{id: '*'}"
                 hidePaginator='true'
                 showColumnPicker='true'
-                columnPickerPrefix='"vandelay.item.import_error"'
+                columnPersistKey='"vandelay.item.import_error"'
                 fmClass='vii'>
                 <thead>
                     <tr>
@@ -65,7 +65,7 @@
                 query="{id: '*'}"
                 showPaginator='true'
                 showColumnPicker='true'
-                columnPickerPrefix='"vandelay.item.import_error"'
+                columnPersistKey='"vandelay.item.import_error"'
                 fmClass='vii'>
                 <thead>
                     <tr>
index 9210b36..d765276 100644 (file)
@@ -29,7 +29,7 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) {
             selectorWidth : '1.5',
             lineNumberWidth : '1.5',
             showColumnPicker : false,
-            columnPickerPrefix : null,
+            columnPersistKey : null,
             displayLimit : 15,
             displayOffset : 0,
             requiredFields : null,
@@ -60,11 +60,11 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) {
                 this._showing_create_pane = false;
 
                 if(this.showColumnPicker) {
-                    if(!this.columnPickerPrefix) {
-                        console.error("No columnPickerPrefix defined");
+                    if(!this.columnPersistKey) {
+                        console.error("No columnPersistKey defined");
                     } else {
                         var picker = new openils.widget.GridColumnPicker(
-                            openils.User.authtoken, this.columnPickerPrefix, this);
+                            openils.User.authtoken, this.columnPersistKey, this);
                         if(openils.User.authtoken) {
                             picker.load();
                         } else {
index 74e76e3..acac266 100644 (file)
@@ -14,7 +14,7 @@ if (!dojo._hasResource["openils.widget.FlattenerGrid"]) {
             /* These potential constructor arguments are useful to 
              * lattenerGrid in their own right */
             "columnReordering": true,
-            "columnPickerPrefix": null,
+            "columnPersistKey": null,
 
             /* These potential constructor arguments maybe useful to
              * FlattenerGrid in their own right, and are passed to
@@ -121,7 +121,7 @@ if (!dojo._hasResource["openils.widget.FlattenerGrid"]) {
                 if (!this.columnPicker) {
                     this.columnPicker =
                         new openils.widget.GridColumnPicker(
-                            null, this.columnPickerPrefix, this);
+                            null, this.columnPersistKey, this);
                     this.columnPicker.load();
                 }
 
index 0aa8ffc..7e0dcea 100644 (file)
@@ -30,9 +30,9 @@ if(!dojo._hasResource["openils.widget.GridColumnPicker"]) {
 
         USER_PERSIST_SETTING : 'ui.grid_columns',
 
-        constructor : function (authtoken, persistPrefix, grid, structure) {
+        constructor : function (authtoken, persistKey, grid, structure) {
             this.grid = grid;
-            this.persistPrefix = persistPrefix;
+            this.persistKey = this.USER_PERSIST_SETTING+'.'+persistKey;
             this.authtoken = authtoken || openils.User.authtoken;
             this.structure = structure || this.grid.structure;
             this.cells = this.structure[0].cells[0].slice();
@@ -219,9 +219,9 @@ if(!dojo._hasResource["openils.widget.GridColumnPicker"]) {
             }
 
             var setting = {};
-            var setName = this.USER_PERSIST_SETTING+'.'+this.persistPrefix;
-            setting[setName] = {'columns':list, 'auto':autos};
+            setting[this.persistKey] = {'columns':list, 'auto':autos};
 
+            var _this = this;
             fieldmapper.standardRequest(
                 ['open-ils.actor', 'open-ils.actor.patron.settings.update'],
                 {   async: true,
@@ -231,7 +231,7 @@ if(!dojo._hasResource["openils.widget.GridColumnPicker"]) {
                     },
                     onmethoderror : function() {},
                     onerror : function() { 
-                        console.log("No user setting '" + setName + "' configured.  Cannot persist") 
+                        console.log("No user setting '" + _this.persistKey + "' configured.  Cannot persist") 
                     }
                 }
             );
@@ -291,7 +291,7 @@ if(!dojo._hasResource["openils.widget.GridColumnPicker"]) {
             fieldmapper.standardRequest(
                 ['open-ils.actor', 'open-ils.actor.patron.settings.retrieve'],
                 {   async: true,
-                    params: [this.authtoken, null, this.USER_PERSIST_SETTING+'.'+this.persistPrefix],
+                    params: [this.authtoken, null, this.persistKey],
                     oncomplete: function(r) {
                         var set = openils.Util.readResponse(r);
                         if(set) {