Skip to content

Commit

Permalink
added support for custom and validating icon
Browse files Browse the repository at this point in the history
  • Loading branch information
splendido committed Nov 10, 2014
1 parent bcf2376 commit 3b02323
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 25 deletions.
13 changes: 3 additions & 10 deletions lib/at_input.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,15 @@
</template>

<template name="atTextInput">
<div class="at-input {{#if hasError}}has-error{{/if}} {{#if hasSuccess}}has-success{{/if}} {{#if feedback}}has-feedback{{/if}}">
<div class="at-input {{#if isValidating}}validating{{/if}} {{#if hasError}}has-error{{/if}} {{#if hasSuccess}}has-success{{/if}} {{#if feedback}}has-feedback{{/if}}">
{{#if showLabels}}
<label for="at-field-{{_id}}">
{{displayName}} {{#unless required}}{{optionalText}}{{/unless}}
</label>
{{/if}}
<input type="{{type}}" id="at-field-{{_id}}" name="at-field-{{_id}}" placeholder="{{placeholder}}" autocapitalize="none" autocorrect="off">
{{#if negativeFeedback}}
{{#if hasError}}
<span class="glyphicon glyphicon-remove"></span>
{{/if}}
{{/if}}
{{#if positiveFeedback}}
{{#if hasSuccess}}
<span class="glyphicon glyphicon-ok"></span>
{{/if}}
{{#if hasIcon}}
<span class="{{iconClass}}"></span>
{{/if}}
{{#if hasError}}
<span>{{errorText}}</span>
Expand Down
34 changes: 19 additions & 15 deletions lib/at_unstyled.css
Original file line number Diff line number Diff line change
@@ -1,59 +1,63 @@
button#at-facebook {
#at-facebook {
background: #3B5998;
color: #fff;
}
button#at-facebook.disabled {
#at-facebook.disabled {
color: #ddd;
background: #666666;
}
button#at-facebook:hover {
#at-facebook:hover {
background: #2C4780;
}

button#at-linkedin {
#at-linkedin {
background: #338AB0;
color: #fff;
}
button#at-linkedin.disabled {
#at-linkedin.disabled {
color: #ddd;
background: #666666;
}
button#at-linkedin:hover {
#at-linkedin:hover {
background: #0571A6;
}

button#at-twitter {
#at-twitter {
background: #4099FF;
color: #fff;
}
button#at-twitter.disabled {
#at-twitter.disabled {
color: #ddd;
background: #666666;
}
button#at-twitter:hover {
#at-twitter:hover {
background: #3288EB;
}

button#at-google {
#at-google {
background: #db5a3c;
color: #fff;
}
button#at-google.disabled {
#at-google.disabled {
color: #ddd;
background: #666666;
}
button#at-google:hover {
#at-google:hover {
background: #CA4C2E;
}

button#at-github {
#at-github {
background: #666;
color: #fff;
}
button#at-github.disabled {
#at-github.disabled {
color: #ddd;
background: #666666;
}
button#at-github:hover {
#at-github:hover {
background: #555;
}

.at-input.validating * {
cursor:progress;
}

0 comments on commit 3b02323

Please sign in to comment.