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