| 1 |
define(["dojo/dom", "dojo/dom-style", "dojo/_base/connect", "dojo/sniff"], |
| 2 |
function(dom, domStyle, connect, has){ |
| 3 |
var _connectResults = []; |
| 4 |
var backId = 'ti1back1'; |
| 5 |
var wrapperIdB = 'tst1WrapperB'; |
| 6 |
return { |
| 7 |
init: function(){ |
| 8 |
}, |
| 9 |
|
| 10 |
|
| 11 |
beforeActivate: function(){ |
| 12 |
|
| 13 |
|
| 14 |
if(dom.byId(backId) && !has("phone")){ |
| 15 |
domStyle.set(dom.byId(backId), "visibility", "hidden"); |
| 16 |
} |
| 17 |
if(dom.byId("tab1WrapperB") && !has("phone")){ |
| 18 |
domStyle.set(dom.byId("tab1WrapperB"), "visibility", "visible"); |
| 19 |
} |
| 20 |
domStyle.set(dom.byId(wrapperIdB), "visibility", "visible"); |
| 21 |
}, |
| 22 |
|
| 23 |
afterActivate: function(){ |
| 24 |
|
| 25 |
|
| 26 |
}, |
| 27 |
|
| 28 |
|
| 29 |
destroy: function(){ |
| 30 |
var connectResult = _connectResults.pop(); |
| 31 |
while(connectResult){ |
| 32 |
connect.disconnect(connectResult); |
| 33 |
connectResult = _connectResults.pop(); |
| 34 |
} |
| 35 |
} |
| 36 |
}; |
| 37 |
}); |