[GIT] Evergreen ILS branch main updated. 48bdcabf928785e0db9aa649c0b6a4714c3ffcdc

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, main has been updated via 48bdcabf928785e0db9aa649c0b6a4714c3ffcdc (commit) via ef92c6c4f1659796cb0a5a28aee83423cf156a15 (commit) via b67a5ce2fe5655e121b89ae2fb333bfeedd021fd (commit) from b145aaa6229bc6429b77d458ff512e07c84b8a55 (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 48bdcabf928785e0db9aa649c0b6a4714c3ffcdc Author: Mike Rylander <mrylander@gmail.com> Date: Fri Mar 21 11:25:38 2025 -0400 Stamping upgrade scripts for new-tab/no-new-tabs Signed-off-by: Mike Rylander <mrylander@gmail.com> diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index ded4f9a771..27f620b41c 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -92,7 +92,7 @@ CREATE TRIGGER no_overlapping_deps BEFORE INSERT OR UPDATE ON config.db_patch_dependencies FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates'); -INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1464', :eg_version); -- sandbergja/miker +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1466', :eg_version); -- sleary/miker CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.staff-portal-urls-newtab.sql b/Open-ILS/src/sql/Pg/upgrade/1465.schema.staff-portal-urls-newtab.sql similarity index 59% rename from Open-ILS/src/sql/Pg/upgrade/XXXX.schema.staff-portal-urls-newtab.sql rename to Open-ILS/src/sql/Pg/upgrade/1465.schema.staff-portal-urls-newtab.sql index d5c3da47d3..bc0ec71260 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.staff-portal-urls-newtab.sql +++ b/Open-ILS/src/sql/Pg/upgrade/1465.schema.staff-portal-urls-newtab.sql @@ -1,6 +1,6 @@ BEGIN; -SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); +SELECT evergreen.upgrade_deps_block_check('1465', :eg_version); ALTER TABLE config.ui_staff_portal_page_entry ADD COLUMN url_newtab boolean; diff --git a/Open-ILS/src/sql/Pg/upgrade/YYYY.data.ws-setting-no-newtabs.sql b/Open-ILS/src/sql/Pg/upgrade/1466.data.ws-setting-no-newtabs.sql similarity index 88% rename from Open-ILS/src/sql/Pg/upgrade/YYYY.data.ws-setting-no-newtabs.sql rename to Open-ILS/src/sql/Pg/upgrade/1466.data.ws-setting-no-newtabs.sql index e62f8e2485..ffc6570194 100644 --- a/Open-ILS/src/sql/Pg/upgrade/YYYY.data.ws-setting-no-newtabs.sql +++ b/Open-ILS/src/sql/Pg/upgrade/1466.data.ws-setting-no-newtabs.sql @@ -1,6 +1,6 @@ BEGIN; -SELECT evergreen.upgrade_deps_block_check('YYYY', :eg_version); +SELECT evergreen.upgrade_deps_block_check('1466', :eg_version); INSERT into config.workstation_setting_type (name, grp, label, description, datatype) commit ef92c6c4f1659796cb0a5a28aee83423cf156a15 Author: Stephanie Leary <stephanie.leary@equinoxoli.org> Date: Sun Oct 6 22:03:15 2024 +0000 LP2015351 WS setting for links opening in new tabs Adds a workstation setting to choose whether links are allowed to open in new tabs. If the user chooses this setting, links' target attributes will be removed automatically throughout the Angular client. Release-note: Add workstation setting for opening links in new tabs Signed-off-by: Stephanie Leary <stephanie.leary@equinoxoli.org> Signed-off-by: Gina Monti <gmonti@biblio.org> Signed-off-by: Mike Rylander <mrylander@gmail.com> diff --git a/Open-ILS/src/eg2/src/app/app.component.ts b/Open-ILS/src/eg2/src/app/app.component.ts index e98d3b8031..d42cb105c3 100644 --- a/Open-ILS/src/eg2/src/app/app.component.ts +++ b/Open-ILS/src/eg2/src/app/app.component.ts @@ -19,6 +19,9 @@ export class BaseComponent implements AfterViewChecked { } ngAfterViewChecked(): void { + document.querySelectorAll('.user-pref-no-new-tabs a[target="_blank"]').forEach((a) => { + a.removeAttribute('target'); + }); document.querySelectorAll('a[target="_blank"]').forEach((a) => { if (!a.getAttribute('aria-describedby')) { a.setAttribute('aria-describedby', 'link-opens-newtab'); diff --git a/Open-ILS/src/eg2/src/app/staff/nav.component.ts b/Open-ILS/src/eg2/src/app/staff/nav.component.ts index c2eb70f5c7..173f942dd0 100644 --- a/Open-ILS/src/eg2/src/app/staff/nav.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/nav.component.ts @@ -34,6 +34,7 @@ export class StaffNavComponent implements OnInit, OnDestroy { mfaAllowed: boolean; showAngularCirc = false; maxRecentPatrons = 1; + disable_links_newtabs = false; // Menu toggle isMenuCollapsed = true; @@ -97,6 +98,12 @@ export class StaffNavComponent implements OnInit, OnDestroy { .then(settings => this.maxRecentPatrons = settings['ui.staff.max_recent_patrons'] ?? 1); + this.org.settings('ui.staff.disable_links_newtabs') + .then(settings => { + this.disable_links_newtabs = Boolean(settings['ui.staff.disable_links_newtabs']) ?? false; + this.setNewTabsPref(this.disable_links_newtabs); + }); + const darkModePreference = window.matchMedia('(prefers-color-scheme: dark)'); darkModePreference.addEventListener('change', () => { // Don't change color mode while printing @@ -176,6 +183,17 @@ export class StaffNavComponent implements OnInit, OnDestroy { this.setColorMode(); } + setNewTabsPref(disable_links_newtabs: boolean) { + // classname used in app.component.ts to dynamically remove target attributes + const staffContainer = document.getElementById('staff-content-container'); + if (disable_links_newtabs) { + staffContainer.classList.add('user-pref-no-new-tabs'); + } + else { + staffContainer.classList.remove('user-pref-no-new-tabs'); + } + } + setLocale(locale: any) { this.locale.setLocale(locale.code()); } diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index 9939428866..beefdd0cd9 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -25041,3 +25041,17 @@ VALUES ( 'string' ); +INSERT into config.workstation_setting_type + (name, grp, label, description, datatype) +VALUES ( + 'ui.staff.disable_links_newtabs', + 'gui', + oils_i18n_gettext('ui.staff.disable_links_newtabs', + 'Staff Client: no new tabs', + 'coust', 'label'), + oils_i18n_gettext('ui.staff.disable_links_newtabs', + 'Prevents links in the staff interface from opening in new tabs or windows.', + 'coust', 'description'), + 'bool' +); + diff --git a/Open-ILS/src/sql/Pg/upgrade/YYYY.data.ws-setting-no-newtabs.sql b/Open-ILS/src/sql/Pg/upgrade/YYYY.data.ws-setting-no-newtabs.sql new file mode 100644 index 0000000000..e62f8e2485 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/YYYY.data.ws-setting-no-newtabs.sql @@ -0,0 +1,19 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('YYYY', :eg_version); + +INSERT into config.workstation_setting_type + (name, grp, label, description, datatype) +VALUES ( + 'ui.staff.disable_links_newtabs', + 'gui', + oils_i18n_gettext('ui.staff.disable_links_newtabs', + 'Staff Client: no new tabs', + 'coust', 'label'), + oils_i18n_gettext('ui.staff.disable_links_newtabs', + 'Prevents links in the staff interface from opening in new tabs or windows.', + 'coust', 'description'), + 'bool' +); + +COMMIT; diff --git a/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js b/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js index d85c87d19f..6b8aeeaa42 100644 --- a/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js +++ b/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js @@ -184,7 +184,7 @@ function($scope , $window , $location , egCore , egConfirmDialog) { $scope.grid_density = val; }); - egCore.hatch.getItem('eg.admin.disable_links_newtabs').then(function(val) { + egCore.hatch.getItem('ui.staff.disable_links_newtabs').then(function(val) { $scope.disable_links_newtabs = val; }); @@ -239,9 +239,9 @@ function($scope , $window , $location , egCore , egConfirmDialog) { $scope.apply_disable_links_newtabs = function() { if ($scope.disable_links_newtabs) { - egCore.hatch.setItem('eg.admin.disable_links_newtabs', true); + egCore.hatch.setItem('ui.staff.disable_links_newtabs', true); } else { - egCore.hatch.removeItem('eg.admin.disable_links_newtabs'); + egCore.hatch.removeItem('ui.staff.disable_links_newtabs'); } } commit b67a5ce2fe5655e121b89ae2fb333bfeedd021fd Author: Stephanie Leary <stephanie.leary@equinoxoli.org> Date: Wed Sep 25 19:36:15 2024 +0000 LP2015351 Staff portal entry links in new tabs Adds a checkbox to allow staff portal entry links to open in new tabs. Enforces an ARIA description that informs the user that links will be opening in a new tab, unless the link already has an ARIA description. Includes styling to add a small box/arrow icon to links that open in new tabs. Release-note: Allows staff portal entry links to open new tabs; styling for links that open in new tabs Signed-off-by: Stephanie Leary <stephanie.leary@equinoxoli.org> Signed-off-by: Gina Monti <gmonti@biblio.org> Signed-off-by: Mike Rylander <mrylander@gmail.com> diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index c1ed452927..8e4f4a3206 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -14382,6 +14382,7 @@ SELECT usr, <field name="label" reporter:label="Entry Label" reporter:datatype="text"/> <field name="image_url" reporter:label="Entry Image URL" reporter:datatype="text"/> <field name="target_url" reporter:label="Entry Target URL" reporter:datatype="text"/> + <field name="url_newtab" reporter:label="URL Opens in New Tab" reporter:datatype="bool"/> <field name="entry_text" reporter:label="Entry Text" reporter:datatype="text"/> <field name="owner" reporter:label="Owner" reporter:datatype="link" oils_obj:required="true"/> </fields> diff --git a/Open-ILS/src/eg2/src/app/app.component.ts b/Open-ILS/src/eg2/src/app/app.component.ts index b7715a8627..e98d3b8031 100644 --- a/Open-ILS/src/eg2/src/app/app.component.ts +++ b/Open-ILS/src/eg2/src/app/app.component.ts @@ -1,4 +1,4 @@ -import {Component} from '@angular/core'; +import {Component, AfterViewChecked} from '@angular/core'; import {Router, NavigationEnd} from '@angular/router'; import {DialogComponent} from '@eg/share/dialog/dialog.component'; @@ -7,7 +7,7 @@ import {DialogComponent} from '@eg/share/dialog/dialog.component'; template: '<router-outlet></router-outlet>' }) -export class BaseComponent { +export class BaseComponent implements AfterViewChecked { constructor(private router: Router) { this.router.events.subscribe(routeEvent => { @@ -18,6 +18,13 @@ export class BaseComponent { }); } + ngAfterViewChecked(): void { + document.querySelectorAll('a[target="_blank"]').forEach((a) => { + if (!a.getAttribute('aria-describedby')) { + a.setAttribute('aria-describedby', 'link-opens-newtab'); + } + }); + } } diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/staff_portal_page/staff-portal-page.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/local/staff_portal_page/staff-portal-page.component.ts index f0dd16c197..58befbe031 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/local/staff_portal_page/staff-portal-page.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/local/staff_portal_page/staff-portal-page.component.ts @@ -25,7 +25,7 @@ import {merge, Observable, EMPTY} from 'rxjs'; export class AdminStaffPortalPageComponent extends AdminPageComponent implements OnInit { idlClass = 'cusppe'; - fieldOrder = 'label,entry_type,target_url,entry_text,image_url,page_col,col_pos,owner,id'; + fieldOrder = 'label,entry_type,target_url,url_newtab,entry_text,image_url,page_col,col_pos,owner,id'; classLabel: string; refreshSelected: (idlThings: IdlObject[]) => void; diff --git a/Open-ILS/src/eg2/src/app/staff/splash.component.css b/Open-ILS/src/eg2/src/app/staff/splash.component.css index e5951c68e6..ea8b4de111 100644 --- a/Open-ILS/src/eg2/src/app/staff/splash.component.css +++ b/Open-ILS/src/eg2/src/app/staff/splash.component.css @@ -17,6 +17,7 @@ .card { background-color: var(--bs-card-bg); border-color: light-dark(var(--border), var(--splash-card-header-border)); + margin-block-end: 2rem; } .card-body, .card-body .list-group-item { diff --git a/Open-ILS/src/eg2/src/app/staff/splash.component.html b/Open-ILS/src/eg2/src/app/staff/splash.component.html index 929ee80f49..30fc9bb314 100644 --- a/Open-ILS/src/eg2/src/app/staff/splash.component.html +++ b/Open-ILS/src/eg2/src/app/staff/splash.component.html @@ -39,7 +39,7 @@ <div class="list-group"> <ng-container *ngFor="let entry of portalEntries[i]"> <div class="list-group-item border-0 p-2" *ngIf="entry.entry_type() === 'menuitem'"> - <a href="{{entry.target_url()}}" i18n> + <a href="{{entry.target_url()}}" [target]="entry.url_newtab() ? '_blank' : null" i18n> <img src="{{entry.image_url()}}" alt="" role="presentation"/> {{entry.label()}} </a> @@ -62,7 +62,7 @@ </div> </div> <div class="list-group-item border-0 p-2" *ngIf="entry.entry_type() === 'link'"> - <a target="_top" href="{{entry.target_url()}}" i18n> + <a [target]="entry.url_newtab() ? '_blank' : '_top'" href="{{entry.target_url()}}" i18n> <img src="{{entry.image_url()}}" alt="" role="presentation"/> {{entry.label()}} </a> diff --git a/Open-ILS/src/eg2/src/app/staff/staff.component.html b/Open-ILS/src/eg2/src/app/staff/staff.component.html index 767f514353..03866dac8e 100644 --- a/Open-ILS/src/eg2/src/app/staff/staff.component.html +++ b/Open-ILS/src/eg2/src/app/staff/staff.component.html @@ -19,6 +19,9 @@ (click)="fireContextMenuEvent()">Display Context Menu </button> +<!-- global notice of opening in new tab for links' aria-describedby --> +<span id="link-opens-newtab" class="visually-hidden" i18n>Opens in new tab</span> + <!-- global toast alerts --> <eg-toast></eg-toast> diff --git a/Open-ILS/src/eg2/src/styles.css b/Open-ILS/src/eg2/src/styles.css index 377a76bd59..7bc9e65b4e 100644 --- a/Open-ILS/src/eg2/src/styles.css +++ b/Open-ILS/src/eg2/src/styles.css @@ -123,6 +123,13 @@ a:not(.alert-link):is(:hover, :focus, :focus-visible), filter: brightness(1.1); } +a[target="_blank"]:after { + display: inline; + content: "\e89e"; + font-family: "Material Icons"; + line-height: inherit; +} + /** BS has flex utility classes, but none for specifying flex widths. * BS class="col" is roughly equivelent to flex-1, but col-2 is not * equivalent to flex-2, since col-2 really means 2/12 width. */ diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index a1cb7926e2..ded4f9a771 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -1415,6 +1415,7 @@ CREATE TABLE config.ui_staff_portal_page_entry ( label TEXT, image_url TEXT, target_url TEXT, + url_newtab BOOLEAN, entry_text TEXT, owner INT NOT NULL -- REFERENCES actor.org_unit (id) ); diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index d0cf92515d..9939428866 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -22559,20 +22559,20 @@ VALUES ('catalogsearch', oils_i18n_gettext('catalogsearch', 'Catalog Search Box', 'cusppet', 'label')); INSERT INTO config.ui_staff_portal_page_entry - (id, page_col, col_pos, entry_type, label, image_url, target_url, owner) + (id, page_col, col_pos, entry_type, label, image_url, target_url, url_newtab, owner) VALUES - ( 1, 1, 0, 'header', oils_i18n_gettext( 1, 'Circulation and Patrons', 'cusppe', 'label'), NULL, NULL, 1) -, ( 2, 1, 1, 'menuitem', oils_i18n_gettext( 2, 'Check Out Items', 'cusppe', 'label'), '/images/portal/forward.png', '/eg/staff/circ/patron/bcsearch', 1) -, ( 3, 1, 2, 'menuitem', oils_i18n_gettext( 3, 'Check In Items', 'cusppe', 'label'), '/images/portal/back.png', '/eg/staff/circ/checkin/index', 1) -, ( 4, 1, 3, 'menuitem', oils_i18n_gettext( 4, 'Search For Patron By Name', 'cusppe', 'label'), '/images/portal/retreivepatron.png', '/eg/staff/circ/patron/search', 1) -, ( 5, 2, 0, 'header', oils_i18n_gettext( 5, 'Item Search and Cataloging', 'cusppe', 'label'), NULL, NULL, 1) -, ( 6, 2, 1, 'catalogsearch', oils_i18n_gettext( 6, 'Search Catalog', 'cusppe', 'label'), NULL, NULL, 1) -, ( 7, 2, 2, 'menuitem', oils_i18n_gettext( 7, 'Record Buckets', 'cusppe', 'label'), '/images/portal/bucket.png', '/eg2/staff/cat/bucket/record/', 1) -, ( 8, 2, 3, 'menuitem', oils_i18n_gettext( 8, 'Item Buckets', 'cusppe', 'label'), '/images/portal/bucket.png', '/eg/staff/cat/bucket/copy/', 1) -, ( 9, 3, 0, 'header', oils_i18n_gettext( 9, 'Administration', 'cusppe', 'label'), NULL, NULL, 1) -, (10, 3, 1, 'link', oils_i18n_gettext(10, 'Evergreen Documentation', 'cusppe', 'label'), '/images/portal/helpdesk.png', 'https://docs.evergreen-ils.org', 1) -, (11, 3, 2, 'menuitem', oils_i18n_gettext(11, 'Workstation Administration', 'cusppe', 'label'), '/images/portal/helpdesk.png', '/eg/staff/admin/workstation/index', 1) -, (12, 3, 3, 'menuitem', oils_i18n_gettext(12, 'Reports', 'cusppe', 'label'), '/images/portal/reports.png', '/eg2/staff/reporter/full', 1) + ( 1, 1, 0, 'header', oils_i18n_gettext( 1, 'Circulation and Patrons', 'cusppe', 'label'), NULL, NULL, NULL, 1) +, ( 2, 1, 1, 'menuitem', oils_i18n_gettext( 2, 'Check Out Items', 'cusppe', 'label'), '/images/portal/forward.png', '/eg/staff/circ/patron/bcsearch', NULL, 1) +, ( 3, 1, 2, 'menuitem', oils_i18n_gettext( 3, 'Check In Items', 'cusppe', 'label'), '/images/portal/back.png', '/eg/staff/circ/checkin/index', NULL, 1) +, ( 4, 1, 3, 'menuitem', oils_i18n_gettext( 4, 'Search For Patron By Name', 'cusppe', 'label'), '/images/portal/retreivepatron.png', '/eg/staff/circ/patron/search', NULL, 1) +, ( 5, 2, 0, 'header', oils_i18n_gettext( 5, 'Item Search and Cataloging', 'cusppe', 'label'), NULL, NULL, NULL, 1) +, ( 6, 2, 1, 'catalogsearch', oils_i18n_gettext( 6, 'Search Catalog', 'cusppe', 'label'), NULL, NULL, NULL, 1) +, ( 7, 2, 2, 'menuitem', oils_i18n_gettext( 7, 'Record Buckets', 'cusppe', 'label'), '/images/portal/bucket.png', '/eg/staff/cat/bucket/record/', NULL, 1) +, ( 8, 2, 3, 'menuitem', oils_i18n_gettext( 8, 'Item Buckets', 'cusppe', 'label'), '/images/portal/bucket.png', '/eg/staff/cat/bucket/copy/', NULL, 1) +, ( 9, 3, 0, 'header', oils_i18n_gettext( 9, 'Administration', 'cusppe', 'label'), NULL, NULL, NULL, 1) +, (10, 3, 1, 'link', oils_i18n_gettext(10, 'Evergreen Documentation', 'cusppe', 'label'), '/images/portal/helpdesk.png', 'https://docs.evergreen-ils.org', TRUE, 1) +, (11, 3, 2, 'menuitem', oils_i18n_gettext(11, 'Workstation Administration', 'cusppe', 'label'), '/images/portal/helpdesk.png', '/eg/staff/admin/workstation/index', NULL, 1) +, (12, 3, 3, 'menuitem', oils_i18n_gettext(12, 'Reports', 'cusppe', 'label'), '/images/portal/reports.png', '/eg2/staff/reporter/full', NULL, 1) ; SELECT setval('config.ui_staff_portal_page_entry_id_seq', 100); diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.staff-portal-urls-newtab.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.staff-portal-urls-newtab.sql new file mode 100644 index 0000000000..d5c3da47d3 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.staff-portal-urls-newtab.sql @@ -0,0 +1,8 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); + +ALTER TABLE config.ui_staff_portal_page_entry +ADD COLUMN url_newtab boolean; + +COMMIT; diff --git a/Open-ILS/src/templates/staff/admin/workstation/t_splash.tt2 b/Open-ILS/src/templates/staff/admin/workstation/t_splash.tt2 index cc4849101b..c3bc35972f 100644 --- a/Open-ILS/src/templates/staff/admin/workstation/t_splash.tt2 +++ b/Open-ILS/src/templates/staff/admin/workstation/t_splash.tt2 @@ -1,4 +1,4 @@ - +[% # See Open-ILS/web/js/ui/default/staff/admin/workstation/app.js for settings %] <div class="container admin-splash-container"> <div class="row"> @@ -73,6 +73,19 @@ </div> </div> + <div class="row new-entry"> + <div class="col-md-12"> + <div class="checkbox"> + <label> + <input type="checkbox" ng-model="disable_links_newtabs" + ng-change="apply_disable_links_newtabs()"> + [% l('Prevent links from opening in new tabs?') %] + </label> + </div> + <p>[% l('Some links open in new tabs or windows. Screen reader users might want to select this option to force all links to open in the same window.') %]</p> + </div> + </div> + <div class="row new-entry"> <div class="col-md-12"> <div class="checkbox"> diff --git a/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js b/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js index 3d8ed587b7..d85c87d19f 100644 --- a/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js +++ b/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js @@ -184,6 +184,10 @@ function($scope , $window , $location , egCore , egConfirmDialog) { $scope.grid_density = val; }); + egCore.hatch.getItem('eg.admin.disable_links_newtabs').then(function(val) { + $scope.disable_links_newtabs = val; + }); + egCore.hatch.getItem('eg.search.search_lib').then(function(val) { $scope.search_lib = egCore.org.get(val); }); @@ -233,6 +237,14 @@ function($scope , $window , $location , egCore , egConfirmDialog) { console.log("New density: ", $scope.grid_density); } + $scope.apply_disable_links_newtabs = function() { + if ($scope.disable_links_newtabs) { + egCore.hatch.setItem('eg.admin.disable_links_newtabs', true); + } else { + egCore.hatch.removeItem('eg.admin.disable_links_newtabs'); + } + } + $scope.test_audio = function(sound) { egCore.audio.play(sound); } ----------------------------------------------------------------------- Summary of changes: Open-ILS/examples/fm_IDL.xml | 1 + Open-ILS/src/eg2/src/app/app.component.ts | 14 ++++++-- .../staff-portal-page.component.ts | 2 +- Open-ILS/src/eg2/src/app/staff/nav.component.ts | 18 ++++++++++ .../src/eg2/src/app/staff/splash.component.css | 1 + .../src/eg2/src/app/staff/splash.component.html | 4 +-- .../src/eg2/src/app/staff/staff.component.html | 3 ++ Open-ILS/src/eg2/src/styles.css | 7 ++++ Open-ILS/src/sql/Pg/002.schema.config.sql | 3 +- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 40 +++++++++++++++------- .../1465.schema.staff-portal-urls-newtab.sql | 8 +++++ .../Pg/upgrade/1466.data.ws-setting-no-newtabs.sql | 19 ++++++++++ .../templates/staff/admin/workstation/t_splash.tt2 | 15 +++++++- .../js/ui/default/staff/admin/workstation/app.js | 12 +++++++ 14 files changed, 127 insertions(+), 20 deletions(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/1465.schema.staff-portal-urls-newtab.sql create mode 100644 Open-ILS/src/sql/Pg/upgrade/1466.data.ws-setting-no-newtabs.sql hooks/post-receive -- Evergreen ILS
participants (1)
-
Git User