Просмотр исходного кода

161028

Fixed:
pdflist can not open.
Ray Zhang 9 лет назад
Родитель
Сommit
8af490f72f

BIN
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/Ray.xcuserdatad/UserInterfaceState.xcuserstate


+ 77 - 13
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -534,7 +534,7 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            shouldBeEnabled = "No"
+            shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/Functions/PDF+Web/PDFViewController.m"
@@ -566,15 +566,15 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            shouldBeEnabled = "Yes"
+            shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/Functions/offline/OLDataProvider.m"
-            timestampString = "499325427.399024"
+            timestampString = "499328814.893429"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "10287"
-            endingLineNumber = "10287"
+            startingLineNumber = "10288"
+            endingLineNumber = "10288"
             landmarkName = "+offline_pdfList:"
             landmarkType = "7">
          </BreakpointContent>
@@ -598,7 +598,7 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            shouldBeEnabled = "Yes"
+            shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/Functions/PDF+Web/PDFViewController.m"
@@ -630,7 +630,7 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            shouldBeEnabled = "Yes"
+            shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/Functions/PDF+Web/PDFViewController.m"
@@ -646,7 +646,7 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            shouldBeEnabled = "Yes"
+            shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/Functions/offline/OLDataProvider.m"
@@ -659,14 +659,14 @@
             landmarkType = "7">
             <Locations>
                <Location
-                  shouldBeEnabled = "Yes"
+                  shouldBeEnabled = "No"
                   ignoreCount = "0"
                   continueAfterRunningActions = "No"
                   symbolName = "+[OLDataProvider offline_pdfList:]"
                   moduleName = "NPD Mobile"
                   usesParentBreakpointCondition = "Yes"
                   urlString = "file:///ios_workspace/RedAnt%20ERP%20Mobile/common/Functions/offline/OLDataProvider.m"
-                  timestampString = "499327084.361956"
+                  timestampString = "499328535.290199"
                   startingColumnNumber = "9223372036854775807"
                   endingColumnNumber = "9223372036854775807"
                   startingLineNumber = "10253"
@@ -674,14 +674,14 @@
                   offsetFromSymbolStart = "892">
                </Location>
                <Location
-                  shouldBeEnabled = "Yes"
+                  shouldBeEnabled = "No"
                   ignoreCount = "0"
                   continueAfterRunningActions = "No"
                   symbolName = "__34+[OLDataProvider offline_pdfList:]_block_invoke"
                   moduleName = "NPD Mobile"
                   usesParentBreakpointCondition = "Yes"
                   urlString = "file:///ios_workspace/RedAnt%20ERP%20Mobile/common/Functions/offline/OLDataProvider.m"
-                  timestampString = "499327084.364893"
+                  timestampString = "499328535.291785"
                   startingColumnNumber = "9223372036854775807"
                   endingColumnNumber = "9223372036854775807"
                   startingLineNumber = "10253"
@@ -694,7 +694,7 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            shouldBeEnabled = "Yes"
+            shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/Functions/offline/OLDataProvider.m"
@@ -707,5 +707,69 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/Functions/offline/OLDataProvider.m"
+            timestampString = "499327270.008428"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "10184"
+            endingLineNumber = "10184"
+            landmarkName = "+offline_savePDF:direct:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/Functions/offline/OLDataProvider.m"
+            timestampString = "499327346.423104"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "10224"
+            endingLineNumber = "10224"
+            landmarkName = "+offline_savePDF:direct:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/Functions/portfolio/PDFListViewController.m"
+            timestampString = "499328712.807323"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "502"
+            endingLineNumber = "502"
+            landmarkName = "-tableView:didSelectRowAtIndexPath:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/Functions/portfolio/PDFListViewController.m"
+            timestampString = "499328717.31357"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "507"
+            endingLineNumber = "507"
+            landmarkName = "-tableView:didSelectRowAtIndexPath:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 1 - 1
RedAnt ERP Mobile/common/Functions/PDF+Web/PDFViewController.m

@@ -231,7 +231,7 @@
 //            NSLog(@"%@",[[NSString alloc] initWithData:self.content encoding:NSASCIIStringEncoding]);
             //
             
-            NSLog(urlResponse.MIMEType);
+//            NSLog(urlResponse.MIMEType);
             
             [self.webView loadData:self.content MIMEType:urlResponse.MIMEType textEncodingName:nil baseURL:nil];
             

+ 3 - 2
RedAnt ERP Mobile/common/Functions/offline/OLDataProvider.m

@@ -10271,7 +10271,8 @@
                                       @"create_time": time,
                                       @"create_user": user,
                                       @"tear_note": note,
-                                      @"tear_name": name
+                                      @"tear_name": name,
+                                      @"isLocalFile":@"true"
                                       }.mutableCopy;
         
         [dic setObject:item forKey:[NSString stringWithFormat:@"item_%ld",*count]];
@@ -10284,7 +10285,7 @@
     }];
     
     [dic setValue:@"Regular Mode" forKey:@"mode"];
-    dic[@"isLocalFile"]=@"true";
+
     return [RAUtils dict2data:dic];
 }
 

+ 2 - 1
RedAnt ERP Mobile/common/Functions/portfolio/PortfolioViewController.m

@@ -398,7 +398,7 @@
         self.path = path;
         self.remove_item = remove_item;
     };
-    VC.onSaved=^(NSString* url,NSString* name)
+    VC.onSaved=^(NSString* url,NSString* name,bool isLocalFile)
     {
        // NSString* name=[self.content_data[indexPath.row] valueForKey:@"tear_name"];
        // NSString* url= [self.content_data[indexPath.row] valueForKey:@"pdf_path"];
@@ -406,6 +406,7 @@
         PDFViewController *ViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"PDFViewController"];
         ViewController.url = url;
         ViewController.canSave = false;
+        ViewController.isLocalfile=isLocalFile;
         NSString* subject;
         //                    if (company.length==0) {
         

+ 1 - 1
RedAnt ERP Mobile/common/Functions/portfolio/TearSheetParamViewController.h

@@ -10,7 +10,7 @@
 
 @interface TearSheetParamViewController : CommonEditorViewController
 @property (nonatomic , copy) void (^return_url)(NSString* url ,NSString* path, bool remove_item);
-@property (nonatomic , copy) void (^onSaved)(NSString* url,NSString* name);
+@property (nonatomic , copy) void (^onSaved)(NSString* url,NSString* name,bool isLocalFile);
 @property (nonatomic , copy) void (^onDismiss)(NSString* nouse);
 @property (nonatomic , copy) UIBarButtonItem* savebtn;
 @end

+ 4 - 1
RedAnt ERP Mobile/common/Functions/portfolio/TearSheetParamViewController.m

@@ -657,15 +657,18 @@
                     
                     if([[editor_json valueForKey:@"result"] intValue]==2)
                     {
+                        
+                        
                         AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
                         
                      //   [RAUtils alert_view:nil title:@"Portfolio saved. You can find it from View Portfolios" ] ;
                         NSString* url = [editor_json valueForKey:@"pdf_path"];
+                        bool isLocalFile = [editor_json valueForKey:@"isLocalFile"];
                         [self.navigationController dismissViewControllerAnimated:true completion:^{
                             [((MainViewController*)appDelegate.main_vc) reloadDocuments:true immediately:false];
                             [((MainViewController*)appDelegate.main_vc) reloadPortfolio:true immediately:true];
                             if(self.onSaved)
-                                self.onSaved(url,saveName);
+                                self.onSaved(url,saveName,isLocalFile);
                         }];
                         
                     }