Brion VIBBER has uploaded a new change for review.
https://gerrit.wikimedia.org/r/88177
Change subject: Cleared out some table view cruft.
......................................................................
Cleared out some table view cruft.
Change-Id: Ib98713706997476c4f57482bdf41e9ac5f7e9cf0
---
M Commons-iOS.xcodeproj/project.pbxproj
D Commons-iOS/CategoryDetailTableViewController.h
D Commons-iOS/CategoryDetailTableViewController.m
M Commons-iOS/DetailScrollViewController.h
M Commons-iOS/DetailScrollViewController.m
M Commons-iOS/en.lproj/MainStoryboard.storyboard
6 files changed, 0 insertions(+), 232 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/apps/ios/commons
refs/changes/77/88177/1
diff --git a/Commons-iOS.xcodeproj/project.pbxproj
b/Commons-iOS.xcodeproj/project.pbxproj
index dde04d0..08c706d 100644
--- a/Commons-iOS.xcodeproj/project.pbxproj
+++ b/Commons-iOS.xcodeproj/project.pbxproj
@@ -327,7 +327,6 @@
D4E0385C16C47B6C00330A7F /* messages-qqq.json in Resources */ =
{isa = PBXBuildFile; fileRef = D4E0385B16C47B6C00330A7F /* messages-qqq.json
*/; };
D4E0385D16C47B6C00330A7F /* messages-qqq.json in Resources */ =
{isa = PBXBuildFile; fileRef = D4E0385B16C47B6C00330A7F /* messages-qqq.json
*/; };
D4E0385E16C47B6C00330A7F /* messages-qqq.json in Resources */ =
{isa = PBXBuildFile; fileRef = D4E0385B16C47B6C00330A7F /* messages-qqq.json
*/; };
- D4E325461739AA3000F7D278 /* CategoryDetailTableViewController.m
in Sources */ = {isa = PBXBuildFile; fileRef = D4E325451739AA3000F7D278 /*
CategoryDetailTableViewController.m */; };
D4E94E43172EBBBB0034CA6D /* messages-rif.json in Resources */ =
{isa = PBXBuildFile; fileRef = D4E94E42172EBBBB0034CA6D /* messages-rif.json
*/; };
DC0F63DF16BBB73F0017E63C /* defaults.plist in Resources */ =
{isa = PBXBuildFile; fileRef = DC0F63DE16BBB73F0017E63C /* defaults.plist */; };
DC2CB56716B9BD420047977E /* MWNetworkActivityIndicatorManager.m
in Sources */ = {isa = PBXBuildFile; fileRef = DC2CB56616B9BD420047977E /*
MWNetworkActivityIndicatorManager.m */; };
@@ -629,8 +628,6 @@
D4E0385216C46FDD00330A7F /* MWI18N.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name =
MWI18N.h; path = MWI18N/MWI18N.h; sourceTree = "<group>"; };
D4E0385316C46FDD00330A7F /* MWI18N.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name
= MWI18N.m; path = MWI18N/MWI18N.m; sourceTree = "<group>"; };
D4E0385B16C47B6C00330A7F /* messages-qqq.json */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name =
"messages-qqq.json"; path = "messages/messages-qqq.json"; sourceTree =
"<group>"; };
- D4E325441739AA3000F7D278 /* CategoryDetailTableViewController.h
*/ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.c.h; path = CategoryDetailTableViewController.h; sourceTree =
"<group>"; };
- D4E325451739AA3000F7D278 /* CategoryDetailTableViewController.m
*/ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.c.objc; path = CategoryDetailTableViewController.m; sourceTree =
"<group>"; };
D4E94E42172EBBBB0034CA6D /* messages-rif.json */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name =
"messages-rif.json"; path = "messages/messages-rif.json"; sourceTree =
"<group>"; };
DC0F63DE16BBB73F0017E63C /* defaults.plist */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path =
defaults.plist; sourceTree = "<group>"; };
DC2CB56516B9BD420047977E /* MWNetworkActivityIndicatorManager.h
*/ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.c.h; name = MWNetworkActivityIndicatorManager.h; path =
mwapi/MWNetworkActivityIndicatorManager.h; sourceTree = "<group>"; };
@@ -1080,8 +1077,6 @@
D4B1CDFC1721E248008E1B31 /*
CategorySearchTableViewController.m */,
0478F8E71731B5E9007D4531 /*
WelcomeOverlayView.h */,
0478F8E81731B5EA007D4531 /*
WelcomeOverlayView.m */,
- D4E325441739AA3000F7D278 /*
CategoryDetailTableViewController.h */,
- D4E325451739AA3000F7D278 /*
CategoryDetailTableViewController.m */,
04F5736D1775408400376C46 /* Gallery
Multi-Select */,
04739E02174DC9D800F32D13 /* Getting Started */,
);
@@ -1648,7 +1643,6 @@
D4C5B4191720966C00C40532 /*
LicenseTableViewController.m in Sources */,
D4B1CDFD1721E248008E1B31 /*
CategorySearchTableViewController.m in Sources */,
0478F8E91731B5EA007D4531 /*
WelcomeOverlayView.m in Sources */,
- D4E325461739AA3000F7D278 /*
CategoryDetailTableViewController.m in Sources */,
D41BFA49173AF2CA00472EC7 /* Category.m in
Sources */,
0451C8621739A2CC00C2D03B /*
FetchImageOperation.m in Sources */,
0451C865173B3D3800C2D03B /* SpeedGovernor.m in
Sources */,
diff --git a/Commons-iOS/CategoryDetailTableViewController.h
b/Commons-iOS/CategoryDetailTableViewController.h
deleted file mode 100644
index e013647..0000000
--- a/Commons-iOS/CategoryDetailTableViewController.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// CategoryDetailTableViewController.h
-// Commons-iOS
-//
-// Created by Brion on 5/7/13.
-// Copyright (c) 2013 Wikimedia. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-#import "CommonsApp.h"
-
-@interface CategoryDetailTableViewController : UITableViewController
-
-@property (strong) NSString *category;
-@property (strong) FileUpload *selectedRecord;
-
-@property (weak, nonatomic) IBOutlet UILabel *removeLabel;
-@property (weak, nonatomic) IBOutlet UILabel *moreLabel;
-
-@end
diff --git a/Commons-iOS/CategoryDetailTableViewController.m
b/Commons-iOS/CategoryDetailTableViewController.m
deleted file mode 100644
index bb737cf..0000000
--- a/Commons-iOS/CategoryDetailTableViewController.m
+++ /dev/null
@@ -1,78 +0,0 @@
-//
-// CategoryDetailTableViewController.m
-// Commons-iOS
-//
-// Created by Brion on 5/7/13.
-// Copyright (c) 2013 Wikimedia. All rights reserved.
-//
-
-#import "CategoryDetailTableViewController.h"
-#import "MWI18N.h"
-
-@interface CategoryDetailTableViewController ()
-
-@end
-
-@implementation CategoryDetailTableViewController
-
--(void)backButtonPressed:(id)sender
-{
- [self.navigationController popViewControllerAnimated:YES];
-}
-
-- (id)initWithStyle:(UITableViewStyle)style
-{
- self = [super initWithStyle:style];
- if (self) {
- // Custom initialization
- }
- return self;
-}
-
-- (void)viewDidLoad
-{
- [super viewDidLoad];
-
- // Change back button to be an arrow
- self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]
initWithTitle:[[CommonsApp singleton] getBackButtonString]
-
style:UIBarButtonItemStyleBordered
-
target:self
-
action:@selector(backButtonPressed:)];
-
- // i18n
- self.removeLabel.text = [MWMessage forKey:@"catdetail-remove-label"
param:self.category].text;
- self.moreLabel.text = [MWMessage forKey:@"catdetail-info-label"].text;
-
- // Uncomment the following line to preserve selection between
presentations.
- // self.clearsSelectionOnViewWillAppear = NO;
-
- // Uncomment the following line to display an Edit button in the
navigation bar for this view controller.
- // self.navigationItem.rightBarButtonItem = self.editButtonItem;
-}
-
-- (void)didReceiveMemoryWarning
-{
- [super didReceiveMemoryWarning];
- // Dispose of any resources that can be recreated.
-}
-
-#pragma mark - Table view delegate
-
-- (void)tableView:(UITableView *)tableView
didSelectRowAtIndexPath:(NSIndexPath *)indexPath
-{
- // Navigation logic may go here. Create and push another view controller.
- if (indexPath.section == 0) {
- // 'Remove' button
- [self.selectedRecord removeCategory:self.category];
- [CommonsApp.singleton saveData];
- [self.navigationController popViewControllerAnimated:YES];
- } else if (indexPath.section == 1) {
- // 'Read about categories' button
- NSString *link = [MWMessage forKey:@"catdetail-info-url"].text;
- [CommonsApp.singleton openURLWithDefaultBrowser:[NSURL
URLWithString:link]];
- }
-}
-
-// fixme i18nize the section headings
-
-@end
diff --git a/Commons-iOS/DetailScrollViewController.h
b/Commons-iOS/DetailScrollViewController.h
index dfb313e..0402d14 100644
--- a/Commons-iOS/DetailScrollViewController.h
+++ b/Commons-iOS/DetailScrollViewController.h
@@ -37,9 +37,6 @@
@property (weak, nonatomic) IBOutlet UILabel *licenseNameLabel;
@property (weak, nonatomic) IBOutlet UIImageView *ccByImage;
@property (weak, nonatomic) IBOutlet UIImageView *ccSaImage;
-//@property (weak, nonatomic) IBOutlet UITableViewCell *titleCell;
-//@property (weak, nonatomic) IBOutlet UITableViewCell *descCell;
-//@property (weak, nonatomic) IBOutlet UITableViewCell *licenseCell;
@property (weak, nonatomic) IBOutlet UILabel *categoryLabel;
@property (weak, nonatomic) IBOutlet UILabel *categoryListLabel;
@property (weak, nonatomic) IBOutlet UILabel *addCategoryLabel;
@@ -55,8 +52,6 @@
@property (weak, nonatomic) IBOutlet UIView *deleteContainer;
@property (weak, nonatomic) IBOutlet UIView *scrollContainer;
-
-//@property (weak, nonatomic) IBOutlet UIScrollView *scrollView;
@property (strong, nonatomic) FileUpload *selectedRecord;
@property (strong, nonatomic) NSMutableArray *categoryList;
diff --git a/Commons-iOS/DetailScrollViewController.m
b/Commons-iOS/DetailScrollViewController.m
index 09fca92..aa4855c 100644
--- a/Commons-iOS/DetailScrollViewController.m
+++ b/Commons-iOS/DetailScrollViewController.m
@@ -12,7 +12,6 @@
#import "MWI18N/MWMessage.h"
#import "MyUploadsViewController.h"
#import "CategorySearchTableViewController.h"
-#import "CategoryDetailTableViewController.h"
#import "AppDelegate.h"
#import "LoadingIndicator.h"
#import "DescriptionParser.h"
@@ -31,8 +30,6 @@
#define DETAIL_BORDER_COLOR [UIColor colorWithWhite:1.0f alpha:0.75f]
#define DETAIL_BORDER_WIDTH 0.0f
#define DETAIL_BORDER_RADIUS 0.0f
-
-#define DETAIL_TABLE_CATEGORIES_BACKGROUND_COLOR [UIColor colorWithWhite:1.0f
alpha:0.1f]
#define DETAIL_EDITABLE_TEXTBOX_BACKGROUND_COLOR [UIColor colorWithWhite:1.0f
alpha:0.5f]
#define DETAIL_EDITABLE_TEXTBOX_TEXT_COLOR [UIColor whiteColor]
@@ -797,102 +794,6 @@
return self.view.frame.origin.y -
(self.navigationController.navigationBar.frame.size.height +
self.navigationController.navigationBar.frame.origin.y);
}
-
-
-
-
-
-
-
-
-
-
-
-#pragma mark - To do - from table code
-// remove prepareForSegue and other cruft
-
-// Hide only the license row if viewing details of already-uploaded image
-// if (self.selectedRecord.complete.boolValue) {
-// // Hide description row if none found
-// return (self.descriptionTextView.text.length == 0) ? 1 : 2;
-// }
-
-// Categories - show loading message while uploading already uploaded img
categories
-// if (self.selectedRecord.complete.boolValue) {
-// // If no categories show one cell so it can contain "Loading..."
message, else hide the add button
-// // for already uploaded images as categories are read-only for
them for now
-// return (self.categoryList.count == 0) ? 1 :
self.categoryList.count;
-// }
-
-// if (self.selectedRecord.complete.boolValue) {
-// Show "Loading..." row if no categories
-// if(self.categoryList.count == 0){
-// cell = [tableView
dequeueReusableCellWithIdentifier:@"CategoryCell"];
-// cell.accessoryType = UITableViewCellAccessoryNone;
-// cell.userInteractionEnabled = NO;
-// cell.textLabel.text = [MWMessage
forKey:@"details-category-loading"].text;
-// cell.textLabel.backgroundColor = [UIColor clearColor];
-// cell.selectionStyle =
UITableViewCellSelectionStyleNone;
-// return cell;
-// }
-// }
-
-
-// if (indexPath.row < self.categoryList.count) {
-// cell = [tableView
dequeueReusableCellWithIdentifier:@"CategoryCell"];
-// cell.selectionStyle = UITableViewCellSelectionStyleNone;
-// // Make categories read-only for now
-// if (self.selectedRecord.complete.boolValue) {
-// cell.accessoryType = UITableViewCellAccessoryNone;
-// cell.userInteractionEnabled = NO;
-// }
-//
-// cell.textLabel.text = self.categoryList[indexPath.row];
-// } else {
-// cell = [tableView
dequeueReusableCellWithIdentifier:@"AddCategoryCell"];
-// cell.textLabel.text = [MWMessage forKey:@"catadd-title"].text;
-// cell.textLabel.textColor = DETAIL_LABEL_COLOR;
-// }
-
-
-
-//- (void)tableView:(UITableView *)tableView
didSelectRowAtIndexPath:(NSIndexPath *)indexPath
-//{
-// if (indexPath.section == 0) {
-// // Static section already handled by storyboard segues.
-// } else if (indexPath.section == 1) {
-// if (indexPath.row < self.categoryList.count) {
-// // Segue isn't connected due to nib fun. :P
-// [self performSegueWithIdentifier: @"CategoryDetailSegue" sender:
self];
-// } else {
-// // 'Add category...' cell button
-// // Segue isn't connected due to nib fun. :P
-// [self performSegueWithIdentifier: @"AddCategorySegue" sender:
self];
-// }
-// }
-//}
-
-
-
-
-//-(void)tableView:(UITableView *)tableView
accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
-//{
-// if (indexPath.section == 1 && indexPath.row < self.categoryList.count) {
-// NSString *cat = self.categoryList[indexPath.row];
-// NSString *encCat = [cat
stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
-// NSString *link = [NSString
stringWithFormat:@"https://commons.m.wikimedia.org/wiki/Category:%@", encCat];
-// [[UIApplication sharedApplication] openURL:[NSURL
URLWithString:link]];
-// }
-//}
-
-
-
-
-
-
-
-
-
#pragma mark - Focus to box when title or description label tapped
- (void)focusOnTitleTextField
{
@@ -964,28 +865,6 @@
NSLog(@"setting desc: %@", self.descriptionTextView.text);
record.desc = self.descriptionTextView.text;
[self updateUploadButton];
-}
-
-#pragma mark - Segue
-
-- (void)prepareForSegue:(UIStoryboardSegue*)segue sender:(id)sender
-{
- if ([segue.identifier isEqualToString:@"AddCategorySegue"]) {
- if (self.selectedRecord) {
- CategorySearchTableViewController *catVC = [segue
destinationViewController];
-
- catVC.title = [MWMessage forKey:@"catadd-title"].text;
-
- catVC.selectedRecord = self.selectedRecord;
- }
- } else if ([segue.identifier isEqualToString:@"CategoryDetailSegue"]) {
- if (self.selectedRecord) {
- CategoryDetailTableViewController *view = [segue
destinationViewController];
- view.selectedRecord = self.selectedRecord;
-// view.category =
self.categoryList[self.tableView.indexPathForSelectedRow.row];
- }
- }
-
}
#pragma mark - Description retrieval
diff --git a/Commons-iOS/en.lproj/MainStoryboard.storyboard
b/Commons-iOS/en.lproj/MainStoryboard.storyboard
index 2d4ba55..e3f4f55 100644
--- a/Commons-iOS/en.lproj/MainStoryboard.storyboard
+++ b/Commons-iOS/en.lproj/MainStoryboard.storyboard
@@ -2002,8 +2002,6 @@
<image name="mockPageLogo.png" width="64" height="106"/>
<image name="mockPagePhoto.png" width="134" height="103"/>
<image name="photo-button-bg.png" width="72" height="72"/>
- <image name="photo-button-bg.png" width="72" height="72"/>
- <image name="photo-button-bg.png" width="72" height="72"/>
<image name="settings.png" width="30" height="30"/>
</resources>
<color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
--
To view, visit https://gerrit.wikimedia.org/r/88177
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib98713706997476c4f57482bdf41e9ac5f7e9cf0
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/commons
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER <[email protected]>
Gerrit-Reviewer: Mhurd <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits