| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ddd3a44 commit 93a0af6
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7488,7 +7488,7 @@ | |||
| 7488 | 7488 | isa = XCBuildConfiguration; | |
| 7489 | 7489 | baseConfigurationReference = 34E37865A7DAAE68AEF68258 /* Pods-Coding_iOS.debug.xcconfig */; | |
| 7490 | 7490 | buildSettings = { | |
| 7491 | - ASSETCATALOG_COMPILER_APPICON_NAME = AppIconTemp; | ||
| 7491 | + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ||
| 7492 | 7492 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; | |
| 7493 | 7493 | CODE_SIGN_ENTITLEMENTS = Coding_iOS/Coding_iOS.entitlements; | |
| 7494 | 7494 | CODE_SIGN_IDENTITY = "iPhone Developer"; | |
@@ -7533,7 +7533,7 @@ | |||
| 7533 | 7533 | isa = XCBuildConfiguration; | |
| 7534 | 7534 | baseConfigurationReference = 2FD5D8DD0689696D28A6D49E /* Pods-Coding_iOS.release.xcconfig */; | |
| 7535 | 7535 | buildSettings = { | |
| 7536 | - ASSETCATALOG_COMPILER_APPICON_NAME = AppIconTemp; | ||
| 7536 | + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ||
| 7537 | 7537 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; | |
| 7538 | 7538 | CODE_SIGN_ENTITLEMENTS = Coding_iOS/Coding_iOS.entitlements; | |
| 7539 | 7539 | CODE_SIGN_IDENTITY = "iPhone Developer"; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -108,68 +108,66 @@ - (void)viewDidLoad | |||
| 108 | 108 | [self refreshWithNewIndex:_curIndex]; | |
| 109 | 109 | } | |
| 110 | 110 | } | |
| 111 | - [self setupTitleBtn]; | ||
| 112 | - | ||
| 113 | 111 | UIView *curView = [self getCurContentView]; | |
| 114 | 112 | if ([curView isKindOfClass:[ProjectTasksView class]]) { | |
| 113 | + [self setupTitleBtn]; | ||
| 114 | + | ||
| 115 | 115 | ProjectTasksView *tasksView = (ProjectTasksView *)curView; | |
| 116 | 116 | [self assignmentWithlistView:tasksView]; | |
| 117 | 117 | [tasksView refresh]; | |
| 118 | - } | ||
| 119 | - | ||
| 120 | - _role = TaskRoleTypeAll; | ||
| 121 | - //初始化过滤目录 | ||
| 122 | - _myFliterMenu = [[TaskSelectionView alloc] initWithFrame:CGRectMake(0, 64, kScreen_Width, kScreen_Height - 64) items:@[@"所有任务(0)", @"我关注的(0)", @"我创建的(0)"]]; | ||
| 123 | - __weak typeof(self) weakSelf = self; | ||
| 124 | - _myFliterMenu.clickBlock = ^(NSInteger pageIndex){ | ||
| 125 | - _role = pageIndex; | ||
| 126 | - if (pageIndex == 0) { | ||
| 127 | - _role = TaskRoleTypeAll; | ||
| 128 | - } | ||
| 129 | - | ||
| 130 | - NSString *title = weakSelf.myFliterMenu.items[pageIndex]; | ||
| 131 | - [weakSelf.titleBtn setTitle:[title substringToIndex:4] forState:UIControlStateNormal]; | ||
| 132 | 118 | ||
| 133 | - UIView *curView = [weakSelf getCurContentView]; | ||
| 134 | - if (![curView isKindOfClass:[ProjectTasksView class]]) { | ||
| 135 | - return; | ||
| 136 | - } | ||
| 137 | - ProjectTasksView *tasksView = (ProjectTasksView *)curView; | ||
| 138 | - [weakSelf assignmentWithlistView:tasksView]; | ||
| 139 | - [tasksView refresh]; | ||
| 140 | - [weakSelf resetTaskCount]; | ||
| 141 | - [weakSelf loadTasksLabels]; | ||
| 142 | - | ||
| 143 | - }; | ||
| 144 | - _myFliterMenu.closeBlock=^(){ | ||
| 145 | - [weakSelf.myFliterMenu dismissMenu]; | ||
| 146 | - }; | ||
| 147 | - | ||
| 148 | - _screenView = [ScreenView creat]; | ||
| 149 | - weakSelf.screenView.tastArray = @[[NSString stringWithFormat:@"进行中的(0)"], | ||
| 150 | - [NSString stringWithFormat:@"已完成的(0)"] | ||
| 151 | - ]; | ||
| 152 | - | ||
| 153 | - _screenView.selectBlock = ^(NSString *keyword, NSString *status, NSString *label) { | ||
| 154 | - [((UIButton *)weakSelf.screenBar.customView) setImage:[UIImage imageNamed:@"a1-hasScreen"] forState:UIControlStateNormal]; | ||
| 155 | - weakSelf.keyword = keyword; | ||
| 156 | - weakSelf.status = status; | ||
| 157 | - weakSelf.label = label; | ||
| 158 | - if (keyword == nil && status == nil && label == nil) { | ||
| 159 | - [((UIButton *)weakSelf.screenBar.customView) setImage:[UIImage imageNamed:@"a1-screen"] forState:UIControlStateNormal]; | ||
| 119 | + _role = TaskRoleTypeAll; | ||
| 120 | + //初始化过滤目录 | ||
| 121 | + _myFliterMenu = [[TaskSelectionView alloc] initWithFrame:CGRectMake(0, 64, kScreen_Width, kScreen_Height - 64) items:@[@"所有任务(0)", @"我关注的(0)", @"我创建的(0)"]]; | ||
| 122 | + __weak typeof(self) weakSelf = self; | ||
| 123 | + _myFliterMenu.clickBlock = ^(NSInteger pageIndex){ | ||
| 124 | + _role = pageIndex; | ||
| 125 | + if (pageIndex == 0) { | ||
| 126 | + _role = TaskRoleTypeAll; | ||
| 127 | + } | ||
| 160 | 128 | ||
| 161 | - } | ||
| 162 | - UIView *curView = [weakSelf getCurContentView]; | ||
| 163 | - if (![curView isKindOfClass:[ProjectTasksView class]]) { | ||
| 164 | - return; | ||
| 165 | - } | ||
| 166 | - ProjectTasksView *tasksView = (ProjectTasksView *)curView; | ||
| 167 | - [weakSelf assignmentWithlistView:tasksView]; | ||
| 168 | - [tasksView refresh]; | ||
| 129 | + NSString *title = weakSelf.myFliterMenu.items[pageIndex]; | ||
| 130 | + [weakSelf.titleBtn setTitle:[title substringToIndex:4] forState:UIControlStateNormal]; | ||
| 131 | + | ||
| 132 | + UIView *curView = [weakSelf getCurContentView]; | ||
| 133 | + if (![curView isKindOfClass:[ProjectTasksView class]]) { | ||
| 134 | + return; | ||
| 135 | + } | ||
| 136 | + ProjectTasksView *tasksView = (ProjectTasksView *)curView; | ||
| 137 | + [weakSelf assignmentWithlistView:tasksView]; | ||
| 138 | + [tasksView refresh]; | ||
| 139 | + [weakSelf resetTaskCount]; | ||
| 140 | + [weakSelf loadTasksLabels]; | ||
| 141 | + | ||
| 142 | + }; | ||
| 143 | + _myFliterMenu.closeBlock=^(){ | ||
| 144 | + [weakSelf.myFliterMenu dismissMenu]; | ||
| 145 | + }; | ||
| 169 | 146 | ||
| 170 | - }; | ||
| 171 | - | ||
| 172 | - | ||
| 147 | + _screenView = [ScreenView creat]; | ||
| 148 | + weakSelf.screenView.tastArray = @[[NSString stringWithFormat:@"进行中的(0)"], | ||
| 149 | + [NSString stringWithFormat:@"已完成的(0)"] | ||
| 150 | + ]; | ||
| 151 | + | ||
| 152 | + _screenView.selectBlock = ^(NSString *keyword, NSString *status, NSString *label) { | ||
| 153 | + [((UIButton *)weakSelf.screenBar.customView) setImage:[UIImage imageNamed:@"a1-hasScreen"] forState:UIControlStateNormal]; | ||
| 154 | + weakSelf.keyword = keyword; | ||
| 155 | + weakSelf.status = status; | ||
| 156 | + weakSelf.label = label; | ||
| 157 | + if (keyword == nil && status == nil && label == nil) { | ||
| 158 | + [((UIButton *)weakSelf.screenBar.customView) setImage:[UIImage imageNamed:@"a1-screen"] forState:UIControlStateNormal]; | ||
| 159 | + | ||
| 160 | + } | ||
| 161 | + UIView *curView = [weakSelf getCurContentView]; | ||
| 162 | + if (![curView isKindOfClass:[ProjectTasksView class]]) { | ||
| 163 | + return; | ||
| 164 | + } | ||
| 165 | + ProjectTasksView *tasksView = (ProjectTasksView *)curView; | ||
| 166 | + [weakSelf assignmentWithlistView:tasksView]; | ||
| 167 | + [tasksView refresh]; | ||
| 168 | + | ||
| 169 | + }; | ||
| 170 | + } | ||
| 173 | 171 | } | |
| 174 | 172 | - (void)didReceiveMemoryWarning | |
| 175 | 173 | { | |
@@ -220,7 +218,9 @@ - (void)requestForMyProject{ | |||
| 220 | 218 | } | |
| 221 | 219 | ||
| 222 | 220 | - (void)configNavBtnWithMyProject{ | |
| 223 | - // self.title = _myProject.name; | ||
| 221 | + if (self.curType != ProjectViewTypeTasks) { | ||
| 222 | + self.title = _myProject.name; | ||
| 223 | + } | ||
| 224 | 224 | } | |
| 225 | 225 | ||
| 226 | 226 | - (void)configRightBarButtonItemWithViewType:(ProjectViewType)viewType{ | |
@@ -758,18 +758,18 @@ - (void)assignmentWithlistView:(ProjectTasksView *)listView { | |||
| 758 | 758 | } | |
| 759 | 759 | ||
| 760 | 760 | - (void)resetTaskCount { | |
| 761 | + if (self.curType != ProjectViewTypeTasks) { | ||
| 762 | + return; | ||
| 763 | + } | ||
| 761 | 764 | __weak typeof(self) weakSelf = self; | |
| 762 | - | ||
| 763 | 765 | if (_userId != nil) { | |
| 764 | - | ||
| 765 | 766 | [[Coding_NetAPIManager sharedManager] request_tasks_searchWithUserId:_userId role:TaskRoleTypeAll project_id:_myProject.id.stringValue andBlock:^(id data, NSError *error) { | |
| 766 | 767 | NSInteger ownerDone = [data[@"data"][@"memberDone"] integerValue]; | |
| 767 | 768 | NSInteger ownerProcessing = [data[@"data"][@"memberProcessing"] integerValue]; | |
| 768 | 769 | NSInteger watcherDone = [data[@"data"][@"watcherDone"] integerValue]; | |
| 769 | 770 | NSInteger watcherProcessing = [data[@"data"][@"watcherProcessing"] integerValue]; | |
| 770 | 771 | NSInteger creatorDone = [data[@"data"][@"creatorDone"] integerValue]; | |
| 771 | 772 | NSInteger creatorProcessing = [data[@"data"][@"creatorProcessing"] integerValue]; | |
| 772 | - | ||
| 773 | 773 | weakSelf.myFliterMenu.items = @[[NSString stringWithFormat:@"所有任务(%ld)", ownerDone + ownerProcessing], | |
| 774 | 774 | [NSString stringWithFormat:@"我关注的(%ld)", watcherDone + watcherProcessing], | |
| 775 | 775 | [NSString stringWithFormat:@"我创建的(%ld)", creatorDone + creatorProcessing] | |
@@ -779,20 +779,16 @@ - (void)resetTaskCount { | |||
| 779 | 779 | [NSString stringWithFormat:@"已完成的(%ld)", ownerDone] | |
| 780 | 780 | ]; | |
| 781 | 781 | } | |
| 782 | - | ||
| 783 | 782 | if (_role == TaskRoleTypeWatcher) { | |
| 784 | 783 | weakSelf.screenView.tastArray = @[[NSString stringWithFormat:@"进行中的(%ld)", watcherProcessing], | |
| 785 | 784 | [NSString stringWithFormat:@"已完成的(%ld)", watcherDone] | |
| 786 | 785 | ]; | |
| 787 | 786 | } | |
| 788 | - | ||
| 789 | 787 | if (_role == TaskRoleTypeCreator) { | |
| 790 | 788 | weakSelf.screenView.tastArray = @[[NSString stringWithFormat:@"进行中的(%ld)", creatorProcessing], | |
| 791 | 789 | [NSString stringWithFormat:@"已完成的(%ld)", creatorDone] | |
| 792 | 790 | ]; | |
| 793 | 791 | } | |
| 794 | - | ||
| 795 | - | ||
| 796 | 792 | }]; | |
| 797 | 793 | ||
| 798 | 794 | } else { | |
@@ -812,15 +808,12 @@ - (void)resetTaskCount { | |||
| 812 | 808 | [NSString stringWithFormat:@"已完成的(%ld)", ownerDone] | |
| 813 | 809 | ]; | |
| 814 | 810 | } | |
| 815 | - | ||
| 816 | 811 | }]; | |
| 817 | - | ||
| 818 | 812 | [[Coding_NetAPIManager sharedManager] request_tasks_searchWithUserId:nil role:TaskRoleTypeWatcher project_id:_myProject.id.stringValue andBlock:^(id data, NSError *error) { | |
| 819 | 813 | NSInteger watcherDone = [data[@"data"][@"watcherDone"] integerValue]; | |
| 820 | 814 | NSInteger watcherProcessing = [data[@"data"][@"watcherProcessing"] integerValue]; | |
| 821 | 815 | NSInteger creatorDone = [data[@"data"][@"creatorDone"] integerValue]; | |
| 822 | 816 | NSInteger creatorProcessing = [data[@"data"][@"creatorProcessing"] integerValue]; | |
| 823 | - | ||
| 824 | 817 | weakSelf.myFliterMenu.items = @[weakSelf.myFliterMenu.items[0], | |
| 825 | 818 | [NSString stringWithFormat:@"我关注的(%ld)", watcherDone + watcherProcessing], | |
| 826 | 819 | [NSString stringWithFormat:@"我创建的(%ld)", creatorDone + creatorProcessing] | |
@@ -830,19 +823,19 @@ - (void)resetTaskCount { | |||
| 830 | 823 | [NSString stringWithFormat:@"已完成的(%ld)", watcherDone] | |
| 831 | 824 | ]; | |
| 832 | 825 | } | |
| 833 | - | ||
| 834 | 826 | if (_role == TaskRoleTypeCreator) { | |
| 835 | 827 | weakSelf.screenView.tastArray = @[[NSString stringWithFormat:@"进行中的(%ld)", creatorProcessing], | |
| 836 | 828 | [NSString stringWithFormat:@"已完成的(%ld)", creatorDone] | |
| 837 | 829 | ]; | |
| 838 | 830 | } | |
| 839 | - | ||
| 840 | 831 | }]; | |
| 841 | - | ||
| 842 | 832 | } | |
| 843 | 833 | } | |
| 844 | 834 | ||
| 845 | 835 | - (void)loadTasksLabels { | |
| 836 | + if (self.curType != ProjectViewTypeTasks) { | ||
| 837 | + return; | ||
| 838 | + } | ||
| 846 | 839 | __weak typeof(self) weakSelf = self; | |
| 847 | 840 | [[Coding_NetAPIManager sharedManager] request_projects_tasks_labelsWithRole:_role projectId:_myProject.id.stringValue projectName:_myProject.name memberId:_userId owner_user_name:_myProject.owner_user_name andBlock:^(id data, NSError *error) { | |
| 848 | 841 | if (data != nil) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments