define(["backbone"],function(b){var a=b.View.extend({parent:null,initialize:function(c){b.View.prototype.initialize.apply(this,arguments);this.options=c||{};if(this.options.parent){this.setParent(this.options.parent);}},setParent:function(c){if(c){this.parent=c;c.on("close:all",this.close,this);}},close:function(c){this.trigger("close:all");if(this.beforeClose){this.beforeClose();}if(c===true){this.$el.empty();$(this.$el).after($(this.$el).clone());}this.off();this.stopListening();this.remove();delete this;},renderLoading:function(){var c='<div><div class="ui active inverted dimmer"><div class="ui text loader">Loading</div></div>';var d="</div>";this.$el.html(c+this.$el.html()+d);}});return a;});