[263] | 1 | require([ |
---|
[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', |
---|
| 32 | 'rft/ui/ListView', |
---|
| 33 | 'rft/ui/AccountListView', |
---|
[311] | 34 | 'rft/ui/MainMenu', |
---|
[263] | 35 | 'rft/ui/MenuBarLink', |
---|
[274] | 36 | 'rft/ui/MenuLink', |
---|
[311] | 37 | 'rft/ui/Notifications', |
---|
[275] | 38 | 'rft/ui/LineWithActionsWidget', |
---|
[350] | 39 | 'rft/ui/ObjectBox', |
---|
[281] | 40 | 'rft/ui/QuestionWidget', |
---|
[350] | 41 | 'rft/ui/Selector', |
---|
[281] | 42 | 'rft/ui/TitleGroup', |
---|
[288] | 43 | |
---|
| 44 | // pages -> load dynamically? |
---|
[359] | 45 | 'rft/pages/index', |
---|
[292] | 46 | 'rft/pages/questions', |
---|
[366] | 47 | 'rft/pages/question', |
---|
[359] | 48 | 'rft/pages/session', |
---|
[350] | 49 | 'rft/pages/sessions', |
---|
[292] | 50 | 'rft/pages/surveys', |
---|
[366] | 51 | 'rft/pages/survey' |
---|
[292] | 52 | ], |
---|
[260] | 53 | function(win,parser,LoginDialog,dom,connect,auth,content) { |
---|
| 54 | parser.parse(); |
---|
| 55 | |
---|
[263] | 56 | var login = new LoginDialog().placeAt(win.body()); |
---|
[260] | 57 | login.startup(); |
---|
| 58 | |
---|
| 59 | auth.restore() |
---|
[263] | 60 | .then(function(){ |
---|
[260] | 61 | content.initial(); |
---|
| 62 | },function(){ |
---|
| 63 | login.show(); |
---|
| 64 | }); |
---|
| 65 | |
---|
[274] | 66 | connect.connect(dom.byId('loginMenu'),'click',function(){ |
---|
[260] | 67 | login.show(); |
---|
| 68 | }); |
---|
[274] | 69 | |
---|
[347] | 70 | }); |
---|
| 71 | |
---|
| 72 | function goToPage(page) { |
---|
| 73 | throw "Obsolete navigation to "+page; |
---|
[350] | 74 | } |
---|