améliorations

pull/15/head
Nicolas Sanchez 3 years ago
parent 8f03ee8ae6
commit f1329b8842

2
Cargo.lock generated

@ -437,7 +437,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]] [[package]]
name = "cheezenotes" name = "cheezenotes"
version = "0.1.0" version = "0.2.0"
dependencies = [ dependencies = [
"actix-files", "actix-files",
"actix-web", "actix-web",

@ -1,6 +1,6 @@
[package] [package]
name = "cheezenotes" name = "cheezenotes"
version = "0.1.0" version = "0.2.0"
edition = "2021" edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

@ -18,4 +18,8 @@
## Suivi Anaïs ## Suivi Anaïs
- [Feedback 27/01/2023](anais-feedback-27-01-2023) - [Feedback 27/01/2023](anais-feedback-27-01-2023)
## Contacts ## Contacts
- [Contacts](contacts-bpce-si) - [Contacts](contacts-bpce-si)
## Clients
- [Clients](clients-bpce-si)
## Bidouille
- [bidouille]()

@ -0,0 +1,13 @@
[retour](BPCE-SI-Notes)
[](\\Prdgce7v2115\d\gcedoc\referentielproduction\clients\csctrmif\csctrmif\Documents)
[](\\Prdgce7v2116\d\gcedoc\referentielproduction\clients\csctrmif\csctrmif\Documents)
[](\\Prdgce7v2117\d\gcedoc\referentielproduction\clients\csctrmif\csctrmif\Documents)
[](\\Prdgce7v2118\d\gcedoc\referentielproduction\clients\csctrmif\csctrmif\Documents)
[](\\Prdgce7v2119\d\gcedoc\referentielproduction\clients\csctrmif\csctrmif\Documents)
[](\\Prdgce7v2120\d\gcedoc\referentielproduction\clients\csctrmif\csctrmif\Documents)
[](\\Prdgce7v2121\d\gcedoc\referentielproduction\clients\csctrmif\csctrmif\Documents)
[](\\Prdgce7v2122\d\gcedoc\referentielproduction\clients\csctrmif\csctrmif\Documents)
[](\\Prdgce7v2123\d\gcedoc\referentielproduction\clients\csctrmif\csctrmif\Documents)
[](\\Prdgce7v2124\d\gcedoc\referentielproduction\clients\csctrmif\csctrmif\Documents)
[](\\Prdgce7v2125\d\gcedoc\referentielproduction\clients\csctrmif\csctrmif\Documents)
[](\\Prdgce7v2126\d\gcedoc\referentielproduction\clients\csctrmif\csctrmif\Documents)

@ -0,0 +1,7 @@
[retour](BPCE-SI-Notes)
# Clients
| Env | Etab. | No pers. | SIREN | Commentaire |
| VFO| 11315| 075161690| 378140776| |
| VFO| 11315| 501051182| 832124945| |
| VFO| 11315| 500181958| 819524851| |
| UTI| 11315| 502306706| 808056030| |

@ -1,5 +1,7 @@
[Accueil](accueil) [Accueil](accueil)
# Notes # Notes
## BPCE-SI
- [Notes](BPCE-SI-Notes)
## Rust ## Rust
*  [Idées](perso-idees) *  [Idées](perso-idees)
*  [Crates](perso-crates) *  [Crates](perso-crates)
@ -13,6 +15,4 @@
## Avec les enfants ## Avec les enfants
- [Bricolages]() - [Bricolages]()
- [mini-golf]() - [mini-golf]()
- [Livres](livres enfants) - [Livres](livres enfants)
## BPCE-SI
- [Notes](BPCE-SI-Notes)

@ -35,24 +35,53 @@ body {
background-color: #f6f6f6; background-color: #f6f6f6;
} }
button {
width: 2.2rem;
height: 2.2rem;
}
div#buttons { div#buttons {
background-color: #f6f6f6;
content: "";
clear: both;
position: fixed; position: fixed;
background-color: #dddddddd;
border-bottom: 3px solid #ccccccdd;
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
height: 3rem;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
max-width: 1200; max-width: 1200;
} }
div#buttons button.button {
margin: 0.2rem;
margin-right: 0;
margin-left: 0;
height: 3rem;
width: 3rem;
background-color: #eeeeee;
border: 1px solid #cccccc;
border-right: none;
}
div#buttons button.floatright {
float: right;
}
div#buttons button.rightborder {
border-right: 1px solid #cccccc;
}
div#buttons button.separator {
background-color: transparent;
color: #bbbbbb;
border: none;
border-left: 1px solid #cccccc;
height: 3rem;
margin: 0.2rem;
margin-right: 0;
margin-left: 0;
}
div#buttons button.onoffbutton.buttonon {
background-color: #aaaaaa;
}
div#buttons #taButtonLabel { div#buttons #taButtonLabel {
position: relative; position: relative;
font-size: 1.8rem; font-size: 1.8rem;
@ -96,9 +125,9 @@ div#cheezenotes {
overflow-x: auto; overflow-x: auto;
} }
div#cheezenotes div.cheezenotes_line { /*div#cheezenotes div.cheezenotes_line {*/
/* Pour firefox : white-space: pre; */ /* Pour firefox : white-space: pre; */
} /*}*/
div#cheezenotes span.tokenfictif { div#cheezenotes span.tokenfictif {
font-weight: 1; font-weight: 1;
@ -257,8 +286,6 @@ div#cheezenotes div.lasttablerow span.tablerow {
border-bottom: none; border-bottom: none;
} }
div#cheezenotes div.cheezenotes_line span.token { div#cheezenotes div.cheezenotes_line span.token {
font-weight: 1; font-weight: 1;
color: #1353b3; color: #1353b3;
@ -270,7 +297,7 @@ div#cheezenotes div.cheezenotes_line span.token {
} }
div#cheezenotes:focus div.cheezenotes_line span.token { div#cheezenotes:focus div.cheezenotes_line span.token {
font-size: inherit; font-size: 95%;
} }
div#cheezenotes div.body { div#cheezenotes div.body {

@ -1,6 +1,16 @@
import { saveSelection, loadSelection, insertTextAtCaret } from './caret.js'; import { saveSelection, loadSelection, insertTextAtCaret } from './caret.js';
import { formatLine, load, save, formatTable, redrawTables, appendData, dpwidth } from './md.js'; import { formatLine, load, save, formatTable, redrawTables, appendData, dpwidth } from './md.js';
const showtokens = [
{ fontSize: 0 },
{ fontSize: '95%' }
];
const hidetokens = [
{ fontSize: '95%' },
{ fontSize: 0 }
];
function timeoutSave() { function timeoutSave() {
if (window.tos !== null) { if (window.tos !== null) {
window.clearTimeout(window.tos); window.clearTimeout(window.tos);
@ -8,9 +18,24 @@ function timeoutSave() {
window.tos = window.setTimeout(onsave, 5000); window.tos = window.setTimeout(onsave, 5000);
} }
function showTokens() {
let tokens = document.getElementsByClassName('token');
for (let i = 0; i < tokens.length; i++) {
tokens[i].animate(showtokens, { duration: 200, iterations: 1 });
}
}
function hideTokens() {
let tokens = document.getElementsByClassName('token');
for (let i = 0; i < tokens.length; i++) {
tokens[i].animate(hidetokens, { duration: 200, iterations: 1 });
}
}
function ontextarea(e) { function ontextarea(e) {
let ta = document.getElementById('ta'); let ta = document.getElementById('ta');
if (ta.style.display != 'inline') { let taButton = document.getElementById('taButton');
if (taButton.classList.contains('buttonoff')) {
ta.style.display = 'inline'; ta.style.display = 'inline';
} else { } else {
ta.style.display = 'none'; ta.style.display = 'none';
@ -173,36 +198,127 @@ function ondragleave(e) {
// alert('leave') // alert('leave')
} }
function init(pagename = null) { function addButton(id, icon, onclick) {
let cheezenotesdiv = document.getElementById('cheezenotes'); let buttons = document.getElementById('buttons');
let button = document.createElement('button');
dpwidth(cheezenotesdiv); button.id = id;
button.classList.add('button');
cheezenotesdiv.addEventListener('input', onedit); button.classList.add('material-icons');
cheezenotesdiv.addEventListener('keyup', onkeyup); button.innerText = icon;
cheezenotesdiv.addEventListener('keypress', onkeypress); button.addEventListener('mousedown', onclick);
cheezenotesdiv.addEventListener('keydown', onkeydown); buttons.appendChild(button);
cheezenotesdiv.addEventListener('paste', onpaste); return button;
cheezenotesdiv.addEventListener('copy', oncopy); }
cheezenotesdiv.addEventListener('blur', () => { redrawTables(cheezenotesdiv); onsave() });
cheezenotesdiv.addEventListener('focus', () => { redrawTables(cheezenotesdiv, dpwidth()); });
cheezenotesdiv.addEventListener('drag', ondrag);
cheezenotesdiv.addEventListener('dragenter', ondragenter);
cheezenotesdiv.addEventListener('dragleave', ondragleave);
let saveButton = document.getElementById('saveButton'); function addOnOffButton(id, icon, alt_icon, onclick, on = false) {
saveButton.disabled = true; let button;
saveButton.addEventListener('click', onsave); if (on == true) {
let taButton = document.getElementById('taButton'); button = addButton(id, icon, onclick);
taButton.addEventListener('click', ontextarea); button.classList.add('onoffbutton');
let lockButton = document.getElementById('lockButton'); button.classList.add('buttonon');
lockButton.addEventListener('click', onlockbutton); } else {
button = addButton(id, alt_icon, onclick);
button.classList.add('onoffbutton');
button.classList.add('buttonoff');
}
button.addEventListener('click', function (e) {
if (button.classList.contains('buttonon')) {
button.classList.remove('buttonon');
button.classList.add('buttonoff');
button.innerText = alt_icon;
} else {
button.classList.remove('buttonoff');
button.classList.add('buttonon');
button.innerText = icon;
}
});
return button;
}
function lastButton(button) {
button.classList.add('rightborder');
return button;
}
function floatRight(button) {
button.classList.add('floatright');
return button;
}
function addSeparator() {
let separator = addButton('', 'more_vert', function () { });
separator.classList.add('separator');
separator.classList.remove('button');
}
function enableFormatButtons() {
let boldButton = document.getElementById('boldButton');
let italicButton = document.getElementById('italicButton');
let strikeButton = document.getElementById('strikeButton');
boldButton.disabled = false;
italicButton.disabled = false;
strikeButton.disabled = false;
}
function disableFormatButtons() {
let boldButton = document.getElementById('boldButton'); let boldButton = document.getElementById('boldButton');
boldButton.addEventListener('mousedown', onboldbutton);
let italicButton = document.getElementById('italicButton'); let italicButton = document.getElementById('italicButton');
italicButton.addEventListener('mousedown', onitalicbutton);
let strikeButton = document.getElementById('strikeButton'); let strikeButton = document.getElementById('strikeButton');
strikeButton.addEventListener('mousedown', onstrikebutton); boldButton.disabled = true;
italicButton.disabled = true;
strikeButton.disabled = true;
}
function onblur(e) {
let cheezenotes = document.getElementById('cheezenotes');
redrawTables(cheezenotes);
onsave();
hideTokens();
disableFormatButtons();
}
function onfocus() {
redrawTables(cheezenotes, dpwidth());
showTokens();
enableFormatButtons();
}
function init(pagename = null) {
let cheezenotes = document.getElementById('cheezenotes');
dpwidth(cheezenotes);
cheezenotes.addEventListener('input', onedit);
cheezenotes.addEventListener('keyup', onkeyup);
cheezenotes.addEventListener('keypress', onkeypress);
cheezenotes.addEventListener('keydown', onkeydown);
cheezenotes.addEventListener('paste', onpaste);
cheezenotes.addEventListener('copy', oncopy);
cheezenotes.addEventListener('blur', onblur);
cheezenotes.addEventListener('focus', onfocus);
cheezenotes.addEventListener('drag', ondrag);
cheezenotes.addEventListener('dragenter', ondragenter);
cheezenotes.addEventListener('dragleave', ondragleave);
let saveButton = addButton('saveButton', 'save', onsave);
saveButton.disabled = true;
addSeparator();
addButton('boldButton', 'format_bold', onboldbutton);
addButton('italicButton', 'format_italic', onitalicbutton);
lastButton(addButton('strikeButton', 'format_strikethrough', onstrikebutton));
floatRight(lastButton(addOnOffButton('taButton', 'notes', 'notes', ontextarea)));
floatRight(addOnOffButton('editModeButton', 'edit_note', 'visibility',
function (e) {
if (editModeButton.classList.contains('buttonon')) {
cheezenotes.contentEditable = false;
} else {
cheezenotes.contentEditable = true;
}
}, true));
disableFormatButtons();
onload(); onload();
} }

@ -13,12 +13,12 @@
</head> </head>
<body> <body>
<div id="buttons"> <div id="buttons">
<button id="saveButton">💾</button> <!--<button id="saveButton">💾</button>
<input type="checkbox" id="taButton" /><label id="taButtonLabel" for="taButton">📋</label> <input type="checkbox" id="taButton" /><label id="taButtonLabel" for="taButton">📋</label>
<input type="checkbox" id="lockButton" /><label id="lockButtonLabel" for="lockButton" class="material-icons">visibility_off</label> <input type="checkbox" id="lockButton" /><label id="lockButtonLabel" for="lockButton" class="material-icons">visibility_off</label>
<button id="boldButton"><b>B</b></button> <button id="boldButton"><b>B</b></button>
<button id="italicButton"><i>I</i></button> <button id="italicButton"><i>I</i></button>
<button id="strikeButton"><s>S</s></button> <button id="strikeButton"><s>S</s></button>-->
</div> </div>
<div class="ta"><textarea id="ta" class="cheezenotes" spellcheck="false">{{md}}</textarea></body><div> <div class="ta"><textarea id="ta" class="cheezenotes" spellcheck="false">{{md}}</textarea></body><div>
<div id="cheezenotes" class="cheezenotes" contenteditable="true" spellcheck="false"></div> <div id="cheezenotes" class="cheezenotes" contenteditable="true" spellcheck="false"></div>

Loading…
Cancel
Save