|
|
@@ -531,10 +531,19 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
}
|
|
|
try {
|
|
|
JSONObject cadedate = new JSONObject(cadedate_str);
|
|
|
- int group = data.getIntExtra(EnumSlectActivity.GROUP_POSITION,0);
|
|
|
- int child = data.getIntExtra(EnumSlectActivity.CHILD_POSITION,0);
|
|
|
+ int group = data.getIntExtra(EnumSlectOnlineActivity.GROUP_POSITION,0);
|
|
|
+ int child = data.getIntExtra(EnumSlectOnlineActivity.CHILD_POSITION,0);
|
|
|
+ int subid = data.getIntExtra(EnumSlectOnlineActivity.SUB_ID,-1);
|
|
|
+ JSONObject value =cadedate.optJSONObject("val_0");
|
|
|
+
|
|
|
+ if(subid>=0)
|
|
|
+ {
|
|
|
+ value.put("is_subaction",true);
|
|
|
+ value.put("subaction_tag",subid);
|
|
|
|
|
|
- handle_action_return(cadedate,group,child,ACTION_FILL_SECTION);
|
|
|
+ }
|
|
|
+ // online enum 只返回选中项
|
|
|
+ handle_action_return(cadedate.optJSONObject("val_0"),group,child,ACTION_FILL_SECTION);
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
@@ -654,7 +663,7 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
|
|
|
}
|
|
|
|
|
|
- public void handle_action_return(JSONObject value,int group,int child,int action_code) {
|
|
|
+ public void handle_action_return(JSONObject value,int group,int child,int action_code ) {
|
|
|
if (value == null || value.length() == 0) {
|
|
|
return;
|
|
|
}
|
|
|
@@ -751,11 +760,14 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
if (subid == null || subid.isEmpty()) {
|
|
|
|
|
|
JSONObject jsonmap = sub_action.optJSONObject("key_map");
|
|
|
+
|
|
|
section_json = content_data_download.optJSONObject("section_" + group);
|
|
|
int icount = section_json .optInt("count");
|
|
|
for (int ic = 0; ic < icount; ic++) {
|
|
|
JSONObject modify_item = section_json.optJSONObject("item_" + ic);
|
|
|
String valuefrom = jsonmap.optString(modify_item.optString("name"));
|
|
|
+ if(TextUtils.isEmpty(valuefrom))
|
|
|
+ continue;
|
|
|
String valuestr = value.optString(valuefrom);
|
|
|
if (valuestr != null) {
|
|
|
try {
|
|
|
@@ -926,6 +938,8 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
for (int ic = 0; ic < icount; ic++) {
|
|
|
JSONObject modify_item = section_json.optJSONObject("item_" + ic);
|
|
|
String valuefrom = jsonmap.optString(modify_item.optString("name"));
|
|
|
+ if(TextUtils.isEmpty(valuefrom))
|
|
|
+ continue;
|
|
|
String valuestr = value.optString(valuefrom);
|
|
|
|
|
|
if (valuestr != null) {
|
|
|
@@ -2341,7 +2355,7 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
|
|
|
Bundle params=RAUtil.Json2Bundle(paramsjson);
|
|
|
|
|
|
- intent = new EnumSlectOnlineActivity.Builder().build(mCtx,title,max_select,groupPosition,childPosition,singleSelect,true,ONLINE_ENUM_URL,params);
|
|
|
+ intent = new EnumSlectOnlineActivity.Builder().build(mCtx,title,max_select,groupPosition,childPosition,singleSelect,true,ONLINE_ENUM_URL,params,-1);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -2532,7 +2546,7 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
{
|
|
|
throw new AssertionError("CommonEditor.handle_editor_cell_select not impl");
|
|
|
}
|
|
|
- protected void multiAction( int groupIndex,int itemIndex,JSONObject item_json)
|
|
|
+ protected void multiAction( int groupIndex,int itemIndex,JSONObject item_json, int subid)
|
|
|
{
|
|
|
|
|
|
throw new AssertionError("CommonEditor.multiAction not impl");
|
|
|
@@ -3986,7 +4000,7 @@ protected void commonAction(String value, int groupIndex,int itemIndex,JSONObjec
|
|
|
JSONObject sub_action = item_json.optJSONObject("item_" + i);
|
|
|
// String type = sub_action.optString("type");
|
|
|
|
|
|
- multiAction(group,child,sub_action);
|
|
|
+ multiAction(group,child,sub_action,i);
|
|
|
|
|
|
//
|
|
|
// if (type != null && type.equals("pull")) {
|