Skip to content

Commit

Permalink
Merge branch 'master' of ssh://github.com/meteor-useraccounts/semanti…
Browse files Browse the repository at this point in the history
…c-ui

Conflicts:
	lib/at_semantic-ui.css
  • Loading branch information
splendido committed Aug 8, 2015
2 parents d3b43cc + 944f327 commit 2eebcd9
Show file tree
Hide file tree
Showing 13 changed files with 91 additions and 68 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
useraccounts:semantic-ui
========================

Meteor sign up and sign in templates styled for Semantic UI
Meteor sign up and sign in templates styled for Semantic UI.

This package depends on [useraccounts:core](https://atmospherejs.com/useraccounts/core)
This package depends on [useraccounts:core](https://atmospherejs.com/useraccounts/core).

Learn more [here](http://useraccounts.meteor.com) or have a look at a [live demo application](http://useraccounts-semantic-ui.meteor.com/) or at the full [documentation](https://github.com/meteor-useraccounts/core).

Expand All @@ -13,7 +13,7 @@ Learn more [here](http://useraccounts.meteor.com) or have a look at a [live demo

Adding this package with `meteor add useraccounts:semantic-ui` does not add any other packages providing Semantic UI. This is to let you choose the flavour you prefer, being it compiled, less, sass, or from CDN!

At the moment it is up to date with Semantic UI 1.0.
At the moment it is up to date with Semantic UI 2.0.7.


## Contributing
Expand Down
8 changes: 4 additions & 4 deletions lib/at_error.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<template name="atError">
<div class="at-error ui icon error message">
<div class="at-error ui large icon error message">
<i class="warning icon"></i>
<div class="content">
{{#if singleError}}
{{#each error}}
<p>{{errorText}}</p>
<p><strong>{{errorText}}</strong></p>
{{/each}}
{{else}}
<ul class="list">
{{#each error}}
<li>{{errorText}}</li>
<li><strong>{{errorText}}</strong></li>
{{/each}}
</ul>
{{/if}}
{{/if}}
</div>
</div>
</template>
73 changes: 39 additions & 34 deletions lib/at_form.html
Original file line number Diff line number Diff line change
@@ -1,39 +1,44 @@
<template name="atForm">
{{#unless hide}}
<div class="at-form ui large fluid {{#if showError}} error {{/if}} {{#if showResult}} success {{/if}} form segment">
{{#if showTitle}}
{{> atTitle}}
{{/if}}
{{#if showTitle}}
{{> atTitle}}
{{#if showOauthServices}}
{{> atOauth}}
{{/if}}
{{#if showServicesSeparator}}
{{> atSep}}
{{/if}}
{{#if showError}}
{{> atError}}
{{/if}}
{{#if showResult}}
{{> atResult}}
{{/if}}
{{#if showMessage}}
{{> atMessage}}
{{/if}}
{{#if showPwdForm}}
{{> atPwdForm}}
{{/if}}
{{#if showTermsLink}}
{{> atTermsLink}}
{{/if}}
{{#if showSignInLink}}
{{> atSigninLink}}
{{/if}}
{{#if showSignUpLink}}
{{> atSignupLink}}
{{/if}}
{{#if showResendVerificationEmailLink}}
{{> atResendVerificationEmailLink}}
{{/if}}
</div>
<div class="ui divider"></div>
{{/if}}
{{/if}}
{{#if showOauthServices}}
{{> atOauth}}
{{/if}}
{{#if showServicesSeparator}}
{{> atSep}}
{{/if}}
{{#if showPwdForm}}
{{> atPwdForm}}
{{/if}}
{{#if showError}}
{{> atError}}
{{/if}}
{{#if showResult}}
{{> atResult}}
{{/if}}
{{#if showMessage}}
{{> atMessage}}
{{/if}}
{{#if any showTermsLink showSignInLink showSignUpLink showResendVerificationEmailLink}}
<div class="ui large message">
{{#if showTermsLink}}
{{> atTermsLink}}
{{/if}}
{{#if showSignInLink}}
{{> atSigninLink}}
{{/if}}
{{#if showSignUpLink}}
{{> atSignupLink}}
{{/if}}
{{#if showResendVerificationEmailLink}}
{{> atResendVerificationEmailLink}}
{{/if}}
</div>
{{/if}}
{{/unless}}
</template>
8 changes: 8 additions & 0 deletions lib/at_form.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
// Simply 'inherites' helpers from AccountsTemplates
Template.atForm.helpers(AccountsTemplates.atFormHelpers);

// Helper for checking if you should hide message div under atPwdForm
// if there is nothing to display in it
Template.atForm.helpers({
any: function (a, b, c) {
return a || b || c ? true : false;
}
});
8 changes: 4 additions & 4 deletions lib/at_input.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</template>

<template name="atTextInput">
<div class="at-input {{#if required}} required {{/if}} {{#if isValidating}} validating {{/if}} field {{#if hasError}}error{{/if}}">
<div class="at-input {{#if required}} required {{/if}} {{#if isValidating}} validating {{/if}} {{#if hasError}} error {{/if}} field">
{{#if showLabels}}
<label>
{{displayName}}
Expand All @@ -24,14 +24,14 @@
<template name="atCheckboxInput">
<div class="at-input inline field">
<div class="ui toggle checkbox">
<input type="{{type}}" id="at-field-{{_id}}" name="at-field-{{_id}}" {{disabled}}>
<input type="{{type}}" id="at-field-{{_id}}" name="at-field-{{_id}}" {{disabled}} tabindex="0" class="hidden">
<label for="at-field-{{_id}}">{{displayName}}</label>
</div>
</div>
</template>

<template name="atSelectInput">
<div class="at-input {{#if required}} required {{/if}} {{#if hasError}}error{{/if}} field">
<div class="at-input {{#if required}} required {{/if}} {{#if hasError}} error {{/if}} field">
<label>{{displayName}}</label>
<div class="ui fluid selection dropdown">
<input type="hidden" id="at-field-{{_id}}" name="at-field-{{_id}}">
Expand All @@ -57,7 +57,7 @@
{{#each values}}
<div class="at-input field">
<div class="ui radio checkbox">
<input id="at-field-{{id}}-choice-{{value}}" type="radio" name="at-field-{{id}}" value= {{value}}>
<input id="at-field-{{id}}-choice-{{value}}" type="radio" name="at-field-{{id}}" value= {{value}} tabindex="0" class="hidden">
<label for="at-field-{{id}}-choice-{{value}}">{{text}}</label>
</div>
</div>
Expand Down
9 changes: 8 additions & 1 deletion lib/at_input.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@ Template.atTextInput.helpers(AccountsTemplates.atInputHelpers);
// Simply 'inherites' helpers from AccountsTemplates
Template.atCheckboxInput.helpers(AccountsTemplates.atInputHelpers);

Template.atSelectInput.rendered = function() {
// Fixes focused toggle checkbox after click (does not change color to blue)
Template.atCheckboxInput.events({
'click .toggle.checkbox > input': function (event) {
$(event.currentTarget).blur();
}
});

Template.atSelectInput.rendered = function () {
$('.ui.dropdown').dropdown();
};

Expand Down
2 changes: 1 addition & 1 deletion lib/at_message.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template name="atMessage">
<div class="at-message ui icon info message">
<div class="at-message ui large icon info message">
<i class="info icon"></i>
<div class="content">
<p><strong>{{message}}</strong></p>
Expand Down
24 changes: 13 additions & 11 deletions lib/at_pwd_form.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<template name="atPwdForm">
<div class="at-pwd-form">
<form id="at-pwd-form" action="#" method="POST" novalidate>
{{#each fields}}
{{> atInput}}
{{/each}}
{{#if showReCaptcha}}
{{> atReCaptcha}}
{{/if}}
{{#if showForgotPasswordLink}}
{{> atPwdLink}}
{{/if}}
{{> atPwdFormBtn}}
<form id="at-pwd-form" action="#" method="POST" novalidate class="ui large form">
<div class="ui stacked segment">
{{#each fields}}
{{> atInput}}
{{/each}}
{{#if showReCaptcha}}
{{> atReCaptcha}}
{{/if}}
{{#if showForgotPasswordLink}}
{{> atPwdLink}}
{{/if}}
{{> atPwdFormBtn}}
</div>
</form>
</div>
</template>
2 changes: 1 addition & 1 deletion lib/at_result.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template name="atResult">
<div class="at-result ui icon success message">
<div class="at-result ui large icon success message">
<i class="checkmark icon"></i>
<div class="content">
<p><strong>{{result}}</strong></p>
Expand Down
12 changes: 6 additions & 6 deletions lib/at_social.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
Template.atSocial.helpers(AccountsTemplates.atSocialHelpers);
// Overrides Font Awesome icon class name with simple service name
Template.atSocial.helpers({
serviceName: function() {
serviceName: function () {
var serviceStr = this._id;
if (serviceStr[0] === "g" && serviceStr[1] === "o")
serviceStr += " plus";
if (serviceStr === 'google')
serviceStr += ' plus';
return serviceStr;
},
iconClass: function() {
iconClass: function () {
var classStr = this._id;
if (classStr[0] === "g" && classStr[1] === "o")
classStr += " plus";
if (classStr === 'google')
classStr += ' plus';
return classStr;
},
});
Expand Down
1 change: 1 addition & 0 deletions lib/at_terms_link.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<div class="at-terms-link at-wrap">
<p>
{{text}}
<br>
{{#if privacyUrl}}
<a href="{{privacyUrl}}" class="{{disabled}}">{{privacyLinkText}}</a>
{{/if}}
Expand Down
2 changes: 1 addition & 1 deletion lib/at_title.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template name="atTitle">
<div class="at-title">
<h2 class="ui center aligned dividing header">
<h2 class="ui center aligned header">
{{title}}
</h2>
</div>
Expand Down
4 changes: 2 additions & 2 deletions lib/full_page_at_form.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template name="fullPageAtForm">
<div class="ui center aligned three column stackable page grid">
<div class="at-left eight wide column">
<div class="at-grid ui center aligned grid">
<div class="at-column middle aligned column">
{{> atForm}}
</div>
</div>
Expand Down

0 comments on commit 2eebcd9

Please sign in to comment.