return function () { var i, prop; sup.apply(this, arguments); var fn = this.bindSafely(forwardPropertyChange); for (i = this.overlayPropertyBindings.length - 1; i >= 0; --i) { prop = this.overlayPropertyBindings[i]; this.observe(prop, fn); if (utils.exists(this[prop])) fn(null, this[prop], prop); } };
nextStep: function(inSender, inEvent) { // exit early if we get event before test starts if (!utils.exists(this.step)) { return true; } if (this.step < this.view.$.panels.getPanels().length - 1) { this.view.$.panels.next(); } else { this.testComplete(); } this.step++; return true; }
return function () { sup.apply(this, arguments); this.addClass('moon-overlay'); this.overlayShowing = utils.exists(this.overlayShowing) ? this.overlayShowing : false; this.overlayComponentsChanged(); // Property observers that map property changes to CSS classes this.observe('overlayClasses', this.bindSafely(this.overlayPropertyToClass, mapClasses)); this.observe('overlayPosition', this.bindSafely(this.overlayPropertyToClass, mapPosition)); this.observe('overlayAlign', this.bindSafely(this.overlayPropertyToClass, mapAlign)); this.observe('overlayTransparent', this.bindSafely(this.overlayPropertyToClass, mapTransparent)); this.observe('overlayShowing', this.bindSafely(this.overlayPropertyToClass, mapShowing)); };
nextStep: function(inSender, inEvent) { // exit early if we get event before test starts if (!utils.exists(this.step)) { return true; } if(this.step >= 2){ this.testComplete(); } else if(this.step === 0) { this.view.$.gridList.$.scroller.scrollTo(0,this.view.$.gridList.$.scroller.getScrollBounds().maxTop); this.startJob("scrolledToEnd", "nextStep", 3000); } else if(this.step === 1) { this.view.$.gridList.$.scroller.scrollTo(0,0); this.startJob("scrolledToStart", "nextStep", 3000); } this.step++; return true; }
nextStep: function(inSender, inEvent) { // ignore early call to handler from panel setup if (!utils.exists(this.step)) { return; } // steps 0 to 4: go to next panel #2 through #6 if (this.step >= 0 && this.step <= 4) { utils.asyncMethod(this.view.$.samplePanels, this.view.$.samplePanels.next); } // steps 5 to 9: go to previous panel else if (this.step >= 5 && this.step <= 9) { utils.asyncMethod(this.view.$.samplePanels, this.view.$.samplePanels.previous); } // step 10: go to next panel else { this.testComplete(); } this.step++; // stop event propagation return true; }