1
- import { FireWhen } from "./helpers/FireWhen" ;
1
+ import { FireWhen } from ".. /helpers/FireWhen" ;
2
2
3
- export function peopleDirectoryWidget_helper ( ) {
4
- var PushPeopleContainerUnderTab = function ( ) {
3
+ export function peopleDirectoryWidget_callbacks ( ) {
4
+
5
+ window . tab_html_prepOrgTabs = function ( control , properties ) {
5
6
if ( $ ( '.ia-people-results' ) . length == 1 ) {
6
7
$ ( '.ia-people-results' )
7
8
. clone ( true )
@@ -27,13 +28,9 @@ export function peopleDirectoryWidget_helper() {
27
28
}
28
29
} ;
29
30
30
- window . NCITABOrganizationDirectory = function ( control , properties ) {
31
- PushPeopleContainerUnderTab ( ) ;
32
- } ;
33
-
34
31
var NCIDescriptionProcessed = '' ;
35
32
var NCIFlatDepartmentstree = [ ] ;
36
- window . NCIGenericItemPropcallback = function ( prop ) {
33
+ window . genericItem_data_setOrgDescription = function ( prop ) {
37
34
prop . idOrTitle = NCIDescriptionProcessed || '' ;
38
35
var selectedNodes = $ ( '#filtertreenav' ) . jstree ( 'get_selected' ) ;
39
36
if ( selectedNodes . length === 0 || typeof selectedNodes [ 0 ] === 'object' ) {
@@ -50,7 +47,7 @@ export function peopleDirectoryWidget_helper() {
50
47
return prop ;
51
48
} ;
52
49
53
- window . NCIGenericSearchPropcallback = function ( request ) {
50
+ window . genericSearchList_query_setOrgSearch = function ( request ) {
54
51
request . searchTerm = $ ( '.jstree-clicked' ) . text ( ) ;
55
52
request . defaultQueryText = `* (SPSiteURL:${
56
53
Akumina . Digispace . SiteContext . SiteAbsoluteUrl
@@ -62,7 +59,7 @@ export function peopleDirectoryWidget_helper() {
62
59
return request . defaultQueryText ;
63
60
} ;
64
61
65
- window . OrganizationDirectorySearchResultsCallBack = function ( data ) {
62
+ window . genericSearchList_data_searchOrgs = function ( data ) {
66
63
data . SearchTerm =
67
64
$ ( '.jstree-clicked' ) . length > 0 ? $ ( '.jstree-clicked' ) . text ( ) : '' ;
68
65
return data ;
@@ -71,7 +68,7 @@ export function peopleDirectoryWidget_helper() {
71
68
var NCITreeNavSelected = '' ;
72
69
73
70
//OrganizationDirectoryPage
74
- window . LoadOrganizationDirectoryTreeFilter = function ( ) {
71
+ window . peopleDirectory_html_loadOrgs = function ( ) {
75
72
var organizationtermsetid =
76
73
_configContextInfo . hasOwnProperty ( 'organizationdirectorytermsetid' ) &&
77
74
! Akumina . AddIn . Utilities . IsNullOrEmpty (
@@ -280,7 +277,7 @@ export function peopleDirectoryWidget_helper() {
280
277
) ;
281
278
} ;
282
279
//OrganizationDirectoryPage
283
- window . NCIDirectoryOrgCallBackUI = function ( ) {
280
+ window . peopleDirectory_ui_addOrgDirTabs = function ( ) {
284
281
FireWhen (
285
282
'AddTabsUnderOrgWidget' ,
286
283
function ( ) {
@@ -294,67 +291,69 @@ export function peopleDirectoryWidget_helper() {
294
291
$ ( '#organizationdirectorytabwidget' )
295
292
) ;
296
293
$ ( '.ia-tab-widget-container' ) . show ( ) ;
297
- window . NCITABOrganizationDirectory ( ) ;
294
+ window . tab_html_prepOrgTabs ( ) ;
298
295
} ,
299
296
200
300
297
) ;
301
298
} ;
302
299
303
- FireWhen (
304
- 'LoadTabWidget' ,
305
- function ( ) {
306
- return (
307
- $ ( '.ia-people-results' ) . length > 0 &&
308
- $ ( '#ak-tabwidget-tabs-PeopleTab' ) . length > 0
309
- ) ;
310
- } ,
311
- function ( ) {
312
- $ ( '.ui-tabs-anchor' ) . bind ( 'click' , function ( ) {
313
- var tabDescription = $ ( this ) . text ( ) . trim ( ) ;
314
- switch ( tabDescription ) {
315
- case 'People' :
316
- // Call this function to simulate the click
317
- //Akumina.Digispace.AppPart.Eventing.Publish("/peopledirectory/search/", "facets");
318
- var lastProcessed = $ ( this ) . attr ( 'loaded' ) || '' ;
319
- if (
320
- lastProcessed == '' ||
321
- NCIDescriptionProcessed != lastProcessed
322
- ) {
323
- $ ( this ) . attr ( 'loaded' , NCIDescriptionProcessed ) ;
324
- FireWhen (
325
- 'PeopleTabReady' ,
326
- function ( ) {
327
- return $ ( '#ak-tabwidget-tabs-PeopleTab' ) . hasClass (
328
- 'ia-tab-active-link'
329
- ) ;
330
- } ,
331
- function ( ) {
332
- simulateClickOnSelectedNode ( ) ;
333
- } ,
334
- 200
300
+ window . peopleDirectory_html_loadTabs = function ( ) {
301
+ FireWhen (
302
+ 'LoadTabWidget' ,
303
+ function ( ) {
304
+ return (
305
+ $ ( '.ia-people-results' ) . length > 0 &&
306
+ $ ( '#ak-tabwidget-tabs-PeopleTab' ) . length > 0
307
+ ) ;
308
+ } ,
309
+ function ( ) {
310
+ $ ( '.ui-tabs-anchor' ) . bind ( 'click' , function ( ) {
311
+ var tabDescription = $ ( this ) . text ( ) . trim ( ) ;
312
+ switch ( tabDescription ) {
313
+ case 'People' :
314
+ // Call this function to simulate the click
315
+ //Akumina.Digispace.AppPart.Eventing.Publish("/peopledirectory/search/", "facets");
316
+ var lastProcessed = $ ( this ) . attr ( 'loaded' ) || '' ;
317
+ if (
318
+ lastProcessed == '' ||
319
+ NCIDescriptionProcessed != lastProcessed
320
+ ) {
321
+ $ ( this ) . attr ( 'loaded' , NCIDescriptionProcessed ) ;
322
+ FireWhen (
323
+ 'PeopleTabReady' ,
324
+ function ( ) {
325
+ return $ ( '#ak-tabwidget-tabs-PeopleTab' ) . hasClass (
326
+ 'ia-tab-active-link'
327
+ ) ;
328
+ } ,
329
+ function ( ) {
330
+ simulateClickOnSelectedNode ( ) ;
331
+ } ,
332
+ 200
333
+ ) ;
334
+ }
335
+ break ;
336
+ case 'Content' :
337
+ var id = $ ( '.ak-tabwidget-tabs-container li:first' ) . attr (
338
+ 'aria-controls'
335
339
) ;
336
- }
337
- break ;
338
- case 'Content' :
339
- var id = $ ( '.ak-tabwidget-tabs-container li:first' ) . attr (
340
- 'aria-controls'
341
- ) ;
342
- Akumina . Digispace . AppPart . Eventing . Publish (
343
- '/genericsearchlist/search/' ,
344
- { term : `${ NCITreeNavSelected } ` }
345
- ) ;
346
- break ;
347
- case 'Overview' :
348
- var id = $ ( '.ak-tabwidget-tabs-container li:first' ) . attr (
349
- 'aria-controls'
350
- ) ;
351
- RenderChildWidgets ( `#${ id } ` ) ;
352
- break ;
353
- }
354
- } ) ;
355
- } ,
356
- 200
357
- ) ;
340
+ Akumina . Digispace . AppPart . Eventing . Publish (
341
+ '/genericsearchlist/search/' ,
342
+ { term : `${ NCITreeNavSelected } ` }
343
+ ) ;
344
+ break ;
345
+ case 'Overview' :
346
+ var id = $ ( '.ak-tabwidget-tabs-container li:first' ) . attr (
347
+ 'aria-controls'
348
+ ) ;
349
+ RenderChildWidgets ( `#${ id } ` ) ;
350
+ break ;
351
+ }
352
+ } ) ;
353
+ } ,
354
+ 200
355
+ ) ;
356
+ }
358
357
359
358
// Simulate click on the current folder selected
360
359
function simulateClickOnSelectedNode ( ) {
0 commit comments