Commit c0410d40 authored by Sylvain Coulange's avatar Sylvain Coulange
Browse files

début exportlink()

parent 53a6e3eb
This diff is collapsed.
...@@ -51,6 +51,8 @@ function setPhon(phon) { ...@@ -51,6 +51,8 @@ function setPhon(phon) {
thisCSS.cssRules[r].style['stop-color'] = memClass[phon]['stop-color'] thisCSS.cssRules[r].style['stop-color'] = memClass[phon]['stop-color']
thisCSS.cssRules[r].style['-webkit-text-fill-color'] = memClass[phon]['-webkit-text-fill-color'] thisCSS.cssRules[r].style['-webkit-text-fill-color'] = memClass[phon]['-webkit-text-fill-color']
thisCSS.cssRules[r].style['text-decoration'] = memClass[phon]['text-decoration'] thisCSS.cssRules[r].style['text-decoration'] = memClass[phon]['text-decoration']
delete memClass[phon];
} }
} }
} }
...@@ -124,17 +126,20 @@ function togglePhon(cbid) { ...@@ -124,17 +126,20 @@ function togglePhon(cbid) {
function checkUncheck(thisChecked, classe) { function checkUncheck(thisChecked, classe) {
cblist = document.querySelectorAll('.'+classe); cblist = document.querySelectorAll('.'+classe);
// thiscb = document.getElementById('checkAll').checked;
console.log(thisChecked); console.log(thisChecked);
if (!thisChecked) { if (!thisChecked) {
for (i=0; i<cblist.length; i++) { for (i=0; i<cblist.length; i++) {
cblist[i].checked = false; if (cblist[i].checked == true){
togglePhon(cblist[i].id) cblist[i].checked = false;
togglePhon(cblist[i].id)
}
} }
} else { } else {
for (i=0; i<cblist.length; i++) { for (i=0; i<cblist.length; i++) {
cblist[i].checked = true; if (cblist[i].checked == false){
togglePhon(cblist[i].id) cblist[i].checked = true;
togglePhon(cblist[i].id)
}
} }
} }
} }
...@@ -197,3 +202,25 @@ function makePhonTable(lang) { ...@@ -197,3 +202,25 @@ function makePhonTable(lang) {
} }
} }
} }
function exportCustom(){
var paramlink = "";
// Récupération liste des phonèmes inactifs
var unchecks = "";
for (i in memClass){
unchecks += i.replace('phon_','')+'&';
}
unchecks = unchecks.replace(/&$/,'');
// Récupération liste des couleurs customisées
var cols = document.documentElement.style.cssText.replace(/ /g,'')
.replace(/--phon_/g,'')
.replace(/#/g,'')
.replace(/:/g,'=')
.replace(/;/g,'&')
.replace(/&$/,'');
paramlink = unchecks + '$' + cols;
console.log(paramlink);
}
\ No newline at end of file
Markdown is supported
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