Signed-off-by: Julius Härtl <jus@bitgrid.net>tags/v16.0.0beta1
@@ -45,6 +45,9 @@ $eventDispatcher->addListener( | |||
\OCP\Util::addScript('files_sharing', 'dist/additionalScripts'); | |||
} | |||
); | |||
\OC::$server->getEventDispatcher()->addListener('\OCP\Collaboration\Resources::loadAdditionalScripts', function () { | |||
\OCP\Util::addScript('files_sharing', 'dist/collaboration'); | |||
}); | |||
$config = \OC::$server->getConfig(); | |||
$shareManager = \OC::$server->getShareManager(); |
@@ -33,5 +33,6 @@ $tmpl = new OCP\Template('files_sharing', 'list', ''); | |||
$tmpl->assign('showgridview', $showgridview && !$isIE); | |||
OCP\Util::addScript('files_sharing', 'dist/files_sharing'); | |||
\OC::$server->getEventDispatcher()->dispatch('\OCP\Collaboration\Resources::loadAdditionalScripts'); | |||
$tmpl->printPage(); |
@@ -8,22 +8,6 @@ import './sharebreadcrumbview' | |||
import './style/sharetabview.scss' | |||
import './style/sharebreadcrumb.scss' | |||
window.OCP.Collaboration.registerType('files', { | |||
action: () => { | |||
return new Promise((resolve, reject) => { | |||
OC.dialogs.filepicker('Link to a file', function (f) { | |||
const client = OC.Files.getClient(); | |||
client.getFileInfo(f).then((status, fileInfo) => { | |||
resolve(fileInfo.id); | |||
}, () => { | |||
reject(); | |||
}); | |||
}, false); | |||
}); | |||
}, | |||
/** used in "Link to a {typeString}" */ | |||
typeString: t('files_sharing', 'file'), | |||
typeIconClass: 'icon-files-dark' | |||
}); | |||
import './collaborationresourceshandler.js' | |||
window.OCA.Sharing = OCA.Sharing; |
@@ -0,0 +1,20 @@ | |||
__webpack_public_path__ = OC.linkTo('files_sharing', 'js/dist/'); | |||
__webpack_nonce__ = btoa(OC.requestToken); | |||
window.OCP.Collaboration.registerType('files', { | |||
action: () => { | |||
return new Promise((resolve, reject) => { | |||
OC.dialogs.filepicker('Link to a file', function (f) { | |||
const client = OC.Files.getClient(); | |||
client.getFileInfo(f).then((status, fileInfo) => { | |||
resolve(fileInfo.id); | |||
}, () => { | |||
reject(); | |||
}); | |||
}, false); | |||
}); | |||
}, | |||
/** used in "Link to a {typeString}" */ | |||
typeString: t('files_sharing', 'file'), | |||
typeIconClass: 'icon-files-dark' | |||
}); |
@@ -5,6 +5,7 @@ module.exports = { | |||
entry: { | |||
'additionalScripts': path.join(__dirname, 'src', 'additionalScripts.js'), | |||
'files_sharing': path.join(__dirname, 'src', 'files_sharing.js'), | |||
'collaboration': path.join(__dirname, 'src', 'collaborationresourceshandler.js'), | |||
}, | |||
output: { | |||
path: path.resolve(__dirname, './js/dist/'), |