new Jobs( spa )

Description

Class for handling the base Jobs page.

This particular page requires a lot of careful monitoring. Unlike other pages, this one will destroy and recreate HTML elements, often with the exact same content, every time something interesting happens. Like loading more sections or jobs, or toggling state of a job.

Parameters
Name Type Description
spa NexusHoratio.spa.SPA

SPA instance that manages this Page.

Members


dispatcher :NexusHoratio.base.Dispatcher


id :string

Details
string

logger :NexusHoratio.base.Logger


name :string

Details
string

pathname :RegExp


spa :NexusHoratio.spa.SPA


ctor :module:linkedin-tool~Page

Description

Alias for this.constructor.


scrollerClassName :string

Description

Useful default for CSS class name.


jobs :Scroller

Details
Scroller

sections :Scroller

Details
Scroller

Methods


addService( Klass, ...rest ) → {NexusHoratio.base.Service}

Description
Parameters
Name Type Attributes Description
Klass function

A service class to instantiate. If this is a Page.Service subclass, the page property is also set.

rest object <repeatable>

Arbitrary objects to pass to constructor.

Returns

Instance of Klass.


<private> computePathnameRE( pathname ) → {RegExp}

Description

Turn a path into a RegExp.

Parameters
Name Type Description
pathname string | RegExp

A path to convert.

Returns

A converted path.


<private> waitUntilReady() → {external:Element}

Description

Wait until the page has loaded enough to continue.

Returns

The element matched by #readySelector.


cssClassName( extras ) → {string}

Description

Derive a CSS className from the name of the subclass.

Parameters
Name Type Description
extras Array.<string>

Extract strings to add to the class name.

Returns

A CSS className.


elementsHeightProcessor( elements ) → {NexusHoratio.web.StyleService~StyleProperties}

Description

A useful processor for many LIT pages.

It just sums up height of the matched elements to set a top margin.

Parameters
Name Type Description
elements NexusHoratio.web.StyleService~ElementMap

Elements to examine.

Returns

Style properties for to contribute.


<private> scrollerFinder() → {NexusHoratio.web.StyleService~ElementMap}

Returns

<private> scrollerElementsProcessor( elements ) → {NexusHoratio.web.StyleService~StyleProperties}

Parameters
Name Type Description
elements NexusHoratio.web.StyleService~ElementMap

Elements to examine.

Returns

Style properties for to contribute.


<private> uniqueJobIdentifier( scroller, element ) → {string}

Parameters
Name Type Description
scroller Scroller

The calling Scroller instance.

element external:Element

Element to examine.

Returns

A value unique to this element.

Details

Scroller~uidCallback


<private> uniqueSectionIdentifier( scroller, element ) → {string}

Parameters
Name Type Description
scroller Scroller

The calling Scroller instance.

element external:Element

Element to examine.

Returns

A value unique to this element.

Details

Scroller~uidCallback


<private> returnToSection()

Description

Reselects current section, triggering some actions as initial selection.


<private> onSectionChange()

Description

Updates Jobs specific watcher data and removes the jobs Scroller.


<private> resetScroll( topScroll )

Description

Recover scroll position after elements were recreated.

Parameters
Name Type Description
topScroll number

Where to scroll to.

Events


activate


deactivate