Module: feedback_js

Methods

(inner) clickFeedback(target) → {void}

Handler for click on feedback (like or rating)
Parameters:
Name Type Description
target EventTarget The target
Source:
Returns:
Type
void

(inner) createLike(like, stickerType) → {HTMLElement}

Creates the hate/love elements
Parameters:
Name Type Description
like number like value 0 - 2
stickerType string MPD sticker type
Source:
Returns:
div element
Type
HTMLElement

(inner) createStarRating(rating, stickerType) → {HTMLElement}

Creates a button group for star rating
Parameters:
Name Type Description
rating number the rating (0-10)
stickerType string MPD sticker type
Source:
Returns:
div element
Type
HTMLElement

(inner) setFeedback(el, like, rating) → {void}

Sets the current feedback
Parameters:
Name Type Description
el Element Feedback element group
like number Like feedback value
rating number Star rating feedback value
Source:
Returns:
Type
void

(inner) setFeedbacktype(el, stickerType) → {void}

Sets the feedback mode buttons
Parameters:
Name Type Description
el Element Element
stickerType string MPD sticker type
Source:
Returns:
Type
void

(inner) setFeedbacktypeId(id, stickerType) → {void}

Sets the feedback mode buttons
Parameters:
Name Type Description
id string Element id
stickerType string MPD sticker type
Source:
Returns:
Type
void

(inner) setLike(el, vote) → {void}

Sets the vote button group
Parameters:
Name Type Description
el HTMLElement | Element container for the thumbs
vote number The vote
Source:
Returns:
Type
void

(inner) setRating(el, rating) → {void}

Sets the star rating element
Parameters:
Name Type Description
el HTMLElement | Element container for the stars
rating number the rating (0-10)
Source:
Returns:
Type
void

(inner) showStarRating(rating) → {HTMLElement}

Shows the stars rating
Parameters:
Name Type Description
rating number the rating (0-10)
Source:
Returns:
div element
Type
HTMLElement

(inner) voteLike(el) → {void}

Love/hate event handler
Parameters:
Name Type Description
el EventTarget triggering element
Source:
Returns:
Type
void

(inner) voteRating(el) → {void}

Rating event handler
Parameters:
Name Type Description
el EventTarget triggering element
Source:
Returns:
Type
void