ソースを参照

Moves login state of dialog to be first, to be the initial state.

By default impromptu uses the first state as the default one to show.
j8
damencho 8年前
コミット
fda52f7160
1個のファイルの変更23行の追加23行の削除
  1. 23
    23
      modules/UI/authentication/LoginDialog.js

+ 23
- 23
modules/UI/authentication/LoginDialog.js ファイルの表示

@@ -62,29 +62,6 @@ function LoginDialog(successCallback, cancelCallback) {
62 62
     }
63 63
 
64 64
     const states = {
65
-        connecting: {
66
-            buttons: [],
67
-            defaultButton: 0,
68
-            html: '<div id="connectionStatus"></div>',
69
-            titleKey: 'dialog.connecting'
70
-        },
71
-        finished: {
72
-            buttons: finishedButtons,
73
-            defaultButton: 0,
74
-            html: '<div id="errorMessage"></div>',
75
-            titleKey: 'dialog.error',
76
-
77
-            submit(e, v) {
78
-                e.preventDefault();
79
-                if (v === 'retry') {
80
-                    // eslint-disable-next-line no-use-before-define
81
-                    connDialog.goToState('login');
82
-                } else {
83
-                    // User cancelled
84
-                    cancelCallback();
85
-                }
86
-            }
87
-        },
88 65
         login: {
89 66
             buttons: loginButtons,
90 67
             focus: ':input:first',
@@ -107,6 +84,29 @@ function LoginDialog(successCallback, cancelCallback) {
107 84
                     cancelCallback();
108 85
                 }
109 86
             }
87
+        },
88
+        connecting: {
89
+            buttons: [],
90
+            defaultButton: 0,
91
+            html: '<div id="connectionStatus"></div>',
92
+            titleKey: 'dialog.connecting'
93
+        },
94
+        finished: {
95
+            buttons: finishedButtons,
96
+            defaultButton: 0,
97
+            html: '<div id="errorMessage"></div>',
98
+            titleKey: 'dialog.error',
99
+
100
+            submit(e, v) {
101
+                e.preventDefault();
102
+                if (v === 'retry') {
103
+                    // eslint-disable-next-line no-use-before-define
104
+                    connDialog.goToState('login');
105
+                } else {
106
+                    // User cancelled
107
+                    cancelCallback();
108
+                }
109
+            }
110 110
         }
111 111
     };
112 112
     const connDialog = APP.UI.messageHandler.openDialogWithStates(

読み込み中…
キャンセル
保存