Skip to content
Permalink
Browse files

new custom element <tobago-date>

issue: TOBAGO-1633: TS refactoring
  • Loading branch information...
Udo Schnurpfeil
Udo Schnurpfeil committed Oct 2, 2019
1 parent ebb8883 commit ae31318be104a54eb4b668824e5999fcae0bff08
@@ -47,6 +47,10 @@

private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());

public HtmlElements getComponentTag() {
return HtmlElements.TOBAGO_DATE;
}

@Override
protected void writeAdditionalAttributes(
final FacesContext facesContext, final TobagoResponseWriter writer, final AbstractUIInput input)
@@ -128,6 +132,6 @@ public void encodeEndField(final FacesContext facesContext, final UIComponent co

@Override
protected TobagoClass getRendererCssClass() {
return TobagoClass.DATE;
return null;
}
}
@@ -137,9 +137,10 @@ protected void encodeBeginField(final FacesContext facesContext, final UICompone
writer.writeAttribute(HtmlAttributes.PLACEHOLDER, input.getPlaceholder(), true);
}

final TobagoClass rendererCssClass = getRendererCssClass();
writer.writeClassAttribute(
getRendererCssClass(),
getRendererCssClass().createMarkup(markup),
rendererCssClass,
rendererCssClass != null ? rendererCssClass.createMarkup(markup) : null,
BootstrapClass.borderColor(ComponentUtils.getMaximumSeverity(input)),
BootstrapClass.FORM_CONTROL,
input.getCustomClass());
@@ -134,6 +134,7 @@
WBR("wbr", Qualifier.VOID),

TOBAGO_BEHAVIOR("tobago-behavior"),
TOBAGO_DATE("tobago-date"),
TOBAGO_FILE("tobago-file"),
TOBAGO_LABEL("tobago-label"),
TOBAGO_IN("tobago-in"),
@@ -210,7 +210,11 @@ tobago-panel.tobago-collapsed {

/* date -------------------------------------------------------------- */

// XXX remove me
.tobago-date {
}

tobago-date input {
min-width: 7em;

&::-ms-clear {
@@ -1580,6 +1584,9 @@ tobago-tree {
}

/* facesMessages messageLayout focus shadows ------------------------ */

// todo: check class vs. custom element

.tobago-date,
.tobago-in,
.tobago-selectManyListbox,
@@ -26,7 +26,7 @@
"ts": "npm-run-all --parallel ts-lint ts-compile",
"ts-lint": "tslint --project tsconfig.json --config tslint.json",
"ts-compile": "tsc",
"js-minify": "uglifyjs --compress typeofs=false,drop_console=true --mangle --source-map includeSources --output js/tobago.min.js js/tobago-myfaces.js js/tobago-deltaspike.js js/tobago-polyfill.js js/ext-bootstrap.js js/tobago-listener.js js/tobago-core.js js/tobago-dropdown.js js/tobago-calendar.js js/tobago-command.js js/tobago-file.js js/tobago-focus.js js/tobago-header-footer.js js/tobago-in.js js/tobago-jsf.js js/tobago-overlay.js js/tobago-panel.js js/tobago-popover.js js/tobago-popup.js js/tobago-reload.js js/tobago-scroll.js js/tobago-select-boolean-checkbox.js js/tobago-select-boolean-toggle.js js/tobago-select-many-checkbox.js js/tobago-select-many-shuttle.js js/tobago-select-one-listbox.js js/tobago-select-one-radio.js js/tobago-sheet.js js/tobago-split-layout.js js/tobago-stars.js js/tobago-suggest.js js/tobago-tab.js js/tobago-tree.js js/tobago-tree-listbox.js js/tobago-utils.js",
"js-minify": "uglifyjs --compress typeofs=false,drop_console=true --mangle --source-map includeSources --output js/tobago.min.js js/tobago-myfaces.js js/tobago-deltaspike.js js/tobago-polyfill.js js/ext-bootstrap.js js/tobago-listener.js js/tobago-core.js js/tobago-dropdown.js js/tobago-date.js js/tobago-command.js js/tobago-file.js js/tobago-focus.js js/tobago-header-footer.js js/tobago-in.js js/tobago-jsf.js js/tobago-overlay.js js/tobago-panel.js js/tobago-popover.js js/tobago-popup.js js/tobago-reload.js js/tobago-scroll.js js/tobago-select-boolean-checkbox.js js/tobago-select-boolean-toggle.js js/tobago-select-many-checkbox.js js/tobago-select-many-shuttle.js js/tobago-select-one-listbox.js js/tobago-select-one-radio.js js/tobago-sheet.js js/tobago-split-layout.js js/tobago-stars.js js/tobago-suggest.js js/tobago-tab.js js/tobago-tree.js js/tobago-tree-listbox.js js/tobago-utils.js",
"test": "jest"
},
"devDependencies": {
@@ -19,7 +19,7 @@ import "./ext-bootstrap";
import "./tobago-listener";
import "./tobago-core";
import "./tobago-dropdown";
import "./tobago-calendar";
import "./tobago-date";
import "./tobago-command";
import "./tobago-file";
import "./tobago-focus";

0 comments on commit ae31318

Please sign in to comment.
You can’t perform that action at this time.