- box.fadeOut(300, function() {
- $('*.data', box).html();
-
- if( self.popupQueue.length > 0) {
- box = $('#message-box > #' + self.popupQueue[0][0]);
- $('*.data', box).html(self.popupQueue[0][1]);
- box.fadeIn();
- setTimeout(self._nextPopup, 5000);
- }
- });
- }
+Editor.prototype.advancePopupQueue = function() {
+ var self = this;
+ var elem = this.popupQueue.shift();
+ if(elem) {
+ var box = $('#message-box > #' + elem[0]);
+
+ box.fadeOut(200, function()
+ {
+ $('*.data', box).html();
+
+ if( self.popupQueue.length > 0) {
+ var ibox = $('#message-box > #' + self.popupQueue[0][0]);
+ $('*.data', ibox).html(self.popupQueue[0][1]);
+ ibox.fadeIn();
+ if(self.popupQueue[0][2] > 0)
+ setTimeout( $.fbind(self, self.advancePopupQueue), self.popupQueue[0][2]);
+ }
+ });