| 1 |
define(["dojo/dom", "dojo/dom-style", "dojo/_base/connect","dijit/registry", "dojo/sniff", "dojox/mobile/TransitionEvent"], |
| 2 |
function(dom, domStyle, connect, registry, has, TransitionEvent){ |
| 3 |
var _connectResults = []; |
| 4 |
var backId = 'ti1back1'; |
| 5 |
var wrapperIdB = 'tst1WrapperB'; |
| 6 |
var MODULE = "TestInfo"; |
| 7 |
return { |
| 8 |
init: function(){ |
| 9 |
}, |
| 10 |
|
| 11 |
|
| 12 |
beforeActivate: function(){ |
| 13 |
|
| 14 |
|
| 15 |
if(dom.byId(backId) && !has("phone")){ |
| 16 |
domStyle.set(dom.byId(backId), "visibility", "hidden"); |
| 17 |
} |
| 18 |
if(registry.byId("heading1")){ |
| 19 |
registry.byId("heading1").labelDivNode.innerHTML = "Test Information"; |
| 20 |
} |
| 21 |
|
| 22 |
if(dom.byId("tab1WrapperB") && !has("phone")){ |
| 23 |
domStyle.set(dom.byId("tab1WrapperB"), "visibility", "visible"); |
| 24 |
} |
| 25 |
domStyle.set(dom.byId(wrapperIdB), "visibility", "visible"); |
| 26 |
}, |
| 27 |
|
| 28 |
afterActivate: function(){ |
| 29 |
|
| 30 |
|
| 31 |
if(!this.app.timedAutoFlow){ |
| 32 |
return; |
| 33 |
} |
| 34 |
this.app.loopCount++; |
| 35 |
|
| 36 |
if(this.app.loopCount === 14){ |
| 37 |
console.log("TestInfo:afterActivate loopCount = 15 stop timer"); |
| 38 |
console.timeEnd("timing transition loop"); |
| 39 |
} |
| 40 |
}, |
| 41 |
|
| 42 |
|
| 43 |
destroy: function(){ |
| 44 |
var connectResult = _connectResults.pop(); |
| 45 |
while(connectResult){ |
| 46 |
connect.disconnect(connectResult); |
| 47 |
connectResult = _connectResults.pop(); |
| 48 |
} |
| 49 |
} |
| 50 |
}; |
| 51 |
}); |