diff --git a/RedmineMobile/RedmineMobile/OZLAppDelegate.m b/RedmineMobile/RedmineMobile/OZLAppDelegate.m
index 6b3ffd0..ff16bd9 100644
--- a/RedmineMobile/RedmineMobile/OZLAppDelegate.m
+++ b/RedmineMobile/RedmineMobile/OZLAppDelegate.m
@@ -38,28 +38,7 @@
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = PP_AUTORELEASE([[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]);
-/*
- id main = nil;
- int lastProjectID = [[OZLSingleton sharedInstance] lastProjectID];
- if (lastProjectID < 0) {
- main = [[OZLAccountViewController alloc] initWithNibName:@"OZLAccountViewController" bundle:nil];
- }else {
- main = [[OZLProjectViewController alloc] initWithNibName:@"OZLProjectViewController" bundle:nil];
- OZLModelProject* data = [[OZLModelProject alloc] init];
- data.index = lastProjectID;
- [main setProjectData:data];
- }
-
- UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:main];
- _revealSideViewController = [[PPRevealSideViewController alloc] initWithRootViewController:nav];
-
- _revealSideViewController.delegate = self;
-
- self.window.rootViewController = _revealSideViewController;
-
- PP_RELEASE(main);
- PP_RELEASE(nav);
-*/
+
OZLProjectListViewController* projectList = [[OZLProjectListViewController alloc] initWithNibName:@"OZLProjectListViewController" bundle:nil];
_navigationController = [[UINavigationController alloc] initWithRootViewController:projectList];
@@ -76,7 +55,7 @@
self.window.rootViewController = _navigationController;
- self.window.backgroundColor = [UIColor whiteColor];
+ self.window.backgroundColor = [UIColor blackColor];
[self.window makeKeyAndVisible];
return YES;
}
diff --git a/RedmineMobile/RedmineMobile/ViewControllers/OZLAccountViewController.m b/RedmineMobile/RedmineMobile/ViewControllers/OZLAccountViewController.m
index 75386b8..4027900 100644
--- a/RedmineMobile/RedmineMobile/ViewControllers/OZLAccountViewController.m
+++ b/RedmineMobile/RedmineMobile/ViewControllers/OZLAccountViewController.m
@@ -27,7 +27,6 @@
// THE SOFTWARE.
#import "OZLAccountViewController.h"
-#import "PPRevealSideViewController.h"
#import "OZLProjectListViewController.h"
#import "OZLSingleton.h"
#import "OZLConstants.h"
@@ -53,10 +52,12 @@
- (void)viewDidLoad
{
[super viewDidLoad];
-// [self changeSideViewOffset:40];
-// UIBarButtonItem* projectListBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemBookmarks target:self action:@selector(showProjectList)];
-// [self.navigationItem setLeftBarButtonItem:projectListBtn];
+ UIBarButtonItem* doneBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(onOk:)];
+ [self.navigationItem setRightBarButtonItem:doneBtn];
+
+ UIBarButtonItem* cancelBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(showProjectList)];
+ [self.navigationItem setLeftBarButtonItem:cancelBtn];
_redmineHomeURL.text = [[OZLSingleton sharedInstance] redmineHomeURL];
_redmineUserKey.text = [[OZLSingleton sharedInstance] redmineUserKey];
@@ -72,39 +73,13 @@
[self.view endEditing:YES];
}
-- (void) preloadLeft {
- OZLProjectListViewController *c = [[OZLProjectListViewController alloc] initWithNibName:@"OZLProjectListViewController" bundle:nil];
- [self.revealSideViewController preloadViewController:c
- forSide:PPRevealSideDirectionLeft
- withOffset:_sideviewOffset];
- PP_RELEASE(c);
-}
-- (void) viewDidAppear:(BOOL)animated {
- [super viewDidAppear:animated];
- [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(preloadLeft) object:nil];
- [self performSelector:@selector(preloadLeft) withObject:nil afterDelay:0.3];
-}
-
- (void) showProjectList {
- [self.navigationController popViewControllerAnimated:YES];
-
-// OZLProjectListViewController *c = [[OZLProjectListViewController alloc] initWithNibName:@"OZLProjectListViewController" bundle:nil];
-// [c setNeedRefresh:YES];
-// UINavigationController* navigationController = [[UINavigationController alloc] initWithRootViewController:c];
-// [self.revealSideViewController pushViewController:navigationController onDirection:PPRevealSideDirectionLeft withOffset:_sideviewOffset animated:YES];
-// PP_RELEASE(c);
-}
-
-- (IBAction)changeSideViewOffset:(int)offset {
- _sideviewOffset = offset;
- [self.revealSideViewController changeOffset:_sideviewOffset
- forDirection:PPRevealSideDirectionRight];
- [self.revealSideViewController changeOffset:_sideviewOffset
- forDirection:PPRevealSideDirectionLeft];
- [self.revealSideViewController changeOffset:_sideviewOffset
- forDirection:PPRevealSideDirectionTop];
- [self.revealSideViewController changeOffset:_sideviewOffset
- forDirection:PPRevealSideDirectionBottom];
+ [UIView animateWithDuration:0.75
+ animations:^{
+ [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
+ [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.navigationController.view cache:NO];
+ }];
+ [self.navigationController popViewControllerAnimated:NO];
}
- (void)didReceiveMemoryWarning
@@ -120,6 +95,7 @@
[self setPassword:nil];
[super viewDidUnload];
}
+
- (IBAction)onOk:(id)sender {
[[OZLSingleton sharedInstance] setRedmineUserKey:_redmineUserKey.text];
[[OZLSingleton sharedInstance] setRedmineHomeURL:_redmineHomeURL.text];
@@ -129,7 +105,7 @@
NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
[center postNotificationName:NOTIFICATION_REDMINE_ACCOUNT_CHANGED object:nil];
-
+
[self showProjectList];
}
@end
diff --git a/RedmineMobile/RedmineMobile/ViewControllers/OZLAccountViewController.xib b/RedmineMobile/RedmineMobile/ViewControllers/OZLAccountViewController.xib
index 88390e5..09fad1f 100644
--- a/RedmineMobile/RedmineMobile/ViewControllers/OZLAccountViewController.xib
+++ b/RedmineMobile/RedmineMobile/ViewControllers/OZLAccountViewController.xib
@@ -48,7 +48,7 @@
{{20, 49}, {280, 30}}
-
+
_NS:9
NO
YES
@@ -116,7 +116,7 @@
{{20, 454}, {280, 30}}
-
+
_NS:9
NO
YES
@@ -160,10 +160,11 @@