@@ -250,19 +250,21 @@ function restoreDatabase(fromClient){
250
250
var l2='<?php _e ("This operation <strong>WILL ERASE <em>EVERY</em> CURRENT DATA</strong>. before trying restore<br/> " ); ?> ';
251
251
var l3='<?php _e ("Be aware of making a backup copy before continue<br/><br/> " ); ?> ';
252
252
var l4='<?php _e ("To continue enter administrator password and press <em>Accept</em> " ); ?> ';
253
- var title ='<?php _e ('DataBase restore ' ); ?> ';
253
+ var titl ='<?php _e ('DataBase restore ' ); ?> ';
254
254
if (fromClient) {
255
255
// use file selected from user
256
- if ($('#tools-restoreFile').val()=="") {
256
+ if ($('#tools-restoreFile').val()=== "") {
257
257
$.messager.alert("Restore",'<?php _e ("You should specify an <em>.sql</em> file with a previous backup " ); ?> ',"error");
258
258
return false;
259
259
}
260
260
} else {
261
- title ='<?php _e ('DataBase update ' ); ?> ';
261
+ titl ='<?php _e ('DataBase update ' ); ?> ';
262
262
}
263
- $.messager.password(title,l1+l2+l3+l4 , function(pass){
264
- if (pass){
265
- // comprobamos si el password es correcto
263
+ $.messager.password(
264
+ titl,
265
+ l1+l2+l3+l4,
266
+ function(pass){
267
+ if (!pass) return false;// comprobamos si el password es correcto
266
268
checkPassword(ac_authInfo.Login,pass,function(data) {
267
269
if (data.errorMsg) {
268
270
// error en comprobación de password
@@ -346,9 +348,10 @@ function getProgress(){
346
348
});
347
349
348
350
if (fromClient) {
351
+ let tupl=$('#tools-uploader');
349
352
// upload local database file
350
353
// incicializamos el uploader
351
- $('#tools-uploader') .fileUploader( {
354
+ tupl .fileUploader( {
352
355
selector: '#tools-restoreFile', // ID of "file" input field
353
356
button: null, // ID of submit button
354
357
progress: setProgressValue, // ID or function to send upload progress info to
@@ -367,7 +370,7 @@ function getProgress(){
367
370
});
368
371
369
372
// arrancamos el proceso de restore
370
- $('#tools-uploader') .fileUploader('upload');
373
+ tupl .fileUploader('upload');
371
374
} else {
372
375
// download database from master server
373
376
doRestore();
@@ -377,7 +380,7 @@ function getProgress(){
377
380
}
378
381
});
379
382
}
380
- } ).window('resize',{width:640 });
383
+ ).window('resize',{width:450 });
381
384
}
382
385
383
386
function clearDatabase(){
0 commit comments