source: Dev/trunk/src/client/dojox/app/tests/scrollableTestApp2/views/TestInfo.js

Last change on this file was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

File size: 1.6 KB
Line 
1define(["dojo/dom", "dojo/dom-style", "dojo/_base/connect", "dojo/_base/lang","dijit/registry", "dojox/mvc/at", "dojox/mobile/TransitionEvent",
2                "dojox/mvc/Repeat", "dojox/mvc/getStateful", "dojox/mvc/Output", "dojo/sniff"],
3function(dom, domStyle, connect, lang, registry, at, TransitionEvent, Repeat, getStateful, Output, has){
4        var _connectResults = []; // events connect result
5
6        // these ids are updated here and in the html file to avoid duplicate ids
7        var backId = 'ti1back1';
8        var wrapperIdA = 'tst1WrapperA';
9        var wrapperIdB = 'tst1WrapperB';
10
11
12        return {
13                // repeat view init
14                init: function(){                       
15                },
16
17
18                beforeActivate: function(){
19                        // summary:
20                        //              view life cycle beforeActivate()
21                        if(dom.byId(backId) && !has("phone")){
22                                domStyle.set(dom.byId(backId), "visibility", "hidden"); // hide the back button in tablet mode
23                        }
24                        if(dom.byId("tab1WrapperA") && !has("phone")){
25                                domStyle.set(dom.byId("tab1WrapperA"), "visibility", "visible");  // show the nav view if it being used
26                                domStyle.set(dom.byId("tab1WrapperB"), "visibility", "visible");  // show the nav view if it being used
27                        }
28                        domStyle.set(dom.byId(wrapperIdA), "visibility", "visible");  // show the view when it is ready
29                        domStyle.set(dom.byId(wrapperIdB), "visibility", "visible");  // show the view when it is ready
30                },
31
32                afterActivate: function(){
33                        // summary:
34                        //              view life cycle afterActivate()
35                },
36               
37               
38                destroy: function(){
39                        var connectResult = _connectResults.pop();
40                        while(connectResult){
41                                connect.disconnect(connectResult);
42                                connectResult = _connectResults.pop();
43                        }
44                }
45        };
46});
Note: See TracBrowser for help on using the repository browser.