accounts-ui-viewer: update for halign

This commit is contained in:
David Greenspan
2012-10-11 21:45:18 -07:00
parent ed89815a33
commit ea83ef4174
2 changed files with 11 additions and 7 deletions

View File

@@ -17,9 +17,9 @@
<template name="page">
<div id="controlpane">
<div class="group">
<h3>Dropdown opens:</h3>
{{radio "openLeft" "false" "Right"}}
{{radio "openLeft" "true" "Left"}}
<h3>Dropdown align edge:</h3>
{{radio "alignRight" "false" "Left"}}
{{radio "alignRight" "true" "Right"}}
</div>
<div class="group">
<h3>Positioning:</h3>
@@ -106,7 +106,7 @@
{{#if match "positioning:inline"}}
Here is a place to sign in, yay!
{{/if}}
{{loginButtons}}
{{loginButtons halign=halign}}
{{#if match "positioning:inline"}}
Isn't that great?
{{/if}}

View File

@@ -1,3 +1,4 @@
Meteor.users.allow({update: function () { return true; }});
if (Meteor.isClient) {
@@ -38,7 +39,7 @@ if (Meteor.isClient) {
if (! Session.get('settings'))
Session.set('settings', {
openLeft: false,
alignRight: false,
positioning: "relative",
numServices: 3,
hasPasswords: true,
@@ -65,8 +66,6 @@ if (Meteor.isClient) {
Template.page.outerClass = function () {
var settings = Session.get('settings');
var classes = [];
if (settings.openLeft)
classes.push('login-buttons-dropdown-hangs-left');
return classes.join(' ');
};
@@ -115,6 +114,11 @@ if (Meteor.isClient) {
return Session.get('settings')[kv[0]] === kv[1];
};
Template.page.halign = function () {
var settings = this;
return settings.alignRight ? 'right' : 'left';
};
var fakeLogin = function () {
Accounts.createUser(
{username: Meteor.uuid(),