Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
refactor 6.2: fix jshint issues related to objects on the global scope
- Loading branch information
Showing
with
40 additions
and 39 deletions.
- +7 −5 app/app.js
- +3 −3 app/home-control.js
- +1 −2 app/index.html
- +10 −10 app/location-control.js
- +14 −14 app/movie-control.js
- +5 −5 app/search-control.js
@@ -1,20 +1,22 @@ | ||
'use strict'; | ||
|
||
function initialize() { | ||
var map; | ||
|
||
window.initialize = function() { | ||
var mapDiv = document.getElementById('map-canvas'); | ||
map = new MapService(window.google, mapDiv); | ||
map = new window.MapService(window.google, mapDiv); | ||
|
||
var searchControlDiv = document.createElement('div'); | ||
searchControlDiv.id = 'top'; | ||
searchControlDiv.className = 'top'; | ||
|
||
new SearchControl(searchControlDiv); | ||
new window.SearchControl(searchControlDiv); | ||
map.addView(searchControlDiv, 'TOP_LEFT'); | ||
|
||
var homeControlDiv = document.createElement('div'); | ||
homeControlDiv.id = 'bottom_panel'; | ||
homeControlDiv.className = 'bottom_panel'; | ||
|
||
new HomeControl(homeControlDiv); | ||
new window.HomeControl(homeControlDiv); | ||
map.addView(homeControlDiv, 'BOTTOM_CENTER'); | ||
} | ||
}; |
@@ -1,9 +1,9 @@ | ||
'use strict'; | ||
|
||
function HomeControl(controlDiv, map) { | ||
window.HomeControl = function(controlDiv) { | ||
var dashBoard = document.createElement('div'); | ||
dashBoard.innerHTML = templates.home(); | ||
dashBoard.innerHTML = window.templates.home(); | ||
dashBoard.id = 'dashboard'; | ||
dashBoard.className = 'dashboard'; | ||
controlDiv.appendChild(dashBoard); | ||
} | ||
}; |