mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-12-25 18:38:50 +00:00
Added an attribute to createElem2 to ease translation.
This commit is contained in:
parent
f859abcb2f
commit
e1c3b0c002
@ -39,6 +39,7 @@ function createElem(nodeType, appendTo){
|
|||||||
* @info {String} value The value of the new element
|
* @info {String} value The value of the new element
|
||||||
* @info {String} placeholder The placeholder of the new element
|
* @info {String} placeholder The placeholder of the new element
|
||||||
* @info {String} innerHTML Specify the html content of the newly created element
|
* @info {String} innerHTML Specify the html content of the newly created element
|
||||||
|
* @info {String} innerLang Specify the key of the lang to use to fill the element
|
||||||
* @info {boolean} disabled Set whether the field should be disabled or not (input only)
|
* @info {boolean} disabled Set whether the field should be disabled or not (input only)
|
||||||
* @return {HTMLElement} The newly created element
|
* @return {HTMLElement} The newly created element
|
||||||
*/
|
*/
|
||||||
@ -102,6 +103,9 @@ function createElem2(infos){
|
|||||||
if(infos.innerHTML)
|
if(infos.innerHTML)
|
||||||
newElem.innerHTML = infos.innerHTML;
|
newElem.innerHTML = infos.innerHTML;
|
||||||
|
|
||||||
|
if(infos.innerLang)
|
||||||
|
newElem.innerHTML = lang(infos.innerLang);
|
||||||
|
|
||||||
//Set field state
|
//Set field state
|
||||||
if(infos.disabled)
|
if(infos.disabled)
|
||||||
infos.disabled = true;
|
infos.disabled = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user