Browse Source

remove old lib

Marino Faggiana 8 years ago
parent
commit
6b42bdfcc5

+ 0 - 32
Libraries external/JSAlertView/JSAlertView.h

@@ -1,32 +0,0 @@
-//
-//  JSAlertView.h
-//  JSAlertView
-//
-//  Created by Jitendra Singh on 10/12/16.
-//  Copyright © 2016 Jitendra Singh. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-#define ALERT(x) [JSAlertView alert:x]
-
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_8_0
-@interface JSAlertView : UIAlertController
-#else
-@interface JSAlertView : UIAlertView
-#endif
-// Displays simple alert message (no title) with 'Ok' button
-+ (instancetype)alert:(NSString*)message;
-
-// Displays message (no title) with 'Yes' and 'No' button. It can be used to display confirmirmation alert.
-+ (instancetype)confirm:(NSString*)message withCompletionHandler:(void(^)(BOOL accepted))completionHandler;
-
-// Same as previous one with addition option to show title
-+ (instancetype)confirm:(NSString*)message withTitle:(NSString*)title  withCompletionHandler:(void(^)(BOOL accepted))completionHandler;
-
-// Standard menthod for displaying alert, fully customizable.
-+ (instancetype)alert:(NSString*)message withTitle:(NSString*)title buttons:(NSArray*)buttonTitles withCompletionHandler:(void(^)(NSInteger buttonIndex, NSString *buttonTitle))completionHandler;
-
-// Nextcloud
-+ (BOOL)isOpenAlertWindows;
-
-@end

+ 0 - 185
Libraries external/JSAlertView/JSAlertView.m

@@ -1,185 +0,0 @@
-//
-//  JSAlertView.m
-//  JSAlertView
-//
-//  Created by Jitendra Singh on 10/12/16.
-//  Copyright © 2016 Jitendra Singh. All rights reserved.
-//
-
-#import "JSAlertView.h"
-
-@interface JSAlertView ()
-
-@property (nonatomic, copy) void(^completionBlock)(NSInteger buttonIndex, NSString *buttonTitle);
-@property (nonatomic, copy) void(^confirmationBlock)(BOOL accepted);
-@property (nonatomic, strong) UIWindow *thisAlertWindow;
-@property (nonatomic, strong) NSMutableArray *allAlertWindows;
-
-@end
-
-@implementation JSAlertView
-
-+ (instancetype)sharedInstance {
-    static dispatch_once_t predicate;
-    static JSAlertView *instance = nil;
-    dispatch_once(&predicate, ^{
-        instance = [[self alloc] init];
-        [instance initalization];
-    });
-    return instance;
-}
-
-- (void)initalization
-{
-    // do write all initalization code here
-    self.allAlertWindows = [NSMutableArray arrayWithCapacity:0];
-    
-}
-
-+ (instancetype)alert:(NSString*)message
-{
-    return [self alert:message withTitle:nil buttons:@[@"Ok"] withCompletionHandler:nil];
-}
-+ (instancetype)confirm:(NSString*)message withCompletionHandler:(void(^)(BOOL accepted))completionHandler
-{
-    return [self confirm:message withTitle:nil withCompletionHandler:completionHandler];
-}
-
-+ (instancetype)confirm:(NSString*)message withTitle:(NSString*)title  withCompletionHandler:(void(^)(BOOL accepted))completionHandler
-{
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_8_0
-    
-    JSAlertView *alert = [JSAlertView alertControllerWithTitle:nil message:message preferredStyle:UIAlertControllerStyleAlert];
-    UIAlertAction* noButton = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
-        [alert dismissViewControllerAnimated:YES completion:nil];
-        if (completionHandler) {
-            completionHandler(NO);
-        }
-    }];
-    [alert addAction:noButton];
-    
-    UIAlertAction* yesButton = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
-        [alert dismissViewControllerAnimated:YES completion:nil];
-        if (completionHandler) {
-            completionHandler(YES);
-        }
-    }];
-    [alert addAction:yesButton];
-    
-    [alert show];
-    
-    return alert;
-#else
-    JSAlertView *alert = [[JSAlertView alloc] initWithTitle:title message:message delegate:self cancelButtonTitle:nil otherButtonTitles:nil];
-    __weak __typeof__(alert) alert_weak_ = (alert);
-    [alert setDelgate:alert_weak_];
-    
-    [alert addButtonWithTitle:@"No"];
-    [alert addButtonWithTitle:@"Yes"];
-    
-    alert.confirmationBlock = completionHandler;
-    [alert show];
-    return alert;
-#endif
-}
-
-+ (instancetype)alert:(NSString*)message withTitle:(NSString*)title buttons:(NSArray*)buttonTitles withCompletionHandler:(void(^)(NSInteger buttonIndex, NSString *buttonTitle))completionHandler
-{
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_8_0
-    
-    JSAlertView *alert = [JSAlertView alertControllerWithTitle:nil message:message preferredStyle:UIAlertControllerStyleAlert];
-    for (NSString *btnTitle in buttonTitles) {
-        UIAlertAction* button = [UIAlertAction actionWithTitle:btnTitle style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
-            [alert dismissViewControllerAnimated:YES completion:nil];
-            if (completionHandler) {
-                completionHandler([buttonTitles indexOfObject:btnTitle], btnTitle);
-            }
-        }];
-        [alert addAction:button];
-    }
-    [alert show];
-    
-    return alert;
-#else
-    JSAlertView *alert = [[JSAlertView alloc] initWithTitle:title message:message delegate:self cancelButtonTitle:nil otherButtonTitles:nil];
-    __weak __typeof__(alert) alert_weak_ = (alert);
-    [alert setDelgate:alert_weak_];
-    __block NSInteger index = 0;
-    for (NSString *btnTitle in buttonTitles) {
-        [alert addButtonWithTitle:btnTitle];
-    }
-    alert.completionBlock = completionHandler;
-    [alert show];
-    return alert;
-#endif
-}
-
-- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
-{
-    if (self.completionBlock) {
-        self.completionBlock(buttonIndex, [alertView buttonTitleAtIndex:buttonIndex]);
-    }
-    else if (self.confirmationBlock) {
-        self.confirmationBlock(!(buttonIndex == 0));
-    }
-}
-
-+ (BOOL)isOpenAlertWindows
-{
-    return [[JSAlertView sharedInstance].allAlertWindows count];
-}
-
-
-/***********************************************************************
- *
- *  Following methods will be used for iOS 8 or later for UIAlertController
- *
- ***********************************************************************/
-
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_8_0
-
-- (void)show {
-    [self show:YES];
-}
-
-- (void)show:(BOOL)animated {
-    
-    //create a new window for the alert
-    self.thisAlertWindow = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
-    self.thisAlertWindow.rootViewController = [[UIViewController alloc] init];
-    
-    // set this window on top in stack
-    UIWindow *topWindow = [UIApplication sharedApplication].windows.lastObject;
-    self.thisAlertWindow.windowLevel = topWindow.windowLevel + 1;
-    
-    // make it visible and show alert
-    [self.thisAlertWindow makeKeyAndVisible];
-    [self.thisAlertWindow.rootViewController presentViewController:self animated:animated completion:nil];
-    
-    // set alpha 0.0 for last alert to make it transparent, this will give feel of single alert displayed on screen
-    [[JSAlertView sharedInstance].allAlertWindows.lastObject setAlpha:0.0];
-    [[JSAlertView sharedInstance].allAlertWindows addObject:self.thisAlertWindow];
-}
-
-- (void)viewWillDisappear:(BOOL)animated {
-    [super viewWillDisappear:animated];
-    
-    // remove this window from stack
-    [[JSAlertView sharedInstance].allAlertWindows removeObject:self.thisAlertWindow];
-    // set alpha 1.0 for last alert to make it appear
-    [UIView animateWithDuration:0.3 animations:^{
-        [[JSAlertView sharedInstance].allAlertWindows.lastObject setAlpha:1.0];
-    }];
-}
-
-- (void)viewDidDisappear:(BOOL)animated {
-    [super viewDidDisappear:animated];
-    
-    // once the alert is disappeared set window property to nil, else it will create retain cycle
-    self.thisAlertWindow.hidden = YES;
-    self.thisAlertWindow = nil;
-}
-
-
-#endif
-@end

+ 0 - 14
Nextcloud.xcodeproj/project.pbxproj

@@ -108,7 +108,6 @@
 		F71E68001DC1F792003BA52B /* libownCloudiOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F71E67FC1DC1F76F003BA52B /* libownCloudiOS.a */; };
 		F71E68021DC1F79D003BA52B /* libownCloudiOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F71E67FC1DC1F76F003BA52B /* libownCloudiOS.a */; };
 		F720E01F1E48C73E001A4B9E /* CCActions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F720E01E1E48C73E001A4B9E /* CCActions.swift */; };
-		F7253FCA1E38BAF20084135B /* JSAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = F7253FC91E38BAF20084135B /* JSAlertView.m */; };
 		F725437C1E12A44A009BF4C2 /* CCSection.m in Sources */ = {isa = PBXBuildFile; fileRef = F78F6FAF1CC8CCB700F4EA25 /* CCSection.m */; };
 		F7274FED1E6EB6F400C241B6 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7274FEC1E6EB6F400C241B6 /* Constant.swift */; };
 		F7274FEE1E6EB6F400C241B6 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7274FEC1E6EB6F400C241B6 /* Constant.swift */; };
@@ -1011,8 +1010,6 @@
 		F721372F1BAFF0920012B613 /* CCTemplates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTemplates.h; sourceTree = "<group>"; };
 		F72137301BAFF0920012B613 /* CCTemplates.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCTemplates.m; sourceTree = "<group>"; };
 		F7229B491DF71BB300E8C4E7 /* AUTHORS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AUTHORS; sourceTree = SOURCE_ROOT; };
-		F7253FC81E38BAF20084135B /* JSAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAlertView.h; sourceTree = "<group>"; };
-		F7253FC91E38BAF20084135B /* JSAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSAlertView.m; sourceTree = "<group>"; };
 		F7274FEC1E6EB6F400C241B6 /* Constant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = "<group>"; };
 		F7296A601C8880C9001A7809 /* CCCellShareExt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCCellShareExt.h; sourceTree = "<group>"; };
 		F7296A611C8880C9001A7809 /* CCCellShareExt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCCellShareExt.m; sourceTree = "<group>"; };
@@ -1773,7 +1770,6 @@
 				F73CCE221DC13788007E38D8 /* DZNEmptyDataSet */,
 				F7659A211DC0B726004860C4 /* EAIntroView */,
 				F7659A2A1DC0B72F004860C4 /* EARestrictedScrollView */,
-				F7253FC71E38BAF20084135B /* JSAlertView */,
 				F7659A2F1DC0B737004860C4 /* iRate */,
 				F70F04821C889183008DAB36 /* MBProgressHUD */,
 				F70F04BD1C889184008DAB36 /* NYXImagesKit */,
@@ -2125,15 +2121,6 @@
 			path = Templates;
 			sourceTree = "<group>";
 		};
-		F7253FC71E38BAF20084135B /* JSAlertView */ = {
-			isa = PBXGroup;
-			children = (
-				F7253FC81E38BAF20084135B /* JSAlertView.h */,
-				F7253FC91E38BAF20084135B /* JSAlertView.m */,
-			);
-			path = JSAlertView;
-			sourceTree = "<group>";
-		};
 		F728CE741BF6322C00E69702 /* Share */ = {
 			isa = PBXGroup;
 			children = (
@@ -4157,7 +4144,6 @@
 				F708CF9A1E56E8CC00271D8B /* TableAccount+CoreDataProperties.m in Sources */,
 				F77B0E261D118A16002130FE /* ZSSTextView.m in Sources */,
 				F762CAFC1EACB66200B38484 /* XLFormImageCell.m in Sources */,
-				F7253FCA1E38BAF20084135B /* JSAlertView.m in Sources */,
 				F77B0E271D118A16002130FE /* CYRLayoutManager.m in Sources */,
 				F762CB681EACB7D400B38484 /* ReaderConstants.m in Sources */,
 				F7F06E9B1DBFACC600099AE9 /* UICollectionView+CTAssetsPickerController.m in Sources */,

+ 1 - 1
iOSClient/Main/CCMain.h

@@ -60,7 +60,7 @@
 #import "CCNote.h"
 #import "CCPassaporto.h"
 #import "CCPatenteGuida.h"
-#import "JSAlertView.h"
+//#import "JSAlertView.h"
 
 @interface CCMain : UITableViewController <UITableViewDataSource, UITableViewDelegate, UIActionSheetDelegate, UIGestureRecognizerDelegate, UIDocumentInteractionControllerDelegate, UIViewControllerPreviewingDelegate, CCMoveDelegate, CTAssetsPickerControllerDelegate, BKPasscodeViewControllerDelegate, UISplitViewControllerDelegate, UIPopoverControllerDelegate, CCNetworkingDelegate, CCShareOCDelegate, CCAccountWebDelegate, CCBancomatDelegate, CCCartaDiCreditoDelegate, CCCartaIdentitaDelegate, CCContoCorrenteDelegate, CCNoteDelegate, CCPassaportoDelegate, CCPatenteGuidaDelegate, CCPeekPopDelegate, UIDocumentMenuDelegate, UIDocumentPickerDelegate, UISearchResultsUpdating, UISearchControllerDelegate, UISearchBarDelegate, UIScrollViewDelegate, CCLoginDelegate, DZNEmptyDataSetSource, DZNEmptyDataSetDelegate>
 

+ 1 - 8
iOSClient/Settings/Acknowledgements.rtf

@@ -1,4 +1,4 @@
-{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf760
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf820
 {\fonttbl\f0\fswiss\fcharset0 Helvetica;}
 {\colortbl;\red255\green255\blue255;}
 {\*\expandedcolortbl;;}
@@ -217,13 +217,6 @@ The MIT License (MIT)\
 \
 Copyright (c) Zed Said Studio (http://www.zedsaid.com)\
 ____________________________________________\
-
-\b \
-JSAlertView
-\b0 \
-\
-Copyright (c) 2016 Jitendra Singh\
-____________________________________________\
 \
 
 \b Icons8\