From e29d207f5cdaad8e1f217ae1ac119a2d7ba4f8ca Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 4 Mar 2019 14:06:59 -0500 Subject: [PATCH] LP1716473 Copy editor hide disabled defaults Disabling a field in the copy editor "Defaults" tab now hides the field instead of simply disabling it. Once a field is hidden, subsequent field shift left to fill the space. The "Working Items" grid is shifted to the bottom of the page, below the attributes editor. This allows the attributes to fill the horizontal space and puts the working items and save operations visually at the end of the page, i.e. at end of the work flow. Signed-off-by: Bill Erickson Signed-off-by: Geoff Sams Signed-off-by: Michele Morgan --- .../staff/cat/volcopy/t_attr_edit.tt2 | 992 +++++++++--------- .../templates/staff/cat/volcopy/t_edit.tt2 | 34 +- .../js/ui/default/staff/cat/volcopy/app.js | 13 + 3 files changed, 532 insertions(+), 507 deletions(-) diff --git a/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2 b/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2 index 7e58ebb731..bd7217c9f2 100644 --- a/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2 +++ b/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2 @@ -5,514 +5,526 @@ .css-form select.ng-invalid { background-color: #FA787E; } + + ul.copy-attributes-grid { + list-style: none; + display: flex; + flex-wrap: wrap; + padding-inline-start: 0px; + } + + ul.copy-attributes-grid > li { + padding: 5px; + margin: 5px; + /* Force the grid to overflow to the next line every 4 entries + while leaving some wiggle space for padding/margins */ + flex-basis: 24%; + display: flex; + flex-direction: column; + } + + ul.copy-attributes-grid > li > div { + flex: 1; + /* padding here is required to allow the "item modified" bg + color to appear around some widgets (mainly selectors) */ + padding: 6px; + } + + ul.copy-attributes-grid > li > div:nth-child(1) { + border-radius: 6px 6px 0px 0px; + } + + ul.copy-attributes-grid > li > div:nth-child(2) { + border: 1px solid #d9edf7; + } + + ul.copy-attributes-grid li label { + font-weight: bold; + padding-left: 5px; + } -
-
-
-
[% l('Template') %]
-
-
- -
-
- -
-
-
-
-
- - -
-
-
-
- - [% l('Import') %] - - - -
-
-
+ +
+ +
+
+
[% l('Template') %]
+
+
+ +
+
+ +
+
+
+
+
+ + +
-
- +
+
+ + [% l('Import') %] + + + +
+
+
+ +
+
-
-
-
-

[% l('Call Number Attributes') %]

-
-
+
+
+
+

[% l('Call Number Attributes') %]

+
+
-
-
- [% l('Classification') %] +
+
+ [% l('Classification') %] +
+
+ +
+
+ [% l('Prefix') %] +
+
+ +
+
+ [% l('Suffix') %] +
+
+ +
+
+ +
+
+
+

[% l('Item Attributes') %]

+
+
+
+ +
    +
  • +
    +
    +
    +
    -
    - +
    +
    -
    - [% l('Prefix') %] +
    + +
    +
  • +
  • +
    +
    + +
    +
    +
    + +
    -
    - +
    +
  • +
  • +
    +
    + + +
    +
    +
    + +
    -
    - [% l('Suffix') %] +
    +
  • +
  • +
    +
    +
    +
    -
    - +
    +
    -
    - -
    -
    -
    -

    [% l('Item Attributes') %]

    -
    +
    +
    +
    + +
    -
    - -
    - -
    -
    - [% l('Circulate?') %] +
    +
  • +
  • +
    +
    + +
    +
    +
    +
    -
    - [% l('Status') %] +
    +
  • +
  • +
    +
    +
    +
    -
    - [% l('Statistical Categories') %] +
    +
    -
    - -
    -
    -
    -
    -
    -
    - -
    -
    - -
    -
    -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    - [% l('Circulation Library') %] -
    -
    - [% l('Reference?') %] -
    -
    - -
    -
    - -
    - -
    -
    -
    -
    -
    - -
    -
    - -
    -
    -
    - -
    -
    -
    - -
    - -
    -
    - [% l('Shelving Location') %] -
    -
    - [% l('OPAC Visible?') %] -
    -
    - -
    -
    - -
    - -
    -
    -
    -
    -
    - -
    -
    - -
    -
    -
    - -
    -
    -
    - -
    - -
    -
    - [% l('Circulation Modifier') %] -
    -
    - [% l('Price') %] -
    -
    - -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    - [% l('Loan Duration') %] -
    -
    - [% l('Acquisition Cost') %] -
    -
    - -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    - [% l('Circulate as Type') %] -
    -
    - [% l('Deposit?') %] -
    -
    - -
    -
    - -
    - -
    -
    -
    -
    -
    - -
    -
    - -
    -
    -
    - -
    -
    -
    - -
    - -
    -
    - [% l('Holdable?') %] -
    -
    - [% l('Deposit Amount') %] -
    -
    - -
    -
    -
    -
    - -
    -
    - -
    -
    -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    - [% l('Age-based Hold Protection') %] -
    -
    - [% l('Quality') %] -
    -
    - -
    -
    - -
    - -
    -
    -
    -
    -
    - -
    -
    - -
    -
    -
    - -
    -
    -
    - -
    - -
    -
    - [% l('Fine Level') %] -
    -
    - -
    -
    - -
    - -
    -
    -
    - - -
    -
    - -
    - -
    -
    - [% l('Floating') %] -
    -
    - -
    -
    - -
    - -
    -
    -
    - -
    -
    +
    +
    +
    +
    - -
    -
    -
    - -
    -
    - -
    - -
    -
    -
    -
    - {{ sc.owner().name() }} : {{ sc.name() }} -
    -
    -
    -
    - -
    -
    -
    -
    +
    +
  • +
  • +
    +
    + +
    +
    +
    +
    - -
    +
+ +
  • +
    +
    + +
    +
    +
    + + +
    +
    +
  • +
  • +
    +
    + +
    +
    +
    + +
    +
    +
  • +
  • +
    +
    + +
    +
    +
    + + +
    +
    +
  • +
  • +
    +
    + +
    +
    +
    + + +
    +
    +
  • +
  • +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    +
  • +
  • +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    +
  • +
  • +
    +
    + +
    +
    +
    + +
    +
    +
  • +
  • +
    +
    + +
    +
    +
    + +
    +
    +
  • +
  • +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    +
  • +
  • +
    +
    + +
    +
    +
    + +
    +
    +
  • +
  • +
    +
    + +
    +
    +
  • +
  • +
    +
    + +
    +
    +
  • +
  • +
    +
    + +
    +
    +
    + +
    +
    +
  • +
  • +
    +
    + +
    +
    +
  • +
  • +
    +
    + +
    +
    +
  • + +
  • +
    +
    + +
    +
    +
  • +
    diff --git a/Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2 b/Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2 index 7d32580f40..e62e1b2622 100644 --- a/Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2 +++ b/Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2 @@ -101,11 +101,16 @@
    - +
    +
    +
    +
    +
    -
    - +
    + - + - - + + @@ -130,18 +135,13 @@ - + - -
    - -
    -
    +
    - -
    +
    - + - + - + diff --git a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js index 20c825746e..0a85f4cd18 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js @@ -1173,6 +1173,19 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore , statcat_filter: undefined }; + // Returns true if we are editing multiple copies and at least + // one field contains multiple values. + $scope.hasMulti = function() { + var keys = Object.keys($scope.working.MultiMap); + // for-loop for shortcut exit + for (var i = 0; i < keys.length; i++) { + if ($scope.working.MultiMap[keys[i]].length > 1) { + return true; + } + } + return false; + } + $scope.copyAlertUpdate = function (alerts) { if (!$scope.in_item_select && $scope.workingGridControls && -- 2.43.2