Merge branch 'form' of github.com:xwiki-labs/cryptpad into form

pull/1/head
yflory 4 years ago
commit 3c62dc2dcc

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 39 KiB

@ -1,9 +1,9 @@
@font-face { @font-face {
font-family: 'cptools'; font-family: 'cptools';
src: src:
url('fonts/cptools.ttf?n9y2kz') format('truetype'), url('fonts/cptools.ttf?am461j') format('truetype'),
url('fonts/cptools.woff?n9y2kz') format('woff'), url('fonts/cptools.woff?am461j') format('woff'),
url('fonts/cptools.svg?n9y2kz#cptools') format('svg'); url('fonts/cptools.svg?am461j#cptools') format('svg');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
font-display: block; font-display: block;
@ -25,11 +25,35 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.cptools-sheet:before { .cptools-form-list-check:before {
content: "\e908"; content: "\e916";
} }
.cptools-slide:before { .cptools-form-grid-check:before {
content: "\e907"; content: "\e917";
}
.cptools-form-poll:before {
content: "\e910";
}
.cptools-form-grid-radio:before {
content: "\e918";
}
.cptools-form-list-radio:before {
content: "\e919";
}
.cptools-form-page-break:before {
content: "\e91a";
}
.cptools-form-paragraph:before {
content: "\e91b";
}
.cptools-form-text:before {
content: "\e91c";
}
.cptools-form-list-ordered:before {
content: "\e91d";
}
.cptools-folder-no-color:before {
content: "\e900";
} }
.cptools-whiteboard:before { .cptools-whiteboard:before {
content: "\e901"; content: "\e901";
@ -37,6 +61,9 @@
.cptools-new-template:before { .cptools-new-template:before {
content: "\e902"; content: "\e902";
} }
.cptools-shared-folder:before {
content: "\e903";
}
.cptools-file-upload:before { .cptools-file-upload:before {
content: "\e904"; content: "\e904";
} }
@ -46,9 +73,24 @@
.cptools-poll:before { .cptools-poll:before {
content: "\e906"; content: "\e906";
} }
.cptools-slide:before {
content: "\e907";
}
.cptools-sheet:before {
content: "\e908";
}
.cptools-folder-open:before {
content: "\e909";
}
.cptools-kanban:before { .cptools-kanban:before {
content: "\e90a"; content: "\e90a";
} }
.cptools-folder:before {
content: "\e90b";
}
.cptools-shared-folder-open:before {
content: "\e90c";
}
.cptools-code:before { .cptools-code:before {
content: "\e90d"; content: "\e90d";
} }
@ -58,8 +100,11 @@
.cptools-file:before { .cptools-file:before {
content: "\e90f"; content: "\e90f";
} }
.cptools-destroy:before { .cptools-palette:before {
content: "\e915"; content: "\e911";
}
.cptools-folder-upload:before {
content: "\e912";
} }
.cptools-add-bottom:before { .cptools-add-bottom:before {
content: "\e913"; content: "\e913";
@ -67,24 +112,6 @@
.cptools-add-top:before { .cptools-add-top:before {
content: "\e914"; content: "\e914";
} }
.cptools-folder-upload:before { .cptools-destroy:before {
content: "\e912"; content: "\e915";
}
.cptools-folder-no-color:before {
content: "\e900";
}
.cptools-shared-folder:before {
content: "\e903";
}
.cptools-folder-open:before {
content: "\e909";
}
.cptools-folder:before {
content: "\e90b";
}
.cptools-shared-folder-open:before {
content: "\e90c";
}
.cptools-palette:before {
content: "\e911";
} }

@ -13,6 +13,7 @@
flex-flow: column; flex-flow: column;
font: @colortheme_app-font; font: @colortheme_app-font;
color: @cryptpad_text_col; color: @cryptpad_text_col;
background-color: @cp_app-bg;
#cp-app-form-editor { #cp-app-form-editor {
flex: 1; flex: 1;
@ -84,7 +85,7 @@
.cp-form-creator-add-inline { .cp-form-creator-add-inline {
display: flex; display: flex;
flex-flow: column; flex-flow: row;
align-items: center; align-items: center;
margin-bottom: 20px; margin-bottom: 20px;
button { button {
@ -94,6 +95,8 @@
} }
} }
.cp-form-creator-inline-add { .cp-form-creator-inline-add {
font-size: 25px;
margin-right: 30px;
.add-close { display: none; } .add-close { display: none; }
&.displayed { &.displayed {
.add-close { display: inline; } .add-close { display: inline; }
@ -103,26 +106,39 @@
.cp-form-creator-control-inline { .cp-form-creator-control-inline {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
margin-top: 10px;
button:not(:last-child) { button:not(:last-child) {
margin-right: 5px; margin-right: 5px;
} }
.cp-form-creator-types:first-child { .cp-form-creator-types {
button {
border: 0px;
//padding-bottom: 3px;
i {
font-size: 35px;
line-height: 35px;
}
}
&:first-child {
margin-right: 50px; margin-right: 50px;
} }
} }
} }
}
.cp-form-creator-add-full { .cp-form-creator-add-full {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 20px; margin: 50px 0px 100px 0px;
&> div:first-child { &> div:first-child {
border-right: 1px solid black; border-right: 1px solid fade(@cryptpad_text_col, 25%);
display: flex; display: flex;
height: 100%; height: 100%;
align-items: center; align-items: center;
padding-right: 10px; padding-right: 10px;
margin-right: 10px; margin-right: 10px;
i {
color: fade(@cryptpad_text_col, 25%);
font-size: 30px;
}
} }
.cp-form-creator-control-inline { .cp-form-creator-control-inline {
display: flex; display: flex;
@ -131,11 +147,23 @@
button:not(:last-child) { button:not(:last-child) {
margin-right: 5px; margin-right: 5px;
} }
.cp-form-creator-types:first-child { .cp-form-creator-types {
button {
border: 0px;
padding:5px;
margin-right: 10px;
i {
font-size: 35px;
line-height: 35px;
}
}
&:first-child {
margin-bottom: 20px;
margin-right: 50px; margin-right: 50px;
} }
} }
} }
}
.cp-form-page + .cp-form-send-container { .cp-form-page + .cp-form-send-container {
margin-top: 10px; margin-top: 10px;

@ -851,12 +851,12 @@ define([
}; };
}, },
printResults: function () { return; }, printResults: function () { return; },
icon: h('i.fa.fa-info') icon: h('i.cptools.cptools-form-paragraph')
}, },
page: { page: {
get: function () { get: function () {
var tag = h('div.cp-form-page-break-edit', [ var tag = h('div.cp-form-page-break-edit', [
h('i.fa.fa-hand-o-right'), h('i.cptools.cptools-form-page-break'),
h('span', Messages.form_type_page) h('span', Messages.form_type_page)
]); ]);
return { return {
@ -865,7 +865,7 @@ define([
}; };
}, },
printResults: function () { return; }, printResults: function () { return; },
icon: h('i.fa.fa-hand-o-right') icon: h('i.cptools.cptools-form-page-break')
}, },
}; };
var TYPES = { var TYPES = {
@ -913,7 +913,7 @@ define([
return h('div.cp-form-results-type-text', results); return h('div.cp-form-results-type-text', results);
}, },
icon: h('i.fa.fa-font') icon: h('i.cptools.cptools-form-text')
}, },
textarea: { textarea: {
defaultOpts: { defaultOpts: {
@ -1030,7 +1030,7 @@ define([
return h('div.cp-form-results-type-radio', results); return h('div.cp-form-results-type-radio', results);
}, },
icon: h('i.fa.fa-list-ul') icon: h('i.cptools.cptools-form-list-radio')
}, },
multiradio: { multiradio: {
defaultOpts: { defaultOpts: {
@ -1142,7 +1142,7 @@ define([
return h('div.cp-form-results-type-radio', results); return h('div.cp-form-results-type-radio', results);
}, },
icon: h('i.fa.fa-list-ul') icon: h('i.cptools.cptools-form-grid-radio')
}, },
checkbox: { checkbox: {
defaultOpts: { defaultOpts: {
@ -1231,7 +1231,7 @@ define([
return h('div.cp-form-results-type-radio', results); return h('div.cp-form-results-type-radio', results);
}, },
icon: h('i.fa.fa-check-square-o') icon: h('i.cptools.cptools-form-list-check')
}, },
multicheck: { multicheck: {
defaultOpts: { defaultOpts: {
@ -1355,7 +1355,7 @@ define([
return h('div.cp-form-results-type-radio', results); return h('div.cp-form-results-type-radio', results);
}, },
icon: h('i.fa.fa-list-ul') icon: h('i.cptools.cptools-form-grid-check')
}, },
poll: { poll: {
defaultOpts: { defaultOpts: {
@ -1443,7 +1443,7 @@ define([
var lines = makePollTable(_answers, form[uid].opts); var lines = makePollTable(_answers, form[uid].opts);
return h('div.cp-form-type-poll', lines); return h('div.cp-form-type-poll', lines);
}, },
icon: h('i.cptools.cptools-poll') icon: h('i.cptools.cptools-form-poll')
}, },
sort: { sort: {
defaultOpts: { defaultOpts: {
@ -1818,7 +1818,7 @@ define([
var full = !uid; var full = !uid;
var idx = content.order.indexOf(uid); var idx = content.order.indexOf(uid);
var addControl = function (type) { var addControl = function (type) {
var btn = h('button.btn.small', { var btn = h('button.btn.btn-default', {
title: full ? undefined : Messages['form_type_'+type] title: full ? undefined : Messages['form_type_'+type]
}, [ }, [
(TYPES[type] || STATIC_TYPES[type]).icon.cloneNode(), (TYPES[type] || STATIC_TYPES[type]).icon.cloneNode(),
@ -1849,7 +1849,7 @@ define([
h('div.cp-form-creator-types', controls), h('div.cp-form-creator-types', controls),
h('div.cp-form-creator-types', staticControls) h('div.cp-form-creator-types', staticControls)
]); ]);
var add = h('div', Messages.tag_add); var add = h('div', [h('i.fa.fa-plus')]);
if (!full) { if (!full) {
add = h('button.btn.cp-form-creator-inline-add', { add = h('button.btn.cp-form-creator-inline-add', {
title: Messages.tag_add title: Messages.tag_add

Loading…
Cancel
Save