From baf439648ed05738d8c3c4cd450746a717879967 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 18 Jul 2017 10:22:51 +0200 Subject: [PATCH] Add the contacts app in the dropdown menu --- customize.dist/application_config.js | 4 ++-- customize.dist/src/less/toolbar.less | 2 ++ customize.dist/translations/messages.fr.js | 1 + customize.dist/translations/messages.js | 1 + www/common/common-interface.js | 2 ++ www/drive/main.js | 1 + 6 files changed, 9 insertions(+), 2 deletions(-) diff --git a/customize.dist/application_config.js b/customize.dist/application_config.js index af2474775..a3da8eb3f 100644 --- a/customize.dist/application_config.js +++ b/customize.dist/application_config.js @@ -4,8 +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', 'file']; - config.registeredOnlyTypes = ['file']; + config.availablePadTypes = ['drive', 'pad', 'code', 'slide', 'poll', 'whiteboard', 'file', 'contacts']; + config.registeredOnlyTypes = ['file', 'contacts']; /* Cryptpad apps use a common API to display notifications to users * by default, notifications are hidden after 5 seconds diff --git a/customize.dist/src/less/toolbar.less b/customize.dist/src/less/toolbar.less index 6e7e6c01d..f38a92c66 100644 --- a/customize.dist/src/less/toolbar.less +++ b/customize.dist/src/less/toolbar.less @@ -16,6 +16,8 @@ color: inherit; } + +// Classes used in common-interface.js .padColor { color: @toolbar-pad-bg; } .codeColor { color: @toolbar-code-bg; } .slideColor { color: @toolbar-slide-bg; } diff --git a/customize.dist/translations/messages.fr.js b/customize.dist/translations/messages.fr.js index 44328ed53..c95c0fec7 100644 --- a/customize.dist/translations/messages.fr.js +++ b/customize.dist/translations/messages.fr.js @@ -13,6 +13,7 @@ define(function () { out.type.whiteboard = "Tableau Blanc"; out.type.file = "Fichier"; out.type.media = "Média"; + out.type.contacts = "Contacts"; out.button_newpad = 'Nouveau document texte'; out.button_newcode = 'Nouvelle page de code'; diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js index 70ce2f4af..ed29807aa 100644 --- a/customize.dist/translations/messages.js +++ b/customize.dist/translations/messages.js @@ -13,6 +13,7 @@ define(function () { out.type.whiteboard = 'Whiteboard'; out.type.file = 'File'; out.type.media = 'Media'; + out.type.contacts = 'Contacts'; out.button_newpad = 'New Rich Text pad'; out.button_newcode = 'New Code pad'; diff --git a/www/common/common-interface.js b/www/common/common-interface.js index e6927c70d..ed0d1778a 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -270,6 +270,7 @@ define([ var $slideIcon = $('', {"class": "fa fa-file-powerpoint-o file icon slideColor"}); var $pollIcon = $('', {"class": "fa fa-calendar file icon pollColor"}); var $whiteboardIcon = $('', {"class": "fa fa-paint-brush whiteboardColor"}); + var $contactsIcon = $('', {"class": "fa fa-users friendsColor"}); UI.getIcon = function (type) { var $icon; @@ -280,6 +281,7 @@ define([ case 'slide': $icon = $slideIcon.clone(); break; case 'poll': $icon = $pollIcon.clone(); break; case 'whiteboard': $icon = $whiteboardIcon.clone(); break; + case 'contacts': $icon = $contactsIcon.clone(); break; default: $icon = $fileIcon.clone(); } diff --git a/www/drive/main.js b/www/drive/main.js index a097d67fe..f2756401f 100644 --- a/www/drive/main.js +++ b/www/drive/main.js @@ -1398,6 +1398,7 @@ define([ } AppConfig.availablePadTypes.forEach(function (type) { if (type === 'drive') { return; } + if (type === 'contacts') { return; } if (!Cryptpad.isLoggedIn() && AppConfig.registeredOnlyTypes && AppConfig.registeredOnlyTypes.indexOf(type) !== -1) { return;