a:40:{s:9:"#provides";s:20:"dojox.widget.Toaster";s:9:"#resource";s:17:"widget/Toaster.js";s:9:"#requires";a:3:{i:0;a:3:{i:0;s:6:"common";i:1;s:7:"dojo.fx";i:2;s:4:"dojo";}i:1;a:3:{i:0;s:6:"common";i:1;s:13:"dijit._Widget";i:2;s:5:"dijit";}i:2;a:3:{i:0;s:6:"common";i:1;s:16:"dijit._Templated";i:2;s:5:"dijit";}}s:20:"dojox.widget.Toaster";a:5:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:13:"dijit._Widget";}s:4:"call";a:2:{i:0;s:13:"dijit._Widget";i:1;s:16:"dijit._Templated";}}s:6:"mixins";a:1:{s:9:"prototype";a:1:{i:0;s:26:"dijit._Templated.prototype";}}s:7:"summary";s:104:"Message that slides in from the corner of the screen, used for notifications like "new email".";s:9:"classlike";b:1;}s:35:"dojox.widget.Toaster.templateString";a:2:{s:9:"prototype";s:20:"dojox.widget.Toaster";s:7:"summary";s:0:"";}s:33:"dojox.widget.Toaster.messageTopic";a:3:{s:9:"prototype";s:20:"dojox.widget.Toaster";s:4:"type";s:6:"String";s:7:"summary";s:203:"Name of topic; anything published to this topic will be displayed as a message. Message format is either String or an object like {message: "hello word", type: "error", duration: 500}";}s:33:"dojox.widget.Toaster.messageTypes";a:3:{s:9:"prototype";s:20:"dojox.widget.Toaster";s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:32:"dojox.widget.Toaster.defaultType";a:3:{s:9:"prototype";s:20:"dojox.widget.Toaster";s:4:"type";s:6:"String";s:7:"summary";s:233:"If message type isn't specified (see "messageTopic" parameter), then display message as this type. Possible values in messageTypes enumeration ("message", "warning", "error", "fatal")";}s:38:"dojox.widget.Toaster.positionDirection";a:3:{s:9:"prototype";s:20:"dojox.widget.Toaster";s:4:"type";s:6:"String";s:7:"summary";s:221:"Position from which message slides into screen, one of ["br-up", "br-left", "bl-up", "bl-right", "tr-down", "tr-left", "tl-down", "tl-right"]";}s:43:"dojox.widget.Toaster.positionDirectionTypes";a:3:{s:9:"prototype";s:20:"dojox.widget.Toaster";s:4:"type";s:5:"Array";s:7:"summary";s:47:"Possible values for positionDirection parameter";}s:29:"dojox.widget.Toaster.duration";a:3:{s:9:"prototype";s:20:"dojox.widget.Toaster";s:4:"type";s:7:"Integer";s:7:"summary";s:38:"Number of milliseconds to show message";}s:34:"dojox.widget.Toaster.slideDuration";a:3:{s:9:"prototype";s:20:"dojox.widget.Toaster";s:4:"type";s:7:"Integer";s:7:"summary";s:106:"Number of milliseconds for the slide animation, increasing will cause the Toaster to slide in more slowly.";}s:30:"dojox.widget.Toaster.separator";a:3:{s:9:"prototype";s:20:"dojox.widget.Toaster";s:4:"type";s:6:"String";s:7:"summary";s:109:"String used to separate messages if consecutive calls are made to setContent before previous messages go away";}s:31:"dojox.widget.Toaster.postCreate";a:4:{s:9:"prototype";s:20:"dojox.widget.Toaster";s:4:"type";s:8:"Function";s:6:"source";s:408:" this.inherited(arguments); this.hide(); // place node as a child of body for positioning dojo.body().appendChild(this.domNode); this.clipNode.className = "dijitToasterClip"; this.containerNode.className += " dijitToasterContainer"; this.contentNode.className = "dijitToasterContent"; if(this.messageTopic){ dojo.subscribe(this.messageTopic, this, "_handleMessage"); }";s:7:"summary";s:0:"";}s:35:"dojox.widget.Toaster._handleMessage";a:6:{s:9:"prototype";s:20:"dojox.widget.Toaster";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"message";a:1:{s:4:"type";s:13:"String|Object";}}s:6:"source";s:145:" if(dojo.isString(message)){ this.setContent(message); }else{ this.setContent(message.message, message.type, message.duration); }";s:7:"private";b:1;s:7:"summary";s:0:"";}s:32:"dojox.widget.Toaster._capitalize";a:6:{s:9:"prototype";s:20:"dojox.widget.Toaster";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"w";a:1:{s:4:"type";s:6:"String";}}s:6:"source";s:59:" return w.substring(0,1).toUpperCase() + w.substring(1);";s:7:"private";b:1;s:7:"summary";s:0:"";}s:31:"dojox.widget.Toaster.setContent";a:5:{s:9:"prototype";s:20:"dojox.widget.Toaster";s:4:"type";s:8:"Function";s:10:"parameters";a:3:{s:7:"message";a:2:{s:4:"type";s:15:"String|Function";s:7:"summary";s:100:"the message. If this is a function, it will be called with this toaster widget as the only argument.";}s:11:"messageType";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:141:"type of message; possible values in messageTypes enumeration ("message", "warning", "error", "fatal")";}s:8:"duration";a:3:{s:8:"optional";b:1;s:4:"type";s:3:"int";s:7:"summary";s:89:"duration in milliseconds to display message before removing it. Widget has default value.";}}s:6:"source";s:2758:" duration = duration||this.duration; // sync animations so there are no ghosted fades and such if(this.slideAnim){ if(this.slideAnim.status() != "playing"){ this.slideAnim.stop(); } if(this.slideAnim.status() == "playing" || (this.fadeAnim && this.fadeAnim.status() == "playing")){ setTimeout(dojo.hitch(this, function(){ this.setContent(message, messageType, duration); }), 50); return; } } // determine type of content and apply appropriately for(var type in this.messageTypes){ dojo.removeClass(this.containerNode, "dijitToaster" + this._capitalize(this.messageTypes[type])); } dojo.style(this.containerNode, "opacity", 1); this._setContent(message); dojo.addClass(this.containerNode, "dijitToaster" + this._capitalize(messageType || this.defaultType)); // now do funky animation of widget appearing from // bottom right of page and up this.show(); var nodeSize = dojo.marginBox(this.containerNode); this._cancelHideTimer(); if(this.isVisible){ this._placeClip(); //update hide timer if no sticky message in stack if(!this._stickyMessage) { this._setHideTimer(duration); } }else{ var style = this.containerNode.style; var pd = this.positionDirection; // sets up initial position of container node and slide-out direction if(pd.indexOf("-up") >= 0){ style.left=0+"px"; style.top=nodeSize.h + 10 + "px"; }else if(pd.indexOf("-left") >= 0){ style.left=nodeSize.w + 10 +"px"; style.top=0+"px"; }else if(pd.indexOf("-right") >= 0){ style.left = 0 - nodeSize.w - 10 + "px"; style.top = 0+"px"; }else if(pd.indexOf("-down") >= 0){ style.left = 0+"px"; style.top = 0 - nodeSize.h - 10 + "px"; }else{ throw new Error(this.id + ".positionDirection is invalid: " + pd); } this.slideAnim = dojo.fx.slideTo({ node: this.containerNode, top: 0, left: 0, duration: this.slideDuration}); this.connect(this.slideAnim, "onEnd", function(nodes, anim){ //we build the fadeAnim here so we dont have to duplicate it later // can't do a fadeHide because we're fading the // inner node rather than the clipping node this.fadeAnim = dojo.fadeOut({ node: this.containerNode, duration: 1000}); this.connect(this.fadeAnim, "onEnd", function(evt){ this.isVisible = false; this.hide(); }); this._setHideTimer(duration); this.connect(this, 'onSelect', function(evt){ this._cancelHideTimer(); //force clear sticky message this._stickyMessage=false; this.fadeAnim.play(); }); this.isVisible = true; }); this.slideAnim.play(); }";s:7:"summary";s:53:"sets and displays the given message and show duration";}s:32:"dojox.widget.Toaster._setContent";a:6:{s:9:"prototype";s:20:"dojox.widget.Toaster";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"message";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:217:" if(dojo.isFunction(message)){ message(this); return; } if(message && this.isVisible){ message = this.contentNode.innerHTML + this.separator + message; } this.contentNode.innerHTML = message;";s:7:"private";b:1;s:7:"summary";s:0:"";}s:37:"dojox.widget.Toaster._cancelHideTimer";a:3:{s:9:"prototype";s:20:"dojox.widget.Toaster";s:7:"private";b:1;s:7:"summary";s:0:"";}s:34:"dojox.widget.Toaster._setHideTimer";a:3:{s:9:"prototype";s:20:"dojox.widget.Toaster";s:7:"private";b:1;s:7:"summary";s:0:"";}s:31:"dojox.widget.Toaster._placeClip";a:5:{s:9:"prototype";s:20:"dojox.widget.Toaster";s:4:"type";s:8:"Function";s:6:"source";s:982:" var view = dijit.getViewport(); var nodeSize = dojo.marginBox(this.containerNode); var style = this.clipNode.style; // sets up the size of the clipping node style.height = nodeSize.h+"px"; style.width = nodeSize.w+"px"; // sets up the position of the clipping node var pd = this.positionDirection; if(pd.match(/^t/)){ style.top = view.t+"px"; }else if(pd.match(/^b/)){ style.top = (view.h - nodeSize.h - 2 + view.t)+"px"; } if(pd.match(/^[tb]r-/)){ style.left = (view.w - nodeSize.w - 1 - view.l)+"px"; }else if(pd.match(/^[tb]l-/)){ style.left = 0 + "px"; } style.clip = "rect(0px, " + nodeSize.w + "px, " + nodeSize.h + "px, 0px)"; if(dojo.isIE){ if(!this.bgIframe){ this.clipNode.id = dijit.getUniqueId("dojox_widget_Toaster_clipNode"); this.bgIframe = new dijit.BackgroundIframe(this.clipNode); } var iframe = this.bgIframe.iframe; if(iframe){ iframe.style.display="block"; } }";s:7:"private";b:1;s:7:"summary";s:0:"";}s:29:"dojox.widget.Toaster.onSelect";a:5:{s:9:"prototype";s:20:"dojox.widget.Toaster";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:5:"Event";}}s:6:"source";s:56:" // summary: callback for when user clicks the message";s:7:"summary";s:41:"callback for when user clicks the message";}s:25:"dojox.widget.Toaster.show";a:4:{s:9:"prototype";s:20:"dojox.widget.Toaster";s:4:"type";s:8:"Function";s:6:"source";s:195:" dojo.style(this.domNode, 'display', 'block'); this._placeClip(); if(!this._scrollConnected){ this._scrollConnected = dojo.connect(window, "onscroll", this, this._placeClip); }";s:7:"summary";s:16:"show the Toaster";}s:25:"dojox.widget.Toaster.hide";a:4:{s:9:"prototype";s:20:"dojox.widget.Toaster";s:4:"type";s:8:"Function";s:6:"source";s:214:" dojo.style(this.domNode, 'display', 'none'); if(this._scrollConnected){ dojo.disconnect(this._scrollConnected); this._scrollConnected = false; } dojo.style(this.containerNode, "opacity", 1);";s:7:"summary";s:16:"hide the Toaster";}s:41:"dojox.widget.Toaster.messageTypes.MESSAGE";a:1:{s:7:"summary";s:0:"";}s:41:"dojox.widget.Toaster.messageTypes.WARNING";a:1:{s:7:"summary";s:0:"";}s:39:"dojox.widget.Toaster.messageTypes.ERROR";a:1:{s:7:"summary";s:0:"";}s:39:"dojox.widget.Toaster.messageTypes.FATAL";a:1:{s:7:"summary";s:0:"";}s:39:"dojox.widget.Toaster.clipNode.className";a:2:{s:8:"instance";s:20:"dojox.widget.Toaster";s:7:"summary";s:0:"";}s:42:"dojox.widget.Toaster.contentNode.className";a:2:{s:8:"instance";s:20:"dojox.widget.Toaster";s:7:"summary";s:0:"";}s:30:"dojox.widget.Toaster.slideAnim";a:2:{s:8:"instance";s:20:"dojox.widget.Toaster";s:7:"summary";s:0:"";}s:29:"dojox.widget.Toaster.fadeAnim";a:2:{s:8:"instance";s:20:"dojox.widget.Toaster";s:7:"summary";s:0:"";}s:30:"dojox.widget.Toaster.isVisible";a:2:{s:8:"instance";s:20:"dojox.widget.Toaster";s:7:"summary";s:0:"";}s:35:"dojox.widget.Toaster._stickyMessage";a:3:{s:8:"instance";s:20:"dojox.widget.Toaster";s:7:"private";b:1;s:7:"summary";s:0:"";}s:42:"dojox.widget.Toaster.contentNode.innerHTML";a:2:{s:8:"instance";s:20:"dojox.widget.Toaster";s:7:"summary";s:0:"";}s:32:"dojox.widget.Toaster.clipNode.id";a:2:{s:8:"instance";s:20:"dojox.widget.Toaster";s:7:"summary";s:0:"";}s:29:"dojox.widget.Toaster.bgIframe";a:2:{s:8:"instance";s:20:"dojox.widget.Toaster";s:7:"summary";s:0:"";}s:37:"dojox.widget.Toaster._scrollConnected";a:3:{s:8:"instance";s:20:"dojox.widget.Toaster";s:7:"private";b:1;s:7:"summary";s:0:"";}s:12:"dojox.widget";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}