source: Dev/branches/rest-dojo-ui/client/rft/pages/index.html @ 354

Last change on this file since 354 was 354, checked in by tjcschipper, 13 years ago
  • Made change to _Page.js to destroy the page's child widgets on page leave. This was causing widgets with identical names (such as "btnSave") to make regsitry throw a duplicate widget error.
  • survey.js/html now sorts loaded questions into categories and topics and creates or adds them to the proper TabPane/Selectors?. TODO: Allow for spaces in category titles.
  • Added "addQuestion()" method to Selector.js, to internalize question visualization logic.
  • Included surveyAdvanced page in run.js
  • Changes index to use proper button format, still need to figure out a way to bind content.goTo to the onclick field (since there is no index.js script being run!)
  • Various css tweaks.
File size: 3.8 KB
Line 
1<div>
2    <div data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="region:'center'" style="height: 600px;">
3        <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'top'">
4            <h2>
5                <span class="rftIcon rftIconUser"></span>
6                <span class="headerText">Main Menu</span>
7            </h2>
8        </div>
9
10        <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'">
11
12            <div class="rftIndexMenuBlock" title="Sessions">
13                <div class="rftIndexMenuMask">
14                    <span class="rftIcon rftIconSession"></span><span class="label">Sessions</span>
15                </div>
16                <button id="btnContentCreate" data-dojo-type="dijit.form.Button" data-dojo-props="baseClass: 'rftIndexMenuButton', class: 'green twoHeight', iconClass: 'rftIcon rftIconPlus'">Create and edit</button>
17                <button id="btnContentFacilitate" data-dojo-type="dijit.form.Button" data-dojo-props="baseClass: 'rftIndexMenuButton', class: 'green twoHeight', iconClass: 'rftIcon rftIconForward'">Facilitate</button>
18            </div>
19
20            <div class="rftIndexMenuBlock" title="Content">
21                <div class="rftIndexMenuMask">
22                    <span class="rftIcon rftIconInspect"></span><span class="label">Content</span>
23                </div>
24                <button id="btnSurveys" data-dojo-type="dijit.form.Button" data-dojo-props="baseClass: 'rftIndexMenuButton', class: 'blue oneHeight', iconClass: 'rftIcon rftIconSurvey'">Surveys</button>
25                <button id="btnQuestions" data-dojo-type="dijit.form.Button" data-dojo-props="baseClass: 'rftIndexMenuButton', class: 'orange oneHeight', iconClass: 'rftIcon rftIconQuestion'">Questions</button>
26                <button id="btnApplications" data-dojo-type="dijit.form.Button" data-dojo-props="baseClass: 'rftIndexMenuButton', class: 'purple oneHeight', iconClass: 'rftIcon rftIconApplication'">Applications</button>
27                <button id="btnDashboards" data-dojo-type="dijit.form.Button" data-dojo-props="baseClass: 'rftIndexMenuButton', class: 'red oneHeight', iconClass: 'rftIcon rftIconDashboard'">Dashboards</button>
28            </div>
29
30            <div class="rftIndexMenuBlock" title="results">
31                <div class="rftIndexMenuMask">
32                    <span class="rftIcon rftIconGameData"></span><span class="label">Results</span>
33                </div>
34                <button id="btnResults" data-dojo-type="dijit.form.Button" data-dojo-props="baseClass: 'rftIndexMenuButton', class: 'blue fourHeight', iconClass: 'rftIcon rftIconGameData'">Results</button>
35            </div>
36        </div>
37    </div>
38
39    <script>
40    require([
41        'dojo/on',
42        'dojo/query',
43        'dijit/registry',
44        'rft/content'
45        ], function(on, query, registry, content){
46            registry.byId("btnSessionsCreate").on("click", function(){
47                content.goTo("sessions", null);
48            });
49            registry.byId("btnSessionsFacilitate").on("click", function(){
50                content.goTo("sessions", null);
51            });
52           
53            registry.byId("btnSurveys").on("click", function(){
54                content.goTo("surveys", null);
55            });
56            registry.byId("btnQuestions").on("click", function(){
57                content.goTo("questions", null);
58            });
59            registry.byId("btnApplications").on("click", function(){
60                content.goTo("applications", null);
61            });
62            registry.byId("btnDashboards").on("click", function(){
63                content.goTo("dashboards", null);
64            });
65
66            registry.byId("btnResults").on("click", function(){
67                content.goTo("results", null);
68            });
69
70        });
71</script>
72</div>
Note: See TracBrowser for help on using the repository browser.