SettingsViewController.m 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553
  1. //
  2. // SettingsViewController.m
  3. // kneet2
  4. //
  5. // Created by Jason Lee on 10/8/15.
  6. // Copyright (c) 2015 ntels. All rights reserved.
  7. //
  8. #import "JDObject.h"
  9. #import "RequestHandler.h"
  10. #import "CustomLabel.h"
  11. #import "CustomButton.h"
  12. #import "CustomCheckBox.h"
  13. #import "UIButton+WebCache.h"
  14. #import "CustomTableView.h"
  15. #import "WebBrowseViewController.h"
  16. #import "PwdPopupView.h"
  17. #import "ImageUtil.h"
  18. #import "SettingsViewController.h"
  19. #import "AdminAuthPopupView.h"
  20. #import "DeleteAccountPopupView.h"
  21. #import "ChangeNamePopupView.h"
  22. #import "ConfirmPasswdPopupView.h"
  23. #import "ChangeEmailPopupView.h"
  24. #import "ChangePhotoPopupView.h"
  25. #import "ManagementViewController.h"
  26. #define kiAccountCellHeight 555
  27. #define kiNotiCellHeight 137
  28. #define kiServiceCellHeight 143
  29. #define kiVersionCellHeight 103
  30. #define kiDeleteCellHeight 82
  31. //#define kiPasswdCellHeight 135
  32. #define kiPhotoAlbum 0
  33. #define kiPhotoCamera 1
  34. #define kiPhotoDelete 2
  35. @implementation SettingsAccountTableViewCell
  36. - (void)awakeFromNib {
  37. }
  38. - (void)didMoveToSuperview {
  39. // [_lblChangeNickname setUnderLine:_lblChangeNickname.text];
  40. // [_lblChangePassword setUnderLine:_lblChangePassword.text];
  41. // [_lblChangeEmail setUnderLine:_lblChangeEmail.text];
  42. // [_lblChangePassword setHidden:NO];
  43. [_lblChangeEmail setHidden:YES];
  44. [_lblEmailWaiting setHidden:YES];
  45. _btnProfile.layer.frame = CGRectMake(0, 0, _btnProfile.frame.size.width, _btnProfile.frame.size.width);
  46. _btnProfile.layer.masksToBounds = YES;
  47. _btnProfile.layer.cornerRadius = _btnProfile.frame.size.width/2;
  48. _contraintEmailChangeBottom.constant = ![JDFacade facade].tmpEmailId || [[JDFacade facade].tmpEmailId isEmptyString] ? 18 : 45;
  49. _lblEmailWaiting.hidden = ![JDFacade facade].tmpEmailId || [[JDFacade facade].tmpEmailId isEmptyString];
  50. [self layoutIfNeeded];
  51. }
  52. @end
  53. @implementation SettingsNotificationTableViewCell
  54. @end
  55. @implementation SettingsServiceTableViewCell
  56. - (void)didMoveToSuperview {
  57. }
  58. @end
  59. @implementation SettingsVersionTableViewCell
  60. @end
  61. @implementation SettingsDeleteTableViewCell
  62. @end
  63. //@implementation SettingsPasswdTableViewCell
  64. //
  65. //@end
  66. @interface SettingsViewController () <UITableViewDataSource, UITableViewDelegate, ImageUtilDelegate,changePhotoDelegate> {
  67. CustomCheckBox *_chkAutoLogin, *_chkHomeModeChange, *_chkHomeEmptyChange;
  68. CustomButton *_btnProfile;
  69. BOOL _isNotFirstLoading;
  70. DashboardModel *_dashboard;
  71. ImageUtil *_imageUtil;
  72. }
  73. @end
  74. #pragma mark - Class Definition
  75. @implementation SettingsViewController
  76. @synthesize dashboardModel;
  77. - (void)viewDidLoad {
  78. [super viewDidLoad];
  79. // Do any additional setup after loading the view.
  80. [self initUI];
  81. [self prepareViewDidLoad];
  82. }
  83. - (void)viewWillAppear:(BOOL)animated {
  84. [_tableView reloadData];
  85. [super viewWillAppear:animated];
  86. }
  87. - (void)initUI {
  88. [self.navigationController.navigationBar setHidden:YES];
  89. self.navigationController.interactivePopGestureRecognizer.enabled = NO;
  90. //set tableview option
  91. [self initTableViewAsDefaultStyle:_tableView];
  92. }
  93. - (void)prepareViewDidLoad {
  94. }
  95. #pragma mark - Main Logic
  96. - (void)requestUpdatePushSetting:(NSDictionary *)parameter {
  97. //parameters
  98. NSString *path = [NSString stringWithFormat:API_POST_PUSH_SETTINGS];
  99. [[RequestHandler handler] sendAsyncPostRequestAPIPath:path parameters:parameter modelClass:[JDJSONModel class] completion:^(id responseObject) {
  100. NSString *msg = nil;
  101. if ([parameter hasKey:@"push_type_mode_chg_yn"]) {
  102. BOOL isNotifyHomeModeChange = [[parameter valueForKey:@"push_type_mode_chg_yn"] boolValue];
  103. if ([[JDFacade facade].loginUser.pushTypeModeChgYn boolValue] != isNotifyHomeModeChange) {
  104. msg = isNotifyHomeModeChange ? @"지금부터 홈모드가 바뀔 때\n푸시 알림을 받습니다" : @"홈모드 변경 알림을 해제합니다";
  105. [JDFacade facade].loginUser.pushTypeModeChgYn = [parameter valueForKey:@"push_type_mode_chg_yn"];
  106. }
  107. } else if ([parameter hasKey:@"push_type_prsnc_chg_yn"]) {//와이파이,
  108. BOOL isNotifyExecutingRules = [[parameter valueForKey:@"push_type_prsnc_chg_yn"] boolValue];
  109. if ([[JDFacade facade].loginUser.pushTypePrsncChgYn boolValue] != isNotifyExecutingRules) {
  110. msg = isNotifyExecutingRules ? @"지금부터 집이 빌 때\n푸시 알림을 받습니다" : @"빈 집 알림을 해제합니다";
  111. [JDFacade facade].loginUser.pushTypePrsncChgYn = [parameter valueForKey:@"push_type_prsnc_chg_yn"];
  112. }
  113. }
  114. [[JDFacade facade] toast:msg];
  115. } failure:^(id errorObject) {
  116. JDErrorModel *error = (JDErrorModel *)errorObject;
  117. [[JDFacade facade] alert:error.errorMessage];
  118. }];
  119. }
  120. - (void)requestUpdateProfileImage:(UIImage *)profileImage {
  121. NSDictionary *parameter;
  122. BOOL imageIsNull = NO;
  123. if (profileImage == nil) { // 사진 삭제
  124. parameter = @{@"image_file": @""};
  125. imageIsNull = YES;
  126. } else {
  127. parameter = @{@"image_file": profileImage};
  128. imageIsNull = NO;
  129. }
  130. //parameters
  131. // NSDictionary *parameter = @{@"image_file": profileImage};
  132. // NSString *path = [NSString stringWithFormat:API_POST_MEMBER_UPDATE_IMAGE];
  133. NSString *path = [[JDFacade facade] getUrlWithCustGroupIDAndMemberID:API_POST_MEMBER_UPDATE_IMAGE];
  134. [[RequestHandler handler] sendAsyncPostRequestAPIPath:path parameters:parameter modelClass:[LoginModel class] completion:^(id responseObject) {
  135. if (!responseObject) {//응답결과가 잘못되었거나 없을 경우,
  136. return;
  137. }
  138. LoginModel *response = (LoginModel *) responseObject;
  139. NSLog(@"responseObject : %@",responseObject);
  140. if (response) {//API 성공
  141. if (!imageIsNull) {
  142. [_btnProfile sd_setBackgroundImageWithURL:[NSURL URLWithString:response.imageFile] forState:UIControlStateNormal placeholderImage:nil options:SDWebImageRefreshCached];
  143. [JDFacade facade].loginUser.profileImage = response.imageFile;
  144. [[JDFacade facade] toast:@"프로필 이미지를 변경했습니다"];
  145. } else {
  146. NSString *msg = @"사진이 삭제 되었습니다.";
  147. [[JDFacade facade] alertTitle:@"알림" message: msg completionHander:nil];
  148. [_btnProfile sd_setBackgroundImageWithURL:[NSURL URLWithString:response.imageFile] forState:UIControlStateNormal placeholderImage:nil options:SDWebImageRefreshCached];
  149. [JDFacade facade].loginUser.profileImage = response.imageFile;
  150. }
  151. }
  152. } failure:^(id errorObject) {
  153. JDErrorModel *error = (JDErrorModel *)errorObject;
  154. [[JDFacade facade] alert:error.errorMessage];
  155. }];
  156. }
  157. #pragma mark - UITableView DataSource & Delegate
  158. #pragma mark - UITableView DataSource & Delegate
  159. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
  160. return 5;
  161. }
  162. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  163. return 1;
  164. }
  165. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
  166. CGFloat height = 0.0f;
  167. if (indexPath.section == 0) {
  168. // height = ![JDFacade facade].tmpEmailId || [[JDFacade facade].tmpEmailId isEmptyString] ? 331-27 : 331;
  169. height = kiAccountCellHeight;
  170. } else if (indexPath.section == 1) {//notification view
  171. // height = [JDFacade facade].loginUser.isHomehubOnline ? 317-56 : 317;
  172. height = kiNotiCellHeight;
  173. } else if (indexPath.section == 2) {
  174. height = kiServiceCellHeight;
  175. } else if (indexPath.section == 3) {
  176. height = kiVersionCellHeight;
  177. } else if (indexPath.section == 4) {
  178. height = kiDeleteCellHeight;
  179. }
  180. // else if (indexPath.section == 5) {
  181. // height = kiPasswdCellHeight;
  182. // }
  183. return height;
  184. }
  185. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  186. UITableViewCell *cell = nil;//[super tableView:tableView cellForRowAtIndexPath:indexPath];
  187. if (indexPath.section == 0) {//account cell
  188. SettingsAccountTableViewCell *tcell = [_tableView dequeueReusableCellWithIdentifier:@"AccountCellIdentifier"];
  189. tcell.lblNickname.text = [[JDFacade facade].loginUser.nickname isEqualToString:@""] ? @"사용자 이름을 등록해주세요.":[JDFacade facade].loginUser.nickname;
  190. tcell.lblEmail.text = [JDFacade facade].loginUser.memberId;
  191. tcell.lblQuiz.text = [JDFacade facade].loginUser.quiz;
  192. if (!_btnProfile) {
  193. _btnProfile = tcell.btnProfile;
  194. }
  195. [_btnProfile sd_setBackgroundImageWithURL:[NSURL URLWithString:[JDFacade facade].loginUser.profileImage] forState:UIControlStateNormal placeholderImage:nil options:SDWebImageRefreshCached];
  196. tcell.lblPhoneNum.text = [CommonUtil formattedPhoneNumber:[JDFacade facade].loginUser.phone];
  197. //set checkbox
  198. if (!_chkAutoLogin) {
  199. _chkAutoLogin = tcell.chkAutoLogin;
  200. _chkAutoLogin.checked = [[[JDFacade facade] objectForKeyFromUserDefaults:USDEF_APP_AUTO_LOGIN] boolValue];
  201. }
  202. //set checkbox action
  203. if (![_chkAutoLogin actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
  204. [_chkAutoLogin addTarget:self action:@selector(chkAutoLoginTouched:) forControlEvents:UIControlEventTouchUpInside];
  205. }
  206. //set label action
  207. if (!tcell.lblChangeNickname.touchHandler) {
  208. [tcell.lblChangeNickname addTouchEventHandler:^(id label) {
  209. [self lblChangeNicknameTouched];
  210. }];
  211. }
  212. //set label action
  213. if (!tcell.lblChangePassword.touchHandler) {
  214. [tcell.lblChangePassword addTouchEventHandler:^(id label) {
  215. [self lblChangePasswordTouched];
  216. }];
  217. }
  218. //set email change action
  219. if (!tcell.lblChangeEmail.touchHandler) {
  220. [tcell.lblChangeEmail addTouchEventHandler:^(id label) {
  221. [self lblChangeEmailTouched];
  222. }];
  223. }
  224. //set Phone Number change action
  225. if (![tcell.btnChangeNum actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {//set button target
  226. [tcell.btnChangeNum addTarget:self action:@selector(btnChangeNumTouched:) forControlEvents:UIControlEventTouchUpInside];
  227. }
  228. if (![tcell.btnLogout actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {//set button target
  229. [tcell.btnLogout addTarget:self action:@selector(btnLogoutTouched:) forControlEvents:UIControlEventTouchUpInside];
  230. }
  231. if (![tcell.btnProfile actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {//set button target
  232. [tcell.btnProfile addTarget:self action:@selector(btnProfileTouched:) forControlEvents:UIControlEventTouchUpInside];
  233. }
  234. if (![tcell.btnProfileSetting actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
  235. [tcell.btnProfileSetting addTarget:self action:@selector(btnProfileTouched:) forControlEvents:UIControlEventTouchUpInside];
  236. }
  237. cell = tcell;
  238. } else if (indexPath.section == 1) {//notification cell
  239. SettingsNotificationTableViewCell *tcell = [_tableView dequeueReusableCellWithIdentifier:@"NotificationCellIdentifier"];
  240. if ([JDFacade facade].loginUser.level < 90) {
  241. tcell.viewThingsSet.hidden = YES;
  242. } else {
  243. tcell.viewThingsSet.hidden = NO;
  244. }
  245. if (!_chkHomeModeChange) {
  246. _chkHomeModeChange = tcell.chkHomeModeChange;
  247. }
  248. // if (!_chkHomeEmptyChange) {
  249. // _chkHomeEmptyChange = tcell.chkHomeEmptyChange;
  250. // }
  251. if (!_isNotFirstLoading) {
  252. _isNotFirstLoading = YES;
  253. _chkHomeModeChange.checked = [[JDFacade facade].loginUser.pushTypeModeChgYn boolValue];
  254. // _chkHomeEmptyChange.checked = [[JDFacade facade].loginUser.pushTypePrsncChgYn boolValue];
  255. }
  256. if (![tcell.chkHomeModeChange actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
  257. [tcell.chkHomeModeChange addTarget:self action:@selector(chkHomeModeChangeTouched:) forControlEvents:UIControlEventTouchUpInside];
  258. }
  259. if (![tcell.btnThingsSet actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
  260. [tcell.btnThingsSet addTarget:self action:@selector(btnThingsSetTouched:) forControlEvents:UIControlEventTouchUpInside];
  261. }
  262. // if (![tcell.chkHomeEmptyChange actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
  263. // [tcell.chkHomeEmptyChange addTarget:self action:@selector(chkHomeEmptyChangeTouched:) forControlEvents:UIControlEventTouchUpInside];
  264. // }
  265. // tcell.homehubInfoView.hidden = [JDFacade facade].loginUser.isHomehubOnline;
  266. // if (tcell.homehubInfoView.hidden) {
  267. // tcell.constraintHomehubInfoViewHeight.constant = 0;
  268. // } else {
  269. // _chkHomeModeChange.enabled = NO;
  270. // _chkHomeEmptyChange.enabled = NO;
  271. // }
  272. cell = tcell;
  273. } else if (indexPath.section == 2) {//service info cell
  274. SettingsServiceTableViewCell *tcell = [_tableView dequeueReusableCellWithIdentifier:@"ServiceCellIdentifier"];
  275. if (![tcell.btnService actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
  276. [tcell.btnService addTarget:self action:@selector(btnServiceTouched:) forControlEvents:UIControlEventTouchUpInside];
  277. }
  278. if (![tcell.btnPolicy actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
  279. [tcell.btnPolicy addTarget:self action:@selector(btnPolicyTouched:) forControlEvents:UIControlEventTouchUpInside];
  280. }
  281. cell = tcell;
  282. } else if (indexPath.section == 3) {//version info cell
  283. SettingsVersionTableViewCell *tcell = [_tableView dequeueReusableCellWithIdentifier:@"VersionCellIdentifier"];
  284. tcell.lblVersion.text = [NSString stringWithFormat:@"현재 버전 : %@", [CommonUtil applicationShortVersion]];
  285. cell = tcell;
  286. } else if (indexPath.section == 4) {//Delete cell
  287. SettingsDeleteTableViewCell *tcell = [_tableView dequeueReusableCellWithIdentifier:@"DeleteCellIdentifier"];
  288. if (![tcell.btnDelete actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
  289. [tcell.btnDelete addTarget:self action:@selector(btnDeleteTouched:) forControlEvents:UIControlEventTouchUpInside];
  290. }
  291. cell = tcell;
  292. }
  293. // else if (indexPath.section == 5) {//Passwd info cell
  294. // SettingsPasswdTableViewCell *tcell = [_tableView dequeueReusableCellWithIdentifier:@"PasswdCellIdentifier"];
  295. //
  296. // if (![tcell.btnPassword actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
  297. // [tcell.btnPassword addTarget:self action:@selector(btnPasswordTouched:) forControlEvents:UIControlEventTouchUpInside];
  298. // }
  299. //
  300. // cell = tcell;
  301. // }
  302. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  303. return cell;
  304. }
  305. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  306. [super tableView:tableView didSelectRowAtIndexPath:indexPath];
  307. }
  308. #pragma mark - ImageUtil Delegate
  309. - (void)didFinishPickingImage:(UIImage *)image {
  310. [self requestUpdateProfileImage:image];
  311. }
  312. #pragma mark - UI Events
  313. - (void)lblChangeNicknameTouched {
  314. // ChangeNamePopupView *popup = [[ChangeNamePopupView alloc] initFromNib];
  315. // [popup showWithCompletion:^(CustomAlertView *alertView, NSInteger buttonIndex) {
  316. // if (buttonIndex == 0) {//이름 변경 시,
  317. //
  318. // [_tableView reloadData];
  319. // }
  320. // }];
  321. UIViewController *vc = [CommonUtil instantiateViewControllerWithIdentifier:@"SettingsNameSetViewController" storyboardName:@"Settings"];
  322. // vc.providesPresentationContextTransitionStyle = YES;
  323. // vc.definesPresentationContext = YES;
  324. //
  325. // [vc setModalPresentationStyle:UIModalPresentationOverCurrentContext];
  326. //
  327. // [self presentViewController:vc animated:YES completion:nil];
  328. [self.navigationController pushViewController:vc animated:YES];
  329. }
  330. - (void)lblChangePasswordTouched {
  331. // ConfirmPasswdPopupView *popup = [[ConfirmPasswdPopupView alloc] initFromNib];
  332. // [popup show];
  333. UIViewController *vc = [CommonUtil instantiateViewControllerWithIdentifier:@"SettingsPasswdInputViewController" storyboardName:@"Settings"];
  334. [self.navigationController pushViewController:vc animated:YES];
  335. }
  336. - (void)lblChangeEmailTouched {
  337. ChangeEmailPopupView *popup = [[ChangeEmailPopupView alloc] initFromNib];
  338. [popup show];
  339. }
  340. - (void)btnProfileTouched:(id)sender {
  341. if (!_imageUtil) {
  342. _imageUtil = [[ImageUtil alloc] init];
  343. _imageUtil.delegate = self;
  344. }
  345. // [_imageUtil prepareImagePicker:self];
  346. ChangePhotoPopupView *popup = [[ChangePhotoPopupView alloc]initFromNib];
  347. [popup show];
  348. popup.delegate = self;
  349. }
  350. -(void)changeSelectPhotoType:(NSInteger)index{
  351. [_imageUtil setPresentViewController:self];
  352. if (index == kiPhotoAlbum) {
  353. [_imageUtil showImagePickerController:UIImagePickerControllerSourceTypeSavedPhotosAlbum];
  354. } else if (index == kiPhotoCamera){
  355. [_imageUtil showImagePickerController:UIImagePickerControllerSourceTypeCamera];
  356. } else if (index == kiPhotoDelete){
  357. // UIImage *image = [[UIImage alloc]init];
  358. [self requestUpdateProfileImage:[UIImage imageNamed:@""]];
  359. }
  360. }
  361. - (void)chkAutoLoginTouched:(id)sender {
  362. [[JDFacade facade] storeObjectToUserDefaults:@(_chkAutoLogin.checked) forKey:USDEF_APP_AUTO_LOGIN];
  363. if (_chkAutoLogin.checked) {//자동로그인 설정 시, 인증 토큰 저장
  364. [[JDFacade facade] storeObjectToKeychain:[JDFacade facade].loginUser.authToken forKey:USDEF_SESSION_AUTOTOKEN];
  365. } else {;
  366. [[JDFacade facade] removeObjectAtKeychain:USDEF_SESSION_AUTOTOKEN];
  367. }
  368. }
  369. - (void)btnLogoutTouched:(id)sender {
  370. [[JDFacade facade] logout];
  371. }
  372. - (void)btnChangeNumTouched:(id)sender {
  373. UIViewController *vc = [CommonUtil instantiateViewControllerWithIdentifier:@"SettingsNumChangeViewController" storyboardName:@"Settings"];
  374. [self.navigationController pushViewController:vc animated:YES];
  375. }
  376. //NoticationcationCell's action
  377. - (void)chkHomeModeChangeTouched:(id)sender {
  378. NSDictionary *parameter = @{@"push_type_mode_chg_yn" : _chkHomeModeChange.checked ? ksYES : ksNO};
  379. [self requestUpdatePushSetting:parameter];
  380. }
  381. //- (void)chkHomeEmptyChangeTouched:(id)sender {
  382. //
  383. // NSDictionary *parameter = @{@"push_type_prsnc_chg_yn" : _chkHomeEmptyChange.checked ? ksYES : ksNO};
  384. // [self requestUpdatePushSetting:parameter];
  385. //}
  386. - (void)btnThingsSetTouched:(id)sender{
  387. NSLog(@"홈모드별 동작할 장치 설정");
  388. }
  389. - (void)btnServiceTouched:(id)sender {
  390. NSString *URLString = [NSString stringWithFormat:@"%@%@", kWebLinkServer, URL_PATH_TERMS];
  391. [[JDFacade facade] loadURLExternalBrowser:URLString];
  392. }
  393. - (void)btnPolicyTouched:(id)sender {
  394. NSString *URLString = [NSString stringWithFormat:@"%@%@", kWebLinkServer, URL_PATH_POLICY];
  395. [[JDFacade facade] loadURLExternalBrowser:URLString];
  396. }
  397. //service passwd cell's action
  398. - (void)btnPasswordTouched:(id)sender {// 셋탑 설정
  399. AdminAuthPopupView *popup = [[AdminAuthPopupView alloc] initFromNib];
  400. [popup show];
  401. }
  402. - (void)btnDeleteTouched:(id)sender { // 계정 삭제
  403. DeleteAccountPopupView *popup = [[DeleteAccountPopupView alloc]initFromNib];
  404. [popup show];
  405. }
  406. - (IBAction)btnCloseTouched:(id)sender {
  407. [self dismissViewControllerAnimated:YES completion:nil];
  408. }
  409. #pragma mark - MemoryWarning
  410. - (void)didReceiveMemoryWarning
  411. {
  412. [super didReceiveMemoryWarning];
  413. // Dispose of any resources that can be recreated.
  414. }
  415. @end