Subversion Repositories eFlore/Applications.cel

Rev

Rev 2003 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2003 Rev 2648
Line 1361... Line 1361...
1361
    var json_response = {
1361
    var json_response = {
1362
      'success' : false,
1362
      'success' : false,
1363
      'message' : this.response
1363
      'message' : this.response
1364
    }
1364
    }
Line 1365... Line -...
1365
    
-
 
1366
    if(response.responseText == '') {
-
 
1367
	var data = {
-
 
1368
	      record : options.record,
-
 
1369
	      response : {
-
 
1370
		'success' : true,
-
 
1371
		'message' : "OK"
-
 
1372
	      }
-
 
1373
	}
-
 
1374
	this.fsa.postEvent('file-upload-success', data);
-
 
1375
	return;
-
 
1376
    }
-
 
1377
    
1365
    
1378
    if(response.responseText == "OK" )
1366
    if(response.responseText == "OK" )
1379
    {
1367
    {
1380
    	var data = {
1368
    	var data = {
1381
		      record : options.record,
1369
		      record : options.record,
Line 1510... Line 1498...
1510
});
1498
});
Line 1511... Line 1499...
1511
 
1499
 
Line 1512... Line 1500...
1512
// ---------------------------------------------------------------------------------------------- //
1500
// ---------------------------------------------------------------------------------------------- //
1513
 
1501
 
-
 
1502
var p = Ext.ux.UploadDialog.Dialog.prototype;
1514
var p = Ext.ux.UploadDialog.Dialog.prototype;
1503
var i18n_tab = {
1515
p.i18n = {
1504
	"fr" : {
1516
  title: 'Ajout simple de fichiers',
1505
	  title: 'Ajout simple de fichiers',
1517
  state_col_title: 'Etat',
1506
	  state_col_title: 'Etat',
1518
  state_col_width: 70,
1507
	  state_col_width: 70,
Line 1541... Line 1530...
1541
  note_processing: 'Envoi...',
1530
	  note_processing: 'Envoi...',
1542
  note_upload_failed: 'Le serveur est inaccessible ou bien une erreur serveur s\'est produite.',
1531
	  note_upload_failed: 'Le serveur est inaccessible ou bien une erreur serveur s\'est produite.',
1543
  note_upload_success: 'OK.',
1532
	  note_upload_success: 'OK.',
1544
  note_upload_error: 'Erreur d\'envoi.',
1533
	  note_upload_error: 'Erreur d\'envoi.',
1545
  note_aborted: 'Annulé par l\'utilisateur.'
1534
	  note_aborted: 'Annulé par l\'utilisateur.'
-
 
1535
	},
-
 
1536
	"en" : {
-
 
1537
	  title: 'File upload dialog',
-
 
1538
	  state_col_title: 'State',
-
 
1539
	  state_col_width: 70,
-
 
1540
	  filename_col_title: 'Filename',
-
 
1541
	  filename_col_width: 230,  
-
 
1542
	  note_col_title: 'Note',
-
 
1543
	  note_col_width: 150,
-
 
1544
	  add_btn_text: 'Add',
-
 
1545
	  add_btn_tip: 'Add file into upload queue.',
-
 
1546
	  remove_btn_text: 'Remove',
-
 
1547
	  remove_btn_tip: 'Remove file from upload queue.',
-
 
1548
	  reset_btn_text: 'Reset',
-
 
1549
	  reset_btn_tip: 'Reset queue.',
-
 
1550
	  upload_btn_start_text: 'Upload',
-
 
1551
	  upload_btn_stop_text: 'Abort',
-
 
1552
	  upload_btn_start_tip: 'Upload queued files to the server.',
-
 
1553
	  upload_btn_stop_tip: 'Stop upload.',
-
 
1554
	  close_btn_text: 'Close',
-
 
1555
	  close_btn_tip: 'Close the dialog.',
-
 
1556
	  progress_waiting_text: 'Waiting...',
-
 
1557
	  progress_uploading_text: 'Uploading: {0} of {1} files complete.',
-
 
1558
	  error_msgbox_title: 'Error',
-
 
1559
	  permitted_extensions_join_str: ',',
-
 
1560
	  err_file_type_not_permitted: 'Selected file extension isn\'t permitted.<br/>Please select files with following extensions: {1}',
-
 
1561
	  note_queued_to_upload: 'Queued for upload.',
-
 
1562
	  note_processing: 'Uploading...',
-
 
1563
	  note_upload_failed: 'Server is unavailable or internal server error occured.',
-
 
1564
	  note_upload_success: 'OK.',
-
 
1565
	  note_upload_error: 'Upload error.',
-
 
1566
	  note_aborted: 'Aborted by user.'
-
 
1567
	}
-
 
1568
}
-
 
1569
	
-
 
1570
function getUrlVars() {
-
 
1571
    var vars = {};
-
 
1572
    var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
-
 
1573
        vars[key] = value;
-
 
1574
    });
-
 
1575
    return vars;
-
 
1576
}
-
 
1577
 
-
 
1578
 
-
 
1579
if(!!getUrlVars()["lang"]) {
-
 
1580
	p.i18n = i18n_tab[getUrlVars()["lang"]];
-
 
1581
} else {
-
 
1582
	p.i18n = i18n_tab[configuration.langueDefaut];
1546
}
1583
}
1547
1584