function check() { checkLabel("page:literal-tc-both", "B"); checkLabel("page:literal-tc-item", "B"); checkLabel("page:literal-tc-label", "A"); checkLabel("page:literal-tc-no", null); checkLabel("page:literal-tx-both", "B"); checkLabel("page:literal-tx-item", "B"); checkLabel("page:literal-tx-label", ""); checkLabel("page:literal-tx-no", ""); checkMessage("page:literal-tc-both", "A"); checkMessage("page:literal-tc-item", "-"); checkMessage("page:literal-tc-label", "A"); checkMessage("page:literal-tc-no", "-"); checkMessage("page:literal-tx-both", "A"); checkMessage("page:literal-tx-item", "-"); checkMessage("page:literal-tx-label", "A"); checkMessage("page:literal-tx-no", "-"); checkLabel("page:expression-tc-both", "B"); checkLabel("page:expression-tc-item", "B"); checkLabel("page:expression-tc-label", "A"); checkLabel("page:expression-tc-no", null); checkLabel("page:expression-tx-both", "B"); checkLabel("page:expression-tx-item", "B"); checkLabel("page:expression-tx-label", ""); checkLabel("page:expression-tx-no", ""); checkMessage("page:expression-tc-both", "A"); checkMessage("page:expression-tc-item", "-"); checkMessage("page:expression-tc-label", "A"); checkMessage("page:expression-tc-no", "-"); checkMessage("page:expression-tx-both", "A"); checkMessage("page:expression-tx-item", "-"); checkMessage("page:expression-tx-label", "A"); checkMessage("page:expression-tx-no", "-"); } function checkLabel(id, estimate) { var label = jQuery(Tobago.Utils.escapeClientId(id)).next("label"); if (estimate != label.html()) { LOG.error("Wrong label (" + id + "). Estimate='" + estimate + "' found='" + label.html() + "'."); // } else { // LOG.info("Correct label (" + id + "). Estimate='" + estimate + "' found='" + label.html() + "'."); } } function checkMessage(id, estimate) { var label = jQuery(".tobago-messages label[for='" + id + "']"); if (estimate != label.html()) { LOG.error("Wrong message (" + id + "). Estimate='" + estimate + "' found='" + label.html() + "'."); // } else { // LOG.info("Correct label (" + id + "). Estimate='" + estimate + "' found='" + label.html() + "'."); } }