source: Dev/branches/rest-dojo-ui/client/rft/run.js @ 355

Last change on this file since 355 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: 1.7 KB
Line 
1require([
2    // functions required for run
3    'dojo/_base/window','dojo/parser', 'rft/ui/LoginDialog',
4    'dojo/dom', 'dojo/_base/connect', 'rft/auth', 'rft/content',
5    'dojo/domReady!',
6   
7    // general widgets
8    'dojo/data/ObjectStore',
9    'dojo/store/JsonRest',
10    'dijit/InlineEditBox',
11    'dijit/MenuBar',
12    'dijit/MenuBarItem',
13    'dijit/PopupMenuBarItem',
14    'dijit/DropDownMenu',
15    'dijit/TitlePane',
16    'dijit/layout/BorderContainer',
17    'dijit/layout/ContentPane',
18    'dijit/layout/TabContainer',
19    'dijit/layout/AccordionContainer',
20    'dijit/form/DateTextBox',
21    'dijit/form/Form',
22    'dijit/form/TextBox',
23    'dijit/form/Button',
24    'dijit/form/Textarea',
25    'dijit/form/SimpleTextarea',
26    'dijit/form/ComboBox',
27    'dijit/form/Select',
28    'dojox/grid/DataGrid',
29    'dojox/widget/TitleGroup',
30    'rft/ui/List',
31    'rft/ui/MainMenu',
32    'rft/ui/MenuBarLink',
33    'rft/ui/MenuLink',
34    'rft/ui/Notifications',
35    'rft/ui/LineWithActionsWidget',
36    'rft/ui/ObjectBox',
37    'rft/ui/QuestionWidget',
38    'rft/ui/Selector',
39    'rft/ui/TitleGroup',
40   
41    // pages -> load dynamically?
42    'rft/pages/questions',
43    'rft/pages/sessions',
44    'rft/pages/surveys',
45    'rft/pages/survey',
46    'rft/pages/surveyAdvanced'
47    ],
48    function(win,parser,LoginDialog,dom,connect,auth,content) {
49        parser.parse();
50
51        var login = new LoginDialog().placeAt(win.body());
52        login.startup();
53
54        auth.restore()
55        .then(function(){
56            content.initial();
57        },function(){
58            login.show();
59        });
60
61        connect.connect(dom.byId('loginMenu'),'click',function(){
62            login.show();
63        });
64
65    });
66
67function goToPage(page) {
68    throw "Obsolete navigation to "+page;
69}
Note: See TracBrowser for help on using the repository browser.