Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Grechuhin <i.grechuhin@gmail.com>2016-03-03 17:42:08 +0300
committerSergey Yershov <yershov@corp.mail.ru>2016-03-23 16:51:09 +0300
commit73004c77936b3d0f1a508fdebc23766dbab0b64e (patch)
treef67dff651fc7c3966c73c2aa6fef3eac870c4c0b /iphone/Maps/Classes/CustomAlert
parent998283c2afa5aad9021cca0a3231d0bd9cc0debb (diff)
[ios] Added dialog for unsaved changes on delete.
Diffstat (limited to 'iphone/Maps/Classes/CustomAlert')
-rw-r--r--iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.h1
-rw-r--r--iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm5
-rw-r--r--iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.h1
-rw-r--r--iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.mm5
-rw-r--r--iphone/Maps/Classes/CustomAlert/DefaultAlert/MWMDefaultAlert.h1
-rw-r--r--iphone/Maps/Classes/CustomAlert/DefaultAlert/MWMDefaultAlert.mm10
6 files changed, 23 insertions, 0 deletions
diff --git a/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.h b/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.h
index a453094c05..703297a397 100644
--- a/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.h
+++ b/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.h
@@ -21,6 +21,7 @@
- (void)presentLocationAlert;
- (void)presentLocationServiceNotSupportedAlert;
- (void)presentNoConnectionAlert;
+- (void)presentUnsavedEditsAlertWithOkBlock:(nonnull TMWMVoidBlock)okBlock;
- (void)presentNoWiFiAlertWithName:(nonnull NSString *)name okBlock:(nullable TMWMVoidBlock)okBlock;
- (void)presentPedestrianToastAlert:(BOOL)isFirstLaunch;
- (void)presentInternalErrorAlert;
diff --git a/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm b/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm
index 5b419425eb..0a4a001b47 100644
--- a/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm
+++ b/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm
@@ -81,6 +81,11 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
[self displayAlert:[MWMAlert noConnectionAlert]];
}
+- (void)presentUnsavedEditsAlertWithOkBlock:(nonnull TMWMVoidBlock)okBlock
+{
+ [self displayAlert:[MWMAlert unsavedEditsAlertWithOkBlock:okBlock]];
+}
+
- (void)presentNoWiFiAlertWithName:(nonnull NSString *)name okBlock:(nullable TMWMVoidBlock)okBlock
{
[self displayAlert:[MWMAlert noWiFiAlertWithName:name okBlock:okBlock]];
diff --git a/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.h b/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.h
index 1f8c98bde1..016e7a022c 100644
--- a/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.h
+++ b/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.h
@@ -17,6 +17,7 @@
+ (MWMAlert *)disabledLocationAlert;
+ (MWMAlert *)noWiFiAlertWithName:(NSString *)name okBlock:(TMWMVoidBlock)okBlock;
+ (MWMAlert *)noConnectionAlert;
++ (MWMAlert *)unsavedEditsAlertWithOkBlock:(TMWMVoidBlock)okBlock;
+ (MWMAlert *)locationServiceNotSupportedAlert;
+ (MWMAlert *)pedestrianToastShareAlert:(BOOL)isFirstLaunch;
+ (MWMAlert *)internalErrorAlert;
diff --git a/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.mm b/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.mm
index 63756a39f5..1e1ee20b9e 100644
--- a/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.mm
+++ b/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.mm
@@ -51,6 +51,11 @@
return [MWMDefaultAlert noConnectionAlert];
}
++ (MWMAlert *)unsavedEditsAlertWithOkBlock:(TMWMVoidBlock)okBlock
+{
+ return [MWMDefaultAlert unsavedEditsAlertWithOkBlock:okBlock];
+}
+
+ (MWMAlert *)locationServiceNotSupportedAlert
{
return [MWMDefaultAlert locationServiceNotSupportedAlert];
diff --git a/iphone/Maps/Classes/CustomAlert/DefaultAlert/MWMDefaultAlert.h b/iphone/Maps/Classes/CustomAlert/DefaultAlert/MWMDefaultAlert.h
index 1ea4300768..8c2395cfe3 100644
--- a/iphone/Maps/Classes/CustomAlert/DefaultAlert/MWMDefaultAlert.h
+++ b/iphone/Maps/Classes/CustomAlert/DefaultAlert/MWMDefaultAlert.h
@@ -14,6 +14,7 @@
+ (instancetype)disabledLocationAlert;
+ (instancetype)noWiFiAlertWithName:(NSString *)name okBlock:(TMWMVoidBlock)okBlock;
+ (instancetype)noConnectionAlert;
++ (instancetype)unsavedEditsAlertWithOkBlock:(TMWMVoidBlock)okBlock;
+ (instancetype)locationServiceNotSupportedAlert;
+ (instancetype)point2PointAlertWithOkBlock:(TMWMVoidBlock)okBlock needToRebuild:(BOOL)needToRebuild;
+ (instancetype)downloaderNoConnectionAlertWithOkBlock:(TMWMVoidBlock)okBlock;
diff --git a/iphone/Maps/Classes/CustomAlert/DefaultAlert/MWMDefaultAlert.mm b/iphone/Maps/Classes/CustomAlert/DefaultAlert/MWMDefaultAlert.mm
index aaf20209ba..d2e9136e2d 100644
--- a/iphone/Maps/Classes/CustomAlert/DefaultAlert/MWMDefaultAlert.mm
+++ b/iphone/Maps/Classes/CustomAlert/DefaultAlert/MWMDefaultAlert.mm
@@ -74,6 +74,16 @@ static NSString * const kDefaultAlertNibName = @"MWMDefaultAlert";
return alert;
}
++ (instancetype)unsavedEditsAlertWithOkBlock:(TMWMVoidBlock)okBlock
+{
+ kStatisticsEvent = @"Editor unsaved changes on delete";
+ return [self defaultAlertWithTitle:@"editor_unsavde_changes"
+ message:nil
+ rightButtonTitle:@"delete"
+ leftButtonTitle:nil
+ rightButtonAction:okBlock];
+}
+
+ (instancetype)noWiFiAlertWithName:(NSString *)name okBlock:(TMWMVoidBlock)okBlock
{
kStatisticsEvent = @"No WiFi Alert";