﻿QuickSpotController.prototype.View = null;
QuickSpotController.prototype.Model = null;
QuickSpotController.prototype.categorySelectedHandler = function(categoryId, zoneId)
{
    if( categoryId != null && zoneId != null && this.View != null )
    {
        if( categoryId > 0 && zoneId > 0 && 
            (categoryId != this.Model.CurrentCategoryId ||
             zoneId != this.Model.CurrentZoneId) )
        {
            this.View.setCurrentCategory(categoryId, zoneId);
        }
    }
}
QuickSpotController.prototype.init = function()
{
    if( this.View == null ) return;
    if( this.Model == null ) return;
    
    this.View.initView(this.Model);
}
function QuickSpotController(view, model)
{
    window.QuickSpotView = view;
    this.View = view;
    this.Model = model;
    this.View.CategorySelectedHandler = this;
}
