(function(){var a={}.hasOwnProperty,b=function(f,d){for(var c in d){if(a.call(d,c)){f[c]=d[c]}}function e(){this.constructor=f}e.prototype=d.prototype;f.prototype=new e();f.__super__=d.prototype;return f};window._make_icon=function(c){if(c){return'<i class="icon-'+c+'"></i>'}else{return""}};window.Controls["default"]=(function(d){b(c,d);function c(){return c.__super__.constructor.apply(this,arguments)}c.prototype.createDom=function(){this.dom=$$("<div>\n</div>");return this.childContainer=this.dom};return c})(window.Control);window.Controls.label=(function(d){b(c,d);function c(){return c.__super__.constructor.apply(this,arguments)}c.prototype.createDom=function(){return this.dom=$$('<span class="control label '+this.properties.style+'">'+this.properties.text+"</span>")};return c})(window.Control);window.Controls.tooltip=(function(c){b(d,c);function d(){return d.__super__.constructor.apply(this,arguments)}d.prototype.createDom=function(){var e=this;this.dom=$('<div class="control tooltip '+this.properties.style+'">\n    <div class="container" title=""></div>\n</div>');this.dom.find(".container").tooltip({content:function(){return'<div class="control tooltip body">\n    <div>\n        '+e.properties.text+"\n    </div>\n    <div>\n    </div>\n</div>"},position:{my:"left-15 bottom",at:"center top"}});return this.childContainer=this.dom.find(".container")};return d})(window.Control);window.Controls.icon=(function(d){b(c,d);function c(){return c.__super__.constructor.apply(this,arguments)}c.prototype.createDom=function(){var e;e=_make_icon(this.properties.icon);return this.dom=$$('<div class="control icon style-'+this.properties.style+'">'+e+"</div>")};return c})(window.Control);window.Controls.button=(function(d){b(c,d);function c(){return c.__super__.constructor.apply(this,arguments)}c.prototype.createDom=function(){var e,f=this;e=_make_icon(this.properties.icon);this.dom=$('<a href="#" class="control button style-'+this.properties.style+'">'+e+" "+this.properties.text+"</a>");return this.dom.click(function(g){if(!f.properties.warning||confirm(f.properties.warning)){if(f.event("click")){return f.cancel(g)}}})};return c})(window.Control);window.Controls.togglebutton=(function(c){b(d,c);function d(){return d.__super__.constructor.apply(this,arguments)}d.prototype.createDom=function(){var e,f=this;e=_make_icon(this.properties.icon);this.dom=$('<a href="#" class="control button style-'+this.properties.style+" "+(this.properties.pressed?"pressed":"")+'">'+e+" "+this.properties.text+"</a>");return this.dom.click(function(g){if(f.event("click")){return f.cancel(g)}})};return d})(window.Control);window.Controls.list=(function(c){b(d,c);function d(){return d.__super__.constructor.apply(this,arguments)}d.prototype.createDom=function(){this.dom=$$('<div class="control container list">\n</div>');return this.childContainer=this.dom};return d})(window.Control);window.Controls.listitem=(function(c){b(d,c);function d(){return d.__super__.constructor.apply(this,arguments)}d.prototype.createDom=function(){var e=this;this.dom=$('<div class="control container listitem">\n</div>');this.childContainer=this.dom;return this.dom.click(function(f){if(e.event("click")){return e.cancel(f)}})};return d})(window.Control);window.Controls.progressbar=(function(d){b(c,d);function c(){return c.__super__.constructor.apply(this,arguments)}c.prototype.createDom=function(){var e;e=this._int_to_px(this.properties.width);this.dom=$$('<div class="control progressbar '+this.properties.style+'" style="width: '+e+'">\n    <div class="fill">\n        <div class="tip"></div>\n    </div>\n</div>');this.setProgress(this.properties.value);return this.childContainer=this.dom};c.prototype.setProgress=function(f){var e;e=this._int_to_px(Math.round(this.properties.width*f));return $(this.dom).find(".fill").css({width:e})};return c})(window.Control)}).call(this);