mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
accounts-ui-viewer: update for halign
This commit is contained in:
@@ -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}}
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user