LP#1766716 Supporting functionality added to date/time picker and progress dialog
authorMike Rylander <mrylander@gmail.com>
Fri, 16 Mar 2018 13:52:50 +0000 (09:52 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 26 Jul 2018 18:59:08 +0000 (14:59 -0400)
Here the date/time picker is given the ability to dynamically hide the time
picking component when show-time-picker is in effect.  This allows an
interface to use the time picker based on ephemeral state information and to
hide it when not useful.

Additionally, the progress dialog now takes an optional label property that
can be passed to both open() and update(), so that textual information can
be provided along with the numeric and visual progress data.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/templates/staff/share/t_datetime.tt2
Open-ILS/src/templates/staff/share/t_progress_dialog.tt2
Open-ILS/web/js/ui/default/staff/services/ui.js

index 492fa1c..903214d 100644 (file)
@@ -30,7 +30,8 @@
   <div>
     <span>
       <uib-timepicker
-        ng-show="showTimePicker"
+        ng-if="showTimePicker"
+        ng-hide="hideTimePicker"
         ng-model="ngModel"
         ng-disabled="ngDisabled"
         ng-required="ngRequired"
index 2df60d2..6b37845 100644 (file)
@@ -7,6 +7,12 @@
   <div class="modal-body">
     <div class="row eg-modal-progress">
 
+      <div ng-if="data.label">
+        <div class="col-md-12">
+          <h2>{{data.label}}</h2>
+        </div>
+      </div>
+
       <div ng-if="data.hasvalue() && data.hasmax()">
         <!-- determinate progress bar.  shows max/value progress -->
         <div class="col-md-10">
index 95a1f48..3562e4a 100644 (file)
@@ -412,6 +412,8 @@ function($timeout , $parse) {
             egProgressData.max = args.max;
         if (args.value != undefined) 
             egProgressData.value = args.value;
+        if (args.label != undefined) 
+            egProgressData.label = args.label;
     }
 
     // Increment the current value.  If no amount is specified,
@@ -1199,6 +1201,7 @@ function($uibModal , $interpolate , egCore) {
                 ngDisabled : '=',
                 ngRequired : '=',
                 hideDatePicker : '=',
+                hideTimePicker : '=?',
                 dateFormat : '=?',
                 outOfRange : '=?',
                 focusMe : '=?'