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

Last change on this file since 376 was 376, checked in by jkraaijeveld, 13 years ago

Started the QuestionEditorPreview? bit - now works with headers and texts, fully stores and restores this in order properly.

Note: there must be a better way for this, but seeing as all content pieces can differ greatly I couldn't think of a way to make it properly generic. @Hendrik: need discussion about this.

Note2: Currently I don't use any internal events in the question editor. Not sure if it would be a lot better we would.

File size: 2.0 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',
[365]30    'dojox/data/QueryReadStore',
31    'rft/elastic/ElasticReadStore',
[374]32    'rft/ui/List',
33    'rft/ui/OrderedList',
[365]34    'rft/ui/AccountListView',
[311]35    'rft/ui/MainMenu',
[263]36    'rft/ui/MenuBarLink',
[274]37    'rft/ui/MenuLink',
[311]38    'rft/ui/Notifications',
[275]39    'rft/ui/LineWithActionsWidget',
[350]40    'rft/ui/ObjectBox',
[281]41    'rft/ui/QuestionWidget',
[350]42    'rft/ui/Selector',
[281]43    'rft/ui/TitleGroup',
[376]44    'rft/ui/PreviewWidgets/HeaderItem',
45    'rft/ui/PreviewWidgets/TextItem',
[288]46    // pages -> load dynamically?
[359]47    'rft/pages/index',
[292]48    'rft/pages/questions',
[366]49    'rft/pages/question',
[359]50    'rft/pages/session',
[350]51    'rft/pages/sessions',
[292]52    'rft/pages/surveys',
[366]53    'rft/pages/survey'
[292]54    ],
[260]55    function(win,parser,LoginDialog,dom,connect,auth,content) {
56        parser.parse();
57
[263]58        var login = new LoginDialog().placeAt(win.body());
[260]59        login.startup();
60
61        auth.restore()
[263]62        .then(function(){
[260]63            content.initial();
64        },function(){
65            login.show();
66        });
67
[274]68        connect.connect(dom.byId('loginMenu'),'click',function(){
[260]69            login.show();
70        });
[274]71
[347]72    });
73
74function goToPage(page) {
75    throw "Obsolete navigation to "+page;
[350]76}
Note: See TracBrowser for help on using the repository browser.