|
|
@@ -21,10 +21,17 @@
|
|
|
#import "ImageUtil.h"
|
|
|
#import "SettingsViewController.h"
|
|
|
#import "AdminAuthPopupView.h"
|
|
|
+#import "DeleteAccountPopupView.h"
|
|
|
#import "ChangeNamePopupView.h"
|
|
|
#import "ConfirmPasswdPopupView.h"
|
|
|
#import "ChangeEmailPopupView.h"
|
|
|
|
|
|
+#define kiAccountCellHeight 434
|
|
|
+#define kiNotiCellHeight 103
|
|
|
+#define kiServiceCellHeight 143
|
|
|
+#define kiVersionCellHeight 103
|
|
|
+#define kiDeleteCellHeight 81
|
|
|
+#define kiPasswdCellHeight 135
|
|
|
|
|
|
@implementation SettingsAccountTableViewCell
|
|
|
|
|
|
@@ -32,9 +39,9 @@
|
|
|
}
|
|
|
|
|
|
- (void)didMoveToSuperview {
|
|
|
- [_lblChangeNickname setUnderLine:_lblChangeNickname.text];
|
|
|
- [_lblChangePassword setUnderLine:_lblChangePassword.text];
|
|
|
- [_lblChangeEmail setUnderLine:_lblChangeEmail.text];
|
|
|
+// [_lblChangeNickname setUnderLine:_lblChangeNickname.text];
|
|
|
+// [_lblChangePassword setUnderLine:_lblChangePassword.text];
|
|
|
+// [_lblChangeEmail setUnderLine:_lblChangeEmail.text];
|
|
|
|
|
|
_contraintEmailChangeBottom.constant = ![JDFacade facade].tmpEmailId || [[JDFacade facade].tmpEmailId isEmptyString] ? 18 : 45;
|
|
|
_lblEmailWaiting.hidden = ![JDFacade facade].tmpEmailId || [[JDFacade facade].tmpEmailId isEmptyString];
|
|
|
@@ -60,6 +67,10 @@
|
|
|
|
|
|
@end
|
|
|
|
|
|
+@implementation SettingsDeleteTableViewCell
|
|
|
+
|
|
|
+@end
|
|
|
+
|
|
|
@implementation SettingsPasswdTableViewCell
|
|
|
|
|
|
@end
|
|
|
@@ -165,7 +176,7 @@
|
|
|
|
|
|
#pragma mark - UITableView DataSource & Delegate
|
|
|
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
|
|
- return 5;
|
|
|
+ return 6;
|
|
|
}
|
|
|
|
|
|
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
|
|
@@ -176,18 +187,20 @@
|
|
|
CGFloat height = 0.0f;
|
|
|
|
|
|
if (indexPath.section == 0) {
|
|
|
- height = ![JDFacade facade].tmpEmailId || [[JDFacade facade].tmpEmailId isEmptyString] ? 331-27 : 331;
|
|
|
-
|
|
|
+// height = ![JDFacade facade].tmpEmailId || [[JDFacade facade].tmpEmailId isEmptyString] ? 331-27 : 331;
|
|
|
+ height = kiAccountCellHeight;
|
|
|
} else if (indexPath.section == 1) {//notification view
|
|
|
- height = [JDFacade facade].loginUser.isHomehubOnline ? 317-56 : 317;
|
|
|
+// height = [JDFacade facade].loginUser.isHomehubOnline ? 317-56 : 317;
|
|
|
+ height = kiNotiCellHeight;
|
|
|
} else if (indexPath.section == 2) {
|
|
|
- height = 181;
|
|
|
+ height = kiServiceCellHeight;
|
|
|
} else if (indexPath.section == 3) {
|
|
|
- height = 191;
|
|
|
+ height = kiVersionCellHeight;
|
|
|
} else if (indexPath.section == 4) {
|
|
|
- height = 135;
|
|
|
+ height = kiDeleteCellHeight;
|
|
|
+ } else if (indexPath.section == 5) {
|
|
|
+ height = kiPasswdCellHeight;
|
|
|
}
|
|
|
-
|
|
|
return height;
|
|
|
}
|
|
|
|
|
|
@@ -261,32 +274,32 @@
|
|
|
_chkHomeModeChange = tcell.chkHomeModeChange;
|
|
|
}
|
|
|
|
|
|
- if (!_chkHomeEmptyChange) {
|
|
|
- _chkHomeEmptyChange = tcell.chkHomeEmptyChange;
|
|
|
- }
|
|
|
+// if (!_chkHomeEmptyChange) {
|
|
|
+// _chkHomeEmptyChange = tcell.chkHomeEmptyChange;
|
|
|
+// }
|
|
|
|
|
|
if (!_isNotFirstLoading) {
|
|
|
_isNotFirstLoading = YES;
|
|
|
|
|
|
_chkHomeModeChange.checked = [[JDFacade facade].loginUser.pushTypeModeChgYn boolValue];
|
|
|
- _chkHomeEmptyChange.checked = [[JDFacade facade].loginUser.pushTypePrsncChgYn boolValue];
|
|
|
+// _chkHomeEmptyChange.checked = [[JDFacade facade].loginUser.pushTypePrsncChgYn boolValue];
|
|
|
}
|
|
|
|
|
|
if (![tcell.chkHomeModeChange actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
|
|
|
[tcell.chkHomeModeChange addTarget:self action:@selector(chkHomeModeChangeTouched:) forControlEvents:UIControlEventTouchUpInside];
|
|
|
}
|
|
|
|
|
|
- if (![tcell.chkHomeEmptyChange actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
|
|
|
- [tcell.chkHomeEmptyChange addTarget:self action:@selector(chkHomeEmptyChangeTouched:) forControlEvents:UIControlEventTouchUpInside];
|
|
|
- }
|
|
|
+// if (![tcell.chkHomeEmptyChange actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
|
|
|
+// [tcell.chkHomeEmptyChange addTarget:self action:@selector(chkHomeEmptyChangeTouched:) forControlEvents:UIControlEventTouchUpInside];
|
|
|
+// }
|
|
|
|
|
|
- tcell.homehubInfoView.hidden = [JDFacade facade].loginUser.isHomehubOnline;
|
|
|
- if (tcell.homehubInfoView.hidden) {
|
|
|
- tcell.constraintHomehubInfoViewHeight.constant = 0;
|
|
|
- } else {
|
|
|
- _chkHomeModeChange.enabled = NO;
|
|
|
- _chkHomeEmptyChange.enabled = NO;
|
|
|
- }
|
|
|
+// tcell.homehubInfoView.hidden = [JDFacade facade].loginUser.isHomehubOnline;
|
|
|
+// if (tcell.homehubInfoView.hidden) {
|
|
|
+// tcell.constraintHomehubInfoViewHeight.constant = 0;
|
|
|
+// } else {
|
|
|
+// _chkHomeModeChange.enabled = NO;
|
|
|
+// _chkHomeEmptyChange.enabled = NO;
|
|
|
+// }
|
|
|
|
|
|
cell = tcell;
|
|
|
} else if (indexPath.section == 2) {//service info cell
|
|
|
@@ -303,19 +316,26 @@
|
|
|
cell = tcell;
|
|
|
} else if (indexPath.section == 3) {//version info cell
|
|
|
SettingsVersionTableViewCell *tcell = [_tableView dequeueReusableCellWithIdentifier:@"VersionCellIdentifier"];
|
|
|
- tcell.lblVersion.text = [NSString stringWithFormat:@"버전 : %@", [CommonUtil applicationVersion]];
|
|
|
+ tcell.lblVersion.text = [NSString stringWithFormat:@"현재 버전 : %@", [CommonUtil applicationVersion]];
|
|
|
|
|
|
cell = tcell;
|
|
|
- } else if (indexPath.section == 4) {//Passwd info cell
|
|
|
- SettingsPasswdTableViewCell *tcell = [_tableView dequeueReusableCellWithIdentifier:@"PasswdCellIdentifier"];
|
|
|
+ } else if (indexPath.section == 4) {//Delete cell
|
|
|
+ SettingsDeleteTableViewCell *tcell = [_tableView dequeueReusableCellWithIdentifier:@"DeleteCellIdentifier"];
|
|
|
|
|
|
+ if (![tcell.btnDelete actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
|
|
|
+ [tcell.btnDelete addTarget:self action:@selector(btnDeleteTouched:) forControlEvents:UIControlEventTouchUpInside];
|
|
|
+ }
|
|
|
+
|
|
|
+ cell = tcell;
|
|
|
+ } else if (indexPath.section == 5) {//Passwd info cell
|
|
|
+ SettingsPasswdTableViewCell *tcell = [_tableView dequeueReusableCellWithIdentifier:@"PasswdCellIdentifier"];
|
|
|
+
|
|
|
if (![tcell.btnPassword actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
|
|
|
[tcell.btnPassword addTarget:self action:@selector(btnPasswordTouched:) forControlEvents:UIControlEventTouchUpInside];
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
cell = tcell;
|
|
|
}
|
|
|
-
|
|
|
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
|
|
|
|
|
return cell;
|
|
|
@@ -386,11 +406,11 @@
|
|
|
[self requestUpdatePushSetting:parameter];
|
|
|
}
|
|
|
|
|
|
-- (void)chkHomeEmptyChangeTouched:(id)sender {
|
|
|
-
|
|
|
- NSDictionary *parameter = @{@"push_type_prsnc_chg_yn" : _chkHomeEmptyChange.checked ? ksYES : ksNO};
|
|
|
- [self requestUpdatePushSetting:parameter];
|
|
|
-}
|
|
|
+//- (void)chkHomeEmptyChangeTouched:(id)sender {
|
|
|
+//
|
|
|
+// NSDictionary *parameter = @{@"push_type_prsnc_chg_yn" : _chkHomeEmptyChange.checked ? ksYES : ksNO};
|
|
|
+// [self requestUpdatePushSetting:parameter];
|
|
|
+//}
|
|
|
|
|
|
//service info cell's action
|
|
|
|
|
|
@@ -408,10 +428,15 @@
|
|
|
}
|
|
|
|
|
|
//service passwd cell's action
|
|
|
-- (void)btnPasswordTouched:(id)sender {//셋탑 설정
|
|
|
+- (void)btnPasswordTouched:(id)sender {// 셋탑 설정
|
|
|
AdminAuthPopupView *popup = [[AdminAuthPopupView alloc] initFromNib];
|
|
|
[popup show];
|
|
|
}
|
|
|
+
|
|
|
+- (void)btnDeleteTouched:(id)sender { // 계정 삭제
|
|
|
+ DeleteAccountPopupView *popup = [[DeleteAccountPopupView alloc]initFromNib];
|
|
|
+ [popup show];
|
|
|
+}
|
|
|
|
|
|
- (IBAction)btnCloseTouched:(id)sender {
|
|
|
[self dismissViewControllerAnimated:YES completion:nil];
|