@@ -24,7 +24,7 @@ function GraphConfigurationDialog(dialog, onSave) {
24
24
* Render the element for the "pick a field" dropdown box. Provide "field" from the config in order to set up the
25
25
* initial selection.
26
26
*/
27
- function renderField ( flightLog , field ) {
27
+ function renderField ( field ) {
28
28
var
29
29
elem = $ (
30
30
'<li class="config-graph-field">'
@@ -43,7 +43,7 @@ function GraphConfigurationDialog(dialog, onSave) {
43
43
return elem ;
44
44
}
45
45
46
- function renderGraph ( flightLog , index , graph ) {
46
+ function renderGraph ( index , graph ) {
47
47
var
48
48
graphElem = $ (
49
49
'<li class="config-graph">'
@@ -75,14 +75,14 @@ function GraphConfigurationDialog(dialog, onSave) {
75
75
76
76
// "Add field" button
77
77
$ ( "button" , graphElem ) . click ( function ( e ) {
78
- fieldList . append ( renderField ( flightLog , { } ) ) ;
78
+ fieldList . append ( renderField ( { } ) ) ;
79
79
e . preventDefault ( ) ;
80
80
} ) ;
81
81
82
82
for ( var i = 0 ; i < graph . fields . length ; i ++ ) {
83
83
var
84
84
field = graph . fields [ i ] ,
85
- fieldElem = renderField ( flightLog , field ) ;
85
+ fieldElem = renderField ( field ) ;
86
86
87
87
fieldList . append ( fieldElem ) ;
88
88
}
@@ -104,14 +104,14 @@ function GraphConfigurationDialog(dialog, onSave) {
104
104
return graphElem ;
105
105
}
106
106
107
- function renderGraphs ( flightLog , graphs ) {
107
+ function renderGraphs ( graphs ) {
108
108
var
109
109
graphList = $ ( ".config-graphs-list" , dialog ) ;
110
110
111
111
graphList . empty ( ) ;
112
112
113
113
for ( var i = 0 ; i < graphs . length ; i ++ ) {
114
- graphList . append ( renderGraph ( flightLog , i , graphs [ i ] ) ) ;
114
+ graphList . append ( renderGraph ( i , graphs [ i ] ) ) ;
115
115
}
116
116
}
117
117
@@ -236,7 +236,7 @@ function GraphConfigurationDialog(dialog, onSave) {
236
236
buildOfferedFieldNamesList ( flightLog , config ) ;
237
237
238
238
populateExampleGraphs ( flightLog , exampleGraphsMenu ) ;
239
- renderGraphs ( flightLog , config ) ;
239
+ renderGraphs ( config ) ;
240
240
}
241
241
242
242
$ ( ".graph-configuration-dialog-save" ) . click ( function ( e ) {
@@ -252,7 +252,7 @@ function GraphConfigurationDialog(dialog, onSave) {
252
252
exampleGraphsMenu . on ( "click" , "a" , function ( e ) {
253
253
var
254
254
graph = exampleGraphs [ $ ( this ) . data ( "graphIndex" ) ] ,
255
- graphElem = renderGraph ( flightLog , $ ( ".config-graph" , dialog ) . length , graph ) ;
255
+ graphElem = renderGraph ( $ ( ".config-graph" , dialog ) . length , graph ) ;
256
256
257
257
$ ( ".config-graphs-list" , dialog ) . append ( graphElem ) ;
258
258
0 commit comments