You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by hn...@apache.org on 2021/10/06 14:15:41 UTC
[myfaces-tobago] 02/02: refactor(test): remove outdated test
This is an automated email from the ASF dual-hosted git repository.
hnoeth pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git
commit 45dbfca543fff60b02cfaf1ddb123ab4f28f57a7
Author: Henning Noeth <hn...@apache.org>
AuthorDate: Wed Oct 6 16:02:16 2021 +0200
refactor(test): remove outdated test
---
.../1041-date-pattern/Date_Pattern.test.js | 104 -----
.../900-test/1041-date-pattern/Date_Pattern.xhtml | 491 ---------------------
.../900-test/1041-date-pattern/date-pattern.js | 109 -----
3 files changed, 704 deletions(-)
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/900-test/1041-date-pattern/Date_Pattern.test.js b/tobago-example/tobago-example-demo/src/main/webapp/content/900-test/1041-date-pattern/Date_Pattern.test.js
deleted file mode 100644
index 91ac112..0000000
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/900-test/1041-date-pattern/Date_Pattern.test.js
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import {JasmineTestTool} from "/tobago/test/tobago-test-tool.js";
-
-it("not implemented yet", function (done) {
- let test = new JasmineTestTool(done);
- test.do(() => fail("must be fixed first"));
- test.start();
-});
-
-/*
-import {TobagoTestTool} from "/tobago/test/tobago-test-tool.js";
-
-QUnit.test("test patterns", function (assert) {
-
- assert.ok(true, "work in progress");
- /!*
- assert.ok(false);
- TestDateTime.testDate();
- TestDateTime.testTime();
- TestDateTime.testBoth();
- *!/
-});
-*/
-
-/*TestDateTime = {};
-
-TestDateTime.testDate = function () {
-
- var date;
- var format = "dd.mm.yy";
- var initial = "13.05.2014";
- var result;
-
- date = moment(initial, format);
- result = moment(date).format(format);
-
- if (result !== initial) {
- console.error("Error!");
- } else {
- console.info("Okay!");
- }
-
-};
-
-TestDateTime.testTime = function () {
-
- var date;
- var format = "HH:mm:ss";
- var initial = "14:06:55";
- var result;
-
- date = moment(initial, format);
- result = moment(date).format(format);
-
- if (result !== initial) {
- console.error("Error!");
- } else {
- console.info("Okay!");
- }
-
-};
-
-TestDateTime.testBoth = function () {
-
- var date, dateT;
- var formatD = "dd.mm.yy";
- var formatT = "HH:mm:ss";
- var initial = "13.05.2014 13:05:55";
- var result;
- var separator = " ";
-
- date = moment(initial, formatD + ' ' + formatT);
- dateT = {
- hour: date.getHours(),
- minute: date.getMinutes(),
- second: date.getSeconds(),
- millisec: date.getMilliseconds(),
- microsec: date.getMicroseconds()
- };
- result = moment(date).format(formatD) + separator + jQuery.datepicker.formatTime(formatT, dateT);
-
- if (result !== initial) {
- console.error("Error!");
- } else {
- console.info("Okay!");
- }
-
-};*/
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/900-test/1041-date-pattern/Date_Pattern.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/900-test/1041-date-pattern/Date_Pattern.xhtml
deleted file mode 100644
index a3f9d83..0000000
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/900-test/1041-date-pattern/Date_Pattern.xhtml
+++ /dev/null
@@ -1,491 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
--->
-
-<f:view
- locale="DE"
- xmlns:tc="http://myfaces.apache.org/tobago/component"
- xmlns:f="http://xmlns.jcp.org/jsf/core">
-
- <tc:page id="page">
-
- <tc:script file="date-pattern.js"/>
-
- <tc:section label="TODO"></tc:section>
-
- <tc:gridLayout id="jquery_date_time_pattern" columns="2fr 2fr 2fr 1fr 1fr 2fr 2fr">
-
- <tc:label value="Name"/>
- <tc:label value="Java Pattern"/>
- <tc:label value="Java Formatted"/>
- <tc:label value="jQuery UI Pattern">
- <tc:gridLayoutConstraint columnSpan="2"/>
- </tc:label>
- <tc:label value="jQuery UI Formatted"/>
- <tc:label value="Result"/>
-
- <tc:label value="Comment"/>
- <tc:out value="Error means, that the pattern that comes from the server is invalid.
- This is defined manually on the page."/>
- <tc:out/>
- <tc:out value="date"/>
- <tc:out value="time"/>
- <tc:out value="Error means, that the date parsed and formatted is unequal to the original.
- The error state is computed with the JS functions."/>
- <tc:out/>
-
- <!-- y - year -->
-
- <tc:label value="1 y (wrong, but fixable)"/>
- <tc:in readonly="true" markup="error"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="dd.MM.y"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="2 y"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="dd.MM.yy"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="3 y (wrong, but fixable)"/>
- <tc:in readonly="true" markup="error"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="dd.MM.yyy"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="4 y"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="dd.MM.yyyy"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="5 y (can't fix)"/>
- <tc:in readonly="true" markup="error"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="dd.MM.yyyyy"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="6 y (can't fix)"/>
- <tc:in readonly="true" markup="error"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="dd.MM.yyyyyy"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <!-- M - month -->
-
- <tc:label value="1 M"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="dd.M.yyyy"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="2 M"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="dd.MM.yyyy"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="3 M"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="dd. MMM yyyy"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="4 M"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="dd. MMMM yyyy"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="5 M"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="dd. MMMMM yyyy"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <!-- L - month (stand alone) -->
-
- <!--
- <tc:label value="1 L"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="L"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="2 L"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="LL"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="3 L"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="LLL"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="4 L"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="LLLL"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="5 L"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="LLLLL"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
- -->
-
- <!-- d - day -->
-
- <tc:label value="1 d"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="d.MM.yyyy"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="2 d"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="dd.MM.yyyy"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="3 d (can't fix)"/>
- <tc:in readonly="true" markup="error"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="ddd.MM.yyyy"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <!-- E - day name in week -->
-
- <tc:label value="1 E"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="E, dd.MM.yyyy"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="2 E"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="EE, dd.MM.yyyy"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="3 E"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="EEE, dd.MM.yyyy"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="4 E"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="EEEE, dd.MM.yyyy"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="5 E"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="EEEEE, dd.MM.yyyy"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
-
- <!-- D - day in year -->
-
- <tc:label value="1 D"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="D yyyy"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="2 D"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="DD yyyy"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="3 D"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="DDD yyyy"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <!-- dateStyle -->
-
- <tc:label value="dateStyle=short"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime dateStyle="short"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="dateStyle=medium"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime dateStyle="medium"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="dateStyle=long"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime dateStyle="long"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="dateStyle=full"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime dateStyle="full"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <!-- time -->
-
- <tc:label value="?"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="HH:mm:ss" type="time"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <!-- timeStyle -->
-
- <tc:label value="timeStyle=short"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime timeStyle="short" type="time"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="timeStyle=medium"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime timeStyle="medium" type="time"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="timeStyle=long"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime timeStyle="long" type="time"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="timeStyle=full"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime timeStyle="full" type="time"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <!-- date time -->
-
- <tc:label value="?"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss.SSS"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <!-- dateStyle + TimeStyle -->
-
- <tc:label value="dateStyle=timeStyle=short"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime dateStyle="short" timeStyle="short" type="both"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="dateStyle=timeStyle=medium"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime dateStyle="medium" timeStyle="medium" type="both"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="dateStyle=timeStyle=long"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime dateStyle="long" timeStyle="long" type="both"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- <tc:label value="dateStyle=timeStyle=full"/>
- <tc:in readonly="true"/>
- <tc:date value="#{dateController.once}">
- <f:convertDateTime dateStyle="full" timeStyle="full" type="both"/>
- </tc:date>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:in readonly="true"/>
- <tc:label/>
-
- </tc:gridLayout>
-
- <tc:script file="datetime.js"/>
-
- </tc:page>
-</f:view>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/900-test/1041-date-pattern/date-pattern.js b/tobago-example/tobago-example-demo/src/main/webapp/content/900-test/1041-date-pattern/date-pattern.js
deleted file mode 100644
index 240bfc7..0000000
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/900-test/1041-date-pattern/date-pattern.js
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-TestDateTime = {};
-
-// TODO: to be reimplemented!!!
-
-TestDateTime.init = function () {
-
- var panel = jQuery("#page\\:jquery_date_time_pattern");
- var inputs = panel.find(".tobago-in, .tobago-date");
-
- for (var i = 0; i < inputs.length; i += 5) {
- var javaPattern = inputs.eq(i);
- var javaFormatted = inputs.eq(i + 1);
- var jQueryUIDatePattern = inputs.eq(i + 2);
- var jQueryUITimePattern = inputs.eq(i + 3);
- var jQueryUIFormatted = inputs.eq(i + 4);
- var result = jQueryUIFormatted.next();
-
- var pattern = javaFormatted.data("tobago-pattern");
- javaPattern.val(pattern);
-
- var analyzed = DateTime.analyzePattern(pattern);
-
- jQueryUIDatePattern.val(analyzed.dateFormat);
- jQueryUITimePattern.val(analyzed.timeFormat);
-
- try {
- var javaValue = javaFormatted.val();
- var date = null; // type: JS date
- var time = null; // type: jQuery UI time object
- var jQueryValue = null;
- var i18n = javaFormatted.data("tobago-date-time-i18n");
- switch (analyzed.type) {
- case "datetime":
- date = jQuery.datepicker.parseDateTime(
- analyzed.dateFormat, analyzed.timeFormat, javaValue, i18n, {
- separator: analyzed.separator,
- // workaround for bug: https://github.com/trentrichardson/jQuery-Timepicker-Addon/issues/736
- timeFormat: analyzed.timeFormat
- }
- );
- time = {
- hour: date.getHours(),
- minute: date.getMinutes(),
- second: date.getSeconds(),
- millisec: date.getMilliseconds(),
- microsec: date.getMicroseconds()
- };
- jQueryValue
- = jQuery.datepicker.formatDate(analyzed.dateFormat, date, i18n)
- + analyzed.separator
- + jQuery.datepicker.formatTime(analyzed.timeFormat, time, i18n);
- break;
- case "date":
- date = jQuery.datepicker.parseDate(analyzed.dateFormat, javaValue, i18n);
- jQueryValue = jQuery.datepicker.formatDate(analyzed.dateFormat, date, i18n);
- break;
- case "time":
- time = jQuery.datepicker.parseTime(analyzed.timeFormat, javaValue, i18n);
- jQueryValue = jQuery.datepicker.formatTime(analyzed.timeFormat, time, i18n);
- break;
- default:
- console.error("invalid: not date-pattern nor time-pattern");
- jQueryValue = "no type";
- }
- jQueryUIFormatted.val(jQueryValue);
-
- } catch (e) {
- console.error(e);
- }
-
- if (javaFormatted.val() !== jQueryUIFormatted.val()) {
- jQueryUIFormatted.addClass("tobago-in-markup-error");
-
- if (javaPattern.hasClass("tobago-in-markup-error")) {
- result.addClass("tobago-label-markup-warn");
- result.html("java pattern broken");
- } else {
- result.addClass("tobago-label-markup-error");
- result.html("pattern conversion failed");
- }
- } else {
- result.addClass("tobago-label-markup-info");
- if (javaPattern.hasClass("tobago-in-markup-error")) {
- result.html("fixed");
- } else {
- result.html("okay");
- }
- }
- }
-};
-
-Listener.register(TestDateTime.init, Phase.DOCUMENT_READY);