|
|
@@ -8,8 +8,10 @@
|
|
|
|
|
|
#import "CommonEditorViewController.h"
|
|
|
#import "CommonEditorCellEdit.h"
|
|
|
-#import "RANetwork.h"
|
|
|
+#import "RASingleton.h"
|
|
|
+//#import "RANetwork.h"
|
|
|
#import "CommonEditorCellEnum.h"
|
|
|
+#import "CommonEditorCellEditor.h"
|
|
|
#import "CommonEditorCellSwitch.h"
|
|
|
#import "CommonEditorCellModel.h"
|
|
|
#import "CommonEditorCellAction.h"
|
|
|
@@ -40,7 +42,7 @@
|
|
|
#import "OLDataProvider.h"
|
|
|
# endif
|
|
|
#import <objc/objc.h>
|
|
|
-#import "MainViewController.h"
|
|
|
+//#import "MainViewController.h"
|
|
|
|
|
|
#import "AppDelegate.h"
|
|
|
|
|
|
@@ -159,6 +161,8 @@
|
|
|
[self.editorTable registerNib:[UINib nibWithNibName:@"Phone_Range_Cell" bundle:nil] forCellReuseIdentifier:@"CommonEditorRangeCell"];
|
|
|
[self.editorTable registerNib:[UINib nibWithNibName:@"Phone_Web_Cell" bundle:nil] forCellReuseIdentifier:@"CommonEditorWebCell"];
|
|
|
[self.editorTable registerNib:[UINib nibWithNibName:@"Phone_Banner_Cell" bundle:nil] forCellReuseIdentifier:@"CommonEditorBannerCell"];
|
|
|
+
|
|
|
+ [self.editorTable registerNib:[UINib nibWithNibName:@"Phone_Editor_Cell" bundle:nil] forCellReuseIdentifier:@"CommonEditorCellEditor"];
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -174,6 +178,9 @@
|
|
|
[self.editorTable registerNib:[UINib nibWithNibName:@"iPadCommonEditorCellSignature" bundle:nil] forCellReuseIdentifier:@"CommonEditorCellSignature"];
|
|
|
[self.editorTable registerNib:[UINib nibWithNibName:@"iPadCommonEditorCellSwitch" bundle:nil] forCellReuseIdentifier:@"CommonEditorCellSwitch"];
|
|
|
[self.editorTable registerNib:[UINib nibWithNibName:@"iPadCommonEditorCellTextView" bundle:nil] forCellReuseIdentifier:@"CommonEditorCellTextView"];
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
// [self.editorTable registerNib:[UINib nibWithNibName:@"iPadCommonEditorRangeCell" bundle:nil] forCellReuseIdentifier:@"CommonEditorRangeCell"];
|
|
|
// [self.editorTable registerNib:[UINib nibWithNibName:@"iPadCommonEditorWebCell" bundle:nil] forCellReuseIdentifier:@"CommonEditorWebCell"];
|
|
|
// [self.editorTable registerNib:[UINib nibWithNibName:@"iPadCommonEditorBannerCell" bundle:nil] forCellReuseIdentifier:@"CommonEditorBannerCell"];
|
|
|
@@ -227,7 +234,7 @@
|
|
|
appDelegate=(AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
});
|
|
|
// AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
|
|
|
- NSDictionary *urgencyDic = [appDelegate globalParameterForKey:@"urgencyDic"];
|
|
|
+ NSDictionary *urgencyDic = [RASingleton.sharedInstance globalParameterForKey:@"urgencyDic"];
|
|
|
|
|
|
id count = [urgencyDic objectForKey:@"count"];
|
|
|
|
|
|
@@ -405,7 +412,7 @@
|
|
|
{
|
|
|
|
|
|
__block UIAlertController * waitalert = [RAUtils waiting_alert:self message:self.loading_msg title:self.loading_title completion:^{
|
|
|
- [RANetwork request_editor:self.request_url params:self.params completionHandler:^(NSMutableDictionary *result) {
|
|
|
+ [RADataProvider request_editor:self.request_url params:self.params completionHandler:^(NSMutableDictionary *result) {
|
|
|
NSMutableDictionary* editor_json = result;
|
|
|
DebugLog(@"data string: %@",[RAConvertor dict2string:editor_json] );
|
|
|
|
|
|
@@ -414,6 +421,12 @@
|
|
|
[waitalert dismissViewControllerAnimated:YES completion:^{
|
|
|
if([[editor_json valueForKey:@"result"] intValue]==2)
|
|
|
{
|
|
|
+ NSArray* arr_menu =editor_json[@"menu"];
|
|
|
+
|
|
|
+ if( arr_menu !=nil)
|
|
|
+ {
|
|
|
+ [self injectMenu:arr_menu];
|
|
|
+ }
|
|
|
|
|
|
weakself.content_data_download = [editor_json mutableCopy];
|
|
|
|
|
|
@@ -450,45 +463,6 @@
|
|
|
}];
|
|
|
|
|
|
|
|
|
-// dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
|
-//
|
|
|
-// NSDictionary* editor_json = [weakself request_Editor:weakself.request_url params:weakself.params];
|
|
|
-// DebugLog(@"data string: %@",[RAConvertor dict2string:editor_json] );
|
|
|
-// dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
-//
|
|
|
-// [waitalert dismissViewControllerAnimated:YES completion:nil];
|
|
|
-//
|
|
|
-//
|
|
|
-// if([[editor_json valueForKey:@"result"] intValue]==2)
|
|
|
-// {
|
|
|
-//
|
|
|
-// weakself.content_data_download = [editor_json mutableCopy];
|
|
|
-//
|
|
|
-// weakself.content_data_control = [weakself translate_json:weakself.content_data_download changed: weakself.changed_data];
|
|
|
-//
|
|
|
-// // self.content_data = [editor_json mutableCopy];
|
|
|
-// // self.content_data = [self translate_json:editor_json];
|
|
|
-//
|
|
|
-// // NSMutableDictionary* content_data1 = [self translate_json:self.content_data];
|
|
|
-//
|
|
|
-// [weakself download_success];
|
|
|
-//
|
|
|
-// [weakself.editorTable reloadData];
|
|
|
-//
|
|
|
-// // NSString * ttt=[self.content_data valueForKey:@"title"] ;
|
|
|
-//
|
|
|
-// weakself.navigationItem.title = [weakself.content_data_download valueForKey:@"title"] ;
|
|
|
-// }
|
|
|
-// else
|
|
|
-// {
|
|
|
-// [weakself download_failed];
|
|
|
-// [weakself alertMessage:[editor_json valueForKey:@"err_msg"]];
|
|
|
-//
|
|
|
-// }
|
|
|
-//
|
|
|
-//
|
|
|
-// });
|
|
|
-// });
|
|
|
}
|
|
|
else if(self.url_type== URL_LOCAL )
|
|
|
{
|
|
|
@@ -526,7 +500,25 @@
|
|
|
self.url_type = URL_REMOTE;
|
|
|
}
|
|
|
}
|
|
|
+-(void) injectMenu:(NSArray* ) menu
|
|
|
+{
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ UIBarButtonItem *menuItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"ic_more_dot"] style:UIBarButtonItemStylePlain target:self action:@selector(menuItemClick:)];
|
|
|
+ self.injectMenu = menu;
|
|
|
|
|
|
+ // // closeButton.title = @"Close";
|
|
|
+ //
|
|
|
+ self.navigationItem.rightBarButtonItem = menuItem;
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+- (void)menuItemClick:(id)sender {
|
|
|
+
|
|
|
+ NSAssert(true, ([NSString stringWithFormat:@"%@ menuItemClick not impl",[self class_name]]));
|
|
|
+}
|
|
|
-(NSMutableDictionary*) check_cancommit :(bool) alert
|
|
|
{
|
|
|
[[[UIApplication sharedApplication] keyWindow] endEditing:YES];
|
|
|
@@ -1382,7 +1374,7 @@
|
|
|
[self.params setObject:obj_str forKey:(NSString*)changed_key[i]];
|
|
|
}
|
|
|
__block UIAlertController * waitalert = [RAUtils waiting_alert:self message:self.loading_msg title:self.loading_title completion:^{
|
|
|
- [RANetwork request_editor:self.request_url params:self.params completionHandler:^(NSMutableDictionary *result) {
|
|
|
+ [RADataProvider request_editor:self.request_url params:self.params completionHandler:^(NSMutableDictionary *result) {
|
|
|
NSMutableDictionary* editor_json = result;
|
|
|
DebugLog(@"data string: %@",[RAConvertor dict2string:editor_json] );
|
|
|
|
|
|
@@ -1419,50 +1411,6 @@
|
|
|
}];
|
|
|
|
|
|
|
|
|
-
|
|
|
- // dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-// NSDictionary* refresh_params=[weakself get_refresh_param];
|
|
|
-//
|
|
|
-// NSArray* changed_key=[refresh_params allKeys];
|
|
|
-// for(int i=0;i<changed_key.count;i++)
|
|
|
-// {
|
|
|
-// NSString* obj_str=[NSString stringWithFormat:@"%@",[refresh_params valueForKey:(NSString*)changed_key[i]]];
|
|
|
-// [weakself.params setObject:obj_str forKey:(NSString*)changed_key[i]];
|
|
|
-// }
|
|
|
-//
|
|
|
-// NSDictionary* editor_json = [weakself request_Editor:weakself.request_url params:weakself.params];
|
|
|
-// DebugLog(@"data string: %@",[RAConvertor dict2string:editor_json] );
|
|
|
-//
|
|
|
-// dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
-// [waitalert dismissViewControllerAnimated:YES completion:nil];
|
|
|
-//
|
|
|
-//
|
|
|
-// if([[editor_json valueForKey:@"result"] intValue]==2)
|
|
|
-// {
|
|
|
-//
|
|
|
-// weakself.content_data_download = [weakself CopyDirty:weakself.content_data_download to:[editor_json mutableCopy]];//[editor_json mutableCopy];
|
|
|
-//
|
|
|
-// weakself.content_data_control = [weakself translate_json:weakself.content_data_download changed: weakself.changed_data];
|
|
|
-//
|
|
|
-//
|
|
|
-// [weakself download_success];
|
|
|
-// [weakself.editorTable reloadData];
|
|
|
-//
|
|
|
-// }
|
|
|
-// else
|
|
|
-// {
|
|
|
-// [weakself download_failed];
|
|
|
-// [weakself alertMessage:[editor_json valueForKey:@"err_msg"]];
|
|
|
-// }
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-// });
|
|
|
-// });
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -2625,7 +2573,7 @@
|
|
|
|
|
|
__weak typeof(self) weakself = self;
|
|
|
__block UIAlertController * waitalert = [RAUtils waiting_alert:self message:self.loading_msg title:self.loading_title completion:^{
|
|
|
- [RANetwork request_commoneditor_partialrefresh:params url:url completionHandler:^(NSMutableDictionary *result) {
|
|
|
+ [RADataProvider request_commoneditor_partialrefresh:params url:url completionHandler:^(NSMutableDictionary *result) {
|
|
|
NSDictionary* editor_json =result;
|
|
|
[waitalert dismissViewControllerAnimated:YES completion:^{
|
|
|
if([[editor_json valueForKey:@"result"] intValue]==2)
|
|
|
@@ -2778,7 +2726,7 @@
|
|
|
__weak typeof(self) weakself = self;
|
|
|
|
|
|
__block UIAlertController * waitalert = [RAUtils waiting_alert:self message:self.loading_msg title:self.loading_title completion:^{
|
|
|
- [RANetwork request_commoneditor_partialrefresh:params url:url completionHandler:^(NSMutableDictionary *result) {
|
|
|
+ [RADataProvider request_commoneditor_partialrefresh:params url:url completionHandler:^(NSMutableDictionary *result) {
|
|
|
NSDictionary* editor_json = result;
|
|
|
[waitalert dismissViewControllerAnimated:YES completion:^{
|
|
|
if([[editor_json valueForKey:@"result"] intValue]==2)
|
|
|
@@ -3829,11 +3777,11 @@
|
|
|
}
|
|
|
|
|
|
NSString* type=[item_json valueForKey:@"type"] ;
|
|
|
-
|
|
|
+ // 此处应移动到erp mobile 项目内
|
|
|
if([type isEqualToString:@"price"])
|
|
|
{
|
|
|
- BOOL can_see_price = [[appDelegate globalParameterForKey:@"can_see_price"] boolValue];
|
|
|
- BOOL price_hidden = [[appDelegate globalParameterForKey:@"price_hidden"] boolValue];
|
|
|
+ BOOL can_see_price = [[RASingleton.sharedInstance globalParameterForKey:@"can_see_price"] boolValue];
|
|
|
+ BOOL price_hidden = [[RASingleton.sharedInstance globalParameterForKey:@"price_hidden"] boolValue];
|
|
|
|
|
|
if(can_see_price&&price_hidden==false)
|
|
|
{
|
|
|
@@ -4023,8 +3971,61 @@
|
|
|
cell.accessoryType = UITableViewCellAccessoryNone;
|
|
|
cell.backgroundColor = [UIColor whiteColor];
|
|
|
return cell;
|
|
|
+
|
|
|
|
|
|
- } else if([control isEqualToString:@"enum"])
|
|
|
+ }
|
|
|
+ else if([control isEqualToString:@"editor"])
|
|
|
+ {
|
|
|
+ CellIdentifier = @"CommonEditorCellEditor";
|
|
|
+ CommonEditorCellEditor * cell= [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
|
|
|
+ NSString* title = [[item_json valueForKey:@"aname"] stringValue];
|
|
|
+ NSString* value = [[item_json valueForKey:@"value"] stringValue];
|
|
|
+
|
|
|
+ int disable = [[item_json valueForKey:@"disable"] intValue];
|
|
|
+ if(disable==1||readonly)
|
|
|
+ {
|
|
|
+ cell.labelValue.textColor= [UIColor lightGrayColor];
|
|
|
+
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ cell.labelValue.textColor= [UIColor blackColor];
|
|
|
+ // cell.textfield.backgroundColor = [UIColor whiteColor];
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ NSString* align =[item_json valueForKey:@"align"];
|
|
|
+ if([align isEqualToString:@"right"])
|
|
|
+ cell.labelValue.textAlignment= NSTextAlignmentRight;
|
|
|
+ else
|
|
|
+ cell.labelValue.textAlignment =NSTextAlignmentLeft;
|
|
|
+
|
|
|
+ cell.labelName.text=title;
|
|
|
+ cell.labelValue.text=value;
|
|
|
+
|
|
|
+
|
|
|
+// if([required isEqualToString:@"true"])
|
|
|
+// {
|
|
|
+// [cell.labelTitle sizeToFit];
|
|
|
+// CGRect frame =cell.labelTitle.frame;
|
|
|
+// frame= CGRectMake(frame.origin.x+frame.size.width, frame.origin.y, 10, 21);
|
|
|
+// cell.starMark.frame = frame;
|
|
|
+// cell.starMark.hidden=false;
|
|
|
+// // [title appendString:@"*"];
|
|
|
+//
|
|
|
+// // [title appendString:@"<font size=\"6\" >*</font>"];
|
|
|
+// // NSString * htmlString = @"<html><body> Some html string \n <font size=\"13\" color=\"red\">This is some text!</font> </body></html>";
|
|
|
+// }
|
|
|
+// else
|
|
|
+// {
|
|
|
+// [cell.labelTitle sizeToFit];
|
|
|
+// cell.starMark.hidden=true;
|
|
|
+// }
|
|
|
+
|
|
|
+ cell.backgroundColor = [UIColor whiteColor];
|
|
|
+ return cell;
|
|
|
+ }
|
|
|
+ else if([control isEqualToString:@"enum"])
|
|
|
{
|
|
|
|
|
|
|
|
|
@@ -4202,8 +4203,8 @@
|
|
|
NSString* totalprice = [NSString stringWithFormat:@"%.2f",(unitprice* (1.0-discount/100)+dprice)*count];
|
|
|
|
|
|
|
|
|
- BOOL can_see_price = [[appDelegate globalParameterForKey:@"can_see_price"] boolValue];
|
|
|
- BOOL price_hidden = [[appDelegate globalParameterForKey:@"price_hidden"] boolValue];
|
|
|
+ BOOL can_see_price = [[RASingleton.sharedInstance globalParameterForKey:@"can_see_price"] boolValue];
|
|
|
+ BOOL price_hidden = [[RASingleton.sharedInstance globalParameterForKey:@"price_hidden"] boolValue];
|
|
|
|
|
|
if(can_see_price&&price_hidden==false)
|
|
|
{
|
|
|
@@ -4617,7 +4618,7 @@
|
|
|
|
|
|
- (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
|
|
|
{
|
|
|
-
|
|
|
+// return [super tableview:tableView viewForHeaderInSection:section];
|
|
|
NSString* value =[DefaultAppearance get_noneappearance_value:@"DefaultTableHeaderView" valuename:@"title_text_color"];
|
|
|
if(value==nil)
|
|
|
value=@"";
|
|
|
@@ -4713,6 +4714,8 @@
|
|
|
// [statuslabel sizeToFit];
|
|
|
// [myView addSubview:statuslabel];
|
|
|
//
|
|
|
+ myView.backgroundColor = UIColor.lightGrayColor;
|
|
|
+ UIColor * c=myView.backgroundColor;
|
|
|
return myView;
|
|
|
}
|
|
|
|
|
|
@@ -4775,7 +4778,12 @@
|
|
|
|
|
|
[self.navigationController pushViewController:enumvc animated:true];
|
|
|
|
|
|
- }else if([control isEqualToString:@"action"])
|
|
|
+ }
|
|
|
+ else if([control isEqualToString:@"editor"])
|
|
|
+ {
|
|
|
+ [self handle_editor_cell_select:tableView IndexPath:indexPath];
|
|
|
+ }
|
|
|
+ else if([control isEqualToString:@"action"])
|
|
|
{
|
|
|
if (disable || readonly) {
|
|
|
return nil;
|
|
|
@@ -4798,7 +4806,7 @@
|
|
|
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
DatePickerViewController* dpvc =[ [UIStoryboard storyboardWithName:@"CommonEditor" bundle:nil] instantiateViewControllerWithIdentifier:@"DatePickerViewController"];
|
|
|
if([[type lowercaseString] isEqualToString:@"date"])
|
|
|
@@ -4816,10 +4824,21 @@
|
|
|
dpvc.pickerMode = UIDatePickerModeDateAndTime;
|
|
|
[dateFormatter setDateFormat:@"yyyy/MM/dd HH:mm:ss"];
|
|
|
}
|
|
|
+
|
|
|
+ __weak typeof(self) weakSelf = self;
|
|
|
+
|
|
|
NSDate *date = [dateFormatter dateFromString:value];
|
|
|
dpvc.date = date;
|
|
|
dpvc.formatter = dateFormatter;
|
|
|
dpvc.labelTime.text = value;
|
|
|
+ dpvc.blk_Set=^(NSString *date)
|
|
|
+ {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ [weakSelf DateTimeValueChanged:date indexPath:indexPath];
|
|
|
+
|
|
|
+ };
|
|
|
[self.navigationController pushViewController:dpvc animated:true];
|
|
|
|
|
|
}else if([control isEqualToString:@"monthpicker"])
|
|
|
@@ -4961,8 +4980,8 @@
|
|
|
|
|
|
NSMutableDictionary* params = [[NSMutableDictionary alloc] init];
|
|
|
AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
- NSString *user = [appDelegate globalParameterForKey:@"user"];
|
|
|
- NSString *password = [appDelegate globalParameterForKey:@"password"];
|
|
|
+ NSString *user = [RASingleton.sharedInstance globalParameterForKey:@"user"];
|
|
|
+ NSString *password = [RASingleton.sharedInstance globalParameterForKey:@"password"];
|
|
|
|
|
|
if(user!=nil)
|
|
|
[params setValue:user forKey:@"user"];
|
|
|
@@ -5239,6 +5258,80 @@
|
|
|
self.content_data_control = [self translate_json:self.content_data_download changed:self.changed_data];
|
|
|
[self.editorTable reloadData ];
|
|
|
}
|
|
|
+#pragma mark datetimeChanged
|
|
|
+-(void) DateTimeValueChanged:(NSString *)value indexPath :(NSIndexPath*) indexPath
|
|
|
+{
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ NSMutableDictionary* section_json=nil;
|
|
|
+
|
|
|
+
|
|
|
+ // DebugLog(@"endedit %d_%d",indexPath.section,indexPath.row);
|
|
|
+ NSMutableDictionary* item_json =[((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row] mutableCopy];
|
|
|
+
|
|
|
+ int refresh = [[item_json valueForKey:@"refresh"] intValue];
|
|
|
+ NSString* refresh_trigger = [item_json valueForKey:@"name"];
|
|
|
+ NSString* subid=[item_json valueForKey:@"subid"];
|
|
|
+
|
|
|
+
|
|
|
+ // NSArray* imgs=[RAUtils string2arr:url_up separator:@","];
|
|
|
+
|
|
|
+
|
|
|
+ // imgs[index];
|
|
|
+
|
|
|
+ item_json[@"value"]=value;
|
|
|
+
|
|
|
+ [item_json setValue:@"true" forKey:@"dirty"];
|
|
|
+ if(subid==nil)
|
|
|
+ {
|
|
|
+ section_json = [[self.content_data_download objectForKey:[NSString stringWithFormat:@"section_%ld",(long)indexPath.section ]] mutableCopy];
|
|
|
+ int count=0;
|
|
|
+
|
|
|
+ count=[[section_json valueForKey:@"count"] intValue];
|
|
|
+
|
|
|
+ for(int i=0;i<count;i++)
|
|
|
+ {
|
|
|
+ NSDictionary * olditem=[section_json objectForKey:[NSString stringWithFormat:@"item_%d",i ]];
|
|
|
+ if([[olditem valueForKey:@"name"] isEqualToString:[item_json valueForKey:@"name" ]])
|
|
|
+ [section_json setObject:item_json forKey:[NSString stringWithFormat:@"item_%d",i ]];
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ NSArray* idarr=[subid componentsSeparatedByString:@"_"];
|
|
|
+ int section = [(NSString*)idarr[0] intValue];
|
|
|
+ int item=[(NSString*)idarr[1] intValue];
|
|
|
+
|
|
|
+
|
|
|
+ section_json = [[self.content_data_download objectForKey:[NSString stringWithFormat:@"section_%d", section]] mutableCopy];
|
|
|
+ NSDictionary * olditem=[section_json objectForKey:[NSString stringWithFormat:@"item_%d",item ]];
|
|
|
+ item_json= [self enum_subitem_changed:[olditem mutableCopy] subid:idarr value:item_json step:2];
|
|
|
+ [item_json setValue:@"true" forKey:@"dirty"];
|
|
|
+ [section_json setObject:item_json forKey:[NSString stringWithFormat:@"item_%d",item ]];
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ [self.content_data_download setObject:section_json forKey:[NSString stringWithFormat:@"section_%ld",(long)indexPath.section ]];
|
|
|
+
|
|
|
+ self.content_data_control = [self translate_json:self.content_data_download changed: self.changed_data];
|
|
|
+
|
|
|
+ // NSRange range = NSMakeRange(indexPath.section, 1);
|
|
|
+ // NSIndexSet *sectionToReload = [NSIndexSet indexSetWithIndexesInRange:range];
|
|
|
+ // [self.editorTable reloadSections:sectionToReload withRowAnimation:UITableViewRowAnimationAutomatic];
|
|
|
+
|
|
|
+
|
|
|
+ if(refresh==1)
|
|
|
+ {
|
|
|
+ [self refresh:refresh_trigger];
|
|
|
+ }
|
|
|
+ [self.editorTable reloadData ];
|
|
|
+}
|
|
|
+
|
|
|
#pragma mark EnumSelectViewControllerDelegate
|
|
|
|
|
|
-(void) setEnumValue:(NSMutableDictionary *)value indexPath :(NSIndexPath*) indexPath
|
|
|
@@ -6414,7 +6507,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
-//#pragma mark Request Editor
|
|
|
+#pragma mark Request Editor
|
|
|
+
|
|
|
//-(NSDictionary*)request_Editor:(NSString*) request_url params:(NSMutableDictionary*)params
|
|
|
//{
|
|
|
// return [RANetwork request_Editor:request_url params:params];
|
|
|
@@ -6923,7 +7017,14 @@
|
|
|
[self presentViewController:preVC animated:true completion:nil];
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+#pragma mark 为子类暴露的接口
|
|
|
+-(void) handle_editor_cell_select:(UITableView *)tableView IndexPath:(NSIndexPath *)indexPath
|
|
|
+{
|
|
|
+
|
|
|
+
|
|
|
+ NSAssert(true, ([NSString stringWithFormat:@"%@ handle_editor_cell_select not impl",[self class_name]]));
|
|
|
+
|
|
|
+}
|
|
|
@end
|
|
|
|
|
|
|