Skip to content

Commit 22e4b25

Browse files
committed
MRPR
1 parent adcf5f3 commit 22e4b25

File tree

91 files changed

+265
-143
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+265
-143
lines changed

Coding_iOS.xcodeproj/project.pbxproj

Lines changed: 76 additions & 8 deletions
Large diffs are not rendered by default.

Coding_iOS/.DS_Store

0 Bytes
Binary file not shown.

Coding_iOS/Controllers/AddMDCommentViewController.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ - (void)saveBtnClicked{
175175
_contentStr = [_contentStr aliasedString];
176176
[_requestParams setObject:_contentStr forKey:@"content"];
177177

178+
[NSObject showHUDQueryStr:@"正在保存..."];
178179
[[Coding_NetAPIManager sharedManager] request_PostCommentWithPath:_requestPath params:_requestParams andBlock:^(id data, NSError *error) {
180+
[NSObject hideHUDQuery];
179181
if (data) {
180182
if (self.completeBlock) {
181183
self.completeBlock(data);

Coding_iOS/Controllers/AddReviewerViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
134134
User* cellReviewer = self.allUsers[indexPath.row];
135135
cell.tintColor = kColorBrandGreen;
136136
[cell initCellWithUsers:cellReviewer];
137-
[tableView addLineforPlainCell:cell forRowAtIndexPath:indexPath withLeftSpace:60];
137+
[tableView addLineforPlainCell:cell forRowAtIndexPath:indexPath withLeftSpace:70];
138138
NSInteger index = indexPath.row;
139139
NSNumber* userState = self.selectUsers[index];
140140
// cell.selectionStyle = UITableViewCellSelectionStyleNone;

Coding_iOS/Controllers/DynamicCommentCell.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
6565
}
6666
if (!_contentLabel) {
6767
_contentLabel = [[UITTTAttributedLabel alloc] initWithFrame:CGRectMake(kTaskCommentCell_LeftContentPading, curBottomY, kTaskCommentCell_ContentWidth, 30)];
68-
_contentLabel.textColor = kColor222;
68+
_contentLabel.textColor = kColorDark3;
6969
_contentLabel.font = kTaskCommentCell_FontContent;
7070
_contentLabel.linkAttributes = kLinkAttributes;
7171
_contentLabel.activeLinkAttributes = kLinkAttributesActive;
@@ -74,7 +74,7 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
7474
}
7575
if (!_timeLabel) {
7676
_timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(kTaskCommentCell_LeftContentPading, 0, kTaskCommentCell_ContentWidth, 20)];
77-
_timeLabel.textColor = kColor999;
77+
_timeLabel.textColor = kColorDark7;
7878
_timeLabel.font = [UIFont systemFontOfSize:12];
7979
[self.contentView addSubview:_timeLabel];
8080
}

Coding_iOS/Controllers/EditCodeViewController.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,9 @@ - (void)saveBtnClicked{
176176
[NSObject showHudTipStr:@"文件无改动"];
177177
return;
178178
}
179+
[NSObject showHUDQueryStr:@"正在保存..."];
179180
[[Coding_NetAPIManager sharedManager] request_EditCodeFile:_myCodeFile withPro:_myProject andBlock:^(id data, NSError *error) {
181+
[NSObject hideHUDQuery];
180182
if (data) {
181183
if (self.savedSucessBlock) {
182184
self.savedSucessBlock();

Coding_iOS/Controllers/FileEditViewController.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,9 @@ - (void)saveBtnClicked{
207207
if ([self fileIsMD]) {
208208
edit_content = [edit_content aliasedString];
209209
}
210+
[NSObject showHUDQueryStr:@"正在保存..."];
210211
[[Coding_NetAPIManager sharedManager] request_EditFile:_curFile withContent:edit_content andBlock:^(id data, NSError *error) {
212+
[NSObject hideHUDQuery];
211213
if (data) {
212214
if (self.completeBlock) {
213215
self.completeBlock(data);

Coding_iOS/Controllers/MRDetailViewController.m

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010

11-
#define kMRPRDetailViewController_BottomViewHeight 49.0
11+
#define kMRPRDetailViewController_BottomViewHeight 56.0
1212
#import "MRDetailViewController.h"
1313
#import "PRDetailViewController.h"
1414
#import "ReviewerListController.h"
@@ -147,7 +147,7 @@ - (void)configBottomView{
147147
NSArray *buttonArray;
148148
if (canAction && canCancel) {//三个按钮
149149
buttonArray = @[ [self buttonWithType:MRPRActionCancel],
150-
[self buttonWithType:MRPRActionRefuse],
150+
// [self buttonWithType:MRPRActionRefuse],
151151
[self buttonWithType:MRPRActionAccept]];
152152
} else if (canAction && !canCancel){//两个按钮
153153
if(canAuthorization) {
@@ -171,7 +171,7 @@ - (void)configBottomView{
171171
buttonArray = nil;
172172
}
173173
if (buttonArray.count > 0) {
174-
CGFloat buttonHeight = 29;
174+
CGFloat buttonHeight = 36;
175175
CGFloat padding = 15;
176176
CGFloat buttonWidth = ((kScreen_Width - 2*kPaddingLeftWidth) - padding* (buttonArray.count -1))/buttonArray.count;
177177
CGFloat buttonY = (kMRPRDetailViewController_BottomViewHeight - buttonHeight)/2;
@@ -209,11 +209,9 @@ - (void)updateActivityList{
209209

210210
- (void)updateProjectStatus {
211211
__weak typeof(self) weakSelf = self;
212-
[[Coding_NetAPIManager sharedManager] request_MRPRPreInfo_WithObj:_curMRPR andBlock:^(MRPRBaseInfo *data, NSError *error) {
213-
[weakSelf.view endLoading];
214-
[weakSelf.myRefreshControl endRefreshing];
212+
[[Coding_NetAPIManager sharedManager] request_MRPRPreInfo_WithObj:_curMRPR andBlock:^(MRPRPreInfo *data, NSError *error) {
215213
if (data) {
216-
weakSelf.curPreMRPRInfo = (MRPRPreInfo*)data;
214+
weakSelf.curPreMRPRInfo = data;
217215
[weakSelf.myTableView reloadData];
218216
[weakSelf configBottomView];
219217
}
@@ -261,16 +259,13 @@ - (void)refresh{
261259
}];
262260
//项目成员
263261
[[Coding_NetAPIManager sharedManager] request_ProjectMembers_WithObj:self.curProject andBlock:^(id data, NSError *error) {
264-
[weakSelf.view endLoading];
265262
if (data) {
266263
NSMutableArray* projectUsers = data;
267264
weakSelf.projectUsers = projectUsers;
268265
}
269266
}];
270267
//MR 评审者
271268
[[Coding_NetAPIManager sharedManager] request_MRReviewerInfo_WithObj:_curMRPR andBlock:^(ReviewersInfo *data, NSError *error) {
272-
[weakSelf.view endLoading];
273-
[weakSelf.myRefreshControl endRefreshing];
274269
if (data) {
275270
weakSelf.curReviewersInfo = data;
276271
}
@@ -309,29 +304,28 @@ - (UIButton *)buttonWithType:(MRPRAction)actionType{
309304
curButton.layer.cornerRadius = 2.0;
310305
curButton.tag = actionType;
311306
[curButton addTarget:self action:@selector(actionMRPR:) forControlEvents:UIControlEventTouchUpInside];
312-
[curButton.titleLabel setFont:[UIFont systemFontOfSize:13]];
307+
[curButton.titleLabel setFont:[UIFont systemFontOfSize:15]];
313308
NSString *title, *colorStr;
314309
if (actionType == MRPRActionAccept) {
315310
title = @"合并";
316-
colorStr = @"0x4E90BF";
311+
colorStr = @"0x425063";
317312
if (_curMRPRInfo.mrpr.status == MRPRStatusCannotMerge) {
318313
curButton.alpha = 0.5;
319314
}
320315
} else if (actionType == MRPRActionRefuse){
321316
title = @"拒绝";
322-
colorStr = @"0xE15957";
317+
colorStr = @"0xF56061";
323318
} else if (actionType == MRPRActionCancel){
324319
title = @"取消";
325-
colorStr = @"0xF8F8F8";
326-
[curButton doBorderWidth:0.5 color:[UIColor colorWithHexString:@"0xB5B5B5"] cornerRadius:2.0];
320+
colorStr = @"0xD8DDE4";
327321
} else if(actionType == MRPRActionAuthorization) {
328322
title = @"授权";
329-
colorStr = @"0x38BD78";
323+
colorStr = @"0x4F95E8";
330324
} else if(actionType == MRPRActionCancelAuthorization) {
331325
title = @"取消授权";
332-
colorStr = @"0x38BD78";
326+
colorStr = @"0x4F95E8";
333327
}
334-
[curButton setTitleColor:[UIColor colorWithHexString:(actionType == MRPRActionCancel? @"0x222222": @"0xffffff")] forState:UIControlStateNormal];
328+
[curButton setTitleColor:[UIColor colorWithHexString:(actionType == MRPRActionCancel? @"0x323A45": @"0xFFFFFF")] forState:UIControlStateNormal];
335329
[curButton setTitle:title forState:UIControlStateNormal];
336330
[curButton setBackgroundColor:[UIColor colorWithHexString:colorStr]];
337331
return curButton;
@@ -434,7 +428,7 @@ - (void)cancelAuthorizationMRPR{
434428

435429
#pragma mark TableM Footer Header
436430
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
437-
return 20.0;
431+
return 15.0;
438432
}
439433
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
440434
return 0.5;
@@ -528,7 +522,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
528522
[cell setImageStr:@"PRReviewer" isowner:NO hasLikeMr:self.isLike];
529523

530524
}
531-
if (self.curMRPRInfo.mrpr.status == MRPRStatusAccepted || self.curMRPRInfo.mrpr.status == MRPRStatusRefused || self.curMRPRInfo.mrpr.status == MRPRStatusRefused) {
525+
if (self.curMRPRInfo.mrpr.status == MRPRStatusAccepted || self.curMRPRInfo.mrpr.status == MRPRStatusRefused) {
532526
[cell cantReviewer];
533527
}
534528
cell.rightSideClickedBlock = ^(){
@@ -577,7 +571,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
577571
}
578572

579573
- (void)jiaYi{
580-
if (self.curMRPRInfo.mrpr.status == MRPRStatusAccepted || self.curMRPRInfo.mrpr.status == MRPRStatusRefused || self.curMRPRInfo.mrpr.status == MRPRStatusRefused) {
574+
if (self.curMRPRInfo.mrpr.status == MRPRStatusAccepted || self.curMRPRInfo.mrpr.status == MRPRStatusRefused) {
581575
return;
582576
}
583577
if([self CurrentUserIsOwer]) {
@@ -627,7 +621,7 @@ - (bool)currentUserCanAddMember {
627621
return NO;
628622
}
629623
}
630-
if (self.curMRPRInfo.mrpr.status == MRPRStatusAccepted || self.curMRPRInfo.mrpr.status == MRPRStatusRefused || self.curMRPRInfo.mrpr.status == MRPRStatusRefused) {
624+
if (self.curMRPRInfo.mrpr.status == MRPRStatusAccepted || self.curMRPRInfo.mrpr.status == MRPRStatusRefused) {
631625
return NO;
632626
}
633627
return YES;

Coding_iOS/Controllers/MRPRAcceptViewController.m

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,23 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
141141

142142
- (UIView*)tableFooterView{
143143
UIView *footerV = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreen_Width, 90)];
144-
_mergeBtn = [UIButton buttonWithStyle:StrapInfoStyle andTitle:@"确认合并" andFrame:CGRectMake(10, 0, kScreen_Width-10*2, 44) target:self action:@selector(mergeBtnClicked:)];
145-
[_mergeBtn setCenter:footerV.center];
144+
_mergeBtn = ({
145+
UIButton *curButton = [UIButton new];
146+
curButton.cornerRadius = 4.0;
147+
[curButton addTarget:self action:@selector(mergeBtnClicked:) forControlEvents:UIControlEventTouchUpInside];
148+
[curButton.titleLabel setFont:[UIFont systemFontOfSize:17]];
149+
[curButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
150+
[curButton setTitle:@"确认合并" forState:UIControlStateNormal];
151+
[curButton setBackgroundColor:[UIColor colorWithHexString:@"0x425063"]];
152+
curButton;
153+
});
146154
[footerV addSubview:_mergeBtn];
147-
return footerV;
155+
[_mergeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
156+
make.left.offset(kPaddingLeftWidth);
157+
make.right.offset(-kPaddingLeftWidth);
158+
make.centerY.equalTo(footerV);
159+
make.height.mas_equalTo(44);
160+
}]; return footerV;
148161
}
149162

150163
- (void)mergeBtnClicked:(id)sender{

Coding_iOS/Controllers/MeSetting/SettingSkillsViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ - (void)addBtnClicked{
119119
break;
120120
}
121121
}
122-
addSkill.level = selectedIndex.lastObject;
122+
addSkill.level = @([selectedIndex.lastObject integerValue] + 1);
123123
[weakSelf.skills addObject:addSkill];
124124
[weakSelf.tagsView reloadData];
125125
} cancelBlock:nil origin:self.view];

Coding_iOS/Controllers/PRDetailViewController.m

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Created by Ease on 15/6/1.
66
// Copyright (c) 2015年 Coding. All rights reserved.
77
//
8-
#define kMRPRDetailViewController_BottomViewHeight 49.0
8+
#define kMRPRDetailViewController_BottomViewHeight 56.0
99
#import "PRDetailViewController.h"
1010
#import "Coding_NetAPIManager.h"
1111
#import "FunctionTipsManager.h"
@@ -99,7 +99,7 @@ - (void)configBottomView{
9999
NSArray *buttonArray;
100100
if (canAction && canCancel) {//三个按钮
101101
buttonArray = @[[self buttonWithType:MRPRActionAccept],
102-
[self buttonWithType:MRPRActionRefuse],
102+
// [self buttonWithType:MRPRActionRefuse],
103103
[self buttonWithType:MRPRActionCancel]];
104104
}else if (canAction && !canCancel){//两个按钮
105105
buttonArray = @[[self buttonWithType:MRPRActionAccept],
@@ -110,7 +110,7 @@ - (void)configBottomView{
110110
buttonArray = nil;
111111
}
112112
if (buttonArray.count > 0) {
113-
CGFloat buttonHeight = 29;
113+
CGFloat buttonHeight = 36;
114114
CGFloat padding = 15;
115115
CGFloat buttonWidth = ((kScreen_Width - 2*kPaddingLeftWidth) - padding* (buttonArray.count -1))/buttonArray.count;
116116
CGFloat buttonY = (kMRPRDetailViewController_BottomViewHeight - buttonHeight)/2;
@@ -170,24 +170,22 @@ - (UIButton *)buttonWithType:(MRPRAction)actionType{
170170
curButton.layer.cornerRadius = 2.0;
171171
curButton.tag = actionType;
172172
[curButton addTarget:self action:@selector(actionMRPR:) forControlEvents:UIControlEventTouchUpInside];
173-
[curButton.titleLabel setFont:[UIFont systemFontOfSize:13]];
174-
173+
[curButton.titleLabel setFont:[UIFont systemFontOfSize:15]];
175174
NSString *title, *colorStr;
176175
if (actionType == MRPRActionAccept) {
177176
title = @"合并";
178-
colorStr = @"0x4E90BF";
177+
colorStr = @"0x425063";
179178
if (_curMRPRInfo.mrpr.status == MRPRStatusCannotMerge) {
180179
curButton.alpha = 0.5;
181180
}
182-
}else if (actionType == MRPRActionRefuse){
181+
} else if (actionType == MRPRActionRefuse){
183182
title = @"拒绝";
184-
colorStr = @"0xE15957";
185-
}else if (actionType == MRPRActionCancel){
183+
colorStr = @"0xF56061";
184+
} else if (actionType == MRPRActionCancel){
186185
title = @"取消";
187-
colorStr = @"0xF8F8F8";
188-
[curButton doBorderWidth:0.5 color:[UIColor colorWithHexString:@"0xB5B5B5"] cornerRadius:2.0];
186+
colorStr = @"0xD8DDE4";
189187
}
190-
[curButton setTitleColor:[UIColor colorWithHexString:(actionType == MRPRActionCancel? @"0x222222": @"0xffffff")] forState:UIControlStateNormal];
188+
[curButton setTitleColor:[UIColor colorWithHexString:(actionType == MRPRActionCancel? @"0x323A45": @"0xFFFFFF")] forState:UIControlStateNormal];
191189
[curButton setTitle:title forState:UIControlStateNormal];
192190
[curButton setBackgroundColor:[UIColor colorWithHexString:colorStr]];
193191
return curButton;
@@ -248,7 +246,7 @@ - (void)cancelMRPR{
248246
}
249247
#pragma mark TableM Footer Header
250248
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
251-
return 20.0;
249+
return 15.0;
252250
}
253251
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
254252
return 0.5;

Coding_iOS/Controllers/ReviewCell.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ @implementation ReviewCell
1212

1313
- (void)awakeFromNib{
1414
[super awakeFromNib];
15-
self.userIcon.frame = CGRectMake(12, 5, 33, 33);
15+
// self.userIcon.frame = CGRectMake(12, 5, 33, 33);
1616
}
1717

1818
- (void)initCellWithReviewer:(User*)reviewer
@@ -29,7 +29,7 @@ - (void)initCellWithReviewer:(User*)reviewer
2929
} else {
3030
[self.reviewIcon setHidden:YES];
3131
self.userState.text = @"未评审";
32-
self.userState.textColor = kColor999;
32+
self.userState.textColor = kColorDark7;
3333
}
3434

3535
}
@@ -58,7 +58,7 @@ - (void)initCellWithUsers:(User*)user{
5858
}
5959

6060
+ (CGFloat)cellHeight{
61-
return 44.0;
61+
return 60.0;
6262
}
6363

6464
@end

0 commit comments

Comments
 (0)