]> git.p6c8.net - jirafeau_project.git/commitdiff
[FEATURE] Switch upload status in tab title
authorpixelbrackets <mail@pixelbrackets.de>
Tue, 19 Dec 2017 13:01:56 +0000 (14:01 +0100)
committerpixelbrackets <mail@pixelbrackets.de>
Tue, 19 Dec 2017 13:01:56 +0000 (14:01 +0100)
Switch the upload status and project name in the tab title,
to show the current upload status in small tabs as well.

Refs #141

lib/functions.js.php

index 7177b85cfdfc155317e0d54ab4b1530dfacf798e..7d248b5c7b5c4e616eb7a8369616ad9644f06643 100644 (file)
@@ -119,7 +119,7 @@ function show_link (reference, delete_code, crypt_key, date)
     document.getElementById('uploading').style.display = 'none';
     document.getElementById('upload').style.display = 'none';
     document.getElementById('upload_finished').style.display = '';
     document.getElementById('uploading').style.display = 'none';
     document.getElementById('upload').style.display = 'none';
     document.getElementById('upload_finished').style.display = '';
-    document.title = "<?php echo empty($cfg['title']) ? 'Jirafeau' : $cfg['title']; ?> - 100%";
+    document.title = "100% - <?php echo empty($cfg['title']) ? 'Jirafeau' : $cfg['title']; ?>";
 
     // Download page
     var download_link_href = 'f.php?h=' + reference;
 
     // Download page
     var download_link_href = 'f.php?h=' + reference;
@@ -203,7 +203,7 @@ function show_upload_progression (percentage, speed, time_left)
     document.getElementById('uploaded_percentage').innerHTML = percentage;
     document.getElementById('uploaded_speed').innerHTML = speed;
     document.getElementById('uploaded_time').innerHTML = time_left;
     document.getElementById('uploaded_percentage').innerHTML = percentage;
     document.getElementById('uploaded_speed').innerHTML = speed;
     document.getElementById('uploaded_time').innerHTML = time_left;
-    document.title = "<?php echo empty($cfg['title']) ? 'Jirafeau' : $cfg['title']; ?> - " + percentage;
+    document.title = percentage + " - <?php echo empty($cfg['title']) ? 'Jirafeau' : $cfg['title']; ?>";
 }
 
 function hide_upload_progression ()
 }
 
 function hide_upload_progression ()

patrick-canterino.de