summaryrefslogtreecommitdiff
path: root/plugins/kolab_files
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2014-11-12 08:49:31 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2014-11-12 08:49:31 (GMT)
commitf647d5923748309b721ee4d81a9526a89df5b2e8 (patch)
tree64778a31db2a142ad10215b7b0ea7c314f9361df /plugins/kolab_files
parente2001223082beb2c730c9646c055e82b91a02dee (diff)
downloadroundcubemail-plugins-kolab-f647d5923748309b721ee4d81a9526a89df5b2e8.tar.gz
Prevent from javascript errors if Chwala's file_api.js wasn't loaded (#3651)
Diffstat (limited to 'plugins/kolab_files')
-rw-r--r--plugins/kolab_files/kolab_files.js4
1 files changed, 2 insertions, 2 deletions
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)