Subversion Repositories eFlore/Applications.cel

Rev

Rev 1845 | Rev 2003 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1845 Rev 1847
Line 20... Line 20...
20
  this.queue = [];
20
  this.queue = [];
21
  this.is_processing = false;
21
  this.is_processing = false;
Line 22... Line 22...
22
  
22
  
23
  /**
23
  /**
24
   * Posts event into the queue.
24
   * Posts event into the queue.
25
   * 
25
   * 
26
   * @access public
26
   * @access public
27
   * @param mixed event Event identificator.
27
   * @param mixed event Event identificator.
28
   * @param mixed data  Event data.
28
   * @param mixed data  Event data.
29
   */
29
   */
Line 1358... Line 1358...
1358
  
1358
  
1359
  onAjaxSuccess : function(response, options)
1359
  onAjaxSuccess : function(response, options)
1360
  {
1360
  {
1361
    var json_response = {
1361
    var json_response = {
1362
      'success' : false,
1362
      'success' : false,
-
 
1363
      'message' : this.response
-
 
1364
    }
-
 
1365
    
-
 
1366
    if(this.response == 'OK' )
-
 
1367
    {
1363
      'error' : this.i18n.note_upload_error
1368
    	json_response.success = true ;
1364
    }
-
 
1365
    try { 
-
 
1366
        var rt = response.responseText;
-
 
1367
        var filter = rt.match(/^<[^>]+>((?:.|\n)*)<\/[^>]+>$/);
-
 
1368
        if (filter) {
-
 
1369
            rt = filter[1];
-
 
1370
        }
-
 
1371
        json_response = Ext.util.JSON.decode(rt); 
-
 
1372
    } 
-
 
Line 1373... Line 1369...
1373
    catch (e) {}
1369
    }
1374
    
1370
    
1375
    var data = {
1371
    var data = {
1376
      record: options.record,
1372
      record: options.record,
Line 1389... Line 1385...
1389
  {
1385
  {
1390
    var data = {
1386
    var data = {
1391
      record : options.record,
1387
      record : options.record,
1392
      response : {
1388
      response : {
1393
        'success' : false,
1389
        'success' : false,
1394
        'error' : this.i18n.note_upload_failed
1390
       	'error' : this.i18n.note_upload_error
1395
      }
1391
      }
1396
    }
1392
    }
Line 1397... Line 1393...
1397
 
1393
 
1398
    this.fsa.postEvent('file-upload-failed', data);
1394
    this.fsa.postEvent('file-upload-failed', data);
Line 1505... Line 1501...
1505
 
1501
 
Line 1506... Line 1502...
1506
// ---------------------------------------------------------------------------------------------- //
1502
// ---------------------------------------------------------------------------------------------- //
1507
 
1503
 
1508
var p = Ext.ux.UploadDialog.Dialog.prototype;
1504
var p = Ext.ux.UploadDialog.Dialog.prototype;
1509
p.i18n = {
1505
p.i18n = {
1510
  title: 'File upload dialog',
1506
  title: 'Ajout simple de fichiers',
1511
  state_col_title: 'State',
1507
  state_col_title: 'Etat',
1512
  state_col_width: 70,
1508
  state_col_width: 70,
1513
  filename_col_title: 'Filename',
1509
  filename_col_title: 'Fichier',
1514
  filename_col_width: 230,  
1510
  filename_col_width: 230,  
1515
  note_col_title: 'Note',
1511
  note_col_title: 'Note',
1516
  note_col_width: 150,
1512
  note_col_width: 150,
1517
  add_btn_text: 'Add',
1513
  add_btn_text: 'Ajouter',
1518
  add_btn_tip: 'Add file into upload queue.',
1514
  add_btn_tip: 'Ajoute un fichier à la liste.',
1519
  remove_btn_text: 'Remove',
1515
  remove_btn_text: 'Supprimer',
1520
  remove_btn_tip: 'Remove file from upload queue.',
1516
  remove_btn_tip: 'Supprime un fichier de la liste.',
1521
  reset_btn_text: 'Reset',
1517
  reset_btn_text: 'Vider',
1522
  reset_btn_tip: 'Reset queue.',
1518
  reset_btn_tip: 'Vider la liste.',
1523
  upload_btn_start_text: 'Upload',
1519
  upload_btn_start_text: 'Envoyer',
1524
  upload_btn_stop_text: 'Abort',
1520
  upload_btn_stop_text: 'Annuler',
1525
  upload_btn_start_tip: 'Upload queued files to the server.',
1521
  upload_btn_start_tip: 'Envoie les fichiers de la liste sur le serveur.',
1526
  upload_btn_stop_tip: 'Stop upload.',
1522
  upload_btn_stop_tip: 'Stopper l\'envoi.',
1527
  close_btn_text: 'Close',
1523
  close_btn_text: 'Fermer',
1528
  close_btn_tip: 'Close the dialog.',
1524
  close_btn_tip: 'Ferme la fenêtre.',
1529
  progress_waiting_text: 'Waiting...',
1525
  progress_waiting_text: 'En attente...',
1530
  progress_uploading_text: 'Uploading: {0} of {1} files complete.',
1526
  progress_uploading_text: 'Envoi de: {0} sur {1} fichiers terminé.',
1531
  error_msgbox_title: 'Error',
1527
  error_msgbox_title: 'Erreur',
1532
  permitted_extensions_join_str: ',',
1528
  permitted_extensions_join_str: ',',
1533
  err_file_type_not_permitted: 'Selected file extension isn\'t permitted.<br/>Please select files with following extensions: {1}',
1529
  err_file_type_not_permitted: 'Cette extension de fichier n\'est pas permise.<br/>Selectionnez un fichier portant une des extensions suivantes: {1}',
1534
  note_queued_to_upload: 'Queued for upload.',
1530
  note_queued_to_upload: 'Prêt à être envoyé.',
1535
  note_processing: 'Uploading...',
1531
  note_processing: 'Envoi...',
1536
  note_upload_failed: 'Server is unavailable or internal server error occured.',
1532
  note_upload_failed: 'Le serveur est inaccessible ou bien une erreur serveur s\'est produite.',
1537
  note_upload_success: 'OK.',
1533
  note_upload_success: 'OK.',
1538
  note_upload_error: 'Upload error.',
1534
  note_upload_error: 'Erreur d\'envoi.',
1539
  note_aborted: 'Aborted by user.'
1535
  note_aborted: 'Annulé par l\'utilisateur.'