Commit 777fcf9e authored by ninabreznik's avatar ninabreznik

Remove doubbled register and move cb outside of register function

parent 22cb31f9
......@@ -11,18 +11,15 @@ function tabbedMenu (compiler, loadingSpinner, self) {
// initialize tabbed menu
selectTab($('#options .envView'))
function cb (finish) {
compiler.event.register('compilerLoaded', finish)
}
// add event listeners for loading spinner
// compiler.event.register('compilationStarted', function compilationStarted () {
compiler.event.register('loadingCompiler', function compilationStarted () {
var contractTab = document.querySelector('.envView')
if (!contractTab.children.length) {
contractTab.appendChild(loadingSpinner(function cb (finish) {
// compiler.event.register('compilationFinished', function () {
compiler.event.register('compilerLoaded', finish)
}))
contractTab.appendChild(loadingSpinner(cb))
}
})
compiler.event.register('loadingCompiler', function loadingCompiler () {
var settingsTab = document.querySelector('.settingsView')
if (!settingsTab.children.length) {
settingsTab.appendChild(loadingSpinner(function cb (finish) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment