|
@@ -168,14 +168,14 @@
|
|
|
}];
|
|
}];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
--(void) previewPDF:(NSString*)url title:(NSString*)title subject:(NSString*)subject
|
|
|
|
|
|
|
+-(void) previewPDF:(NSString*)url title:(NSString*)title subject:(NSString*)subject islocal:(bool) islocalfile
|
|
|
{
|
|
{
|
|
|
NSString* name=@"";//[self.content_data[indexPath.row] valueForKey:@"tear_name"];
|
|
NSString* name=@"";//[self.content_data[indexPath.row] valueForKey:@"tear_name"];
|
|
|
// NSString* url= file;//[self.content_data[indexPath.row] valueForKey:@"pdf_path"];
|
|
// NSString* url= file;//[self.content_data[indexPath.row] valueForKey:@"pdf_path"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- bool isLocalFile= false;//[self.content_data[indexPath.row] valueForKey:@"isLocalFile"];
|
|
|
|
|
|
|
+ bool isLocalFile= islocalfile;//[self.content_data[indexPath.row] valueForKey:@"isLocalFile"];
|
|
|
|
|
|
|
|
PDFViewController *ViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"PDFViewController"];
|
|
PDFViewController *ViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"PDFViewController"];
|
|
|
ViewController.url = url;
|
|
ViewController.url = url;
|
|
@@ -915,7 +915,7 @@
|
|
|
NSString* subject = [NSString stringWithFormat:@"%@ %@, %@ %@",item_json[@"doc_number"],item_json[@"customer_name"],item_json[@"signed_date"],item_json[@"signed_time"]];
|
|
NSString* subject = [NSString stringWithFormat:@"%@ %@, %@ %@",item_json[@"doc_number"],item_json[@"customer_name"],item_json[@"signed_date"],item_json[@"signed_time"]];
|
|
|
|
|
|
|
|
|
|
|
|
|
- [self previewPDF:pdf_url title:item_json[@"doc_number"] subject:subject];
|
|
|
|
|
|
|
+ [self previewPDF:pdf_url title:item_json[@"doc_number"] subject:subject islocal:false];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1053,6 +1053,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
UITableViewRowAction *modifyAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@" Modify " handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
|
|
UITableViewRowAction *modifyAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@" Modify " handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
|
|
|
|
|
+
|
|
|
|
|
+ [tableView reloadRowsAtIndexPaths:@[indexPath]withRowAnimation:UITableViewRowAnimationMiddle];
|
|
|
__weak typeof(self) weakSelf = self;
|
|
__weak typeof(self) weakSelf = self;
|
|
|
DebugLog(@"modify click");
|
|
DebugLog(@"modify click");
|
|
|
|
|
|
|
@@ -1087,7 +1089,7 @@
|
|
|
dvc.OnSave=^(NSString* file, NSString* subject)
|
|
dvc.OnSave=^(NSString* file, NSString* subject)
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
- [weakSelf previewPDF:file title:item_json[@"doc_number"] subject:subject];
|
|
|
|
|
|
|
+ [weakSelf previewPDF:file title:item_json[@"doc_number"] subject:subject islocal:true];
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
[self.navigationController pushViewController:dvc animated:true];
|
|
[self.navigationController pushViewController:dvc animated:true];
|