|
|
@ -109,7 +109,6 @@ var odfViewer = {
|
|
|
|
$('#app-content').append($iframe);
|
|
|
|
$('#app-content').append($iframe);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onClose: function() {
|
|
|
|
onClose: function() {
|
|
|
|
if(typeof FileList !== "undefined") {
|
|
|
|
if(typeof FileList !== "undefined") {
|
|
|
|
FileList.setViewerMode(false);
|
|
|
|
FileList.setViewerMode(false);
|
|
|
@ -206,6 +205,14 @@ $(document).ready(function() {
|
|
|
|
&& typeof OCA.Files !== 'undefined'
|
|
|
|
&& typeof OCA.Files !== 'undefined'
|
|
|
|
&& typeof OCA.Files.fileActions !== 'undefined'
|
|
|
|
&& typeof OCA.Files.fileActions !== 'undefined'
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
|
|
|
|
// check if texteditor app is enabled and loaded...
|
|
|
|
|
|
|
|
if (_.isUndefined(OCA.Files_Texteditor)) {
|
|
|
|
|
|
|
|
// it is not, so we do open text files with this app too.
|
|
|
|
|
|
|
|
odfViewer.supportedMimes.push('text/plain');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// notice: when changing 'supportedMimes' interactively (e.g. dev console),
|
|
|
|
|
|
|
|
// register() needs to be re-run to re-register the fileActions.
|
|
|
|
odfViewer.register();
|
|
|
|
odfViewer.register();
|
|
|
|
|
|
|
|
|
|
|
|
$.get(
|
|
|
|
$.get(
|
|
|
@ -218,7 +225,7 @@ $(document).ready(function() {
|
|
|
|
|
|
|
|
|
|
|
|
// FIXME: Hack for single public file view since it is not attached to the fileslist
|
|
|
|
// FIXME: Hack for single public file view since it is not attached to the fileslist
|
|
|
|
$(document).ready(function(){
|
|
|
|
$(document).ready(function(){
|
|
|
|
// FIXME: FIlter compatible mime types
|
|
|
|
// FIXME: Filter compatible mime types
|
|
|
|
if ($('#isPublic').val() && odfViewer.supportedMimes.indexOf($('#mimetype').val()) !== -1) {
|
|
|
|
if ($('#isPublic').val() && odfViewer.supportedMimes.indexOf($('#mimetype').val()) !== -1) {
|
|
|
|
odfViewer.onEdit($('#filename').val());
|
|
|
|
odfViewer.onEdit($('#filename').val());
|
|
|
|
}
|
|
|
|
}
|
|
|
|