|
@@ -290,12 +290,84 @@ public class TFEditorActivity extends CommonEditorActivity
|
|
|
|
|
|
|
|
String subid = item_json.optString("subid");
|
|
String subid = item_json.optString("subid");
|
|
|
String refresh_trigger = item_json.optString("name");
|
|
String refresh_trigger = item_json.optString("name");
|
|
|
- JSONObject sub_action = item_json.optJSONObject("item_" + i);
|
|
|
|
|
- String type = sub_action.optString("type");
|
|
|
|
|
- String value = sub_action.optString("value");
|
|
|
|
|
- if
|
|
|
|
|
|
|
+// JSONObject sub_action = item_json.optJSONObject("item_" + i);
|
|
|
|
|
+// String type = item_json.optString("type");
|
|
|
|
|
+ String value = item_json.optString("value");
|
|
|
|
|
+ if(value.equals("editor"))
|
|
|
|
|
+ {
|
|
|
|
|
+// JSONObject item_json =((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row];
|
|
|
|
|
+ boolean readonly = content_data_download.optBoolean("readonly");
|
|
|
|
|
+
|
|
|
|
|
+ int disable = item_json.optInt("disable");
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ if(disable==1||readonly)
|
|
|
|
|
+ return ;
|
|
|
|
|
+
|
|
|
|
|
+ Bundle b= RAUtil.Json2Bundle(item_json.optJSONObject("params"));
|
|
|
|
|
+ Intent intent = TFEditorActivity.build(mContext,TFEditorActivity.class,null,URL_REMOTE,URL_EDIT,b);
|
|
|
|
|
+
|
|
|
|
|
+ startActivity(intent);
|
|
|
|
|
+
|
|
|
|
|
+// TFEditorViewController *vc = [[UIStoryboard storyboardWithName:@"TFEditor" bundle:nil] instantiateViewControllerWithIdentifier:@"TFEditorViewController"];
|
|
|
|
|
+//
|
|
|
|
|
+// vc.url_type = URL_REMOTE;
|
|
|
|
|
+// vc.request_url=URL_EDIT;
|
|
|
|
|
+// vc.from = indexPath;
|
|
|
|
|
+// vc.delegate = self;
|
|
|
|
|
+// vc.params = [[item_json valueForKey:@"params"] mutableCopy];
|
|
|
|
|
+//
|
|
|
|
|
+// [self.navigationController pushViewController:vc animated:NO];
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ if(value.equals("online_enum"))
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
|
|
+ String title = item_json.optString("aname");
|
|
|
|
|
+
|
|
|
|
|
+ int max_select = item_json.optInt("max");
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ JSONObject paramsjson = item_json.optJSONObject("params");
|
|
|
|
|
+
|
|
|
|
|
+ Bundle params=RAUtil.Json2Bundle(paramsjson);
|
|
|
|
|
+
|
|
|
|
|
+ String single_select = item_json.optString("single_select");
|
|
|
|
|
+
|
|
|
|
|
+ boolean singleSelect = single_select.toLowerCase().equals("true");
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ Intent intent = new EnumSlectOnlineActivity.Builder().build(mCtx,title,max_select,groupIndex,itemIndex,singleSelect,true,ONLINE_ENUM_URL,params);
|
|
|
|
|
+
|
|
|
|
|
+ int request_code = 10;
|
|
|
|
|
+
|
|
|
|
|
+ startActivityForResult(intent,request_code);
|
|
|
|
|
+// EnumSelectOnlineViewController* enumvc =[[UIStoryboard storyboardWithName:@"CommonEditor" bundle:nil] instantiateViewControllerWithIdentifier:@"EnumSelectOnlineViewController"];
|
|
|
|
|
+// enumvc.delegate = self;
|
|
|
|
|
+// enumvc.max_select = max_select;
|
|
|
|
|
+// enumvc.updatePosition = indexPath;
|
|
|
|
|
+// enumvc.online_params = item_json[@"params"];
|
|
|
|
|
+// enumvc.single_select = true;
|
|
|
|
|
+// // if([[required lowercaseString] isEqualToString:@"true"])
|
|
|
|
|
+// // enumvc.canbeEmpty = false;
|
|
|
|
|
+// // else
|
|
|
|
|
+// // enumvc.canbeEmpty =true;
|
|
|
|
|
+// // enumvc.cadedate = [cadedate_json mutableCopy];
|
|
|
|
|
+// enumvc.title = title;
|
|
|
|
|
+// // enumvc.value = [value_json mutableCopy];
|
|
|
|
|
+// // enumvc.single_select =[[single_select lowercaseString] isEqualToString:@"true"];
|
|
|
|
|
+//
|
|
|
|
|
+// enumvc.from = indexPath;
|
|
|
|
|
+// enumvc.returnValue = ^(JSONObject value,NSIndexPath* source){
|
|
|
|
|
+//
|
|
|
|
|
+//
|
|
|
|
|
+// [self handle_action_return:value[@"val_0"] indexPath:indexPath action:ACTION_FILL_SECTION];
|
|
|
|
|
+//
|
|
|
|
|
+// };
|
|
|
|
|
+//
|
|
|
|
|
+//
|
|
|
|
|
+// [self.navigationController pushViewController:enumvc animated:true];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|