window.JST||(window.JST={}),window.JST["custom/custom_widget"]=function(__obj){var _safe=function(value){void 0===value&&null==value&&(value="");var result=new String(value);return result.ecoSafe=!0,result};return function(){var __out=[],__self=this,_print=function(value){void 0!==value&&null!=value&&__out.push(value.ecoSafe?value:__self.escape(value))};return function(){_print(_safe('<div class="box-header draghandle with-border">\n  <div class=\'pull-left draghandle\'><i class="fa icon"></i>&nbsp;<h3 class="box-title"></h3></div>\n  <div class="pull-right controls">\n    <a href="#" id="show_settings"><i class="fa fa-cogs"></i></a> \n    <a href="#" id="remove"><i class="fa fa-times-circle"></i></a>\n  </div>\n</div>\x3c!-- /.box-header --\x3e\n<div class="box-body content">\n  <div class=\'display\'></div>\n  <div class="settings">\n    <div class="form-group">\n      <label for=\'url\'>content url</label>\n      <div class="field">\n        <input type="text" id="url" value=\'\' placeholder="">  \n      </div>\n    </div>\n  </div>\n</div>\x3c!-- /.box-body --\x3e\n\n\n\n'))}.call(this),__out.join("")}.call(function(){var key,obj={escape:function(value){return(""+value).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},safe:_safe};for(key in __obj)obj[key]=__obj[key];return obj}())};var CustomWidgetView,OASManager,WidgetView,tmptg,bind=function(fn,me){return function(){return fn.apply(me,arguments)}},extend=function(child,parent){function ctor(){this.constructor=child}for(var key in parent)hasProp.call(parent,key)&&(child[key]=parent[key]);return ctor.prototype=parent.prototype,child.prototype=new ctor,child.__super__=parent.prototype,child},hasProp={}.hasOwnProperty;WidgetView=window.WidgetView,OASManager=window.OASManager,CustomWidgetView=function(superClass){function CustomWidgetView(){return this.save_settings=bind(this.save_settings,this),this.render_settings=bind(this.render_settings,this),this.show_default=bind(this.show_default,this),CustomWidgetView.__super__.constructor.apply(this,arguments)}return extend(CustomWidgetView,superClass),CustomWidgetView.prototype.template="custom/custom_widget",CustomWidgetView.prototype.classID="custom_widget",CustomWidgetView.prototype.className="widget-outer box box-primary custom_widget",CustomWidgetView.prototype.ui={display:".display",wtitle:"h3.box-title"},CustomWidgetView.layout={sx:20,sy:20},CustomWidgetView.meta={id:"custom",name:"Custom Module",desc:"Displays the contents of any URL within the module window",icon:"globe"},CustomWidgetView.prototype.update=function(){var iframe,s;return s=this.model.get("settings"),this.ui.display.empty(),null!=s&&null!=s.url&&""!==s.url?(iframe=$("<iframe></iframe>"),this.ui.display.append(iframe),iframe.attr("src",s.url)):this.show_default(),CustomWidgetView.__super__.update.call(this),this},CustomWidgetView.prototype.show_default=function(){return this.ui.display.empty().append('<div id="nodata"><i class="fa fa-cogs fa-fw"></i> no URL selected</div>')},CustomWidgetView.prototype.onShow=function(){return CustomWidgetView.__super__.onShow.call(this),this.drawn=!0,this},CustomWidgetView.prototype.render_settings=function(settings,s_el){return CustomWidgetView.__super__.render_settings.call(this,settings,s_el),this.update_fields(s_el,settings,["url"]),this},CustomWidgetView.prototype.save_settings=function(settings,s_el){var s;return CustomWidgetView.__super__.save_settings.call(this,settings,s_el),s=this.update_attrs(s_el,settings,["url"]),this.model.set("settings",s),this},CustomWidgetView.prototype.start=function(){return this.update(),this},CustomWidgetView.prototype.onBeforeDestroy=function(){return CustomWidgetView.__super__.onBeforeDestroy.call(this)},CustomWidgetView.prototype.onDestroy=function(){return CustomWidgetView.__super__.onDestroy.call(this)},CustomWidgetView}(WidgetView),tmptg=CustomWidgetView,window.OASApp.widgets[tmptg.meta.id]=tmptg;