Skip to content

Commit

Permalink
Temporarily adding a "going out of beta" notice
Browse files Browse the repository at this point in the history
  • Loading branch information
Saikat Chakrabarti committed Jul 29, 2010
1 parent 0d41452 commit 6bae23e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
21 changes: 20 additions & 1 deletion LoginProviders/SCLoginDialogController.j
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ SCLoginFailed = 1;
@outlet CPButton _forgotPasswordLink @accessors(property=forgotPasswordLink);
@outlet CPCheckBox _rememberMeButton @accessors(property=rememberMeButton);
@outlet CPView _formFieldContainer @accessors(property=formFieldContainer);
@outlet CPButton _notice @accessors(property=notice);
}

- (void)awakeFromCib
Expand Down Expand Up @@ -117,6 +118,13 @@ SCLoginFailed = 1;
[_forgotPasswordLink setFrameOrigin:CGPointMake([_passwordField frame].origin.x + [_passwordField frame].size.width - [_forgotPasswordLink frame].size.width,
[_passwordField frame].origin.y + [_passwordField frame].size.height)];

[_notice setTheme:nil];
[_notice setAlignment:CPLeftTextAlignment];
[_notice setTextColor:[CPColor colorWithHexString:"993333"]];
[_notice sizeToFit];
if (_notice._DOMElement)
_notice._DOMElement.className = "hover"

[_rememberMeButton setFont:[CPFont fontWithName:[[_forgotPasswordLink font] familyName] size:[[_passwordLabel font] size]]];
if (_forgotPasswordLink._DOMElement)
_forgotPasswordLink._DOMElement.className = "hover";
Expand All @@ -140,6 +148,11 @@ SCLoginFailed = 1;
[_delegate performSelector:_callback withObject:_dialogReturnCode];
}

- (@action)detailsClicked:(id)sender
{
window.open("http://blog.gomockingbird.com/mockingbird-launch-and-other-exciting-updates");
}

- (@action)forgotPasswordLinkClicked:(id)sender
{
var forgotPasswordURL = [[CPBundle mainBundle] objectForInfoDictionaryKey:@"SCAuthForgotPasswordURL"];
Expand Down Expand Up @@ -297,8 +310,14 @@ SCLoginFailed = 1;
- (void)_sizeWindowToFit
{
var fieldFrame = [_formFieldContainer frame];
var size = [[_notice stringValue] sizeWithFont:[_notice font] inWidth:fieldFrame.size.width];
[_notice setFrame:CGRectMake(fieldFrame.origin.x,
fieldFrame.origin.y + fieldFrame.size.height + 3.0,
size.width,
size.height + 20.0)];

[_window setFrameSize:CGSizeMake(fieldFrame.origin.x + fieldFrame.size.width,
fieldFrame.origin.y + fieldFrame.size.height + 30.0)];
[_notice frame].origin.y + [_notice frame].size.height + 30.0)];
}

/* @ignore */
Expand Down
Loading

0 comments on commit 6bae23e

Please sign in to comment.