芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/.trash/cepali/message/output/popup/amd/build/notification_area_content_area.min.js
define(["jquery","core/templates","core/notification","core/custom_interaction_events","message_popup/notification_repository","message_popup/notification_area_events"],function(a,b,c,d,e,f){var g={CONTAINER:'[data-region="notification-area"]',CONTENT:'[data-region="content"]',HEADER:'[data-region="header"]',FOOTER:'[data-region="footer"]',TOGGLE_MODE:'[data-action="toggle-mode"]'},h={HEADER:"message_popup/notification_area_content_area_header",CONTENT:"message_popup/notification_area_content_area_content",FOOTER:"message_popup/notification_area_content_area_footer"},i=function(b,c){this.root=a(b),this.container=this.root.closest(g.CONTAINER),this.userId=c,this.header=this.root.find(g.HEADER),this.content=this.root.find(g.CONTENT),this.footer=this.root.find(g.FOOTER),this.registerEventListeners()};return i.prototype.getRoot=function(){return this.root},i.prototype.getContainer=function(){return this.container},i.prototype.getUserId=function(){return this.userId},i.prototype.getHeader=function(){return this.header},i.prototype.getContent=function(){return this.content},i.prototype.getFooter=function(){return this.footer},i.prototype.show=function(){this.getContainer().addClass("show-content-area")},i.prototype.hide=function(){this.getContainer().removeClass("show-content-area")},i.prototype.setHeaderHTML=function(a){this.getHeader().empty().html(a)},i.prototype.setContentHTML=function(a){this.getContent().empty().html(a)},i.prototype.setFooterHTML=function(a){this.getFooter().empty().html(a)},i.prototype.showNotification=function(c){var d=b.render(h.HEADER,c).done(function(a){this.setHeaderHTML(a)}.bind(this)),e=b.render(h.CONTENT,c).done(function(a){this.setContentHTML(a)}.bind(this)),g=b.render(h.FOOTER,c).done(function(a){this.setFooterHTML(a)}.bind(this));return a.when(d,e,g).done(function(){this.show(),this.getContainer().trigger(f.notificationShown,[c])}.bind(this))},i.prototype.registerEventListeners=function(){d.define(this.getRoot(),[d.events.activate]),this.getRoot().on(d.events.activate,g.VIEW_TOGGLE,function(){this.hide()}.bind(this)),this.getContainer().on(f.showNotification,function(a,b){this.showNotification(b)}.bind(this))},i});