Ray Zhang 8 éve
szülő
commit
6505d5e4e5

BIN
Ants Contract/AntsContract.xcworkspace/xcuserdata/Ray.xcuserdatad/UserInterfaceState.xcuserstate


+ 52 - 20
Ants Contract/AntsContract.xcworkspace/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -202,12 +202,12 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Granite Expo eSign/Granite Expo eSign/DocumentTemplateViewController.m"
-            timestampString = "528448181.893758"
+            timestampString = "530863084.531539"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "1225"
             endingLineNumber = "1225"
-            landmarkName = "-focusControlView:frame:"
+            landmarkName = "-okBtnClick:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -266,12 +266,12 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Granite Expo eSign/Granite Expo eSign/DocumentTemplateViewController.m"
-            timestampString = "528448181.895053"
+            timestampString = "530863084.53177"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "504"
             endingLineNumber = "504"
-            landmarkName = "-onSaveClicked:"
+            landmarkName = "-WindowRect2PDFRect:pdf_rect:window_size:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -298,12 +298,12 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Granite Expo eSign/Granite Expo eSign/DocumentTemplateViewController.m"
-            timestampString = "528448181.896098"
+            timestampString = "530863084.531891"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "1134"
             endingLineNumber = "1134"
-            landmarkName = "-xStepperClick:"
+            landmarkName = "-pageViewController:spineLocationForInterfaceOrientation:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -314,12 +314,12 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Granite Expo eSign/Granite Expo eSign/DocumentTemplateViewController.m"
-            timestampString = "528448181.897111"
+            timestampString = "530863084.532015"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "1212"
             endingLineNumber = "1212"
-            landmarkName = "-setX:Y:W:H:"
+            landmarkName = "-okBtnClick:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -330,7 +330,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/ACNetwork.m"
-            timestampString = "529469963.689747"
+            timestampString = "530863084.532123"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "363"
@@ -346,7 +346,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/DocumentPageViewController.m"
-            timestampString = "530778496.120668"
+            timestampString = "530863084.532198"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "196"
@@ -362,7 +362,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Granite Expo eSign/Granite Expo eSign/DocumentTemplateViewController.m"
-            timestampString = "528448181.898184"
+            timestampString = "530863084.53227"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "207"
@@ -442,11 +442,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/DocumentListViewController.m"
-            timestampString = "528449109.475415"
+            timestampString = "530863084.532459"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1077"
-            endingLineNumber = "1077"
+            startingLineNumber = "1078"
+            endingLineNumber = "1078"
             landmarkName = "-tableView:editActionsForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
@@ -458,7 +458,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/ACNetwork.m"
-            timestampString = "529469963.690982"
+            timestampString = "530863084.532985"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "664"
@@ -474,7 +474,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/PageViewController.m"
-            timestampString = "530778496.121015"
+            timestampString = "530863084.533043"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "957"
@@ -486,11 +486,11 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            shouldBeEnabled = "Yes"
+            shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/PageViewController.m"
-            timestampString = "530778496.121108"
+            timestampString = "530863084.533101"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "815"
@@ -502,11 +502,11 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            shouldBeEnabled = "Yes"
+            shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/PageViewController.m"
-            timestampString = "530778496.121228"
+            timestampString = "530863084.533156"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "293"
@@ -515,5 +515,37 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/DocumentListViewController.m"
+            timestampString = "530863084.533205"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1065"
+            endingLineNumber = "1065"
+            landmarkName = "-tableView:editActionsForRowAtIndexPath:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/DocumentPageViewController.m"
+            timestampString = "530863084.533544"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "572"
+            endingLineNumber = "572"
+            landmarkName = "-onSaveClicked:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 190 - 190
Ants Contract/Granite Expo eSign/Granite Expo eSign/DocumentTemplateViewController.m

@@ -548,196 +548,196 @@
 //    [self.controlTemplate writeToFile:path atomically:NO];
     
     return;
-    
-    [self EndEditing];
-    if(self.no_save)
-    {
-        [RAUtils message_alert:@"Can not save pending document under offline mode." title:@"Save document" controller:self] ;
-        return;
-    }
-    
-    if([self verifyData]==false)
-    return;
-    
-    NSString* pdffile = nil;
-    NSString* zipfile = nil;
-    NSString* jsonfile = nil;
-    // for(int l=0;l<1;l++)
-    {
-        
-        if(self.hide_control)
-        {
-            pdffile = self.pdfPath;
-        }
-        else
-        {
-            pdffile = [PDFUtils SavePDF:self.controlTemplate source:self.document window_rect:CGRectMake(0, 0, 768, 960) name:self.docment_id isnew:self.action==PDFEditActionNew];
-        }
-        
-        zipfile=[ACNetwork prepareUploadFile:pdffile json:self.controlTemplate];
-        
-        //jsonfile = [ACNetwork getjsonPath:zip];
-        
-    }
-    
-    __weak typeof(self) weakSelf = self;
-    AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
-    if(appDelegate.accessMode == AppAccessModeOffline)
-    {
-        
-        NSMutableDictionary * json = [[NSMutableDictionary alloc]init];
-        
-        json[@"json"]=@"json.json";
-        json[@"pdf"]=pdffile.lastPathComponent;
-        json[@"zip"]=zipfile.lastPathComponent;
-        json[@"serial"]=[json[@"zip"] stringByDeletingPathExtension];
-        
-        
-        
-        json[@"create_by"]=appDelegate.user;
-        
-        
-        json[@"agent_name"]=[self extract_data:@"agent_name"];
-        json[@"doc_number"]=[self extract_data:@"doc_number"];
-        json[@"job_date"]=[self extract_data:@"job_date"];
-        json[@"customer_name"]=[self extract_data:@"customer_name"];
-        json[@"signed_date"]=[self extract_data:@"signed_date"];
-        
-        
-        
-        NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
-        NSMutableArray * arr_pending = [[defaults arrayForKey:@"pending_doc"] mutableCopy];
-        if(arr_pending==nil)
-        arr_pending = [[NSMutableArray alloc]init];
-        [arr_pending addObject:json];
-        [defaults setObject:arr_pending forKey:@"pending_doc"];
-        [defaults synchronize];
-        
-        
-        [weakSelf.navigationController popViewControllerAnimated:false];
-        if(weakSelf.OnSave)
-        weakSelf.OnSave(pdffile,@"");
-        
-    }
-    else
-    {
-        UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Saving"];
-        
-        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
-            
-            NSDictionary* json = nil;
-            
-            
-            
-            json = [ACNetwork save_document:zipfile isnew:self.action==PDFEditActionNew];
-            
-            dispatch_async(dispatch_get_main_queue(), ^{
-                
-                
-                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
-                //                if([[logout_json valueForKey:@"result"] intValue]==2)
-                //                {
-                //                    self.welcomeLabel.text=@"Not sign in";
-                //                    //                        [sender setTitle:@"Sign in" forState:UIControlStateNormal];
-                //                    [bbitem setTitle:@"Sign in"];
-                //
-                //                    self.buttonHIC.enabled = false;
-                //                    self.buttonSRL.enabled = false;
-                //                    self.coverView.hidden = false;
-                //                }
-                //                else
-                //                {
-                //                    [RAUtils message_alert:[logout_json valueForKey:@"err_msg"] title:@"Sign out" controller:self] ;
-                //                }
-                
-                if([[json valueForKey:@"result"] intValue]==2)
-                {
-                    
-                    
-                    [weakSelf.navigationController popViewControllerAnimated:false];
-                    if(weakSelf.OnSave)
-                    weakSelf.OnSave(pdffile,json[@"subject"]);
-                    
-                    
-                }
-                else
-                {
-                    //                    [RAUtils message_alert:[json valueForKey:@"err_msg"] title:@"Save document" controller:self] ;
-                    
-                    if(self.hide_control)
-                    {
-                        //提交离线合同
-                        [RAUtils message_alert:@"Can not upload pending documents please try again later." title:@"Save document" controller:self] ;
-                        return;
-                    }
-                    
-                    UIAlertController *alertControl = [UIAlertController alertControllerWithTitle:@"Create Customer" message:@"Can not create new customer on server, do you want to create an offline document?" preferredStyle:UIAlertControllerStyleAlert];
-                    
-                    
-                    UIAlertAction *actionOne = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
-                        __block NSString* offline_docnumber =[ACNetwork offline_docnumber];
-                        if(offline_docnumber==nil)
-                        {
-                            [RAUtils message_alert:@"Offline document number prefix not found, Please check your user name and make sure you had signed in at least once."  title:@"Create Customer" controller:self] ;
-                            return;
-                        }
-                        [appDelegate SwitchToOffline:appDelegate.user];
-                        
-                        
-                        NSMutableDictionary * json = [[NSMutableDictionary alloc]init];
-                        
-                        json[@"json"]=@"json.json";
-                        json[@"pdf"]=pdffile.lastPathComponent;
-                        json[@"zip"]=zipfile.lastPathComponent;
-                        json[@"serial"]=[json[@"zip"] stringByDeletingPathExtension];
-                        
-                        
-                        
-                        json[@"create_by"]=appDelegate.user;
-                        
-                        
-                        json[@"agent_name"]=[self extract_data:@"agent_name"];
-                        json[@"doc_number"]=[self extract_data:@"doc_number"];
-                        json[@"job_date"]=[self extract_data:@"job_date"];
-                        json[@"customer_name"]=[self extract_data:@"customer_name"];
-                        json[@"signed_date"]=[self extract_data:@"signed_date"];
-                        
-                        
-                        
-                        NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
-                        NSMutableArray * arr_pending = [[defaults arrayForKey:@"pending_doc"] mutableCopy];
-                        if(arr_pending==nil)
-                        arr_pending = [[NSMutableArray alloc]init];
-                        [arr_pending addObject:json];
-                        [defaults setObject:arr_pending forKey:@"pending_doc"];
-                        [defaults synchronize];
-                        
-                        
-                        [weakSelf.navigationController popViewControllerAnimated:false];
-                        if(weakSelf.OnSave)
-                        weakSelf.OnSave(pdffile,@"");
-                        
-                        
-                    }];
-                    
-                    UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-                        DebugLog(@"Cancel");
-                    }];
-                    [alertControl addAction:actionOne];
-                    
-                    [alertControl addAction:alertthree];
-                    
-                    //UIAlertControllerStyle类型为UIAlertControllerStyleAlert可以添加addTextFieldWithConfigurationHandler:^(UITextField *textField)
-                    
-                    
-                    [self presentViewController:alertControl animated:YES completion:nil];
-                    
-                }
-                
-                
-            });
-        });
-    }
+//    
+//    [self EndEditing];
+//    if(self.no_save)
+//    {
+//        [RAUtils message_alert:@"Can not save pending document under offline mode." title:@"Save document" controller:self] ;
+//        return;
+//    }
+//    
+//    if([self verifyData]==false)
+//    return;
+//    
+//    NSString* pdffile = nil;
+//    NSString* zipfile = nil;
+//    NSString* jsonfile = nil;
+//    // for(int l=0;l<1;l++)
+//    {
+//        
+//        if(self.hide_control)
+//        {
+//            pdffile = self.pdfPath;
+//        }
+//        else
+//        {
+//            pdffile = [PDFUtils SavePDF:self.controlTemplate source:self.document window_rect:CGRectMake(0, 0, 768, 960) name:self.docment_id isnew:self.action==PDFEditActionNew];
+//        }
+//        
+//        zipfile=[ACNetwork prepareUploadFile:pdffile json:self.controlTemplate];
+//        
+//        //jsonfile = [ACNetwork getjsonPath:zip];
+//        
+//    }
+//    
+//    __weak typeof(self) weakSelf = self;
+//    AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+//    if(appDelegate.accessMode == AppAccessModeOffline)
+//    {
+//        
+//        NSMutableDictionary * json = [[NSMutableDictionary alloc]init];
+//        
+//        json[@"json"]=@"json.json";
+//        json[@"pdf"]=pdffile.lastPathComponent;
+//        json[@"zip"]=zipfile.lastPathComponent;
+//        json[@"serial"]=[json[@"zip"] stringByDeletingPathExtension];
+//        
+//        
+//        
+//        json[@"create_by"]=appDelegate.user;
+//        
+//        
+//        json[@"agent_name"]=[self extract_data:@"agent_name"];
+//        json[@"doc_number"]=[self extract_data:@"doc_number"];
+//        json[@"job_date"]=[self extract_data:@"job_date"];
+//        json[@"customer_name"]=[self extract_data:@"customer_name"];
+//        json[@"signed_date"]=[self extract_data:@"signed_date"];
+//        
+//        
+//        
+//        NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
+//        NSMutableArray * arr_pending = [[defaults arrayForKey:@"pending_doc"] mutableCopy];
+//        if(arr_pending==nil)
+//        arr_pending = [[NSMutableArray alloc]init];
+//        [arr_pending addObject:json];
+//        [defaults setObject:arr_pending forKey:@"pending_doc"];
+//        [defaults synchronize];
+//        
+//        
+//        [weakSelf.navigationController popViewControllerAnimated:false];
+//        if(weakSelf.OnSave)
+//        weakSelf.OnSave(pdffile,@"");
+//        
+//    }
+//    else
+//    {
+//        UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Saving"];
+//        
+//        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+//            
+//            NSDictionary* json = nil;
+//            
+//            
+//            
+//            json = [ACNetwork save_document:zipfile isnew:self.action==PDFEditActionNew md5:md5];
+//            
+//            dispatch_async(dispatch_get_main_queue(), ^{
+//                
+//                
+//                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//                //                if([[logout_json valueForKey:@"result"] intValue]==2)
+//                //                {
+//                //                    self.welcomeLabel.text=@"Not sign in";
+//                //                    //                        [sender setTitle:@"Sign in" forState:UIControlStateNormal];
+//                //                    [bbitem setTitle:@"Sign in"];
+//                //
+//                //                    self.buttonHIC.enabled = false;
+//                //                    self.buttonSRL.enabled = false;
+//                //                    self.coverView.hidden = false;
+//                //                }
+//                //                else
+//                //                {
+//                //                    [RAUtils message_alert:[logout_json valueForKey:@"err_msg"] title:@"Sign out" controller:self] ;
+//                //                }
+//                
+//                if([[json valueForKey:@"result"] intValue]==2)
+//                {
+//                    
+//                    
+//                    [weakSelf.navigationController popViewControllerAnimated:false];
+//                    if(weakSelf.OnSave)
+//                    weakSelf.OnSave(pdffile,json[@"subject"]);
+//                    
+//                    
+//                }
+//                else
+//                {
+//                    //                    [RAUtils message_alert:[json valueForKey:@"err_msg"] title:@"Save document" controller:self] ;
+//                    
+//                    if(self.hide_control)
+//                    {
+//                        //提交离线合同
+//                        [RAUtils message_alert:@"Can not upload pending documents please try again later." title:@"Save document" controller:self] ;
+//                        return;
+//                    }
+//                    
+//                    UIAlertController *alertControl = [UIAlertController alertControllerWithTitle:@"Create Customer" message:@"Can not create new customer on server, do you want to create an offline document?" preferredStyle:UIAlertControllerStyleAlert];
+//                    
+//                    
+//                    UIAlertAction *actionOne = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
+//                        __block NSString* offline_docnumber =[ACNetwork offline_docnumber];
+//                        if(offline_docnumber==nil)
+//                        {
+//                            [RAUtils message_alert:@"Offline document number prefix not found, Please check your user name and make sure you had signed in at least once."  title:@"Create Customer" controller:self] ;
+//                            return;
+//                        }
+//                        [appDelegate SwitchToOffline:appDelegate.user];
+//                        
+//                        
+//                        NSMutableDictionary * json = [[NSMutableDictionary alloc]init];
+//                        
+//                        json[@"json"]=@"json.json";
+//                        json[@"pdf"]=pdffile.lastPathComponent;
+//                        json[@"zip"]=zipfile.lastPathComponent;
+//                        json[@"serial"]=[json[@"zip"] stringByDeletingPathExtension];
+//                        
+//                        
+//                        
+//                        json[@"create_by"]=appDelegate.user;
+//                        
+//                        
+//                        json[@"agent_name"]=[self extract_data:@"agent_name"];
+//                        json[@"doc_number"]=[self extract_data:@"doc_number"];
+//                        json[@"job_date"]=[self extract_data:@"job_date"];
+//                        json[@"customer_name"]=[self extract_data:@"customer_name"];
+//                        json[@"signed_date"]=[self extract_data:@"signed_date"];
+//                        
+//                        
+//                        
+//                        NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
+//                        NSMutableArray * arr_pending = [[defaults arrayForKey:@"pending_doc"] mutableCopy];
+//                        if(arr_pending==nil)
+//                        arr_pending = [[NSMutableArray alloc]init];
+//                        [arr_pending addObject:json];
+//                        [defaults setObject:arr_pending forKey:@"pending_doc"];
+//                        [defaults synchronize];
+//                        
+//                        
+//                        [weakSelf.navigationController popViewControllerAnimated:false];
+//                        if(weakSelf.OnSave)
+//                        weakSelf.OnSave(pdffile,@"");
+//                        
+//                        
+//                    }];
+//                    
+//                    UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
+//                        DebugLog(@"Cancel");
+//                    }];
+//                    [alertControl addAction:actionOne];
+//                    
+//                    [alertControl addAction:alertthree];
+//                    
+//                    //UIAlertControllerStyle类型为UIAlertControllerStyleAlert可以添加addTextFieldWithConfigurationHandler:^(UITextField *textField)
+//                    
+//                    
+//                    [self presentViewController:alertControl animated:YES completion:nil];
+//                    
+//                }
+//                
+//                
+//            });
+//        });
+//    }
     
     
     

+ 1 - 1
Ants Contract/Granite Expo eSign/Granite Expo eSign/config.h

@@ -17,7 +17,7 @@
 
 //#define ENCRYPT_OFF
 # ifdef DEBUG
-    #define NO_SAVE_VERIFY false
+    #define NO_SAVE_VERIFY true
     #define test_server
 # else
     #define NO_SAVE_VERIFY false

+ 9 - 0
Ants Contract/common/DocumentListViewController.m

@@ -999,6 +999,7 @@
     
     NSString* pdfurl =item_json[@"pdf_path1"];
     NSString* jsonurl =item_json[@"json_path1"];
+    NSString* md51 =item_json[@"pdf_md5_str"];
     
     NSMutableArray* arr_doc = [item_json[@"documents"] mutableCopy];
     
@@ -1078,6 +1079,14 @@
                 [jsondata writeToFile:jsonpath atomically:true];
                 [pdfdata writeToFile:pdfpath atomically:true];
                 
+//                NSString* md52 = [RAUtils md5WithFile:pdfpath];
+//                if(md51.length>0&&![md51 isEqualToString:md52])
+//                {
+//                    
+//                    [RAUtils message_alert:@"Please try again."  title:@"Can not download contract" controller:self];
+//                    return;
+//                }
+                
                 
                 DocumentPageViewController* dvc = [self.storyboard instantiateViewControllerWithIdentifier:@"DocumentPageViewController" ];