Add the file app in the 'new' dropdown menus

pull/1/head
yflory 8 years ago
parent ac91d2f413
commit 5641a4a839

@ -4,7 +4,8 @@ define(function() {
/* Select the buttons displayed on the main page to create new collaborative sessions
* Existing types : pad, code, poll, slide
*/
config.availablePadTypes = ['drive', 'pad', 'code', 'slide', 'poll', 'whiteboard'];
config.availablePadTypes = ['drive', 'pad', 'code', 'slide', 'poll', 'whiteboard', 'file'];
config.registeredOnlyTypes = ['file'];
/* Cryptpad apps use a common API to display notifications to users
* by default, notifications are hidden after 5 seconds

@ -57,6 +57,8 @@ define([
var $container = $('<div>', {'class': 'dropdown-bar'}).appendTo($parent);
Config.availablePadTypes.forEach(function (el) {
if (el === 'drive') { return; }
if (!Cryptpad.isLoggedIn() && Config.registeredOnlyTypes &&
Config.registeredOnlyTypes.indexOf(el) !== -1) { return; }
options.push({
tag: 'a',
attributes: {

@ -636,6 +636,8 @@ define([
var pads_options = [];
Config.availablePadTypes.forEach(function (p) {
if (p === 'drive') { return; }
if (!Cryptpad.isLoggedIn() && Config.registeredOnlyTypes &&
Config.registeredOnlyTypes.indexOf(p) !== -1) { return; }
pads_options.push({
tag: 'a',
attributes: {

@ -1370,6 +1370,10 @@ define([
}
AppConfig.availablePadTypes.forEach(function (type) {
if (type === 'drive') { return; }
if (!Cryptpad.isLoggedIn() && AppConfig.registeredOnlyTypes &&
AppConfig.registeredOnlyTypes.indexOf(type) !== -1) {
return;
}
var attributes = {
'class': 'newdoc',
'data-type': type,

Loading…
Cancel
Save