function VolumeShadeView(){var e;this.initialize=function(e){this.volumeString=e.volumeString,this.primaryDevice=e.primaryDevice||null,this.secondaryDevices=e.secondaryDevices||[],this.events={},this.events[vdown+" .volume_drawer_close"]="close",this._open=!1,this.scroll=null;var t=this;$(document).on("VOLUME_SHADE_OPEN",function(){t.open()}),$(document).on(vdown,function(e){t.close()}),$("#volume_shade").on(vdown,function(e){e.stopPropagation()})},this.setSecondaryDevices=function(e){this.secondaryDevices=e},this.setPrimaryDevice=function(e){this.primaryDevice=e},this.close=function(){this._open=!1,this.draw()},this.open=function(){this._open=!0,this.draw()},this.draw=function(){var e=$("#volume_shade_backdrop");this._open?(this.$el.addClass("open"),e.removeClass("disp_off")):(this.$el.removeClass("open"),e.addClass("disp_off"))},this.destroy=function(){this.volumeListView&&this.volumeListView.destroy()},this.render=function(){this.destroy();var t=this.$el;t.empty(),t.addClass("animateSlide"),t.addClass("volume-shade-view");var n=this.secondaryDevices===null||this.secondaryDevices.length===0,r="<div class='volume_drawer_title'><%= titleString %> <div class='volume_drawer_close'></div></div><div class='volume_drawer_group'></div>";return e||(e=_.template(r)),n?this.$el.html(e({titleString:this.primaryDevice?this.primaryDevice.getDisplayName():""})):this.$el.html(e({titleString:funcObj.langCon.getString("General Volume")})),this.volumeListView=new App.Views.VolumeListView({primaryDevice:this.primaryDevice,secondaryDevices:this.secondaryDevices}),t.find(".volume_drawer_group").append(this.volumeListView.render().el),this.delegateEvents(),touchDevice&&(this.scroll&&this.scroll.destroy(),t.find(".volume_drawer_group").on(vdown,function(e){e.preventDefault()}),this.scroll=new IScroll(".volume_drawer_group",{scrollX:!1,scrollY:!0})),this}}App.Views.VolumeShadeView=Backbone.View.extend(new VolumeShadeView);