Skip to content

Commit

Permalink
Use block helpers in attributes again in accounts-ui
Browse files Browse the repository at this point in the history
Now that it's once again supported
  • Loading branch information
avital committed Dec 17, 2013
1 parent 49bc199 commit c463d34
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion packages/accounts-ui-unstyled/login_buttons_dialogs.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
</div>
<a class="accounts-close configure-login-service-dismiss-button">&times;</a>

<div class="login-button login-button-configure {{additionalClasses}}"
<div class="login-button login-button-configure {{#if saveDisabled}}login-button-disabled{{/if}}"
id="configure-login-service-dialog-save-configuration">
Save Configuration
</div>
Expand Down
7 changes: 2 additions & 5 deletions packages/accounts-ui-unstyled/login_buttons_dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,8 @@ Template._configureLoginServiceDialog.configurationSteps = function () {
return configureLoginServiceDialogTemplateForService();
};

Template._configureLoginServiceDialog.additionalClasses = function () {
if (loginButtonsSession.get('configureLoginServiceDialogSaveDisabled'))
return "login-button-disabled";
else
return "";
Template._configureLoginServiceDialog.saveDisabled = function () {
return loginButtonsSession.get('configureLoginServiceDialogSaveDisabled');
};

// XXX from http://epeli.github.com/underscore.string/lib/underscore.string.js
Expand Down
2 changes: 1 addition & 1 deletion packages/accounts-ui-unstyled/login_buttons_single.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template name="_loginButtonsLoggedOutSingleLoginButton">
<div class="login-text-and-button">
<div class="login-button single-login-button {{additionalClasses}}"
<div class="login-button single-login-button {{#unless configured}}configure-button{{/unless}}"
id="login-buttons-{{name}}">
<div class="login-image" id="login-buttons-image-{{name}}"></div>
{{#if configured}}
Expand Down
7 changes: 0 additions & 7 deletions packages/accounts-ui-unstyled/login_buttons_single.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@ Template._loginButtonsLoggedOutSingleLoginButton.configured = function () {
return !!ServiceConfiguration.configurations.findOne({service: this.name});
};

Template._loginButtonsLoggedOutSingleLoginButton.additionalClasses = function () {
if (!!ServiceConfiguration.configurations.findOne({service: this.name}))
return "";
else
return "configure-button";
};

Template._loginButtonsLoggedOutSingleLoginButton.capitalizedName = function () {
if (this.name === 'github')
// XXX we should allow service packages to set their capitalized name
Expand Down

0 comments on commit c463d34

Please sign in to comment.