[open-ils-commits] [GIT] Evergreen ILS branch rel_3_1 updated. 4b0084e7d39725e6483d66a0897b2c1d08f9f9b2

Evergreen Git git at git.evergreen-ils.org
Fri Sep 14 10:11:21 EDT 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_3_1 has been updated
       via  4b0084e7d39725e6483d66a0897b2c1d08f9f9b2 (commit)
       via  70b621796f885152b234eb66406d6592262132c5 (commit)
      from  5536cf7e91ddeb4bf818dc634e0faf4c1685ef6f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4b0084e7d39725e6483d66a0897b2c1d08f9f9b2
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Sep 14 10:06:33 2018 -0400

    LP#1739286: Belt and suspenders on radio button flags
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/web/js/ui/default/staff/cat/services/z3950.js b/Open-ILS/web/js/ui/default/staff/cat/services/z3950.js
index 563ac18..0f12422 100644
--- a/Open-ILS/web/js/ui/default/staff/cat/services/z3950.js
+++ b/Open-ILS/web/js/ui/default/staff/cat/services/z3950.js
@@ -187,6 +187,7 @@ function($q,   egCore,   egAuth) {
                 scope.save = function(v) {
                     egZ3950TargetSvc.saveDefaultField(v);
                     scope.default_field = v;
+                    angular.forEach(scope.infocus, function (v,k,o) { o[k]=false });
                     scope.infocus[scope.default_field] = true;
                 }
             }

commit 70b621796f885152b234eb66406d6592262132c5
Author: Jason Etheridge <jason at EquinoxInitiative.org>
Date:   Tue Jul 10 19:46:04 2018 -0400

    lp1739286 default search box in Z39.50
    
    This change tweaks the layout of search fields in the web client Z39.50
    interface and adds radio buttons for the default search field to auto-focus.
    The behavior is "sticky" without the need for an explicit Save action.  If the
    current default field is not present due to a given combination of selected
    services, then no field will be focused by default.
    
    Signed-off-by: Jason Etheridge <jason at EquinoxInitiative.org>
    Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/src/templates/staff/cat/z3950/t_search_fields.tt2 b/Open-ILS/src/templates/staff/cat/z3950/t_search_fields.tt2
index 61c74de..80dd096 100644
--- a/Open-ILS/src/templates/staff/cat/z3950/t_search_fields.tt2
+++ b/Open-ILS/src/templates/staff/cat/z3950/t_search_fields.tt2
@@ -1,9 +1,19 @@
 <div class="form-horizontal">
-    <div ng-repeat="search_field in fields | orderObjectBy: 'label'" class="z3950-search-field-list form-group">
-        <label for="z3950-field-{{search_field.key}}" class="col-xs-6 control-label">{{search_field.label}}</label>
-        <div class="col-xs-6">
-            <input type="text" class="form=control" id="z3950-field-{{search_field.key}}" ng-model="search_field.query" ng-if="search_field.key != 'item_type'">
-            <select ng-if="search_field.key == 'item_type'" ng-model="search_field.query">
+    <div class="z3950-search-field-list row">
+        <label class="col-xs-2">[% l('Default') %]</label>
+        <label class="col-xs-3">[% l('Field') %]</label>
+        <label class="col-xs-7">[% l('Value') %]</label>
+    </div>
+    <div ng-repeat="search_field in fields | orderObjectBy: 'label'" class="z3950-search-field-list row">
+        <div class="col-xs-2">
+            <input type="radio" name="default_field" ng-model="default_field" value="{{search_field.key}}" ng-change="save(search_field.key)"/>
+        </div>
+        <div class="col-xs-3">
+            <label for="z3950-field-{{search_field.key}}" class="control-label">{{search_field.label}}</label>
+        </div>
+        <div class="col-xs-7">
+            <input type="text" class="form-control" id="z3950-field-{{search_field.key}}" ng-model="search_field.query" ng-if="search_field.key != 'item_type'" focus-me="infocus[search_field.key]"/>
+            <select id="z3950-field-item_type" ng-if="search_field.key == 'item_type'" ng-model="search_field.query" focus-me="infocus[search_field.key]">
                 <option value="">[% l('All Formats') %]</option>
                 <option value='art'>[% l('Papers or Articles') %]</option>
                 <option value='bks'>[% l('Books') %]</option>
diff --git a/Open-ILS/web/js/ui/default/staff/cat/services/z3950.js b/Open-ILS/web/js/ui/default/staff/cat/services/z3950.js
index 918de4b..563ac18 100644
--- a/Open-ILS/web/js/ui/default/staff/cat/services/z3950.js
+++ b/Open-ILS/web/js/ui/default/staff/cat/services/z3950.js
@@ -140,6 +140,18 @@ function($q,   egCore,   egAuth) {
         egCore.hatch.setLocalItem('eg.cat.z3950.default_targets', saved_targets);
     }
 
+    // store default field
+    service.saveDefaultField = function(default_field) {
+        console.log('saveDefaultField',default_field);
+        egCore.hatch.setLocalItem('eg.cat.z3950.default_field', default_field);
+    }
+
+    service.fetchDefaultField = function() {
+        var default_field = egCore.hatch.getLocalItem('eg.cat.z3950.default_field') || 'isbn';
+        console.log('fetchDefaultField',default_field);
+        return default_field;
+    }
+
     return service;
 }])
 .directive("egZ3950TargetList", function () {
@@ -169,6 +181,14 @@ function($q,   egCore,   egAuth) {
             templateUrl: './cat/z3950/t_search_fields',
             link: function(scope, elem, attr) {
                 scope.fields = egZ3950TargetSvc.searchFields;
+                scope.default_field = egZ3950TargetSvc.fetchDefaultField();
+                scope.infocus = {};
+                scope.infocus[scope.default_field] = true;
+                scope.save = function(v) {
+                    egZ3950TargetSvc.saveDefaultField(v);
+                    scope.default_field = v;
+                    scope.infocus[scope.default_field] = true;
+                }
             }
         };
     }

-----------------------------------------------------------------------

Summary of changes:
 .../templates/staff/cat/z3950/t_search_fields.tt2  |   20 ++++++++++++++----
 .../web/js/ui/default/staff/cat/services/z3950.js  |   21 ++++++++++++++++++++
 2 files changed, 36 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list