2017-03-15 06:29:51 +00:00
|
|
|
$(document).ready(function() {
|
|
|
|
|
2017-03-15 06:47:12 +00:00
|
|
|
if (OCA.Files && OCA.Files.fileActions && !$('#sharingToken').val()) {
|
2017-03-15 06:29:51 +00:00
|
|
|
|
|
|
|
function openFile(file, data){
|
|
|
|
var url = OC.generateUrl('apps/gpxedit/?file={filepath}',{'filepath': data.dir+'/'+file});
|
|
|
|
window.open(url, '_blank');
|
|
|
|
}
|
|
|
|
|
|
|
|
OCA.Files.fileActions.registerAction({
|
|
|
|
name: 'editFileGpxEdit',
|
|
|
|
displayName: t('gpxedit', 'Edit in GpxEdit'),
|
|
|
|
mime: 'application/gpx+xml',
|
|
|
|
permissions: OC.PERMISSION_READ,
|
|
|
|
icon: function () {return OC.imagePath('gpxedit', 'app_black');},
|
|
|
|
actionHandler: openFile
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|