Changeset View
Changeset View
Standalone View
Standalone View
plugins/kolab_files/kolab_files.js
Show First 20 Lines • Show All 216 Lines • ▼ Show 20 Lines | display_message: function(label, type, is_txt, timeout) { | ||||
if (!is_txt) | if (!is_txt) | ||||
label = 'kolab_files.' + label; | label = 'kolab_files.' + label; | ||||
return rcmail.display_message(label, type, timeout * 1000); | return rcmail.display_message(label, type, timeout * 1000); | ||||
} | } | ||||
}); | }); | ||||
if (window.document_editor_api) | if (window.document_editor_api) | ||||
document_editor = new document_editor_api(editor_config); | document_editor = new document_editor_api(editor_config); | ||||
else | else if (window.manticore_api) | ||||
document_editor = new manticore_api(editor_config); | document_editor = new manticore_api(editor_config); | ||||
else | |||||
document_editor = { | |||||
save: function() { | |||||
console.log('Document Editor not available'); | |||||
}, | |||||
export: function() { | |||||
console.log('Document Editor not available'); | |||||
}, | |||||
print: function() { | |||||
console.log('Document Editor not available'); | |||||
}, | |||||
invitation_request: function() { | |||||
console.log('Document Editor not available'); | |||||
}, | |||||
invitation_msg: function() { | |||||
console.log('Document Editor not available'); | |||||
}, | |||||
invitation_accept: function() { | |||||
console.log('Document Editor not available'); | |||||
}, | |||||
invitation_decline: function() { | |||||
console.log('Document Editor not available'); | |||||
}, | |||||
terminate: function() { | |||||
console.log('Document Editor not available'); | |||||
} | |||||
}; | |||||
}; | }; | ||||
// returns API authorization token | // returns API authorization token | ||||
function kolab_files_token() | function kolab_files_token() | ||||
{ | { | ||||
// consider the token from parent window more reliable (fresher) than in framed window | // consider the token from parent window more reliable (fresher) than in framed window | ||||
// it's because keep-alive is not requested in frames | // it's because keep-alive is not requested in frames | ||||
return window.parent && parent.rcmail && parent.rcmail.env.files_token ? parent.rcmail.env.files_token : rcmail.env.files_token; | return window.parent && parent.rcmail && parent.rcmail.env.files_token ? parent.rcmail.env.files_token : rcmail.env.files_token; | ||||
▲ Show 20 Lines • Show All 3,546 Lines • Show Last 20 Lines |