Skip to content

Commit f2cc92c

Browse files
belaolsonNIHjfrank-nih
authored andcommitted
(#143) Update news detail widget JS
* Moved newsDetailWidget.js into callbacks folder and updated imports. * Renamed export function to newsDetailWidget_callbacks * Updated import function in digitalworkplace.custom.js to reflect change * Renamed NCINewsDetailUICallback to newsDetail_ui_prepSlider * Renamed NewsDetailContactCallback to newsDetail_data_addContactInfo * Updated config to reflect changes Closes #143
1 parent 861a61d commit f2cc92c

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

site/src/js/library/digitalworkplace.custom.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { blogDetailWidget_callbacks } from './modules/callbacks/BlogDetailWidget.js';
22
import { employeeDetailWidget_handlebars } from './modules/handlebars/EmployeeDetailWidget.js';
33
import { latestMediaWidget_helper } from './modules/LatestMediaWidget.js';
4-
import { newsDetailWidget_helper } from './modules/NewsDetailWidget.js';
4+
import { newsDetailWidget_callbacks } from './modules/callbacks/NewsDetailWidget.js';
55
import { peopleDirectoryWidget_helper } from './modules/PeopleDirectoryWidget.js';
66

77
// Remove in future
@@ -84,5 +84,5 @@ Akumina.Digispace.AppPart.Eventing.Subscribe(
8484
blogDetailWidget_callbacks();
8585
employeeDetailWidget_handlebars();
8686
latestMediaWidget_helper();
87-
newsDetailWidget_helper();
87+
newsDetailWidget_callbacks();
8888
peopleDirectoryWidget_helper();

site/src/js/library/modules/NewsDetailWidget.js renamed to site/src/js/library/modules/callbacks/NewsDetailWidget.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
export function newsDetailWidget_helper() {
1+
export function newsDetailWidget_callbacks() {
22
// Rename in future
33
// NewsDetailWidget_ui
4-
window.NCINewsDetailUICallback = function (widget, props) {
4+
window.newsDetail_ui_prepSlider = function (widget, props) {
55
var profInfo1 = $('#profInfoLink1');
66
var profInfo2 = $('#profInfoLink2');
77
var profPhoto1 = $('#profPhotoLink2');
@@ -19,7 +19,7 @@ export function newsDetailWidget_helper() {
1919

2020
// Rename in future
2121
// NewsDetailWidget_data
22-
window.NewsDetailContactCallback = function (data) {
22+
window.newsDetail_data_addContactInfo = function (data) {
2323
var profInfo1 = $('#profInfoLink1');
2424
var profInfo2 = $('#profInfoLink2');
2525
var profPhoto1 = $('#profPhotoLink2');

site/src/js/widgets/NewsDetailWidget/config/config.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@
6666
},
6767
{
6868
"name": "callbackmethod",
69-
"value": "NewsDetailContactCallback"
69+
"value": "newsDetail_data_addContactInfo"
7070
},
7171
{
7272
"name": "uicallbackmethod",
73-
"value": "NCINewsDetailUICallback"
73+
"value": "newsDetail_ui_prepSlider"
7474
},
7575
{
7676
"name": "usereactionslegacyview",

0 commit comments

Comments
 (0)