@@ -15,12 +15,6 @@ define([
15
15
initialize : function ( a , b ) {
16
16
this . reset ( ) ;
17
17
this . rollbackUrl = this . backupUrl = '' ;
18
- this . rollbackForm = jQuery ( '#rollback-form' ) . mage ( 'validation' , {
19
- submitHandler : jQuery . proxy ( this . submitRollback , this )
20
- } ) ;
21
- this . backupForm = jQuery ( '#backup-form' ) . mage ( 'validation' , {
22
- submitHandler : jQuery . proxy ( this . submitBackup , this )
23
- } ) ;
24
18
} ,
25
19
26
20
reset : function ( ) {
@@ -49,14 +43,17 @@ define([
49
43
50
44
requestBackupOptions : function ( ) {
51
45
this . hidePopups ( ) ;
46
+
52
47
var action = this . type != 'snapshot' ? 'hide' : 'show' ;
53
- $$ ( '#exclude-media-checkbox-container' ) . invoke ( action ) ;
48
+
54
49
this . showPopup ( 'backup-options' ) ;
50
+
51
+ $$ ( '#exclude-media-checkbox-container' ) . invoke ( action ) ;
55
52
} ,
56
53
57
54
requestPassword : function ( ) {
58
55
this . hidePopups ( ) ;
59
-
56
+
60
57
this . showPopup ( 'rollback-request-password' ) ;
61
58
62
59
this . type != 'db' ?
@@ -89,12 +86,12 @@ define([
89
86
method : 'post' ,
90
87
parameters : data
91
88
} ) ;
89
+
90
+ this . modal . modal ( 'closeModal' ) ;
92
91
} ,
93
92
94
93
submitRollback : function ( ) {
95
94
var data = this . getPostData ( ) ;
96
-
97
- this . hidePopups ( ) ;
98
95
99
96
new Ajax . Request ( this . rollbackUrl , {
100
97
onSuccess : function ( transport ) {
@@ -103,6 +100,8 @@ define([
103
100
method : 'post' ,
104
101
parameters : data
105
102
} ) ;
103
+
104
+ this . modal . modal ( 'closeModal' ) ;
106
105
} ,
107
106
108
107
processResponse : function ( transport , popupId ) {
@@ -150,10 +149,6 @@ define([
150
149
submitHandler : jQuery . proxy ( this . submitBackup , this )
151
150
} ) ;
152
151
this . modal . find ( '#backup-form' ) . submit ( ) ;
153
- this . modal . modal ( 'closeModal' ) ;
154
- } ,
155
- opened : function ( ) {
156
- this . modal . find ( ':hidden' ) . show ( ) ;
157
152
}
158
153
} ,
159
154
'rollback-warning' : {
@@ -176,10 +171,8 @@ define([
176
171
submitHandler : jQuery . proxy ( this . submitRollback , this )
177
172
} ) ;
178
173
this . modal . find ( '#rollback-form' ) . submit ( ) ;
179
- this . modal . modal ( 'closeModal' ) ;
180
174
} ,
181
175
opened : function ( ) {
182
- this . modal . find ( '*:hidden' ) . show ( ) ;
183
176
this . toggleFtpCredentialsForm ( ) ;
184
177
}
185
178
}
0 commit comments