ui stucture adjusted && api for creation of projects and issues
This commit is contained in:
parent
4d6053b969
commit
4a155eb9bd
|
@ -7,6 +7,11 @@
|
|||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
2B9968AB1794F71B0086F115 /* OZLModelIssueCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B9968AA1794F71B0086F115 /* OZLModelIssueCategory.m */; };
|
||||
2B9968AF1794FC0A0086F115 /* OZLProjectCreateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B9968AD1794FC0A0086F115 /* OZLProjectCreateViewController.m */; };
|
||||
2B9968B01794FC0A0086F115 /* OZLProjectCreateViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2B9968AE1794FC0A0086F115 /* OZLProjectCreateViewController.xib */; };
|
||||
2B9968B417951A5C0086F115 /* OZLIssueCreateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B9968B217951A5C0086F115 /* OZLIssueCreateViewController.m */; };
|
||||
2B9968B517951A5C0086F115 /* OZLIssueCreateViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2B9968B317951A5C0086F115 /* OZLIssueCreateViewController.xib */; };
|
||||
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"; }; };
|
||||
2BCF88121793CB4F006FC859 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BCF88111793CB4F006FC859 /* CFNetwork.framework */; };
|
||||
|
@ -15,7 +20,7 @@
|
|||
2BCF88191793E353006FC859 /* OZLProjectDetailViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2BCF88171793E353006FC859 /* OZLProjectDetailViewController.xib */; };
|
||||
2BCF881E1793F3C8006FC859 /* OZLModelIssue.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BCF881D1793F3C8006FC859 /* OZLModelIssue.m */; };
|
||||
2BCF88211793F478006FC859 /* OZLModelTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BCF88201793F478006FC859 /* OZLModelTracker.m */; };
|
||||
2BCF88271793F4AA006FC859 /* OZLModelStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BCF88261793F4AA006FC859 /* OZLModelStatus.m */; };
|
||||
2BCF88271793F4AA006FC859 /* OZLModelIssueStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BCF88261793F4AA006FC859 /* OZLModelIssueStatus.m */; };
|
||||
2BCF882A1793F4C9006FC859 /* OZLModelPriority.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BCF88291793F4C9006FC859 /* OZLModelPriority.m */; };
|
||||
2BCF88301793F5CE006FC859 /* OZLModelUser.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BCF882F1793F5CE006FC859 /* OZLModelUser.m */; };
|
||||
2BCF88341793FFD1006FC859 /* OZLIssueDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BCF88321793FFD0006FC859 /* OZLIssueDetailViewController.m */; };
|
||||
|
@ -55,6 +60,14 @@
|
|||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
2B9968A91794F71B0086F115 /* OZLModelIssueCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OZLModelIssueCategory.h; path = Models/OZLModelIssueCategory.h; sourceTree = "<group>"; };
|
||||
2B9968AA1794F71B0086F115 /* OZLModelIssueCategory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OZLModelIssueCategory.m; path = Models/OZLModelIssueCategory.m; sourceTree = "<group>"; };
|
||||
2B9968AC1794FC0A0086F115 /* OZLProjectCreateViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OZLProjectCreateViewController.h; path = ViewControllers/OZLProjectCreateViewController.h; sourceTree = "<group>"; };
|
||||
2B9968AD1794FC0A0086F115 /* OZLProjectCreateViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OZLProjectCreateViewController.m; path = ViewControllers/OZLProjectCreateViewController.m; sourceTree = "<group>"; };
|
||||
2B9968AE1794FC0A0086F115 /* OZLProjectCreateViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = OZLProjectCreateViewController.xib; path = ViewControllers/OZLProjectCreateViewController.xib; sourceTree = "<group>"; };
|
||||
2B9968B117951A5C0086F115 /* OZLIssueCreateViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OZLIssueCreateViewController.h; path = ViewControllers/OZLIssueCreateViewController.h; sourceTree = "<group>"; };
|
||||
2B9968B217951A5C0086F115 /* OZLIssueCreateViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OZLIssueCreateViewController.m; path = ViewControllers/OZLIssueCreateViewController.m; sourceTree = "<group>"; };
|
||||
2B9968B317951A5C0086F115 /* OZLIssueCreateViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = OZLIssueCreateViewController.xib; path = ViewControllers/OZLIssueCreateViewController.xib; sourceTree = "<group>"; };
|
||||
2BCF880A1793A26A006FC859 /* MBProgressHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MBProgressHUD.h; sourceTree = "<group>"; };
|
||||
2BCF880B1793A26A006FC859 /* MBProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MBProgressHUD.m; sourceTree = "<group>"; };
|
||||
2BCF880E1793ABA0006FC859 /* Reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Reachability.h; sourceTree = "<group>"; };
|
||||
|
@ -68,8 +81,8 @@
|
|||
2BCF881D1793F3C8006FC859 /* OZLModelIssue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OZLModelIssue.m; path = Models/OZLModelIssue.m; sourceTree = "<group>"; };
|
||||
2BCF881F1793F478006FC859 /* OZLModelTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OZLModelTracker.h; path = Models/OZLModelTracker.h; sourceTree = "<group>"; };
|
||||
2BCF88201793F478006FC859 /* OZLModelTracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OZLModelTracker.m; path = Models/OZLModelTracker.m; sourceTree = "<group>"; };
|
||||
2BCF88251793F4AA006FC859 /* OZLModelStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OZLModelStatus.h; path = Models/OZLModelStatus.h; sourceTree = "<group>"; };
|
||||
2BCF88261793F4AA006FC859 /* OZLModelStatus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OZLModelStatus.m; path = Models/OZLModelStatus.m; sourceTree = "<group>"; };
|
||||
2BCF88251793F4AA006FC859 /* OZLModelIssueStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OZLModelIssueStatus.h; path = Models/OZLModelIssueStatus.h; sourceTree = "<group>"; };
|
||||
2BCF88261793F4AA006FC859 /* OZLModelIssueStatus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OZLModelIssueStatus.m; path = Models/OZLModelIssueStatus.m; sourceTree = "<group>"; };
|
||||
2BCF88281793F4C9006FC859 /* OZLModelPriority.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OZLModelPriority.h; path = Models/OZLModelPriority.h; sourceTree = "<group>"; };
|
||||
2BCF88291793F4C9006FC859 /* OZLModelPriority.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OZLModelPriority.m; path = Models/OZLModelPriority.m; sourceTree = "<group>"; };
|
||||
2BCF882E1793F5CE006FC859 /* OZLModelUser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OZLModelUser.h; path = Models/OZLModelUser.h; sourceTree = "<group>"; };
|
||||
|
@ -176,12 +189,12 @@
|
|||
D5DB80A31792F4DE0081662A /* OZLProjectListViewController.h */,
|
||||
D5DB80A41792F4DE0081662A /* OZLProjectListViewController.m */,
|
||||
D5DB80A51792F4DE0081662A /* OZLProjectListViewController.xib */,
|
||||
D5DB80A91792F6980081662A /* OZLProjectViewController.h */,
|
||||
D5DB80AA1792F6980081662A /* OZLProjectViewController.m */,
|
||||
D5DB80AB1792F6980081662A /* OZLProjectViewController.xib */,
|
||||
2BCF88151793E352006FC859 /* OZLProjectDetailViewController.h */,
|
||||
2BCF88161793E353006FC859 /* OZLProjectDetailViewController.m */,
|
||||
2BCF88171793E353006FC859 /* OZLProjectDetailViewController.xib */,
|
||||
2B9968AC1794FC0A0086F115 /* OZLProjectCreateViewController.h */,
|
||||
2B9968AD1794FC0A0086F115 /* OZLProjectCreateViewController.m */,
|
||||
2B9968AE1794FC0A0086F115 /* OZLProjectCreateViewController.xib */,
|
||||
);
|
||||
name = Project;
|
||||
sourceTree = "<group>";
|
||||
|
@ -189,9 +202,15 @@
|
|||
2BCF881B1793EFB7006FC859 /* Issue */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D5DB80A91792F6980081662A /* OZLProjectViewController.h */,
|
||||
D5DB80AA1792F6980081662A /* OZLProjectViewController.m */,
|
||||
D5DB80AB1792F6980081662A /* OZLProjectViewController.xib */,
|
||||
2BCF88311793FFD0006FC859 /* OZLIssueDetailViewController.h */,
|
||||
2BCF88321793FFD0006FC859 /* OZLIssueDetailViewController.m */,
|
||||
2BCF88331793FFD1006FC859 /* OZLIssueDetailViewController.xib */,
|
||||
2B9968B117951A5C0086F115 /* OZLIssueCreateViewController.h */,
|
||||
2B9968B217951A5C0086F115 /* OZLIssueCreateViewController.m */,
|
||||
2B9968B317951A5C0086F115 /* OZLIssueCreateViewController.xib */,
|
||||
);
|
||||
name = Issue;
|
||||
sourceTree = "<group>";
|
||||
|
@ -349,8 +368,8 @@
|
|||
D5DB80BF17931C580081662A /* Models */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2BCF88251793F4AA006FC859 /* OZLModelStatus.h */,
|
||||
2BCF88261793F4AA006FC859 /* OZLModelStatus.m */,
|
||||
2BCF88251793F4AA006FC859 /* OZLModelIssueStatus.h */,
|
||||
2BCF88261793F4AA006FC859 /* OZLModelIssueStatus.m */,
|
||||
D5DB80C017931C8B0081662A /* OZLModelProject.h */,
|
||||
D5DB80C117931C8B0081662A /* OZLModelProject.m */,
|
||||
2BCF881C1793F3C8006FC859 /* OZLModelIssue.h */,
|
||||
|
@ -361,6 +380,8 @@
|
|||
2BCF88291793F4C9006FC859 /* OZLModelPriority.m */,
|
||||
2BCF882E1793F5CE006FC859 /* OZLModelUser.h */,
|
||||
2BCF882F1793F5CE006FC859 /* OZLModelUser.m */,
|
||||
2B9968A91794F71B0086F115 /* OZLModelIssueCategory.h */,
|
||||
2B9968AA1794F71B0086F115 /* OZLModelIssueCategory.m */,
|
||||
);
|
||||
name = Models;
|
||||
sourceTree = "<group>";
|
||||
|
@ -426,6 +447,8 @@
|
|||
D5DB80B61793016B0081662A /* OZLAccountViewController.xib in Resources */,
|
||||
2BCF88191793E353006FC859 /* OZLProjectDetailViewController.xib in Resources */,
|
||||
2BCF88351793FFD1006FC859 /* OZLIssueDetailViewController.xib in Resources */,
|
||||
2B9968B01794FC0A0086F115 /* OZLProjectCreateViewController.xib in Resources */,
|
||||
2B9968B517951A5C0086F115 /* OZLIssueCreateViewController.xib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -463,10 +486,13 @@
|
|||
2BCF88181793E353006FC859 /* OZLProjectDetailViewController.m in Sources */,
|
||||
2BCF881E1793F3C8006FC859 /* OZLModelIssue.m in Sources */,
|
||||
2BCF88211793F478006FC859 /* OZLModelTracker.m in Sources */,
|
||||
2BCF88271793F4AA006FC859 /* OZLModelStatus.m in Sources */,
|
||||
2BCF88271793F4AA006FC859 /* OZLModelIssueStatus.m in Sources */,
|
||||
2BCF882A1793F4C9006FC859 /* OZLModelPriority.m in Sources */,
|
||||
2BCF88301793F5CE006FC859 /* OZLModelUser.m in Sources */,
|
||||
2BCF88341793FFD1006FC859 /* OZLIssueDetailViewController.m in Sources */,
|
||||
2B9968AB1794F71B0086F115 /* OZLModelIssueCategory.m in Sources */,
|
||||
2B9968AF1794FC0A0086F115 /* OZLProjectCreateViewController.m in Sources */,
|
||||
2B9968B417951A5C0086F115 /* OZLIssueCreateViewController.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
|
@ -8,9 +8,10 @@
|
|||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "OZLModelTracker.h"
|
||||
#import "OZLModelStatus.h"
|
||||
#import "OZLModelIssueStatus.h"
|
||||
#import "OZLModelUser.h"
|
||||
#import "OZLModelPriority.h"
|
||||
#import "OZLModelIssueCategory.h"
|
||||
|
||||
@interface OZLModelIssue : NSObject
|
||||
|
||||
|
@ -21,6 +22,8 @@
|
|||
@property(nonatomic,strong) OZLModelUser* author;
|
||||
@property(nonatomic,strong) OZLModelUser* assignedTo;
|
||||
@property(nonatomic,strong) OZLModelPriority* priority;
|
||||
@property(nonatomic,strong) OZLModelIssueStatus* status;
|
||||
@property(nonatomic,strong) OZLModelIssueCategory* category;
|
||||
@property(nonatomic,strong) NSString* subject;
|
||||
@property(nonatomic,strong) NSString* description;
|
||||
@property(nonatomic,strong) NSString* startDate;
|
||||
|
@ -28,7 +31,10 @@
|
|||
@property(nonatomic,strong) NSString* createdOn;
|
||||
@property(nonatomic,strong) NSString* updatedOn;
|
||||
@property(nonatomic) float doneRatio;
|
||||
@property(nonatomic) float spentHours;
|
||||
@property(nonatomic,strong) NSString* notes;// used as paramter to update a issue
|
||||
|
||||
-(id)initWithDictionary:(NSDictionary*)dic;
|
||||
-(NSMutableDictionary*) toParametersDic;
|
||||
|
||||
@end
|
||||
|
|
|
@ -16,21 +16,6 @@
|
|||
if (!self) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
// @property(nonatomic) int index;
|
||||
// @property(nonatomic) int projectId;
|
||||
// @property(nonatomic) int parentIssueId;
|
||||
// @property(nonatomic,strong) OZLModelTracker* tracker;
|
||||
// @property(nonatomic,strong) OZLModelUser* author;
|
||||
// @property(nonatomic,strong) OZLModelUser* assignedTo;
|
||||
// @property(nonatomic,strong) OZLModelPriority* priority;
|
||||
// @property(nonatomic,strong) NSString* subject;
|
||||
// @property(nonatomic,strong) NSString* description;
|
||||
// @property(nonatomic,strong) NSString* startDate;
|
||||
// @property(nonatomic,strong) NSString* dueDate;
|
||||
// @property(nonatomic,strong) NSString* createdOn;
|
||||
// @property(nonatomic,strong) NSString* updatedOn;
|
||||
// @property(nonatomic) float doneRatio;
|
||||
_index = [[dic objectForKey:@"id"] intValue];
|
||||
_projectId = [[[dic objectForKey:@"project"] objectForKey:@"id"] intValue];
|
||||
id parent = [dic objectForKey:@"parent"];
|
||||
|
@ -55,6 +40,14 @@
|
|||
if (priority != nil) {
|
||||
_priority = [[OZLModelPriority alloc] initWithDictionary:priority];
|
||||
}
|
||||
id status = [dic objectForKey:@"status"];
|
||||
if (status) {
|
||||
_status = [[OZLModelIssueStatus alloc ] initWithDictionary:status];
|
||||
}
|
||||
id category = [dic objectForKey:@"category"];
|
||||
if (status) {
|
||||
_category = [[OZLModelIssueCategory alloc ] initWithDictionary:category];
|
||||
}
|
||||
_subject = [dic objectForKey:@"subject"];
|
||||
_description = [dic objectForKey:@"description"];
|
||||
_startDate = [dic objectForKey:@"start_date"];
|
||||
|
@ -62,7 +55,45 @@
|
|||
_createdOn = [dic objectForKey:@"created_on"];
|
||||
_updatedOn = [dic objectForKey:@"updated_on"];
|
||||
_doneRatio = [[dic objectForKey:@"done_ratio"] floatValue];
|
||||
id spentHours = [dic objectForKey:@"spent_hours"];
|
||||
if (spentHours ) {
|
||||
_spentHours = [spentHours floatValue];
|
||||
}else {
|
||||
_spentHours = 0.0f;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
-(NSMutableDictionary*) toParametersDic
|
||||
{
|
||||
NSMutableDictionary* issueData = [[NSMutableDictionary alloc] init];
|
||||
if (_projectId > 0) {
|
||||
[issueData setObject:[NSNumber numberWithInt:_projectId] forKey:@"project_id"];
|
||||
}
|
||||
if (_tracker && _tracker.index > 0) {
|
||||
[issueData setObject:[NSNumber numberWithInt:_tracker.index] forKey:@"tracker_id"];
|
||||
}
|
||||
if (_status && _status.index > 0) {
|
||||
[issueData setObject:[NSNumber numberWithInt:_status.index] forKey:@"status_id"];
|
||||
}
|
||||
if (_priority && _priority.init > 0) {
|
||||
[issueData setObject:[NSNumber numberWithInt:_priority.index] forKey:@"priority_id"];
|
||||
}
|
||||
if (_subject.length > 0) {
|
||||
[issueData setObject:_subject forKey:@"subject"];
|
||||
}
|
||||
if (_description.length > 0) {
|
||||
[issueData setObject:_description forKey:@"description"];
|
||||
}
|
||||
if (_category && _category) {
|
||||
[issueData setObject:[NSNumber numberWithInt:_category.index ] forKey:@"categroy_id"];
|
||||
}
|
||||
if (_assignedTo && _assignedTo.index > 0) {
|
||||
[issueData setObject:[NSNumber numberWithInt:_assignedTo.index] forKey:@"assigned_to_id"];
|
||||
}
|
||||
if (_parentIssueId > 0) {
|
||||
[issueData setObject:[NSNumber numberWithInt:_parentIssueId] forKey:@"parent_issue_id"];
|
||||
}
|
||||
|
||||
return [[NSMutableDictionary alloc] initWithObjectsAndKeys:issueData,@"issue",nil];
|
||||
}
|
||||
@end
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
//
|
||||
// OZLModelIssueCategory.h
|
||||
// RedmineMobile
|
||||
//
|
||||
// Created by lizhijie on 7/16/13.
|
||||
// Copyright (c) 2013 Lee Zhijie. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface OZLModelIssueCategory : NSObject
|
||||
|
||||
@property(nonatomic) int index;
|
||||
@property(nonatomic,strong) NSString* name;
|
||||
|
||||
-(id)initWithDictionary:(NSDictionary*)dic;
|
||||
-(NSMutableDictionary*) toParametersDic;
|
||||
|
||||
@end
|
|
@ -0,0 +1,29 @@
|
|||
//
|
||||
// OZLModelIssueCategory.m
|
||||
// RedmineMobile
|
||||
//
|
||||
// Created by lizhijie on 7/16/13.
|
||||
// Copyright (c) 2013 Lee Zhijie. All rights reserved.
|
||||
//
|
||||
|
||||
#import "OZLModelIssueCategory.h"
|
||||
|
||||
@implementation OZLModelIssueCategory
|
||||
|
||||
|
||||
-(id)initWithDictionary:(NSDictionary*)dic
|
||||
{
|
||||
self = [super init];
|
||||
if (!self) {
|
||||
return nil;
|
||||
}
|
||||
_index = [[dic objectForKey:@"id"] intValue];
|
||||
_name = [dic objectForKey:@"name"];
|
||||
return self;
|
||||
}
|
||||
//-(NSMutableDictionary*) toParametersDic
|
||||
//{
|
||||
//
|
||||
//}
|
||||
|
||||
@end
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// OZLModelStatus.h
|
||||
// OZLModelIssueStatus.h
|
||||
// RedmineMobile
|
||||
//
|
||||
// Created by lizhijie on 7/15/13.
|
||||
|
@ -8,7 +8,7 @@
|
|||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface OZLModelStatus : NSObject
|
||||
@interface OZLModelIssueStatus : NSObject
|
||||
|
||||
@property(nonatomic) int index;
|
||||
@property(nonatomic, strong) NSString* name;
|
|
@ -1,14 +1,14 @@
|
|||
//
|
||||
// OZLModelStatus.m
|
||||
// OZLModelIssueStatus.m
|
||||
// RedmineMobile
|
||||
//
|
||||
// Created by lizhijie on 7/15/13.
|
||||
// Copyright (c) 2013 Lee Zhijie. All rights reserved.
|
||||
//
|
||||
|
||||
#import "OZLModelStatus.h"
|
||||
#import "OZLModelIssueStatus.h"
|
||||
|
||||
@implementation OZLModelStatus
|
||||
@implementation OZLModelIssueStatus
|
||||
|
||||
-(id)initWithDictionary:(NSDictionary*)dic
|
||||
{
|
|
@ -31,6 +31,7 @@
|
|||
@interface OZLModelProject : NSObject
|
||||
|
||||
@property(nonatomic) int index;
|
||||
@property(nonatomic,strong) NSString* identifier;
|
||||
@property(nonatomic,strong) NSString* description;
|
||||
@property(nonatomic,strong) NSString* name;
|
||||
@property(nonatomic) int parentId;
|
||||
|
@ -38,5 +39,6 @@
|
|||
@property(nonatomic,strong) NSString* updatedOn;
|
||||
|
||||
-(id)initWithDictionary:(NSDictionary*)dic;
|
||||
-(NSMutableDictionary*) toParametersDic;
|
||||
|
||||
@end
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
}
|
||||
|
||||
_index = [[dic objectForKey:@"id"] intValue];
|
||||
_identifier = [dic objectForKey:@"identifier"];
|
||||
_name = [dic objectForKey:@"name"];
|
||||
_description = [dic objectForKey:@"description"];
|
||||
_createdOn = [dic objectForKey:@"created_on"];
|
||||
|
@ -51,4 +52,18 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
-(NSMutableDictionary*) toParametersDic
|
||||
{
|
||||
NSMutableDictionary* projectDic = [[NSMutableDictionary alloc] init];
|
||||
[projectDic setObject:_name forKey:@"name"];
|
||||
[projectDic setObject:_identifier forKey:@"identifier"];
|
||||
if (_description.length > 0) {
|
||||
[projectDic setObject:_description forKey:@"description"];
|
||||
}
|
||||
if (_parentId > 0) {
|
||||
[projectDic setObject:[NSNumber numberWithInt:_parentId] forKey:@"parent"];
|
||||
}
|
||||
|
||||
return [[NSMutableDictionary alloc] initWithObjectsAndKeys:projectDic,@"project",nil];
|
||||
}
|
||||
@end
|
||||
|
|
|
@ -32,6 +32,6 @@
|
|||
@interface OZLAppDelegate : UIResponder <UIApplicationDelegate,PPRevealSideViewControllerDelegate>
|
||||
|
||||
@property (strong, nonatomic) UIWindow *window;
|
||||
@property (strong, nonatomic) PPRevealSideViewController *revealSideViewController;
|
||||
|
||||
//@property (strong, nonatomic) PPRevealSideViewController *revealSideViewController;
|
||||
@property(strong, nonatomic) UINavigationController* navigationController;
|
||||
@end
|
||||
|
|
|
@ -31,13 +31,14 @@
|
|||
#import "OZLSingleton.h"
|
||||
#import "OZLModelProject.h"
|
||||
#import "OZLAccountViewController.h"
|
||||
#import "OZLProjectListViewController.h"
|
||||
|
||||
@implementation OZLAppDelegate
|
||||
|
||||
- (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) {
|
||||
|
@ -58,6 +59,10 @@
|
|||
|
||||
PP_RELEASE(main);
|
||||
PP_RELEASE(nav);
|
||||
*/
|
||||
OZLProjectListViewController* projectList = [[OZLProjectListViewController alloc] initWithNibName:@"OZLProjectListViewController" bundle:nil];
|
||||
_navigationController = [[UINavigationController alloc] initWithRootViewController:projectList];
|
||||
self.window.rootViewController = _navigationController;
|
||||
|
||||
self.window.backgroundColor = [UIColor whiteColor];
|
||||
[self.window makeKeyAndVisible];
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#import "OZLModelProject.h"
|
||||
#import "OZLModelIssue.h"
|
||||
#import "OZLModelPriority.h"
|
||||
#import "OZLModelStatus.h"
|
||||
#import "OZLModelIssueStatus.h"
|
||||
#import "OZLModelTracker.h"
|
||||
#import "OZLModelUser.h"
|
||||
|
||||
|
@ -39,9 +39,17 @@
|
|||
// project
|
||||
+(void)getProjectListWithParams:(NSDictionary*)params andBlock:(void (^)(NSArray *result, NSError *error))block;
|
||||
+(void)getDetailForProject:(int)projectid withParams:(NSDictionary*)params andBlock:(void (^)(OZLModelProject *result, NSError *error))block;
|
||||
+(void)createProject:(OZLModelProject*)projectData withParams:(NSDictionary*)params andBlock:(void (^)(BOOL success, NSError *error))block;
|
||||
+(void)updateProject:(OZLModelProject*)projectData withParams:(NSDictionary*)params andBlock:(void (^)(BOOL success, NSError *error))block;
|
||||
+(void)deleteProject:(int)projectid withParams:(NSDictionary*)params andBlock:(void (^)(BOOL success, NSError *error))block;
|
||||
|
||||
|
||||
// issue
|
||||
+(void)getIssueListForProject:(int)projectid withParams:(NSDictionary*)params andBlock:(void (^)(NSArray *result, NSError *error))block;
|
||||
+(void)getDetailFoIssue:(int)issueid withParams:(NSDictionary*)params andBlock:(void (^)(OZLModelIssue *result, NSError *error))block;
|
||||
+(void)createIssue:(OZLModelIssue*)issueData withParams:(NSDictionary*)params andBlock:(void (^)(BOOL success, NSError *error))block;
|
||||
+(void)updateIssue:(OZLModelIssue*)issueData withParams:(NSDictionary*)params andBlock:(void (^)(BOOL success, NSError *error))block;
|
||||
+(void)deleteIssue:(int)issueid withParams:(NSDictionary*)params andBlock:(void (^)(BOOL success, NSError *error))block;
|
||||
|
||||
|
||||
@end
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
|
||||
@implementation OZLNetwork
|
||||
|
||||
#pragma mark-
|
||||
#pragma mark project api
|
||||
+(void)getProjectListWithParams:(NSDictionary*)params andBlock:(void (^)(NSArray *result, NSError *error))block;
|
||||
{
|
||||
NSString* path = @"/projects.json";
|
||||
|
@ -49,10 +51,8 @@
|
|||
block(projects,nil);
|
||||
}
|
||||
|
||||
|
||||
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
|
||||
|
||||
|
||||
if (block) {
|
||||
block([NSArray array], error);
|
||||
}
|
||||
|
@ -74,17 +74,89 @@
|
|||
block(project,nil);
|
||||
}
|
||||
|
||||
|
||||
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
|
||||
|
||||
|
||||
if (block) {
|
||||
block([NSArray array], error);
|
||||
}
|
||||
|
||||
}];
|
||||
}
|
||||
+(void)createProject:(OZLModelProject*)projectData withParams:(NSDictionary*)params andBlock:(void (^)(BOOL success, NSError *error))block
|
||||
{
|
||||
NSString* path = @"/projects.json";
|
||||
|
||||
//project info
|
||||
NSMutableDictionary* projectDic = [projectData toParametersDic];
|
||||
[projectDic addEntriesFromDictionary:params];
|
||||
|
||||
[[OZLNetworkBase sharedClient] postPath:path parameters:projectDic success:^(AFHTTPRequestOperation *operation, id responseObject) {
|
||||
|
||||
if (block) {
|
||||
NSLog(@"the repsonse:%@",responseObject);
|
||||
int repondNumber = [responseObject intValue];
|
||||
block(repondNumber == 201,nil);
|
||||
}
|
||||
|
||||
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
|
||||
|
||||
if (block) {
|
||||
block(NO, error);
|
||||
}
|
||||
|
||||
}];
|
||||
}
|
||||
+(void)updateProject:(OZLModelProject*)projectData withParams:(NSDictionary*)params andBlock:(void (^)(BOOL success, NSError *error))block
|
||||
{
|
||||
NSString* path = [NSString stringWithFormat:@"/projects/%d.json",projectData.index];
|
||||
|
||||
//project info
|
||||
NSMutableDictionary* projectDic = [projectData toParametersDic];
|
||||
[projectDic addEntriesFromDictionary:params];
|
||||
|
||||
[[OZLNetworkBase sharedClient] putPath:path parameters:projectDic success:^(AFHTTPRequestOperation *operation, id responseObject) {
|
||||
|
||||
if (block) {
|
||||
NSLog(@"the repsonse:%@",responseObject);
|
||||
int repondNumber = [responseObject intValue];
|
||||
block(repondNumber == 201,nil);
|
||||
}
|
||||
|
||||
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
|
||||
|
||||
|
||||
if (block) {
|
||||
block(NO, error);
|
||||
}
|
||||
|
||||
}];
|
||||
|
||||
}
|
||||
+(void)deleteProject:(int)projectid withParams:(NSDictionary*)params andBlock:(void (^)(BOOL success, NSError *error))block
|
||||
{
|
||||
NSString* path = [NSString stringWithFormat:@"/projects/%d.json",projectid];
|
||||
|
||||
[[OZLNetworkBase sharedClient] deletePath:path parameters:params success:^(AFHTTPRequestOperation *operation, id responseObject) {
|
||||
|
||||
if (block) {
|
||||
NSLog(@"the repsonse:%@",responseObject);
|
||||
int repondNumber = [responseObject intValue];
|
||||
block(repondNumber == 201,nil);
|
||||
}
|
||||
|
||||
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
|
||||
|
||||
|
||||
if (block) {
|
||||
block(NO, error);
|
||||
}
|
||||
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark issue api
|
||||
+(void)getIssueListForProject:(int)projectid withParams:(NSDictionary*)params andBlock:(void (^)(NSArray *result, NSError *error))block
|
||||
{
|
||||
NSString* path = [NSString stringWithFormat:@"/issues.json"];
|
||||
|
@ -105,7 +177,6 @@
|
|||
block(issues,nil);
|
||||
}
|
||||
|
||||
|
||||
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
|
||||
|
||||
if (block) {
|
||||
|
@ -139,4 +210,74 @@
|
|||
}];
|
||||
}
|
||||
|
||||
+(void)createIssue:(OZLModelIssue*)issueData withParams:(NSDictionary*)params andBlock:(void (^)(BOOL success, NSError *error))block
|
||||
{
|
||||
NSString* path = [NSString stringWithFormat:@"/issues.json"];
|
||||
|
||||
//project info
|
||||
NSMutableDictionary* paramsDic = [[NSMutableDictionary alloc] initWithDictionary:params];
|
||||
[paramsDic addEntriesFromDictionary:[issueData toParametersDic]];
|
||||
|
||||
[[OZLNetworkBase sharedClient] postPath:path parameters:paramsDic success:^(AFHTTPRequestOperation *operation, id responseObject) {
|
||||
|
||||
if (block) {
|
||||
NSLog(@"the repsonse:%@",responseObject);
|
||||
int repondNumber = [responseObject intValue];
|
||||
block(repondNumber == 201,nil);
|
||||
}
|
||||
|
||||
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
|
||||
|
||||
if (block) {
|
||||
block(NO, error);
|
||||
}
|
||||
|
||||
}];
|
||||
}
|
||||
+(void)updateIssue:(OZLModelIssue*)issueData withParams:(NSDictionary*)params andBlock:(void (^)(BOOL success, NSError *error))block
|
||||
{
|
||||
NSString* path = [NSString stringWithFormat:@"/issues/%d.json",issueData.index];
|
||||
|
||||
//project info
|
||||
NSMutableDictionary* paramsDic = [[NSMutableDictionary alloc] initWithDictionary:params];
|
||||
[paramsDic addEntriesFromDictionary:[issueData toParametersDic]];
|
||||
|
||||
[[OZLNetworkBase sharedClient] putPath:path parameters:paramsDic success:^(AFHTTPRequestOperation *operation, id responseObject) {
|
||||
|
||||
if (block) {
|
||||
NSLog(@"the repsonse:%@",responseObject);
|
||||
int repondNumber = [responseObject intValue];
|
||||
block(repondNumber == 201,nil);
|
||||
}
|
||||
|
||||
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
|
||||
|
||||
if (block) {
|
||||
block(NO, error);
|
||||
}
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
+(void)deleteIssue:(int)issueid withParams:(NSDictionary*)params andBlock:(void (^)(BOOL success, NSError *error))block
|
||||
{
|
||||
NSString* path = [NSString stringWithFormat:@"/issues/%d.json",issueid];
|
||||
|
||||
[[OZLNetworkBase sharedClient] deletePath:path parameters:params success:^(AFHTTPRequestOperation *operation, id responseObject) {
|
||||
|
||||
if (block) {
|
||||
NSLog(@"the repsonse:%@",responseObject);
|
||||
int repondNumber = [responseObject intValue];
|
||||
block(repondNumber == 201,nil);
|
||||
}
|
||||
|
||||
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
|
||||
|
||||
if (block) {
|
||||
block(NO, error);
|
||||
}
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -52,10 +52,10 @@
|
|||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
[self changeSideViewOffset:40];
|
||||
|
||||
UIBarButtonItem* projectListBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemBookmarks target:self action:@selector(showLeft)];
|
||||
[self.navigationItem setLeftBarButtonItem:projectListBtn];
|
||||
// [self changeSideViewOffset:40];
|
||||
|
||||
// UIBarButtonItem* projectListBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemBookmarks target:self action:@selector(showProjectList)];
|
||||
// [self.navigationItem setLeftBarButtonItem:projectListBtn];
|
||||
|
||||
_redmineHomeURL.text = [[OZLSingleton sharedInstance] redmineHomeURL];
|
||||
_redmineUserKey.text = [[OZLSingleton sharedInstance] redmineUserKey];
|
||||
|
@ -75,11 +75,14 @@
|
|||
[self performSelector:@selector(preloadLeft) withObject:nil afterDelay:0.3];
|
||||
}
|
||||
|
||||
- (void) showLeft {
|
||||
OZLProjectListViewController *c = [[OZLProjectListViewController alloc] initWithNibName:@"OZLProjectListViewController" bundle:nil];
|
||||
[c setNeedRefresh:YES];
|
||||
[self.revealSideViewController pushViewController:c onDirection:PPRevealSideDirectionLeft withOffset:_sideviewOffset animated:YES];
|
||||
PP_RELEASE(c);
|
||||
- (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 {
|
||||
|
@ -109,6 +112,6 @@
|
|||
[[OZLSingleton sharedInstance] setRedmineUserKey:_redmineUserKey.text];
|
||||
[[OZLSingleton sharedInstance] setRedmineHomeURL:_redmineHomeURL.text];
|
||||
|
||||
[self showLeft];
|
||||
[self showProjectList];
|
||||
}
|
||||
@end
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
//
|
||||
// OZLIssueCreateViewController.h
|
||||
// RedmineMobile
|
||||
//
|
||||
// Created by lizhijie on 7/16/13.
|
||||
// Copyright (c) 2013 Lee Zhijie. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface OZLIssueCreateViewController : UIViewController
|
||||
- (IBAction)onCancel:(id)sender;
|
||||
- (IBAction)onSave:(id)sender;
|
||||
|
||||
@end
|
|
@ -0,0 +1,44 @@
|
|||
//
|
||||
// OZLIssueCreateViewController.m
|
||||
// RedmineMobile
|
||||
//
|
||||
// Created by lizhijie on 7/16/13.
|
||||
// Copyright (c) 2013 Lee Zhijie. All rights reserved.
|
||||
//
|
||||
|
||||
#import "OZLIssueCreateViewController.h"
|
||||
|
||||
@interface OZLIssueCreateViewController ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation OZLIssueCreateViewController
|
||||
|
||||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
|
||||
{
|
||||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
|
||||
if (self) {
|
||||
// Custom initialization
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view from its nib.
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning
|
||||
{
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
- (IBAction)onCancel:(id)sender {
|
||||
[self dismissModalViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
- (IBAction)onSave:(id)sender {
|
||||
}
|
||||
@end
|
|
@ -0,0 +1,316 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1552</int>
|
||||
<string key="IBDocument.SystemVersion">11G63</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">3084</string>
|
||||
<string key="IBDocument.AppKitVersion">1138.51</string>
|
||||
<string key="IBDocument.HIToolboxVersion">569.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="NS.object.0">2083</string>
|
||||
</object>
|
||||
<array key="IBDocument.IntegratedClassDependencies">
|
||||
<string>IBNSLayoutConstraint</string>
|
||||
<string>IBProxyObject</string>
|
||||
<string>IBUIBarButtonItem</string>
|
||||
<string>IBUINavigationBar</string>
|
||||
<string>IBUINavigationItem</string>
|
||||
<string>IBUIView</string>
|
||||
</array>
|
||||
<array key="IBDocument.PluginDependencies">
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</array>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
||||
<integer value="1" key="NS.object.0"/>
|
||||
</object>
|
||||
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||
<object class="IBProxyObject" id="372490531">
|
||||
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBProxyObject" id="975951072">
|
||||
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUIView" id="191373211">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="IBUINavigationBar" id="140175697">
|
||||
<reference key="NSNextResponder" ref="191373211"/>
|
||||
<int key="NSvFlags">290</int>
|
||||
<string key="NSFrameSize">{320, 44}</string>
|
||||
<reference key="NSSuperview" ref="191373211"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<array key="IBUIItems">
|
||||
<object class="IBUINavigationItem" id="76129800">
|
||||
<reference key="IBUINavigationBar" ref="140175697"/>
|
||||
<string key="IBUITitle">Title</string>
|
||||
<object class="IBUIBarButtonItem" key="IBUILeftBarButtonItem" id="91720236">
|
||||
<string key="IBUITitle">Cancel</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<int key="IBUIStyle">1</int>
|
||||
<reference key="IBUINavigationItem" ref="76129800"/>
|
||||
</object>
|
||||
<object class="IBUIBarButtonItem" key="IBUIRightBarButtonItem" id="415875905">
|
||||
<string key="IBUITitle">Save</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<int key="IBUIStyle">1</int>
|
||||
<reference key="IBUINavigationItem" ref="76129800"/>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
</array>
|
||||
<string key="NSFrame">{{0, 20}, {320, 548}}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="140175697"/>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
<object class="NSColorSpace" key="NSCustomColorSpace">
|
||||
<int key="NSID">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<object class="IBUIScreenMetrics" key="IBUISimulatedDestinationMetrics">
|
||||
<string key="IBUISimulatedSizeMetricsClass">IBUIScreenMetrics</string>
|
||||
<object class="NSMutableDictionary" key="IBUINormalizedOrientationToSizeMap">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<array key="dict.sortedKeys">
|
||||
<integer value="1"/>
|
||||
<integer value="3"/>
|
||||
</array>
|
||||
<array key="dict.values">
|
||||
<string>{320, 568}</string>
|
||||
<string>{568, 320}</string>
|
||||
</array>
|
||||
</object>
|
||||
<string key="IBUITargetRuntime">IBCocoaTouchFramework</string>
|
||||
<string key="IBUIDisplayName">Retina 4 Full Screen</string>
|
||||
<int key="IBUIType">2</int>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<array class="NSMutableArray" key="connectionRecords">
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">view</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="191373211"/>
|
||||
</object>
|
||||
<int key="connectionID">3</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">onCancel:</string>
|
||||
<reference key="source" ref="91720236"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">11</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">onSave:</string>
|
||||
<reference key="source" ref="415875905"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">12</int>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<array key="orderedObjects">
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<array key="object" id="0"/>
|
||||
<reference key="children" ref="1000"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1</int>
|
||||
<reference key="object" ref="191373211"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="140175697"/>
|
||||
<object class="IBNSLayoutConstraint" id="401993703">
|
||||
<reference key="firstItem" ref="140175697"/>
|
||||
<int key="firstAttribute">6</int>
|
||||
<int key="relation">0</int>
|
||||
<reference key="secondItem" ref="191373211"/>
|
||||
<int key="secondAttribute">6</int>
|
||||
<float key="multiplier">1</float>
|
||||
<object class="IBLayoutConstant" key="constant">
|
||||
<double key="value">0.0</double>
|
||||
</object>
|
||||
<float key="priority">1000</float>
|
||||
<reference key="containingView" ref="191373211"/>
|
||||
<int key="scoringType">8</int>
|
||||
<float key="scoringTypeFloat">29</float>
|
||||
<int key="contentType">3</int>
|
||||
</object>
|
||||
<object class="IBNSLayoutConstraint" id="627682533">
|
||||
<reference key="firstItem" ref="140175697"/>
|
||||
<int key="firstAttribute">5</int>
|
||||
<int key="relation">0</int>
|
||||
<reference key="secondItem" ref="191373211"/>
|
||||
<int key="secondAttribute">5</int>
|
||||
<float key="multiplier">1</float>
|
||||
<object class="IBLayoutConstant" key="constant">
|
||||
<double key="value">0.0</double>
|
||||
</object>
|
||||
<float key="priority">1000</float>
|
||||
<reference key="containingView" ref="191373211"/>
|
||||
<int key="scoringType">8</int>
|
||||
<float key="scoringTypeFloat">29</float>
|
||||
<int key="contentType">3</int>
|
||||
</object>
|
||||
<object class="IBNSLayoutConstraint" id="804812904">
|
||||
<reference key="firstItem" ref="140175697"/>
|
||||
<int key="firstAttribute">3</int>
|
||||
<int key="relation">0</int>
|
||||
<reference key="secondItem" ref="191373211"/>
|
||||
<int key="secondAttribute">3</int>
|
||||
<float key="multiplier">1</float>
|
||||
<object class="IBLayoutConstant" key="constant">
|
||||
<double key="value">0.0</double>
|
||||
</object>
|
||||
<float key="priority">1000</float>
|
||||
<reference key="containingView" ref="191373211"/>
|
||||
<int key="scoringType">8</int>
|
||||
<float key="scoringTypeFloat">29</float>
|
||||
<int key="contentType">3</int>
|
||||
</object>
|
||||
</array>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-1</int>
|
||||
<reference key="object" ref="372490531"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">File's Owner</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="975951072"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">4</int>
|
||||
<reference key="object" ref="140175697"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="76129800"/>
|
||||
</array>
|
||||
<reference key="parent" ref="191373211"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">5</int>
|
||||
<reference key="object" ref="76129800"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="91720236"/>
|
||||
<reference ref="415875905"/>
|
||||
</array>
|
||||
<reference key="parent" ref="140175697"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">6</int>
|
||||
<reference key="object" ref="804812904"/>
|
||||
<reference key="parent" ref="191373211"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">7</int>
|
||||
<reference key="object" ref="627682533"/>
|
||||
<reference key="parent" ref="191373211"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">8</int>
|
||||
<reference key="object" ref="401993703"/>
|
||||
<reference key="parent" ref="191373211"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">9</int>
|
||||
<reference key="object" ref="91720236"/>
|
||||
<reference key="parent" ref="76129800"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">10</int>
|
||||
<reference key="object" ref="415875905"/>
|
||||
<reference key="parent" ref="76129800"/>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||
<string key="-1.CustomClassName">OZLIssueCreateViewController</string>
|
||||
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="-2.CustomClassName">UIResponder</string>
|
||||
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<array key="1.IBViewMetadataConstraints">
|
||||
<reference ref="804812904"/>
|
||||
<reference ref="627682533"/>
|
||||
<reference ref="401993703"/>
|
||||
</array>
|
||||
<string key="10.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<boolean value="NO" key="4.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
||||
<string key="5.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="9.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
||||
<nil key="activeLocalization"/>
|
||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">12</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSLayoutConstraint</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/NSLayoutConstraint.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">OZLIssueCreateViewController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<dictionary class="NSMutableDictionary" key="actions">
|
||||
<string key="onCancel:">id</string>
|
||||
<string key="onSave:">id</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="actionInfosByName">
|
||||
<object class="IBActionInfo" key="onCancel:">
|
||||
<string key="name">onCancel:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo" key="onSave:">
|
||||
<string key="name">onSave:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/OZLIssueCreateViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<bool key="IBDocument.UseAutolayout">YES</bool>
|
||||
<string key="IBCocoaTouchPluginVersion">2083</string>
|
||||
</data>
|
||||
</archive>
|
|
@ -0,0 +1,15 @@
|
|||
//
|
||||
// OZLProjectCreateViewController.h
|
||||
// RedmineMobile
|
||||
//
|
||||
// Created by lizhijie on 7/16/13.
|
||||
// Copyright (c) 2013 Lee Zhijie. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface OZLProjectCreateViewController : UIViewController
|
||||
- (IBAction)onCancel:(id)sender;
|
||||
- (IBAction)onSave:(id)sender;
|
||||
|
||||
@end
|
|
@ -0,0 +1,46 @@
|
|||
//
|
||||
// OZLProjectCreateViewController.m
|
||||
// RedmineMobile
|
||||
//
|
||||
// Created by lizhijie on 7/16/13.
|
||||
// Copyright (c) 2013 Lee Zhijie. All rights reserved.
|
||||
//
|
||||
|
||||
#import "OZLProjectCreateViewController.h"
|
||||
|
||||
@interface OZLProjectCreateViewController ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation OZLProjectCreateViewController
|
||||
|
||||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
|
||||
{
|
||||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
|
||||
if (self) {
|
||||
// Custom initialization
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning
|
||||
{
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
- (IBAction)onCancel:(id)sender {
|
||||
|
||||
[self dismissModalViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
- (IBAction)onSave:(id)sender {
|
||||
}
|
||||
|
||||
@end
|
|
@ -0,0 +1,207 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1552</int>
|
||||
<string key="IBDocument.SystemVersion">11G63</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">3084</string>
|
||||
<string key="IBDocument.AppKitVersion">1138.51</string>
|
||||
<string key="IBDocument.HIToolboxVersion">569.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="NS.object.0">2083</string>
|
||||
</object>
|
||||
<array key="IBDocument.IntegratedClassDependencies">
|
||||
<string>IBProxyObject</string>
|
||||
<string>IBUIBarButtonItem</string>
|
||||
<string>IBUINavigationBar</string>
|
||||
<string>IBUINavigationItem</string>
|
||||
<string>IBUIView</string>
|
||||
</array>
|
||||
<array key="IBDocument.PluginDependencies">
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</array>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
||||
<integer value="1" key="NS.object.0"/>
|
||||
</object>
|
||||
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||
<object class="IBProxyObject" id="372490531">
|
||||
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBProxyObject" id="975951072">
|
||||
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUIView" id="191373211">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="IBUINavigationBar" id="389743523">
|
||||
<reference key="NSNextResponder" ref="191373211"/>
|
||||
<int key="NSvFlags">290</int>
|
||||
<string key="NSFrameSize">{320, 44}</string>
|
||||
<reference key="NSSuperview" ref="191373211"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<array key="IBUIItems">
|
||||
<object class="IBUINavigationItem" id="110694643">
|
||||
<reference key="IBUINavigationBar" ref="389743523"/>
|
||||
<string key="IBUITitle">Title</string>
|
||||
<object class="IBUIBarButtonItem" key="IBUILeftBarButtonItem" id="767403679">
|
||||
<string key="IBUITitle">Cancel</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<int key="IBUIStyle">1</int>
|
||||
<reference key="IBUINavigationItem" ref="110694643"/>
|
||||
</object>
|
||||
<object class="IBUIBarButtonItem" key="IBUIRightBarButtonItem" id="507346804">
|
||||
<string key="IBUITitle">Save</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<int key="IBUIStyle">1</int>
|
||||
<reference key="IBUINavigationItem" ref="110694643"/>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
</array>
|
||||
<string key="NSFrame">{{0, 20}, {320, 548}}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSNextKeyView" ref="389743523"/>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
<object class="NSColorSpace" key="NSCustomColorSpace">
|
||||
<int key="NSID">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<object class="IBUIScreenMetrics" key="IBUISimulatedDestinationMetrics">
|
||||
<string key="IBUISimulatedSizeMetricsClass">IBUIScreenMetrics</string>
|
||||
<object class="NSMutableDictionary" key="IBUINormalizedOrientationToSizeMap">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<array key="dict.sortedKeys">
|
||||
<integer value="1"/>
|
||||
<integer value="3"/>
|
||||
</array>
|
||||
<array key="dict.values">
|
||||
<string>{320, 568}</string>
|
||||
<string>{568, 320}</string>
|
||||
</array>
|
||||
</object>
|
||||
<string key="IBUITargetRuntime">IBCocoaTouchFramework</string>
|
||||
<string key="IBUIDisplayName">Retina 4 Full Screen</string>
|
||||
<int key="IBUIType">2</int>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<array class="NSMutableArray" key="connectionRecords">
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">view</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="191373211"/>
|
||||
</object>
|
||||
<int key="connectionID">3</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">onCancel:</string>
|
||||
<reference key="source" ref="767403679"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">10</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">onSave:</string>
|
||||
<reference key="source" ref="507346804"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">11</int>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<array key="orderedObjects">
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<array key="object" id="0"/>
|
||||
<reference key="children" ref="1000"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1</int>
|
||||
<reference key="object" ref="191373211"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="389743523"/>
|
||||
</array>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-1</int>
|
||||
<reference key="object" ref="372490531"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">File's Owner</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="975951072"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">4</int>
|
||||
<reference key="object" ref="389743523"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="110694643"/>
|
||||
</array>
|
||||
<reference key="parent" ref="191373211"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">5</int>
|
||||
<reference key="object" ref="110694643"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="767403679"/>
|
||||
<reference ref="507346804"/>
|
||||
</array>
|
||||
<reference key="parent" ref="389743523"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">8</int>
|
||||
<reference key="object" ref="767403679"/>
|
||||
<reference key="parent" ref="110694643"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">9</int>
|
||||
<reference key="object" ref="507346804"/>
|
||||
<reference key="parent" ref="110694643"/>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||
<string key="-1.CustomClassName">OZLProjectCreateViewController</string>
|
||||
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="-2.CustomClassName">UIResponder</string>
|
||||
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="5.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="9.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
||||
<nil key="activeLocalization"/>
|
||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">11</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes"/>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<string key="IBCocoaTouchPluginVersion">2083</string>
|
||||
</data>
|
||||
</archive>
|
|
@ -33,6 +33,7 @@
|
|||
@property (nonatomic) BOOL needRefresh;
|
||||
@property (strong, nonatomic) IBOutlet UITableView *projectsTableview;
|
||||
- (IBAction)showAccountView:(id)sender;
|
||||
- (IBAction)createProject:(id)sender;
|
||||
|
||||
|
||||
@end
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#import "PPRevealSideViewController.h"
|
||||
#import "OZLProjectViewController.h"
|
||||
#import "OZLAccountViewController.h"
|
||||
#import "OZLProjectCreateViewController.h"
|
||||
#import "OZLNetwork.h"
|
||||
#import "OZLModelProject.h"
|
||||
#import "MBProgressHUD.h"
|
||||
|
@ -62,15 +63,16 @@
|
|||
[self.view addSubview:_HUD];
|
||||
_HUD.labelText = @"Refreshing...";
|
||||
|
||||
|
||||
UIBarButtonItem* accountBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemOrganize target:self action:@selector(showAccountView:)];
|
||||
[self.navigationItem setLeftBarButtonItem:accountBtn];
|
||||
|
||||
[self.navigationItem setTitle:@"Projects"];
|
||||
}
|
||||
|
||||
-(void) viewWillAppear:(BOOL)animated
|
||||
{
|
||||
// if (_needRefresh) {
|
||||
_needRefresh = NO;
|
||||
// _needRefresh = NO;
|
||||
|
||||
[_HUD show:YES];
|
||||
// refresh project list
|
||||
|
@ -94,17 +96,29 @@
|
|||
|
||||
OZLProjectViewController *c = [[OZLProjectViewController alloc] initWithNibName:@"OZLProjectViewController" bundle:nil];
|
||||
[c setProjectData:project];
|
||||
UINavigationController *n = [[UINavigationController alloc] initWithRootViewController:c];
|
||||
[self.revealSideViewController popViewControllerWithNewCenterController:n
|
||||
animated:YES];
|
||||
|
||||
[self.navigationController pushViewController:c animated:YES];
|
||||
|
||||
// UINavigationController *n = [[UINavigationController alloc] initWithRootViewController:c];
|
||||
// [self.revealSideViewController popViewControllerWithNewCenterController:n
|
||||
// animated:YES];
|
||||
}
|
||||
|
||||
- (IBAction)showAccountView:(id)sender {
|
||||
OZLAccountViewController *c = [[OZLAccountViewController alloc] initWithNibName:@"OZLAccountViewController" bundle:nil];
|
||||
UINavigationController *n = [[UINavigationController alloc] initWithRootViewController:c];
|
||||
[self.revealSideViewController popViewControllerWithNewCenterController:n
|
||||
animated:YES];
|
||||
|
||||
[self.navigationController pushViewController:c animated:YES];
|
||||
|
||||
// UINavigationController *n = [[UINavigationController alloc] initWithRootViewController:c];
|
||||
// [self.revealSideViewController popViewControllerWithNewCenterController:n
|
||||
// animated:YES];
|
||||
}
|
||||
|
||||
- (IBAction)createProject:(id)sender {
|
||||
OZLProjectCreateViewController* creator = [[OZLProjectCreateViewController alloc] initWithNibName:@"OZLProjectCreateViewController" bundle:nil];
|
||||
[self.navigationController presentModalViewController:creator animated:YES];
|
||||
}
|
||||
|
||||
- (void)viewDidUnload {
|
||||
[self setProjectsTableview:nil];
|
||||
[super viewDidUnload];
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
<int key="NSvFlags">274</int>
|
||||
<string key="NSFrameSize">{320, 460}</string>
|
||||
<reference key="NSSuperview" ref="191373211"/>
|
||||
<reference key="NSWindow"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
|
@ -63,7 +62,6 @@
|
|||
<int key="NSvFlags">266</int>
|
||||
<string key="NSFrame">{{0, 460}, {320, 44}}</string>
|
||||
<reference key="NSSuperview" ref="191373211"/>
|
||||
<reference key="NSWindow"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
|
@ -80,8 +78,6 @@
|
|||
</array>
|
||||
<string key="NSFrame">{{0, 64}, {320, 504}}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
|
@ -131,6 +127,14 @@
|
|||
</object>
|
||||
<int key="connectionID">20</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">createProject:</string>
|
||||
<reference key="source" ref="75098941"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">23</int>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<array key="orderedObjects">
|
||||
|
@ -195,42 +199,9 @@
|
|||
<nil key="activeLocalization"/>
|
||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">22</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">OZLProjectListViewController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<object class="NSMutableDictionary" key="actions">
|
||||
<string key="NS.key.0">showAccountView:</string>
|
||||
<string key="NS.object.0">id</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="actionInfosByName">
|
||||
<string key="NS.key.0">showAccountView:</string>
|
||||
<object class="IBActionInfo" key="NS.object.0">
|
||||
<string key="name">showAccountView:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<string key="NS.key.0">projectsTableview</string>
|
||||
<string key="NS.object.0">UITableView</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<string key="NS.key.0">projectsTableview</string>
|
||||
<object class="IBToOneOutletInfo" key="NS.object.0">
|
||||
<string key="name">projectsTableview</string>
|
||||
<string key="candidateClassName">UITableView</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/OZLProjectListViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
<int key="maxID">23</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes"/>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
|
|
|
@ -32,4 +32,5 @@
|
|||
@interface OZLProjectViewController : UIViewController
|
||||
@property (weak, nonatomic) IBOutlet UITableView *issuesTableview;
|
||||
@property (nonatomic,strong) OZLModelProject* projectData;
|
||||
- (IBAction)onNewIssue:(id)sender;
|
||||
@end
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#import "MBProgressHUD.h"
|
||||
#import "OZLProjectDetailViewController.h"
|
||||
#import "OZLIssueDetailViewController.h"
|
||||
#import "OZLIssueCreateViewController.h"
|
||||
|
||||
|
||||
@interface OZLProjectViewController () {
|
||||
|
@ -57,10 +58,10 @@
|
|||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
[self changeSideViewOffset:40];
|
||||
// [self changeSideViewOffset:40];
|
||||
|
||||
UIBarButtonItem* projectListBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemOrganize target:self action:@selector(showLeft)];
|
||||
[self.navigationItem setLeftBarButtonItem:projectListBtn];
|
||||
// UIBarButtonItem* projectListBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemOrganize target:self action:@selector(showProjectList)];
|
||||
// [self.navigationItem setLeftBarButtonItem:projectListBtn];
|
||||
|
||||
UIBarButtonItem* inforBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemBookmarks target:self action:@selector(showProjectDetail)];
|
||||
[self.navigationItem setRightBarButtonItem:inforBtn];
|
||||
|
@ -109,17 +110,20 @@
|
|||
}
|
||||
|
||||
- (void) preloadLeft {
|
||||
OZLProjectListViewController *c = [[OZLProjectListViewController alloc] initWithNibName:@"OZLProjectListViewController" bundle:nil];
|
||||
[self.revealSideViewController preloadViewController:c
|
||||
forSide:PPRevealSideDirectionLeft
|
||||
withOffset:_sideviewOffset];
|
||||
PP_RELEASE(c);
|
||||
// OZLProjectListViewController *c = [[OZLProjectListViewController alloc] initWithNibName:@"OZLProjectListViewController" bundle:nil];
|
||||
// [self.revealSideViewController preloadViewController:c
|
||||
// forSide:PPRevealSideDirectionLeft
|
||||
// withOffset:_sideviewOffset];
|
||||
// PP_RELEASE(c);
|
||||
}
|
||||
|
||||
- (void) showLeft {
|
||||
OZLProjectListViewController *c = [[OZLProjectListViewController alloc] initWithNibName:@"OZLProjectListViewController" bundle:nil];
|
||||
[self.revealSideViewController pushViewController:c onDirection:PPRevealSideDirectionLeft withOffset:_sideviewOffset animated:YES];
|
||||
PP_RELEASE(c);
|
||||
- (void) showProjectList {
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
|
||||
// OZLProjectListViewController *c = [[OZLProjectListViewController alloc] initWithNibName:@"OZLProjectListViewController" bundle:nil];
|
||||
// UINavigationController* navigationController = [[UINavigationController alloc] initWithRootViewController:c];
|
||||
// [self.revealSideViewController pushViewController:navigationController onDirection:PPRevealSideDirectionLeft withOffset:_sideviewOffset animated:YES];
|
||||
// PP_RELEASE(c);
|
||||
}
|
||||
|
||||
- (IBAction)changeSideViewOffset:(int)offset {
|
||||
|
@ -230,4 +234,8 @@
|
|||
}
|
||||
|
||||
|
||||
- (IBAction)onNewIssue:(id)sender {
|
||||
OZLIssueCreateViewController* creator = [[OZLIssueCreateViewController alloc] initWithNibName:@"OZLIssueCreateViewController" bundle:nil];
|
||||
[self.navigationController presentModalViewController:creator animated:YES];
|
||||
}
|
||||
@end
|
||||
|
|
|
@ -129,6 +129,14 @@
|
|||
</object>
|
||||
<int key="connectionID">9</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">onNewIssue:</string>
|
||||
<reference key="source" ref="512025889"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">12</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">dataSource</string>
|
||||
|
@ -208,7 +216,7 @@
|
|||
<nil key="activeLocalization"/>
|
||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">11</int>
|
||||
<int key="maxID">12</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes"/>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
|
|
Loading…
Reference in New Issue