[open-ils-commits] [GIT] Evergreen ILS branch master updated. 26a73eaa513b559850d08abd29d921b27a6b2520

Evergreen Git git at git.evergreen-ils.org
Wed Jun 21 12:06:42 EDT 2017


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, master has been updated
       via  26a73eaa513b559850d08abd29d921b27a6b2520 (commit)
       via  3fe4480783960de63ad55effa2c8c2c1c855ebc6 (commit)
       via  182eb514495d105f59bc7631957437e252b26ab2 (commit)
      from  997e277207b4051b028d93bcab26c70645663081 (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 26a73eaa513b559850d08abd29d921b27a6b2520
Author: Cesar Velez <cesar.velez at equinoxinitiative.org>
Date:   Fri Jun 2 15:20:14 2017 -0400

    LP#1642035-Small DRY refactor to regctl.js compress_hold_notify()
    
    Signed-off by: Cesar Velez <cesar.velez at equinoxinitiative.org>
    
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
index 9d02459..4e53fde 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
@@ -1500,21 +1500,18 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore ,
     // Translate hold notify preferences from the form/scope back into a 
     // single user setting value for opac.hold_notify.
     function compress_hold_notify() {
-        var hold_notify = '';
-        var splitter = '';
+        var hold_notify_methods = [];
         if ($scope.hold_notify_type.phone) {
-            hold_notify = 'phone';
-            splitter = ':';
+            hold_notify_methods.push('phone');
         }
         if ($scope.hold_notify_type.email) {
-            hold_notify = hold_notify + splitter + 'email';
-            splitter = ':';
+            hold_notify_methods.push('email');
         }
         if ($scope.hold_notify_type.sms) {
-            hold_notify = hold_notify + splitter + 'sms';
-            splitter = ':';
+            hold_notify_methods.push('sms');
         }
-        $scope.user_settings['opac.hold_notify'] = hold_notify;
+
+        $scope.user_settings['opac.hold_notify'] = hold_notify_methods.join(':');
     }
 
     // dialog for selecting additional permission groups

commit 3fe4480783960de63ad55effa2c8c2c1c855ebc6
Author: Jason Boyer <jboyer at library.in.gov>
Date:   Thu Jun 1 08:28:45 2017 -0400

    lp1642035: Replace SMS Carrier Dropdown
    
    Signed-off-by: Jason Boyer <jboyer at library.in.gov>
    Signed-off-by: Cesar Velez <cesar.velez at equinoxinitiative.org>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
index b7d9606..2b85fd0 100644
--- a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
+++ b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
@@ -658,20 +658,11 @@ within the "form" by name for validation.
     <label>[% l('Default SMS Carrier') %]</label>
   </div>
   <div class="col-md-3 reg-field-input">
-    <div class="btn-group" uib-dropdown>
-      <button type="button" class="btn btn-default" uib-dropdown-toggle>
-        <span style="padding-right: 5px;"></span>
-        <span class="caret"></span>
-      </button>
-      <ul uib-dropdown-menu>
-        <li ng-repeat="carrier in sms_carriers">
-          <a href 
-            ng-click="field_modified();user_settings['opac.default_sms_carrier'] = carrier">
-                {{carrier.name()}}
-          </a>
-        </li>
-      </ul>
-    </div>
+    <span class="nullable">
+      <select class="form-control" ng-model="user_settings['opac.default_sms_carrier']" ng-options="c.id() as c.name() for c in sms_carriers">
+        <option value="">Select a Carrier</option>
+      </select>
+    </span>
   </div>
 </div>
 

commit 182eb514495d105f59bc7631957437e252b26ab2
Author: Jason Boyer <jboyer at library.in.gov>
Date:   Wed May 31 15:29:46 2017 -0400

    lp1642035: Editing User Hold Preferences
    
    The JS for hold notification values was replacing rather
    than concatenating so only the furthest-right true value
    would be saved. And because an ng-if directive creates
    a child scope[1], the hold_notify_sms primitive could
    never be true. Changed hold_notify_* to an object to
    avoid this.
    
    An ng-model directive was added to enable
    opac.default_sms_notify but opac.default_sms_carrier
    will still require some work to enable / replace.
    
    [1]:https://github.com/angular/angular.js/wiki/Understanding-Scopes
    
    Testing:
    
    pre-patch:
    Try to do anything with default sms number, fail.
    Try to set more than one of phone + email notification, fail.
    Try to set sms notification to anything, fail.
    
    post-patch:
    Default sms notify value is populated and can be changed.
    All 8 possible combinations of hold notify options can be set.
    
    Still can't set opac.default_sms_carrier value, needs additional work.
    
    Signed-off-by: Jason Boyer <jboyer at library.in.gov>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
index 4f4cc6e..b7d9606 100644
--- a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
+++ b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
@@ -624,19 +624,19 @@ within the "form" by name for validation.
     <div class='flex-cell'>
       <input 
         ng-change="field_modified()" 
-        type='checkbox' ng-model="hold_notify_phone"/>
+        type='checkbox' ng-model="hold_notify_type.phone"/>
       [% l('Phone') %]
     </div>
     <div class='flex-cell'>
       <input 
         ng-change="field_modified()" 
-        type='checkbox' ng-model="hold_notify_email"/>
+        type='checkbox' ng-model="hold_notify_type.email"/>
       [% l('Email') %]
     </div>
     <div class='flex-cell' ng-if="org_settings['sms.enable']">
       <input 
         ng-change="field_modified()" 
-        type='checkbox' ng-model="hold_notify_sms"/>
+        type='checkbox' ng-model="hold_notify_type.sms"/>
       [% l('SMS') %]
     </div>
   </div>
@@ -648,7 +648,7 @@ within the "form" by name for validation.
   </div>
   <div class="col-md-3 reg-field-input">
     <input 
-      ng-change="field_modified()" 
+      ng-change="field_modified()" ng-model="user_settings['opac.default_sms_notify']"
       type='text'/>
   </div>
 </div>
diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
index f9c20c6..9d02459 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
@@ -1097,6 +1097,7 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore ,
          egWorkLog) {
 
     $scope.page_data_loaded = false;
+    $scope.hold_notify_type = { phone : null, email : null, sms : null };
     $scope.clone_id = patronRegSvc.clone_id = $routeParams.clone_id;
     $scope.stage_username = 
         patronRegSvc.stage_username = $routeParams.stage_username;
@@ -1130,8 +1131,9 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore ,
             // passsword may originate from staged user.
             $scope.generate_password();
         }
-        $scope.hold_notify_phone = true;
-        $scope.hold_notify_email = true;
+        $scope.hold_notify_type.phone = true;
+        $scope.hold_notify_type.email = true;
+	$scope.hold_notify_type.sms = false;
 
         // staged users may be loaded w/ a profile.
         $scope.set_expire_date();
@@ -1500,16 +1502,16 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore ,
     function compress_hold_notify() {
         var hold_notify = '';
         var splitter = '';
-        if ($scope.hold_notify_phone) {
+        if ($scope.hold_notify_type.phone) {
             hold_notify = 'phone';
             splitter = ':';
         }
-        if ($scope.hold_notify_email) {
-            hold_notify = splitter + 'email';
+        if ($scope.hold_notify_type.email) {
+            hold_notify = hold_notify + splitter + 'email';
             splitter = ':';
         }
-        if ($scope.hold_notify_sms) {
-            hold_notify = splitter + 'sms';
+        if ($scope.hold_notify_type.sms) {
+            hold_notify = hold_notify + splitter + 'sms';
             splitter = ':';
         }
         $scope.user_settings['opac.hold_notify'] = hold_notify;
@@ -1579,9 +1581,9 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore ,
     function extract_hold_notify() {
         var notify = $scope.user_settings['opac.hold_notify'];
         if (!notify) return;
-        $scope.hold_notify_phone = Boolean(notify.match(/phone/));
-        $scope.hold_notify_email = Boolean(notify.match(/email/));
-        $scope.hold_notify_sms = Boolean(notify.match(/sms/));
+        $scope.hold_notify_type.phone = Boolean(notify.match(/phone/));
+        $scope.hold_notify_type.email = Boolean(notify.match(/email/));
+        $scope.hold_notify_type.sms = Boolean(notify.match(/sms/));
     }
 
     $scope.invalidate_field = function(field) {

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

Summary of changes:
 .../src/templates/staff/circ/patron/t_edit.tt2     |   27 +++++-----------
 .../web/js/ui/default/staff/circ/patron/regctl.js  |   33 +++++++++----------
 2 files changed, 25 insertions(+), 35 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list