Merge branch 'staging' into donkey
This commit is contained in:
commit
8586d0c944
@ -32,6 +32,7 @@ define([
|
|||||||
});
|
});
|
||||||
return select;
|
return select;
|
||||||
};
|
};
|
||||||
|
languageSelector = languageSelector; // jshint
|
||||||
|
|
||||||
var footerCol = function (title, L, literal) {
|
var footerCol = function (title, L, literal) {
|
||||||
return h('div.col-6.col-sm-3', [
|
return h('div.col-6.col-sm-3', [
|
||||||
@ -68,7 +69,7 @@ define([
|
|||||||
footerCol(null, [
|
footerCol(null, [
|
||||||
h('div.cp-bio-foot', [
|
h('div.cp-bio-foot', [
|
||||||
h('p', Msg.main_footerText),
|
h('p', Msg.main_footerText),
|
||||||
languageSelector()
|
//languageSelector()
|
||||||
])
|
])
|
||||||
], ''),
|
], ''),
|
||||||
footerCol('footer_applications', [
|
footerCol('footer_applications', [
|
||||||
@ -94,7 +95,7 @@ define([
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
]),
|
]),
|
||||||
h('div.cp-version-footer', "CryptPad v2.1.0 (Badger)")
|
h('div.cp-version-footer', "CryptPad v2.2.0 (Coati)")
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1002,6 +1002,11 @@ define(function () {
|
|||||||
embed: 'Intégrez des images de votre disque <span class="fa fa-file-image-o"></span> ou de votre CryptDrive <span class="fa fa-image"></span> et exporter le contenu en tant que PNG sur votre disque <span class="fa fa-download"></span> ou votre CryptDrive <span class="fa fa-cloud-upload"></span>'
|
embed: 'Intégrez des images de votre disque <span class="fa fa-file-image-o"></span> ou de votre CryptDrive <span class="fa fa-image"></span> et exporter le contenu en tant que PNG sur votre disque <span class="fa fa-download"></span> ou votre CryptDrive <span class="fa fa-cloud-upload"></span>'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
out.help.kanban = {
|
||||||
|
add: 'Ajoutez un tableau en utilisant le bouton <span class="fa fa-plus"></span> dans le coin supérieur-droit',
|
||||||
|
task: 'Déplacez les éléments en les faisant glisser d\'un tableau à l\'autre',
|
||||||
|
color: 'Modifiez les couleurs en cliquant sur les parties colorées à côté du titre de chaque tableau'
|
||||||
|
};
|
||||||
|
|
||||||
out.initialState = [
|
out.initialState = [
|
||||||
'<p>',
|
'<p>',
|
||||||
|
|||||||
@ -254,7 +254,7 @@ define(function () {
|
|||||||
out.kanban_item = "Item {0}"; // Item number for initial content
|
out.kanban_item = "Item {0}"; // Item number for initial content
|
||||||
out.kanban_todo = "To Do";
|
out.kanban_todo = "To Do";
|
||||||
out.kanban_done = "Done";
|
out.kanban_done = "Done";
|
||||||
out.kanban_working = "Working";
|
out.kanban_working = "In progress";
|
||||||
out.kanban_deleteBoard = "Are you sure you want to delete this board?";
|
out.kanban_deleteBoard = "Are you sure you want to delete this board?";
|
||||||
out.kanban_addBoard = "Add a board";
|
out.kanban_addBoard = "Add a board";
|
||||||
out.kanban_removeItem = "Remove this item";
|
out.kanban_removeItem = "Remove this item";
|
||||||
@ -1046,7 +1046,9 @@ define(function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
out.help.kanban = {
|
out.help.kanban = {
|
||||||
//add: ''
|
add: 'Add new boards using the <span class="fa fa-plus"></span> button in the top-right corner',
|
||||||
|
task: 'Move items by dragging and dropping them from one board to another',
|
||||||
|
color: 'Change the colors by clicking on the colored part next to the board titles',
|
||||||
};
|
};
|
||||||
|
|
||||||
out.initialState = [
|
out.initialState = [
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "cryptpad",
|
"name": "cryptpad",
|
||||||
"description": "realtime collaborative visual editor with zero knowlege server",
|
"description": "realtime collaborative visual editor with zero knowlege server",
|
||||||
"version": "2.1.0",
|
"version": "2.2.0",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chainpad-server": "^2.0.0",
|
"chainpad-server": "^2.0.0",
|
||||||
|
|||||||
@ -393,8 +393,11 @@ define([
|
|||||||
val = val || {};
|
val = val || {};
|
||||||
if (val.edit === false) {
|
if (val.edit === false) {
|
||||||
$(link).find('#cp-share-editable-false').prop('checked', true);
|
$(link).find('#cp-share-editable-false').prop('checked', true);
|
||||||
|
$(link).find('#cp-share-editable-true').prop('checked', false);
|
||||||
|
} else {
|
||||||
|
$(link).find('#cp-share-editable-true').prop('checked', true);
|
||||||
|
$(link).find('#cp-share-editable-false').prop('checked', false);
|
||||||
}
|
}
|
||||||
else { $(link).find('#cp-share-editable-true').prop('checked', true); }
|
|
||||||
if (val.embed) { $(link).find('#cp-share-embed').prop('checked', true); }
|
if (val.embed) { $(link).find('#cp-share-embed').prop('checked', true); }
|
||||||
if (val.present) { $(link).find('#cp-share-present').prop('checked', true); }
|
if (val.present) { $(link).find('#cp-share-present').prop('checked', true); }
|
||||||
$(link).find('#cp-share-link-preview').val(getLinkValue(val));
|
$(link).find('#cp-share-link-preview').val(getLinkValue(val));
|
||||||
|
|||||||
@ -48,12 +48,14 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
padding: 10px 5px 10px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.kanban-board {
|
.kanban-board {
|
||||||
header {
|
header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
padding: 13px 10px;
|
||||||
.kanban-title-board {
|
.kanban-title-board {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
@ -84,9 +86,8 @@
|
|||||||
line-height: @button-size;
|
line-height: @button-size;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background: @colortheme_kanban-bg;
|
background: @colortheme_kanban-bg;
|
||||||
font-weight: bold;
|
|
||||||
align-self: flex-start;
|
align-self: flex-start;
|
||||||
font-size: 50px;
|
font-size: 30px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
.tools_unselectable();
|
.tools_unselectable();
|
||||||
}
|
}
|
||||||
@ -108,8 +109,6 @@
|
|||||||
line-height: 1;
|
line-height: 1;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
font-weight: bold;
|
|
||||||
font-size: 1.2em;
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,6 +30,7 @@ define([
|
|||||||
var COLORS = ['yellow', 'green', 'orange', 'blue', 'red', 'purple', 'cyan', 'lightgreen', 'lightblue'];
|
var COLORS = ['yellow', 'green', 'orange', 'blue', 'red', 'purple', 'cyan', 'lightgreen', 'lightblue'];
|
||||||
|
|
||||||
var addRemoveItemButton = function (framework, kanban) {
|
var addRemoveItemButton = function (framework, kanban) {
|
||||||
|
if (!kanban) { return; }
|
||||||
if (framework.isReadOnly() || framework.isLocked()) { return; }
|
if (framework.isReadOnly() || framework.isLocked()) { return; }
|
||||||
var $container = $(kanban.element);
|
var $container = $(kanban.element);
|
||||||
$container.find('.kanban-remove-item').remove();
|
$container.find('.kanban-remove-item').remove();
|
||||||
@ -39,7 +40,7 @@ define([
|
|||||||
return b.id === $(el.parentNode.parentNode).attr('data-id');
|
return b.id === $(el.parentNode.parentNode).attr('data-id');
|
||||||
});
|
});
|
||||||
$('<button>', {
|
$('<button>', {
|
||||||
'class': 'kanban-remove-item btn btn-default',
|
'class': 'kanban-remove-item btn btn-default fa fa-times',
|
||||||
title: Messages.kanban_removeItem
|
title: Messages.kanban_removeItem
|
||||||
}).click(function (e) {
|
}).click(function (e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
@ -49,7 +50,7 @@ define([
|
|||||||
$(el).remove();
|
$(el).remove();
|
||||||
kanban.onChange();
|
kanban.onChange();
|
||||||
});
|
});
|
||||||
}).text('❌').appendTo($(el));
|
}).appendTo($(el));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -99,7 +100,7 @@ define([
|
|||||||
'type': 'text',
|
'type': 'text',
|
||||||
'id': 'kanban-edit',
|
'id': 'kanban-edit',
|
||||||
'size': '30'
|
'size': '30'
|
||||||
});
|
}).click(function (e) { e.stopPropagation(); });
|
||||||
};
|
};
|
||||||
|
|
||||||
var kanban = new window.jKanban({
|
var kanban = new window.jKanban({
|
||||||
@ -119,8 +120,9 @@ define([
|
|||||||
click: function (el) {
|
click: function (el) {
|
||||||
if (framework.isReadOnly() || framework.isLocked()) { return; }
|
if (framework.isReadOnly() || framework.isLocked()) { return; }
|
||||||
if (kanban.inEditMode) {
|
if (kanban.inEditMode) {
|
||||||
|
$(el).focus();
|
||||||
verbose("An edit is already active");
|
verbose("An edit is already active");
|
||||||
return;
|
//return;
|
||||||
}
|
}
|
||||||
kanban.inEditMode = true;
|
kanban.inEditMode = true;
|
||||||
$(el).find('button').remove();
|
$(el).find('button').remove();
|
||||||
@ -164,8 +166,9 @@ define([
|
|||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
if (framework.isReadOnly() || framework.isLocked()) { return; }
|
if (framework.isReadOnly() || framework.isLocked()) { return; }
|
||||||
if (kanban.inEditMode) {
|
if (kanban.inEditMode) {
|
||||||
|
$(el).focus();
|
||||||
verbose("An edit is already active");
|
verbose("An edit is already active");
|
||||||
return;
|
//return;
|
||||||
}
|
}
|
||||||
kanban.inEditMode = true;
|
kanban.inEditMode = true;
|
||||||
var name = $(el).text();
|
var name = $(el).text();
|
||||||
@ -241,8 +244,9 @@ define([
|
|||||||
addItemClick: function (el) {
|
addItemClick: function (el) {
|
||||||
if (framework.isReadOnly() || framework.isLocked()) { return; }
|
if (framework.isReadOnly() || framework.isLocked()) { return; }
|
||||||
if (kanban.inEditMode) {
|
if (kanban.inEditMode) {
|
||||||
|
$(el).focus();
|
||||||
verbose("An edit is already active");
|
verbose("An edit is already active");
|
||||||
return;
|
//return;
|
||||||
}
|
}
|
||||||
kanban.inEditMode = true;
|
kanban.inEditMode = true;
|
||||||
// create a form to enter element
|
// create a form to enter element
|
||||||
@ -325,6 +329,7 @@ define([
|
|||||||
}
|
}
|
||||||
framework.onEditableChange(function (unlocked) {
|
framework.onEditableChange(function (unlocked) {
|
||||||
if (framework.isReadOnly()) { return; }
|
if (framework.isReadOnly()) { return; }
|
||||||
|
if (!kanban) { return; }
|
||||||
if (unlocked) {
|
if (unlocked) {
|
||||||
addRemoveItemButton(framework, kanban);
|
addRemoveItemButton(framework, kanban);
|
||||||
kanban.options.readOnly = false;
|
kanban.options.readOnly = false;
|
||||||
@ -357,7 +362,11 @@ define([
|
|||||||
});
|
});
|
||||||
|
|
||||||
framework.setContentGetter(function () {
|
framework.setContentGetter(function () {
|
||||||
if (!kanban) { return; }
|
if (!kanban) {
|
||||||
|
return {
|
||||||
|
content: []
|
||||||
|
};
|
||||||
|
}
|
||||||
var content = kanban.getBoardsJSON();
|
var content = kanban.getBoardsJSON();
|
||||||
verbose("Content current value is " + content);
|
verbose("Content current value is " + content);
|
||||||
return {
|
return {
|
||||||
@ -369,6 +378,10 @@ define([
|
|||||||
$("#cp-app-kanban-content").focus();
|
$("#cp-app-kanban-content").focus();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
framework.onDefaultContentNeeded(function () {
|
||||||
|
kanban = initKanban(framework);
|
||||||
|
});
|
||||||
|
|
||||||
framework.start();
|
framework.start();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -316,9 +316,7 @@
|
|||||||
// if add button is true, add button to the board
|
// if add button is true, add button to the board
|
||||||
if (addButton) {
|
if (addButton) {
|
||||||
var btn = document.createElement("BUTTON");
|
var btn = document.createElement("BUTTON");
|
||||||
var t = document.createTextNode(buttonContent);
|
btn.setAttribute("class", "kanban-title-button btn btn-default btn-xs fa fa-times");
|
||||||
btn.setAttribute("class", "kanban-title-button btn btn-default btn-xs");
|
|
||||||
btn.appendChild(t);
|
|
||||||
//var buttonHtml = '<button class="kanban-title-button btn btn-default btn-xs">'+buttonContent+'</button>'
|
//var buttonHtml = '<button class="kanban-title-button btn btn-default btn-xs">'+buttonContent+'</button>'
|
||||||
headerBoard.appendChild(btn);
|
headerBoard.appendChild(btn);
|
||||||
__onButtonClickHandler(btn, board.id);
|
__onButtonClickHandler(btn, board.id);
|
||||||
@ -348,8 +346,7 @@
|
|||||||
var footerBoard = document.createElement('footer');
|
var footerBoard = document.createElement('footer');
|
||||||
//add button
|
//add button
|
||||||
var addBoardItem = document.createElement('button');
|
var addBoardItem = document.createElement('button');
|
||||||
$(addBoardItem).text("+")
|
$(addBoardItem).addClass("kanban-additem btn btn-default fa fa-plus");
|
||||||
$(addBoardItem).addClass("kanban-additem btn btn-default");
|
|
||||||
footerBoard.appendChild(addBoardItem);
|
footerBoard.appendChild(addBoardItem);
|
||||||
__onAddItemClickHandler(addBoardItem);
|
__onAddItemClickHandler(addBoardItem);
|
||||||
|
|
||||||
@ -459,7 +456,7 @@
|
|||||||
boardContainerOuter.appendChild(boardContainer);
|
boardContainerOuter.appendChild(boardContainer);
|
||||||
var addBoard = document.createElement('div');
|
var addBoard = document.createElement('div');
|
||||||
addBoard.id = 'kanban-addboard';
|
addBoard.id = 'kanban-addboard';
|
||||||
$(addBoard).text("+");
|
addBoard.setAttribute('class', 'fa fa-plus');
|
||||||
boardContainerOuter.appendChild(addBoard);
|
boardContainerOuter.appendChild(addBoard);
|
||||||
|
|
||||||
self.container = boardContainer;
|
self.container = boardContainer;
|
||||||
@ -502,6 +499,7 @@
|
|||||||
function __onAddItemClickHandler(nodeItem, clickfn) {
|
function __onAddItemClickHandler(nodeItem, clickfn) {
|
||||||
nodeItem.addEventListener('click', function (e) {
|
nodeItem.addEventListener('click', function (e) {
|
||||||
e.preventDefault;
|
e.preventDefault;
|
||||||
|
e.stopPropagation();
|
||||||
self.options.addItemClick(this);
|
self.options.addItemClick(this);
|
||||||
if (typeof (this.clickfn) === 'function')
|
if (typeof (this.clickfn) === 'function')
|
||||||
this.clickfn(this);
|
this.clickfn(this);
|
||||||
|
|||||||
@ -18,6 +18,7 @@
|
|||||||
@poll-th-user-bg: darken(@poll-th-bg, 10%);
|
@poll-th-user-bg: darken(@poll-th-bg, 10%);
|
||||||
@poll-editing: lighten(@poll-th-bg, 10%);
|
@poll-editing: lighten(@poll-th-bg, 10%);
|
||||||
@poll-winner: darken(@poll-th-bg, 15%);
|
@poll-winner: darken(@poll-th-bg, 15%);
|
||||||
|
@poll-highlighted: lighten(@poll-th-bg, 15%);
|
||||||
@poll-td-bg: @poll-th-bg;
|
@poll-td-bg: @poll-th-bg;
|
||||||
@poll-td-fg: @poll-th-fg;
|
@poll-td-fg: @poll-th-fg;
|
||||||
|
|
||||||
@ -514,6 +515,13 @@ div.cp-app-poll-realtime {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
tr:not(:last-child) {
|
||||||
|
&:hover {
|
||||||
|
td:first-child {
|
||||||
|
background-color: @poll-highlighted;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.cp-app-poll-table-edit {
|
.cp-app-poll-table-edit {
|
||||||
//color: @poll-cover-color;
|
//color: @poll-cover-color;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user