diff --git a/README.md b/README.md index 74e601d..e2cc100 100755 --- a/README.md +++ b/README.md @@ -1 +1,8 @@ -# wopiviewer \ No newline at end of file +# wopiviewer + +Don't forget to to set the following in config.php + 'wopi.secret' + 'wopi.baseurl' + 'wopi.oos' + 'wopi.cabundle' + diff --git a/appinfo/app.php b/appinfo/app.php index fb7f9c8..99bdf38 100755 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -9,40 +9,11 @@ * @copyright Hugo Gonzalez Labrador (CERN) 2017 */ -namespace OCA\WopiViewer\AppInfo; - -use OCP\AppFramework\App; - -require_once __DIR__ . '/autoload.php'; - -$app = new App('wopiviewer'); -$container = $app->getContainer(); +if (\OCP\Util::getVersion()[0] >= 10) { + $policy = new OCP\AppFramework\Http\EmptyContentSecurityPolicy(); + $policy->addAllowedFrameDomain(\OC::$server->getConfig()->getSystemValue('wopi.oos','self')); + \OC::$server->getContentSecurityPolicyManager()->addDefaultPolicy($policy); +} \OCP\Util::addScript('wopiviewer', 'script'); \OCP\Util::addStyle('wopiviewer', 'style'); - -/* -$container->query('OCP\INavigationManager')->add(function () use ($container) { - $urlGenerator = $container->query('OCP\IURLGenerator'); - $l10n = $container->query('OCP\IL10N'); - return [ - // the string under which your app will be referenced in owncloud - 'id' => 'wopiviewer', - - // sorting weight for the navigation. The higher the number, the higher - // will it be listed in the navigation - 'order' => 10, - - // the route that will be shown on startup - 'href' => $urlGenerator->linkToRoute('wopiviewer.page.index'), - - // the icon that will be shown in the navigation - // this file needs to exist in img/ - 'icon' => $urlGenerator->imagePath('wopiviewer', 'app.svg'), - - // the title of your application. This will be used in the - // navigation or on the settings page of your app - 'name' => $l10n->t('Wopi Viewer'), - ]; -}); -*/ \ No newline at end of file diff --git a/appinfo/info.xml b/appinfo/info.xml index c027850..8c5eb6a 100755 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -9,6 +9,6 @@ WopiViewer other - + diff --git a/appinfo/routes.php b/appinfo/routes.php index 3597f72..edf203b 100755 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -19,7 +19,7 @@ */ return [ 'routes' => [ - ['name' => 'page#do_open', 'url' => '/open', 'verb' => 'POST'], - ['name' => 'page#do_public_open', 'url' => '/publicopen', 'verb' => 'POST'], + ['name' => 'page#do_open', 'url' => '/open', 'verb' => 'POST'], + ['name' => 'page#do_public_open', 'url' => '/publicopen', 'verb' => 'POST'], ] -]; \ No newline at end of file +]; diff --git a/controller/pagecontroller.php b/controller/pagecontroller.php index bd8a2e3..9d5bc51 100755 --- a/controller/pagecontroller.php +++ b/controller/pagecontroller.php @@ -12,13 +12,15 @@ namespace OCA\WopiViewer\Controller; use Guzzle\Http\Client; -use OC\Files\ObjectStore\EosProxy; -use OC\Files\ObjectStore\EosUtil; +//use OC\Files\ObjectStore\EosProxy; +//use OC\Files\ObjectStore\EosUtil; use OCP\IRequest; use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\Controller; use Punic\Data; +use OC\Files\Filesystem; +use OC\Files\View; class PageController extends Controller { @@ -26,6 +28,7 @@ class PageController extends Controller { private $userId; private $wopiBaseUrl; private $wopiSecret; + private $wopiOOS; public function __construct($AppName, IRequest $request, $UserId) { parent::__construct($AppName, $request); @@ -33,6 +36,12 @@ public function __construct($AppName, IRequest $request, $UserId) { $this->wopiSecret = \OC::$server->getConfig()->getSystemValue("wopi.secret", "please change me"); $this->wopiBaseUrl = \OC::$server->getConfig()->getSystemValue("wopi.baseurl", "http://wopiserver-test:8080"); $this->wopiCABundle = \OC::$server->getConfig()->getSystemValue("wopi.cabundle", true); + $this->wopiOOS = \OC::$server->getConfig()->getSystemValue("wopi.oos", "https://oos-test"); + + $view = new \OC\Files\View('/' . $UserId); + if (!$view->is_dir('wopi')) { + $view->mkdir('wopi'); + } } /** @@ -56,6 +65,8 @@ public function index() { * @NoAdminRequired */ public function doOpen($filename, $folderurl) { + $username = \OC::$server->getUserSession()->getUser()->getUID(); + /* $username = \OC::$server->getUserSession()->getLoginName(); $uidAndGid = EosUtil::getUidAndGid($username); if($uidAndGid === null) { @@ -63,18 +74,20 @@ public function doOpen($filename, $folderurl) { list($uid, $gid) = $uidAndGid; if(!$uid || !$gid) { return new DataResponse(['error' => 'username does not have a valid uid and gid']); - } - + }*/ $node = \OC::$server->getUserFolder($username)->get($filename); $info = $node->stat(); - $eosPath = $info['eospath']; + //$eosPath = $info['eospath']; + $eosPath = $node->getPath(); + $uid = $info['uid']; + $gid = $info['gid']; $canedit = "false"; // we send boolean as strings to wopi if ($node->isReadable()) { if($node->isUpdateable()) { $canedit = "true"; } $client = new Client(); - $request = $client->createRequest("GET", sprintf("%s/cbox/open", $this->wopiBaseUrl), null, null, ['verify' => $this->wopiCABundle]); + $request = $client->createRequest("GET", sprintf("%s/wopi/cbox/open", $this->wopiBaseUrl), null, null, ['verify' => $this->wopiCABundle]); $request->addHeader("Authorization", "Bearer " . $this->wopiSecret); $request->getQuery()->add("ruid", $uid); $request->getQuery()->add("rgid", $gid); @@ -92,7 +105,7 @@ public function doOpen($filename, $folderurl) { if ($response->getStatusCode() == 200) { $body = $response->getBody(true); $body = urldecode($body); - return new DataResponse(['wopi_src' => $body]); + return new DataResponse(['wopi_src' => $body, 'oos' => $this->wopiOOS]); } else { return new DataResponse(['error' => 'error opening file in wopi server']); } @@ -121,6 +134,7 @@ public function doPublicOpen($filename, $canedit, $token, $folderurl) { $owner = $row['uid_owner']; $fileID = $row['item_source']; + /* $uidAndGid = EosUtil::getUidAndGid($owner); if($uidAndGid === null) { return new DataResponse(['error' => 'username does not have a valid uid and gid']); @@ -129,6 +143,7 @@ public function doPublicOpen($filename, $canedit, $token, $folderurl) { if(!$uid || !$gid) { return new DataResponse(['error' => 'username does not have a valid uid and gid']); } + */ $canedit="false"; if((int)($row['permissions']) > 1) { @@ -142,7 +157,7 @@ public function doPublicOpen($filename, $canedit, $token, $folderurl) { $eosPath = $info['eospath']; if ($node->isReadable()) { $client = new Client(); - $request = $client->createRequest("GET", sprintf("%s/cbox/open", $this->wopiBaseUrl), null, null, ['verify' => $this->wopiCABundle]); + $request = $client->createRequest("GET", sprintf("%s/wopi/cbox/open", $this->wopiBaseUrl), null, null, ['verify' => $this->wopiCABundle]); $request->addHeader("Authorization", "Bearer " . $this->wopiSecret); $request->getQuery()->add("ruid", $uid); $request->getQuery()->add("rgid", $gid); @@ -154,7 +169,7 @@ public function doPublicOpen($filename, $canedit, $token, $folderurl) { if ($response->getStatusCode() == 200) { $body = $response->getBody(true); $body = urldecode($body); - return new DataResponse(['wopi_src' => $body]); + return new DataResponse(['wopi_src' => $body, 'oos' => $this->wopiOOS]); } else { return new DataResponse(['error' => 'error opening file in wopi server']); } diff --git a/js/script.js b/js/script.js index 23391d0..dee5027 100755 --- a/js/script.js +++ b/js/script.js @@ -13,15 +13,18 @@ // the hack for owncloud 8 for having the new file menu entry can work. OCA.WOPIViewer = {}; - var wordViewer = "https://oos.web.cern.ch/wv/wordviewerframe.aspx?WOPISrc="; - var wordNew = "https://oos.web.cern.ch/we/wordeditorframe.aspx?new=1&WOPISrc="; - var wordEditor = "https://oos.web.cern.ch/we/wordeditorframe.aspx?WOPISrc="; - var powerpointViewer = "https://oos.web.cern.ch/p/PowerPointFrame.aspx?WOPISrc="; - var powerpointEditor = "https://oos.web.cern.ch/p/PowerPointFrame.aspx?PowerPointView=EditView&WOPISrc="; - var powerpointNew = "https://oos.web.cern.ch/p/PowerPointFrame.aspx?PowerPointView=EditView&New=1&WOPISrc="; - var excelViewer = "https://oos.web.cern.ch/x/_layouts/xlviewerinternal.aspx?WOPISrc="; - var excelNew = "https://oos.web.cern.ch/x/_layouts/xlviewerinternal.aspx?edit=1&new=1&WOPISrc="; - var excelEditor = "https://oos.web.cern.ch/x/_layouts/xlviewerinternal.aspx?edit=1&WOPISrc="; + var wordViewer = "/wv/wordviewerframe.aspx?WOPISrc="; + var wordNew = "/we/wordeditorframe.aspx?new=1&WOPISrc="; + var wordEditor = "/we/wordeditorframe.aspx?WOPISrc="; + var powerpointViewer = "/p/PowerPointFrame.aspx?WOPISrc="; + var powerpointEditor = "/p/PowerPointFrame.aspx?PowerPointView=EditView&WOPISrc="; + var powerpointNew = "/p/PowerPointFrame.aspx?PowerPointView=EditView&New=1&WOPISrc="; + var excelViewer = "/x/_layouts/xlviewerinternal.aspx?WOPISrc="; + var excelNew = "/x/_layouts/xlviewerinternal.aspx?edit=1&new=1&WOPISrc="; + var excelEditor = "/x/_layouts/xlviewerinternal.aspx?edit=1&WOPISrc="; + var onenoteViewer = "/o/OneNoteFrame.aspx?edit=0&WOPISrc="; + var onenoteNew = "/o/OneNoteFrame.aspx?edit=1&new=1&WOPISrc="; + var onenoteEditor = "/o/OneNoteFrame.aspx?edit=1&WOPISrc="; var closeDocument = function (e) { e.preventDefault(); @@ -95,7 +98,7 @@ $.post(url, data).success(function (response) { if (response.wopi_src) { window.location.hash = 'office'; - var viewerURL = targetURL + encodeURI(response.wopi_src); + var viewerURL = response.oos + targetURL + encodeURI(response.wopi_src); setView(viewerURL, response.wopi_src, basename); var closeButton = '

The Office application is in beta

'; $("header div#header").append(closeButton); @@ -167,22 +170,104 @@ sendOpen(filename, data, excelEditor); } }, + onViewOnenote: function (filename, data) { + // if file size is 0 we ask office online + // to create an empty docx file + var filesize = parseInt(data.$file.attr("data-size")); + if(filesize === 0) { + sendOpen(filename, data, onenoteNew); + } else { + sendOpen(filename, data, onenoteViewer); + } + }, + onEditOnenote: function (filename, data) { + // if file size is 0 we ask office online + // to create an empty docx file + var filesize = parseInt(data.$file.attr("data-size")); + if(filesize === 0) { + sendOpen(filename, data, onenoteNew); + } else { + sendOpen(filename, data, onenoteEditor); + } + }, }; $(document).ready(function () { if (OCA && OCA.Files) { OCA.Files.fileActions.register('application/msword', 'Edit in Office Online', OC.PERMISSION_UPDATE, OC.imagePath('core', 'actions/play'), wopiViewer.onEditWord); + OCA.Files.fileActions.register('application/vnd.ms-word.document.macroEnabled.12', 'Edit in Office Online', OC.PERMISSION_UPDATE, OC.imagePath('core', 'actions/play'), wopiViewer.onEditWord); + OCA.Files.fileActions.register('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'Edit in Office Online', OC.PERMISSION_UPDATE, OC.imagePath('core', 'actions/play'), wopiViewer.onEditWord); + OCA.Files.fileActions.register('application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'Edit in Office Online', OC.PERMISSION_UPDATE, OC.imagePath('core', 'actions/play'), wopiViewer.onEditWord); + //OCA.Files.fileActions.register('application/vnd.oasis.opendocument.text', 'Edit in Office Online', OC.PERMISSION_UPDATE, OC.imagePath('core', 'actions/play'), wopiViewer.onEditWord); OCA.Files.fileActions.register('application/vnd.ms-powerpoint', 'Edit in Office Online', OC.PERMISSION_UPDATE, OC.imagePath('core', 'actions/play'), wopiViewer.onEditPowerpoint); + OCA.Files.fileActions.register('application/vnd.ms-powerpoint.addin.macroEnabled.12', 'Edit in Office Online', OC.PERMISSION_UPDATE, OC.imagePath('core', 'actions/play'), wopiViewer.onEditPowerpoint); + OCA.Files.fileActions.register('application/vnd.ms-powerpoint.presentation.macroEnabled.12', 'Edit in Office Online', OC.PERMISSION_UPDATE, OC.imagePath('core', 'actions/play'), wopiViewer.onEditPowerpoint); + OCA.Files.fileActions.register('application/vnd.ms-powerpoint.slideshow.macroEnabled.12', 'Edit in Office Online', OC.PERMISSION_UPDATE, OC.imagePath('core', 'actions/play'), wopiViewer.onEditPowerpoint); + OCA.Files.fileActions.register('application/vnd.ms-powerpoint.template.macroEnabled.12', 'Edit in Office Online', OC.PERMISSION_UPDATE, OC.imagePath('core', 'actions/play'), wopiViewer.onEditPowerpoint); + OCA.Files.fileActions.register('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'Edit in Office Online', OC.PERMISSION_UPDATE, OC.imagePath('core', 'actions/play'), wopiViewer.onEditPowerpoint); + OCA.Files.fileActions.register('application/vnd.openxmlformats-officedocument.presentationml.template', 'Edit in Office Online', OC.PERMISSION_UPDATE, OC.imagePath('core', 'actions/play'), wopiViewer.onEditPowerpoint); + OCA.Files.fileActions.register('application/vnd.openxmlformats-officedocument.presentationml.slideshow', 'Edit in Office Online', OC.PERMISSION_UPDATE, OC.imagePath('core', 'actions/play'), wopiViewer.onEditPowerpoint); + //OCA.Files.fileActions.register('application/vnd.oasis.opendocument.presentation', 'Edit in Office Online', OC.PERMISSION_UPDATE, OC.imagePath('core', 'actions/play'), wopiViewer.onEditPowerpoint); OCA.Files.fileActions.register('application/vnd.ms-excel', 'Edit in Office Online', OC.PERMISSION_UPDATE, OC.imagePath('core', 'actions/play'), wopiViewer.onEditExcel); + OCA.Files.fileActions.register('application/vnd.ms-excel.addin.macroEnabled.12', 'Edit in Office Online', OC.PERMISSION_UPDATE, OC.imagePath('core', 'actions/play'), wopiViewer.onEditExcel); + OCA.Files.fileActions.register('application/vnd.ms-excel.sheet.binary.macroEnabled.12', 'Edit in Office Online', OC.PERMISSION_UPDATE, OC.imagePath('core', 'actions/play'), wopiViewer.onEditExcel); + OCA.Files.fileActions.register('application/vnd.ms-excel.sheet.macroEnabled.12', 'Edit in Office Online', OC.PERMISSION_UPDATE, OC.imagePath('core', 'actions/play'), wopiViewer.onEditExcel); + OCA.Files.fileActions.register('application/vnd.ms-excel.template.macroEnabled.12', 'Edit in Office Online', OC.PERMISSION_UPDATE, OC.imagePath('core', 'actions/play'), wopiViewer.onEditExcel); + OCA.Files.fileActions.register('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'Edit in Office Online', OC.PERMISSION_UPDATE, OC.imagePath('core', 'actions/play'), wopiViewer.onEditExcel); + OCA.Files.fileActions.register('application/vnd.openxmlformats-officedocument.spreadsheetml.template', 'Edit in Office Online', OC.PERMISSION_UPDATE, OC.imagePath('core', 'actions/play'), wopiViewer.onEditExcel); + //OCA.Files.fileActions.register('application/vnd.oasis.opendocument.spreadsheet', 'Edit in Office Online', OC.PERMISSION_UPDATE, OC.imagePath('core', 'actions/play'), wopiViewer.onEditExcel); + //OCA.Files.fileActions.register('application/msonenote', 'Edit in Office Online', OC.PERMISSION_UPDATE, OC.imagePath('core', 'actions/play'), wopiViewer.onEditOnenote); + OCA.Files.fileActions.register('application/msword', 'Default View', OC.PERMISSION_READ, OC.imagePath('core', 'actions/play'), wopiViewer.onViewWord); + OCA.Files.fileActions.register('application/vnd.ms-word.document.macroEnabled.12', 'Default View', OC.PERMISSION_READ, OC.imagePath('core', 'actions/play'), wopiViewer.onViewWord); + OCA.Files.fileActions.register('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'Default View', OC.PERMISSION_READ, OC.imagePath('core', 'actions/play'), wopiViewer.onViewWord); + OCA.Files.fileActions.register('application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'Default View', OC.PERMISSION_READ, OC.imagePath('core', 'actions/play'), wopiViewer.onViewWord); + //OCA.Files.fileActions.register('application/vnd.oasis.opendocument.text', 'Default View', OC.PERMISSION_READ, OC.imagePath('core', 'actions/play'), wopiViewer.onViewWord); OCA.Files.fileActions.register('application/vnd.ms-powerpoint', 'Default View', OC.PERMISSION_READ, OC.imagePath('core', 'actions/play'), wopiViewer.onViewPowerpoint); + OCA.Files.fileActions.register('application/vnd.ms-powerpoint.addin.macroEnabled.12', 'Default View', OC.PERMISSION_READ, OC.imagePath('core', 'actions/play'), wopiViewer.onViewPowerpoint); + OCA.Files.fileActions.register('application/vnd.ms-powerpoint.presentation.macroEnabled.12', 'Default View', OC.PERMISSION_READ, OC.imagePath('core', 'actions/play'), wopiViewer.onViewPowerpoint); + OCA.Files.fileActions.register('application/vnd.ms-powerpoint.slideshow.macroEnabled.12', 'Default View', OC.PERMISSION_READ, OC.imagePath('core', 'actions/play'), wopiViewer.onViewPowerpoint); + OCA.Files.fileActions.register('application/vnd.ms-powerpoint.template.macroEnabled.12', 'Default View', OC.PERMISSION_READ, OC.imagePath('core', 'actions/play'), wopiViewer.onViewPowerpoint); + OCA.Files.fileActions.register('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'Default View', OC.PERMISSION_READ, OC.imagePath('core', 'actions/play'), wopiViewer.onViewPowerpoint); + OCA.Files.fileActions.register('application/vnd.openxmlformats-officedocument.presentationml.template', 'Default View', OC.PERMISSION_READ, OC.imagePath('core', 'actions/play'), wopiViewer.onViewPowerpoint); + OCA.Files.fileActions.register('application/vnd.openxmlformats-officedocument.presentationml.slideshow', 'Default View', OC.PERMISSION_READ, OC.imagePath('core', 'actions/play'), wopiViewer.onViewPowerpoint); + //OCA.Files.fileActions.register('application/vnd.oasis.opendocument.presentation', 'Default View', OC.PERMISSION_READ, OC.imagePath('core', 'actions/play'), wopiViewer.onViewPowerpoint); OCA.Files.fileActions.register('application/vnd.ms-excel', 'Default View', OC.PERMISSION_READ, OC.imagePath('core', 'actions/play'), wopiViewer.onViewExcel); + OCA.Files.fileActions.register('application/vnd.ms-excel.addin.macroEnabled.12', 'Default View', OC.PERMISSION_READ, OC.imagePath('core', 'actions/play'), wopiViewer.onViewExcel); + OCA.Files.fileActions.register('application/vnd.ms-excel.sheet.binary.macroEnabled.12', 'Default View', OC.PERMISSION_READ, OC.imagePath('core', 'actions/play'), wopiViewer.onViewExcel); + OCA.Files.fileActions.register('application/vnd.ms-excel.sheet.macroEnabled.12', 'Default View', OC.PERMISSION_READ, OC.imagePath('core', 'actions/play'), wopiViewer.onViewExcel); + OCA.Files.fileActions.register('application/vnd.ms-excel.template.macroEnabled.12', 'Default View', OC.PERMISSION_READ, OC.imagePath('core', 'actions/play'), wopiViewer.onViewExcel); + OCA.Files.fileActions.register('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'Default View', OC.PERMISSION_READ, OC.imagePath('core', 'actions/play'), wopiViewer.onViewExcel); + OCA.Files.fileActions.register('application/vnd.openxmlformats-officedocument.spreadsheetml.template', 'Default View', OC.PERMISSION_READ, OC.imagePath('core', 'actions/play'), wopiViewer.onViewExcel); + //OCA.Files.fileActions.register('application/vnd.oasis.opendocument.spreadsheet', 'Default View', OC.PERMISSION_READ, OC.imagePath('core', 'actions/play'), wopiViewer.onViewExcel); + //OCA.Files.fileActions.register('application/msonenote', 'Default View', OC.PERMISSION_READ, OC.imagePath('core', 'actions/play'), wopiViewer.onViewOnenote); + OCA.Files.fileActions.setDefault('application/msword', 'Default View'); + OCA.Files.fileActions.setDefault('application/vnd.ms-word.document.macroEnabled.12', 'Default View'); + OCA.Files.fileActions.setDefault('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'Default View'); + OCA.Files.fileActions.setDefault('application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'Default View'); + //OCA.Files.fileActions.setDefault('application/vnd.oasis.opendocument.text', 'Default View'); OCA.Files.fileActions.setDefault('application/vnd.ms-powerpoint', 'Default View'); + OCA.Files.fileActions.setDefault('application/vnd.ms-powerpoint.addin.macroEnabled.12', 'Default View'); + OCA.Files.fileActions.setDefault('application/vnd.ms-powerpoint.presentation.macroEnabled.12', 'Default View'); + OCA.Files.fileActions.setDefault('application/vnd.ms-powerpoint.slideshow.macroEnabled.12', 'Default View'); + OCA.Files.fileActions.setDefault('application/vnd.ms-powerpoint.template.macroEnabled.12', 'Default View'); + OCA.Files.fileActions.setDefault('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'Default View'); + OCA.Files.fileActions.setDefault('application/vnd.openxmlformats-officedocument.presentationml.template', 'Default View'); + OCA.Files.fileActions.setDefault('application/vnd.openxmlformats-officedocument.presentationml.slideshow', 'Default View'); + //OCA.Files.fileActions.setDefault('application/vnd.oasis.opendocument.presentation', 'Default View'); OCA.Files.fileActions.setDefault('application/vnd.ms-excel', 'Default View'); + OCA.Files.fileActions.setDefault('application/vnd.ms-excel.addin.macroEnabled.12', 'Default View'); + OCA.Files.fileActions.setDefault('application/vnd.ms-excel.sheet.binary.macroEnabled.12', 'Default View'); + OCA.Files.fileActions.setDefault('application/vnd.ms-excel.sheet.macroEnabled.12', 'Default View'); + OCA.Files.fileActions.setDefault('application/vnd.ms-excel.template.macroEnabled.12', 'Default View'); + OCA.Files.fileActions.setDefault('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'Default View'); + OCA.Files.fileActions.setDefault('application/vnd.openxmlformats-officedocument.spreadsheetml.template', 'Default View'); + //OCA.Files.fileActions.setDefault('application/vnd.oasis.opendocument.spreadsheet', 'Default View'); + //OCA.Files.fileActions.setDefault('application/msonenote', 'Default View'); } }); diff --git a/templates/main.php b/templates/main.php deleted file mode 100755 index 26e4087..0000000 --- a/templates/main.php +++ /dev/null @@ -1,17 +0,0 @@ - - -
-
- inc('part.navigation')); ?> - inc('part.settings')); ?> -
- -
-
- inc('part.content')); ?> -
-
-
diff --git a/templates/part.content.php b/templates/part.content.php deleted file mode 100755 index 8046942..0000000 --- a/templates/part.content.php +++ /dev/null @@ -1,10 +0,0 @@ -

Hello World

- -

- -

-

- -Ajax response:
\ No newline at end of file diff --git a/templates/part.navigation.php b/templates/part.navigation.php deleted file mode 100755 index b28b6a8..0000000 --- a/templates/part.navigation.php +++ /dev/null @@ -1,10 +0,0 @@ - \ No newline at end of file diff --git a/templates/part.settings.php b/templates/part.settings.php deleted file mode 100755 index b0a221e..0000000 --- a/templates/part.settings.php +++ /dev/null @@ -1,10 +0,0 @@ -
-
- -
-
- -
-
\ No newline at end of file