js/pgnvjs.js
/**
         * Fills the comment field depending on which and if a comment is filled for that move.
         */
Fills the comment field depending on which and if a comment is filled for that move.
Fills the comment field depending on which and if a comment is filled for that move .
function fillComment(moveNumber) {
            var myMove = that.mypgn.getMove(moveNumber);
            if (myMove.commentAfter) {
                document.querySelector('#' + boardId + " input.afterComment").checked = true;
                document.querySelector('#' + boardId + " textarea.comment").value = myMove.commentAfter;
            } else if (myMove.commentBefore) {
                document.querySelector('#' + boardId + " input.beforeComment").checked = true;
                document.querySelector('#' + boardId + " textarea.comment").value = myMove.commentBefore;
            } else if (myMove.commentMove) {
                document.querySelector('#' + boardId + " input.moveComment").checked = true;
                document.querySelector('#' + boardId + " textarea.comment").value = myMove.commentMove;
            } else {
                document.querySelector('#' + boardId + " textarea.comment").value = "";
            }
        }
function fillComment ( moveNumber ) { var myMove = that . mypgn . getMove ( moveNumber ) ; if ( myMove . commentAfter ) { document . querySelector ( '#' + boardId + " input.afterComment" ) . checked = true ; document . querySelector ( '#' + boardId + " textarea.comment" ) . value = myMove . commentAfter ; } else if ( myMove . commentBefore ) { document . querySelector ( '#' + boardId + " input.beforeComment" ) . checked = true ; document . querySelector ( '#' + boardId + " textarea.comment" ) . value = myMove . commentBefore ; } else if ( myMove . commentMove ) { document . querySelector ( '#' + boardId + " input.moveComment" ) . checked = true ; document . querySelector ( '#' + boardId + " textarea.comment" ) . value = myMove . commentMove ; } else { document . querySelector ( '#' + boardId + " textarea.comment" ) . value = "" ; } }
Fills the comment field depending on which and if a comment is filled for that move.
Fills the comment field depending on which and if a comment is filled for that move .