                 @template = template
             else
                 template = Handlebars.compile $('#progressbar-template').html()
+            @timeout = null
 
         # The render function takes a number of arguments:
         #   - current_value: current value of the operation or status being monitored

                    finished: true
                    percent_complete: 100


                setTimeout =>
                    @stage = 'none'
                    @render current_value, max_value, {}
                , 2000
            
            @.$el.html @template data


       
        skip_to_processing: =>
            @stage = 'processing'
            if @timeout? # If there is a timeout, we have to clear it, we are not done yet
                clearTimeout @timeout
                @timeout = null
        set_none_state: =>
            @stage = 'none'
