|
|
@@ -356,7 +356,7 @@
|
|
|
NSString* aaa = [RAUtils dict2string:self.content_data_control];
|
|
|
for(int i=0;i<section_count;i++)
|
|
|
{
|
|
|
- NSLog(@"debug...section:%d",i);
|
|
|
+ DebugLog(@"debug...section:%d",i);
|
|
|
NSMutableArray * sectionjson = [self.content_data_control[i] mutableCopy];//[[self.content_data_download objectForKey:[NSString stringWithFormat:@"section_%d",i ]] mutableCopy];
|
|
|
int item_count = sectionjson.count;//[[sectionjson valueForKey:@"count"] intValue];
|
|
|
for(int j=0;j<item_count;j++)
|
|
|
@@ -608,7 +608,7 @@
|
|
|
|
|
|
// You may use a Block, rather than a delegate.
|
|
|
[alertView setOnButtonTouchUpInside:^(CustomIOSAlertView *alertView, int buttonIndex) {
|
|
|
- // NSLog(@"Block: Button at position %d is clicked on alertView %d.", buttonIndex, (int)[alertView tag]);
|
|
|
+ // DebugLog(@"Block: Button at position %d is clicked on alertView %d.", buttonIndex, (int)[alertView tag]);
|
|
|
[alertView close];
|
|
|
}];
|
|
|
|
|
|
@@ -1472,7 +1472,7 @@
|
|
|
|
|
|
-(void) handle_action_return:(NSMutableDictionary *)value indexPath :(NSIndexPath*) indexPath action:(int) action_code
|
|
|
{
|
|
|
- NSLog(@"commoneditor return %ld_%ld",(long)indexPath.section,(long)indexPath.row);
|
|
|
+ DebugLog(@"commoneditor return %ld_%ld",(long)indexPath.section,(long)indexPath.row);
|
|
|
NSMutableDictionary* section_json=nil;
|
|
|
|
|
|
NSMutableDictionary* item_json =[((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row] mutableCopy];
|
|
|
@@ -1622,7 +1622,7 @@
|
|
|
[self.content_data_download setObject:section_json forKey:[NSString stringWithFormat:@"section_%ld",(long)indexPath.section ]];
|
|
|
}
|
|
|
|
|
|
- NSLog(@"CONTENT UPDATE:%@",[iSalesNetwork DataTOjsonString:self.content_data_download]);
|
|
|
+ DebugLog(@"CONTENT UPDATE:%@",[iSalesNetwork DataTOjsonString:self.content_data_download]);
|
|
|
self.content_data_control = [self translate_json:self.content_data_download changed:self.changed_data];
|
|
|
|
|
|
|
|
|
@@ -1669,7 +1669,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
- // NSLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
|
|
|
+ // DebugLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
|
|
|
[self.editorTable reloadData ];
|
|
|
|
|
|
}
|
|
|
@@ -1809,7 +1809,7 @@
|
|
|
[self.content_data_download setObject:section_json forKey:[NSString stringWithFormat:@"section_%ld",(long)indexPath.section ]];
|
|
|
}
|
|
|
|
|
|
- NSLog(@"CONTENT UPDATE:%@",[iSalesNetwork DataTOjsonString:self.content_data_download]);
|
|
|
+ DebugLog(@"CONTENT UPDATE:%@",[iSalesNetwork DataTOjsonString:self.content_data_download]);
|
|
|
self.content_data_control = [self translate_json:self.content_data_download changed:self.changed_data];
|
|
|
|
|
|
|
|
|
@@ -1856,7 +1856,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
- // NSLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
|
|
|
+ // DebugLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
|
|
|
[self.editorTable reloadData ];
|
|
|
}
|
|
|
}
|
|
|
@@ -1954,7 +1954,7 @@
|
|
|
//用于会填 textfield 的值,textViewDidEndEditing 和 partial refresh 会调用。
|
|
|
|
|
|
|
|
|
- // NSLog(@"textFieldDidEndEditing");
|
|
|
+ // DebugLog(@"textFieldDidEndEditing");
|
|
|
// // UITableViewCell *cell = (UITableViewCell *) textField.superview.superview;
|
|
|
// NSIndexPath * indexPath = self.lastedit_from;
|
|
|
//
|
|
|
@@ -1965,7 +1965,7 @@
|
|
|
|
|
|
val = [val stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
|
|
|
|
|
|
- // NSLog(@"endedit %d_%d",indexPath.section,indexPath.row);
|
|
|
+ // DebugLog(@"endedit %d_%d",indexPath.section,indexPath.row);
|
|
|
NSMutableDictionary* item_json =[((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row] mutableCopy];
|
|
|
|
|
|
NSString* subid=[item_json valueForKey:@"subid"];
|
|
|
@@ -2593,7 +2593,7 @@
|
|
|
return ;
|
|
|
}
|
|
|
|
|
|
- // NSLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
|
|
|
+ // DebugLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
|
|
|
[self.editorTable reloadData ];
|
|
|
|
|
|
|
|
|
@@ -2824,7 +2824,7 @@
|
|
|
{
|
|
|
|
|
|
[self handle_action_return:value indexPath:indexPath action:ACTION_SAVE_DATA];
|
|
|
- // NSLog(@"commoneditor return %d_%d",indexPath.section,indexPath.row);
|
|
|
+ // DebugLog(@"commoneditor return %d_%d",indexPath.section,indexPath.row);
|
|
|
//
|
|
|
// NSMutableDictionary* section_json=nil;
|
|
|
//
|
|
|
@@ -2949,11 +2949,11 @@
|
|
|
// }
|
|
|
//
|
|
|
//
|
|
|
- // NSLog(@"CONTENT UPDATE:%@",[iSalesNetwork DataTOjsonString:self.content_data_download]);
|
|
|
+ // DebugLog(@"CONTENT UPDATE:%@",[iSalesNetwork DataTOjsonString:self.content_data_download]);
|
|
|
// self.content_data_control = [self translate_json:self.content_data_download changed:self.changed_data];
|
|
|
//
|
|
|
//
|
|
|
- // // NSLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
|
|
|
+ // // DebugLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
|
|
|
// [self.editorTable reloadData ];
|
|
|
|
|
|
}
|
|
|
@@ -3124,7 +3124,7 @@
|
|
|
// if(indexPath.section==4)
|
|
|
// d=0;
|
|
|
|
|
|
- // NSLog(@"%d,%d",indexPath.section,indexPath.row);
|
|
|
+ // DebugLog(@"%d,%d",indexPath.section,indexPath.row);
|
|
|
// NSMutableDictionary* section_json = [self.content_data objectForKey:[NSString stringWithFormat:@"section_%ld",(long)indexPath.section ]];
|
|
|
|
|
|
|
|
|
@@ -4446,7 +4446,7 @@
|
|
|
{
|
|
|
|
|
|
bool readonly = [[self.content_data_download valueForKey:@"readonly"]boolValue];
|
|
|
- NSLog(@"tableView willSelectRowAtIndexPath");
|
|
|
+ DebugLog(@"tableView willSelectRowAtIndexPath");
|
|
|
NSDictionary* item_json =((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row];
|
|
|
AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
NSString* control = [item_json valueForKey:@"control"];
|
|
|
@@ -4800,7 +4800,7 @@
|
|
|
|
|
|
// NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
|
|
|
|
|
|
- NSLog(@"data string: %@",jsonStr);
|
|
|
+ DebugLog(@"data string: %@",jsonStr);
|
|
|
NSError *error=nil;
|
|
|
NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:&error];
|
|
|
|
|
|
@@ -4883,17 +4883,17 @@
|
|
|
if (error) {
|
|
|
|
|
|
NSString* err_msg = [error localizedDescription];
|
|
|
- NSLog(@"%@",err_msg);// [self.view updateWithMessage:[NSString stringWithFormat:@"Error : %@!", error.debugDescription]];
|
|
|
+ DebugLog(@"%@",err_msg);// [self.view updateWithMessage:[NSString stringWithFormat:@"Error : %@!", error.debugDescription]];
|
|
|
|
|
|
|
|
|
NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
|
|
|
|
|
|
- NSLog(@"data string: %@",str);
|
|
|
+ DebugLog(@"data string: %@",str);
|
|
|
|
|
|
[RAUtils message_alert:@"Can not connect to server please try again." title:@"Upload Image" controller:self] ;
|
|
|
|
|
|
} else {
|
|
|
- NSLog(@"response ");
|
|
|
+ DebugLog(@"response ");
|
|
|
|
|
|
|
|
|
|
|
|
@@ -4904,7 +4904,7 @@
|
|
|
|
|
|
// NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
|
|
|
|
|
|
- NSLog(@"data string: %@",jsonStr);
|
|
|
+ DebugLog(@"data string: %@",jsonStr);
|
|
|
|
|
|
NSDictionary* json = responseObject;
|
|
|
|
|
|
@@ -4964,7 +4964,7 @@
|
|
|
// else if([control isEqualToString:@"action "])
|
|
|
// {
|
|
|
//
|
|
|
- // NSLog(@"action push");
|
|
|
+ // DebugLog(@"action push");
|
|
|
// // SignatureViewController * signvc =[ self.storyboard instantiateViewControllerWithIdentifier:@"SignatureViewController"];
|
|
|
// // signvc.title = [item_json valueForKey:@"aname"];
|
|
|
// // signvc.indexPath = indexPath;
|
|
|
@@ -5030,7 +5030,7 @@
|
|
|
NSMutableDictionary* section_json=nil;
|
|
|
|
|
|
|
|
|
- // NSLog(@"endedit %d_%d",indexPath.section,indexPath.row);
|
|
|
+ // DebugLog(@"endedit %d_%d",indexPath.section,indexPath.row);
|
|
|
NSMutableDictionary* item_json =[((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row] mutableCopy];
|
|
|
|
|
|
// NSString* check=@"false";
|
|
|
@@ -5185,11 +5185,11 @@
|
|
|
}
|
|
|
|
|
|
|
|
|
- NSLog(@"CONTENT UPDATE:%@",[iSalesNetwork DataTOjsonString:self.content_data_download]);
|
|
|
+ DebugLog(@"CONTENT UPDATE:%@",[iSalesNetwork DataTOjsonString:self.content_data_download]);
|
|
|
|
|
|
|
|
|
|
|
|
- // NSLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
|
|
|
+ // DebugLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
|
|
|
[self.editorTable reloadData ];
|
|
|
}
|
|
|
-(void) EnumValueChanged:(NSMutableDictionary *)value indexPath :(NSIndexPath*) indexPath
|
|
|
@@ -5222,7 +5222,7 @@
|
|
|
layer.shadowRadius = 2.0;
|
|
|
}
|
|
|
|
|
|
- NSLog(@"enum changed %ld_%ld",(long)indexPath.section,(long)indexPath.row);
|
|
|
+ DebugLog(@"enum changed %ld_%ld",(long)indexPath.section,(long)indexPath.row);
|
|
|
|
|
|
[self setEnumValue:value indexPath:indexPath];
|
|
|
|
|
|
@@ -5292,7 +5292,7 @@
|
|
|
- (BOOL)textViewShouldBeginEditing:(UITextView *)textView
|
|
|
{
|
|
|
|
|
|
- NSLog(@"textViewShouldBeginEditing");
|
|
|
+ DebugLog(@"textViewShouldBeginEditing");
|
|
|
|
|
|
self.editingcell = (UITableViewCell*)textView.superview.superview;
|
|
|
return textView.editable;
|
|
|
@@ -5318,7 +5318,7 @@
|
|
|
NSMutableDictionary* section_json=nil;
|
|
|
|
|
|
|
|
|
- // NSLog(@"endedit %d_%d",indexPath.section,indexPath.row);
|
|
|
+ // DebugLog(@"endedit %d_%d",indexPath.section,indexPath.row);
|
|
|
NSMutableDictionary* item_json =[((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row] mutableCopy];
|
|
|
|
|
|
NSString* subid=[item_json valueForKey:@"subid"];
|
|
|
@@ -5401,7 +5401,7 @@
|
|
|
UITableViewCell *cell = (UITableViewCell *) textView.superview.superview;
|
|
|
|
|
|
NSIndexPath * indexPath = [self.editorTable indexPathForCell:cell];
|
|
|
- // NSLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
|
|
|
+ // DebugLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
|
|
|
NSDictionary* item_json =((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row];
|
|
|
|
|
|
NSString* required = [item_json valueForKey:@"required"];
|
|
|
@@ -5441,8 +5441,8 @@
|
|
|
#pragma mark textField delegate
|
|
|
-(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{
|
|
|
|
|
|
- NSLog(@"textField shouldChangeCharactersInRange");
|
|
|
- NSLog(@"text:%@",textField.text);
|
|
|
+ DebugLog(@"textField shouldChangeCharactersInRange");
|
|
|
+ DebugLog(@"text:%@",textField.text);
|
|
|
|
|
|
|
|
|
|
|
|
@@ -5451,7 +5451,7 @@
|
|
|
CommonEditorCellEdit *cell = (CommonEditorCellEdit *) textField.superview.superview;
|
|
|
|
|
|
NSIndexPath * indexPath = [self.editorTable indexPathForCell:cell];
|
|
|
- // NSLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
|
|
|
+ // DebugLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
|
|
|
NSDictionary* item_json =((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row];
|
|
|
|
|
|
NSString* required = [item_json valueForKey:@"required"];
|
|
|
@@ -5572,7 +5572,7 @@
|
|
|
- (void)textFieldDidEndEditing:(UITextField *)textField
|
|
|
{
|
|
|
|
|
|
- NSLog(@"textFieldDidEndEditing");
|
|
|
+ DebugLog(@"textFieldDidEndEditing");
|
|
|
// UITableViewCell *cell = (UITableViewCell *) textField.superview.superview;
|
|
|
NSIndexPath * indexPath = self.lastedit_from;
|
|
|
|
|
|
@@ -5583,7 +5583,7 @@
|
|
|
//
|
|
|
// textField.text = [textField.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
|
|
|
//
|
|
|
- // // NSLog(@"endedit %d_%d",indexPath.section,indexPath.row);
|
|
|
+ // // DebugLog(@"endedit %d_%d",indexPath.section,indexPath.row);
|
|
|
// NSMutableDictionary* item_json =[((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row] mutableCopy];
|
|
|
//
|
|
|
// NSString* subid=[item_json valueForKey:@"subid"];
|
|
|
@@ -5840,7 +5840,7 @@
|
|
|
|
|
|
- (void)textFieldDidBeginEditing:(UITextField *)textField
|
|
|
{
|
|
|
- NSLog(@"textField shouldChangeCharactersInRange");
|
|
|
+ DebugLog(@"textField shouldChangeCharactersInRange");
|
|
|
|
|
|
self.lastedit = textField;
|
|
|
UITableViewCell *cell = (UITableViewCell *) textField.superview.superview;
|
|
|
@@ -5852,7 +5852,7 @@
|
|
|
|
|
|
// image 改变时执行
|
|
|
- (void) imgIsChanged:(NSString *)url_down url_up:(NSString *)url_up indexPath: (NSIndexPath *) indexPath index:(int)index url_index:(NSString* )url_index{
|
|
|
- // NSLog(@"Sender is = %@", url);
|
|
|
+ // DebugLog(@"Sender is = %@", url);
|
|
|
|
|
|
|
|
|
|
|
|
@@ -5860,7 +5860,7 @@
|
|
|
NSMutableDictionary* section_json=nil;
|
|
|
|
|
|
|
|
|
- // NSLog(@"endedit %d_%d",indexPath.section,indexPath.row);
|
|
|
+ // 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];
|
|
|
@@ -5944,7 +5944,7 @@
|
|
|
NSMutableDictionary* section_json=nil;
|
|
|
|
|
|
|
|
|
- // NSLog(@"endedit %d_%d",indexPath.section,indexPath.row);
|
|
|
+ // 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];
|
|
|
@@ -6198,10 +6198,10 @@
|
|
|
#pragma mark Responding to keyboard events
|
|
|
|
|
|
- (void)keyboardWillChangeFrame:(NSNotification *)notification {
|
|
|
- NSLog(@"keyboardWillChangeFrame");
|
|
|
+ DebugLog(@"keyboardWillChangeFrame");
|
|
|
}
|
|
|
- (void)keyboardWillShow:(NSNotification *)notification {
|
|
|
- NSLog(@"keyboardWillShow");
|
|
|
+ DebugLog(@"keyboardWillShow");
|
|
|
|
|
|
if(self.keyboard_show)
|
|
|
return;
|
|
|
@@ -6220,7 +6220,7 @@
|
|
|
// Get the top of the keyboard as the y coordinate of its origin in self's view's coordinate system. The bottom of the text view's frame should align with the top of the keyboard's final position.
|
|
|
// CGRect keyboardRect = [aValue CGRectValue];
|
|
|
CGSize keyboardSize = [aValue CGRectValue].size;
|
|
|
- NSLog(@"keyboard height:%f",keyboardSize.height);
|
|
|
+ DebugLog(@"keyboard height:%f",keyboardSize.height);
|
|
|
// Get the duration of the animation.
|
|
|
NSValue *animationDurationValue = [userInfo objectForKey:UIKeyboardAnimationDurationUserInfoKey];
|
|
|
NSTimeInterval animationDuration;
|
|
|
@@ -6274,7 +6274,7 @@
|
|
|
// [self moveInputBarWithKeyboardHeight:keyboardRect.size.height withDuration:animationDuration];
|
|
|
}
|
|
|
- (void)keyboardWillHide:(NSNotification *)notification {
|
|
|
- NSLog(@"keyboardWillHide");
|
|
|
+ DebugLog(@"keyboardWillHide");
|
|
|
|
|
|
self.keyboard_show=false;
|
|
|
NSDictionary* userInfo = [notification userInfo];
|
|
|
@@ -6293,7 +6293,7 @@
|
|
|
self.editorTable.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
|
|
|
|
|
|
self.keyboard_h= 0;
|
|
|
- NSLog(@"before refresh %@",NSStringFromCGSize(self.editorTable.contentSize));
|
|
|
+ DebugLog(@"before refresh %@",NSStringFromCGSize(self.editorTable.contentSize));
|
|
|
|
|
|
|
|
|
// if(self.resize)
|