Mhurd has uploaded a new change for review.
https://gerrit.wikimedia.org/r/224013
Change subject: WIP
......................................................................
WIP
-Removed native tracking views from bottom of web view.
-Moved read-more to bottom of native article table.
-Made read-more use "morelike:"!
-Moved article history pencil button to web view toolbar.
-Removed back and forward buttons from web view toolbar.
Change-Id: I0cd269bead51e2bb685bec48abf1454793c3c8b7
---
M Wikipedia.xcodeproj/project.pbxproj
M Wikipedia/UI-V5/UIButton+WMFButton.h
M Wikipedia/UI-V5/UIButton+WMFButton.m
A Wikipedia/UI-V5/WMFArticleReadMoreCell.h
A Wikipedia/UI-V5/WMFArticleReadMoreCell.m
M Wikipedia/UI-V5/WMFArticleViewController.m
M Wikipedia/UI-V5/WMFArticleViewController.storyboard
M Wikipedia/UI-V5/WMFSearchFetcher.h
M Wikipedia/UI-V5/WMFSearchFetcher.m
M Wikipedia/View Controllers/TableOfContents/TOCViewController.m
D Wikipedia/View
Controllers/WebView/Footer/SubFooters/Legal/WMFLegalFooterViewController.h
D Wikipedia/View
Controllers/WebView/Footer/SubFooters/Legal/WMFLegalFooterViewController.m
D Wikipedia/View
Controllers/WebView/Footer/SubFooters/Legal/WMFLegalFooterViewController.xib
D Wikipedia/View
Controllers/WebView/Footer/SubFooters/Options/WMFOptionsFooterViewController.h
D Wikipedia/View
Controllers/WebView/Footer/SubFooters/Options/WMFOptionsFooterViewController.m
D Wikipedia/View
Controllers/WebView/Footer/SubFooters/Options/WMFOptionsFooterViewController.xib
D Wikipedia/View
Controllers/WebView/Footer/SubFooters/ReadMore/WMFReadMoreViewController.h
D Wikipedia/View
Controllers/WebView/Footer/SubFooters/ReadMore/WMFReadMoreViewController.m
D Wikipedia/View
Controllers/WebView/Footer/SubFooters/ReadMore/WMFReadMoreViewController.xib
D Wikipedia/View Controllers/WebView/Footer/WMFWebViewFooterViewController.h
D Wikipedia/View Controllers/WebView/Footer/WMFWebViewFooterViewController.m
D Wikipedia/View Controllers/WebView/Footer/WMFWebViewFooterViewController.xib
D Wikipedia/View Controllers/WebView/WMFWebViewFooterContainerView.h
D Wikipedia/View Controllers/WebView/WMFWebViewFooterContainerView.m
M Wikipedia/View Controllers/WebView/WebViewController.m
M Wikipedia/View Controllers/WebView/WebViewController_Private.h
26 files changed, 227 insertions(+), 902 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia
refs/changes/13/224013/1
diff --git a/Wikipedia.xcodeproj/project.pbxproj
b/Wikipedia.xcodeproj/project.pbxproj
index 02360c9..faecbe7 100644
--- a/Wikipedia.xcodeproj/project.pbxproj
+++ b/Wikipedia.xcodeproj/project.pbxproj
@@ -78,15 +78,6 @@
047E74141860509000916964 /* SavedPagesResultPrototypeView.xib
in Resources */ = {isa = PBXBuildFile; fileRef = 047E74131860509000916964 /*
SavedPagesResultPrototypeView.xib */; };
047E95511996DD030046A122 /* NearbyViewController.m in Sources
*/ = {isa = PBXBuildFile; fileRef = 047E954E1996DD030046A122 /*
NearbyViewController.m */; };
047ED63918C13E4900442BE3 /* PreviewWebView.m in Sources */ =
{isa = PBXBuildFile; fileRef = 047ED63818C13E4900442BE3 /* PreviewWebView.m */;
};
- 0480AE871AA4E61000A9950C /* WMFLegalFooterViewController.m in
Sources */ = {isa = PBXBuildFile; fileRef = 0480AE7D1AA4E61000A9950C /*
WMFLegalFooterViewController.m */; };
- 0480AE891AA4E61000A9950C /* WMFLegalFooterViewController.xib in
Resources */ = {isa = PBXBuildFile; fileRef = 0480AE7E1AA4E61000A9950C /*
WMFLegalFooterViewController.xib */; };
- 0480AE8B1AA4E61000A9950C /* WMFOptionsFooterViewController.m in
Sources */ = {isa = PBXBuildFile; fileRef = 0480AE811AA4E61000A9950C /*
WMFOptionsFooterViewController.m */; };
- 0480AE8D1AA4E61000A9950C /* WMFOptionsFooterViewController.xib
in Resources */ = {isa = PBXBuildFile; fileRef = 0480AE821AA4E61000A9950C /*
WMFOptionsFooterViewController.xib */; };
- 0480AE8F1AA4E61000A9950C /* WMFReadMoreViewController.m in
Sources */ = {isa = PBXBuildFile; fileRef = 0480AE851AA4E61000A9950C /*
WMFReadMoreViewController.m */; };
- 0480AE911AA4E61000A9950C /* WMFReadMoreViewController.xib in
Resources */ = {isa = PBXBuildFile; fileRef = 0480AE861AA4E61000A9950C /*
WMFReadMoreViewController.xib */; };
- 0480AE961AA4E65D00A9950C /* WMFWebViewFooterViewController.m in
Sources */ = {isa = PBXBuildFile; fileRef = 0480AE941AA4E65D00A9950C /*
WMFWebViewFooterViewController.m */; };
- 0480AE981AA4E65D00A9950C /* WMFWebViewFooterViewController.xib
in Resources */ = {isa = PBXBuildFile; fileRef = 0480AE951AA4E65D00A9950C /*
WMFWebViewFooterViewController.xib */; };
- 0480AE9C1AA4F01600A9950C /* WMFWebViewFooterContainerView.m in
Sources */ = {isa = PBXBuildFile; fileRef = 0480AE9B1AA4F01600A9950C /*
WMFWebViewFooterContainerView.m */; };
0480AEA01AA4F4DA00A9950C /*
WMFIntrinsicContentSizeAwareTableView.m in Sources */ = {isa = PBXBuildFile;
fileRef = 0480AE9F1AA4F4DA00A9950C /* WMFIntrinsicContentSizeAwareTableView.m
*/; };
04821CD119895EDC007558F6 /* ReferenceGradientView.m in Sources
*/ = {isa = PBXBuildFile; fileRef = 04821CD019895EDC007558F6 /*
ReferenceGradientView.m */; };
0484411E19FF15AF00FD26C5 /* AboutViewController.plist in
Resources */ = {isa = PBXBuildFile; fileRef = 0484411D19FF15AF00FD26C5 /*
AboutViewController.plist */; };
@@ -123,6 +114,7 @@
04A97E8718B81D5D0046B166 /* AccountCreationViewController.m in
Sources */ = {isa = PBXBuildFile; fileRef = 04A97E8618B81D5D0046B166 /*
AccountCreationViewController.m */; };
04A9C2931B4B51E0008B996F /* WMFArticleSectionHeaderCell.m in
Sources */ = {isa = PBXBuildFile; fileRef = 04A9C2921B4B51E0008B996F /*
WMFArticleSectionHeaderCell.m */; };
04A9C2961B4B59E3008B996F /* WMFArticleExtractCell.m in Sources
*/ = {isa = PBXBuildFile; fileRef = 04A9C2951B4B59E3008B996F /*
WMFArticleExtractCell.m */; };
+ 04A9C2A21B4F326D008B996F /* WMFArticleReadMoreCell.m in Sources
*/ = {isa = PBXBuildFile; fileRef = 04A9C2A11B4F326D008B996F /*
WMFArticleReadMoreCell.m */; };
04AE1C701891B302002D5487 /* NSObject+Extras.m in Sources */ =
{isa = PBXBuildFile; fileRef = 04AE1C6F1891B302002D5487 /* NSObject+Extras.m
*/; };
04AE520519DB5E0900F89B92 /* NSObject+ConstraintsScale.m in
Sources */ = {isa = PBXBuildFile; fileRef = 04AE520419DB5E0900F89B92 /*
NSObject+ConstraintsScale.m */; };
04AEF0F01B2E87A800EFE858 /* WebViewController.storyboard in
Resources */ = {isa = PBXBuildFile; fileRef = 04AEF0EF1B2E87A800EFE858 /*
WebViewController.storyboard */; };
@@ -556,20 +548,6 @@
047E954E1996DD030046A122 /* NearbyViewController.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= NearbyViewController.m; sourceTree = "<group>"; };
047ED63718C13E4900442BE3 /* PreviewWebView.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
PreviewWebView.h; sourceTree = "<group>"; };
047ED63818C13E4900442BE3 /* PreviewWebView.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= PreviewWebView.m; sourceTree = "<group>"; };
- 0480AE7C1AA4E61000A9950C /* WMFLegalFooterViewController.h */ =
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
path = WMFLegalFooterViewController.h; sourceTree = "<group>"; };
- 0480AE7D1AA4E61000A9950C /* WMFLegalFooterViewController.m */ =
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.c.objc; path = WMFLegalFooterViewController.m; sourceTree =
"<group>"; };
- 0480AE7E1AA4E61000A9950C /* WMFLegalFooterViewController.xib */
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path
= WMFLegalFooterViewController.xib; sourceTree = "<group>"; };
- 0480AE801AA4E61000A9950C /* WMFOptionsFooterViewController.h */
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.c.h; path = WMFOptionsFooterViewController.h; sourceTree =
"<group>"; };
- 0480AE811AA4E61000A9950C /* WMFOptionsFooterViewController.m */
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.c.objc; path = WMFOptionsFooterViewController.m; sourceTree =
"<group>"; };
- 0480AE821AA4E61000A9950C /* WMFOptionsFooterViewController.xib
*/ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib;
path = WMFOptionsFooterViewController.xib; sourceTree = "<group>"; };
- 0480AE841AA4E61000A9950C /* WMFReadMoreViewController.h */ =
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
path = WMFReadMoreViewController.h; sourceTree = "<group>"; };
- 0480AE851AA4E61000A9950C /* WMFReadMoreViewController.m */ =
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.c.objc; path = WMFReadMoreViewController.m; sourceTree = "<group>";
};
- 0480AE861AA4E61000A9950C /* WMFReadMoreViewController.xib */ =
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path =
WMFReadMoreViewController.xib; sourceTree = "<group>"; };
- 0480AE931AA4E65D00A9950C /* WMFWebViewFooterViewController.h */
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.c.h; path = WMFWebViewFooterViewController.h; sourceTree =
"<group>"; };
- 0480AE941AA4E65D00A9950C /* WMFWebViewFooterViewController.m */
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.c.objc; path = WMFWebViewFooterViewController.m; sourceTree =
"<group>"; };
- 0480AE951AA4E65D00A9950C /* WMFWebViewFooterViewController.xib
*/ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib;
path = WMFWebViewFooterViewController.xib; sourceTree = "<group>"; };
- 0480AE9A1AA4F01600A9950C /* WMFWebViewFooterContainerView.h */
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.c.h; name = WMFWebViewFooterContainerView.h; path = "wikipedia/View
Controllers/WebView/WMFWebViewFooterContainerView.h"; sourceTree = SOURCE_ROOT;
};
- 0480AE9B1AA4F01600A9950C /* WMFWebViewFooterContainerView.m */
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.c.objc; name = WMFWebViewFooterContainerView.m; path =
"wikipedia/View Controllers/WebView/WMFWebViewFooterContainerView.m";
sourceTree = SOURCE_ROOT; };
0480AE9E1AA4F4DA00A9950C /*
WMFIntrinsicContentSizeAwareTableView.h */ = {isa = PBXFileReference;
fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
WMFIntrinsicContentSizeAwareTableView.h; sourceTree = "<group>"; };
0480AE9F1AA4F4DA00A9950C /*
WMFIntrinsicContentSizeAwareTableView.m */ = {isa = PBXFileReference;
fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path =
WMFIntrinsicContentSizeAwareTableView.m; sourceTree = "<group>"; };
04821CCF19895EDC007558F6 /* ReferenceGradientView.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
ReferenceGradientView.h; sourceTree = "<group>"; };
@@ -635,6 +613,8 @@
04A9C2921B4B51E0008B996F /* WMFArticleSectionHeaderCell.m */ =
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.c.objc; path = WMFArticleSectionHeaderCell.m; sourceTree =
"<group>"; };
04A9C2941B4B59E3008B996F /* WMFArticleExtractCell.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
WMFArticleExtractCell.h; sourceTree = "<group>"; };
04A9C2951B4B59E3008B996F /* WMFArticleExtractCell.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= WMFArticleExtractCell.m; sourceTree = "<group>"; };
+ 04A9C2A01B4F326D008B996F /* WMFArticleReadMoreCell.h */ = {isa
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path
= WMFArticleReadMoreCell.h; sourceTree = "<group>"; };
+ 04A9C2A11B4F326D008B996F /* WMFArticleReadMoreCell.m */ = {isa
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc;
path = WMFArticleReadMoreCell.m; sourceTree = "<group>"; };
04AE1C6E1891B302002D5487 /* NSObject+Extras.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
"NSObject+Extras.h"; sourceTree = "<group>"; };
04AE1C6F1891B302002D5487 /* NSObject+Extras.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= "NSObject+Extras.m"; sourceTree = "<group>"; };
04AE520319DB5E0900F89B92 /* NSObject+ConstraintsScale.h */ =
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
path = "NSObject+ConstraintsScale.h"; sourceTree = "<group>"; };
@@ -1437,7 +1417,6 @@
0447862E185145090050563B /* WebViewController.m
*/,
BCB58F461A891FDB00465627 /*
WebViewController+ImageGalleryPresentation.h */,
BCB58F471A891FDB00465627 /*
WebViewController+ImageGalleryPresentation.m */,
- 0480AE791AA4E61000A9950C /* Footer */,
);
path = WebView;
sourceTree = "<group>";
@@ -1503,59 +1482,6 @@
0463639718A844570049EE4F /*
KeychainCredentials.m */,
);
path = Keychain;
- sourceTree = "<group>";
- };
- 0480AE791AA4E61000A9950C /* Footer */ = {
- isa = PBXGroup;
- children = (
- 0480AE9A1AA4F01600A9950C /*
WMFWebViewFooterContainerView.h */,
- 0480AE9B1AA4F01600A9950C /*
WMFWebViewFooterContainerView.m */,
- 0480AE931AA4E65D00A9950C /*
WMFWebViewFooterViewController.h */,
- 0480AE941AA4E65D00A9950C /*
WMFWebViewFooterViewController.m */,
- 0480AE951AA4E65D00A9950C /*
WMFWebViewFooterViewController.xib */,
- 0480AE7A1AA4E61000A9950C /* SubFooters */,
- );
- path = Footer;
- sourceTree = "<group>";
- };
- 0480AE7A1AA4E61000A9950C /* SubFooters */ = {
- isa = PBXGroup;
- children = (
- 0480AE831AA4E61000A9950C /* ReadMore */,
- 0480AE7F1AA4E61000A9950C /* Options */,
- 0480AE7B1AA4E61000A9950C /* Legal */,
- );
- path = SubFooters;
- sourceTree = "<group>";
- };
- 0480AE7B1AA4E61000A9950C /* Legal */ = {
- isa = PBXGroup;
- children = (
- 0480AE7C1AA4E61000A9950C /*
WMFLegalFooterViewController.h */,
- 0480AE7D1AA4E61000A9950C /*
WMFLegalFooterViewController.m */,
- 0480AE7E1AA4E61000A9950C /*
WMFLegalFooterViewController.xib */,
- );
- path = Legal;
- sourceTree = "<group>";
- };
- 0480AE7F1AA4E61000A9950C /* Options */ = {
- isa = PBXGroup;
- children = (
- 0480AE801AA4E61000A9950C /*
WMFOptionsFooterViewController.h */,
- 0480AE811AA4E61000A9950C /*
WMFOptionsFooterViewController.m */,
- 0480AE821AA4E61000A9950C /*
WMFOptionsFooterViewController.xib */,
- );
- path = Options;
- sourceTree = "<group>";
- };
- 0480AE831AA4E61000A9950C /* ReadMore */ = {
- isa = PBXGroup;
- children = (
- 0480AE841AA4E61000A9950C /*
WMFReadMoreViewController.h */,
- 0480AE851AA4E61000A9950C /*
WMFReadMoreViewController.m */,
- 0480AE861AA4E61000A9950C /*
WMFReadMoreViewController.xib */,
- );
- path = ReadMore;
sourceTree = "<group>";
};
0485FEC71994CF8800141361 /* Nearby */ = {
@@ -2016,6 +1942,8 @@
04A9C2951B4B59E3008B996F /*
WMFArticleExtractCell.m */,
0436998F1B45B68D002FD81D /*
WMFArticleSectionCell.h */,
043699901B45B68D002FD81D /*
WMFArticleSectionCell.m */,
+ 04A9C2A01B4F326D008B996F /*
WMFArticleReadMoreCell.h */,
+ 04A9C2A11B4F326D008B996F /*
WMFArticleReadMoreCell.m */,
);
name = Table;
sourceTree = "<group>";
@@ -2989,7 +2917,6 @@
04661DC81B4346C90045E970 /*
WMFArticleViewController.storyboard in Resources */,
D46CD8C518A1AC4F0042959E /* Localizable.strings
in Resources */,
04016E1C1B3285B700D732FE /*
AboutViewController.storyboard in Resources */,
- 0480AE981AA4E65D00A9950C /*
WMFWebViewFooterViewController.xib in Resources */,
04DA87771B30A9D600C948F8 /*
AccountCreationViewController.storyboard in Resources */,
04DA87811B30E0C600C948F8 /*
HistoryViewController.storyboard in Resources */,
04AEF0F41B2E8CA100EFE858 /*
SectionEditorViewController.storyboard in Resources */,
@@ -3006,7 +2933,6 @@
04B0EA47190B2319007458AF /*
PreviewLicenseView.xib in Resources */,
04DA87791B30B99300C948F8 /*
CaptchaViewController.storyboard in Resources */,
04CCCFEF1935093A00E3F60C /*
SecondaryMenuRowView.xib in Resources */,
- 0480AE911AA4E61000A9950C /*
WMFReadMoreViewController.xib in Resources */,
047E74141860509000916964 /*
SavedPagesResultPrototypeView.xib in Resources */,
C46FBA4B1A8530EE00C5730F /*
Pods-acknowledgements.plist in Resources */,
042258561B34A29800FDD0C6 /*
PreviewAndSaveViewController.storyboard in Resources */,
@@ -3019,12 +2945,10 @@
04AEF0FB1B2F703700EFE858 /*
PrimaryMenuViewController.storyboard in Resources */,
042258581B34A2C100FDD0C6 /*
EditSummaryViewController.storyboard in Resources */,
BCB58F591A89747400465627 /*
WMFImageGalleryDetailOverlayView.xib in Resources */,
- 0480AE891AA4E61000A9950C /*
WMFLegalFooterViewController.xib in Resources */,
BC7E4A441B33812700EECD8B /*
LanguagesViewController.storyboard in Resources */,
04AEF0F61B2E8F6300EFE858 /*
ReferencesVC.storyboard in Resources */,
0484411E19FF15AF00FD26C5 /*
AboutViewController.plist in Resources */,
0E36C2271AE0B59D00C58CFF /* Images.xcassets in
Resources */,
- 0480AE8D1AA4E61000A9950C /*
WMFOptionsFooterViewController.xib in Resources */,
0E94AFEA1B209721000BC5EA /*
iPhone_Root.storyboard in Resources */,
04DA876E1B2FEA7000C948F8 /*
SearchResultsController.storyboard in Resources */,
04DA877F1B30D29800C948F8 /*
SavedPagesViewController.storyboard in Resources */,
@@ -3264,7 +3188,6 @@
D4F277FB194235A00032BA38 /*
ProtectedEditAttemptFunnel.m in Sources */,
0487047E19F8262600B7D307 /*
AccountCreationTokenFetcher.m in Sources */,
049566C218F5F4CB0058EA12 /* ZeroConfigState.m
in Sources */,
- 0480AE871AA4E61000A9950C /*
WMFLegalFooterViewController.m in Sources */,
0436998E1B45B673002FD81D /*
WMFArticleTableHeaderView.m in Sources */,
04F27B7518FE0F2E00EDD838 /*
PageHistoryResultCell.m in Sources */,
BC060B3A1B456D030086EBFB /*
AnyPromise+WMFExtensions.m in Sources */,
@@ -3443,9 +3366,7 @@
04224500197F5E09005DD0BF /* AbuseFilterAlert.m
in Sources */,
BCB669731A83F58600C7B1FE /*
NSMutableDictionary+WMFMaybeSet.m in Sources */,
BCE24FE01B0CF0C7003F054B /* SQLiteHelper.m in
Sources */,
- 0480AE8F1AA4E61000A9950C /*
WMFReadMoreViewController.m in Sources */,
D4B0AE0819366A0A00F0AC90 /*
CreateAccountFunnel.m in Sources */,
- 0480AE8B1AA4E61000A9950C /*
WMFOptionsFooterViewController.m in Sources */,
BCB669B51A83F6C400C7B1FE /* MWKUserDataStore.m
in Sources */,
0E7955D01B2B659500B055A2 /*
WMFArticleListTranstion.m in Sources */,
0487045519F824D700B7D307 /* QueuesSingleton.m
in Sources */,
@@ -3463,6 +3384,7 @@
BC955BC71A82BEFD000EF9E4 /*
MWKImageInfoFetcher.m in Sources */,
04C7576E1A1AA2D00084AC39 /* RecentSearchCell.m
in Sources */,
0E366B3F1B2F5C4500ABFB86 /* WMFSearchFetcher.m
in Sources */,
+ 04A9C2A21B4F326D008B996F /*
WMFArticleReadMoreCell.m in Sources */,
BCB58F541A894D3E00465627 /*
WMFImageGalleryDetailOverlayView.m in Sources */,
04292FF8185FBB0B002A13FC /*
SearchResultsController.m in Sources */,
BCAFC5D31AFD5F7E004615BA /*
MWKArticle+WMFSharing.m in Sources */,
@@ -3480,7 +3402,6 @@
0487048D19F8262600B7D307 /* ThumbnailFetcher.m
in Sources */,
BCB669B01A83F6C400C7B1FE /*
MWKRecentSearchEntry.m in Sources */,
BC955BCF1A82C2FA000EF9E4 /*
AFHTTPRequestOperationManager+WMFConfig.m in Sources */,
- 0480AE961AA4E65D00A9950C /*
WMFWebViewFooterViewController.m in Sources */,
041A3B6218E11ED90079FF1C /*
LanguagesViewController.m in Sources */,
0493C2CC1952373100EBB973 /* DataHousekeeping.m
in Sources */,
043F18E118D9691D00D8489A /*
TopActionSheetLabel.m in Sources */,
@@ -3489,7 +3410,6 @@
04272E7B1940EEBC00CC682F /* WMFAssetsFile.m in
Sources */,
D4991445181D51DE00E6073C /* main.m in Sources
*/,
0EFB0F1C1B31EE2D00D05C08 /*
NSManagedObject+WMFModelFactory.m in Sources */,
- 0480AE9C1AA4F01600A9950C /*
WMFWebViewFooterContainerView.m in Sources */,
D47BF5D4197870390067C3BC /* SavedPagesFunnel.m
in Sources */,
04616DFC1AE706C600815BCE /*
WMFLocalizationProtocol.m in Sources */,
04C43AC0183442FC006C643B /* NSString+Extras.m
in Sources */,
diff --git a/Wikipedia/UI-V5/UIButton+WMFButton.h
b/Wikipedia/UI-V5/UIButton+WMFButton.h
index 634f9e7..d6b53ed 100644
--- a/Wikipedia/UI-V5/UIButton+WMFButton.h
+++ b/Wikipedia/UI-V5/UIButton+WMFButton.h
@@ -16,7 +16,8 @@
WMFButtonTypeTranslate,
WMFButtonTypeMagnify,
WMFButtonTypeReload,
- WMFButtonTypeCaretLeft
+ WMFButtonTypeCaretLeft,
+ WMFButtonTypePencil
};
@interface UIButton (WMFGlyph)
diff --git a/Wikipedia/UI-V5/UIButton+WMFButton.m
b/Wikipedia/UI-V5/UIButton+WMFButton.m
index 1bdc3f4..3e19003 100644
--- a/Wikipedia/UI-V5/UIButton+WMFButton.m
+++ b/Wikipedia/UI-V5/UIButton+WMFButton.m
@@ -91,6 +91,9 @@
case WMFButtonTypeCaretLeft:
configForState(UIControlStateNormal, WMF_GLYPH_CARET_LEFT, nil,
nil);
break;
+ case WMFButtonTypePencil:
+ configForState(UIControlStateNormal, WMF_GLYPH_PENCIL, @(2.4),
nil);
+ break;
default:
break;
}
@@ -115,6 +118,7 @@
case WMFButtonTypeTranslate:
case WMFButtonTypeMagnify:
case WMFButtonTypeReload:
+ case WMFButtonTypePencil:
return NO;
break;
default:
diff --git a/Wikipedia/UI-V5/WMFArticleReadMoreCell.h
b/Wikipedia/UI-V5/WMFArticleReadMoreCell.h
new file mode 100644
index 0000000..5b463da
--- /dev/null
+++ b/Wikipedia/UI-V5/WMFArticleReadMoreCell.h
@@ -0,0 +1,12 @@
+// Created by Monte Hurd on 7/9/15.
+// Copyright (c) 2015 Wikimedia Foundation. Provided under MIT-style license;
please copy and modify!
+
+#import <UIKit/UIKit.h>
+
+@interface WMFArticleReadMoreCell : UITableViewCell
+
+@property (strong, nonatomic) IBOutlet UILabel* titleLabel;
+@property (strong, nonatomic) IBOutlet UILabel* descriptionLabel;
+@property (strong, nonatomic) IBOutlet UIImageView* thumbnailImageView;
+
+@end
diff --git a/Wikipedia/UI-V5/WMFArticleReadMoreCell.m
b/Wikipedia/UI-V5/WMFArticleReadMoreCell.m
new file mode 100644
index 0000000..f2add8a
--- /dev/null
+++ b/Wikipedia/UI-V5/WMFArticleReadMoreCell.m
@@ -0,0 +1,15 @@
+// Created by Monte Hurd on 7/9/15.
+// Copyright (c) 2015 Wikimedia Foundation. Provided under MIT-style license;
please copy and modify!
+
+#import "WMFArticleReadMoreCell.h"
+
+@implementation WMFArticleReadMoreCell
+
+- (void)awakeFromNib {
+ [super awakeFromNib];
+ self.thumbnailImageView.layer.borderWidth = 1;
+ self.thumbnailImageView.layer.borderColor = [UIColor colorWithWhite:0
alpha:0.08].CGColor;
+ self.thumbnailImageView.layer.cornerRadius = 5.0f;
+}
+
+@end
diff --git a/Wikipedia/UI-V5/WMFArticleViewController.m
b/Wikipedia/UI-V5/WMFArticleViewController.m
index 7ac175b..223b845 100644
--- a/Wikipedia/UI-V5/WMFArticleViewController.m
+++ b/Wikipedia/UI-V5/WMFArticleViewController.m
@@ -16,6 +16,15 @@
#import "MWKArticle+WMFSharing.h"
#import "WMFArticleFetcher.h"
+#import "WMFSearchFetcher.h"
+#import "WMFSearchResults.h"
+#import "WMFArticleReadMoreCell.h"
+
+typedef NS_ENUM (NSInteger, WMFArticleSectionType) {
+ WMFArticleSectionTypeSummary,
+ WMFArticleSectionTypeTOC,
+ WMFArticleSectionTypeReadMore
+};
NS_ASSUME_NONNULL_BEGIN
@@ -26,6 +35,9 @@
@property (nonatomic, assign, readwrite) WMFArticleControllerMode mode;
@property (nonatomic, strong) WMFArticleFetcher* articleFetcher;
+@property (nonatomic, strong) WMFSearchFetcher* readMoreFetcher;
+
+@property (nonatomic, strong) WMFSearchResults* readMoreResults;
@end
@@ -54,12 +66,6 @@
[[WMFImageController sharedInstance] cancelFetchForURL:[NSURL
wmf_optionalURLWithString:[_article bestThumbnailImageURL]]];
_article = article;
-
- NSLog(@"\n");
- NSLog(@"%@", article.title.text);
- NSLog(@"%@", article.entityDescription); //not saved? only seeing it in
search results not saved panels
- NSLog(@"%@", article.thumbnailURL);
- NSLog(@"%lu", [article.sections count]);
[self updateUI];
[self fetchArticleIfNeeded];
@@ -97,6 +103,14 @@
_articleFetcher = [[WMFArticleFetcher alloc]
initWithDataStore:self.dataStore];
}
return _articleFetcher;
+}
+
+- (WMFSearchFetcher*)readMoreFetcher {
+ if (!_readMoreFetcher) {
+ _readMoreFetcher = [[WMFSearchFetcher alloc]
initWithSearchSite:_article.title.site dataStore:self.dataStore];
+ _readMoreFetcher.maxSearchResults = 4;
+ }
+ return _readMoreFetcher;
}
#pragma mark - Article Notifications
@@ -153,6 +167,17 @@
}
}).then(^(){
[self observeArticleUpdates];
+ });
+}
+
+- (void)fetchReadMoreForTitle:(MWKTitle*)title {
+ [self.readMoreFetcher searchArticleTitlesForSearchTerm:[@"morelike:"
stringByAppendingString:title.text] searchType:SEARCH_TYPE_IN_ARTICLES]
+ .then(^(WMFSearchResults* results) {
+ self.readMoreResults = results;
+ [self.tableView reloadData];
+ })
+ .catch(^(NSError* err) {
+ DDLogError(@"Failed to fetch readmore: %@", err);
});
}
@@ -262,39 +287,86 @@
[super viewWillAppear:animated];
[self updateUI];
+
+ // Note: do not call "fetchReadMoreForTitle:" in updateUI! Because we
don't save the read more results to the data store, we need to fetch
+ // them, but not every time the card controller causes the ui to be
updated (ie on scroll as it recycles article views).
+ if (self.mode != WMFArticleControllerModeList) {
+ if (self.article.title) {
+ [self fetchReadMoreForTitle:self.article.title];
+ }
+ }
}
#pragma mark - UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView*)tableView {
- return 2;
+ return 3;
}
- (NSInteger)tableView:(UITableView*)tableView
numberOfRowsInSection:(NSInteger)section {
- if (section == 0) {
- return 1;
- } else {
- return self.article.sections.count - 1;
+ switch (section) {
+ case WMFArticleSectionTypeSummary:
+ return 1;
+ break;
+ case WMFArticleSectionTypeTOC:
+ return self.article.sections.count - 1;
+ break;
+ case WMFArticleSectionTypeReadMore:
+ return self.readMoreResults.articleCount;
+ break;
}
+ return 0;
+}
+
+- (void)makeCellDividerBeEdgeToEdge:(UITableViewCell*)cell {
+ cell.layoutMargins = UIEdgeInsetsZero;
+ cell.separatorInset = UIEdgeInsetsZero;
+ [cell setPreservesSuperviewLayoutMargins:NO];
}
- (UITableViewCell*)tableView:(UITableView*)tableView
cellForRowAtIndexPath:(NSIndexPath*)indexPath {
- if (indexPath.section == 0) {
- static NSString* cellID = @"WMFArticleExtractCell";
- WMFArticleExtractCell* cell = (WMFArticleExtractCell*)[tableView
dequeueReusableCellWithIdentifier:cellID];
+ switch (indexPath.section) {
+ case WMFArticleSectionTypeSummary: {
+ static NSString* cellID = @"WMFArticleExtractCell";
+ WMFArticleExtractCell* cell = (WMFArticleExtractCell*)[tableView
dequeueReusableCellWithIdentifier:cellID];
+ [cell setExtractText:[self.article shareSnippet]];
+ [self makeCellDividerBeEdgeToEdge:cell];
+ return cell;
+ }
+ break;
+ case WMFArticleSectionTypeTOC: {
+ static NSString* cellID = @"WMFArticleSectionCell";
+ WMFArticleSectionCell* cell = (WMFArticleSectionCell*)[tableView
dequeueReusableCellWithIdentifier:cellID];
+ cell.level = self.article.sections[indexPath.row +
1].level;
+ cell.titleLabel.text = [self.article.sections[indexPath.row +
1].line wmf_stringByRemovingHTML];
+ [self makeCellDividerBeEdgeToEdge:cell];
+ return cell;
+ }
+ break;
+ case WMFArticleSectionTypeReadMore: {
+ static NSString* cellID = @"WMFArticleReadMoreCell";
+ WMFArticleReadMoreCell* cell = (WMFArticleReadMoreCell*)[tableView
dequeueReusableCellWithIdentifier:cellID];
- [cell setExtractText:[self.article shareSnippet]];
+ MWKArticle* readMoreArticle =
self.readMoreResults.articles[indexPath.row];
- return cell;
- } else {
- static NSString* cellID = @"WMFArticleSectionCell";
- WMFArticleSectionCell* cell = (WMFArticleSectionCell*)[tableView
dequeueReusableCellWithIdentifier:cellID];
+ cell.titleLabel.text = readMoreArticle.title.text;
+ cell.descriptionLabel.text = readMoreArticle.entityDescription;
- cell.level = self.article.sections[indexPath.row + 1].level;
- cell.titleLabel.text = [self.article.sections[indexPath.row + 1].line
wmf_stringByRemovingHTML];
+ // Not sure why long titles won't wrap without this... the TOC
cells seem to...
+ [cell setNeedsDisplay];
+ [cell layoutIfNeeded];
- return cell;
+ [[WMFImageController sharedInstance] fetchImageWithURL:[NSURL
wmf_optionalURLWithString:readMoreArticle.thumbnailURL]].then(^(UIImage* image){
+ cell.thumbnailImageView.image = image;
+ }).catch(^(NSError* error){
+ NSLog(@"Image Fetch Error: %@", [error localizedDescription]);
+ });
+ [self makeCellDividerBeEdgeToEdge:cell];
+ return cell;
+ }
+ break;
}
+ return nil;
}
- (UIView*)tableView:(UITableView*)tableView
viewForHeaderInSection:(NSInteger)section {
@@ -306,11 +378,14 @@
- (void)configureHeaderCell:(WMFArticleSectionHeaderCell*)cell
inSection:(NSInteger)section {
switch (section) {
- case 0:
+ case WMFArticleSectionTypeSummary:
cell.sectionHeaderLabel.text = @"Summary";
break;
- case 1:
- cell.sectionHeaderLabel.text = @"Table of Contents";
+ case WMFArticleSectionTypeTOC:
+ cell.sectionHeaderLabel.text = @"Table of contents";
+ break;
+ case WMFArticleSectionTypeReadMore:
+ cell.sectionHeaderLabel.text = @"Read more";
break;
}
}
@@ -322,8 +397,13 @@
}
- (void)presentArticleScrolledToSectionForIndexPath:(NSIndexPath*)indexPath {
- NSString* fragment = (indexPath.section == 0) ? @"" :
self.article.sections[indexPath.row + 1].anchor;
- MWKTitle* title = [[MWKTitle alloc]
initWithSite:self.article.title.site normalizedTitle:self.article.title.text
fragment:fragment];
+ NSString* fragment = (indexPath.section == WMFArticleSectionTypeTOC) ?
self.article.sections[indexPath.row + 1].anchor : @"";
+
+ MWKSite* site = (indexPath.section == WMFArticleSectionTypeReadMore) ?
((MWKArticle*)self.readMoreResults.articles[indexPath.row]).site :
self.article.title.site;
+
+ NSString* fromTitleText = (indexPath.section ==
WMFArticleSectionTypeReadMore) ?
((MWKArticle*)self.readMoreResults.articles[indexPath.row]).title.text :
self.article.title.text;
+
+ MWKTitle* title = [[MWKTitle alloc] initWithSite:site
normalizedTitle:fromTitleText fragment:fragment];
WebViewController* webVC = [WebViewController
wmf_initialViewControllerFromClassStoryboard];
UINavigationController* nc = [[UINavigationController alloc]
initWithRootViewController:webVC];
diff --git a/Wikipedia/UI-V5/WMFArticleViewController.storyboard
b/Wikipedia/UI-V5/WMFArticleViewController.storyboard
index 7025619..c30aed5 100644
--- a/Wikipedia/UI-V5/WMFArticleViewController.storyboard
+++ b/Wikipedia/UI-V5/WMFArticleViewController.storyboard
@@ -138,6 +138,7 @@
</constraints>
</tableViewCellContentView>
<animations/>
+ <inset key="separatorInset" minX="0.0"
minY="0.0" maxX="0.0" maxY="0.0"/>
<connections>
<outlet property="label"
destination="iGc-nd-f1Y" id="gzy-Sm-n03"/>
</connections>
@@ -166,6 +167,7 @@
</constraints>
</tableViewCellContentView>
<animations/>
+ <inset key="separatorInset" minX="0.0"
minY="0.0" maxX="0.0" maxY="0.0"/>
<connections>
<outlet property="sectionHeaderLabel"
destination="it7-aT-0VE" id="hFm-sN-pgn"/>
</connections>
@@ -200,6 +202,65 @@
<outlet property="titleLabel"
destination="G5O-OT-rgO" id="GxH-Rt-4cg"/>
</connections>
</tableViewCell>
+ <tableViewCell contentMode="scaleToFill"
selectionStyle="default" indentationWidth="10"
reuseIdentifier="WMFArticleReadMoreCell" rowHeight="80" id="zjX-7k-CPE"
customClass="WMFArticleReadMoreCell">
+ <rect key="frame" x="0.0" y="0.0" width="600"
height="44"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <tableViewCellContentView key="contentView"
opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center"
tableViewCell="zjX-7k-CPE" id="nze-BW-utw">
+ <autoresizingMask key="autoresizingMask"/>
+ <subviews>
+ <view contentMode="scaleToFill"
translatesAutoresizingMaskIntoConstraints="NO" id="59N-e6-kQK">
+ <rect key="frame" x="10" y="10"
width="580" height="60"/>
+ <subviews>
+ <imageView clipsSubviews="YES"
userInteractionEnabled="NO" contentMode="scaleAspectFill"
horizontalHuggingPriority="251" verticalHuggingPriority="251"
image="logo-placeholder-search" translatesAutoresizingMaskIntoConstraints="NO"
id="9A4-UO-dRq">
+ <rect key="frame" x="0.0"
y="0.0" width="60" height="60"/>
+ <constraints>
+ <constraint
firstAttribute="height" priority="999" constant="60" id="XNN-TH-Cle"/>
+ <constraint
firstAttribute="width" constant="60" id="eJC-BC-qun"/>
+ </constraints>
+ </imageView>
+ <label opaque="NO"
userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="751"
verticalHuggingPriority="751" horizontalCompressionResistancePriority="751"
verticalCompressionResistancePriority="751" text="Label"
lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines"
adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO"
id="3Lp-j9-yQ7" userLabel="Title Label">
+ <rect key="frame" x="70"
y="0.0" width="510" height="21"/>
+ <fontDescription
key="fontDescription" type="system" pointSize="17"/>
+ <color key="textColor"
cocoaTouchSystemColor="darkTextColor"/>
+ <nil
key="highlightedColor"/>
+ </label>
+ <label opaque="NO"
userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="750"
verticalHuggingPriority="750" text="Label" lineBreakMode="wordWrap"
numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO"
translatesAutoresizingMaskIntoConstraints="NO" id="Pp3-fv-o0m"
userLabel="Description Label">
+ <rect key="frame" x="70"
y="21" width="510" height="40"/>
+ <fontDescription
key="fontDescription" type="system" pointSize="15"/>
+ <color key="textColor"
white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
+ <nil
key="highlightedColor"/>
+ </label>
+ </subviews>
+ <color key="backgroundColor"
white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <constraints>
+ <constraint
firstAttribute="trailing" secondItem="Pp3-fv-o0m" secondAttribute="trailing"
id="0sk-hE-9JS"/>
+ <constraint
firstItem="Pp3-fv-o0m" firstAttribute="top" secondItem="3Lp-j9-yQ7"
secondAttribute="bottom" id="4Sq-lF-Zpx"/>
+ <constraint
firstAttribute="height" relation="greaterThanOrEqual" priority="999"
constant="60" id="4wh-5r-ob1"/>
+ <constraint
firstItem="9A4-UO-dRq" firstAttribute="leading" secondItem="59N-e6-kQK"
secondAttribute="leading" id="7gP-Sk-lCf"/>
+ <constraint
firstItem="3Lp-j9-yQ7" firstAttribute="leading" secondItem="9A4-UO-dRq"
secondAttribute="trailing" constant="10" id="Oz1-rL-Qxx"/>
+ <constraint
firstAttribute="bottom" secondItem="Pp3-fv-o0m" secondAttribute="bottom"
id="QOk-iA-O4O"/>
+ <constraint
firstItem="9A4-UO-dRq" firstAttribute="top" secondItem="59N-e6-kQK"
secondAttribute="top" id="bag-RB-nau"/>
+ <constraint
firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="9A4-UO-dRq"
secondAttribute="bottom" id="dJV-dM-yPe"/>
+ <constraint
firstItem="Pp3-fv-o0m" firstAttribute="leading" secondItem="9A4-UO-dRq"
secondAttribute="trailing" constant="10" id="hcb-uk-IXS"/>
+ <constraint
firstItem="3Lp-j9-yQ7" firstAttribute="top" secondItem="59N-e6-kQK"
secondAttribute="top" id="rpi-31-ND4"/>
+ <constraint
firstAttribute="trailing" secondItem="3Lp-j9-yQ7" secondAttribute="trailing"
id="wtr-ra-xeG"/>
+ </constraints>
+ </view>
+ </subviews>
+ <constraints>
+ <constraint firstItem="59N-e6-kQK"
firstAttribute="leading" secondItem="nze-BW-utw" secondAttribute="leading"
constant="10" id="Bbn-WP-P9X"/>
+ <constraint firstItem="59N-e6-kQK"
firstAttribute="top" secondItem="nze-BW-utw" secondAttribute="top"
constant="10" id="WgN-AD-mK9"/>
+ <constraint firstAttribute="trailing"
secondItem="59N-e6-kQK" secondAttribute="trailing" constant="10"
id="jBg-Kg-TvC"/>
+ <constraint firstAttribute="bottom"
secondItem="59N-e6-kQK" secondAttribute="bottom" constant="10" id="sSM-aT-G7t"/>
+ </constraints>
+ </tableViewCellContentView>
+ <inset key="separatorInset" minX="0.0"
minY="0.0" maxX="0.0" maxY="0.0"/>
+ <connections>
+ <outlet property="descriptionLabel"
destination="Pp3-fv-o0m" id="RZk-hp-kM5"/>
+ <outlet property="thumbnailImageView"
destination="9A4-UO-dRq" id="A4K-YS-lmk"/>
+ <outlet property="titleLabel"
destination="3Lp-j9-yQ7" id="g0m-yK-sM3"/>
+ </connections>
+ </tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource"
destination="Btv-Tg-s8D" id="BrX-3O-uHU"/>
@@ -212,4 +273,7 @@
<point key="canvasLocation" x="2580" y="488"/>
</scene>
</scenes>
+ <resources>
+ <image name="logo-placeholder-search" width="55" height="55"/>
+ </resources>
</document>
diff --git a/Wikipedia/UI-V5/WMFSearchFetcher.h
b/Wikipedia/UI-V5/WMFSearchFetcher.h
index e0ed9ed..87f5bb2 100644
--- a/Wikipedia/UI-V5/WMFSearchFetcher.h
+++ b/Wikipedia/UI-V5/WMFSearchFetcher.h
@@ -1,5 +1,6 @@
#import <Foundation/Foundation.h>
+#import "SearchResultFetcher.h"
@class MWKSite;
@class WMFSearchResults;
@@ -19,6 +20,8 @@
- (AnyPromise*)searchFullArticleTextForSearchTerm:(NSString*)searchTerm
appendToPreviousResults:(WMFSearchResults*)results;
+- (AnyPromise*)searchArticleTitlesForSearchTerm:(NSString*)searchTerm
searchType:(SearchType)type;
+
@end
NS_ASSUME_NONNULL_END
\ No newline at end of file
diff --git a/Wikipedia/UI-V5/WMFSearchFetcher.m
b/Wikipedia/UI-V5/WMFSearchFetcher.m
index cc5296b..2e310c8 100644
--- a/Wikipedia/UI-V5/WMFSearchFetcher.m
+++ b/Wikipedia/UI-V5/WMFSearchFetcher.m
@@ -1,7 +1,6 @@
#import "WMFSearchFetcher.h"
#import "AFHTTPRequestOperationManager+WMFConfig.h"
-#import "SearchResultFetcher.h"
#import "WMFSearchResults.h"
#import "Wikipedia-Swift.h"
#import "PromiseKit.h"
diff --git a/Wikipedia/View Controllers/TableOfContents/TOCViewController.m
b/Wikipedia/View Controllers/TableOfContents/TOCViewController.m
index 6adc3aa..4a3fe29 100644
--- a/Wikipedia/View Controllers/TableOfContents/TOCViewController.m
+++ b/Wikipedia/View Controllers/TableOfContents/TOCViewController.m
@@ -592,14 +592,6 @@
[allSectionData addObject:sectionDict];
}
- // Add "read more" item to end of TOC.
- [allSectionData addObject:@{
- @"id": @(100000),
- @"isLead": @(NO),
- @"level": @0,
- @"title":
MWCurrentArticleLanguageLocalizedString(@"article-read-more-title", @"Read
more")
- }];
-
self.tocSectionData = allSectionData;
[self refreshForCurrentArticle];
}
diff --git a/Wikipedia/View
Controllers/WebView/Footer/SubFooters/Legal/WMFLegalFooterViewController.h
b/Wikipedia/View
Controllers/WebView/Footer/SubFooters/Legal/WMFLegalFooterViewController.h
deleted file mode 100644
index 83cb8f9..0000000
--- a/Wikipedia/View
Controllers/WebView/Footer/SubFooters/Legal/WMFLegalFooterViewController.h
+++ /dev/null
@@ -1,10 +0,0 @@
-// Created by Monte Hurd on 2/24/15.
-// Copyright (c) 2015 Wikimedia Foundation. Provided under MIT-style license;
please copy and modify!
-
-#import <UIKit/UIKit.h>
-
-@interface WMFLegalFooterViewController : UIViewController
-
-- (void)updateLocalizedText;
-
-@end
diff --git a/Wikipedia/View
Controllers/WebView/Footer/SubFooters/Legal/WMFLegalFooterViewController.m
b/Wikipedia/View
Controllers/WebView/Footer/SubFooters/Legal/WMFLegalFooterViewController.m
deleted file mode 100644
index 229ec8f..0000000
--- a/Wikipedia/View
Controllers/WebView/Footer/SubFooters/Legal/WMFLegalFooterViewController.m
+++ /dev/null
@@ -1,86 +0,0 @@
-// Created by Monte Hurd on 2/24/15.
-// Copyright (c) 2015 Wikimedia Foundation. Provided under MIT-style license;
please copy and modify!
-
-#import "WMFLegalFooterViewController.h"
-#import "NSString+FormattedAttributedString.h"
-#import "NSObject+ConstraintsScale.h"
-#import "WikipediaAppUtils.h"
-#import "PaddedLabel.h"
-#import "UIColor+WMFHexColor.h"
-#import "Defines.h"
-
-#pragma mark Font sizes
-
-static CGFloat const kLicenseFontSize = 10.0f;
-
-#pragma mark Colors
-
-static NSInteger const kLicenseTextColor = 0x565656;
-static NSInteger const kLicenseNameColor = 0x566893;
-
-#pragma mark License URL
-
-NSString* const kLicenseTitleOnENWiki =
-
@"Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License";
-
-#pragma mark Private properties
-
-@interface WMFLegalFooterViewController ()
-
-@property (nonatomic, weak) IBOutlet PaddedLabel* licenseLabel;
-@property (nonatomic, weak) IBOutlet UIImageView* wordmarkImageView;
-
-@end
-
-@implementation WMFLegalFooterViewController
-
-#pragma mark Setup / view lifecycle
-
-- (void)viewDidLoad {
- [super viewDidLoad];
- [self updateLocalizedText];
- [self adjustConstraintsScaleForViews:@[self.licenseLabel,
self.wordmarkImageView]];
-}
-
-#pragma mark Style
-
-- (NSAttributedString*)getAttributedStringForLicense {
- NSDictionary* baseStyle =
- @{
- NSForegroundColorAttributeName: [UIColor
wmf_colorWithHex:kLicenseTextColor alpha:1.0],
- NSFontAttributeName: [UIFont systemFontOfSize:kLicenseFontSize *
MENUS_SCALE_MULTIPLIER]
- };
-
- NSDictionary* substitutionStyle =
- @{
- NSForegroundColorAttributeName: [UIColor
wmf_colorWithHex:kLicenseNameColor alpha:1.0],
- NSFontAttributeName: [UIFont systemFontOfSize:kLicenseFontSize *
MENUS_SCALE_MULTIPLIER]
- };
-
- NSString* footerText =
MWCurrentArticleLanguageLocalizedString(@"license-footer-text", nil);
-
- return
- [footerText attributedStringWithAttributes:baseStyle
-
substitutionStrings:@[MWCurrentArticleLanguageLocalizedString(@"license-footer-name",
nil)]
- substitutionAttributes:@[substitutionStyle]];
-}
-
-- (void)updateLocalizedText {
- self.licenseLabel.attributedText = [self getAttributedStringForLicense];
-}
-
-#pragma mark Tap gesture handling
-
-- (IBAction)licenseTapped:(id)sender {
- MWKSite* site = [[MWKSite alloc] initWithDomain:@"wikipedia.org"
language:@"en"];
- [[WMFArticlePresenter sharedInstance] presentArticleWithTitle:[site
titleWithString:kLicenseTitleOnENWiki]
-
discoveryMethod:MWKHistoryDiscoveryMethodSearch];
-}
-
-#pragma mark Memory
-
-- (void)didReceiveMemoryWarning {
- [super didReceiveMemoryWarning];
-}
-
-@end
diff --git a/Wikipedia/View
Controllers/WebView/Footer/SubFooters/Legal/WMFLegalFooterViewController.xib
b/Wikipedia/View
Controllers/WebView/Footer/SubFooters/Legal/WMFLegalFooterViewController.xib
deleted file mode 100644
index 13106e7..0000000
--- a/Wikipedia/View
Controllers/WebView/Footer/SubFooters/Legal/WMFLegalFooterViewController.xib
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0"
toolsVersion="6254" systemVersion="14C109" targetRuntime="iOS.CocoaTouch"
propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
- <dependencies>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version="6247"/>
- </dependencies>
- <objects>
- <placeholder placeholderIdentifier="IBFilesOwner" id="-1"
userLabel="File's Owner" customClass="WMFLegalFooterViewController">
- <connections>
- <outlet property="licenseLabel" destination="58r-oL-D8g"
id="nlZ-cj-cF7"/>
- <outlet property="view" destination="i5M-Pr-FkT"
id="sfx-zR-JGt"/>
- <outlet property="wordmarkImageView" destination="aOI-9i-zmL"
id="BXA-Y3-gb0"/>
- </connections>
- </placeholder>
- <placeholder placeholderIdentifier="IBFirstResponder" id="-2"
customClass="UIResponder"/>
- <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill"
id="i5M-Pr-FkT">
- <rect key="frame" x="0.0" y="0.0" width="284" height="67"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES"
heightSizable="YES"/>
- <subviews>
- <imageView userInteractionEnabled="NO"
contentMode="scaleAspectFit" horizontalHuggingPriority="251"
verticalHuggingPriority="251" image="WikipediaWordmark"
translatesAutoresizingMaskIntoConstraints="NO" id="aOI-9i-zmL">
- <rect key="frame" x="86" y="0.0" width="112" height="16"/>
- <color key="backgroundColor" white="0.0" alpha="0.0"
colorSpace="calibratedWhite"/>
- <constraints>
- <constraint firstAttribute="height" constant="16"
id="PZB-PN-taU"/>
- <constraint firstAttribute="width" constant="112"
id="UcN-ol-35C"/>
- </constraints>
- </imageView>
- <label opaque="NO" contentMode="left"
horizontalHuggingPriority="251" verticalHuggingPriority="251" text=""
textAlignment="center" lineBreakMode="wordWrap" numberOfLines="0"
baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO"
translatesAutoresizingMaskIntoConstraints="NO" id="58r-oL-D8g"
userLabel="License label" customClass="PaddedLabel">
- <rect key="frame" x="0.0" y="26" width="284" height="31"/>
- <gestureRecognizers/>
- <fontDescription key="fontDescription" type="system"
pointSize="10"/>
- <color key="textColor"
cocoaTouchSystemColor="darkTextColor"/>
- <nil key="highlightedColor"/>
- <connections>
- <outletCollection property="gestureRecognizers"
destination="nPt-LV-uzV" appends="YES" id="Y7z-YD-FwN"/>
- </connections>
- </label>
- </subviews>
- <color key="backgroundColor" white="0.0" alpha="0.0"
colorSpace="calibratedWhite"/>
- <constraints>
- <constraint firstItem="58r-oL-D8g" firstAttribute="top"
secondItem="aOI-9i-zmL" secondAttribute="bottom" constant="10" id="1Ve-Eu-ZaU"/>
- <constraint firstAttribute="bottom" secondItem="58r-oL-D8g"
secondAttribute="bottom" constant="10" id="C8W-en-Vy8"/>
- <constraint firstItem="aOI-9i-zmL" firstAttribute="top"
secondItem="i5M-Pr-FkT" secondAttribute="top" id="W9I-lT-54a"/>
- <constraint firstAttribute="centerX" secondItem="aOI-9i-zmL"
secondAttribute="centerX" id="ecI-L1-uR4"/>
- <constraint firstAttribute="trailing" secondItem="58r-oL-D8g"
secondAttribute="trailing" id="eix-Vq-gWR"/>
- <constraint firstItem="58r-oL-D8g" firstAttribute="leading"
secondItem="i5M-Pr-FkT" secondAttribute="leading" id="seG-Ke-gDp"/>
- </constraints>
- <nil key="simulatedStatusBarMetrics"/>
- <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
- <point key="canvasLocation" x="418" y="233.5"/>
- </view>
- <tapGestureRecognizer id="nPt-LV-uzV">
- <connections>
- <action selector="licenseTapped:" destination="-1"
id="XLl-8B-uIa"/>
- </connections>
- </tapGestureRecognizer>
- </objects>
- <resources>
- <image name="WikipediaWordmark" width="112" height="17"/>
- </resources>
-</document>
diff --git a/Wikipedia/View
Controllers/WebView/Footer/SubFooters/Options/WMFOptionsFooterViewController.h
b/Wikipedia/View
Controllers/WebView/Footer/SubFooters/Options/WMFOptionsFooterViewController.h
deleted file mode 100644
index 50ee47e..0000000
--- a/Wikipedia/View
Controllers/WebView/Footer/SubFooters/Options/WMFOptionsFooterViewController.h
+++ /dev/null
@@ -1,10 +0,0 @@
-// Created by Monte Hurd on 2/24/15.
-// Copyright (c) 2015 Wikimedia Foundation. Provided under MIT-style license;
please copy and modify!
-
-#import <UIKit/UIKit.h>
-
-@interface WMFOptionsFooterViewController : UIViewController
-
-- (void)updateLastModifiedDate:(NSDate*)date userName:(NSString*)userName;
-
-@end
diff --git a/Wikipedia/View
Controllers/WebView/Footer/SubFooters/Options/WMFOptionsFooterViewController.m
b/Wikipedia/View
Controllers/WebView/Footer/SubFooters/Options/WMFOptionsFooterViewController.m
deleted file mode 100644
index 03aad10..0000000
--- a/Wikipedia/View
Controllers/WebView/Footer/SubFooters/Options/WMFOptionsFooterViewController.m
+++ /dev/null
@@ -1,117 +0,0 @@
-// Created by Monte Hurd on 2/24/15.
-// Copyright (c) 2015 Wikimedia Foundation. Provided under MIT-style license;
please copy and modify!
-
-#import "WMFOptionsFooterViewController.h"
-#import "PaddedLabel.h"
-#import "WikipediaAppUtils.h"
-#import "WikiGlyph_Chars.h"
-#import "WikiGlyphLabel.h"
-#import "WMF_Colors.h"
-#import "Defines.h"
-#import "NSObject+ConstraintsScale.h"
-#import "NSString+FormattedAttributedString.h"
-#import "UIColor+WMFHexColor.h"
-#import "UIView+WMFRoundCorners.h"
-#import "UIViewController+WMFStoryboardUtilities.h"
-#import "PageHistoryViewController.h"
-
-#pragma mark Font sizes
-
-static CGFloat const kGlyphButtonFontSize = 23.0f;
-static CGFloat const kOptionTextFontSize = 12.0f;
-static CGFloat const kOptionTextLineSpacing = 2.0f;
-
-#pragma mark Colors
-
-static NSInteger const kBaseTextColor = 0x565656;
-
-static NSInteger const kLastModGlyphBackgroundColor = 0x565656;
-static NSInteger const kLastModGlyphForgroundColor = 0xffffff;
-static NSInteger const kLastModTimestampColor = 0x565656;
-static NSInteger const kLastModUsernameColor = 0x565656;
-
-#pragma mark Glyph icon
-
-static CGFloat const kGlyphIconBaselineOffset = 1.6f;
-
-#pragma mark Private properties
-
-@interface WMFOptionsFooterViewController ()
-
-@property (nonatomic, weak) IBOutlet WikiGlyphLabel* lastModGlyphLabel;
-@property (nonatomic, weak) IBOutlet PaddedLabel* lastModLabel;
-
-@end
-
-@implementation WMFOptionsFooterViewController
-
-#pragma mark Setup / view lifecycle
-
-- (void)viewDidLoad {
- [super viewDidLoad];
- [self adjustConstraintsScaleForViews:@[self.lastModGlyphLabel,
self.lastModLabel]];
-}
-
-- (void)viewDidAppear:(BOOL)animated {
- [super viewDidAppear:animated];
- // must be done after layout to ensure the view's width is correct before
rounding. using viewDidAppear since the
- // button shouldn't be resizing in response to rotation
- [self roundGlyphButtonCorners];
-}
-
-#pragma mark Style
-
-- (void)roundGlyphButtonCorners {
- [self.lastModGlyphLabel wmf_makeCircular];
- self.lastModGlyphLabel.clipsToBounds = YES;
-}
-
-- (NSDictionary*)getOptionTextBaseAttributes {
- NSMutableParagraphStyle* paragraphStyle = [[NSMutableParagraphStyle alloc]
init];
- paragraphStyle.lineSpacing = kOptionTextLineSpacing *
MENUS_SCALE_MULTIPLIER;
- return @{
- NSFontAttributeName: [UIFont
systemFontOfSize:kOptionTextFontSize * MENUS_SCALE_MULTIPLIER],
- NSForegroundColorAttributeName: [UIColor
wmf_colorWithHex:kBaseTextColor alpha:1.0],
- NSParagraphStyleAttributeName: paragraphStyle
- };
-}
-
-- (NSDictionary*)getSubstitutionTextAttributesWithColor:(NSInteger)hexColor {
- return @{
- NSFontAttributeName: [UIFont
systemFontOfSize:kOptionTextFontSize * MENUS_SCALE_MULTIPLIER],
- NSForegroundColorAttributeName: [UIColor
wmf_colorWithHex:hexColor alpha:1.0]
- };
-}
-
-#pragma mark Last modified option
-
-- (void)updateLastModifiedDate:(NSDate*)date userName:(NSString*)userName {
- self.lastModLabel.attributedText = [self
getAttributedStringForOptionLastModifiedByUserName:userName date:date];
-
- self.lastModGlyphLabel.backgroundColor = [UIColor
wmf_colorWithHex:kLastModGlyphBackgroundColor alpha:1.0];
- [self.lastModGlyphLabel setWikiText:WIKIGLYPH_PENCIL
- color:[UIColor
wmf_colorWithHex:kLastModGlyphForgroundColor alpha:1.0]
- size:kGlyphButtonFontSize *
MENUS_SCALE_MULTIPLIER
- baselineOffset:kGlyphIconBaselineOffset];
-}
-
--
(NSAttributedString*)getAttributedStringForOptionLastModifiedByUserName:(NSString*)userName
date:(NSDate*)date {
- NSString* relativeTimeStamp = [WikipediaAppUtils relativeTimestamp:date];
- NSString* lastModString = userName ?
-
MWCurrentArticleLanguageLocalizedString(@"lastmodified-by-user", nil)
- :
MWCurrentArticleLanguageLocalizedString(@"lastmodified-by-anon", nil);
- return [lastModString
- attributedStringWithAttributes:[self getOptionTextBaseAttributes]
- substitutionStrings:@[relativeTimeStamp, (userName ?
userName : @"")]
- substitutionAttributes:@[[self
getSubstitutionTextAttributesWithColor:kLastModTimestampColor],
- [self
getSubstitutionTextAttributesWithColor:kLastModUsernameColor]]];
-}
-
-#pragma mark Tap gesture handling
-
-- (IBAction)historyOptionTapped:(id)sender {
- UINavigationController* nc = [[UINavigationController alloc]
initWithRootViewController:[PageHistoryViewController
wmf_initialViewControllerFromClassStoryboard]];
- [self presentViewController:nc animated:YES completion:nil];
-}
-
-@end
diff --git a/Wikipedia/View
Controllers/WebView/Footer/SubFooters/Options/WMFOptionsFooterViewController.xib
b/Wikipedia/View
Controllers/WebView/Footer/SubFooters/Options/WMFOptionsFooterViewController.xib
deleted file mode 100644
index 3c363b7..0000000
--- a/Wikipedia/View
Controllers/WebView/Footer/SubFooters/Options/WMFOptionsFooterViewController.xib
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0"
toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch"
propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
- <dependencies>
- <deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version="7703"/>
- </dependencies>
- <objects>
- <placeholder placeholderIdentifier="IBFilesOwner" id="-1"
userLabel="File's Owner" customClass="WMFOptionsFooterViewController">
- <connections>
- <outlet property="lastModGlyphLabel" destination="zuf-2Y-bSx"
id="izt-ft-K21"/>
- <outlet property="lastModLabel" destination="GB1-DG-j0o"
id="EWQ-ta-h5P"/>
- <outlet property="view" destination="i5M-Pr-FkT"
id="sfx-zR-JGt"/>
- </connections>
- </placeholder>
- <placeholder placeholderIdentifier="IBFirstResponder" id="-2"
customClass="UIResponder"/>
- <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill"
id="i5M-Pr-FkT">
- <rect key="frame" x="0.0" y="0.0" width="374" height="153"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES"
heightSizable="YES"/>
- <subviews>
- <view contentMode="scaleToFill"
translatesAutoresizingMaskIntoConstraints="NO" id="co2-1E-fU5">
- <rect key="frame" x="47" y="20" width="280" height="108"/>
- <subviews>
- <label opaque="NO" contentMode="left"
horizontalHuggingPriority="251" verticalHuggingPriority="251" text=""
textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0"
baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO"
translatesAutoresizingMaskIntoConstraints="NO" id="zuf-2Y-bSx" userLabel="Last
Modified Glyph Label" customClass="WikiGlyphLabel">
- <rect key="frame" x="8" y="8" width="43"
height="43"/>
- <gestureRecognizers/>
- <constraints>
- <constraint firstAttribute="height"
constant="43" id="DBA-Ac-KZs"/>
- <constraint firstAttribute="width"
constant="43" id="Wb8-in-yps"/>
- </constraints>
- <fontDescription key="fontDescription"
type="system" pointSize="17"/>
- <color key="textColor"
cocoaTouchSystemColor="darkTextColor"/>
- <nil key="highlightedColor"/>
- <connections>
- <outletCollection
property="gestureRecognizers" destination="Ixc-vZ-ad3" appends="YES"
id="3zp-ej-2fw"/>
- </connections>
- </label>
- <label opaque="NO" contentMode="left"
horizontalHuggingPriority="252" text="" lineBreakMode="wordWrap"
numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO"
translatesAutoresizingMaskIntoConstraints="NO" id="GB1-DG-j0o" userLabel="Last
Modified Label" customClass="PaddedLabel">
- <rect key="frame" x="60" y="8" width="212"
height="87"/>
- <gestureRecognizers/>
- <constraints>
- <constraint firstAttribute="height"
relation="greaterThanOrEqual" constant="40" id="E8z-Uj-bM6"/>
- </constraints>
- <fontDescription key="fontDescription"
type="system" pointSize="15"/>
- <color key="textColor"
cocoaTouchSystemColor="darkTextColor"/>
- <nil key="highlightedColor"/>
- <connections>
- <outletCollection
property="gestureRecognizers" destination="rdB-SV-e3J" appends="YES"
id="iv1-bO-r19"/>
- </connections>
- </label>
- </subviews>
- <color key="backgroundColor" white="0.0" alpha="0.0"
colorSpace="calibratedWhite"/>
- <constraints>
- <constraint firstItem="zuf-2Y-bSx"
firstAttribute="top" secondItem="GB1-DG-j0o" secondAttribute="top"
id="2H3-ZU-hGB"/>
- <constraint firstItem="zuf-2Y-bSx"
firstAttribute="leading" secondItem="co2-1E-fU5" secondAttribute="leading"
constant="8" id="69v-TI-8d2"/>
- <constraint firstAttribute="trailing"
secondItem="GB1-DG-j0o" secondAttribute="trailing" constant="8"
id="Foq-yI-icN"/>
- <constraint firstItem="GB1-DG-j0o"
firstAttribute="top" secondItem="co2-1E-fU5" secondAttribute="top" constant="8"
id="JO3-S5-cKr"/>
- <constraint firstAttribute="bottom"
secondItem="GB1-DG-j0o" secondAttribute="bottom" constant="13" id="bdY-9v-qeS"/>
- <constraint firstItem="GB1-DG-j0o"
firstAttribute="leading" secondItem="zuf-2Y-bSx" secondAttribute="trailing"
constant="9" id="buL-3h-2qy"/>
- <constraint firstAttribute="width" constant="280"
id="ieg-NH-79c"/>
- </constraints>
- </view>
- </subviews>
- <color key="backgroundColor" white="0.0" alpha="0.0"
colorSpace="calibratedWhite"/>
- <constraints>
- <constraint firstItem="co2-1E-fU5" firstAttribute="top"
secondItem="i5M-Pr-FkT" secondAttribute="top" constant="20" id="7u2-fw-zub"/>
- <constraint firstAttribute="bottom" secondItem="co2-1E-fU5"
secondAttribute="bottom" constant="25" id="ehD-Kr-PJd"/>
- <constraint firstAttribute="centerX" secondItem="co2-1E-fU5"
secondAttribute="centerX" id="uMR-0j-zEc"/>
- </constraints>
- <nil key="simulatedStatusBarMetrics"/>
- <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
- <point key="canvasLocation" x="230" y="266.5"/>
- </view>
- <tapGestureRecognizer id="Ixc-vZ-ad3">
- <connections>
- <action selector="historyOptionTapped:" destination="-1"
id="6bz-IO-pIr"/>
- </connections>
- </tapGestureRecognizer>
- <tapGestureRecognizer id="rdB-SV-e3J">
- <connections>
- <action selector="historyOptionTapped:" destination="-1"
id="DeI-ID-xLt"/>
- </connections>
- </tapGestureRecognizer>
- </objects>
-</document>
diff --git a/Wikipedia/View
Controllers/WebView/Footer/SubFooters/ReadMore/WMFReadMoreViewController.h
b/Wikipedia/View
Controllers/WebView/Footer/SubFooters/ReadMore/WMFReadMoreViewController.h
deleted file mode 100644
index 931447f..0000000
--- a/Wikipedia/View
Controllers/WebView/Footer/SubFooters/ReadMore/WMFReadMoreViewController.h
+++ /dev/null
@@ -1,16 +0,0 @@
-// Created by Monte Hurd on 2/27/15.
-// Copyright (c) 2015 Wikimedia Foundation. Provided under MIT-style license;
please copy and modify!
-
-#import <UIKit/UIKit.h>
-
-@class PaddedLabel, SearchResultsController;
-
-@interface WMFReadMoreViewController : UIViewController
-
-@property (strong, nonatomic) NSString* searchString;
-
-@property (strong, nonatomic) NSArray* articlesToExcludeFromResults;
-
-- (void)search;
-
-@end
diff --git a/Wikipedia/View
Controllers/WebView/Footer/SubFooters/ReadMore/WMFReadMoreViewController.m
b/Wikipedia/View
Controllers/WebView/Footer/SubFooters/ReadMore/WMFReadMoreViewController.m
deleted file mode 100644
index 7365ee7..0000000
--- a/Wikipedia/View
Controllers/WebView/Footer/SubFooters/ReadMore/WMFReadMoreViewController.m
+++ /dev/null
@@ -1,53 +0,0 @@
-// Created by Monte Hurd on 2/27/15.
-// Copyright (c) 2015 Wikimedia Foundation. Provided under MIT-style license;
please copy and modify!
-
-#import "WMFReadMoreViewController.h"
-#import "PaddedLabel.h"
-#import "SearchResultsController.h"
-#import "WikipediaAppUtils.h"
-#import "UIViewController+WMFChildViewController.h"
-#import "Defines.h"
-#import "NSObject+ConstraintsScale.h"
-
-@interface WMFReadMoreViewController ()
-
-@property (weak, nonatomic) IBOutlet PaddedLabel* titleLabel;
-@property (weak, nonatomic) IBOutlet UIView* optionsContainerView;
-@property (strong, nonatomic) SearchResultsController*
searchSuggestionsController;
-
-@end
-
-@implementation WMFReadMoreViewController
-
-- (void)viewDidLoad {
- [super viewDidLoad];
-
- self.searchSuggestionsController = [SearchResultsController
readMoreSearchResultsController];
- [self wmf_addChildController:self.searchSuggestionsController
andConstrainToEdgesOfContainerView:self.optionsContainerView];
-
- self.titleLabel.padding = UIEdgeInsetsMake(0, 0, 20, 10);
- self.titleLabel.font = [UIFont fontWithName:@"Times New Roman"
size:26.0f * MENUS_SCALE_MULTIPLIER];
- [self updateLocalizedText];
-
- self.view.layer.cornerRadius = 2.0f * MENUS_SCALE_MULTIPLIER;
- self.view.clipsToBounds = YES;
-
- [self adjustConstraintsScaleForViews:@[self.titleLabel,
self.optionsContainerView]];
-}
-
-- (void)updateLocalizedText {
- self.titleLabel.text =
MWCurrentArticleLanguageLocalizedString(@"article-read-more-title", @"Read
more");
-}
-
-- (void)search {
- [self updateLocalizedText];
- self.searchSuggestionsController.searchString =
self.searchString;
- self.searchSuggestionsController.articlesToExcludeFromResults =
self.articlesToExcludeFromResults;
- [self.searchSuggestionsController search];
-}
-
-- (void)didReceiveMemoryWarning {
- [super didReceiveMemoryWarning];
-}
-
-@end
diff --git a/Wikipedia/View
Controllers/WebView/Footer/SubFooters/ReadMore/WMFReadMoreViewController.xib
b/Wikipedia/View
Controllers/WebView/Footer/SubFooters/ReadMore/WMFReadMoreViewController.xib
deleted file mode 100644
index e1c13e5..0000000
--- a/Wikipedia/View
Controllers/WebView/Footer/SubFooters/ReadMore/WMFReadMoreViewController.xib
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0"
toolsVersion="7702" systemVersion="14D136" targetRuntime="iOS.CocoaTouch"
propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
- <dependencies>
- <deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version="7701"/>
- </dependencies>
- <objects>
- <placeholder placeholderIdentifier="IBFilesOwner" id="-1"
userLabel="File's Owner" customClass="WMFReadMoreViewController">
- <connections>
- <outlet property="optionsContainerView"
destination="Cpj-Cw-5qr" id="X6Y-9t-8Tf"/>
- <outlet property="titleLabel" destination="Arv-De-R5I"
id="741-78-TlJ"/>
- <outlet property="view" destination="i5M-Pr-FkT"
id="sfx-zR-JGt"/>
- </connections>
- </placeholder>
- <placeholder placeholderIdentifier="IBFirstResponder" id="-2"
customClass="UIResponder"/>
- <view clipsSubviews="YES" clearsContextBeforeDrawing="NO"
contentMode="scaleToFill" id="i5M-Pr-FkT">
- <rect key="frame" x="0.0" y="0.0" width="306" height="228"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES"
heightSizable="YES"/>
- <subviews>
- <view contentMode="scaleToFill"
translatesAutoresizingMaskIntoConstraints="NO" id="RVx-k8-bpa">
- <rect key="frame" x="0.0" y="0.0" width="306"
height="228"/>
- <subviews>
- <label opaque="NO" userInteractionEnabled="NO"
contentMode="left" horizontalHuggingPriority="251"
verticalHuggingPriority="251" text="" lineBreakMode="wordWrap"
numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO"
translatesAutoresizingMaskIntoConstraints="NO" id="Arv-De-R5I" userLabel="Read
more label" customClass="PaddedLabel">
- <rect key="frame" x="0.0" y="0.0" width="306"
height="44"/>
- <constraints>
- <constraint firstAttribute="height"
constant="44" placeholder="YES" id="WYo-aP-Yp3"/>
- </constraints>
- <fontDescription key="fontDescription"
type="system" pointSize="17"/>
- <color key="textColor"
cocoaTouchSystemColor="darkTextColor"/>
- <nil key="highlightedColor"/>
- </label>
- <view contentMode="scaleToFill"
translatesAutoresizingMaskIntoConstraints="NO" id="Cpj-Cw-5qr"
userLabel="Options container view">
- <rect key="frame" x="0.0" y="44" width="306"
height="170"/>
- <color key="backgroundColor" white="1" alpha="1"
colorSpace="calibratedWhite"/>
- </view>
- </subviews>
- <color key="backgroundColor" white="1" alpha="1"
colorSpace="calibratedWhite"/>
- <constraints>
- <constraint firstItem="Cpj-Cw-5qr"
firstAttribute="top" secondItem="Arv-De-R5I" secondAttribute="bottom"
id="8QP-jU-xn5"/>
- <constraint firstAttribute="bottom"
secondItem="Cpj-Cw-5qr" secondAttribute="bottom" constant="14" id="Aw4-Tv-dFI"/>
- <constraint firstItem="Arv-De-R5I"
firstAttribute="leading" secondItem="RVx-k8-bpa" secondAttribute="leading"
id="Csc-e8-rpt"/>
- <constraint firstItem="Arv-De-R5I"
firstAttribute="top" secondItem="RVx-k8-bpa" secondAttribute="top"
id="E5u-hx-GnZ"/>
- <constraint firstAttribute="trailing"
secondItem="Arv-De-R5I" secondAttribute="trailing" id="MXn-lb-yYu"/>
- <constraint firstAttribute="trailing"
secondItem="Cpj-Cw-5qr" secondAttribute="trailing" id="SvC-0M-8K3"/>
- <constraint firstItem="Cpj-Cw-5qr"
firstAttribute="leading" secondItem="RVx-k8-bpa" secondAttribute="leading"
id="V8R-fN-oPZ"/>
- </constraints>
- </view>
- </subviews>
- <color key="backgroundColor" white="1" alpha="1"
colorSpace="custom" customColorSpace="calibratedWhite"/>
- <constraints>
- <constraint firstItem="RVx-k8-bpa" firstAttribute="leading"
secondItem="i5M-Pr-FkT" secondAttribute="leading" id="exL-vz-Fem"/>
- <constraint firstAttribute="trailing" secondItem="RVx-k8-bpa"
secondAttribute="trailing" id="il5-BS-jf6"/>
- <constraint firstAttribute="bottom" secondItem="RVx-k8-bpa"
secondAttribute="bottom" id="jDy-v7-x0J"/>
- <constraint firstItem="RVx-k8-bpa" firstAttribute="top"
secondItem="i5M-Pr-FkT" secondAttribute="top" id="jI3-q2-bsB"/>
- </constraints>
- <nil key="simulatedStatusBarMetrics"/>
- <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
- <point key="canvasLocation" x="313" y="244"/>
- </view>
- </objects>
-</document>
diff --git a/Wikipedia/View
Controllers/WebView/Footer/WMFWebViewFooterViewController.h b/Wikipedia/View
Controllers/WebView/Footer/WMFWebViewFooterViewController.h
deleted file mode 100644
index a4f7160..0000000
--- a/Wikipedia/View Controllers/WebView/Footer/WMFWebViewFooterViewController.h
+++ /dev/null
@@ -1,15 +0,0 @@
-// Created by Monte Hurd on 3/2/15.
-// Copyright (c) 2015 Wikimedia Foundation. Provided under MIT-style license;
please copy and modify!
-
-#import <UIKit/UIKit.h>
-
-@class MWKArticle;
-
-@interface WMFWebViewFooterViewController : UIViewController
-
-- (void)updateReadMoreForArticle:(MWKArticle*)article;
-
-- (void)updateLastModifiedDate:(NSDate*)date userName:(NSString*)userName;
-- (void)updateLegalFooterLocalizedText;
-
-@end
diff --git a/Wikipedia/View
Controllers/WebView/Footer/WMFWebViewFooterViewController.m b/Wikipedia/View
Controllers/WebView/Footer/WMFWebViewFooterViewController.m
deleted file mode 100644
index 65823e4..0000000
--- a/Wikipedia/View Controllers/WebView/Footer/WMFWebViewFooterViewController.m
+++ /dev/null
@@ -1,76 +0,0 @@
-// Created by Monte Hurd on 3/2/15.
-// Copyright (c) 2015 Wikimedia Foundation. Provided under MIT-style license;
please copy and modify!
-
-#import "WMFWebViewFooterViewController.h"
-#import "UIViewController+WMFChildViewController.h"
-#import "WMFOptionsFooterViewController.h"
-#import "WMFLegalFooterViewController.h"
-#import "WMFReadMoreViewController.h"
-#import "MWKArticle.h"
-#import "MWKTitle.h"
-
-#import <Masonry/Masonry.h>
-
-@interface WMFWebViewFooterViewController ()
-
-@property (strong, nonatomic) WMFOptionsFooterViewController*
optionsController;
-@property (strong, nonatomic) WMFReadMoreViewController*
readMoreViewController;
-@property (strong, nonatomic) WMFLegalFooterViewController*
legalViewController;
-
-@property (weak, nonatomic) IBOutlet UIView* container;
-
-@property (weak, nonatomic) IBOutlet UIView* readMoreSubContainerView;
-@property (weak, nonatomic) IBOutlet UIView* optionsSubContainerView;
-@property (weak, nonatomic) IBOutlet UIView* legalSubContainerView;
-
-@end
-
-@implementation WMFWebViewFooterViewController
-
-- (void)viewDidLoad {
- [super viewDidLoad];
- [self setupSubFooterContainers];
-}
-
-- (void)setupSubFooterContainers {
- self.readMoreViewController = [[WMFReadMoreViewController alloc] init];
- [self wmf_addChildController:self.readMoreViewController
andConstrainToEdgesOfContainerView:self.readMoreSubContainerView];
-
- self.optionsController = [[WMFOptionsFooterViewController alloc] init];
- [self wmf_addChildController:self.optionsController
- andConstrainToEdgesOfContainerView:self.optionsSubContainerView];
-
- self.legalViewController = [[WMFLegalFooterViewController alloc] init];
- [self wmf_addChildController:self.legalViewController
andConstrainToEdgesOfContainerView:self.legalSubContainerView];
-}
-
-- (CGFloat)footerHeight {
- // Find the overall height of the content shown by the web footer.
- // Note: can't just use self.view's height because it extends down farther
than the sub-containers' content.
- // We need the containerContainer's height plus any top padding, which the
line below provides.
- CGPoint p = [self.container convertPoint:CGPointMake(0,
self.container.frame.size.height) toView:self.view];
- return p.y;
-}
-
-- (void)search {
-}
-
-- (void)updateReadMoreForArticle:(MWKArticle*)article {
- self.readMoreViewController.searchString =
article.title.text;
- self.readMoreViewController.articlesToExcludeFromResults = @[article];
- [self.readMoreViewController search];
-}
-
-- (void)updateLastModifiedDate:(NSDate*)date userName:(NSString*)userName {
- [self.optionsController updateLastModifiedDate:date userName:userName];
-}
-
-- (void)updateLegalFooterLocalizedText {
- [self.legalViewController updateLocalizedText];
-}
-
-- (void)didReceiveMemoryWarning {
- [super didReceiveMemoryWarning];
-}
-
-@end
diff --git a/Wikipedia/View
Controllers/WebView/Footer/WMFWebViewFooterViewController.xib b/Wikipedia/View
Controllers/WebView/Footer/WMFWebViewFooterViewController.xib
deleted file mode 100644
index 8b210a4..0000000
--- a/Wikipedia/View
Controllers/WebView/Footer/WMFWebViewFooterViewController.xib
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0"
toolsVersion="7702" systemVersion="14D136" targetRuntime="iOS.CocoaTouch"
propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
- <dependencies>
- <deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version="7702"/>
- </dependencies>
- <objects>
- <placeholder placeholderIdentifier="IBFilesOwner" id="-1"
userLabel="File's Owner" customClass="WMFWebViewFooterViewController">
- <connections>
- <outlet property="container" destination="Dh1-J0-8gD"
id="jbN-jx-ivs"/>
- <outlet property="legalSubContainerView"
destination="3BA-2M-FfO" id="3XT-Hd-D1F"/>
- <outlet property="optionsSubContainerView"
destination="bY3-nl-Jig" id="c9Z-oy-mKS"/>
- <outlet property="readMoreSubContainerView"
destination="w0a-mT-r7z" id="F0Q-ub-NAf"/>
- <outlet property="view" destination="i5M-Pr-FkT"
id="sfx-zR-JGt"/>
- </connections>
- </placeholder>
- <placeholder placeholderIdentifier="IBFirstResponder" id="-2"
customClass="UIResponder"/>
- <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill"
id="i5M-Pr-FkT">
- <rect key="frame" x="0.0" y="0.0" width="291" height="336"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES"
heightSizable="YES"/>
- <subviews>
- <view contentMode="scaleToFill"
translatesAutoresizingMaskIntoConstraints="NO" id="Dh1-J0-8gD"
userLabel="Sub-container container">
- <rect key="frame" x="16" y="16" width="259" height="300"/>
- <subviews>
- <view contentMode="scaleToFill"
translatesAutoresizingMaskIntoConstraints="NO" id="w0a-mT-r7z" userLabel="Read
more container">
- <rect key="frame" x="0.0" y="0.0" width="259"
height="100"/>
- <color key="backgroundColor" white="0.0"
alpha="0.0" colorSpace="calibratedWhite"/>
- <constraints>
- <constraint firstAttribute="height"
constant="100" placeholder="YES" id="2gB-F9-ueg"/>
- </constraints>
- </view>
- <view contentMode="scaleToFill"
translatesAutoresizingMaskIntoConstraints="NO" id="bY3-nl-Jig"
userLabel="Options container">
- <rect key="frame" x="0.0" y="100" width="259"
height="100"/>
- <color key="backgroundColor" white="0.0"
alpha="0.0" colorSpace="calibratedWhite"/>
- <constraints>
- <constraint firstAttribute="height"
constant="100" placeholder="YES" id="zas-rw-VYh"/>
- </constraints>
- </view>
- <view contentMode="scaleToFill"
translatesAutoresizingMaskIntoConstraints="NO" id="3BA-2M-FfO" userLabel="Legal
container">
- <rect key="frame" x="0.0" y="200" width="259"
height="100"/>
- <color key="backgroundColor" white="0.0"
alpha="0.0" colorSpace="calibratedWhite"/>
- <constraints>
- <constraint firstAttribute="height"
constant="100" placeholder="YES" id="ehC-zR-rIO"/>
- </constraints>
- </view>
- </subviews>
- <color key="backgroundColor" white="0.0" alpha="0.0"
colorSpace="calibratedWhite"/>
- <constraints>
- <constraint firstItem="w0a-mT-r7z"
firstAttribute="top" secondItem="Dh1-J0-8gD" secondAttribute="top"
id="3XF-ln-CWn"/>
- <constraint firstItem="bY3-nl-Jig"
firstAttribute="trailing" secondItem="Dh1-J0-8gD" secondAttribute="trailing"
id="7I5-zm-vwm"/>
- <constraint firstItem="3BA-2M-FfO"
firstAttribute="leading" secondItem="Dh1-J0-8gD" secondAttribute="leading"
id="I6m-8j-ZFT"/>
- <constraint firstAttribute="bottom"
secondItem="3BA-2M-FfO" secondAttribute="bottom" id="OVd-yY-gdq"/>
- <constraint firstItem="3BA-2M-FfO"
firstAttribute="trailing" secondItem="Dh1-J0-8gD" secondAttribute="trailing"
id="Ooo-k9-aqV"/>
- <constraint firstItem="w0a-mT-r7z"
firstAttribute="trailing" secondItem="Dh1-J0-8gD" secondAttribute="trailing"
id="QW2-et-dJo"/>
- <constraint firstItem="w0a-mT-r7z"
firstAttribute="leading" secondItem="Dh1-J0-8gD" secondAttribute="leading"
id="Uaa-Pf-4y5"/>
- <constraint firstItem="3BA-2M-FfO"
firstAttribute="top" secondItem="bY3-nl-Jig" secondAttribute="bottom"
id="fAJ-Kh-S0n"/>
- <constraint firstItem="bY3-nl-Jig"
firstAttribute="leading" secondItem="Dh1-J0-8gD" secondAttribute="leading"
id="uz1-tK-3ZJ"/>
- <constraint firstItem="bY3-nl-Jig"
firstAttribute="top" secondItem="w0a-mT-r7z" secondAttribute="bottom"
id="wHP-Km-w54"/>
- </constraints>
- </view>
- </subviews>
- <color key="backgroundColor" white="0.0" alpha="0.0"
colorSpace="calibratedWhite"/>
- <constraints>
- <constraint firstItem="Dh1-J0-8gD" firstAttribute="leading"
secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="16"
id="F9w-kv-jxZ"/>
- <constraint firstItem="Dh1-J0-8gD" firstAttribute="top"
secondItem="i5M-Pr-FkT" secondAttribute="top" constant="16" id="FWd-4I-JwX"/>
- <constraint firstItem="Dh1-J0-8gD" firstAttribute="trailing"
secondItem="i5M-Pr-FkT" secondAttribute="trailing" constant="-16"
id="SgQ-Qp-NV8"/>
- <constraint firstAttribute="bottom"
relation="greaterThanOrEqual" secondItem="Dh1-J0-8gD" secondAttribute="bottom"
constant="20" id="oSe-ut-99s"/>
- </constraints>
- <nil key="simulatedStatusBarMetrics"/>
- <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
- <point key="canvasLocation" x="487.5" y="311"/>
- </view>
- </objects>
-</document>
diff --git a/Wikipedia/View Controllers/WebView/WMFWebViewFooterContainerView.h
b/Wikipedia/View Controllers/WebView/WMFWebViewFooterContainerView.h
deleted file mode 100644
index fad6968..0000000
--- a/Wikipedia/View Controllers/WebView/WMFWebViewFooterContainerView.h
+++ /dev/null
@@ -1,18 +0,0 @@
-// Created by Monte Hurd on 2/24/15.
-// Copyright (c) 2015 Wikimedia Foundation. Provided under MIT-style license;
please copy and modify!
-
-#import <UIKit/UIKit.h>
-
-@class WMFWebViewFooterContainerView;
-
-@protocol WMFWebViewFooterContainerDelegate <NSObject>
-
-- (void)footerContainer:(WMFWebViewFooterContainerView*)footerContainer
heightChanged:(CGFloat)newHeight;
-
-@end
-
-@interface WMFWebViewFooterContainerView : UIView
-
-@property (nonatomic, weak) id <WMFWebViewFooterContainerDelegate> delegate;
-
-@end
diff --git a/Wikipedia/View Controllers/WebView/WMFWebViewFooterContainerView.m
b/Wikipedia/View Controllers/WebView/WMFWebViewFooterContainerView.m
deleted file mode 100644
index 136fd1d..0000000
--- a/Wikipedia/View Controllers/WebView/WMFWebViewFooterContainerView.m
+++ /dev/null
@@ -1,17 +0,0 @@
-// Created by Monte Hurd on 2/24/15.
-// Copyright (c) 2015 Wikimedia Foundation. Provided under MIT-style license;
please copy and modify!
-
-#import "WMFWebViewFooterContainerView.h"
-
-@implementation WMFWebViewFooterContainerView
-
-- (void)layoutSubviews {
- [super layoutSubviews];
- static CGFloat lastHeight = -1;
- if (self.frame.size.height != lastHeight) {
- [self.delegate footerContainer:self
heightChanged:self.frame.size.height];
- lastHeight = self.frame.size.height;
- }
-}
-
-@end
diff --git a/Wikipedia/View Controllers/WebView/WebViewController.m
b/Wikipedia/View Controllers/WebView/WebViewController.m
index 40cebaa..8ff7daa 100644
--- a/Wikipedia/View Controllers/WebView/WebViewController.m
+++ b/Wikipedia/View Controllers/WebView/WebViewController.m
@@ -25,7 +25,7 @@
#import "UIView+WMFRTLMirroring.h"
#import "WMFArticlePopupTransition.h"
#import "WMFArticleViewController.h"
-
+#import "PageHistoryViewController.h"
typedef NS_ENUM (NSInteger, WMFWebViewAlertType) {
WMFWebViewAlertZeroWebPage,
@@ -33,14 +33,13 @@
WMFWebViewAlertZeroInterstitial
};
-@interface WebViewController () <LanguageSelectionDelegate,
WMFWebViewFooterContainerDelegate, FetchFinishedDelegate>
+@interface WebViewController () <LanguageSelectionDelegate,
FetchFinishedDelegate>
@property (nonatomic, strong) UIBarButtonItem* buttonTOC;
-@property (nonatomic, strong) UIBarButtonItem* buttonBack;
-@property (nonatomic, strong) UIBarButtonItem* buttonForward;
@property (nonatomic, strong) UIBarButtonItem* buttonLanguages;
@property (nonatomic, strong) UIBarButtonItem* buttonSave;
@property (nonatomic, strong) UIBarButtonItem* buttonShare;
+@property (nonatomic, strong) UIBarButtonItem* buttonEditHistory;
@property (nonatomic) BOOL isAnimatingTopAndBottomMenuHidden;
@property (readonly, strong, nonatomic) MWKSiteInfoFetcher* siteInfoFetcher;
@@ -118,23 +117,6 @@
- (void)setupBottomMenuButtons {
@weakify(self)
- void (^ goBeforeOrAfter)(NSString*) = ^void (NSString* beforeOrAfter) {
- @strongify(self)
- NSDictionary * adjacentHistoryEntries = [self
getAdjacentHistoryEntries];
- MWKHistoryEntry* historyEntry = adjacentHistoryEntries[beforeOrAfter];
- if (historyEntry) {
- [self showAlert:historyEntry.title.text type:ALERT_TYPE_BOTTOM
duration:0.8];
- [self navigateToPage:historyEntry.title
- discoveryMethod:MWKHistoryDiscoveryMethodBackForward];
- }
- };
-
- self.buttonBack = [UIBarButtonItem wmf_buttonType:WMFButtonTypeBackward
handler:^(id sender){
- goBeforeOrAfter(@"before");
- }];
- self.buttonForward = [UIBarButtonItem wmf_buttonType:WMFButtonTypeForward
handler:^(id sender){
- goBeforeOrAfter(@"after");
- }];
self.buttonLanguages = [UIBarButtonItem
wmf_buttonType:WMFButtonTypeTranslate handler:^(id sender){
@strongify(self)
[self showLanguages];
@@ -151,11 +133,14 @@
[self shareUpArrowButtonPushed];
}];
+ self.buttonEditHistory = [UIBarButtonItem
wmf_buttonType:WMFButtonTypePencil handler:^(id sender){
+ @strongify(self)
+ [self editHistoryButtonPushed];
+ }];
+
self.navigationController.toolbarHidden = NO;
self.toolbarItems = @[
- self.buttonBack,
- [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil
action:nil],
- self.buttonForward,
+ self.buttonEditHistory,
[[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil
action:nil],
self.buttonSave,
[[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil
action:nil],
@@ -173,8 +158,6 @@
[self setupTopMenuButtons];
[self setupBottomMenuButtons];
-
- [self setupTrackingFooter];
self.scrollingToTop = NO;
@@ -457,8 +440,6 @@
self.unsafeToToggleTOC = NO;
self.webView.scrollView.contentOffset = origScrollPosition;
- self.footerContainer.userInteractionEnabled = YES;
-
[self.buttonTOC wmf_UIButton].selected = NO;
self.webViewBottomConstraint.constant = 0;
@@ -491,8 +472,6 @@
if ([self tocDrawerIsOpen]) {
return;
}
-
- self.footerContainer.userInteractionEnabled = NO;
self.webViewBottomConstraint.constant = [self
tocGetWebViewBottomConstraintConstant];
@@ -1534,8 +1513,6 @@
MWLanguageInfo* languageInfo = [MWLanguageInfo
languageInfoForCode:title.site.language];
NSString* uidir = ([WikipediaAppUtils isDeviceLanguageRTL] ?
@"rtl" : @"ltr");
- NSDate* lastModified = article.lastmodified;
- MWKUser* lastModifiedBy = article.lastmodifiedby;
self.editable = article.editable;
self.protectionStatus = article.protection;
@@ -1576,21 +1553,10 @@
}
if (!self.session.currentArticle.isMain) {
- NSString* lastModifiedByUserName =
- (lastModifiedBy && !lastModifiedBy.anonymous) ?
lastModifiedBy.name : nil;
- [self.footerViewController updateLastModifiedDate:lastModified
userName:lastModifiedByUserName];
- [self.footerViewController updateReadMoreForArticle:article];
- [self.footerViewController updateLegalFooterLocalizedText];
-
- // Add spacer above bottom native tracking component.
- [sectionTextArray addObject:@"<div
style='background-color:transparent;height:40px;'></div>"];
-
// Add target div for TOC "read more" entry so it can use existing
// TOC scrolling mechanism.
[sectionTextArray addObject:@"<div
id='section_heading_and_content_block_100000'></div>"];
}
-
- [sectionTextArray addObject:[self getFooterPlaceholderDiv]];
// Join article sections text
NSString* joint = @""; //@"<div style=\"height:20px;\"></div>";
@@ -1654,9 +1620,6 @@
}
- (void)updateBottomBarButtonsEnabledState {
- NSDictionary* adjacentHistoryEntries = [self getAdjacentHistoryEntries];
- self.buttonForward.enabled =
(adjacentHistoryEntries[@"after"]) ? YES : NO;
- self.buttonBack.enabled =
(adjacentHistoryEntries[@"before"]) ? YES : NO;
self.buttonLanguages.enabled =
!(self.session.currentArticle.isMain && [self.session.currentArticle
languagecount] > 0);
[self.buttonSave wmf_UIButton].selected = [self isCurrentArticleSaved];
}
@@ -2049,6 +2012,11 @@
delegate:self];
}
+- (void)editHistoryButtonPushed {
+ UINavigationController* nc = [[UINavigationController alloc]
initWithRootViewController:[PageHistoryViewController
wmf_initialViewControllerFromClassStoryboard]];
+ [self presentViewController:nc animated:YES completion:nil];
+}
+
#pragma mark - ShareTapDelegate methods
- (void)didShowSharePreviewForMWKArticle:(MWKArticle*)article
withText:(NSString*)text {
if (!self.shareFunnel) {
@@ -2108,34 +2076,6 @@
- (void)releaseShareResources {
self.shareFunnel = nil;
self.shareOptionsViewController = nil;
-}
-
-#pragma mark - Tracking Footer
-
-- (NSString*)getFooterPlaceholderDiv {
- return [NSString stringWithFormat:@"<div id='bottom_native_footer_spacer'
style='height:%fpx'></div>", self.footerContainer.frame.size.height];
-}
-
-- (void)updateFooterPlaceholderDivHeight:(CGFloat)height {
- [self.webView stringByEvaluatingJavaScriptFromString:[NSString
stringWithFormat:@"document.getElementById('bottom_native_footer_spacer').style.height
= '%fpx';", height]];
-}
-
-- (void)setupTrackingFooter {
- if (!self.footerContainer) {
- self.footerContainer = [[WMFWebViewFooterContainerView alloc] init];
-
- self.footerContainer.delegate = self;
-
- [self.webView wmf_addTrackingView:self.footerContainer
- atLocation:WMFTrackingViewLocationBottom];
-
- self.footerViewController = [[WMFWebViewFooterViewController alloc]
init];
- [self wmf_addChildController:self.footerViewController
andConstrainToEdgesOfContainerView:self.footerContainer];
- }
-}
-
-- (void)footerContainer:(WMFWebViewFooterContainerView*)footerContainer
heightChanged:(CGFloat)newHeight {
- [self updateFooterPlaceholderDivHeight:newHeight];
}
#pragma mark - Article loading convenience
diff --git a/Wikipedia/View Controllers/WebView/WebViewController_Private.h
b/Wikipedia/View Controllers/WebView/WebViewController_Private.h
index f87d5b5..a19b576 100644
--- a/Wikipedia/View Controllers/WebView/WebViewController_Private.h
+++ b/Wikipedia/View Controllers/WebView/WebViewController_Private.h
@@ -48,11 +48,6 @@
#import "UIFont+WMFStyle.h"
#import "WebViewController+ImageGalleryPresentation.h"
-#import "UIWebView+WMFTrackingView.h"
-#import "WMFWebViewFooterContainerView.h"
-#import "UIViewController+WMFChildViewController.h"
-#import "WMFWebViewFooterViewController.h"
-
#import "UIScrollView+WMFScrollsToTop.h"
#import "UIColor+WMFHexColor.h"
@@ -126,9 +121,6 @@
// These are presently only used by
updateHistoryDateVisitedForArticleBeingNavigatedFrom method.
@property (strong, nonatomic) MWKTitle* currentTitle;
-
-@property (strong, nonatomic) WMFWebViewFooterContainerView* footerContainer;
-@property (strong, nonatomic) WMFWebViewFooterViewController*
footerViewController;
@property (strong, nonatomic) IBOutlet NSLayoutConstraint*
webViewBottomConstraint;
--
To view, visit https://gerrit.wikimedia.org/r/224013
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0cd269bead51e2bb685bec48abf1454793c3c8b7
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: 5.0
Gerrit-Owner: Mhurd <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits