Help + tooltips + fix colors in kanban

pull/1/head
yflory 7 years ago
parent 6b98fef679
commit fe27c97879

@ -116,7 +116,7 @@
@colortheme_todo-warn: #cd2532;
@colortheme_kanban-bg: #8C4;
@colortheme_kanban-color: #fff;
@colortheme_kanban-color: #000;
@colortheme_kanban-warn: #e6385d;
// Sidebar layout (profile / settings)

@ -14,7 +14,7 @@
right: 5px;
}
.cp-help-text {
color: @color;
color: contrast(lighten(@bg-color, 15%), #fff, #000); //@color;
margin: 0;
padding: 15px;
a {

@ -2,7 +2,6 @@ define(function () {
var out = {};
out.main_title = "CryptPad : Éditeur collaboratif en temps réel, zero knowledge";
out.main_slogan = "L'unité est la force, la collaboration est la clé";
out.type = {};
out.type.pad = 'Texte';
@ -255,7 +254,8 @@ define(function () {
out.kanban_done = "Terminé";
out.kanban_working = "En cours";
out.kanban_deleteBoard = "Êtes-vous sûr de vouloir supprimer ce tableau ?";
out.kanban_deleteItem = "Êtes-vous sûr de vouloir supprimer cet élément?";
out.kanban_addBoard = "Ajouter un tableau";
out.kanban_removeItem = "Supprimer cet élément";
// Polls

@ -2,7 +2,6 @@ define(function () {
var out = {};
out.main_title = "CryptPad: Zero Knowledge, Collaborative Real Time Editing";
out.main_slogan = "Unity is Strength - Collaboration is Key"; // TODO remove?
out.type = {};
out.type.pad = 'Rich text';
@ -257,7 +256,8 @@ define(function () {
out.kanban_done = "Done";
out.kanban_working = "Working";
out.kanban_deleteBoard = "Are you sure you want to delete this board?";
out.kanban_deleteItem = "Are you sure you want to delete this item?";
out.kanban_addBoard = "Add a board";
out.kanban_removeItem = "Remove this item";
// Polls
@ -1044,6 +1044,9 @@ define(function () {
embed: 'Embed images from your disk <span class="fa fa-file-image-o"></span> or your CryptDrive <span class="fa fa-image"></span> and export them as PNG to your disk <span class="fa fa-download"></span> or your CryptDrive <span class="fa fa-cloud-upload"></span>'
};
out.help.kanban = {
//add: ''
};
out.initialState = [
'<p>',

@ -36,7 +36,10 @@ define([
var board = kanban.options.boards.find(function (b) {
return b.id === $(el.parentNode.parentNode).attr('data-id');
});
$('<button>', {'class': 'kanban-remove-item btn btn-default'}).click(function (e) {
$('<button>', {
'class': 'kanban-remove-item btn btn-default',
title: Messages.kanban_removeItem
}).click(function (e) {
e.stopPropagation();
board.item.splice(pos, 1);
$(el).remove();
@ -267,26 +270,11 @@ define([
});
},
addItemButton: true,
boards: boards,
/*dragcancelEl: function (el, boardId) {
var pos = kanban.findElementPosition(el);
UI.confirm(Messages.kanban_deleteItem, function (yes) {
if (!yes) { return; }
var board;
kanban.options.boards.some(function (b) {
if (b.id === boardId) {
return (board = b);
}
});
if (!board) { return; }
board.item.splice(pos, 1);
$(el).remove();
kanban.onChange();
});
}*/
boards: boards
});
var addBoardDefault = document.getElementById('kanban-addboard');
$(addBoardDefault).attr('title', Messages.kanban_addBoard);
addBoardDefault.addEventListener('click', function () {
if (framework.isReadOnly()) { return; }
var counter = 1;
@ -309,12 +297,22 @@ define([
return kanban;
};
var mkHelpMenu = function (framework) {
var $toolbarContainer = $('#cp-app-kanban-container');
var helpMenu = framework._.sfCommon.createHelpMenu(['kanban']);
$toolbarContainer.prepend(helpMenu.menu);
framework._.toolbar.$drawer.append(helpMenu.button);
};
// Start of the main loop
var andThen2 = function (framework) {
var kanban;
var $container = $('#cp-app-kanban-content');
mkHelpMenu(framework);
if (framework.isReadOnly()) {
$container.addClass('cp-app-readonly');
}

Loading…
Cancel
Save