new require("examsView")() → {function}
Exams widget class
- Source:
- See:
Requires:
- module:defaultView
- module:examsModel
- module:text!templates/examsTpl
- module:underscore
- module:utils
- module:examsAvgChartView
- module:examsSubjectChartView
- module:examsSubjectYearChartView
- module:examsAvgYearView
Returns:
Backbone.View constructor
- Type
- function
- Source:
Extends
Members
-
mode :Object
-
Current widget mode
Type:
- Object
- Source:
Example
{ subject: "avg", year: "yearSlice" } -
ModelConstructor
-
Exams (EGE) model class
-
name :String
-
Exams template id (need for caching)
Type:
- String
- Source:
-
template :String
-
Raw handlebars template
Type:
- String
- Source:
-
title :String
-
Default exams widget title
Type:
- String
- Source:
Methods
-
afterRender()
-
Menu event bindings
- Source:
- See:
-
getRelatedView()
-
Gets related view by widget mode
- Source:
-
onMenuClick()
-
Primary and secondary menu click handler. Switches widget mode by click
- Source:
-
renderData()
-
Exams charts update & widget menu render
- Source:
-
switchMode(subject, year)
-
Updates model state by selected mode
Parameters:
Name Type Argument Description subjectString | Object <optional>
Subject or {subject:"subject", year: 2000} yearString | Number <optional>
Year in xxxx format - Source: