Add the contacts app in the dropdown menu

pull/1/head
yflory 8 years ago
parent 36d792874a
commit baf439648e

@ -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

@ -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; }

@ -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';

@ -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';

@ -270,6 +270,7 @@ define([
var $slideIcon = $('<span>', {"class": "fa fa-file-powerpoint-o file icon slideColor"});
var $pollIcon = $('<span>', {"class": "fa fa-calendar file icon pollColor"});
var $whiteboardIcon = $('<span>', {"class": "fa fa-paint-brush whiteboardColor"});
var $contactsIcon = $('<span>', {"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();
}

@ -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;

Loading…
Cancel
Save