Commit 3b32a838 authored by Sylvain Coulange's avatar Sylvain Coulange
Browse files

debug colorPicker.value

parent c229eed4
......@@ -108,9 +108,9 @@ print("Mise en mémoire de dicoEn...")
word2transEn = makeWord2trans(dicoEn)
print("Nombre d'entrées dans AlemDic-dicoEn :", getLenDic(('en')))
# print("Mise en mémoire de dicoZh...")
# word2transZh = makeWord2trans(dicoZh)
# print("Nombre d'entrées dans AlemDic-dicoZh :", getLenDic('zh'))
print("Mise en mémoire de dicoZh...")
word2transZh = makeWord2trans(dicoZh)
print("Nombre d'entrées dans AlemDic-dicoZh :", getLenDic('zh'))
########################################
######### LECTURE DES FICHIERS #########
......
......@@ -13,7 +13,7 @@ async function getColorisation() {
inText: inText,
lang: lang
}
console.log('Envoi colis:',colis);
// console.log('Envoi colis:',colis);
// Paramètres d'envoi
const options = {
......@@ -345,7 +345,7 @@ function showAlignPop(tok) {
var locOK = []; // in order to avoid putting the same flag twice
for (loc in dicoTok[tok][i][1]){
var locMeta = loc2stand[dicoTok[tok][i][1][loc]];
if (!locOK.includes(locMeta)){
if (!locOK.includes(locMeta) && loc2stand[dicoTok[tok][i][1][loc]]){
stand += "<img style='height:25px; border:1px solid white; border-radius:3px; margin:5px;' src='static/im/flag-"+loc2stand[dicoTok[tok][i][1][loc]].toLowerCase()+".png' title='"+metaRegions[thisPageLang][loc2stand[dicoTok[tok][i][1][loc]]]+"'/>";
locOK.push(locMeta);
}
......@@ -540,7 +540,7 @@ function getPopUp() {
if (m.index === regexSpan.lastIndex) {
regexSpan.lastIndex++;
}
console.log("group1:",m[1],"group2:",m[2],"group3:",m[3],"group4:",m[4],"group5:",m[5]);
// console.log("group1:",m[1],"group2:",m[2],"group3:",m[3],"group4:",m[4],"group5:",m[5]);
if (m[5]) {
var newOutputSpan = "<span style='";
newOutputSpan += expFonte + expSizeBase + expNoBold;
......
......@@ -93,7 +93,7 @@ function getRawColor(phon) {
for (r=0; r<thisCSS.cssRules.length; r++) {
if(thisCSS.cssRules[r].selectorText == "."+phon) {
var thisCssVar = thisCSS.cssRules[r].style["color"];
console.log(thisCssVar.substring(4,thisCssVar.length-1));
// console.log(thisCssVar.substring(4,thisCssVar.length-1));
return getComputedStyle(document.documentElement).getPropertyValue(thisCssVar.substring(4,thisCssVar.length-1));
}
}
......@@ -152,7 +152,7 @@ function makePhonTable(lang) {
custphonList = document.querySelectorAll('.custphonc');
for (i=0; i<custphonList.length; i++) {
var api = custphonList[i].dataset.phon;
var colpick = ' <input type="color" id="colorPicker-'+api2class[api]+'" class="colorSetting" onchange="setCol(\''+api2class[api]+'\',this.value)" value="'+ getCol(api2class[api]) +'">';
var colpick = ' <input type="color" id="colorPicker-'+api2class[api]+'" class="colorSetting" onchange="setCol(\''+api2class[api]+'\',this.value)" value="'+ getCol(api2class[api]).trim() +'">';
if (bi.includes(api)){
colpick = '';
}
......@@ -162,7 +162,7 @@ function makePhonTable(lang) {
custphonList = document.querySelectorAll('.custphonv');
for (i=0; i<custphonList.length; i++) {
var api = custphonList[i].dataset.phon;
var colpick = ' <input type="color" id="colorPicker-'+api2class[api]+'" class="colorSetting" onchange="setCol(\''+api2class[api]+'\',this.value)" value="'+ getCol(api2class[api]) +'">';
var colpick = ' <input type="color" id="colorPicker-'+api2class[api]+'" class="colorSetting" onchange="setCol(\''+api2class[api]+'\',this.value)" value="'+ getCol(api2class[api]).trim() +'">';
if (bi.includes(api)){
colpick = '';
}
......@@ -172,7 +172,7 @@ function makePhonTable(lang) {
custphonList = document.querySelectorAll('.custphonvn');
for (i=0; i<custphonList.length; i++) {
var api = custphonList[i].dataset.phon;
var colpick = ' <input type="color" id="colorPicker-'+api2class[api]+'" class="colorSetting" onchange="setCol(\''+api2class[api]+'\',this.value)" value="'+ getCol(api2class[api]) +'">';
var colpick = ' <input type="color" id="colorPicker-'+api2class[api]+'" class="colorSetting" onchange="setCol(\''+api2class[api]+'\',this.value)" value="'+ getCol(api2class[api]).trim() +'">';
if (bi.includes(api)){
colpick = '';
}
......@@ -182,7 +182,7 @@ function makePhonTable(lang) {
custphonList = document.querySelectorAll('.custphonschwa');
for (i=0; i<custphonList.length; i++) {
var api = custphonList[i].dataset.phon;
var colpick = ' <input type="color" id="colorPicker-'+api2class[api]+'" class="colorSetting" onchange="setCol(\''+api2class[api]+'\',this.value)" value="'+ getCol(api2class[api]) +'">';
var colpick = ' <input type="color" id="colorPicker-'+api2class[api]+'" class="colorSetting" onchange="setCol(\''+api2class[api]+'\',this.value)" value="'+ getCol(api2class[api]).trim() +'">';
if (bi.includes(api)){
colpick = '';
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment