From b0a0614e186f4eda32d59afb3129f99aed85e319 Mon Sep 17 00:00:00 2001 From: zhijie Date: Fri, 19 Jul 2013 13:53:16 +0800 Subject: [PATCH 1/4] issue list filter ui --- .../RedmineMobile.xcodeproj/project.pbxproj | 4 - .../OZLIssueCreateViewController.m | 6 +- .../OZLIssueFilterViewController.m | 108 ++++++++---------- .../OZLIssueFilterViewController.storyboard | 96 ---------------- .../OZLProjectViewController.h | 2 + .../OZLProjectViewController.m | 17 ++- .../OZLProjectViewController.xib | 23 +++- 7 files changed, 90 insertions(+), 166 deletions(-) delete mode 100644 RedmineMobile/RedmineMobile/ViewControllers/OZLIssueFilterViewController.storyboard diff --git a/RedmineMobile/RedmineMobile.xcodeproj/project.pbxproj b/RedmineMobile/RedmineMobile.xcodeproj/project.pbxproj index 5c991c2..f47963c 100644 --- a/RedmineMobile/RedmineMobile.xcodeproj/project.pbxproj +++ b/RedmineMobile/RedmineMobile.xcodeproj/project.pbxproj @@ -10,7 +10,6 @@ 2B62D0DF1796498800AC3C19 /* OZLIssueCreateViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2B62D0DE1796498800AC3C19 /* OZLIssueCreateViewController.storyboard */; }; 2B62D0E1179649A800AC3C19 /* OZLIssueDetailViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2B62D0E0179649A800AC3C19 /* OZLIssueDetailViewController.storyboard */; }; 2B62D0E31796A15C00AC3C19 /* OZLProjectCreateViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2B62D0E21796A15C00AC3C19 /* OZLProjectCreateViewController.storyboard */; }; - 2B62D0E51796A8C800AC3C19 /* OZLIssueFilterViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2B62D0E41796A8C800AC3C19 /* OZLIssueFilterViewController.storyboard */; }; 2B62D0E81796A8D800AC3C19 /* OZLIssueFilterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B62D0E71796A8D800AC3C19 /* OZLIssueFilterViewController.m */; }; 2B6F382F1797A00A00D06F51 /* MLTableAlertBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = 2B6F38251797A00A00D06F51 /* MLTableAlertBackground.png */; }; 2B6F38301797A00A00D06F51 /* MLTableAlertBackground@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2B6F38261797A00A00D06F51 /* MLTableAlertBackground@2x.png */; }; @@ -76,7 +75,6 @@ 2B62D0DE1796498800AC3C19 /* OZLIssueCreateViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = OZLIssueCreateViewController.storyboard; path = ViewControllers/OZLIssueCreateViewController.storyboard; sourceTree = ""; }; 2B62D0E0179649A800AC3C19 /* OZLIssueDetailViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = OZLIssueDetailViewController.storyboard; path = ViewControllers/OZLIssueDetailViewController.storyboard; sourceTree = ""; }; 2B62D0E21796A15C00AC3C19 /* OZLProjectCreateViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = OZLProjectCreateViewController.storyboard; path = ViewControllers/OZLProjectCreateViewController.storyboard; sourceTree = ""; }; - 2B62D0E41796A8C800AC3C19 /* OZLIssueFilterViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = OZLIssueFilterViewController.storyboard; path = ViewControllers/OZLIssueFilterViewController.storyboard; sourceTree = ""; }; 2B62D0E61796A8D800AC3C19 /* OZLIssueFilterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OZLIssueFilterViewController.h; path = ViewControllers/OZLIssueFilterViewController.h; sourceTree = ""; }; 2B62D0E71796A8D800AC3C19 /* OZLIssueFilterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OZLIssueFilterViewController.m; path = ViewControllers/OZLIssueFilterViewController.m; sourceTree = ""; }; 2B6F38251797A00A00D06F51 /* MLTableAlertBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = MLTableAlertBackground.png; sourceTree = ""; }; @@ -273,7 +271,6 @@ 2B8A11E017963CE500906D34 /* OZLIssueDetailViewController.h */, 2B8A11E117963CE500906D34 /* OZLIssueDetailViewController.m */, 2B62D0E0179649A800AC3C19 /* OZLIssueDetailViewController.storyboard */, - 2B62D0E41796A8C800AC3C19 /* OZLIssueFilterViewController.storyboard */, 2B62D0E61796A8D800AC3C19 /* OZLIssueFilterViewController.h */, 2B62D0E71796A8D800AC3C19 /* OZLIssueFilterViewController.m */, ); @@ -519,7 +516,6 @@ 2B62D0DF1796498800AC3C19 /* OZLIssueCreateViewController.storyboard in Resources */, 2B62D0E1179649A800AC3C19 /* OZLIssueDetailViewController.storyboard in Resources */, 2B62D0E31796A15C00AC3C19 /* OZLProjectCreateViewController.storyboard in Resources */, - 2B62D0E51796A8C800AC3C19 /* OZLIssueFilterViewController.storyboard in Resources */, 2B6F382F1797A00A00D06F51 /* MLTableAlertBackground.png in Resources */, 2B6F38301797A00A00D06F51 /* MLTableAlertBackground@2x.png in Resources */, 2B6F38311797A00A00D06F51 /* MLTableAlertButton.png in Resources */, diff --git a/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueCreateViewController.m b/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueCreateViewController.m index d7fa966..38c3473 100644 --- a/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueCreateViewController.m +++ b/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueCreateViewController.m @@ -116,6 +116,7 @@ doneCount ++; if (doneCount == 4) { [_HUD hide:YES]; + doneCount = 0; } }]; @@ -128,6 +129,7 @@ doneCount ++; if (doneCount == 4) { [_HUD hide:YES]; + doneCount = 0; } }]; [OZLNetwork getPriorityListWithParams:nil andBlock:^(NSArray *result, NSError *error) { @@ -139,6 +141,7 @@ doneCount ++; if (doneCount == 4) { [_HUD hide:YES]; + doneCount = 0; } }]; [OZLNetwork getUserListWithParams:nil andBlock:^(NSArray *result, NSError *error) { @@ -150,6 +153,7 @@ doneCount ++; if (doneCount == 4) { [_HUD hide:YES]; + doneCount = 0; } }]; } @@ -341,12 +345,12 @@ } } + [self.tableView reloadData]; } #pragma mark - #pragma mark delegate of textfield inputview - #pragma mark data picker value changed -(void)datePickerValueChanged:(id)sender { diff --git a/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueFilterViewController.m b/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueFilterViewController.m index b9bf963..7d91789 100644 --- a/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueFilterViewController.m +++ b/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueFilterViewController.m @@ -8,8 +8,12 @@ #import "OZLIssueFilterViewController.h" -@interface OZLIssueFilterViewController () +@interface OZLIssueFilterViewController () { + NSArray* _cellArray; + NSArray* _headerArray; + int _checkedCell[3]; +} @end @implementation OZLIssueFilterViewController @@ -27,11 +31,30 @@ { [super viewDidLoad]; - // Uncomment the following line to preserve selection between presentations. - // self.clearsSelectionOnViewWillAppear = NO; - - // Uncomment the following line to display an Edit button in the navigation bar for this view controller. - // self.navigationItem.rightBarButtonItem = self.editButtonItem; + UIBarButtonItem* cancelBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(onCancel:)]; + [self.navigationItem setLeftBarButtonItem:cancelBtn]; + UIBarButtonItem* saveBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave target:self action:@selector(onSave:)]; + [self.navigationItem setRightBarButtonItem:saveBtn]; + + _cellArray = @[ + @[@"Assigned to me",@"Open",@"Reported by me"], + @[@"Id", @"Tracker", @"Status", @"Priority", @"Category", @"Asssigned to", @"Fixed Version", @"Start Date", @"Due Date", @"Estimated Date", @"Done", @"Updated on"], + @[@"Ascending", @"Descending"]]; + _headerArray = @[@"Filter by", @"Sort by", @""]; + + _checkedCell[0] = 0; + _checkedCell[1] = 0; + _checkedCell[2] = 0; +} + +-(void) onCancel:(id)sender +{ + [self.navigationController popViewControllerAnimated:YES]; +} + +-(void) onSave:(id) sender +{ + } - (void)didReceiveMemoryWarning @@ -44,78 +67,43 @@ - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { -#warning Potentially incomplete method implementation. - // Return the number of sections. - return 0; + return _cellArray.count; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { -#warning Incomplete method implementation. - // Return the number of rows in the section. - return 0; + + return [[_cellArray objectAtIndex:section] count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - static NSString *CellIdentifier = @"Cell"; - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath]; - - // Configure the cell... + static NSString *CellIdentifier = @"OZLIssueFilterViewControllerCell"; + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier ]; + if (!cell) { + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; + } + if (_checkedCell[indexPath.section] == indexPath.row ) { + cell.accessoryType = UITableViewCellAccessoryCheckmark; + }else { + cell.accessoryType = UITableViewCellAccessoryNone; + } + cell.textLabel.text = [[_cellArray objectAtIndex:indexPath.section] objectAtIndex:indexPath.row]; + cell.selectionStyle = UITableViewCellSelectionStyleNone; return cell; } -/* -// Override to support conditional editing of the table view. -- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath +-(NSString*) tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { - // Return NO if you do not want the specified item to be editable. - return YES; + return [_headerArray objectAtIndex:section]; } -*/ - -/* -// Override to support editing the table view. -- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath -{ - if (editingStyle == UITableViewCellEditingStyleDelete) { - // Delete the row from the data source - [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; - } - else if (editingStyle == UITableViewCellEditingStyleInsert) { - // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view - } -} -*/ - -/* -// Override to support rearranging the table view. -- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath -{ -} -*/ - -/* -// Override to support conditional rearranging of the table view. -- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath -{ - // Return NO if you do not want the item to be re-orderable. - return YES; -} -*/ - #pragma mark - Table view delegate - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - // Navigation logic may go here. Create and push another view controller. - /* - <#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:@"<#Nib name#>" bundle:nil]; - // ... - // Pass the selected object to the new view controller. - [self.navigationController pushViewController:detailViewController animated:YES]; - */ + _checkedCell[indexPath.section] = indexPath.row; + [self.tableView reloadData]; } @end diff --git a/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueFilterViewController.storyboard b/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueFilterViewController.storyboard deleted file mode 100644 index f7fc068..0000000 --- a/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueFilterViewController.storyboard +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectViewController.h b/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectViewController.h index e4ef196..373e58f 100644 --- a/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectViewController.h +++ b/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectViewController.h @@ -33,4 +33,6 @@ @property (weak, nonatomic) IBOutlet UITableView *issuesTableview; @property (nonatomic,strong) OZLModelProject* projectData; - (IBAction)onNewIssue:(id)sender; +- (IBAction)onSortSetting:(id)sender; + @end diff --git a/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectViewController.m b/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectViewController.m index fce4a94..4dbeb42 100644 --- a/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectViewController.m +++ b/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectViewController.m @@ -34,6 +34,7 @@ #import "OZLProjectDetailViewController.h" #import "OZLIssueDetailViewController.h" #import "OZLIssueCreateViewController.h" +#import "OZLIssueFilterViewController.h" #import "OZLSingleton.h" @@ -71,11 +72,14 @@ [self.view addSubview:_HUD]; _HUD.labelText = @"Loading..."; - [self reloadData]; - [[OZLSingleton sharedInstance] setLastProjectID:_projectData.index]; } +-(void) viewWillAppear:(BOOL)animated +{ + [self reloadData]; +} + -(void) reloadData { if (_projectData == nil) { @@ -108,8 +112,8 @@ - (void) viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; - [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(preloadLeft) object:nil]; - [self performSelector:@selector(preloadLeft) withObject:nil afterDelay:0.3]; +// [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(preloadLeft) object:nil]; +// [self performSelector:@selector(preloadLeft) withObject:nil afterDelay:0.3]; } @@ -256,4 +260,9 @@ //[self.navigationController presentModalViewController:creator animated:YES]; [self.navigationController pushViewController:creator animated:YES]; } + +- (IBAction)onSortSetting:(id)sender { + OZLIssueFilterViewController* filter = [[OZLIssueFilterViewController alloc] initWithStyle:UITableViewStyleGrouped]; + [self.navigationController pushViewController:filter animated:YES]; +} @end diff --git a/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectViewController.xib b/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectViewController.xib index f54c05c..d31008a 100644 --- a/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectViewController.xib +++ b/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectViewController.xib @@ -74,6 +74,12 @@ 4 + + IBCocoaTouchFramework + 1 + + 10 + @@ -153,6 +159,14 @@ 11 + + + onSortSetting: + + + + 14 + @@ -187,6 +201,7 @@ + @@ -200,6 +215,11 @@ + + 13 + + + @@ -208,6 +228,7 @@ UIResponder com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -216,7 +237,7 @@ - 12 + 14 0 From 059a1aad12ff0f7ccb8ebfedfe8496d234f53ddb Mon Sep 17 00:00:00 2001 From: zhijie Date: Fri, 19 Jul 2013 14:02:06 +0800 Subject: [PATCH 2/4] mit licensed to new files --- .../RedmineMobile/Models/OZLConstants.h | 23 +++++++++++++++++-- .../RedmineMobile/Models/OZLConstants.m | 23 +++++++++++++++++-- .../RedmineMobile/Models/OZLModelIssue.h | 22 +++++++++++++++++- .../RedmineMobile/Models/OZLModelIssue.m | 22 +++++++++++++++++- .../Models/OZLModelIssueCategory.h | 22 +++++++++++++++++- .../Models/OZLModelIssueCategory.m | 22 +++++++++++++++++- .../Models/OZLModelIssuePriority.h | 22 +++++++++++++++++- .../Models/OZLModelIssuePriority.m | 22 +++++++++++++++++- .../Models/OZLModelIssueStatus.h | 22 +++++++++++++++++- .../Models/OZLModelIssueStatus.m | 22 +++++++++++++++++- .../RedmineMobile/Models/OZLModelTracker.h | 22 +++++++++++++++++- .../RedmineMobile/Models/OZLModelTracker.m | 22 +++++++++++++++++- .../RedmineMobile/Models/OZLModelUser.h | 22 +++++++++++++++++- .../RedmineMobile/Models/OZLModelUser.m | 22 +++++++++++++++++- .../OZLIssueCreateViewController.h | 22 +++++++++++++++++- .../OZLIssueCreateViewController.m | 22 +++++++++++++++++- .../OZLIssueDetailViewController.h | 22 +++++++++++++++++- .../OZLIssueDetailViewController.m | 22 +++++++++++++++++- .../OZLIssueFilterViewController.h | 22 +++++++++++++++++- .../OZLIssueFilterViewController.m | 22 +++++++++++++++++- .../OZLProjectCreateViewController.h | 22 +++++++++++++++++- .../OZLProjectCreateViewController.m | 22 +++++++++++++++++- .../OZLProjectDetailViewController.h | 22 +++++++++++++++++- .../OZLProjectDetailViewController.m | 22 +++++++++++++++++- 24 files changed, 504 insertions(+), 26 deletions(-) diff --git a/RedmineMobile/RedmineMobile/Models/OZLConstants.h b/RedmineMobile/RedmineMobile/Models/OZLConstants.h index 3fe8559..4417e24 100644 --- a/RedmineMobile/RedmineMobile/Models/OZLConstants.h +++ b/RedmineMobile/RedmineMobile/Models/OZLConstants.h @@ -3,9 +3,28 @@ // RedmineMobile // // Created by lizhijie on 7/16/13. -// Copyright (c) 2013 Lee Zhijie. All rights reserved. -// +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2013 Zhijie Lee(onezeros.lee@gmail.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. #import extern const NSString* NOTIFICATION_REDMINE_ACCOUNT_CHANGED; diff --git a/RedmineMobile/RedmineMobile/Models/OZLConstants.m b/RedmineMobile/RedmineMobile/Models/OZLConstants.m index cdd3873..99e80b1 100644 --- a/RedmineMobile/RedmineMobile/Models/OZLConstants.m +++ b/RedmineMobile/RedmineMobile/Models/OZLConstants.m @@ -3,9 +3,28 @@ // RedmineMobile // // Created by lizhijie on 7/16/13. -// Copyright (c) 2013 Lee Zhijie. All rights reserved. -// +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2013 Zhijie Lee(onezeros.lee@gmail.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. #import "OZLConstants.h" const NSString* NOTIFICATION_REDMINE_ACCOUNT_CHANGED = @"NOTIFICATION_REDMINE_ACCOUNT_CHANGED"; diff --git a/RedmineMobile/RedmineMobile/Models/OZLModelIssue.h b/RedmineMobile/RedmineMobile/Models/OZLModelIssue.h index e646a79..7e6fc8f 100644 --- a/RedmineMobile/RedmineMobile/Models/OZLModelIssue.h +++ b/RedmineMobile/RedmineMobile/Models/OZLModelIssue.h @@ -3,8 +3,28 @@ // RedmineMobile // // Created by lizhijie on 7/15/13. -// Copyright (c) 2013 Lee Zhijie. All rights reserved. + +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2013 Zhijie Lee(onezeros.lee@gmail.com) // +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. #import #import "OZLModelTracker.h" diff --git a/RedmineMobile/RedmineMobile/Models/OZLModelIssue.m b/RedmineMobile/RedmineMobile/Models/OZLModelIssue.m index 55064cd..a622a55 100644 --- a/RedmineMobile/RedmineMobile/Models/OZLModelIssue.m +++ b/RedmineMobile/RedmineMobile/Models/OZLModelIssue.m @@ -3,8 +3,28 @@ // RedmineMobile // // Created by lizhijie on 7/15/13. -// Copyright (c) 2013 Lee Zhijie. All rights reserved. + +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2013 Zhijie Lee(onezeros.lee@gmail.com) // +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. #import "OZLModelIssue.h" diff --git a/RedmineMobile/RedmineMobile/Models/OZLModelIssueCategory.h b/RedmineMobile/RedmineMobile/Models/OZLModelIssueCategory.h index 5da2e53..3bf9557 100644 --- a/RedmineMobile/RedmineMobile/Models/OZLModelIssueCategory.h +++ b/RedmineMobile/RedmineMobile/Models/OZLModelIssueCategory.h @@ -3,8 +3,28 @@ // RedmineMobile // // Created by lizhijie on 7/16/13. -// Copyright (c) 2013 Lee Zhijie. All rights reserved. + +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2013 Zhijie Lee(onezeros.lee@gmail.com) // +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. #import diff --git a/RedmineMobile/RedmineMobile/Models/OZLModelIssueCategory.m b/RedmineMobile/RedmineMobile/Models/OZLModelIssueCategory.m index 9d8e419..cda8288 100644 --- a/RedmineMobile/RedmineMobile/Models/OZLModelIssueCategory.m +++ b/RedmineMobile/RedmineMobile/Models/OZLModelIssueCategory.m @@ -3,8 +3,28 @@ // RedmineMobile // // Created by lizhijie on 7/16/13. -// Copyright (c) 2013 Lee Zhijie. All rights reserved. + +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2013 Zhijie Lee(onezeros.lee@gmail.com) // +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. #import "OZLModelIssueCategory.h" diff --git a/RedmineMobile/RedmineMobile/Models/OZLModelIssuePriority.h b/RedmineMobile/RedmineMobile/Models/OZLModelIssuePriority.h index 7894d6d..32a63cd 100644 --- a/RedmineMobile/RedmineMobile/Models/OZLModelIssuePriority.h +++ b/RedmineMobile/RedmineMobile/Models/OZLModelIssuePriority.h @@ -3,8 +3,28 @@ // RedmineMobile // // Created by lizhijie on 7/15/13. -// Copyright (c) 2013 Lee Zhijie. All rights reserved. + +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2013 Zhijie Lee(onezeros.lee@gmail.com) // +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. #import diff --git a/RedmineMobile/RedmineMobile/Models/OZLModelIssuePriority.m b/RedmineMobile/RedmineMobile/Models/OZLModelIssuePriority.m index 70c34ba..6896022 100644 --- a/RedmineMobile/RedmineMobile/Models/OZLModelIssuePriority.m +++ b/RedmineMobile/RedmineMobile/Models/OZLModelIssuePriority.m @@ -3,8 +3,28 @@ // RedmineMobile // // Created by lizhijie on 7/15/13. -// Copyright (c) 2013 Lee Zhijie. All rights reserved. + +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2013 Zhijie Lee(onezeros.lee@gmail.com) // +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. #import "OZLModelIssuePriority.h" diff --git a/RedmineMobile/RedmineMobile/Models/OZLModelIssueStatus.h b/RedmineMobile/RedmineMobile/Models/OZLModelIssueStatus.h index d529e03..4628f8a 100644 --- a/RedmineMobile/RedmineMobile/Models/OZLModelIssueStatus.h +++ b/RedmineMobile/RedmineMobile/Models/OZLModelIssueStatus.h @@ -3,8 +3,28 @@ // RedmineMobile // // Created by lizhijie on 7/15/13. -// Copyright (c) 2013 Lee Zhijie. All rights reserved. + +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2013 Zhijie Lee(onezeros.lee@gmail.com) // +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. #import diff --git a/RedmineMobile/RedmineMobile/Models/OZLModelIssueStatus.m b/RedmineMobile/RedmineMobile/Models/OZLModelIssueStatus.m index 3e5c54d..ad6c2b8 100644 --- a/RedmineMobile/RedmineMobile/Models/OZLModelIssueStatus.m +++ b/RedmineMobile/RedmineMobile/Models/OZLModelIssueStatus.m @@ -3,8 +3,28 @@ // RedmineMobile // // Created by lizhijie on 7/15/13. -// Copyright (c) 2013 Lee Zhijie. All rights reserved. + +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2013 Zhijie Lee(onezeros.lee@gmail.com) // +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. #import "OZLModelIssueStatus.h" diff --git a/RedmineMobile/RedmineMobile/Models/OZLModelTracker.h b/RedmineMobile/RedmineMobile/Models/OZLModelTracker.h index f0b67d6..c2b9612 100644 --- a/RedmineMobile/RedmineMobile/Models/OZLModelTracker.h +++ b/RedmineMobile/RedmineMobile/Models/OZLModelTracker.h @@ -3,8 +3,28 @@ // RedmineMobile // // Created by lizhijie on 7/15/13. -// Copyright (c) 2013 Lee Zhijie. All rights reserved. + +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2013 Zhijie Lee(onezeros.lee@gmail.com) // +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. #import diff --git a/RedmineMobile/RedmineMobile/Models/OZLModelTracker.m b/RedmineMobile/RedmineMobile/Models/OZLModelTracker.m index 0b027a0..380e24d 100644 --- a/RedmineMobile/RedmineMobile/Models/OZLModelTracker.m +++ b/RedmineMobile/RedmineMobile/Models/OZLModelTracker.m @@ -3,8 +3,28 @@ // RedmineMobile // // Created by lizhijie on 7/15/13. -// Copyright (c) 2013 Lee Zhijie. All rights reserved. + +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2013 Zhijie Lee(onezeros.lee@gmail.com) // +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. #import "OZLModelTracker.h" diff --git a/RedmineMobile/RedmineMobile/Models/OZLModelUser.h b/RedmineMobile/RedmineMobile/Models/OZLModelUser.h index 1658380..35db30e 100644 --- a/RedmineMobile/RedmineMobile/Models/OZLModelUser.h +++ b/RedmineMobile/RedmineMobile/Models/OZLModelUser.h @@ -3,8 +3,28 @@ // RedmineMobile // // Created by lizhijie on 7/15/13. -// Copyright (c) 2013 Lee Zhijie. All rights reserved. + +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2013 Zhijie Lee(onezeros.lee@gmail.com) // +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. #import diff --git a/RedmineMobile/RedmineMobile/Models/OZLModelUser.m b/RedmineMobile/RedmineMobile/Models/OZLModelUser.m index 2537f1c..c910ed6 100644 --- a/RedmineMobile/RedmineMobile/Models/OZLModelUser.m +++ b/RedmineMobile/RedmineMobile/Models/OZLModelUser.m @@ -3,8 +3,28 @@ // RedmineMobile // // Created by lizhijie on 7/15/13. -// Copyright (c) 2013 Lee Zhijie. All rights reserved. + +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2013 Zhijie Lee(onezeros.lee@gmail.com) // +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. #import "OZLModelUser.h" diff --git a/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueCreateViewController.h b/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueCreateViewController.h index 29125cc..fe8c9dc 100644 --- a/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueCreateViewController.h +++ b/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueCreateViewController.h @@ -3,8 +3,28 @@ // RedmineMobile // // Created by lizhijie on 7/16/13. -// Copyright (c) 2013 Lee Zhijie. All rights reserved. + +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2013 Zhijie Lee(onezeros.lee@gmail.com) // +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. #import #import "OZLModelIssue.h" diff --git a/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueCreateViewController.m b/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueCreateViewController.m index 38c3473..9a07d46 100644 --- a/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueCreateViewController.m +++ b/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueCreateViewController.m @@ -3,8 +3,28 @@ // RedmineMobile // // Created by lizhijie on 7/16/13. -// Copyright (c) 2013 Lee Zhijie. All rights reserved. + +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2013 Zhijie Lee(onezeros.lee@gmail.com) // +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. #import "OZLIssueCreateViewController.h" #import "OZLNetwork.h" diff --git a/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueDetailViewController.h b/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueDetailViewController.h index 02072f1..a19d017 100644 --- a/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueDetailViewController.h +++ b/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueDetailViewController.h @@ -3,8 +3,28 @@ // RedmineMobile // // Created by lizhijie on 7/17/13. -// Copyright (c) 2013 Lee Zhijie. All rights reserved. + +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2013 Zhijie Lee(onezeros.lee@gmail.com) // +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. #import #import "OZLModelIssue.h" diff --git a/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueDetailViewController.m b/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueDetailViewController.m index 242ba90..6bc8892 100644 --- a/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueDetailViewController.m +++ b/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueDetailViewController.m @@ -3,8 +3,28 @@ // RedmineMobile // // Created by lizhijie on 7/17/13. -// Copyright (c) 2013 Lee Zhijie. All rights reserved. + +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2013 Zhijie Lee(onezeros.lee@gmail.com) // +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. #import "OZLIssueDetailViewController.h" diff --git a/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueFilterViewController.h b/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueFilterViewController.h index 5b1a0d9..ba85fd0 100644 --- a/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueFilterViewController.h +++ b/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueFilterViewController.h @@ -3,8 +3,28 @@ // RedmineMobile // // Created by lizhijie on 7/17/13. -// Copyright (c) 2013 Lee Zhijie. All rights reserved. + +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2013 Zhijie Lee(onezeros.lee@gmail.com) // +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. #import diff --git a/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueFilterViewController.m b/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueFilterViewController.m index 7d91789..5565201 100644 --- a/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueFilterViewController.m +++ b/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueFilterViewController.m @@ -3,8 +3,28 @@ // RedmineMobile // // Created by lizhijie on 7/17/13. -// Copyright (c) 2013 Lee Zhijie. All rights reserved. + +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2013 Zhijie Lee(onezeros.lee@gmail.com) // +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. #import "OZLIssueFilterViewController.h" diff --git a/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectCreateViewController.h b/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectCreateViewController.h index 13da6cc..39e8b14 100644 --- a/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectCreateViewController.h +++ b/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectCreateViewController.h @@ -3,8 +3,28 @@ // RedmineMobile // // Created by lizhijie on 7/16/13. -// Copyright (c) 2013 Lee Zhijie. All rights reserved. + +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2013 Zhijie Lee(onezeros.lee@gmail.com) // +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. #import #import "OZLModelProject.h" diff --git a/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectCreateViewController.m b/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectCreateViewController.m index 9e389a4..cda5122 100644 --- a/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectCreateViewController.m +++ b/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectCreateViewController.m @@ -3,8 +3,28 @@ // RedmineMobile // // Created by lizhijie on 7/16/13. -// Copyright (c) 2013 Lee Zhijie. All rights reserved. + +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2013 Zhijie Lee(onezeros.lee@gmail.com) // +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. #import "OZLProjectCreateViewController.h" #import "MBProgressHUD.h" diff --git a/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectDetailViewController.h b/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectDetailViewController.h index 26f7951..83bbf2c 100644 --- a/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectDetailViewController.h +++ b/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectDetailViewController.h @@ -3,8 +3,28 @@ // RedmineMobile // // Created by lizhijie on 7/15/13. -// Copyright (c) 2013 Lee Zhijie. All rights reserved. + +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2013 Zhijie Lee(onezeros.lee@gmail.com) // +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. #import #import "OZLModelProject.h" diff --git a/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectDetailViewController.m b/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectDetailViewController.m index 8ace745..cbfdd7a 100644 --- a/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectDetailViewController.m +++ b/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectDetailViewController.m @@ -3,8 +3,28 @@ // RedmineMobile // // Created by lizhijie on 7/15/13. -// Copyright (c) 2013 Lee Zhijie. All rights reserved. + +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2013 Zhijie Lee(onezeros.lee@gmail.com) // +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. #import "OZLProjectDetailViewController.h" From 3b7bc1644eb1516e7dbc39d71960832e0fdfb9a0 Mon Sep 17 00:00:00 2001 From: zhijie Date: Fri, 19 Jul 2013 15:53:29 +0800 Subject: [PATCH 3/4] issue list sort function done, but filter is not finished yet filter is not finished because some parameters of Remine REST are not clear --- .../RedmineMobile/Utils/OZLSingleton.h | 5 + .../RedmineMobile/Utils/OZLSingleton.m | 44 ++++++++ .../OZLIssueCreateViewController.h | 6 ++ .../OZLIssueCreateViewController.m | 60 ----------- .../OZLIssueFilterViewController.m | 18 +++- .../OZLProjectViewController.h | 6 ++ .../OZLProjectViewController.m | 101 +++++++++++++++++- 7 files changed, 173 insertions(+), 67 deletions(-) diff --git a/RedmineMobile/RedmineMobile/Utils/OZLSingleton.h b/RedmineMobile/RedmineMobile/Utils/OZLSingleton.h index 9bd229d..b895d91 100644 --- a/RedmineMobile/RedmineMobile/Utils/OZLSingleton.h +++ b/RedmineMobile/RedmineMobile/Utils/OZLSingleton.h @@ -38,6 +38,11 @@ @property(nonatomic,strong) NSString* redmineUserName; @property(nonatomic,strong) NSString* redminePassword; +// issue list option +@property(nonatomic) int issueListFilterType; +@property(nonatomic) int issueListSortType; +@property(nonatomic) int issueListSortAscending; + //app status @property(nonatomic) int lastProjectID;// last viewed project id diff --git a/RedmineMobile/RedmineMobile/Utils/OZLSingleton.m b/RedmineMobile/RedmineMobile/Utils/OZLSingleton.m index 24562f2..8de6b4a 100644 --- a/RedmineMobile/RedmineMobile/Utils/OZLSingleton.m +++ b/RedmineMobile/RedmineMobile/Utils/OZLSingleton.m @@ -37,6 +37,11 @@ NSString* USER_DEFUALTS_LAST_PROJECT_ID = @"USER_DEFUALTS_LAST_PROJECT_ID"; NSString* USER_DEFUALTS_REDMINE_USER_NAME = @"USER_DEFUALTS_REDMINE_USER_NAME"; NSString* USER_DEFUALTS_REDMINE_PASSWORD = @"USER_DEFUALTS_REDMINE_PASSWORD"; +//issue list option +NSString* USER_DEFAULTS_ISSUE_LIST_ASCEND = @"USER_DEFUALTS_ISSUE_LIST_ASCEND";// ascend or descend +NSString* USER_DEFAULTS_ISSUE_LIST_FILTER = @"USER_DEFAULTS_ISSUE_LIST_FILTER"; +NSString* USER_DEFAULTS_ISSUE_LIST_SORT = @"USER_DEFAULTS_ISSUE_LIST_SORT"; + static OZLSingleton* sharedInstance = nil; +(OZLSingleton*) sharedInstance { @@ -50,6 +55,9 @@ static OZLSingleton* sharedInstance = nil; [NSNumber numberWithInt:-1],USER_DEFUALTS_LAST_PROJECT_ID, @"",USER_DEFUALTS_REDMINE_USER_NAME, @"",USER_DEFUALTS_REDMINE_PASSWORD, + [NSNumber numberWithInt:0],USER_DEFAULTS_ISSUE_LIST_FILTER, + [NSNumber numberWithInt:0],USER_DEFAULTS_ISSUE_LIST_SORT, + [NSNumber numberWithInt:0],USER_DEFAULTS_ISSUE_LIST_ASCEND, nil]; [defaults registerDefaults:dic]; } @@ -116,4 +124,40 @@ static OZLSingleton* sharedInstance = nil; [userdefaults setObject:redminePassword forKey:USER_DEFUALTS_REDMINE_PASSWORD]; [userdefaults synchronize]; } + +-(int)issueListFilterType +{ + NSUserDefaults* userdefaults = [NSUserDefaults standardUserDefaults]; + return [[userdefaults objectForKey:USER_DEFAULTS_ISSUE_LIST_FILTER] intValue]; +} +-(void)setIssueListFilterType:(int)issueListFilterType +{ + NSUserDefaults* userdefaults = [NSUserDefaults standardUserDefaults]; + [userdefaults setObject:[NSNumber numberWithInt:issueListFilterType] forKey:USER_DEFAULTS_ISSUE_LIST_FILTER]; + [userdefaults synchronize]; +} + +-(int)issueListSortAscending +{ + NSUserDefaults* userdefaults = [NSUserDefaults standardUserDefaults]; + return [[userdefaults objectForKey:USER_DEFAULTS_ISSUE_LIST_ASCEND] intValue]; +} +-(void)setIssueListSortAscending:(int)issueListSortAscending +{ + NSUserDefaults* userdefaults = [NSUserDefaults standardUserDefaults]; + [userdefaults setObject:[NSNumber numberWithInt:issueListSortAscending] forKey:USER_DEFAULTS_ISSUE_LIST_ASCEND]; + [userdefaults synchronize]; +} + +-(int)issueListSortType +{ + NSUserDefaults* userdefaults = [NSUserDefaults standardUserDefaults]; + return [[userdefaults objectForKey:USER_DEFAULTS_ISSUE_LIST_SORT] intValue]; +} +-(void)setIssueListSortType:(int)issueListSortType +{ + NSUserDefaults* userdefaults = [NSUserDefaults standardUserDefaults]; + [userdefaults setObject:[NSNumber numberWithInt:issueListSortType] forKey:USER_DEFAULTS_ISSUE_LIST_SORT]; + [userdefaults synchronize]; +} @end diff --git a/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueCreateViewController.h b/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueCreateViewController.h index fe8c9dc..fb24b2f 100644 --- a/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueCreateViewController.h +++ b/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueCreateViewController.h @@ -34,6 +34,12 @@ - (IBAction)onCancel:(id)sender; - (IBAction)onSave:(id)sender; +@property (weak, nonatomic) NSArray* trackerList; +@property (weak, nonatomic) NSArray* priorityList; +@property (weak, nonatomic) NSArray* statusList; +@property (weak, nonatomic) NSArray* userList; + + // neccessory @property (weak, nonatomic) IBOutlet UITextField *subjectTextField; @property (weak, nonatomic) IBOutlet UILabel *trackerLabel; diff --git a/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueCreateViewController.m b/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueCreateViewController.m index 9a07d46..2f75d9d 100644 --- a/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueCreateViewController.m +++ b/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueCreateViewController.m @@ -36,10 +36,6 @@ #import "MLTableAlert.h" @interface OZLIssueCreateViewController () { - NSArray* _trackerList; - NSArray* _priorityList; - NSArray* _statusList; - NSArray* _userList; OZLModelTracker* _currentTracker; OZLModelIssuePriority* _currentPriority; @@ -82,7 +78,6 @@ [self.view addSubview:_HUD]; _HUD.labelText = @"Loading..."; - [self loadIssueRelatedData]; } -(void) setupInputviews @@ -123,61 +118,6 @@ _doneProgressLabel.delegate = self; } --(void)loadIssueRelatedData -{ - static int doneCount = 0; - [_HUD show:YES]; - [OZLNetwork getTrackerListWithParams:nil andBlock:^(NSArray *result, NSError *error) { - if (!error) { - _trackerList = result; - }else { - NSLog(@"get tracker list error : %@",error.description); - } - doneCount ++; - if (doneCount == 4) { - [_HUD hide:YES]; - doneCount = 0; - } - }]; - - [OZLNetwork getIssueStatusListWithParams:nil andBlock:^(NSArray *result, NSError *error) { - if (!error) { - _statusList = result; - }else { - NSLog(@"get issue status list error : %@",error.description); - } - doneCount ++; - if (doneCount == 4) { - [_HUD hide:YES]; - doneCount = 0; - } - }]; - [OZLNetwork getPriorityListWithParams:nil andBlock:^(NSArray *result, NSError *error) { - if (!error) { - _priorityList = result; - }else { - NSLog(@"get priority list error : %@",error.description); - } - doneCount ++; - if (doneCount == 4) { - [_HUD hide:YES]; - doneCount = 0; - } - }]; - [OZLNetwork getUserListWithParams:nil andBlock:^(NSArray *result, NSError *error) { - if (!error) { - _userList = result; - }else { - NSLog(@"get user list error : %@",error.description); - } - doneCount ++; - if (doneCount == 4) { - [_HUD hide:YES]; - doneCount = 0; - } - }]; -} - - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; diff --git a/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueFilterViewController.m b/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueFilterViewController.m index 5565201..4a6124c 100644 --- a/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueFilterViewController.m +++ b/RedmineMobile/RedmineMobile/ViewControllers/OZLIssueFilterViewController.m @@ -27,6 +27,7 @@ // THE SOFTWARE. #import "OZLIssueFilterViewController.h" +#import "OZLSingleton.h" @interface OZLIssueFilterViewController () { NSArray* _cellArray; @@ -62,9 +63,10 @@ @[@"Ascending", @"Descending"]]; _headerArray = @[@"Filter by", @"Sort by", @""]; - _checkedCell[0] = 0; - _checkedCell[1] = 0; - _checkedCell[2] = 0; + OZLSingleton* singleton =[OZLSingleton sharedInstance]; + _checkedCell[0] = [singleton issueListFilterType]; + _checkedCell[1] = [singleton issueListSortType]; + _checkedCell[2] = [singleton issueListSortAscending]; } -(void) onCancel:(id)sender @@ -74,7 +76,14 @@ -(void) onSave:(id) sender { - + + OZLSingleton* singleton =[OZLSingleton sharedInstance]; + + [singleton setIssueListFilterType:_checkedCell[0]]; + [singleton setIssueListSortType:_checkedCell[1]]; + [singleton setIssueListSortAscending:_checkedCell[2]]; + + [self.navigationController popViewControllerAnimated:YES]; } - (void)didReceiveMemoryWarning @@ -123,6 +132,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { _checkedCell[indexPath.section] = indexPath.row; + [self.tableView reloadData]; } diff --git a/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectViewController.h b/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectViewController.h index 373e58f..2fad8c6 100644 --- a/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectViewController.h +++ b/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectViewController.h @@ -35,4 +35,10 @@ - (IBAction)onNewIssue:(id)sender; - (IBAction)onSortSetting:(id)sender; + +@property (weak, nonatomic) NSArray* trackerList; +@property (weak, nonatomic) NSArray* priorityList; +@property (weak, nonatomic) NSArray* statusList; +@property (weak, nonatomic) NSArray* userList; + @end diff --git a/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectViewController.m b/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectViewController.m index 4dbeb42..3f576a1 100644 --- a/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectViewController.m +++ b/RedmineMobile/RedmineMobile/ViewControllers/OZLProjectViewController.m @@ -43,6 +43,8 @@ float _sideviewOffset; MBProgressHUD * _HUD; + + NSMutableDictionary* _issueListOption; } @end @@ -71,7 +73,7 @@ _HUD = [[MBProgressHUD alloc] initWithView:self.view]; [self.view addSubview:_HUD]; _HUD.labelText = @"Loading..."; - + [[OZLSingleton sharedInstance] setLastProjectID:_projectData.index]; } @@ -87,6 +89,38 @@ return; } [_HUD show:YES]; + + if (_issueListOption == nil) { + [self loadIssueRelatedData]; + }else { + [self loadProjectDetail]; + } +} + +-(void)loadProjectDetail +{ + // TODO: issue filter not working yet + + // prepare parameters + OZLSingleton* singleton = [OZLSingleton sharedInstance]; + // meaning of these values is defined in OZLIssueFilterViewController + int filterType = [singleton issueListFilterType]; + int sortType = [singleton issueListSortType]; + int scendingType = [singleton issueListSortAscending]; + if (filterType == 0) {// assigned to me + // TODO: + }else if(filterType == 1) {// open + + [_issueListOption setObject:@"open" forKey:@"status_id"]; + + }else if(filterType == 2) {// reported by me + // TODO: + } + + NSArray* sortCol = @[@"id",@"tracker",@"status",@"priority",@"category",@"assigned_to_id",@"fixed_version",@"start_date",@"due_date",@"estimated_hours",@"done_ratio",@"updated_on"]; + NSString* sortstring = [NSString stringWithFormat:@"%@%@",[sortCol objectAtIndex:sortType],(scendingType == 0 ? @"" : @":desc")]; + [_issueListOption setObject:sortstring forKey:@"sort"]; + [OZLNetwork getDetailForProject:_projectData.index withParams:nil andBlock:^(OZLModelProject *result, NSError *error) { if (error) { NSLog(@"error getDetailForProject: %@",error.description); @@ -94,9 +128,9 @@ }else { _projectData = result; [self.navigationItem setTitle:_projectData.name]; - + // load issues - [OZLNetwork getIssueListForProject:_projectData.index withParams:nil andBlock:^(NSArray *result, NSError *error) { + [OZLNetwork getIssueListForProject:_projectData.index withParams:_issueListOption andBlock:^(NSArray *result, NSError *error) { if (error) { NSLog(@"error getIssueListForProject: %@",error.description); }else { @@ -110,6 +144,63 @@ }]; } +-(void)loadIssueRelatedData +{ + _issueListOption = [[NSMutableDictionary alloc] init]; + + static int doneCount = 0; + [OZLNetwork getTrackerListWithParams:nil andBlock:^(NSArray *result, NSError *error) { + if (!error) { + _trackerList = result; + }else { + NSLog(@"get tracker list error : %@",error.description); + } + doneCount ++; + if (doneCount == 4) { + [self loadProjectDetail]; + doneCount = 0; + } + }]; + + [OZLNetwork getIssueStatusListWithParams:nil andBlock:^(NSArray *result, NSError *error) { + if (!error) { + _statusList = result; + }else { + NSLog(@"get issue status list error : %@",error.description); + } + doneCount ++; + if (doneCount == 4) { + [self loadProjectDetail]; + doneCount = 0; + } + }]; + [OZLNetwork getPriorityListWithParams:nil andBlock:^(NSArray *result, NSError *error) { + if (!error) { + _priorityList = result; + }else { + NSLog(@"get priority list error : %@",error.description); + } + doneCount ++; + if (doneCount == 4) { + [self loadProjectDetail]; + doneCount = 0; + } + }]; + [OZLNetwork getUserListWithParams:nil andBlock:^(NSArray *result, NSError *error) { + if (!error) { + _userList = result; + }else { + NSLog(@"get user list error : %@",error.description); + } + doneCount ++; + if (doneCount == 4) { + [self loadProjectDetail]; + doneCount = 0; + } + }]; +} + + - (void) viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; // [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(preloadLeft) object:nil]; @@ -257,6 +348,10 @@ UIStoryboard *tableViewStoryboard = [UIStoryboard storyboardWithName:@"OZLIssueCreateViewController" bundle:nil]; OZLIssueCreateViewController* creator = [tableViewStoryboard instantiateViewControllerWithIdentifier:@"OZLIssueCreateViewController"]; [creator setParentProject:_projectData]; + creator.userList = _userList; + creator.trackerList = _trackerList; + creator.priorityList = _priorityList; + creator.statusList = _statusList; //[self.navigationController presentModalViewController:creator animated:YES]; [self.navigationController pushViewController:creator animated:YES]; } From a33247b6dc6856bb658d94cd215f771ae8faf62a Mon Sep 17 00:00:00 2001 From: zhijie Date: Fri, 19 Jul 2013 16:24:02 +0800 Subject: [PATCH 4/4] add empty unit test target --- .../RedmineMobile.xcodeproj/project.pbxproj | 169 +++++++++++++++++- .../RedmineMobileUnitTest-Info.plist | 22 +++ .../RedmineMobileUnitTest-Prefix.pch | 8 + .../RedmineMobileUnitTest.h | 13 ++ .../RedmineMobileUnitTest.m | 32 ++++ .../en.lproj/InfoPlist.strings | 2 + 6 files changed, 244 insertions(+), 2 deletions(-) create mode 100644 RedmineMobile/RedmineMobileUnitTest/RedmineMobileUnitTest-Info.plist create mode 100644 RedmineMobile/RedmineMobileUnitTest/RedmineMobileUnitTest-Prefix.pch create mode 100644 RedmineMobile/RedmineMobileUnitTest/RedmineMobileUnitTest.h create mode 100644 RedmineMobile/RedmineMobileUnitTest/RedmineMobileUnitTest.m create mode 100644 RedmineMobile/RedmineMobileUnitTest/en.lproj/InfoPlist.strings diff --git a/RedmineMobile/RedmineMobile.xcodeproj/project.pbxproj b/RedmineMobile/RedmineMobile.xcodeproj/project.pbxproj index f47963c..687b58b 100644 --- a/RedmineMobile/RedmineMobile.xcodeproj/project.pbxproj +++ b/RedmineMobile/RedmineMobile.xcodeproj/project.pbxproj @@ -25,6 +25,11 @@ 2B9968AB1794F71B0086F115 /* OZLModelIssueCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B9968AA1794F71B0086F115 /* OZLModelIssueCategory.m */; }; 2B9968AF1794FC0A0086F115 /* OZLProjectCreateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B9968AD1794FC0A0086F115 /* OZLProjectCreateViewController.m */; }; 2B9968B417951A5C0086F115 /* OZLIssueCreateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B9968B217951A5C0086F115 /* OZLIssueCreateViewController.m */; }; + 2BC4DD8C179928C80090F52C /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BC4DD8B179928C80090F52C /* SenTestingKit.framework */; }; + 2BC4DD8D179928C80090F52C /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D5DB80591792F2BF0081662A /* UIKit.framework */; }; + 2BC4DD8E179928C80090F52C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D5DB805B1792F2BF0081662A /* Foundation.framework */; }; + 2BC4DD94179928C80090F52C /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 2BC4DD92179928C80090F52C /* InfoPlist.strings */; }; + 2BC4DD97179928C80090F52C /* RedmineMobileUnitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BC4DD96179928C80090F52C /* RedmineMobileUnitTest.m */; }; 2BCCA0541795312E00FA8B1A /* OZLConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BCCA0531795312E00FA8B1A /* OZLConstants.m */; }; 2BCF880C1793A26A006FC859 /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BCF880B1793A26A006FC859 /* MBProgressHUD.m */; }; 2BCF88101793ABA0006FC859 /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BCF880F1793ABA0006FC859 /* Reachability.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; @@ -71,6 +76,16 @@ D5DB80C217931C8B0081662A /* OZLModelProject.m in Sources */ = {isa = PBXBuildFile; fileRef = D5DB80C117931C8B0081662A /* OZLModelProject.m */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 2BC4DD9C17992A4D0090F52C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D5DB804E1792F2BF0081662A /* Project object */; + proxyType = 1; + remoteGlobalIDString = D5DB80551792F2BF0081662A; + remoteInfo = RedmineMobile; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXFileReference section */ 2B62D0DE1796498800AC3C19 /* OZLIssueCreateViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = OZLIssueCreateViewController.storyboard; path = ViewControllers/OZLIssueCreateViewController.storyboard; sourceTree = ""; }; 2B62D0E0179649A800AC3C19 /* OZLIssueDetailViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = OZLIssueDetailViewController.storyboard; path = ViewControllers/OZLIssueDetailViewController.storyboard; sourceTree = ""; }; @@ -96,6 +111,13 @@ 2B9968AD1794FC0A0086F115 /* OZLProjectCreateViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OZLProjectCreateViewController.m; path = ViewControllers/OZLProjectCreateViewController.m; sourceTree = ""; }; 2B9968B117951A5C0086F115 /* OZLIssueCreateViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OZLIssueCreateViewController.h; path = ViewControllers/OZLIssueCreateViewController.h; sourceTree = ""; }; 2B9968B217951A5C0086F115 /* OZLIssueCreateViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OZLIssueCreateViewController.m; path = ViewControllers/OZLIssueCreateViewController.m; sourceTree = ""; }; + 2BC4DD8A179928C80090F52C /* RedmineMobileUnitTest.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RedmineMobileUnitTest.octest; sourceTree = BUILT_PRODUCTS_DIR; }; + 2BC4DD8B179928C80090F52C /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; }; + 2BC4DD91179928C80090F52C /* RedmineMobileUnitTest-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "RedmineMobileUnitTest-Info.plist"; sourceTree = ""; }; + 2BC4DD93179928C80090F52C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 2BC4DD95179928C80090F52C /* RedmineMobileUnitTest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RedmineMobileUnitTest.h; sourceTree = ""; }; + 2BC4DD96179928C80090F52C /* RedmineMobileUnitTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RedmineMobileUnitTest.m; sourceTree = ""; }; + 2BC4DD98179928C80090F52C /* RedmineMobileUnitTest-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RedmineMobileUnitTest-Prefix.pch"; sourceTree = ""; }; 2BCCA0521795312E00FA8B1A /* OZLConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OZLConstants.h; path = Models/OZLConstants.h; sourceTree = ""; }; 2BCCA0531795312E00FA8B1A /* OZLConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OZLConstants.m; path = Models/OZLConstants.m; sourceTree = ""; }; 2BCF880A1793A26A006FC859 /* MBProgressHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MBProgressHUD.h; sourceTree = ""; }; @@ -177,6 +199,16 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 2BC4DD86179928C80090F52C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 2BC4DD8C179928C80090F52C /* SenTestingKit.framework in Frameworks */, + 2BC4DD8D179928C80090F52C /* UIKit.framework in Frameworks */, + 2BC4DD8E179928C80090F52C /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; D5DB80531792F2BF0081662A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -218,6 +250,26 @@ path = Images; sourceTree = ""; }; + 2BC4DD8F179928C80090F52C /* RedmineMobileUnitTest */ = { + isa = PBXGroup; + children = ( + 2BC4DD95179928C80090F52C /* RedmineMobileUnitTest.h */, + 2BC4DD96179928C80090F52C /* RedmineMobileUnitTest.m */, + 2BC4DD90179928C80090F52C /* Supporting Files */, + ); + path = RedmineMobileUnitTest; + sourceTree = ""; + }; + 2BC4DD90179928C80090F52C /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 2BC4DD91179928C80090F52C /* RedmineMobileUnitTest-Info.plist */, + 2BC4DD92179928C80090F52C /* InfoPlist.strings */, + 2BC4DD98179928C80090F52C /* RedmineMobileUnitTest-Prefix.pch */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; 2BCB50FD1796370F006845AC /* Views */ = { isa = PBXGroup; children = ( @@ -282,6 +334,7 @@ children = ( D5DB80761792F3EE0081662A /* Libs */, D5DB805F1792F2BF0081662A /* RedmineMobile */, + 2BC4DD8F179928C80090F52C /* RedmineMobileUnitTest */, D5DB80581792F2BF0081662A /* Frameworks */, D5DB80571792F2BF0081662A /* Products */, ); @@ -291,6 +344,7 @@ isa = PBXGroup; children = ( D5DB80561792F2BF0081662A /* RedmineMobile.app */, + 2BC4DD8A179928C80090F52C /* RedmineMobileUnitTest.octest */, ); name = Products; sourceTree = ""; @@ -304,6 +358,7 @@ D5DB80591792F2BF0081662A /* UIKit.framework */, D5DB805B1792F2BF0081662A /* Foundation.framework */, D5DB805D1792F2BF0081662A /* CoreGraphics.framework */, + 2BC4DD8B179928C80090F52C /* SenTestingKit.framework */, ); name = Frameworks; sourceTree = ""; @@ -456,6 +511,25 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ + 2BC4DD89179928C80090F52C /* RedmineMobileUnitTest */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2BC4DD99179928C80090F52C /* Build configuration list for PBXNativeTarget "RedmineMobileUnitTest" */; + buildPhases = ( + 2BC4DD85179928C80090F52C /* Sources */, + 2BC4DD86179928C80090F52C /* Frameworks */, + 2BC4DD87179928C80090F52C /* Resources */, + 2BC4DD88179928C80090F52C /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + 2BC4DD9D17992A4D0090F52C /* PBXTargetDependency */, + ); + name = RedmineMobileUnitTest; + productName = RedmineMobileUnitTest; + productReference = 2BC4DD8A179928C80090F52C /* RedmineMobileUnitTest.octest */; + productType = "com.apple.product-type.bundle"; + }; D5DB80551792F2BF0081662A /* RedmineMobile */ = { isa = PBXNativeTarget; buildConfigurationList = D5DB80731792F2BF0081662A /* Build configuration list for PBXNativeTarget "RedmineMobile" */; @@ -496,11 +570,20 @@ projectRoot = ""; targets = ( D5DB80551792F2BF0081662A /* RedmineMobile */, + 2BC4DD89179928C80090F52C /* RedmineMobileUnitTest */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 2BC4DD87179928C80090F52C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2BC4DD94179928C80090F52C /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; D5DB80541792F2BF0081662A /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -529,7 +612,31 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 2BC4DD88179928C80090F52C /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ + 2BC4DD85179928C80090F52C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2BC4DD97179928C80090F52C /* RedmineMobileUnitTest.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; D5DB80521792F2BF0081662A /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -576,7 +683,23 @@ }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 2BC4DD9D17992A4D0090F52C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D5DB80551792F2BF0081662A /* RedmineMobile */; + targetProxy = 2BC4DD9C17992A4D0090F52C /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ + 2BC4DD92179928C80090F52C /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 2BC4DD93179928C80090F52C /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; D5DB80621792F2BF0081662A /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( @@ -588,6 +711,40 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ + 2BC4DD9A179928C80090F52C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/RedmineMobile.app/RedmineMobile"; + FRAMEWORK_SEARCH_PATHS = ( + "\"$(SDKROOT)/Developer/Library/Frameworks\"", + "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "RedmineMobileUnitTest/RedmineMobileUnitTest-Prefix.pch"; + INFOPLIST_FILE = "RedmineMobileUnitTest/RedmineMobileUnitTest-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUNDLE_LOADER)"; + WRAPPER_EXTENSION = octest; + }; + name = Debug; + }; + 2BC4DD9B179928C80090F52C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/RedmineMobile.app/RedmineMobile"; + FRAMEWORK_SEARCH_PATHS = ( + "\"$(SDKROOT)/Developer/Library/Frameworks\"", + "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "RedmineMobileUnitTest/RedmineMobileUnitTest-Prefix.pch"; + INFOPLIST_FILE = "RedmineMobileUnitTest/RedmineMobileUnitTest-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUNDLE_LOADER)"; + WRAPPER_EXTENSION = octest; + }; + name = Release; + }; D5DB80711792F2BF0081662A /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -613,7 +770,7 @@ GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 6.1; + IPHONEOS_DEPLOYMENT_TARGET = 5.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -638,7 +795,7 @@ GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 6.1; + IPHONEOS_DEPLOYMENT_TARGET = 5.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -673,6 +830,14 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 2BC4DD99179928C80090F52C /* Build configuration list for PBXNativeTarget "RedmineMobileUnitTest" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2BC4DD9A179928C80090F52C /* Debug */, + 2BC4DD9B179928C80090F52C /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; D5DB80511792F2BF0081662A /* Build configuration list for PBXProject "RedmineMobile" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/RedmineMobile/RedmineMobileUnitTest/RedmineMobileUnitTest-Info.plist b/RedmineMobile/RedmineMobileUnitTest/RedmineMobileUnitTest-Info.plist new file mode 100644 index 0000000..a427435 --- /dev/null +++ b/RedmineMobile/RedmineMobileUnitTest/RedmineMobileUnitTest-Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.zhijie.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/RedmineMobile/RedmineMobileUnitTest/RedmineMobileUnitTest-Prefix.pch b/RedmineMobile/RedmineMobileUnitTest/RedmineMobileUnitTest-Prefix.pch new file mode 100644 index 0000000..adca7d0 --- /dev/null +++ b/RedmineMobile/RedmineMobileUnitTest/RedmineMobileUnitTest-Prefix.pch @@ -0,0 +1,8 @@ +// +// Prefix header for all source files of the 'RedmineMobileUnitTest' target in the 'RedmineMobileUnitTest' project +// + +#ifdef __OBJC__ + #import + #import +#endif diff --git a/RedmineMobile/RedmineMobileUnitTest/RedmineMobileUnitTest.h b/RedmineMobile/RedmineMobileUnitTest/RedmineMobileUnitTest.h new file mode 100644 index 0000000..9881eee --- /dev/null +++ b/RedmineMobile/RedmineMobileUnitTest/RedmineMobileUnitTest.h @@ -0,0 +1,13 @@ +// +// RedmineMobileUnitTest.h +// RedmineMobileUnitTest +// +// Created by lizhijie on 7/19/13. +// Copyright (c) 2013 Lee Zhijie. All rights reserved. +// + +#import + +@interface RedmineMobileUnitTest : SenTestCase + +@end diff --git a/RedmineMobile/RedmineMobileUnitTest/RedmineMobileUnitTest.m b/RedmineMobile/RedmineMobileUnitTest/RedmineMobileUnitTest.m new file mode 100644 index 0000000..e4a3039 --- /dev/null +++ b/RedmineMobile/RedmineMobileUnitTest/RedmineMobileUnitTest.m @@ -0,0 +1,32 @@ +// +// RedmineMobileUnitTest.m +// RedmineMobileUnitTest +// +// Created by lizhijie on 7/19/13. +// Copyright (c) 2013 Lee Zhijie. All rights reserved. +// + +#import "RedmineMobileUnitTest.h" + +@implementation RedmineMobileUnitTest + +- (void)setUp +{ + [super setUp]; + + // Set-up code here. +} + +- (void)tearDown +{ + // Tear-down code here. + + [super tearDown]; +} + +- (void)testExample +{ + STFail(@"Unit tests are not implemented yet in RedmineMobileUnitTest"); +} + +@end diff --git a/RedmineMobile/RedmineMobileUnitTest/en.lproj/InfoPlist.strings b/RedmineMobile/RedmineMobileUnitTest/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/RedmineMobile/RedmineMobileUnitTest/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ +