plugins/kolab_files

Aleksander Machniak machniak at kolabsys.com
Wed Nov 12 09:50:36 CET 2014


 plugins/kolab_files/kolab_files.js |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f647d5923748309b721ee4d81a9526a89df5b2e8
Author: Aleksander Machniak <machniak at kolabsys.com>
Date:   Wed Nov 12 03:49:31 2014 -0500

    Prevent from javascript errors if Chwala's file_api.js wasn't loaded (#3651)

diff --git a/plugins/kolab_files/kolab_files.js b/plugins/kolab_files/kolab_files.js
index 7eb3600..5175573 100644
--- a/plugins/kolab_files/kolab_files.js
+++ b/plugins/kolab_files/kolab_files.js
@@ -25,7 +25,7 @@
  * for the JavaScript code in this file.
  */
 
-window.rcmail && rcmail.addEventListener('init', function() {
+window.rcmail && window.files_api && rcmail.addEventListener('init', function() {
   if (rcmail.task == 'mail') {
     // mail compose
     if (rcmail.env.action == 'compose') {
@@ -994,7 +994,7 @@ rcube_webmail.prototype.files_print = function()
 
 rcube_webmail.prototype.files_set_quota = function(p)
 {
-  if (p.total) {
+  if (p.total && window.file_api) {
     p.used *= 1024;
     p.total *= 1024;
     p.title = file_api.file_size(p.used) + ' / ' + file_api.file_size(p.total)




More information about the commits mailing list